Delete mesa3D, not used any more

Change-Id: If5eecd309b22773d0a5984f4ee6df9323a01eacc
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 0986197..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,211 +0,0 @@
-# USE_LLVM_EXECUTIONENGINE is not fully implemented. We use libbcc instead.
-USE_LLVM_EXECUTIONENGINE := false
-# If using libLLVMExecutionEngine,
-# need to add files to several Android.mk in external/llvm, and comment out some stuff in
-# llvm DynamicLibrary.cpp and Intercept.cpp
-
-DEBUG_BUILD := false
-
-LOCAL_PATH := $(call my-dir)
-LIBBCC_ROOT_PATH := frameworks/compile/libbcc
-include $(LIBBCC_ROOT_PATH)/libbcc.mk
-
-# These are for using llvm::ExecutionEngine, also remove libbcc
-# libLLVMX86CodeGen;libLLVMX86Info;libLLVMBitReader;libLLVMSelectionDAG;libLLVMAsmPrinter;libLLVMJIT;libLLVMCodeGen;libLLVMTarget;libLLVMMC;libLLVMScalarOpts;libLLVMipo;libLLVMTransformUtils;libLLVMCore;libLLVMSupport;libLLVMSystem;libLLVMAnalysis;libLLVMInstCombine;libLLVMipa;libLLVMMCParser;libLLVMExecutionEngine;
-libMesa_STATIC_LIBS :=  \
-    libLLVMBitReader    \
-    libLLVMSelectionDAG \
-    libLLVMAsmPrinter   \
-    libLLVMJIT          \
-    libLLVMCodeGen      \
-    libLLVMTarget       \
-    libLLVMMC           \
-    libLLVMScalarOpts   \
-    libLLVMipo          \
-    libLLVMTransformUtils \
-    libLLVMCore         \
-    libLLVMSupport      \
-    libLLVMSystem       \
-    libLLVMAnalysis     \
-    libLLVMInstCombine  \
-    libLLVMipa          \
-    libLLVMMCParser     \
-    libLLVMExecutionEngine
-
-libMesa_SRC_FILES := \
-    src/glsl/glcpp/pp.c \
-    src/glsl/glcpp/glcpp-lex.c \
-    src/glsl/glcpp/glcpp-parse.c \
-    src/glsl/ast_expr.cpp \
-    src/glsl/ast_function.cpp \
-    src/glsl/ast_to_hir.cpp \
-    src/glsl/ast_type.cpp \
-    src/glsl/builtin_function.cpp \
-    src/glsl/glsl_lexer.cpp \
-    src/glsl/glsl_parser.cpp \
-    src/glsl/glsl_parser_extras.cpp \
-    src/glsl/glsl_symbol_table.cpp \
-    src/glsl/glsl_types.cpp \
-    src/glsl/hir_field_selection.cpp \
-    src/glsl/ir.cpp \
-    src/glsl/ir_basic_block.cpp \
-    src/glsl/ir_clone.cpp \
-    src/glsl/ir_constant_expression.cpp \
-    src/glsl/ir_expression_flattening.cpp \
-    src/glsl/ir_function.cpp \
-    src/glsl/ir_function_can_inline.cpp \
-    src/glsl/ir_hierarchical_visitor.cpp \
-    src/glsl/ir_hv_accept.cpp \
-    src/glsl/ir_import_prototypes.cpp \
-    src/glsl/ir_print_visitor.cpp \
-    src/glsl/ir_reader.cpp \
-    src/glsl/ir_rvalue_visitor.cpp \
-    src/glsl/ir_set_program_inouts.cpp \
-    src/glsl/ir_validate.cpp \
-    src/glsl/ir_variable.cpp \
-    src/glsl/ir_variable_refcount.cpp \
-    src/glsl/link_functions.cpp \
-    src/glsl/linker.cpp \
-    src/glsl/loop_analysis.cpp \
-    src/glsl/loop_controls.cpp \
-    src/glsl/loop_unroll.cpp \
-    src/glsl/lower_discard.cpp \
-    src/glsl/lower_if_to_cond_assign.cpp \
-    src/glsl/lower_instructions.cpp \
-    src/glsl/lower_jumps.cpp \
-    src/glsl/lower_mat_op_to_vec.cpp \
-    src/glsl/lower_noise.cpp \
-    src/glsl/lower_texture_projection.cpp \
-    src/glsl/lower_variable_index_to_cond_assign.cpp \
-    src/glsl/lower_vec_index_to_cond_assign.cpp \
-    src/glsl/lower_vec_index_to_swizzle.cpp \
-    src/glsl/lower_vector.cpp \
-    src/glsl/main.cpp \
-    src/glsl/opt_algebraic.cpp \
-    src/glsl/opt_constant_folding.cpp \
-    src/glsl/opt_constant_propagation.cpp \
-    src/glsl/opt_constant_variable.cpp \
-    src/glsl/opt_copy_propagation.cpp \
-    src/glsl/opt_dead_code.cpp \
-    src/glsl/opt_dead_code_local.cpp \
-    src/glsl/opt_dead_functions.cpp \
-    src/glsl/opt_discard_simplification.cpp \
-    src/glsl/opt_function_inlining.cpp \
-    src/glsl/opt_if_simplification.cpp \
-    src/glsl/opt_noop_swizzle.cpp \
-    src/glsl/opt_redundant_jumps.cpp \
-    src/glsl/opt_structure_splitting.cpp \
-    src/glsl/opt_swizzle_swizzle.cpp \
-    src/glsl/opt_tree_grafting.cpp \
-    src/glsl/s_expression.cpp \
-    src/glsl/strtod.c \
-    src/glsl/ir_to_llvm.cpp \
-    src/mesa/main/shaderobj.c \
-    src/mesa/program/hash_table.c \
-    src/mesa/program/prog_parameter.cpp \
-    src/mesa/program/symbol_table.c \
-    src/pixelflinger2/buffer.cpp \
-    src/pixelflinger2/format.cpp \
-    src/pixelflinger2/llvm_scanline.cpp \
-    src/pixelflinger2/llvm_texture.cpp \
-    src/pixelflinger2/pixelflinger2.cpp \
-    src/pixelflinger2/raster.cpp \
-    src/pixelflinger2/scanline.cpp \
-    src/pixelflinger2/shader.cpp \
-    src/pixelflinger2/texture.cpp \
-    src/talloc/hieralloc.c
-
-libMesa_C_INCLUDES := \
-    $(LOCAL_PATH) \
-    $(LOCAL_PATH)/src/glsl   \
-    $(LOCAL_PATH)/src/mesa   \
-    $(LOCAL_PATH)/src/talloc \
-    $(LOCAL_PATH)/src/mapi   \
-    $(LOCAL_PATH)/include    \
-    $(LIBBCC_ROOT_PATH)/include
-
-# Static library for host
-# ========================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-ifeq ($(DEBUG_BUILD),true)
-LOCAL_CFLAGS += -DDEBUG -UNDEBUG -O0 -g
-else
-LOCAL_CFLAGS += -O3
-endif
-
-LOCAL_MODULE := libMesa
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_IS_HOST_MODULE := true
-LOCAL_SRC_FILES := $(libMesa_SRC_FILES)
-
-ifeq ($(USE_LLVM_EXECUTIONENGINE),true)
-LOCAL_CFLAGS += -DUSE_LLVM_EXECUTIONENGINE=1
-LOCAL_STATIC_LIBRARIES := libLLVMX86CodeGen libLLVMX86Info $(libMesa_STATIC_LIBS)
-else
-LOCAL_CFLAGS += -DUSE_LLVM_EXECUTIONENGINE=0
-LOCAL_SHARED_LIBRARIES := libbcc libbcinfo
-endif
-
-LOCAL_C_INCLUDES := $(libMesa_C_INCLUDES)
-
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_HOST_BUILD_MK)
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-
-# Static library for target
-# ========================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-ifeq ($(DEBUG_BUILD),true)
-LOCAL_CFLAGS += -DDEBUG -UNDEBUG -O0 -g
-else
-LOCAL_CFLAGS += -O3
-endif
-
-LOCAL_MODULE := libMesa
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-LOCAL_SRC_FILES := $(libMesa_SRC_FILES)
-LOCAL_SHARED_LIBRARIES := libstlport libcutils libdl libutils
-
-ifeq ($(USE_LLVM_EXECUTIONENGINE),true)
-LOCAL_CFLAGS += -DUSE_LLVM_EXECUTIONENGINE=1
-LOCAL_STATIC_LIBRARIES :=  libLLVMARMCodeGen libLLVMARMInfo libLLVMARMDisassembler \
-    libLLVMARMAsmPrinter $(libMesa_STATIC_LIBS)
-else
-LOCAL_CFLAGS += -DUSE_LLVM_EXECUTIONENGINE=0
-LOCAL_SHARED_LIBRARIES += libbcc libbcinfo
-endif
-
-LOCAL_C_INCLUDES := $(libMesa_C_INCLUDES)
-
-include $(LIBBCC_GEN_CONFIG_MK)
-include $(LLVM_DEVICE_BUILD_MK)
-include $(BUILD_STATIC_LIBRARY)
-
-# glsl_compiler for host
-# ========================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-ifeq ($(DEBUG_BUILD),true)
-LOCAL_CFLAGS += -DDEBUG -UNDEBUG -O0 -g
-endif
-
-LOCAL_MODULE := glsl_compiler
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_SRC_FILES := src/glsl/glsl_compiler.cpp
-LOCAL_C_INCLUDES := $(libMesa_C_INCLUDES)
-LOCAL_STATIC_LIBRARIES := libMesa
-
-include $(BUILD_HOST_EXECUTABLE)
-
-# Build children
-# ========================================================
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/CleanSpec.mk b/CleanSpec.mk
deleted file mode 100644
index 93e143d..0000000
--- a/CleanSpec.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (C) 2007 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# If you don't need to do a full clean build but would like to touch
-# a file or delete some intermediate files, add a clean step to the end
-# of the list.  These steps will only be run once, if they haven't been
-# run before.
-#
-# E.g.:
-#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
-#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
-#
-# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
-# files that are missing or have been moved.
-#
-# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
-# Use $(OUT_DIR) to refer to the "out" directory.
-#
-# If you need to re-do something that's already mentioned, just copy
-# the command and add it to the bottom of the list.  E.g., if a change
-# that you made last week required touching a file and a change you
-# made today requires touching the same file, just copy the old
-# touch step and add it to the end of the list.
-#
-# ************************************************
-# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
-# ************************************************
-
-# For example:
-#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
-#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
-#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
-#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
-
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libMesa_intermediates)
-
-# ************************************************
-# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
-# ************************************************
diff --git a/MODULE_LICENSE_MIT_BSD_ASL2 b/MODULE_LICENSE_MIT_BSD_ASL2
deleted file mode 100644
index e69de29..0000000
--- a/MODULE_LICENSE_MIT_BSD_ASL2
+++ /dev/null
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index d6337df..0000000
--- a/NOTICE
+++ /dev/null
@@ -1,74 +0,0 @@
-   =========================================================================
-   ==  NOTICE file for the Mesa 3-D graphics library                      ==
-   =========================================================================
-
-Copyright © 1999-2008 Brian Paul   All Rights Reserved.
-Copyright © 2008-1010 Intel Corporation
-Copyright © 2007-2010 VMware, Inc.   All Rights Reserved.
-Copyright © 2010 Luca Barbieri
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-   =========================================================================
-   ==  NOTICE file for include/c99/stdint.h and include/c99/inttypes.h    ==
-   =========================================================================
-
-Copyright (c) 2006 Alexander Chemeris
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-  1. Redistributions of source code must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-
-  3. The name of the author may be used to endorse or promote products
-     derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   =========================================================================
-   ==  NOTICE file for pixelflinger2                                      ==
-   =========================================================================
-
-Copyright 2007,2010,2011 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
diff --git a/docs/COPYING b/docs/COPYING
deleted file mode 100644
index b88946c..0000000
--- a/docs/COPYING
+++ /dev/null
@@ -1,490 +0,0 @@
-
-Some parts of Mesa are copyrighted under the GNU LGPL.  See the
-Mesa/docs/COPYRIGHT file for details.
-
-The following is the standard GNU copyright file.
-----------------------------------------------------------------------
-
-
-		  GNU LIBRARY GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
-                    675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL.  It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it.  You can use it for
-your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library.  If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software.  To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs.  This
-license, the GNU Library General Public License, applies to certain
-designated libraries.  This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
-  The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it.  Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program.  However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
-  Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries.  We
-concluded that weaker conditions might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves.  This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them.  (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.)  The hope is that this
-will lead to faster development of free libraries.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, while the latter only
-works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
-		  GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License").  Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    d) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-     Appendix: How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library 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
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public
-    License along with this library; if not, write to the Free
-    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
diff --git a/docs/GL3.txt b/docs/GL3.txt
deleted file mode 100644
index fb22739..0000000
--- a/docs/GL3.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-
-Status of OpenGL 3.x features in Mesa
-
-
-Note: when an item is marked as "DONE" it means all the core Mesa
-infrastructure is complete but it may be the case that few (if any) drivers
-implement the features.
-
-
-Feature                                               Status
------------------------------------------------------ ------------------------
-
-GL 3.0:
-
-GLSL changes (GL_EXT_gpu_shader4, etc)                not started
-Conditional rendering (GL_NV_conditional_render)      DONE (swrast & softpipe)
-Map buffer subranges (GL_ARB_map_buffer_range)        DONE
-Float textures, renderbuffers                         some infrastructure done
- (incl. GL_EXT_packed_float, GL_EXT_shared_exponent)
-Framebuffer objects (GL_EXT_framebuffer_object)       DONE
-Half-float                                            some infrastructure done
-Multisample blit                                      DONE
-Non-normalized Integer texture/framebuffer formats    ~50% done
-1D/2D Texture arrays                                  core Mesa, swrast done
-Packed depth/stencil formats                          DONE
-Per-buffer blend and masks (GL_EXT_draw_buffers2)     DONE
-GL_EXT_texture_compression_rgtc                       not started
-Red and red/green texture formats                     DONE (swrast, i965, gallium)
-Transform feedback (GL_EXT_transform_feedback)        ~50% done
-   glBindFragDataLocation, glGetFragDataLocation,
-   glBindBufferRange, glBindBufferBase commands
-Vertex array objects (GL_APPLE_vertex_array_object)   DONE
-sRGB framebuffer format (GL_EXT_framebuffer_sRGB)     not started
-glClearBuffer commands                                DONE
-glGetStringi command                                  DONE
-glTexParameterI, glGetTexParameterI commands          DONE
-glVertexAttribI commands                              DONE (but converts int
-                                                            values to floats)
-
-
-GL 3.1:
-
-GLSL 1.30 and 1.40                                    not started
-Instanced drawing (GL_ARB_draw_instanced)             ~50% done
-Buffer copying (GL_ARB_copy_buffer)                   DONE
-Primitive restart (GL_NV_primitive_restart)           DONE (gallium)
-16 vertex texture image units                         not started
-Texture buffer objs (GL_ARB_texture_buffer_object)    not started
-Rectangular textures (GL_ARB_texture_rectangle)       DONE
-Uniform buffer objs (GL_ARB_uniform_buffer_object)    not started
-Signed normalized texture formats                     ~50% done
-
-
-GL 3.2:
-
-Core/compatibility profiles                           not started
-GLSL 1.50                                             not started
-Geometry shaders (GL_ARB_geometry_shader4)            partially done (Zack)
-BGRA vertex order (GL_ARB_vertex_array_bgra)          DONE
-Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE
-Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (swrast, gallium)
-Provoking vertex (GL_ARB_provoking_vertex)            DONE
-Seamless cubemaps (GL_ARB_seamless_cube_map)          DONE, mostly?
-Multisample textures (GL_ARB_texture_multisample)     not started
-Frag depth clamp (GL_ARB_depth_clamp)                 DONE
-Fence objects (GL_ARB_sync)                           DONE
-
-
-GL 3.3:
-
-GLSL 3.30                                             not started
-GL_ARB_blend_func_extended                            not started
-GL_ARB_explicit_attrib_location                       DONE (swrast, i915, i965)
-GL_ARB_occlusion_query2                               not started
-GL_ARB_sampler_objects                                not started
-GL_ARB_texture_rgb10_a2ui                             not started
-GL_ARB_texture_swizzle                                DONE (same as EXT version)
-GL_ARB_timer_query                                    DONE (only Xlib sw driver)
-GL_ARB_instanced_arrays                               not started
-GL_ARB_vertex_type_2_10_10_10_rev                     not started
-
-
-GL 4.0:
-
-GLSL 4.0                                             not started
-GL_ARB_texture_query_lod                             not started
-GL_ARB_draw_buffers_blend                            not started
-GL_ARB_draw_indirect                                 not started
-GL_ARB_gpu_shader_fp64                               not started
-GL_ARB_sample_shading                                not started
-GL_ARB_shader_subroutine                             not started
-GL_ARB_tessellation_shader                           not started
-GL_ARB_texture_buffer_object_rgb32                   not started
-GL_ARB_texture_cube_map_array                        not started
-GL_ARB_texture_gather                                not started
-GL_ARB_transform_feedback2                           not started
-GL_ARB_transform_feedback3                           not started
-
-
-GL 4.1:
-
-GLSL 4.1                                             not started
-GL_ARB_ES2_compatibility                             not started
-GL_ARB_get_program_binary                            not started
-GL_ARB_separate_shader_objects                       some infrastructure done
-GL_ARB_shader_precision                              not started
-GL_ARB_vertex_attrib_64bit                           not started
-GL_ARB_viewport_array                                not started
-
-
-
-
-More info about these features and the work involved can be found at
-http://dri.freedesktop.org/wiki/MissingFunctionality
diff --git a/docs/MESA_agp_offset.spec b/docs/MESA_agp_offset.spec
deleted file mode 100644
index 8dcc723..0000000
--- a/docs/MESA_agp_offset.spec
+++ /dev/null
@@ -1,95 +0,0 @@
-Name
-
-    MESA_agp_offset
-
-Name Strings
-
-    GLX_MESA_agp_offset
-
-Contact
-
-    Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
-    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
-
-Status
-
-    Shipping (Mesa 4.0.4 and later.  Only implemented in particular
-    XFree86/DRI drivers.)
-
-Version
-
-    1.0
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.0 or later is required
-    GLX_NV_vertex_array_range is required.
-    This extensions is written against the OpenGL 1.4 Specification.
-
-Overview
-
-    This extensions provides a way to convert pointers in an AGP memory
-    region into byte offsets into the AGP aperture.
-    Note, this extension depends on GLX_NV_vertex_array_range, for which
-    no real specification exists.  See GL_NV_vertex_array_range for more
-    information.
-
-IP Status
-
-    None
-
-Issues
-
-    None
-
-New Procedures and Functions
-
-    unsigned int glXGetAGPOffsetMESA( const void *pointer )
-
-New Tokens
-
-    None
-
-Additions to the OpenGL 1.4 Specification
-
-    None
-
-Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors)
-
-    Add a new section, 3.6 as follows:
-
-    3.6 AGP Memory Access
-
-    On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV
-    and freed with glXFreeMemoryNV.  Sometimes it's useful to know where a
-    block of AGP memory is located with respect to the start of the AGP
-    aperature.  The function
-
-        GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
-
-    Returns the offset of the given memory block from the start of AGP
-    memory in basic machine units (i.e. bytes).  If pointer is invalid
-    the value ~0 will be returned.
-
-GLX Protocol
-
-    None.  This is a client side-only extension.
-
-Errors
-
-    glXGetAGPOffsetMESA will return ~0 if the pointer does not point to
-    an AGP memory region.
-
-New State
-
-    None
-
-Revision History
-
-    20 September 2002 - Initial draft
-    2 October 2002 - finished GLX chapter 3 additions
-    27 July 2004 - use unsigned int instead of GLuint, void instead of GLvoid
diff --git a/docs/MESA_copy_sub_buffer.spec b/docs/MESA_copy_sub_buffer.spec
deleted file mode 100644
index 752a014..0000000
--- a/docs/MESA_copy_sub_buffer.spec
+++ /dev/null
@@ -1,96 +0,0 @@
-Name
-
-    MESA_copy_sub_buffer
-
-Name Strings
-
-    GLX_MESA_copy_sub_buffer
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    Shipping since Mesa 2.6 in February, 1998.
-
-Version
-
-    Last Modified Date:  12 January 2009
-
-Number
-
-    215
-
-Dependencies
-
-    OpenGL 1.0 or later is required.
-    GLX 1.0 or later is required.
-
-Overview
-
-    The glxCopySubBufferMESA() function copies a rectangular region
-    of the back color buffer to the front color buffer.  This can be
-    used to quickly repaint 3D windows in response to expose events
-    when the back color buffer cannot be damaged by other windows.
-
-IP Status
-
-    Open-source; freely implementable.
-
-Issues
-
-    None.
-
-New Procedures and Functions
-
-    void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
-			       int x, int y, int width, int height );
-
-New Tokens
-
-    None.
-
-Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
-
-    Add to section 3.3.10 Double Buffering:
-
-    The function
-
-	 void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
-				    int x, int y, int width, int height );
-
-    may be used to copy a rectangular region of the back color buffer to
-    the front color buffer.  This can be used to quickly repaint 3D windows
-    in response to expose events when the back color buffer cannot be
-    damaged by other windows.
-
-    <x> and <y> indicates the lower-left corner of the region to copy and
-    <width> and <height> indicate the size in pixels.  Coordinate (0,0)
-    corresponds to the lower-left pixel of the window, like glReadPixels.
-
-    If dpy and drawable are the display and drawable for the calling
-    thread's current context, glXCopySubBufferMESA performs an
-    implicit glFlush before it returns.  Subsequent OpenGL commands
-    may be issued immediately after calling glXCopySubBufferMESA, but
-    are not executed until the copy is completed. 
-
-GLX Protocol
-
-    None at this time.  The extension is implemented in terms of ordinary
-    Xlib protocol inside of Mesa.
-
-Errors
-
-    None.
-
-New State
-
-    None.
-
-Revision History
-
-    12 January 2009 Ian Romanick - Added language about implicit flush
-                                   and command completion.
-    8 June 2000     Brian Paul   - initial specification
-
diff --git a/docs/MESA_drm_image.spec b/docs/MESA_drm_image.spec
deleted file mode 100644
index c9853a7..0000000
--- a/docs/MESA_drm_image.spec
+++ /dev/null
@@ -1,149 +0,0 @@
-Name
-
-    MESA_drm_image
-
-Name Strings
-
-    EGL_MESA_drm_image
-
-Contact
-
-    Kristian Høgsberg <krh@bitplanet.net>
-
-Status
-
-    Proposal
-
-Version
-
-    Version 2, August 25, 2010
-
-Number
-
-    EGL Extension #not assigned
-
-Dependencies
-
-    Reguires EGL 1.4 or later.  This extension is written against the
-    wording of the EGL 1.4 specification.
-
-    EGL_KHR_base_image is required.
-
-Overview
-
-    This extension provides entry points for integrating EGLImage with the
-    Linux DRM mode setting and memory management drivers.  The extension
-    lets applications create EGLImages without a client API resource and
-    lets the application get the DRM buffer handles.
-
-IP Status
-
-    Open-source; freely implementable.
-
-New Procedures and Functions
-
-    EGLImageKHR eglCreateDRMImageMESA(EGLDisplay dpy,
-                                      const EGLint *attrib_list);
-
-    EGLBoolean eglExportDRMImageMESA(EGLDisplay dpy,
-                                     EGLImageKHR image,
-                                     EGLint *name,
-				     EGLint *handle,
-				     EGLint *stride);
-
-New Tokens
-
-    Accepted in the <attrib_list> parameter of eglCreateDRMImageMESA:
-
-        EGL_DRM_BUFFER_FORMAT_MESA		0x31D0
-        EGL_DRM_BUFFER_USE_MESA			0x31D1
-
-    Accepted as values for the EGL_IMAGE_FORMAT_MESA attribute:
-
-        EGL_DRM_BUFFER_FORMAT_ARGB32_MESA	0x31D2
-
-    Bits accepted in EGL_DRM_BUFFER_USE_MESA:
-
-        EGL_DRM_BUFFER_USE_SCANOUT_MESA		0x0001
-        EGL_DRM_BUFFER_USE_SHARE_MESA		0x0002
-
-    Accepted in the <target> parameter of eglCreateImageKHR:
-
-        EGL_DRM_BUFFER_MESA			0x31D3
-
-    Use when importing drm buffer:
-
-        EGL_DRM_BUFFER_STRIDE_MESA		0x31D4
-        EGL_DRM_BUFFER_FORMAT_MESA		0x31D0
-
-Additions to the EGL 1.4 Specification:
-
-    To create a DRM EGLImage, call
-
-        EGLImageKHR eglCreateDRMImageMESA(EGLDisplay dpy,
-                                          const EGLint *attrib_list);
-
-    In the attribute list, pass EGL_WIDTH, EGL_HEIGHT and format and
-    use in the attrib list using EGL_DRM_BUFFER_FORMAT_MESA and
-    EGL_DRM_BUFFER_USE_MESA.  The only format specified by this
-    extension is EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, where each pixel
-    is a CPU-endian, 32-bit quantity, with alpha in the upper 8 bits,
-    then red, then green, then blue.  The bit values accepted by
-    EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA and
-    EGL_DRM_BUFFER_USE_SHARE_MESA.  EGL_DRM_BUFFER_USE_SCANOUT_MESA
-    requests that the created EGLImage should be usable as a scanout
-    buffer with the DRM kernel modesetting API.  The
-    EGL_DRM_BUFFER_USE_SHARE_MESA bit requests that the EGLImage can
-    be shared with other processes by passing the underlying DRM
-    buffer name.
-
-    To create a process local handle or a global DRM name for a
-    buffer, call
-
-        EGLBoolean eglExportDRMImageMESA(EGLDisplay dpy,
-                                         EGLImageKHR image,
-                                         EGLint *name,
-                                         EGLint *handle,
-                                         EGLint *stride);
-
-    If <name> is non-NULL, a global name is assigned to the image and
-    written to <name>, the handle (local to the DRM file descriptor,
-    for use with DRM kernel modesetting API) is written to <handle> if
-    non-NULL and the stride (in bytes) is written to <stride>, if
-    non-NULL.
-
-    Import a shared buffer by calling eglCreateImageKHR with
-    EGL_DRM_BUFFER_MESA as the target, using EGL_WIDTH, EGL_HEIGHT,
-    EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_STRIDE_MESA
-    in the attrib list.
-
-Issues
-
-    1.  Why don't we use eglCreateImageKHR with a target that
-        indicates that we want to create an EGLImage from scratch?
-
-        RESOLVED: The eglCreateImageKHR entry point is reserved for
-        creating an EGLImage from an already existing client API
-        resource.  This is fine when we're creating the EGLImage from
-        an existing DRM buffer name, it doesn't seem right to overload
-        the function to also allocate the underlying resource.
-
-    2.  Why don't we use an eglQueryImageMESA type functions for
-        querying the DRM EGLImage attributes (name, handle, and stride)?
-
-        RESOLVED: The eglQueryImage function has been proposed often,
-        but it goes against the EGLImage design.  EGLImages are opaque
-        handles to a 2D array of pixels, which can be passed between
-        client APIs.  By referenceing an EGLImage in a client API, the
-        EGLImage target (a texture, a renderbuffer or such) can be
-        used to query the attributes of the EGLImage.  We don't have a
-        full client API for creating and querying DRM buffers, though,
-        so we use a new EGL extension entry point instead.
-
-Revision History
-
-    Version 1, June 3, 2010
-        Initial draft (Kristian Høgsberg)
-    Version 2, August 25, 2010
-        Flesh out the extension a bit, add final EGL tokens, capture
-        some of the original discussion in the issues section.
diff --git a/docs/MESA_pack_invert.spec b/docs/MESA_pack_invert.spec
deleted file mode 100644
index 53d5fca..0000000
--- a/docs/MESA_pack_invert.spec
+++ /dev/null
@@ -1,138 +0,0 @@
-Name
-
-    MESA_pack_invert
-
-Name Strings
-
-    GL_MESA_pack_invert
-
-Contact
-
-    Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
-    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
-
-Status
-
-    Shipping (Mesa 4.0.4 and later)
-
-Version
-
-    1.0
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.0 or later is required
-    This extensions is written against the OpenGL 1.4 Specification.
-
-Overview
-
-    This extension adds a new pixel storage parameter to indicate that
-    images are to be packed in top-to-bottom order instead of OpenGL's
-    conventional bottom-to-top order.  Only pixel packing can be
-    inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
-    etc).
-
-    Almost all known image file formats store images in top-to-bottom
-    order.  As it is, OpenGL reads images from the frame buffer in
-    bottom-to-top order.  Thus, images usually have to be inverted before
-    writing them to a file with image I/O libraries.  This extension
-    allows images to be read such that inverting isn't needed.
-
-IP Status
-
-    None
-
-Issues
-
-    1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
-
-    Resolved:  No, we're only concerned with pixel packing.  There are other
-    solutions for inverting images when using glDrawPixels (negative Y pixel
-    zoom) or glTexImage (invert the vertex T coordinates).  It would be easy
-    enough to define a complementary extension for pixel packing in the
-    future if needed.
-
-New Procedures and Functions
-
-    None
-
-New Tokens
-
-    Accepted by the <pname> parameter of PixelStorei and PixelStoref
-    and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
-    and GetBooleanv:
-
-        PACK_INVERT_MESA                   0x8758
-
-Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
-
-    None
-
-Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
-Operations and the Frame Buffer)
-
-    Add the following entry to table 4.4 (PixelStore parameters) on page 182:
-
-    Parameter Name       Type    Initial Value    Valid Range
-    ---------------------------------------------------------
-    PACK_INVERT_MESA     boolean     FALSE        TRUE/FALSE
-
-    In the section labeled "Placement in Client Memory" on page 184
-    insert the following text into the paragraph before the sentence
-    that starts with "If the format is RED, GREEN, BLUE...":
-
-    "The parameter PACK_INVERT_MESA controls whether the image is packed
-     in bottom-to-top order (the default) or top-to-bottom order.  Equation
-     3.8 is modified as follows:
-
-     ... the first element of the Nth row is indicated by
-
-         p + Nk,                if PACK_INVERT_MESA is false
-         p + k * (H - 1) - Nk,  if PACK_INVERT_MESA is true, where H is the
-                                image height
-    "
-
-Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
-State Requests)
-
-    None
-
-Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
-
-    None
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None
-
-GLX Protocol
-
-    None
-
-Errors
-
-    None
-
-New State
-
-    Add the following entry to table 6.20 (Pixels) on page 235:
-
-    Get Value         Type     Get Cmd    Initial Value  Description                Sec    Attribute
-    --------------------------------------------------------------------------------------------------
-    PACK_INVERT_MESA  boolean  GetBoolean  FALSE         Value of PACK_INVERT_MESA  4.3.2  pixel-store
-
-Revision History
-
-    21 September 2002 - Initial draft
diff --git a/docs/MESA_pixmap_colormap.spec b/docs/MESA_pixmap_colormap.spec
deleted file mode 100644
index fb0b441..0000000
--- a/docs/MESA_pixmap_colormap.spec
+++ /dev/null
@@ -1,90 +0,0 @@
-Name
-
-    MESA_pixmap_colormap
-
-Name Strings
-
-    GLX_MESA_pixmap_colormap
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    Shipping since Mesa 1.2.8 in May, 1996.
-
-Version
-
-    Last Modified Date:  8 June 2000
-
-Number
-
-    216
-
-Dependencies
-
-    OpenGL 1.0 or later is required.
-    GLX 1.0 or later is required.
-
-Overview
-
-    Since Mesa allows RGB rendering into drawables with PseudoColor,
-    StaticColor, GrayScale and StaticGray visuals, Mesa needs a colormap
-    in order to compute pixel values during rendering.
-
-    The colormap associated with a window can be queried with normal
-    Xlib functions but there is no colormap associated with pixmaps.
-
-    The glXCreateGLXPixmapMESA function is an alternative to glXCreateGLXPixmap
-    which allows specification of a colormap.
-
-IP Status
-
-    Open-source; freely implementable.
-
-Issues
-
-    None.
-
-New Procedures and Functions
-
-    GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
-				      Pixmap pixmap, Colormap cmap );
-
-New Tokens
-
-    None.
-
-Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
-
-    Add to section 3.4.2 Off Screen Rendering
-
-    The Mesa implementation of GLX allows RGB rendering into X windows and
-    pixmaps of any visual class, not just TrueColor or DirectColor.  In order
-    to compute pixel values from RGB values Mesa requires a colormap.
-
-    The function
-
-	GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
-					  Pixmap pixmap, Colormap cmap );
-
-    allows one to create a GLXPixmap with a specific colormap.  The image
-    rendered into the pixmap may then be copied to a window (which uses the
-    same colormap and visual) with the expected results.
-
-GLX Protocol
-
-    None since this is a client-side extension.
-
-Errors
-
-    None.
-
-New State
-
-    None.
-
-Revision History
-
-    8 June 2000 - initial specification
diff --git a/docs/MESA_release_buffers.spec b/docs/MESA_release_buffers.spec
deleted file mode 100644
index 8db9350..0000000
--- a/docs/MESA_release_buffers.spec
+++ /dev/null
@@ -1,85 +0,0 @@
-Name
-
-    MESA_release_buffers
-
-Name Strings
-
-    GLX_MESA_release_buffers
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    Shipping since Mesa 2.0 in October, 1996.
-
-Version
-
-    Last Modified Date:  8 June 2000
-
-Number
-
-    217
-
-Dependencies
-
-    OpenGL 1.0 or later is required.
-    GLX 1.0 or later is required.
-
-Overview
-
-    Mesa's implementation of GLX is entirely implemented on the client side.
-    Therefore, Mesa cannot immediately detect when an X window or pixmap is
-    destroyed in order to free any ancilliary data associated with the window
-    or pixmap.
-
-    The glxMesaReleaseBuffers() function can be used to explicitly indicate
-    when the back color buffer, depth buffer, stencil buffer, and/or accum-
-    ulation buffer associated with a drawable can be freed.
-
-IP Status
-
-    Open-source; freely implementable.
-
-Issues
-
-    None.
-
-New Procedures and Functions
-
-    Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
-
-New Tokens
-
-    None.
-
-Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
-
-    The function
-
-	Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
-
-    causes all software ancilliary buffers (back buffer, depth, stencil,
-    accum, etc) associated with the named drawable to be immediately
-    deallocated.  True is returned if <d> is a valid Mesa GLX drawable,
-    else False is returned.  After calling glXReleaseBuffersMESA, the
-    drawable should no longer be used for GL rendering.  Results of
-    attempting to do so are undefined.
-
-
-GLX Protocol
-
-    None, since this is a client-side operation.
-
-Errors
-
-    None.
-
-New State
-
-    None.
-
-Revision History
-
-    8 June 2000 - initial specification
diff --git a/docs/MESA_resize_buffers.spec b/docs/MESA_resize_buffers.spec
deleted file mode 100644
index 533d017..0000000
--- a/docs/MESA_resize_buffers.spec
+++ /dev/null
@@ -1,81 +0,0 @@
-Name
-
-    MESA_resize_buffers
-
-Name Strings
-
-    GL_MESA_resize_buffers
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    Shipping (since Mesa version 2.2)
-
-Version
-
-
-Number
-
-    196
-
-Dependencies
-
-    Mesa 2.2 or later is required.
-
-Overview
-
-    Mesa is often used as a client library with no integration with
-    the computer's window system (an X server, for example).  And since
-    Mesa does not have an event loop nor window system callbacks, it
-    cannot properly respond to window system events.  In particular,
-    Mesa cannot automatically detect when a window has been resized.
-
-    Mesa's glViewport command queries the current window size and updates
-    its internal data structors accordingly.  This normally works fine
-    since most applications call glViewport in responce to window size
-    changes.
-
-    In some situations, however, the application may not call glViewport
-    when a window size changes but would still like Mesa to adjust to
-    the new window size.  This extension exports a new function to solve
-    this problem.
-
-New Procedures and Functions
-
-    void glResizeBuffersMESA( void )
-
-New Tokens
-
-    none
-
-Additions to the OpenGL Specification (no particular section)
-
-    The glResizeBuffersMESA command may be called when the client
-    determines that a window has been resized.  Calling
-    glResizeBuffersMESA causes Mesa to query the current window size
-    and adjust its internal data structures.  This may include
-    reallocating depth, stencil, alpha and accumulation buffers.
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None
-
-Errors
-
-    INVALID_OPERATION is generated if ResizeBuffersMESA is called betweeen
-    Begin and End.
-
-New State
-
-    None.
-
-New Implementation Dependent State
-
-    None.
-
-Revision History
-
-  * Revision 1.0 - Initial specification
diff --git a/docs/MESA_set_3dfx_mode.spec b/docs/MESA_set_3dfx_mode.spec
deleted file mode 100644
index 06d97ca..0000000
--- a/docs/MESA_set_3dfx_mode.spec
+++ /dev/null
@@ -1,85 +0,0 @@
-Name
-
-    MESA_set_3dfx_mode
-
-Name Strings
-
-    GLX_MESA_set_3dfx_mode
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    Shipping since Mesa 2.6 in February, 1998.
-
-Version
-
-    Last Modified Date:  8 June 2000
-
-Number
-
-    218
-
-Dependencies
-
-    OpenGL 1.0 or later is required.
-    GLX 1.0 or later is required.
-
-Overview
-
-    The Mesa Glide driver allows full-screen rendering or rendering into
-    an X window.  The glXSet3DfxModeMESA() function allows an application
-    to switch between full-screen and windowed rendering.
-
-IP Status
-
-    Open-source; freely implementable.
-
-Issues
-
-    None.
-
-New Procedures and Functions
-
-    GLboolean glXSet3DfxModeMESA( GLint mode );
-
-New Tokens
-
-    GLX_3DFX_WINDOW_MODE_MESA	    0x1
-    GLX_3DFX_FULLSCREEN_MODE_MESA   0x2
-
-Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
-
-    The Mesa Glide device driver allows either rendering in full-screen
-    mode or rendering into an X window.  An application can switch between
-    full-screen and window rendering with the command:
-
-	GLboolean glXSet3DfxModeMESA( GLint mode );
-
-    <mode> may either be GLX_3DFX_WINDOW_MODE_MESA to indicate window
-    rendering or GLX_3DFX_FULLSCREEN_MODE_MESA to indicate full-screen mode.
-
-    GL_TRUE is returned if <mode> is valid and the operation completed
-    normally.  GL_FALSE is returned if <mode> is invalid or if the Glide
-    driver is not being used.
-
-    Note that only one drawable and context can be created at any given
-    time with the Mesa Glide driver.
-
-GLX Protocol
-
-    None since this is a client-side extension.
-
-Errors
-
-    None.
-
-New State
-
-    None.
-
-Revision History
-
-    8 June 2000 - initial specification
diff --git a/docs/MESA_shader_debug.spec b/docs/MESA_shader_debug.spec
deleted file mode 100644
index fab92ab..0000000
--- a/docs/MESA_shader_debug.spec
+++ /dev/null
@@ -1,264 +0,0 @@
-Name
-
-    MESA_shader_debug
-
-Name Strings
-
-    GL_MESA_shader_debug
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-    Michal Krol (mjkrol 'at' gmail.com)
-
-Status
-
-    Obsolete.
-
-Version
-
-    Last Modified Date: July 30, 2006
-    Author Revision: 0.2
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.0 is required.
-
-    The ARB_shader_objects extension is required.
-
-    The ARB_shading_language_100 extension is required.
-
-    The extension is written against the OpenGL 1.5 specification.
-
-    The extension is written against the OpenGL Shading Language 1.10
-    Specification.
-
-Overview
-
-    This extension introduces a debug object that can be attached to
-    a program object to enable debugging. Vertex and/or fragment shader,
-    during execution, issue diagnostic function calls that are logged
-    to the debug object's log. A separate debug log for each shader type
-    is maintained. A debug object can be attached, detached and queried
-    at any time outside the Begin/End pair. Multiple debug objects can
-    be attached to a single program object.
-
-IP Status
-
-    None
-
-Issues
-
-    None
-
-New Procedures and Functions
-
-    handleARB CreateDebugObjectMESA(void)
-    void ClearDebugLogMESA(handleARB obj, enum logType, enum shaderType)
-    void GetDebugLogMESA(handleARB obj, enum logType, enum shaderType,
-                         sizei maxLength, sizei *length,
-                         charARB *debugLog)
-    sizei GetDebugLogLengthMESA(handleARB obj, enum logType,
-                                enum shaderType)
-
-New Types
-
-    None
-
-New Tokens
-
-    Returned by the <params> parameter of GetObjectParameter{fi}vARB:
-
-        DEBUG_OBJECT_MESA                               0x8759
-
-    Accepted by the <logType> argument of ClearDebugLogMESA,
-    GetDebugLogLengthMESA and GetDebugLogMESA:
-
-        DEBUG_PRINT_MESA                                0x875A
-        DEBUG_ASSERT_MESA                               0x875B
-
-Additions to Chapter 2 of the OpenGL 1.5 Specification
-(OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization)
-
-    None
-
-Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
-Operations and the Frame Buffer)
-
-    None
-
-Additions to Chapter 5 of the OpenGL 1.5 Specification
-(Special Functions)
-
-    None
-
-Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
-Requests)
-
-    None
-
-Additions to Appendix A of the OpenGL 1.5 Specification (Invariance)
-
-    None
-
-Additions to Chapter 1 of the OpenGL Shading Language 1.10 Specification
-(Introduction)
-
-    None
-
-Additions to Chapter 2 of the OpenGL Shading Language 1.10 Specification
-(Overview of OpenGL Shading)
-
-    None
-
-Additions to Chapter 3 of the OpenGL Shading Language 1.10 Specification
-(Basics)
-
-    None
-
-Additions to Chapter 4 of the OpenGL Shading Language 1.10 Specification
-(Variables and Types)
-
-    None
-
-Additions to Chapter 5 of the OpenGL Shading Language 1.10 Specification
-(Operators and Expressions)
-
-    None
-
-Additions to Chapter 6 of the OpenGL Shading Language 1.10 Specification
-(Statements and Structure)
-
-    None
-
-Additions to Chapter 7 of the OpenGL Shading Language 1.10 Specification
-(Built-in Variables)
-
-    None
-
-Additions to Chapter 8 of the OpenGL Shading Language 1.10 Specification
-(Built-in Functions)
-
-    Add a new section 8.10 "Debug Functions":
-
-    Debug functions are available to both fragment and vertex shaders.
-    They are used to track the execution of a shader by logging
-    passed-in arguments to the debug object's log. Those values can be
-    retrieved by the application for inspection after shader execution
-    is complete.
-
-    The text, if any, produced by any of these functions is appended
-    to each debug object that is attached to the program object.
-    There are different debug log types
-
-    Add a new section 8.10.1 "Print Function":
-
-    The following printMESA prototypes are available.
-
-        void printMESA(const float value)
-        void printMESA(const int value)
-        void printMESA(const bool value)
-        void printMESA(const vec2 value)
-        void printMESA(const vec3 value)
-        void printMESA(const vec4 value)
-        void printMESA(const ivec2 value)
-        void printMESA(const ivec3 value)
-        void printMESA(const ivec4 value)
-        void printMESA(const bvec2 value)
-        void printMESA(const bvec3 value)
-        void printMESA(const bvec4 value)
-        void printMESA(const mat2 value)
-        void printMESA(const mat3 value)
-        void printMESA(const mat4 value)
-        void printMESA(const sampler1D value)
-        void printMESA(const sampler2D value)
-        void printMESA(const sampler3D value)
-        void printMESA(const samplerCube value)
-        void printMESA(const sampler1DShadow value)
-        void printMESA(const sampler2DShadow value)
-
-    The printMESA function writes the argument <value> to the "debug
-    print log" (XXX DEBUG_PRINT_MESA?). Each component is written in
-    text format (XXX format!) and is delimited by a white space (XXX 1
-    or more?).
-
-    Add a new section 8.10.2 "Assert Function":
-
-    The following assertMESA prototypes are available.
-
-        void assertMESA(const bool condition)
-        void assertMESA(const bool condition, const int cookie)
-        void assertMESA(const bool condition, const int cookie,
-                        const int file, const int line)
-
-    The assertMESA function checks if the argument <condition> is
-    true or false. If it is true, nothing happens. If it is false,
-    a diagnostic message is written to the "debug assert log".
-    The message contains the argument <file>, <line>, <cookie> and
-    implementation dependent double-quoted string, each of this
-    delimited by a white space. If the argument <cookie> is not present,
-    it is meant as if it was of value 0. If the arguments <file> and
-    <line> are not present, they are meant as if they were of values
-    __FILE__ and __LINE__, respectively. The following three calls
-    produce the same output, assuming they were issued from the same
-    file and line.
-
-        assertMESA (false);
-        assertMESA (false, 0);
-        assertMESA (false, 0, __FILE__, __LINE__);
-
-    The diagnostic message examples follow.
-
-        1 89 0 ""
-        1 45 333 "all (lessThanEqual (fragColor, vec4 (1.0)))"
-        1 66 1 "assertion failed in file 1, line 66, cookie 1"
-
-Additions to Chapter 9 of the OpenGL Shading Language 1.10 Specification
-(Shading Language Grammar)
-
-    None
-
-Additions to Chapter 10 of the OpenGL Shading Language 1.10
-Specification (Issues)
-
-    None
-
-Additions to the AGL/EGL/GLX/WGL Specifications
-
-    None
-
-GLX Protocol
-
-    None
-
-Errors
-
-    TBD
-
-New State
-
-    TBD
-
-New Implementation Dependent State
-
-    TBD
-
-Sample Code
-
-    TBD
-
-Revision History
-
-    29 May 2006
-        Initial draft. (Michal Krol)
-    30 July 2006
-        Add Overview, New Procedures and Functions, New Tokens sections.
-        Add sections 8.10.1, 8.10.2 to GLSL spec.
diff --git a/docs/MESA_swap_control.spec b/docs/MESA_swap_control.spec
deleted file mode 100644
index 856978b..0000000
--- a/docs/MESA_swap_control.spec
+++ /dev/null
@@ -1,129 +0,0 @@
-Name
-
-    MESA_swap_control
-
-Name Strings
-
-    GLX_MESA_swap_control
-
-Contact
-
-    Ian Romanick, IBM, idr at us.ibm.com
-
-Status
-
-    Deployed in DRI drivers post-XFree86 4.3.
-
-Version
-
-    Date: 5/1/2003   Revision: 1.1
-
-Number
-
-    ???
-
-Dependencies
-
-    None
-
-    Based on GLX_SGI_swap_control version 1.9 and WGL_EXT_swap_control
-    version 1.5.
-
-Overview
-
-    This extension allows an application to specify a minimum periodicity
-    of color buffer swaps, measured in video frame periods.
-
-Issues
-
-    * Should implementations that export GLX_MESA_swap_control also export
-      GL_EXT_swap_control for compatibility with WGL_EXT_swap_control?
-
-    UNRESOLVED.
-
-New Procedures and Functions
-
-    int glXSwapIntervalMESA(unsigned int interval)
-    int glXGetSwapIntervalMESA(void)
-
-New Tokens
-
-    None
-
-Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the 1.4 GL Specification (Rasterization)
-
-    None
-
-Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations
-and the Framebuffer)
-
-    None
-
-Additions to Chapter 5 of the 1.4 GL Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests)
-
-    None
-
-Additions to the GLX 1.3 Specification
-
-    [Add the following to Section 3.3.10 of the GLX Specification (Double
-     Buffering)]
-
-    glXSwapIntervalMESA specifies the minimum number of video frame periods
-    per buffer swap.  (e.g. a value of two means that the color buffers
-    will be swapped at most every other video frame.)  A return value
-    of zero indicates success; otherwise an error occurred.  The interval
-    takes effect when glXSwapBuffers is first called subsequent to the
-    glXSwapIntervalMESA call.
-
-    A video frame period is the time required by the monitor to display a 
-    full frame of video data.  In the case of an interlaced monitor,
-    this is typically the time required to display both the even and odd 
-    fields of a frame of video data.
-
-    If <interval> is set to a value of 0, buffer swaps are not synchron-
-    ized to a video frame.  The <interval> value is silently clamped to
-    the maximum implementation-dependent value supported before being
-    stored.
-
-    The swap interval is not part of the render context state.  It cannot
-    be pushed or popped.  The current swap interval for the window
-    associated with the current context can be obtained by calling
-    glXGetSwapIntervalMESA.  The default swap interval is 0.
-
-    On XFree86, setting the environment variable LIBGL_THROTTLE_REFRESH sets
-    the swap interval to 1.
-
-Errors
-
-    glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
-    GLXContext or if the current context is not a direct rendering context.
-
-GLX Protocol
-
-    None.  This extension only extends to direct rendering contexts.
-
-New State
-
-    Get Value		Get Command	Type	    Initial Value
-    ---------		-----------	----	    -------------
-    [swap interval]	GetSwapInterval	Z+	    0
-
-New Implementation Dependent State
-
-    None
-
-
-Revision History
-
-    1.1,  5/1/03   Added the issues section and contact information.
-    	  	   Changed the default swap interval to 0.
-    1.0,  3/17/03  Initial version based on GLX_SGI_swap_control and
-                   WGL_EXT_swap_control.
diff --git a/docs/MESA_swap_frame_usage.spec b/docs/MESA_swap_frame_usage.spec
deleted file mode 100644
index 5023ead..0000000
--- a/docs/MESA_swap_frame_usage.spec
+++ /dev/null
@@ -1,201 +0,0 @@
-Name
-
-    MESA_swap_frame_usage
-
-Name Strings
-
-    GLX_MESA_swap_frame_usage
-
-Contact
-
-    Ian Romanick, IBM, idr at us.ibm.com
-
-Status
-
-    Deployed in DRI drivers post-XFree86 4.3.
-
-Version
-
-    Date: 5/1/2003   Revision: 1.1
-
-Number
-
-    ???
-
-Dependencies
-
-    GLX_SGI_swap_control affects the definition of this extension.
-    GLX_MESA_swap_control affects the definition of this extension.
-    GLX_OML_sync_control affects the definition of this extension.
-
-    Based on WGL_I3D_swap_frame_usage version 1.3.
-
-Overview
-
-    This extension allows an application to determine what portion of the
-    swap period has elapsed since the last swap operation completed.  The
-    "usage" value is a floating point value on the range [0,max] which is
-    calculated as follows:
-
-                              td
-                   percent = ----
-                              tf
-
-    where td is the time measured from the last completed buffer swap (or
-    call to enable the statistic) to when the next buffer swap completes, tf
-    is the entire time for a frame which may be multiple screen refreshes
-    depending on the swap interval as set by the GLX_SGI_swap_control or
-    GLX_OML_sync_control extensions. 
-
-    The value, percent, indicates the amount of time spent between the
-    completion of the two swaps.  If the value is in the range [0,1], the
-    buffer swap occurred within the time period required to maintain a
-    constant frame rate.  If the value is in the range (1,max], a constant
-    frame rate was not achieved.  The value indicates the number of frames
-    required to draw.
-
-    This definition of "percent" differs slightly from
-    WGL_I3D_swap_frame_usage.  In WGL_I3D_swap_frame_usage, the measurement
-    is taken from the completion of one swap to the issuance of the next.
-    This representation may not be as useful as measuring between
-    completions, as a significant amount of time may pass between the
-    issuance of a swap and the swap actually occurring.
-
-    There is also a mechanism to determine whether a frame swap was
-    missed.
-
-New Procedures and Functions
-
-    int glXGetFrameUsageMESA(Display *dpy,
-                             GLXDrawable drawable,
-    	                     float *usage)
-
-    int glXBeginFrameTrackingMESA(Display *dpy,
-                                  GLXDrawable drawable)
-
-    int glXEndFrameTrackingMESA(Display *dpy,
-                                GLXDrawable drawable)
-
-    int glXQueryFrameTrackingMESA(Display *dpy,
-                                  GLXDrawable drawable,
-				  int64_t *swapCount,
-                                  int64_t *missedFrames,
-                                  float *lastMissedUsage)
-
-New Tokens
-
-    None
-
-Additions to Chapter 2 of the 1.4 GL Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the 1.4 GL Specification (Rasterization)
-
-    None
-
-Additions to Chapter 4 of the 1.4 GL Specification (Per-Fragment Operations
-and the Framebuffer)
-
-    None
-
-Additions to Chapter 5 of the 1.4 GL Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests)
-
-    None
-
-Additions to the GLX 1.3 Specification
-
-    The frame usage is measured as the percentage of the swap period elapsed
-    between two buffer-swap operations being committed.  In unextended GLX the
-    swap period is the vertical refresh time.  If SGI_swap_control or
-    MESA_swap_control are supported, the swap period is the vertical refresh
-    time multiplied by the swap interval (or one if the swap interval is set
-    to zero).
-    
-    If OML_sync_control is supported, the swap period is the vertical
-    refresh time multiplied by the divisor parameter to
-    glXSwapBuffersMscOML.  The frame usage in this case is less than 1.0 if
-    the swap is committed before target_msc, and is greater than or equal to
-    1.0 otherwise.  The actual usage value is based on the divisor and is
-    never less than 0.0.
-
-       int glXBeginFrameTrackingMESA(Display *dpy,
-                                     GLXDrawable drawable,
-				     float *usage)
-
-    glXGetFrameUsageMESA returns a floating-point value in <usage>
-    that represents the current swap usage, as defined above.
-
-    Missed frame swaps can be tracked by calling the following function:
-
-       int glXBeginFrameTrackingMESA(Display *dpy,
-                                     GLXDrawable drawable)
-
-    glXBeginFrameTrackingMESA resets a "missed frame" count and
-    synchronizes with the next frame vertical sync before it returns.
-    If a swap is missed based in the rate control specified by the
-    <interval> set by glXSwapIntervalSGI or the default swap of once
-    per frame, the missed frame count is incremented.
-
-    The current missed frame count and total number of swaps since
-    the last call to glXBeginFrameTrackingMESA can be obtained by
-    calling the following function:
-
-       int glXQueryFrameTrackingMESA(Display *dpy,
-                                     GLXDrawable drawable,
-				     int64_t *swapCount,
-                                     int64_t *missedFrames,
-                                     float *lastMissedUsage)
-
-    The location pointed to by <swapCount> will be updated with the
-    number of swaps that have been committed.  This value may not match the
-    number of swaps that have been requested since swaps may be
-    queued by the implementation.  This function can be called at any
-    time and does not synchronize to vertical blank.
-
-    The location pointed to by <missedFrames> will contain the number
-    swaps that missed the specified frame.  The frame usage for the
-    last missed frame is returned in the location pointed to by
-    <lastMissedUsage>.
-
-    Frame tracking is disabled by calling the function
-
-       int glXEndFrameTrackingMESA(Display *dpy,
-                                   GLXDrawable drawable)
-
-    This function will not return until all swaps have occurred.  The
-    application can call glXQueryFrameTrackingMESA for a final swap and
-    missed frame count.
-
-    If these functions are successful, zero is returned.  If the context
-    associated with dpy and drawable is not a direct context,
-    GLX_BAD_CONTEXT is returned.
-
-Errors
-
-    If the function succeeds, zero is returned.  If the function
-    fails, one of the following error codes is returned:
-
-       GLX_BAD_CONTEXT         The current rendering context is not a direct
-       			       context.
-
-GLX Protocol
-
-    None.  This extension only extends to direct rendering contexts.
-
-New State
-
-    None
-
-New Implementation Dependent State
-
-    None
-
-Revision History
-
-    1.1,  5/1/03   Added contact information.
-    1.0,  3/17/03  Initial version based on WGL_I3D_swap_frame_usage.
diff --git a/docs/MESA_texture_array.spec b/docs/MESA_texture_array.spec
deleted file mode 100644
index 9dee65b..0000000
--- a/docs/MESA_texture_array.spec
+++ /dev/null
@@ -1,804 +0,0 @@
-Name
-
-    MESA_texture_array
-
-Name Strings
-
-    GL_MESA_texture_array
-
-Contact
-
-    Ian Romanick, IBM (idr 'at' us.ibm.com)
-
-IP Status
-
-    No known IP issues.
-
-Status
-
-    Shipping in Mesa 7.1
-
-Version
-
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.2 or GL_EXT_texture3D is required.
-
-    Support for ARB_fragment_program is assumed, but not required.
-
-    Support for ARB_fragment_program_shadow is assumed, but not required.
-
-    Support for EXT_framebuffer_object is assumed, but not required.
-
-    Written based on the wording of the OpenGL 2.0 specification and
-    ARB_fragment_program_shadow but not dependent on them.
-
-Overview
-
-    There are a number of circumstances where an application may wish to
-    blend two textures out of a larger set of textures.  Moreover, in some
-    cases the selected textures may vary on a per-fragment basis within
-    a polygon.  Several examples include:
-
-       1. High dynamic range textures.  The application stores several
-       different "exposures" of an image as different textures.  On a
-       per-fragment basis, the application selects which exposures are
-       used.
-
-       2. A terrain engine where the altitude of a point determines the
-       texture applied to it.  If the transition is from beach sand to
-       grass to rocks to snow, the application will store each texture
-       in a different texture map, and dynamically select which two
-       textures to blend at run-time.
-
-       3. Storing short video clips in textures.  Each depth slice is a
-       single frame of video.
-
-    Several solutions to this problem have been proposed, but they either
-    involve using a separate texture unit for each texture map or using 3D
-    textures without mipmaps.  Both of these options have major drawbacks.
-
-    This extension provides a third alternative that eliminates the major
-    drawbacks of both previous methods.  A new texture target,
-    TEXTURE_2D_ARRAY, is added that functions identically to TEXTURE_3D in
-    all aspects except the sizes of the non-base level images.  In
-    traditional 3D texturing, the size of the N+1 LOD is half the size
-    of the N LOD in all three dimensions.  For the TEXTURE_2D_ARRAY target,
-    the height and width of the N+1 LOD is halved, but the depth is the
-    same for all levels of detail. The texture then becomes an array of
-    2D textures.  The per-fragment texel is selected by the R texture
-    coordinate.
-
-    References:
-
-        http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011557
-        http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=000516
-        http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011903
-        http://www.delphi3d.net/articles/viewarticle.php?article=terraintex.htm
-
-New Procedures and Functions
-
-    All functions come directly from EXT_texture_array.
-
-    void FramebufferTextureLayerEXT(enum target, enum attachment,
-                                    uint texture, int level, int layer);
-
-New Tokens
-
-    All token names and values come directly from EXT_texture_array.
-
-    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
-    the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
-    GetDoublev, and by the <target> parameter of TexImage3D, GetTexImage,
-    GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and
-    GetTexParameterfv:
-
-        TEXTURE_1D_ARRAY_EXT                            0x8C18
-        TEXTURE_2D_ARRAY_EXT                            0x8C1A
-
-    Accepted by the <target> parameter of TexImage2D, TexSubImage2D,
-    CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D,
-    CompressedTexSubImage2D, GetTexLevelParameteriv, and 
-    GetTexLevelParameterfv:
-
-        TEXTURE_1D_ARRAY_EXT
-        PROXY_TEXTURE_1D_ARRAY_EXT                      0x8C19
-
-    Accepted by the <target> parameter of TexImage3D, TexSubImage3D,
-    CopyTexSubImage3D, CompressedTexImage3D, CompressedTexSubImage3D,
-    GetTexLevelParameteriv, and GetTexLevelParameterfv:
-
-        TEXTURE_2D_ARRAY_EXT
-        PROXY_TEXTURE_2D_ARRAY_EXT                      0x8C1B
-
-    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
-    GetFloatv, and GetDoublev
-
-        TEXTURE_BINDING_1D_ARRAY_EXT                    0x8C1C
-        TEXTURE_BINDING_2D_ARRAY_EXT                    0x8C1D
-        MAX_ARRAY_TEXTURE_LAYERS_EXT                    0x88FF
-
-    Accepted by the <param> parameter of TexParameterf, TexParameteri,
-    TexParameterfv, and TexParameteriv when the <pname> parameter is
-    TEXTURE_COMPARE_MODE_ARB:
-
-        COMPARE_REF_DEPTH_TO_TEXTURE_EXT                0x884E
-
-    (Note:  COMPARE_REF_DEPTH_TO_TEXTURE_EXT is simply an alias for the
-    existing COMPARE_R_TO_TEXTURE token in OpenGL 2.0; the alternate name
-    reflects the fact that the R coordinate is not always used.)
-
-    Accepted by the <internalformat> parameter of TexImage3D and
-    CompressedTexImage3D, and by the <format> parameter of
-    CompressedTexSubImage3D:
-
-        COMPRESSED_RGB_S3TC_DXT1_EXT
-        COMPRESSED_RGBA_S3TC_DXT1_EXT
-        COMPRESSED_RGBA_S3TC_DXT3_EXT
-        COMPRESSED_RGBA_S3TC_DXT5_EXT
-
-    Accepted by the <pname> parameter of
-    GetFramebufferAttachmentParameterivEXT:
-
-        FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT          0x8CD4
-
-    (Note:  FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the
-    FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT token provided in
-    EXT_framebuffer_object.  This extension generalizes the notion of
-    "<zoffset>" to include layers of an array texture.)
-
-Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
-
-    -- Section 3.8.1 "Texture Image Specification"
-
-       Change the first paragraph (page 150) to say (spec changes identical to
-       EXT_texture_array):
-
-       "The command
-
-         void TexImage3D(enum target, int level, int internalformat,
-                         sizei width, sizei height, sizei depth, int border,
-                         enum format, enum type, void *data);
-
-       is used to specify a three-dimensional texture image. target must be one
-       one of TEXTURE_3D for a three-dimensional texture or
-       TEXTURE_2D_ARRAY_EXT for an two-dimensional array texture.
-       Additionally, target may be either PROXY_TEXTURE_3D for a
-       three-dimensional proxy texture, or PROXY_TEXTURE_2D_ARRAY_EXT for a
-       two-dimensional proxy array texture."
-
-       Change the fourth paragraph on page 151 to say (spec changes identical
-       to EXT_texture_array):
-
-       "Textures with a base internal format of DEPTH_COMPONENT are supported
-       by texture image specification commands only if target is TEXTURE_1D,
-       TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_2D_ARRAY_EXT,
-       PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_1D_ARRAY_EXT, or
-       PROXY_TEXTURE_2D_ARRAY_EXT. Using this format in conjunction with any
-       other target will result in an INVALID_OPERATION error."
-
-
-       Change the fourth paragraph on page 156 to say (spec changes identical
-       to EXT_texture_array):
-       
-       "The command
-
-         void TexImage2D(enum target, int level,
-                         int internalformat, sizei width, sizei height,
-                         int border, enum format, enum type, void *data);
-
-       is used to specify a two-dimensional texture image. target must be one
-       of TEXTURE_2D for a two-dimensional texture, TEXTURE_1D_ARRAY_EXT for a
-       one-dimensional array texture, or one of TEXTURE_CUBE_MAP_POSITIVE_X,
-       TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,
-       TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or
-       TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube map texture. Additionally,
-       target may be either PROXY_TEXTURE_2D for a two-dimensional proxy
-       texture, PROXY_TEXTURE_1D_ARRAY_EXT for a one-dimensional proxy array
-       texture, or PROXY TEXTURE_CUBE_MAP for a cube map proxy texture in the
-       special case discussed in section 3.8.11.  The other parameters match
-       the corresponding parameters of TexImage3D.
-
-       For the purposes of decoding the texture image, TexImage2D is
-       equivalent to calling TexImage3D with corresponding arguments and depth
-       of 1, except that
-
-         * The border depth, d_b, is zero, and the depth of the image is
-           always 1 regardless of the value of border. 
-
-         * The border height, h_b, is zero if <target> is
-           TEXTURE_1D_ARRAY_EXT, and <border> otherwise.
-
-         * Convolution will be performed on the image (possibly changing its
-           width and height) if SEPARABLE 2D or CONVOLUTION 2D is enabled.
-
-         * UNPACK SKIP IMAGES is ignored."
-
-    -- Section 3.8.2 "Alternate Texture Image Specification Commands"
-
-       Change the second paragraph (page 159) (spec changes identical
-       to EXT_texture_array):
-
-       "The command
-
-         void CopyTexImage2D(enum target, int level,
-                             enum internalformat, int x, int y, sizei width,
-                             sizei height, int border);
-
-       defines a two-dimensional texture image in exactly the manner of
-       TexImage2D, except that the image data are taken from the framebuffer
-       rather than from client memory. Currently, target must be one of
-       TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_CUBE_MAP_POSITIVE_X,
-       TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE MAP_POSITIVE_Y,
-       TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or
-       TEXTURE_CUBE_MAP_NEGATIVE_Z.
-
-
-       Change the last paragraph on page 160 to say (spec changes identical
-       to EXT_texture_array):
-
-       "Currently the target arguments of TexSubImage1D and CopyTexSubImage1D
-       must be TEXTURE_1D, the target arguments of TexSubImage2D and
-       CopyTexSubImage2D must be one of TEXTURE_2D, TEXTURE_1D_ARRAY_EXT,
-       TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X,
-       TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y,
-       TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_NEGATIVE_Z, and the
-       target arguments of TexSubImage3D and CopyTexSubImage3D must be
-       TEXTURE_3D or TEXTURE_2D_ARRAY_EXT. ..."
-
-
-    -- Section 3.8.4 "Texture Parameters"
-
-       Change the first paragraph (page 166) to say:
-
-       "Various parameters control how the texel array is treated when
-       specified or changed, and when applied to a fragment. Each parameter is
-       set by calling
-
-         void TexParameter{if}(enum target, enum pname, T param); 
-         void TexParameter{if}v(enum target, enum pname, T params);
-
-       target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
-       TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT."
-
-
-    -- Section 3.8.8 "Texture Minification" in the section "Scale Factor and Level of Detail"
-
-       Change the first paragraph (page 172) to say:
-
-       "Let s(x,y) be the function that associates an s texture coordinate
-       with each set of window coordinates (x,y) that lie within a primitive;
-       define t(x,y) and r(x,y) analogously.  Let u(x,y) = w_t * s(x,y),
-       v(x,y) = h_t * t(x,y), and w(x,y) = d_t * r(x,y), where w_t, h_t,
-       and d_t are as defined by equations 3.15, 3.16, and 3.17 with
-       w_s, h_s, and d_s equal to the width, height, and depth of the
-       image array whose level is level_base.  For a one-dimensional
-       texture or a one-dimensional array texture, define v(x,y) = 0 and
-       w(x,y) = 0; for a two-dimensional texture or a two-dimensional array
-       texture, define w(x,y) = 0..."
-
-    -- Section 3.8.8 "Texture Minification" in the section "Mipmapping"
-
-       Change the third paragraph (page 174) to say:
-       
-       "For a two-dimensional texture, two-dimensional array texture, or
-       cube map texture,"
-
-       Change the fourth paragraph (page 174) to say:
-
-       "And for a one-dimensional texture or a one-dimensional array texture,"
-
-       After the first paragraph (page 175) add:
-
-       "For one-dimensional array textures, h_b and d_b are treated as 1,
-       regardless of the actual values, when performing mipmap calculations.
-       For two-dimensional array textures, d_b is always treated as one,
-       regardless of the actual value, when performing mipmap calculations."
-
-    -- Section 3.8.8 "Automatic Mipmap Generation" in the section "Mipmapping"
-
-       Change the third paragraph (page 176) to say (spec changes identical
-       to EXT_texture_array):
-
-       "The contents of the derived arrays are computed by repeated, filtered
-       reduction of the level_base array.  For one- and two-dimensional array
-       textures, each layer is filtered independently.  ..."
-
-    -- Section 3.8.8 "Manual Mipmap Generation" in the section "Mipmapping"
-
-       Change first paragraph to say (spec changes identical to
-       EXT_texture_array):
-
-       "Mipmaps can be generated manually with the command
-
-         void GenerateMipmapEXT(enum target);
-
-       where <target> is one of TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP,
-       TEXTURE_3D, TEXTURE_1D_ARRAY, or TEXTURE_2D_ARRAY.  Mipmap generation
-       affects the texture image attached to <target>.  ..."
-
-    -- Section 3.8.10 "Texture Completeness"
-
-       Change the second paragaph (page 177) to say (spec changes identical
-       to EXT_texture_array):
-
-       "For one-, two-, or three-dimensional textures and one- or
-       two-dimensional array textures, a texture is complete if the following
-       conditions all hold true:"
-
-    -- Section 3.8.11 "Texture State and Proxy State"
-
-       Change the second and third paragraphs (page 179) to say (spec changes
-       identical to EXT_texture_array):
-
-       "In addition to image arrays for one-, two-, and three-dimensional
-       textures, one- and two-dimensional array textures, and the six image
-       arrays for the cube map texture, partially instantiated image arrays
-       are maintained for one-, two-, and three-dimensional textures and one-
-       and two-dimensional array textures.  Additionally, a single proxy image
-       array is maintained for the cube map texture.  Each proxy image array
-       includes width, height, depth, border width, and internal format state
-       values, as well as state for the red, green, blue, alpha, luminance,
-       and intensity component resolutions. Proxy image arrays do not include
-       image data, nor do they include texture properties. When TexImage3D is
-       executed with target specified as PROXY_TEXTURE_3D, the
-       three-dimensional proxy state values of the specified level-of-detail
-       are recomputed and updated. If the image array would not be supported
-       by TexImage3D called with target set to TEXTURE 3D, no error is
-       generated, but the proxy width, height, depth, border width, and
-       component resolutions are set to zero. If the image array would be
-       supported by such a call to TexImage3D, the proxy state values are set
-       exactly as though the actual image array were being specified. No pixel
-       data are transferred or processed in either case.
-
-       Proxy arrays for one- and two-dimensional textures and one- and
-       two-dimensional array textures are operated on in the same way when
-       TexImage1D is executed with target specified as PROXY_TEXTURE_1D,
-       TexImage2D is executed with target specified as PROXY_TEXTURE_2D or
-       PROXY_TEXTURE_1D_ARRAY_EXT, or TexImage3D is executed with target
-       specified as PROXY_TETXURE_2D_ARRAY_EXT."
-
-    -- Section 3.8.12 "Texture Objects"
-
-       Change section (page 180) to say (spec changes identical to 
-       EXT_texture_array):
-
-       "In addition to the default textures TEXTURE_1D, TEXTURE_2D,
-       TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_EXT,
-       named one-, two-, and three-dimensional, cube map, and one- and
-       two-dimensional array texture objects can be created and operated upon.
-       The name space for texture objects is the unsigned integers, with zero
-       reserved by the GL.
-
-       A texture object is created by binding an unused name to TEXTURE_1D,
-       TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
-       TEXTURE_2D_ARRAY_EXT. The binding is effected by calling
-
-         void BindTexture(enum target, uint texture);
-
-       with <target> set to the desired texture target and <texture> set to
-       the unused name.  The resulting texture object is a new state vector,
-       comprising all the state values listed in section 3.8.11, set to the
-       same initial values. If the new texture object is bound to TEXTURE_1D,
-       TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
-       TEXTURE_2D_ARRAY_EXT, it is and remains a one-, two-,
-       three-dimensional, cube map, one- or two-dimensional array texture
-       respectively until it is deleted.
-
-       BindTexture may also be used to bind an existing texture object to
-       either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
-       TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT. The error
-       INVALID_OPERATION is generated if an attempt is made to bind a texture
-       object of different dimensionality than the specified target. If the
-       bind is successful no change is made to the state of the bound texture
-       object, and any previous binding to target is broken.
-
-       While a texture object is bound, GL operations on the target to which
-       it is bound affect the bound object, and queries of the target to which
-       it is bound return state from the bound object. If texture mapping of
-       the dimensionality of the target to which a texture object is bound is
-       enabled, the state of the bound texture object directs the texturing
-       operation.
-
-       In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
-       TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_ARRAY_EXT have
-       one-, two-, three-dimensional, cube map, and one- and two-dimensional
-       array texture state vectors respectively associated with them. In order
-       that access to these initial textures not be lost, they are treated as
-       texture objects all of whose names are 0. The initial one-, two-,
-       three-dimensional, cube map, one- and two-dimensional array textures
-       are therefore operated upon, queried, and applied as TEXTURE_1D,
-       TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and
-       TEXTURE_2D_ARRAY_EXT respectively while 0 is bound to the corresponding
-       targets.
-
-       Change second paragraph on page 181 to say (spec changes identical to 
-       EXT_texture_array):
-       
-       "...  If a texture that is currently bound to one of the targets
-       TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
-       TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT is deleted, it is as
-       though BindTexture had been executed with the same target and texture
-       zero. ..."
-
-       Change second paragraph on page 182 to say (spec changes identical to 
-       EXT_texture_array):
-       
-       "The texture object name space, including the initial one-, two-, and
-       three dimensional, cube map, and one- and two-dimensional array texture
-       objects, is shared among all texture units. ..."
-
-
-    -- Section 3.8.14 "Depth Texture Comparison Modes" in "Texture Comparison Modes"
-
-       Change second through fourth paragraphs (page 188) to say:
-
-       "Let D_t be the depth texture value, in the range [0, 1].  For
-       texture lookups from one- and two-dimesional, rectangle, and
-       one-dimensional array targets, let R be the interpolated <r>
-       texture coordinate, clamped to the range [0, 1].  For texture lookups
-       from two-dimesional array texture targets, let R be the interpolated
-       <q> texture coordinate, clamped to the range [0, 1].  Then the
-       effective texture value L_t, I_t, or A_t is computed as follows:
-
-       If the value of TEXTURE_COMPARE_MODE is NONE, then
-
-          r = Dt
-
-       If the value of TEXTURE_COMPARE_MODE is
-       COMPARE_REF_DEPTH_TO_TEXTURE_EXT), then r depends on the texture
-       comparison function as shown in table 3.27."
-
-    -- Section 3.8.15 "Texture Application"
-
-       Change the first paragraph (page 189) to say:
-
-       "Texturing is enabled or disabled using the generic Enable and Disable
-       commands, respectively, with the symbolic constants TEXTURE_1D,
-       TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
-       TEXTURE_2D_ARRAY_EXT to enable one-, two-, three-dimensional, cube
-       map, one-dimensional array, or two-dimensional array texture,
-       respectively.  If both two- and one-dimensional textures are enabled,
-       the two-dimensional texture is used.  If the three-dimensional and
-       either of the two- or one-dimensional textures is enabled, the
-       three-dimensional texture is used.  If the cube map texture and any of
-       the three-, two-, or one-dimensional textures is enabled, then cube map
-       texturing is used.  If one-dimensional array texture is enabled and any
-       of cube map, three-, two-, or one-dimensional textures is enabled, 
-       one-dimensional array texturing is used.  If two-dimensional array
-       texture is enabled and any of cube map, three-, two-, one-dimensional
-       textures or one-dimensional array texture is enabled, two-dimensional
-       array texturing is used..."
-
-    -- Section 3.11.2 of ARB_fragment_program (Fragment Program Grammar and Restrictions):
-
-       (mostly add to existing grammar rules)
-
-       <optionName>           ::= "MESA_texture_array"
-
-       <texTarget>            ::= "1D"
-                               | "2D"
-                               | "3D"
-                               | "CUBE"
-                               | "RECT"
-                               | <arrayTarget> (if program option is present)
-                               | <shadowTarget> (if program option is present)
-
-       <arrayTarget>          ::= "ARRAY1D"
-                               | "ARRAY2D"
-
-       <shadowTarget>         ::= "SHADOW1D"
-                               | "SHADOW2D"
-                               | "SHADOWRECT"
-                               | <shadowArrayTarget> (if program option is present)
-
-       <shadowArrayTarget>    ::= "SHADOWARRAY1D"
-                               | "SHADOWARRAY2D"
-
-
-    -- Add Section 3.11.4.5.4 "Texture Stack Option"
-
-       "If a fragment program specifies the "MESA_texture_array" program
-       option, the <texTarget> rule is modified to add the texture targets
-       ARRAY1D and ARRAY2D (See Section 3.11.2)."
-
-    -- Section 3.11.6 "Fragment Program Texture Instruction Set"
-
-       (replace 1st and 2nd paragraphs with the following paragraphs)
-
-       "The first three texture instructions described below specify the
-       mapping of 4-tuple input vectors to 4-tuple output vectors.
-       The sampling of the texture works as described in section 3.8,
-       except that texture environments and texture functions are not
-       applicable, and the texture enables hierarchy is replaced by explicit
-       references to the desired texture target (i.e., 1D, 2D, 3D, cube map,
-       rectangle, ARRAY1D, ARRAY2D).  These texture instructions specify
-       how the 4-tuple is mapped into the coordinates used for sampling.  The
-       following function is used to describe the texture sampling in the
-       descriptions below: 
-
-         vec4 TextureSample(vec4 coord, float lodBias, int texImageUnit,
-                            enum texTarget);
-
-       Note that not all four components of the texture coordinates <coord>
-       are used by all texture targets.  Component usage for each <texTarget>
-       is defined in table X.
-
-                                                        coordinates used
-         texTarget          Texture Type               s t r  layer  shadow
-         ----------------   ---------------------      -----  -----  ------
-         1D                 TEXTURE_1D                 x - -    -      -
-         2D                 TEXTURE_2D                 x y -    -      -
-         3D                 TEXTURE_3D                 x y z    -      -
-         CUBE               TEXTURE_CUBE_MAP           x y z    -      -
-         RECT               TEXTURE_RECTANGLE_ARB      x y -    -      -
-         ARRAY1D            TEXTURE_1D_ARRAY_EXT       x - -    y      -
-         ARRAY2D            TEXTURE_2D_ARRAY_EXT       x y -    z      -
-         SHADOW1D           TEXTURE_1D                 x - -    -      z
-         SHADOW2D           TEXTURE_2D                 x y -    -      z
-         SHADOWRECT         TEXTURE_RECTANGLE_ARB      x y -    -      z
-         SHADOWARRAY1D      TEXTURE_1D_ARRAY_EXT       x - -    y      z
-         SHADOWARRAY2D      TEXTURE_2D_ARRAY_EXT       x y -    z      w
-
-         Table X:  Texture types accessed for each of the <texTarget>, and
-         coordinate mappings.  The "coordinates used" column indicate the
-         input values used for each coordinate of the texture lookup, the
-         layer selector for array textures, and the reference value for
-         texture comparisons."
-
-    -- Section 3.11.6.2 "TXP: Project coordinate and map to color"
-    
-       Add to the end of the section:
-       
-       "A program will fail to load if the TXP instruction is used in
-       conjunction with the SHADOWARRAY2D target."
-
-Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment Operations)
-
-    -- Section 4.4.2.3 "Attaching Texture Images to a Framebuffer"
-
-       Add to the end of the section (spec changes identical to
-       EXT_texture_array):
-
-       "The command
-
-         void FramebufferTextureLayerEXT(enum target, enum attachment,
-                                         uint texture, int level, int layer);
-
-       operates identically to FramebufferTexture3DEXT, except that it
-       attaches a single layer of a three-dimensional texture or a one- or
-       two-dimensional array texture.  <layer> is an integer indicating the
-       layer number, and is treated identically to the <zoffset> parameter in
-       FramebufferTexture3DEXT.  The error INVALID_VALUE is generated if
-       <layer> is negative.  The error INVALID_OPERATION is generated if
-       <texture> is non-zero and is not the name of a three dimensional
-       texture or one- or two-dimensional array texture.  Unlike
-       FramebufferTexture3D, no <textarget> parameter is accepted.
-
-       If <texture> is non-zero and the command does not result in an error,
-       the framebuffer attachment state corresponding to <attachment> is
-       updated as in the other FramebufferTexture commands, except that
-       FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT is set to <layer>."
-
-    -- Section 4.4.4.1 "Framebuffer Attachment Completeness"
-
-      Add to the end of the list of completeness rules (spec changes
-      identical to EXT_texture_array):
-
-        "* If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE and
-           FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or 
-           two-dimensional array texture, then
-           FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT must be smaller than the
-           number of layers in the texture."
-
-Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
-
-    -- Section 5.4 "Display Lists"
-
-       Change the first paragraphi on page 242 to say (spec changes
-       identical to EXT_texture_array):
-
-       "TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are
-       executed immediately when called with the corresponding proxy arguments
-       PROXY_TEXTURE_3D or PROXY_TEXTURE_2D_ARRAY_EXT; PROXY_TEXTURE_2D,
-       PROXY_TEXTURE_CUBE_MAP, or PROXY_TEXTURE_1D_ARRAY_EXT;
-       PROXY_TEXTURE_1D; PROXY_HISTOGRAM; and PROXY_COLOR_TABLE,
-       PROXY_POST_CONVOLUTION_COLOR_TABLE, or
-       PROXY_POST_COLOR_MATRIX_COLOR_TABLE."
-
-Additions to Chapter 6 of the OpenGL 2.0 Specification (State and State Requests)
-
-    -- Section 6.1.3 "Enumerated Queries"
-
-       Add after the line beginning "If the value of
-       FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE" (spec changes
-       identical to EXT_texture_array):
-
-       "If <pname> is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT and the
-       texture object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT is a
-       three-dimensional texture or a one- or two-dimensional array texture,
-       then <params> will contain the number of texture layer attached to the
-       attachment point.  Otherwise, <params> will contain the value zero."
-
-    -- Section 6.1.4 "Texture Queries"
-    
-       Change the first three paragraphs (page 248) to say (spec changes
-       identical to EXT_texture_array):
-
-       "The command
-
-         void GetTexImage(enum tex, int lod, enum format,
-                          enum type, void *img);
-
-       is used to obtain texture images. It is somewhat different from the
-       other get commands; tex is a symbolic value indicating which texture
-       (or texture face in the case of a cube map texture target name) is to
-       be obtained.  TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY_EXT,
-       and TEXTURE_2D_ARRAY_EXT indicate a one-, two-, or three-dimensional
-       texture, or one- or two-dimensional array texture, respectively.
-       TEXTURE_CUBE_MAP_POSITIVE_X, ...
-
-       GetTexImage obtains... from the first image to the last for
-       three-dimensional textures.  One- and two-dimensional array textures
-       are treated as two- and three-dimensional images, respectively, where
-       the layers are treated as rows or images.  These groups are then...
-
-       For three-dimensional and two-dimensional array textures, pixel storage
-       operations are applied as if the image were two-dimensional, except
-       that the additional pixel storage state values PACK_IMAGE_HEIGHT and
-       PACK_SKIP_IMAGES are applied. ..."
-
-Additions to Appendix A of the OpenGL 2.0 Specification (Invariance)
-
-    None
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None
-
-GLX Protocol
-
-    None
-
-Dependencies on ARB_fragment_program
-
-    If ARB_fragment_program is not supported, the changes to section 3.11
-    should be ignored.
-
-Dependencies on EXT_framebuffer_object
-
-    If EXT_framebuffer_object is not supported, the changes to section
-    3.8.8 ("Manual Mipmap Generation"), 4.4.2.3, and 6.1.3 should be ignored.
-
-Dependencies on EXT_texture_compression_s3tc and NV_texture_compression_vtc
-
-    (Identical dependency as EXT_texture_array.)
-
-    S3TC texture compression is supported for two-dimensional array textures.
-    When <target> is TEXTURE_2D_ARRAY_EXT, each layer is stored independently
-    as a compressed two-dimensional textures.  When specifying or querying
-    compressed images using one of the S3TC formats, the images are provided
-    and/or returned as a series of two-dimensional textures stored
-    consecutively in memory, with the layer closest to zero specified first.
-    For array textures, images are not arranged in 4x4x4 or 4x4x2 blocks as in
-    the three-dimensional compression format provided in the
-    EXT_texture_compression_vtc extension.  Pixel store parameters, including
-    those specific to three-dimensional images, are ignored when compressed
-    image data are provided or returned, as in the
-    EXT_texture_compression_s3tc extension.
-
-    S3TC compression is not supported for one-dimensional texture targets in
-    EXT_texture_compression_s3tc, and is not supported for one-dimensional
-    array textures in this extension.  If compressed one-dimensional arrays
-    are needed, use a two-dimensional texture with a height of one.
-
-    This extension allows the use of the four S3TC internal format types in
-    TexImage3D, CompressedTexImage3D, and CompressedTexSubImage3D calls.
-
-Errors
-
-    None
-
-New State
-
-    (add to table 6.15, p. 276)
-
-                                                     Initial
-    Get Value                     Type   Get Command  Value Description           Sec.    Attribute
-    ----------------------------  -----  -----------  ----- --------------------  ------  ---------
-    TEXTURE_BINDING_1D_ARRAY_EXT  2*xZ+  GetIntegerv    0   texture object bound  3.8.12  texture
-                                                            to TEXTURE_1D_ARRAY
-    TEXTURE_BINDING_2D_ARRAY_EXT  2*xZ+  GetIntegerv    0   texture object bound  3.8.12  texture
-                                                            to TEXTURE_2D_ARRAY
-
-
-New Implementation Dependent State
-
-    (add to Table 6.32, p. 293)
-
-                                                    Minimum
-    Get Value                     Type  Get Command  Value  Description         Sec.  Attribute
-    ----------------------------  ----  ----------- ------- ------------------  ----- ---------
-    MAX_TEXTURE_ARRAY_LAYERS_EXT   Z+   GetIntegerv   64    maximum number of   3.8.1     -
-                                                            layers for texture
-                                                            arrays
-
-Issues
-
-    (1) Is "texture stack" a good name for this functionality?
-
-        NO.  The name is changed to "array texture" to match the
-        nomenclature used by GL_EXT_texture_array.
-
-    (2) Should the R texture coordinate be treated as normalized or
-    un-normalized?  If it were un-normalized, floor(R) could be thought
-    of as a direct index into the array texture.  This may be more
-    convenient for applications.
-
-        RESOLVED.  All texture coordinates are normalized.  The issue of
-        un-normalized texture coordinates has been discussed in the ARB
-        before and should be left for a layered extension.
-
-        RE-RESOLVED.  The R coordinate is un-normalized.  Accessing an array
-        using [0, layers-1] coordinates is much more natural.
-
-    (3) How does LOD selection work for stacked textures?
-
-        RESOLVED.  For 2D array textures the R coordinate is ignored, and
-        the LOD selection equations for 2D textures are used.  For 1D
-        array textures the T coordinate is ignored, and the LOD selection
-        equations for 1D textures are used.  The expected usage is in a
-        fragment program with an explicit LOD selection.
-
-    (4) What is the maximum size of a 2D array texture?  Is it the same
-    as for a 3D texture, or should a new query be added?  How about for 1D
-    array textures?
-
-        RESOLVED.  A new query is added.
-
-    (5) How are array textures exposed in GLSL?
-    
-        RESOLVED.  Use GL_EXT_texture_array.
-        
-    (6) Should a 1D array texture also be exposed?
-
-        RESOLVED.  For orthogonality, yes.
-
-    (7) How are stacked textures attached to framebuffer objects?
-
-        RESOLVED.  Layers of both one- and two-dimensional array textures
-        are attached using FreambufferTextureLayerEXT.  Once attached, the
-        array texture layer behaves exactly as either a one- or
-        two-dimensional texture.
-
-    (8) How is this extension related to GL_EXT_texture_array?
-    
-        This extension adapats GL_MESAX_texture_stack to the notation,
-        indexing, and FBO access of GL_EXT_texture_array.  This extension
-        replaces the GLSL support of GL_EXT_texture_array with
-        GL_ARB_fragment_program support.
-
-        Assembly program support is also provided by GL_NV_gpu_program4.
-        GL_NV_gpu_program4 also adds support for other features that are
-        specific to Nvidia hardware, while this extension adds only support
-        for array textures.
-
-        Much of text of this extension that has changed since
-        GL_MESAX_texture_stack comes directly from either
-        GL_EXT_texture_array or GL_NV_gpu_program4.
-
-Revision History
-
-    ||2005/11/15||0.1||idr||Initial draft MESAX version.||
-    ||2005/12/07||0.2||idr||Added framebuffer object interactions.||
-    ||2005/12/12||0.3||idr||Updated fragment program interactions.||
-    ||2007/05/16||0.4||idr||Converted to MESA_texture_array.  Brought in line with EXT_texture_array and NV_gpu_program4.||
diff --git a/docs/MESA_texture_signed_rgba.spec b/docs/MESA_texture_signed_rgba.spec
deleted file mode 100644
index 49c8e9e..0000000
--- a/docs/MESA_texture_signed_rgba.spec
+++ /dev/null
@@ -1,214 +0,0 @@
-Name
-
-    MESA_texture_signed_rgba
-
-Name Strings
-
-    GL_MESA_texture_signed_rgba
-
-Contact
-
-
-
-Notice
-
-
-
-IP Status
-
-    No known IP issues
-
-Status
-
-
-
-Version
-
-    0.3, 2009-03-24
-
-Number
-
-    Not assigned ?
-
-Dependencies
-
-    Written based on the wording of the OpenGL 2.0 specification.
-
-    This extension trivially interacts with ARB_texture_float.
-    This extension shares some language with ARB_texture_compression_rgtc
-    but does not depend on it.
-
-Overview
-
-    OpenGL prior to 3.1 does not support any signed texture formats.
-    ARB_texture_compression_rgtc introduces some compressed red and
-    red_green signed formats but no uncompressed ones, which might
-    still be useful. NV_texture_shader adds signed texture formats,
-    but also a lot of functionality which has been superceded by fragment
-    shaders.
-    It is usually possible to get the same functionality
-    using a unsigned format by doing scale and bias in a shader, but this
-    is undesirable since modern hardware has direct support for this.
-    This extension adds a signed 4-channel texture format by backporting
-    the relevant features from OpenGL 3.1, as a means to support this in
-    OpenGL implementations only supporting older versions.
-
-Issues
-
-    1) What should this extension be called?
-
-       RESOLVED: MESA_texture_signed_rgba seems reasonable.
-       The rgba part is there because only 4 channel format is supported.
-
-
-    2) Should the full set of signed formats (alpha, luminance, rgb, etc.)
-       be supported?
-
-       RESOLVED: NO. To keep this extension simple, only add the most
-       universal format, rgba. alpha/luminance can't be trivially supported
-       since OpenGL 3.1 does not support them any longer, and there is some
-       implied dependency on ARB_texture_rg for red/red_green formats so
-       avoid all this. Likewise, only 8 bits per channel is supported.
-
-
-    3) Should this extension use new enums for the texture formats?
-
-       RESOLVED: NO. Same enums as those used in OpenGL 3.1.
-
-
-    4) How are signed integer values mapped to floating-point values?
-
-       RESOLVED: Same as described in issue 5) of
-       ARB_texture_compression_rgtc (quote):
-       A signed 8-bit two's complement value X is computed to
-       a floating-point value Xf with the formula:
-
-                { X / 127.0, X > -128
-           Xf = {
-                { -1.0,      X == -128
-
-       This conversion means -1, 0, and +1 are all exactly representable,
-       however -128 and -127 both map to -1.0.  Mapping -128 to -1.0
-       avoids the numerical awkwardness of have a representable value
-       slightly more negative than -1.0.
-
-       This conversion is intentionally NOT the "byte" conversion listed
-       in Table 2.9 for component conversions.  That conversion says:
-
-           Xf = (2*X + 1) / 255.0
-
-       The Table 2.9 conversion is incapable of exactly representing
-       zero.
-
-       (Difference to ARB_texture_compression_rgtc):
-       This is the same mapping as OpenGL 3.1 uses.
-       This is also different to what NV_texture_shader used.
-       The above mapping should be considered the reference, but there
-       is some leeway so other mappings are allowed for implementations which
-       cannot do this. Particulary the mapping given in NV_texture_shader or
-       the standard OpenGL byte/float mapping is considered acceptable too, as
-       might be a mapping which represents -1.0 by -128, 0.0 by 0 and 1.0 by
-       127 (that is, uses different scale factors for negative and positive
-       numbers).
-       Also, it is ok to store incoming GL_BYTE user data as-is, without
-       converting to GL_FLOAT (using the standard OpenGL float/byte mapping)
-       and converting back (using the mapping described here).
-       Other than those subtle issues there are no other non-standard
-       conversions used, so when using for instance CopyTexImage2D with
-       a framebuffer clamped to [0,1] all converted numbers will be in the range
-       [0, 127] (and not scaled and biased).
-
-
-    5) How will signed components resulting from RGBA8_SNORM texture
-       fetches interact with fragment coloring?
-
-       RESOLVED: Same as described in issue 6) of
-       ARB_texture_compression_rgtc (quote):
-       The specification language for this extension is silent
-       about clamping behavior leaving this to the core specification
-       and other extensions.  The clamping or lack of clamping is left
-       to the core specification and other extensions.
-
-       For assembly program extensions supporting texture fetches
-       (ARB_fragment_program, NV_fragment_program, NV_vertex_program3,
-       etc.) or the OpenGL Shading Language, these signed formats will
-       appear as expected with unclamped signed components as a result
-       of a texture fetch instruction.
-
-       If ARB_color_buffer_float is supported, its clamping controls
-       will apply.
-
-       NV_texture_shader extension, if supported, adds support for
-       fixed-point textures with signed components and relaxed the
-       fixed-function texture environment clamping appropriately.  If the
-       NV_texture_shader extension is supported, its specified behavior
-       for the texture environment applies where intermediate values
-       are clamped to [-1,1] unless stated otherwise as in the case
-       of explicitly clamped to [0,1] for GL_COMBINE.  or clamping the
-       linear interpolation weight to [0,1] for GL_DECAL and GL_BLEND.
-
-       Otherwise, the conventional core texture environment clamps
-       incoming, intermediate, and output color components to [0,1].
-
-       This implies that the conventional texture environment
-       functionality of unextended OpenGL 1.5 or OpenGL 2.0 without
-       using GLSL (and with none of the extensions referred to above)
-       is unable to make proper use of the signed texture formats added
-       by this extension because the conventional texture environment
-       requires texture source colors to be clamped to [0,1].  Texture
-       filtering of these signed formats would be still signed, but
-       negative values generated post-filtering would be clamped to
-       zero by the core texture environment functionality.  The
-       expectation is clearly that this extension would be co-implemented
-       with one of the previously referred to extensions or used with
-       GLSL for the new signed formats to be useful.
-
-
-    6) Should the RGBA_SNORM tokens also be accepted by CopyTexImage
-       functions?
-
-       RESOLVED: YES.
-
-
-    7) What to do with GetTexParameter if ARB_texture_float is supported,
-       in particular what datatype should this return for TEXTURE_RED_TYPE_ARB,
-       TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB, TEXTURE_ALPHA_TYPE_ARB?
-
-       RESOLVED: ARB_texture_float states type is either NONE,
-       UNSIGNED_NORMALIZED_ARB, or FLOAT. This extension adds a new enum,
-       SIGNED_NORMALIZED, which will be returned accordingly. This is the
-       same behaviour as in OpenGL 3.1.
-
-
-New Tokens
-
-
-    Accepted by the <internalformat> parameter of
-    TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D:
-
-        RGBA_SNORM                                0x8F93
-        RGBA8_SNORM                               0x8F97
-
-    Returned by the <params> parameter of GetTexLevelParameter:
-
-        SIGNED_NORMALIZED                         0x8F9C
-
-
-Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization):
-
- -- Section 3.8.1, Texture Image Specification
-
-    Add to Table 3.16 (page 154): Sized internal formats
-
-    Sized             Base             R    G    B    A    L    I    D
-    Internal Format   Internal Format bits bits bits bits bits bits bits
-    ---------------   --------------- ---- ---- ---- ---- ---- ---- ----
-    RGBA8_SNORM       RGBA             8    8    8    8    0    0    0
-
-
-Dependencies on ARB_texture_float extension:
-
-    If ARB_texture_float is supported, GetTexParameter queries with <value>
-    of TEXTURE_RED_TYPE_ARB, TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB or
-    TEXTURE_ALPHA_TYPE_ARB return SIGNED_NORMALIZED if
-    the base internal format is RGBA_SNORM.
diff --git a/docs/MESA_window_pos.spec b/docs/MESA_window_pos.spec
deleted file mode 100644
index 4d01f18..0000000
--- a/docs/MESA_window_pos.spec
+++ /dev/null
@@ -1,126 +0,0 @@
-Name
-
-    MESA_window_pos
-
-Name Strings
-
-    GL_MESA_window_pos
-
-Contact
-
-    Brian Paul, brian.paul 'at' tungstengraphics.com
-
-Status
-
-    Shipping (since Mesa version 1.2.8)
-
-Version
-
-
-Number
-
-    197
-
-Dependencies
-
-    OpenGL 1.0 is required.
-    The extension is written against the OpenGL 1.2 Specification
-
-Overview
-
-    In order to set the current raster position to a specific window
-    coordinate with the RasterPos command, the modelview matrix, projection
-    matrix and viewport must be set very carefully.  Furthermore, if the
-    desired window coordinate is outside of the window's bounds one must
-    rely on a subtle side-effect of the Bitmap command in order to circumvent
-    frustum clipping.
-
-    This extension provides a set of functions to directly set the
-    current raster position, bypassing the modelview matrix, the
-    projection matrix and the viewport to window mapping.  Furthermore,
-    clip testing is not performed.
-
-    This greatly simplifies the process of setting the current raster
-    position to a specific window coordinate prior to calling DrawPixels,
-    CopyPixels or Bitmap.
-
-New Procedures and Functions
-
-    void WindowPos2dMESA(double x, double y)
-    void WindowPos2fMESA(float x, float y)
-    void WindowPos2iMESA(int x, int y)
-    void WindowPos2sMESA(short x, short y)
-    void WindowPos2ivMESA(const int *p)
-    void WindowPos2svMESA(const short *p)
-    void WindowPos2fvMESA(const float *p)
-    void WindowPos2dvMESA(const double *p)
-    void WindowPos3iMESA(int x, int y, int z)
-    void WindowPos3sMESA(short x, short y, short z)
-    void WindowPos3fMESA(float x, float y, float z)
-    void WindowPos3dMESA(double x, double y, double z)
-    void WindowPos3ivMESA(const int *p)
-    void WindowPos3svMESA(const short *p)
-    void WindowPos3fvMESA(const float *p)
-    void WindowPos3dvMESA(const double *p)
-    void WindowPos4iMESA(int x, int y, int z, int w)
-    void WindowPos4sMESA(short x, short y, short z, short w)
-    void WindowPos4fMESA(float x, float y, float z, float w)
-    void WindowPos4dMESA(double x, double y, double z, double )
-    void WindowPos4ivMESA(const int *p)
-    void WindowPos4svMESA(const short *p)
-    void WindowPos4fvMESA(const float *p)
-    void WindowPos4dvMESA(const double *p)
-
-New Tokens
-
-    none
-
-Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
-
-  - (2.12, p. 41) Insert after third paragraph:
-
-      Alternately, the current raster position may be set by one of the
-      WindowPosMESA commands:
-
-         void WindowPos{234}{sidf}MESA( T coords );
-         void WindowPos{234}{sidf}vMESA( T coords );
-
-      WindosPos4MESA takes four values indicating x, y, z, and w.
-      WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only
-      x, y, and z with w implicitly set to 1 (or only x and y with z
-      implicititly set to 0 and w implicitly set to 1).
-
-      WindowPosMESA operates like RasterPos except that the current modelview
-      matrix, projection matrix and viewport parameters are ignored and the
-      clip test operation always passes.  The current raster position values
-      are directly set to the parameters passed to WindowPosMESA.  The current
-      color, color index and texture coordinate update the current raster
-      position's associated data.
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None
-
-GLX Protocol
-
-    Not specified at this time.  However, a protocol message very similar
-    to that of RasterPos is expected.
-
-Errors
-
-    INVALID_OPERATION is generated if WindowPosMESA is called betweeen
-    Begin and End.
-
-New State
-
-    None.
-
-New Implementation Dependent State
-
-    None.
-
-Revision History
-
-  * Revision 1.0 - Initial specification
-  * Revision 1.1 - Minor clean-up  (7 Jan 2000, Brian Paul)
-
diff --git a/docs/MESA_ycbcr_texture.spec b/docs/MESA_ycbcr_texture.spec
deleted file mode 100644
index 0fa1f7b..0000000
--- a/docs/MESA_ycbcr_texture.spec
+++ /dev/null
@@ -1,204 +0,0 @@
-Name
-
-    MESA_ycbcr_texture
-
-Name Strings
-
-    GL_MESA_ycbcr_texture
-
-Contact
-
-    Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
-    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
-
-Status
-
-    Shipping (Mesa 4.0.4 and later)
-
-Version
-
-    1.0
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.0 or later is required
-    This extensions is written against the OpenGL 1.4 Specification.
-    NV_texture_rectangle effects the definition of this extension.
-
-Overview
-
-    This extension supports texture images stored in the YCbCr format.
-    There is no support for converting YCbCr images to RGB or vice versa
-    during pixel transfer.  The texture's YCbCr colors are converted to
-    RGB during texture sampling, after-which, all the usual per-fragment
-    operations take place.  Only 2D texture images are supported (not
-    glDrawPixels, glReadPixels, etc).
-
-    A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
-    The first component is luminance (Y).  For pixels in even-numbered
-    image columns, the second component is Cb.  For pixels in odd-numbered
-    image columns, the second component is Cr.  If one were to convert the
-    data to RGB one would need to examine two pixels from columns N and N+1
-    (where N is even) to deduce the RGB color.
-
-IP Status
-
-    None
-
-Issues
-
-    None
-
-New Procedures and Functions
-
-    None
-
-New Tokens
-
-    Accepted by the <internalFormat> and <format> parameters of
-    TexImage2D and TexSubImage2D:
-
-        YCBCR_MESA                   0x8757
-
-    Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
-
-        UNSIGNED_SHORT_8_8_MESA      0x85BA /* same as Apple's */
-        UNSIGNED_SHORT_8_8_REV_MESA  0x85BB /* same as Apple's */
-
-Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
-
-    In section 3.6.4, Rasterization of Pixel Rectangles, on page 101,
-    add the following to Table 3.8 (Packed pixel formats):
-    
-    type Parameter                GL Data   Number of        Matching
-     Token Name                    Type     Components     Pixel Formats
-    --------------                -------   ----------     -------------
-    UNSIGNED_SHORT_8_8_MESA       ushort         2         YCBCR_MESA
-    UNSIGNED_SHORT_8_8_REV_MESA   ushort         2         YCBCR_MESA
-
-
-    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
-    add the following to Table 3.10 (UNSIGNED_SHORT formats):
-
-    UNSIGNED_SHORT_8_8_MESA:
-
-      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
-    +-------------------------------+-------------------------------+
-    |              1st              |              2nd              |
-    +-------------------------------+-------------------------------+
-                        
-    UNSIGNED_SHORT_8_8_REV_MESA:
-
-      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
-    +-------------------------------+-------------------------------+
-    |              2nd              |              1st              |
-    +-------------------------------+-------------------------------+
-
-
-    In section 3.6.4, Rasterization of Pixel Rectangles, on page 104,
-    add the following to Table 3.12 (Packed pixel fiedl assignments):
-
-                       First       Second     Third      Fourth
-    Format             Element     Element    Element    Element
-    ------             -------     -------    -------    -------
-    YCBCR_MESA         luminance   chroma
-
-
-    In section 3.8.1, Texture Image Specification, on page 125, add
-    another item to the list of TexImage2D and TexImage3D equivalence
-    exceptions:
-
-    * The value of internalformat and format may be YCBCR_MESA to
-      indicate that the image data is in YCbCr format.  type must
-      be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA
-      as seen in tables 3.8 and 3.10.  Table 3.12 describes the mapping
-      between Y and Cb/Cr to the components.
-      If NV_texture_rectangle is supported target may also be
-      TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
-      All pixel transfer operations are bypassed.  The texture is stored as
-      YCbCr, not RGB.  Queries of the texture's red, green and blue component
-      sizes will return zero.  The YCbCr colors are converted to RGB during
-      texture sampling using an implementation dependent conversion.
-
-
-    In section 3.8.1, Texture Image Specification, on page 126, add
-    another item to the list of TexImage1D and TexImage2D equivalence
-    exceptions:
-
-    * The value of internalformat and format can not be YCBCR_MESA.
-
-
-    In section 3.8.2, Alternate Texture Image Specification Commands, on
-    page 129, insert this paragraph after the first full paragraph on the
-    page:
-
-         "If the internal storage format of the image being updated by
-    TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA.
-    The error INVALID_OPERATION will be generated otherwise."
-
-
-Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
-Operations and the Frame Buffer)
-
-    None
-
-Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
-State Requests)
-
-    None
-
-Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
-
-    None
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None
-
-GLX Protocol
-
-    None
-
-Errors
-
-    INVALID_ENUM is generated by TexImage2D if <internalFormat> is
-    MESA_YCBCR but <format> is not MESA_YCBCR.
-
-    INVALID_ENUM is generated by TexImage2D if <format> is MESA_YCBCR but
-    <internalFormat> is not MESA_YCBCR.
-
-    INVALID_VALUE is generated by TexImage2D if <format> is MESA_YCBCR and
-    <internalFormat> is MESA_YCBCR and <border> is not zero.
-
-    INVALID_OPERATION is generated by TexSubImage2D if the internal image
-    format is YCBCR_MESA and <format> is not YCBCR_MESA.
-
-    INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
-    image is YCBCR_MESA.
-    
-New State
-
-    Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
-    from n x Z42 to n x Z43 to indicate that internal format may also be
-    YCBCR_MESA.
-
-Revision History
-
-    20 September 2002 - Initial draft
-    29 April 2003 - minor updates
-     3 September 2003 - further clarify when YCbCr->RGB conversion takes place
-    19 September 2003 - a few more updates prior to submitting to extension
-                        registry.
-     3 April 2004 - fix assorted inaccuracies
diff --git a/docs/OLD/MESA_packed_depth_stencil.spec b/docs/OLD/MESA_packed_depth_stencil.spec
deleted file mode 100644
index 112b730..0000000
--- a/docs/OLD/MESA_packed_depth_stencil.spec
+++ /dev/null
@@ -1,230 +0,0 @@
-Name
-
-    MESA_packed_depth_stencil
-
-Name Strings
-
-    GL_MESA_packed_depth_stencil
-
-Contact
-
-    Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com)
-    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
-
-Status
-
-    Obsolete.
-
-Version
-
-
-Number
-
-    ???
-
-Dependencies
-
-    EXT_abgr affects the definition of this extension
-    SGIS_texture4D affects the definition of this extension
-    EXT_cmyka affects the definition of this extension
-    ARB_packed_pixels affects the definition of this extension
-
-Overview
-	
-    Provides a mechanism for DrawPixels and ReadPixels to efficiently
-    transfer depth and stencil image data.  Specifically, we defined new
-    packed pixel formats and types which pack both stencil and depth
-    into one value.
-
-Issues:
-
-    1. Is this the right way to distinguish between 24/8 and 8/24
-       pixel formats?  Should we instead provide both:
-	
-       GL_DEPTH_STENCIL_MESA
-       GL_STENCIL_DEPTH_MESA
-
-       And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ?
-
-    2. If not, is it correct to use _REV to indicate that stencil
-       preceeds depth in the 1_15 and 8_24 formats?
-
-    3. Do we really want the GL_UNSIGNED_SHORT formats?  
-
-	
-New Procedures and Functions
-
-    None.
-
-New Tokens
-    
-    Accepted by the <format> parameter of ReadPixels and DrawPixels:
-
-	GL_DEPTH_STENCIL_MESA		0x8750
-
-    Accepted by the <type> parameter of ReadPixels and DrawPixels:
-
-	GL_UNSIGNED_INT_24_8_MESA	0x8751
-	GL_UNSIGNED_INT_8_24_REV_MESA	0x8752
-	GL_UNSIGNED_SHORT_15_1_MESA	0x8753
-	GL_UNSIGNED_SHORT_1_15_REV_MESA	0x8754
-
-Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the 1.1 Specification (Rasterization)
-
-    One entry is added to table 3.5 (DrawPixels and ReadPixels formats).
-    The new table is:
-
-			Target
-	Format Name	Buffer	Element Meaning and Order
-	-----------	------	-------------------------
-	COLOR_INDEX	Color	Color index
-	STENCIL_INDEX	Stencil Stencil index
-	DEPTH_COMPONENT Depth	Depth component
-	RED		Color	R component
-	GREEN		Color	G component
-	BLUE		Color	B component
-	ALPHA		Color	A component
-	RGB		Color	R, G, B components
-	RGBA		Color	R, G, B, A components
-	BGRA	        Color   B, G, R, A components
-	ABGR_EXT	Color	A, B, G, R components
-	CMYK_EXT	Color	Cyan, Magenta, Yellow, Black components
-	CMYKA_EXT	Color	Cyan, Magenta, Yellow, Black, A components
-	LUMINANCE	Color	Luminance component
-	LUMINANCE_ALPHA Color	Luminance, A components
-	DEPTH_STENCIL   Depth,  Depth component, stencil index.
-			Stencil
-
-	Table 3.5: DrawPixels and ReadPixels formats.  The third column
-	gives a description of and the number and order of elements in a
-	group.
-
-    Add to the description of packed pixel formats:
-
-	<type> Parameter		Data	of	  Matching
-	Token Name			Type	Elements  Pixel Formats
-	----------------		----	--------  -------------
-
-	UNSIGNED_BYTE_3_3_2	      ubyte   3	      RGB
-	UNSIGNED_BYTE_2_3_3_REV       ubyte   3	      RGB
-	UNSIGNED_SHORT_5_6_5	      ushort  3	      RGB
-	UNSIGNED_SHORT_5_6_5_REV      ushort  3	      RGB
-	UNSIGNED_SHORT_4_4_4_4	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
-	UNSIGNED_SHORT_4_4_4_4_REV    ushort  4	      RGBA,BGRA
-	UNSIGNED_SHORT_5_5_5_1	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
-	UNSIGNED_SHORT_1_5_5_5_REV    ushort  4	      RGBA,BGRA
-	UNSIGNED_INT_8_8_8_8	      uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
-	UNSIGNED_INT_8_8_8_8_REV      uint    4	      RGBA,BGRA
-	UNSIGNED_INT_10_10_10_2       uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
-	UNSIGNED_INT_2_10_10_10_REV   uint    4	      RGBA,BGRA
-	UNSIGNED_SHORT_15_1_MESA      ushort  2       DEPTH_STENCIL_MESA
-	UNSIGNED_SHORT_1_15_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
-	UNSIGNED_SHORT_24_8_MESA      ushort  2       DEPTH_STENCIL_MESA
-	UNSIGNED_SHORT_8_24_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
-
-	UNSIGNED_INT_8_24:
-
-	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
-	    +-----------------------+-----------------------------------------------------------------------+
-	    |			    |			     			    			    |
-	    +-----------------------+-----------------------------------------------------------------------+
-
-		    first					second		    
-		    element					element		    
-
-
-	UNSIGNED_INT_24_8:
-
-	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
-	    +----------------------------------------------------------------------+------------------------+
-	    |			    			     			   | 			    |
-	    +----------------------------------------------------------------------+------------------------+
-
-		    first								  second		    
-		    element								  element		    
-
-	UNSIGNED_SHORT_15_1:
-
-	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
-	    +-----------------------------------------------------------+---+
-	    |					    			|   |
-	    +-----------------------------------------------------------+---+
-
-	    		first						second	
-			element						element	
-
-
-	UNSIGNED_SHORT_1_15_REV:
-
-	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
-	    +---+-----------------------------------------------------------+
-	    |	|		     					    |
-	    +---+-----------------------------------------------------------+
-
-	    second		    first
-	    element		    element
-
-    The assignment of elements to fields in the packed pixel is as
-    described in the table below:
-
-			   First       Second	Third	    Fourth
-	Format		   Element     Element	Element     Element
-	------		   -------     -------	-------     -------
-	RGB		   red	       green	blue
-	RGBA		   red	       green	blue	    alpha
-	BGRA		   blue	       green	red	    alpha
-	ABGR_EXT	   alpha       blue	green	    red
-	CMYK_EXT	   cyan	       magenta	yellow	    black
-	DEPTH_STENCIL_MESA depth       stencil
-
-Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
-and the Frame Buffer)
-
-    The new format is added to the discussion of Obtaining Pixels from the
-    Framebuffer.  It should read " If the <format> is one of RED, GREEN,
-    BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and
-    the GL is in color index mode, then the color index is obtained."
-
-    The new format is added to the discussion of Index Lookup.  It should
-    read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA,
-    ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to
-    reference 4 tables of color components: PIXEL_MAP_I_TO_R,
-    PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A."
-
-
-Additions to Chapter 5 of the 1.1 Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
-
-    None
-
-Additions to the GLX Specification
-
-    None
-
-GLX Protocol
-
-    TBD
-
-Errors
-
-    None
-
-New State
-
-    None
-
-Revision History
-
-    Version 1.0 - 23 Sep 2000
-        Keith's original version.
-
-    Version 1.1 - 3 Nov 2000
-        Brian's edits, assigned values to new enums.
-
diff --git a/docs/OLD/MESA_program_debug.spec b/docs/OLD/MESA_program_debug.spec
deleted file mode 100644
index 7694fdc..0000000
--- a/docs/OLD/MESA_program_debug.spec
+++ /dev/null
@@ -1,356 +0,0 @@
-Name
-
-    MESA_program_debug
-
-Name Strings
-
-    GL_MESA_program_debug
-
-Contact
-
-    Brian Paul (brian.paul 'at' tungstengraphics.com)
-
-Status
-
-    XXX - Not complete yet!!!
-
-Version
-
-    Last Modified Date: July 20, 2003
-    Author Revision: 1.0
-
-Number
-
-    TBD
-
-Dependencies
-
-    OpenGL 1.4 is required
-    The extension is written against the OpenGL 1.4 specification.
-    ARB_vertex_program or ARB_fragment_program or NV_vertex_program
-    or NV_fragment_program is required.
-
-Overview
-
-    The extension provides facilities for implementing debuggers for
-    vertex and fragment programs.
-
-    The concept is that vertex and fragment program debuggers will be
-    implemented outside of the GL as a utility package.  This extension
-    only provides the minimal hooks required to implement a debugger.
-
-    There are facilities to do the following:
-    1. Have the GL call a user-specified function prior to executing
-       each vertex or fragment instruction.
-    2. Query the current program string's execution position.
-    3. Query the current values of intermediate program values.
-
-    The main feature is the ProgramCallbackMESA function.  It allows the
-    user to register a callback function with the GL.  The callback will
-    be called prior to executing each vertex or fragment program instruction.
-
-    From within the callback, the user may issue Get* commands to
-    query current GL state.  The GetProgramRegisterfvMESA function allows
-    current program values to be queried (such as temporaries, input
-    attributes, and result registers).
-
-    There are flags for enabling/disabling the program callbacks.
-
-    The current execution position (as an offset from the start of the
-    program string) can be queried with
-    GetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos) or
-    GetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos).
-
-
-IP Status
-
-    None
-
-Issues
-
-    1. Is this the right model for a debugger?
-
-       It seems prudent to minimize the scope of this extension and leave
-       it up to the developer (or developer community) to write debuggers
-       that layer on top of this extension.
-
-       If the debugger were fully implemented within the GL it's not
-       clear how terminal and GUI-based interfaces would work, for
-       example.
-
-    2. There aren't any other extensions that register callbacks with
-       the GL.  Isn't there another solution?
-
-       If we want to be able to single-step through vertex/fragment
-       programs I don't see another way to do it.
-
-    3. How do we prevent the user from doing something crazy in the
-       callback function, like trying to call glBegin (leading to
-       recursion)?
-
-       The rule is that the callback function can only issue glGet*()
-       functions and no other GL commands.  It could be difficult to
-       enforce this, however.  Therefore, calling any non-get GL
-       command from within the callback will result in undefined
-       results.    
-
-    4. Is this extension amenable to hardware implementation?
-
-       Hopefully, but if not, the GL implementation will have to fall
-       back to a software path when debugging.  This may be acceptable
-       for debugging.
-
-    5. What's the <data> parameter to ProgramCallbackMESA for?
-
-       It's a common programming practice to associate a user-supplied
-       value with callback functions.
-
-    6. Debuggers often allow one to modify intermediate program values,
-       then continue.  Does this extension support that?
-
-       No.
-
-
-New Procedures and Functions (and datatypes)
-
-    typedef void (*programcallbackMESA)(enum target, void *data)
-
-    void ProgramCallbackMESA(enum target, programcallbackMESA callback,
-                             void *data)
-
-    void GetProgramRegisterfvMESA(enum target, sizei len,
-                                  const ubyte *registerName, float *v)
-
-New Tokens
-
-    Accepted by the <cap> parameter of Enable, Disable, IsEnabled,
-    GetBooleanv, GetDoublev, GetFloatv and GetIntegerv:
-
-        FRAGMENT_PROGRAM_CALLBACK_MESA      0x8bb1
-        VERTEX_PROGRAM_CALLBACK_MESA        0x8bb4
-
-    Accepted by the <pname> parameter GetBooleanv, GetDoublev,
-    GetFloatv and GetIntegerv:
-
-        FRAGMENT_PROGRAM_POSITION_MESA      0x8bb0
-        VERTEX_PROGRAM_POSITION_MESA        0x8bb4
-
-    Accepted by the <pname> parameter of GetPointerv:
-
-        FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
-        FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
-        VERTEX_PROGRAM_CALLBACK_FUNC_MESA   0x8bb6
-        VERTEX_PROGRAM_CALLBACK_DATA_MESA   0x8bb7
-
-Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
-
-    None.
-
-Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
-
-    None.
-
-Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
-Operations and the Frame Buffer)
-
-    None.
-
-Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
-
-    In section 5.4 "Display Lists", page 202, add the following command
-    to the list of those that are not compiled into display lists:
-
-        ProgramCallbackMESA.
-
-
-    Add a new section 5.7 "Callback Functions"
-
-    The function
-
-        void ProgramCallbackMESA(enum target, programcallbackMESA callback,
-                                 void *data)
-
-    registers a user-defined callback function with the GL.  <target>
-    may be FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB.  The enabled
-    callback functions registered with these targets will be called
-    prior to executing each instruction in the current fragment or
-    vertex program, respectively.  The callbacks are enabled and
-    disabled by calling Enable or Disable with <cap>
-    FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB.
-
-    The callback function's signature must match the typedef
-
-        typedef void (*programcallbackMESA)(enum target, void *data)
-
-    When the callback function is called, <target> will either be
-    FRAGMENT_PROGRAM_ARB or VERTEX_PROGRAM_ARB to indicate which
-    program is currently executing and <data> will be the value
-    specified when ProgramCallbackMESA was called.
-
-    From within the callback function, only the following GL commands
-    may be called:
-
-        GetBooleanv
-        GetDoublev
-        GetFloatv
-        GetIntegerv
-        GetProgramLocalParameter
-        GetProgramEnvParameter
-        GetProgramRegisterfvMESA
-        GetProgramivARB
-        GetProgramStringARB
-        GetError
-
-    Calling any other command from within the callback results in
-    undefined behaviour.
-
-
-Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
-State Requests)
-
-    Add a new section 6.1.3 "Program Value Queries":
-
-    The command
-
-        void GetProgramRegisterfvMESA(enum target, sizei len,
-                                      const ubyte *registerName,
-                                      float *v)
-        
-    Is used to query the value of program variables and registers
-    during program execution.  GetProgramRegisterfvMESA may only be
-    called from within a callback function registered with
-    ProgramCallbackMESA.
-
-    <registerName> and <len> specify the name a variable, input
-    attribute, temporary, or result register in the program string.
-    The current value of the named variable is returned as four
-    values in <v>.  If <name> doesn't exist in the program string,
-    the error INVALID_OPERATION is generated.
-
-Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
-
-    None.
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None.
-
-GLX Protocol
-
-    XXX TBD
-
-Dependencies on NV_vertex_program and NV_fragment_program
-
-    If NV_vertex_program and/or NV_fragment_program are supported,
-    vertex and/or fragment programs defined by those extensions may
-    be debugged as well.  Register queries will use the syntax used
-    by those extensions (i.e. "v[X]" to query vertex attributes,
-    "o[X]" for vertex outputs, etc.)
-
-Errors
-
-    INVALID_OPERATION is generated if ProgramCallbackMESA is called
-    between Begin and End.
-
-    INVALID_ENUM is generated by ProgramCallbackMESA if <target> is not
-    a supported vertex or fragment program type.
-
-    Note: INVALID_OPERAION IS NOT generated by GetProgramRegisterfvMESA,
-    GetBooleanv, GetDoublev, GetFloatv, or GetIntegerv if called between
-    Begin and End when a vertex or fragment program is currently executing.
-
-    INVALID_ENUM is generated by ProgramCallbackMESA,
-    GetProgramRegisterfvMESA if <target> is not a program target supported
-    by ARB_vertex_program, ARB_fragment_program (or NV_vertex_program or
-    NV_fragment_program).
-
-    INVALID_VALUE is generated by GetProgramRegisterfvMESA if <registerName>
-    does not name a known program register or variable.
-
-    INVALID_OPERATION is generated by GetProgramRegisterfvMESA when a
-    register query is attempted for a program target that's not currently
-    being executed.
-
-
-New State
-
-    XXX finish
-
-(table 6.N, p. ###)
-                                                            Initial
-    Get Value                            Type Get Command   Value    Description  Sec.  Attribute
-    ---------                            ---- -----------   -----    -----------  ----  ---------
-    FRAGMENT_PROGRAM_CALLBACK_MESA        B   IsEnabled     FALSE    XXX          XXX   enable
-    VERTEX_PROGRAM_CALLBACK_MESA          B   IsEnabled     FALSE    XXX          XXX   enable
-    FRAGMENT_PROGRAM_POSITION_MESA        Z+  GetIntegerv   -1       XXX          XXX   -
-    VERTEX_PROGRAM_POSITION_MESA          Z+  GetIntegerv   -1       XXX          XXX   -
-    FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA   P   GetPointerv   NULL     XXX          XXX   -
-    VERTEX_PROGRAM_CALLBACK_FUNC_MESA     P   GetPointerv   NULL     XXX          XXX   -
-    FRAGMENT_PROGRAM_CALLBACK_DATA_MESA   P   GetPointerv   NULL     XXX          XXX   -
-    VERTEX_PROGRAM_CALLBACK_DATA_MESA     P   GetPointerv   NULL     XXX          XXX   -
-
-    XXX more?
-
-New Implementation Dependent State
-
-    None.
-
-Revision History
-
-    8 July 2003
-        Initial draft. (Brian Paul)
-    11 July 2003
-        Second draft. (Brian Paul)
-    20 July 2003
-        Third draft.  Lots of fundamental changes. (Brian Paul)
-    23 July 2003
-        Added chapter 5 and 6 spec language. (Brian Paul)
-
-Example Usage
-
-   The following is a very simple example of how this extension may
-   be used to print the values of R0, R1, R2 and R3 while executing
-   vertex programs.
-
-
-    /* This is called by the GL when the vertex program is executing.
-     * We can only make glGet* calls from within this function!
-     */
-    void DebugCallback(GLenum target, GLvoid *data)
-    {
-       GLint pos;
-       GLuint i;
-
-       /* Get PC and current instruction string */
-       glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_ARB, &pos);
-
-       printf("Current position: %d\n", pos);
-
-       printf("Current temporary registers:\n");
-       for (i = 0; i < 4; i++) {
-	  GLfloat v[4];
-	  char s[10];
-	  sprintf(s, "R%d", i);
-	  glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_ARB, strlen(s), s, v);
-	  printf("R%d = %g, %g, %g, %g\n", i, v[0], v[1], v[2], v[3]);
-       }
-    }
-
-
-    /*
-     * elsewhere...
-     */
-
-    /* Register our debugger callback function */
-    glProgramCallbackMESA(GL_VERTEX_PROGRAM_ARB, DebugCallback, NULL);
-    glEnable(GL_VERTEX_PROGRAM_CALLBACK_MESA);
-
-    /* define/bind a vertex program */
-
-    glEnable(GL_VERTEX_PROGRAM);
-
-    /* render something */
-    glBegin(GL_POINTS);
-    glVertex2f(0, 0);
-    glEnd();
-
diff --git a/docs/OLD/MESA_sprite_point.spec b/docs/OLD/MESA_sprite_point.spec
deleted file mode 100644
index b50d78e..0000000
--- a/docs/OLD/MESA_sprite_point.spec
+++ /dev/null
@@ -1,190 +0,0 @@
-Name
-
-    MESA_sprite_point
-
-Name Strings
-
-    GL_MESA_sprite_point
-
-Contact
-
-    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
-
-Status
-
-    Obsolete - see GL_ARB_point_sprite.
-
-Version
-
-
-Number
-
-    ???
-
-Dependencies
-
-    GL_EXT_point_parameters effects the definition of this extension
-    GL_ARB_multitexture effects the definition of this extension
-
-Overview
-	
-    This extension modifies the way in which points are rendered,
-    specifically when they're textured.  When SPRITE_POINT_MESA is enabled
-    a point is rendered as if it were a quadrilateral with unique texture
-    coordinates at each vertex.  This extension effectively turns points
-    into sprites which may be rendered more easily and quickly than using
-    conventional textured quadrilaterals.
-
-    When using point size > 1 or attenuated points this extension is an
-    effective way to render many small sprite images for particle systems
-    or other effects.
-
-Issues:
-
-    1. How are the texture coordinates computed?
-
-       The lower-left corner has texture coordinate (0,0,r,q).
-       The lower-right, (1,0,r,q).  The upper-right, (1,1,r,q).
-       The upper-left, (0,1,r,q).
-
-    2. What about texgen and texture matrices?
-
-       Texgen and the texture matrix have no effect on the point's s and t
-       texture coordinates.  The r and q coordinates may have been computed
-       by texgen or the texture matrix.  Note that with a 3D texture and/or
-       texgen that the r coordinate could be used to select a slice in the
-       3D texture.
-
-    3. What about point smoothing?
-
-       When point smoothing is enabled, a triangle fan could be rendered
-       to approximate a circular point.  This could be problematic to
-       define and implement so POINT_SMOOTH is ignored when drawing sprite
-       points.
-
-       Smoothed points can be approximated by using an appropriate texture
-       images, alpha testing and blending.
-
-       POLYGON_SMOOTH does effect the rendering of the quadrilateral, however.
-
-    4. What about sprite rotation?
-
-       There is none.  Sprite points are always rendered as window-aligned
-       squares.  One could define rotated texture images if desired.  A 3D
-       texture and appropriate texture r coordinates could be used to
-       effectively specify image rotation per point.
-
-    5. What about POLYGON_MODE?
-
-       POLYGON_MODE does not effect the rasterization of the quadrilateral.
-
-    6. What about POLYGON_CULL?
-
-       TBD.  Polygon culling is normally specified and implemented in the
-       transformation stage of OpenGL.  However, some rasterization hardware
-       implements it later during triangle setup.
-
-       Polygon culling wouldn't be useful for sprite points since the
-       quadrilaterals are always defined in counter-clockwise order in
-       window space.  For that reason, polygon culling should probably be
-       ignored.
-
-    7. Should sprite points be alpha-attenuated if their size is below the
-       point parameter's threshold size?
-
-    8. Should there be an advertisized maximum sprite point size?
-
-       No.  Since we're rendering the point as a quadrilateral there's no
-       need to limit the size.
-
-
-New Procedures and Functions
-
-    None.
-
-New Tokens
-    
-    Accepted by the <pname> parameter of Enable, Disable, IsEnabled,
-    GetIntegerv, GetBooleanv, GetFloatv and GetDoublev:
-
-	SPRITE_POINT_MESA		0x????
-        MAX_SPRITE_POINT_SIZE_MESA      0x????   (need this?)
-
-Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
-
-    None
-
-Additions to Chapter 3 of the 1.1 Specification (Rasterization)
-
-    Section ???.
-
-    When SPRITE_POINT_MESA is enabled points are rasterized as screen-
-    aligned quadrilaterals.  If the four vertices of the quadrilateral
-    are labeled A, B, C, and D, starting at the lower-left corner and moving
-    counter-clockwise around the quadrilateral, then the vertex and
-    texture coordinates are computed as follows:
-
-      vertex   window coordinate       texture coordinate
-        A      (x-r, y-r, z, w)          (0, 0, r, q)
-        B      (x+r, y-r, z, w)          (1, 0, r, q)
-        C      (x+r, y+r, z, w)          (1, 1, r, q)
-        D      (x-r, y+r, z, w)          (0, 1, r, q)
-
-    where x, y, z, w are the point's window coordinates, r and q are the
-    point's 3rd and 4th texture coordinates  and r is half the point's
-    size.  The other vertex attributes (such as the color and fog coordinate)
-    are simply duplicated from the original point vertex.
-
-    Point size may either be specified with PointSize or computed
-    according to the EXT_point_parameters extension.
-
-    The new texture coordinates are not effected by texgen or the texture
-    matrix.  Note, however, that the texture r and q coordinates are passed
-    unchanged and may have been computed with texgen and/or the texture
-    matrix.
-
-    If multiple texture units are present the same texture coordinate is
-    used for all texture units.
-
-    The point is then rendered as if it were a quadrilateral using the
-    normal point sampling rules.  POLYGON_MODE does not effect the
-    rasterization of the quadrilateral but POLYGON_SMOOTH does.
-
-    POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled.
-
-Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
-and the Frame Buffer)
-
-    None.
-
-Additions to Chapter 5 of the 1.1 Specification (Special Functions)
-
-    None
-
-Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
-
-    None
-
-Additions to the GLX Specification
-
-    None
-
-GLX Protocol
-
-    TBD
-
-Errors
-
-    None
-
-New State
-
-    Add boolean variable SPRITE_POINT_MESA to the point attribute group.
-
-Revision History
-
-    Version 1.0 - 4 Dec 2000
-        Original draft.
-
-
-
diff --git a/docs/OLD/MESA_trace.spec b/docs/OLD/MESA_trace.spec
deleted file mode 100644
index dc4166e..0000000
--- a/docs/OLD/MESA_trace.spec
+++ /dev/null
@@ -1,359 +0,0 @@
-Name
-
-     MESA_trace
-
-Name Strings
-
-     GL_MESA_trace
-
-Contact
-    
-    Bernd Kreimeier, Loki Entertainment, bk 'at' lokigames.com
-    Brian Paul, VA Linux Systems, Inc., brianp 'at' valinux.com
-
-Status
-
-    Obsolete.
-
-Version
-
-
-Number
-
-    none yet
-
-Dependencies
-
-    OpenGL 1.2 is required.
-    The extension is written against the OpenGL 1.2 Specification
-
-Overview
-
-    Provides the application with means to enable and disable logging
-    of GL calls including parameters as readable text. The verbosity
-    of the generated log can be controlled. The resulting logs are
-    valid (but possibly incomplete) C code and can be compiled and 
-    linked for standalone test programs. The set of calls and the 
-    amount of static data that is logged can be controlled at runtime. 
-    The application can add comments and enable or disable tracing of GL 
-    operations at any time. The data flow from the application to GL
-    and back is unaffected except for timing.
-
-    Application-side implementation of these features raises namespace
-    and linkage issues. In the driver dispatch table a simple
-    "chain of responsibility" pattern (aka "composable piepline")
-    can be added.
-
-IP Status
-
-    The extension spec is in the public domain.  The current implementation
-    in Mesa is covered by Mesa's XFree86-style copyright by the authors above.
-    This extension is partially inspired by the Quake2 QGL wrapper.
-
-Issues
-
- 
-    (1) Is this Extension obsolete because it can
-    be implemented as a wrapper DLL?
-
-      RESOLVED: No. While certain operating systems (Win32) provide linkers 
-      that facilitate this kind of solution, other operating systems
-      (Linux) do not support hierarchical linking, so a wrapper solution
-      would result in symbol collisions.
-      Further, IHV's might have builtin support for tracing GL execution 
-      that enjoys privileged access, or that they do not wish to separate
-      the tracing code from their driver code base.
-
-    (2) Should the Trace API explicitely support the notion of "frames? 
-    This would require hooking into glXSwapBuffers calls as well.
-
-      RESOLVED: No. The application can use NewTraceMESA/EndTraceMESA
-      and TraceComment along with external parsing tools to split the 
-      trace into frames, in whatever way considered adequate.
-
-    (2a) Should GLX calls be traced?
-
-      PBuffers and other render-to-texture solutions demonstrate that
-      context level commands beyond SwapBuffers might have to be
-      traced. The GL DLL exports the entry points, so this would not
-      be out of the question. 
-
-    (3) Should the specification mandate the actual output format?
-
-      RESOLVED: No. It is sufficient to guarantee that all data and commands 
-      will be traced as requested by Enable/DisableTraceMESA, in the order
-      encountered. Whether the resulting trace is available as a readable 
-      text file, binary metafile, compilable source code, much less which 
-      indentation and formatting has been used, is up to the implementation. 
-      For the same reason this specification does not enforce or prohibit
-      additional information added to the trace (statistics, profiling/timing, 
-      warnings on possible error conditions).
-
-    (4) Should the comment strings associated with names and pointer (ranges) 
-    be considered persistent state?
-
-      RESOLVED: No. The implementation is not forced to use this information 
-      on subsequent occurences of name/pointer, and is free to consider it 
-      transient state.
- 
-    (5) Should comment commands be prohibited between Begin/End?
-
-      RESOLVED: Yes, with the exception of TraceCommentMESA. TraceCommentMESA 
-      is transient, the other commands might cause storage of persistent
-      data in the context. There is no need to have the ability mark names 
-      or pointers between Begin and End.
-
-
-New Procedures and Functions
- 
-    void NewTraceMESA( bitfield mask, const ubyte * traceName )
-
-    void EndTraceMESA( void )
-
-    void EnableTraceMESA( bitfield mask )
-
-    void DisableTraceMESA( bitfield mask )
-
-    void TraceAssertAttribMESA( bitfield attribMask )
-
-    void TraceCommentMESA( const ubyte* comment )
-
-    void TraceTextureMESA( uint name, const ubyte* comment )
-
-    void TraceListMESA( uint name, const ubyte* comment )
-
-    void TracePointerMESA( void* pointer, const ubyte* comment )
-
-    void TracePointerRangeMESA( const void* first, 
-                                const void* last, 
-                                const ubyte* comment ) 
-
-New Tokens
- 
-    Accepted by the <mask> parameter of EnableTrace and DisableTrace:
-
-       TRACE_ALL_BITS_MESA           0xFFFF
-       TRACE_OPERATIONS_BIT_MESA     0x0001
-       TRACE_PRIMITIVES_BIT_MESA     0x0002
-       TRACE_ARRAYS_BIT_MESA         0x0004
-       TRACE_TEXTURES_BIT_MESA       0x0008
-       TRACE_PIXELS_BIT_MESA         0x0010
-       TRACE_ERRORS_BIT_MESA         0x0020
-
-    Accepted by the <pname> parameter of GetIntegerv, GetBooleanv,
-    GetFloatv, and GetDoublev:
-
-       TRACE_MASK_MESA               0x8755
-
-    Accepted by the <pname> parameter to GetString:
-
-       TRACE_NAME_MESA               0x8756
-
-
-Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
-
-    None.
-
-Additions to Chapter 3 of the OpenGL 1.2.1 Specification (OpenGL Operation)
-
-    None.
-
-Additions to Chapter 4 of the OpenGL 1.2.1 Specification (OpenGL Operation)
-
-    None.
-
-Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
-
-    Add a new section:
-
-    5.7 Tracing
-
-    The tracing facility is used to record the execution of a GL program
-    to a human-readable log.  The log appears as a sequence of GL commands
-    using C syntax.  The primary intention of tracing is to aid in program
-    debugging.
-
-    A trace is started with the command
-
-      void NewTraceMESA( bitfield mask, const GLubyte * traceName )
-
-    <mask> may be any value accepted by PushAttrib and specifies a set of
-    attribute groups.  The state values included in those attribute groups
-    is written to the trace as a sequence of GL commands.
-
-    <traceName> specifies a name or label for the trace.  It is expected
-    that <traceName> will be interpreted as a filename in most implementations.
-
-    A trace is ended by calling the command
-
-      void EndTraceMESA( void )
-
-    It is illegal to call NewTraceMESA or EndTraceMESA between Begin and End. 
-
-    The commands
-
-      void EnableTraceMESA( bitfield mask )
-      void DisableTraceMESA( bitfield mask )
-
-    enable or disable tracing of different classes of GL commands.
-    <mask> may be the union of any of TRACE_OPERATIONS_BIT_MESA,
-    TRACE_PRIMITIVES_BIT_MESA, TRACE_ARRAYS_BIT_MESA, TRACE_TEXTURES_BIT_MESA,
-    and TRACE_PIXELS_BIT_MESA.  The special token TRACE_ALL_BITS_MESA
-    indicates all classes of commands are to be logged.
-
-    TRACE_OPERATIONS_BIT_MESA controls logging of all commands outside of
-    Begin/End, including Begin/End.
-  
-    TRACE_PRIMITIVES_BIT_MESA controls logging of all commands inside of
-    Begin/End, including Begin/End.
- 
-    TRACE_ARRAYS_BIT_MESA controls logging of VertexPointer, NormalPointer,
-    ColorPointer, IndexPointer, TexCoordPointer and EdgeFlagPointer commands.
-
-    TRACE_TEXTURES_BIT_MESA controls logging of texture data dereferenced by
-    TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and
-    TexSubImage3D commands.
-
-    TRACE_PIXELS_BIT_MESA controls logging of image data dereferenced by
-    Bitmap and DrawPixels commands.
-
-    TRACE_ERRORS_BIT_MESA controls logging of all errors. If this bit is 
-    set, GetError will be executed whereever applicable, and the result will 
-    be added to the trace as a comment. The error returns are cached and 
-    returned to the application on its GetError calls. If the user does not 
-    wish the additional GetError calls to be performed, this bit should not
-    be set.
-    
-    The command
-
-      void TraceCommentMESA( const ubyte* comment )
-
-    immediately adds the <comment> string to the trace output, surrounded
-    by C-style comment delimiters.
-
-    The commands
-
-      void TraceTextureMESA( uint name, const ubyte* comment )
-      void TraceListMESA( uint name, const ubyte* comment )
-
-    associates <comment> with the texture object or display list specified
-    by <name>.  Logged commands which reference the named texture object or
-    display list will be annotated with <comment>.  If IsTexture(name) or
-    IsList(name) fail (respectively) the command is quietly ignored.
-
-    The commands
-
-      void TracePointerMESA( void* pointer, const ubyte* comment )
-
-      void TracePointerRangeMESA( const void* first, 
-                                  const void* last,
-                                  const ubyte* comment ) 
-
-    associate <comment> with the address specified by <pointer> or with
-    a range of addresses specified by <first> through <last>.
-    Any logged commands which reference <pointer> or an address between
-    <first> and <last> will be annotated with <comment>.
-
-    The command
-
-      void TraceAssertAttribMESA( bitfield attribMask )
-
-    will add GL state queries and assertion statements to the log to
-    confirm that the current state at the time TraceAssertAttrib is
-    executed matches the current state when the trace log is executed
-    in the future.
-
-    <attribMask> is any value accepted by PushAttrib and specifies
-    the groups of state variables which are to be asserted.
-
-    The commands NewTraceMESA, EndTraceMESA, EnableTraceMESA, DisableTraceMESA,
-    TraceAssertAttribMESA, TraceCommentMESA, TraceTextureMESA, TraceListMESA, 
-    TracePointerMESA and TracePointerRangeMESA are not compiled into display lists.
-
-
-    Examples:
-
-    The command NewTraceMESA(DEPTH_BUFFER_BIT, "log") will query the state
-    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
-    to get the values <test>, <func>, <mask>, and <clear> respectively.
-    Statements equivalent to the following will then be logged:
-
-       glEnable(GL_DEPTH_TEST);   (if <test> is true)
-       glDisable(GL_DEPTH_TEST);  (if <test> is false)
-       glDepthFunc(<func>); 
-       glDepthMask(<mask>);
-       glClearDepth(<clear>);
-   
-
-    The command TraceAssertAttribMESA(DEPTH_BUFFER_BIT) will query the state
-    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
-    to get the values <test>, <func>, <mask>, and <clear> respectively.
-    The resulting trace might then look will like this:
-
-    {
-      GLboolean b;
-      GLint i;
-      GLfloat f;
-      b = glIsEnabled(GL_DEPTH_TEST);
-      assert(b == <test>);
-      glGetIntegerv(GL_DEPTH_FUNC, &i);
-      assert(i == <func>);
-      glGetIntegerv(GL_DEPTH_MASK, &i);
-      assert(i == <mask>);
-      glGetFloatv(GL_DEPTH_CLEAR_VALUE, &f);
-      assert(f == <clear>);
-    }
-
-
-Additions to Chapter 6 of the OpenGL 1.2.1 Specification 
-    (State and State Requests)
-
-    Querying TRACE_MASK_MESA with GetIntegerv, GetFloatv, GetBooleanv or
-    GetDoublev returns the current command class trace mask.
-
-    Querying TRACE_NAME_MESA with GetString returns the current trace name.
-
-
-Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
-
-    The MESA_trace extension can be used in a way that does not affect data 
-    flow from application to OpenGL, as well as data flow from OpenGL to 
-    application, except for timing, possible print I/O. TRACE_ERRORS_BIT_MESA
-    will add additional GetError queries. Setting a trace mask with NewTraceMESA
-    as well as use of TraceAssertAttribMESA might cause additional state queries.
-    With the possible exception of performance, OpenGL rendering should not be
-    affected at all by a properly chosen logging operation.
-
-Additions to the AGL/GLX/WGL Specifications
-
-    None.
-
-GLX Protocol
-
-    None. The logging operation is carried out client-side, by exporting
-    entry points to the wrapper functions that execute the logging operation.
-
-Errors
-
-    INVALID_OPERATION is generated if any trace command except TraceCommentMESA
-    is called between Begin and End.
-
-New State
-
-    The current trace name and current command class mask are stored
-    per-context.
-
-New Implementation Dependent State
-
-    None.
-
-Revision History
-
-  * Revision 0.1 - Initial draft from template (bk000415)
-  * Revision 0.2 - Draft (bk000906)
-  * Revision 0.3 - Draft (bk000913)
-  * Revision 0.4 - Reworked text, fixed typos (bp000914)
-  * Revision 0.5 - Assigned final GLenum values (bp001103)
-  * Revision 0.6 - TRACE_ERRORS_BIT_MESA (bk000916)
-  * Revision 0.7 - Added MESA postfix (bk010126)
-
diff --git a/docs/README.3DFX b/docs/README.3DFX
deleted file mode 100644
index 7feda6f..0000000
--- a/docs/README.3DFX
+++ /dev/null
@@ -1,830 +0,0 @@
-
-                            3Dfx Glide device driver
-
-
-
-Requirements:
--------------
-
-A Voodoo-based videocard/accelerator
-DOS (with DJGPP), Windows9x/2k (with MinGW), Linux
-Glide3x library for your OS
-
-http://sourceforge.net/projects/glide/
-
-
-
-How to compile:
----------------
-
-DJGPP:
-   Place the Glide3 SDK in the top Mesa directory:
-	$(MESA)/glide3/include/
-		3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
-	$(MESA)/glide3/lib/
-		libgld3x.a, libgld3i.a, glide3x.dxe
-   Type:
-	make -f Makefile.DJ X86=1 FX=1
-   Look into the makefile for further information.
-
-MinGW:
-   Place the Glide3 SDK in the top Mesa directory:
-	$(MESA)/glide3/include/
-		3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
-	$(MESA)/glide3/lib/
-		libglide3x.a, glide3x.dll
-   Type:
-	make -f Makefile.mgw X86=1 FX=1
-   Look into the makefile for further information.
-
-Linux:
-   Place the Glide3 SDK in /usr/local/glide
-	/usr/local/glide/include/
-		3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
-	/usr/local/glide/lib/
-		libglide3x.a, libglide3x.so
-   Type:
-	make linux-glide
-	or
-	make linux-x86-glide
-
-
-
-Compilation defines:
---------------------
-
-FX_DEBUG
-	enable driver debug code
-FX_TRAP_GLIDE
-	enable Glide trace code
-FX_PACKEDCOLOR
-	use packed color in vertex structure
-FX_TC_NAPALM
-	map GL_COMPRESSED_RGB[A] to FXT1. Works with VSA100-based cards only.
-FX_COMPRESS_S3TC_AS_FXT1_HACK
-	map S3TC to FXT1
-FX_RESCALE_BIG_TEXURES_HACK
-	fake textures larger than HW can support
-	(see MESA_FX_MAXLOD environment variable)
-
-
-
-Environment variables:
-----------------------
-
-The following environment variables affect MesaFX. Those that affect Glide
-only, are beyond the scope of this section. Entries that don't have a "Value"
-field, can have any value whatsoever
-	ex: set MESA_FX_IGNORE_CMBEXT=y
-
-"Note" (*) means that the environment variable affects Glide, too; also, if
-the var is not found in the environment, it is searched in windoze registry.
-"Note" (!) means that the environment variable is not working as expected;
-may have undefined effects, might have effects only at Glide level or might
-not have any effect whatsoever. Caveat emptor! Those are to be revised soon.
-
-It is recommended to leave the envvars alone, so that Mesa/Glide will run with
-default values. Use them only when you experience crashes or strange behavior.
-
-FX_GLIDE_NUM_TMU
-	OS: all
-	HW: dual-TMU cards (Voodoo2, Avenger, Napalm)
-	Desc: force single-TMU
-	Note: (*)
-	Value: "1"
-FX_GLIDE_SWAPPENDINGCOUNT
-	OS: all
-	HW: all
-	Desc: max # of buffers allowed to build up
-	Note: (*) (!)
-	Value: "0", "1", "2", "3", "4", "5" or "6"
-FX_GLIDE_SWAPINTERVAL
-	OS: all
-	HW: all
-	Desc: number of vertical retraces to wait before swapping
-	Note: (*) (!) works only at Glide-level?
-SSTH3_SLI_AA_CONFIGURATION
-	OS: all
-	HW: VSA100-based cards
-	Desc: SLI/AA setup
-	Note: (*) (!) works only at Glide-level?
-	Value:
-	    1, 2, 4 chip cards
-		"0" - SLI & AA disable
-		"1" - SLI disabled, 2 sample AA enabled
-	    2, 4 chip cards
-		"2" - 2-way SLI enabled, AA disabled
-		"3" - 2-way SLI enabled, 2 sample AA enabled
-		"4" - SLI disabled, 4 sample AA enabled
-	    4 chip cards
-		"5" - 4-way SLI enabled, AA disabled
-		"6" - 4-way SLI enabled, 2 sample AA enabled
-		"7" - 2-way SLI enabled, 4 sample AA enabled
-		"8" - SLI disabled, 8 sample AA enabled 
-SST_DUALHEAD
-	OS: win32
-	HW: ?
-	Desc: ?
-	Note: (!) disabled?
-MESA_FX_NO_SIGNALS
-	OS: linux
-	HW: all
-	Desc: avoid installing signals
-	Note: (!) untested!
-MESA_FX_INFO
-	OS: all
-	HW: all
-	Desc: verbose to stderr
-	Value: any; special value "r" to redirect stderr to MESA.LOG
-MESA_FX_NOSNAP
-	OS: all
-	HW: Voodoo1, Rush, Banshee
-	Desc: do not snap vertices inside Mesa
-	Note: to be used with Glide3x that snaps vertices internally
-MESA_FX_POINTCAST
-	OS: all
-	HW: dual-TMU cards (some Voodoo1, Voodoo2, Avenger, Napalm)
-	Desc: try to use pointcast palette
-	Note: may give adverse effects on UMA cards (Avenger, Napalm)
-MESA_FX_IGNORE_PALEXT
-	OS: all
-	HW: all
-	Desc: disable 6666 palette
-MESA_FX_IGNORE_PIXEXT
-	OS: all
-	HW: Napalm
-	Desc: force 565 16bpp mode (traditional Voodoo, no 32/15bpp)
-MESA_FX_IGNORE_TEXFMT
-	OS: all
-	HW: Napalm
-	Desc: disable 32bit textures
-MESA_FX_IGNORE_CMBEXT
-	OS: all
-	HW: Napalm
-	Desc: disable Napalm combiners (color/alpha/texture)
-	Note: this option allows dual-TMU cards perform single-pass
-	      trilinear, but some advanced (multi)texturing modes
-	      won't work (GL_EXT_texture_env_combine)
-MESA_FX_IGNORE_MIREXT
-	OS: all
-	HW: all
-	Desc: disable mirror extension
-MESA_FX_IGNORE_TEXUMA
-	OS: all
-	HW: all
-	Desc: disable UMA
-MESA_FX_IGNORE_TEXUS2
-	OS: all
-	HW: all
-	Desc: disable Texus2
-MESA_FX_MAXLOD
-	OS: all
-	HW: non VSA-100 cards
-	Desc: enable large texture support using SW rescaling
-	Value:
-	    "9"  - 512x512 textures
-	    "10" - 1024x1024 textures
-	    "11" - 2048x2048 textures
-MESA_FX_ALLOW_VP
-	OS: all
-	HW: all
-	Desc: allow vertex program extensions
-MESA_GLX_FX
-	OS: linux
-	HW: Voodoo1, Rush, Voodoo2
-	Desc: display mode
-	Note: (!) experimental
-	Value:
-	    "w" - windowed mode
-	    "f" - fullscreen mode
-	    "d" - disable glide driver
-	OS: win32
-	HW: Rush, Banshee, Avenger, Napalm
-	Desc: display mode
-	Note: (!) experimental
-	Value:
-	    "w" - windowed mode
-
-
-
-Contact:
---------
-
-Daniel Borca <dborca 'at' users 'dot' sourceforge 'dot' net>
-Hiroshi Morii <koolsmoky 'at' users 'dot' sourceforge 'dot' net>
-
-
-
-WARNING! The info below this line is outdated (yet some of it useful). WARNING!
-*******************************************************************************
-
-
-
-Info for Mesa 4.1
------------------
-
-The 3dfx Glide driver in Mesa is disabled by default.  Not too many people
-use this driver anymore and at some point down the road it will be dropped.
-
-To use/enable the Glide driver either do this:
-
-'./configure --with-glide=DIR'    Where DIR is the location of Glide, like
-                                  /usr/ or /usr/local
-
-OR
-
-'make linux-x86-glide'     If using the old-style Makefile system.
-
-The rest of this file hasn't changed since Mesa 3.3.  Some of it's out of
-date, but some is still valid.
-
-
-
-What do you need ?
-------------------
-
-	- A PC with a 3Dfx Voodoo1/2 Graphics or Voodoo Rush based board
-	  (Pure3D, Monster 3D, R3D, Obsidian, Stingray 128/3D, etc.).
-	  The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
-	  under Linux (more information in the "Useful Glide Environment
-	  Variables");
-
-	- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
-	  The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
-	  compatible with the Glide 2.x so it doesn't work with the current
-	  version of the driver;
-
-	- A compiler supported by the Glide library (Micro$oft VC++ (tested),
-	  Watcom (tested), GCC for Linux (tested), etc.);
-
-	- It's nice to have two monitors - one for your normal graphics
-	  card and one for your 3Dfx card. If something goes wrong with
-	  an application using the 3Dfx hardware you can still see your
-	  normal screen in order to recover.
-
-
-
-Tested on:
-----------
-	Windows 95 - David Bucciarelli
-	Windows NT - Henri Fousse
-	MS-DOS
-	Linux - Daryll Strauss, Brian Paul, David Bucciarelli
-	FreeBSD
-	BeOS - Duncan Wilcox
-	MacOS - Fazekas Miklos
-
-
-What is able to do ?
---------------------
-
-	- It is able accelerate points, lines and polygon with flat
-	  shading, gouraud shading, Z-buffer, texture mapping, blending, fog and
-	  antialiasing (when possible). There is also the support for rendering
-	  in a window with a slow trick for the Voodoo Graphics (available only
-	  for Linux) and at full speed with the Voodoo Rush chipset.
-	  Under Linux is also possible to switch on-the-fly between the fullscreen
-	  and in-window rendering hack.
-	  There is also the support for using more than one Voodoo Graphics in the
-	  some application/PC (you can create one context for each board and use
-	  multiple video outputs for driving monitors, videoprojectors or HMDs).
-	  The driver is able to fallback to pure software rendering when afeature
-	  isn't supported by the Voodoo hardware (however software rendering is
-	  very slow compared to hardware supported rendering)
-
-
-
-How to compile:
----------------
-
-Linux:
-------
-	Here are the basic steps for using the 3Dfx hardware with Mesa
-	on Linux:
-
-	- You'll need the Glide library and headers.  Mesa expects:
-		/usr/local/glide/include/*.h        // all the Glide headers
-		/usr/local/glide/lib/libglide2x.so
-
-	  If your Glide libraries and headers are in a different directory
-	  you'll have to modify the Mesa-config and mklib.glide files.
-
-	- Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives;
-
-	- If you're going to use a newer Mesa/Glide driver than v0.27 then
-          unpack the new driver archive over the Mesa directory.
-
-	- In the Mesa-3.1 directory type "make linux-glide"
-
-	- Compilation _should_ finish without errors;
-
-	- Set your LD_LIBRARY_PATH environment variable so that the
-	  libglide2x.so and Mesa library files can be found.  For example:
-	    setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib"
-
-	- You'll have to run Glide-based programs as root or set the suid
-	  bit on executables;
-
-	- Try a demo:
-	    cd gdemos
-	    su
-	    setenv MESA_GLX_FX f
-	    ./gears     (hit ESC to exit)
-
-	- You can find the demos especially designed for the Voodoo driver in
-	  in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile
-	  everything).
-
-MacOS:
-------
-	Check the WEB page at http://valerie.inf.elte.hu/~boga/Mesa.html
-      
-MS Windows:
------------
-
-	For the MSVC++:
-	- The glide2x.lib have to be in the default MSVC++ lib directory;
-
-	- The Glide headers have to be in the default MSVC++ include directory;
-
-	- You must have the vcvars32.bat script in your PATH;
-
-	- Go to the directory Mesa-3.1 and run the mesafx.bat;
-
-	- The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll},
-	  Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and
-          Voodoo demos);
-
-	- At the end, you will be in the Mesa-3.1/3Dfx/demos directory;
-
-	- Try some demo (fire.exe, teapot.exe, etc.) in order to check if
-	  everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between
-	  the Voodoo screen and the windows desktop);
-
-	- Remember to copy the Mesa OpenGL32.dll, GLU32.dll and GLUT32.dll in the
-          some directory were you run your Mesa based applications.
-
-	- I think that you can easy change the Makefile.fx files in order
-	  to work with other kind of compilers;
-
-	- To discover how open the 3Dfx screen, read the sources under
-	  the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or
-          the Diego Picciani's wgl emulator.
-
-	NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the
-	SP3, you could have some problem (you can disable optimization in order
-	solve these kind of problems).
-
-
-Doing more with Mesa & Linux Glide:
------------------------------------
-
-	The MESA_GLX_FX environment variable can be used to coax most
-	GLX-based programs into using Glide (and the __GLUT library
-	is GLX-based__).
-
-        Full-screen 3Dfx rendering:
-        ---------------------------
-
-	1. Set the MESA_GLX_FX variable to "fullscreen":
-
-		ksh:
-			export MESA_GLX_FX = "fullscreen"
-		csh:
-			setenv MESA_GLX_FX fullscreen
-
-	2. As root, run a GLX-based program (any GLUT demo on Linux).
-	
-	3. Be careful:  once the 3Dfx screen appears you won't be able
-	to see the GLUT windows on your X display.  This can make using
-	the mouse tricky!  One solution is to hook up your 3Dfx card to
-	a second monitor.  If you can do this then set these env vars
-	first:
-
-		setenv SST_VGA_PASS 1
-		setenv SST_NOSHUTDOWN
-	
-	or for the Voodoo2:
-
-		setenv SSTV2_VGA_PASS 1
-		setenv SSTV2_NOSHUTDOWN
-
-        Rendering into an X window with the help of the Voodoo hardware:
-        ----------------------------------------------------------------
-
-	1. Start your X server in 16 bpp mode (XFree86:  startx -- -bpp 16)
-	   in order to have the best performance and the best visual
-	   quality. However you can use any visual depth supported by X.
-
-	2. Set the following environment variables:
-		export MESA_GLX_FX="window"	# to enable window rendering
-		export SST_VGA_PASS=1	# to stop video signal switching
-		export SST_NOSHUTDOWN=1	# to stop video signal switching
-	    OR
-		setenv MESA_GLX_FX window
-		setenv SST_VGA_PASS 1
-		setenv SST_NOSHUTDOWN 1
-
-	(the Voodoo2 requires to use "SSTV2_" instead "SST_").
-
-	3. As root, try running a GLX-based program
-
-	How does it work?  We use the 3Dfx hardware to do rendering then
-	copy the image from the 3Dfx frame buffer into an X window when
-	the SwapBuffers() function is called.  The problem with this
-	idea is it's slow.  The image must be copied from the 3Dfx frame
-	buffer to main memory then copied into the X window (and when the X
-	visual depth doesn't match the Voodoo framebufffer bit per pixel, it
-	is required also a pixel format translation).
-
-	NOTE: the in-window rendering feature only works with double-buffering.
-
-
-        On the fly switching between in window rendering and full screen rendering
-	--------------------------------------------------------------------------
-
-	The Mesa 2.6 has introduced the capability of switching
-	on-the-fly between the fullscreen/fullspeed rendering and the in-window
-	hack and vice versa. The on-the-fly switching requires a direct support
-	by the application but it is really easy to add. You have to start
-	your X server in 16 bpp mode and to add the following lines to your
-	application:
-
-		#if defined(FX) && define(XMESA)
-		#include <GL/xmesa.h>
-
-		static int fullscreen=1;
-		#endif
-
-		...
-
-		/* In the GLUT keyboard event callback */
-
-		#if defined(FX) && !define(WIN32)
-		  case ' ':
-		    fullscreen=(!fullscreen);
-		    XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
-		    break;
-		#endif
-		...
-
-       	See the 3Dfx/demos/tunnel.c program
-       	for an example.  You have to set the -DXMESA flag in the Makefile's COPTS
-       	to enable it.
-
-  	Rendering into an X window with the X11 software driver:
-        --------------------------------------------------------
-
-	Set the MESA_GLX_FX variable to "disable" your GLX-based program will use
-	the X11 software driver (the 3Dfx hardware isn't used at all).
-
-
-
-Useful Glide Environment Variables:
------------------------------------
-
-	- To disable the 3Dfx logo, set the FX_GLIDE_NO_SPLASH variable.
-
-	- To disable video signal switching:
-		setenv SST_VGA_PASS 1
-		setenv SST_NOSHUTDOWN
-	  or for the Voodoo2:
-		setenv SSTV2_VGA_PASS 1
-		setenv SSTV2_NOSHUTDOWN
-
-        - To set the default screen refresh rate:
-                setenv SST_SCREENREFRESH=75
-
-          the supported values are 60, 70, 72, 75, 80, 85, 90, 100, 120.
-
-	- To force the Mesa library to swap buffers as fast as possible,
-	  without any vertical blanking synchronization (useful for benchmarks):
-		setenv FX_GLIDE_SWAPINTERVAL 0
-                setenv SST_SWAP_EN_WAIT_ON_VIDSYNC 0
-
-	- You can slight improve the performances of your Voodoo1 board with
-	  the following env. var.:
-		setenv SST_FASTMEM 1
-		setenv SST_PCIRD 1
-		setenv SST_GRXCLK 57
-
-	  (don't use this setting with the Quantum3D 100SB or with any other
-	  SLI configuration: it will hang everything !).
-	  The following setting can be used with the Voodoo2:
-		setenv SSTV2_FASTMEM_RAS_READS=1
-		setenv SSTV2_FASTPCIRD=1
-		setenv SSTV2_GRXCLK=95
-
-	- The Quantum3D Obsidian3D-2 X-24 requires some special env. setting
-	  in order to work under Linux:
-
-		export SSTV2_FT_CLKDEL=5
-		export SSTV2_TF0_CLKDEL=7
-		export SSTV2_TF1_CLKDEL=7
-		export SSTV2_TF2_CLKDEL=7
-		export SSTV2_SLIM_VIN_CLKDEL=3
-		export SSTV2_SLIM_VOUT_CLKDEL=2
-		export SSTV2_SLIS_VIN_CLKDEL=3
-		export SSTV2_SLIS_VOUT_CLKDEL=2
-
-	  (Thanks to Phil Ross for this trick).
-
-
-
-
-The Mesa/Voodoo Environment Variables:
---------------------------------------
-
-	- Only for Windows/Voodoo Rush users, if you define the
-	  env. var. MESA_WGL_FX:
-		export MESA_WGL_FX=fullscreen
-	  you will get fullscreen rendering;
-
-	- Only for Windows/Voodoo Rush users, if you define the
-	  env. var. MESA_WGL_FX:
-		export MESA_WGL_FX=window
-	  you will get window rendering (default value);
-
-	- Only for Linux users, you can find more informations about
-	  the env. var. MESA_GLX_FX in the "Doing more with Mesa & Linux Glide"
-	  section;
-
-	- If you define the env. var. MESA_FX_SWAP_PENDING:
-		export MESA_FX_SWAP_PENDING=4
-	  you will able to set the maximum number of swapbuffers
-	  commands in the Voodoo FIFO after a swapbuffer (default value: 2);
-
-        - If you define the env. var. MESA_FX_INFO:
-		export MESA_FX_INFO=1
-          you will get some useful statistic.
-
-        - If you define the env. var. MESA_FX_NO_SIGNALS:
-		export MESA_FX_NO_SIGNALS=1
-          Mesa/FX will not install atexit() or signal() handlers.
-
-
-
-Know BUGS and Problems:
------------------------
-
-	- fog doesn't work in the right way when using the glDepthRange() function;
-
-	- Maximum texture size: 256x256 (this is an hardware limit);
-
-	- Texture border aren't yet supported;
-
-	- A GL_BLEND in a glTexEnv() is not supported (it is an hardware limit);
-
-        - Use the glBindTexture extension (standard in OpenGL 1.1) for texture
-	  mapping (the old way: glTexImage inside a display list, download
-	  the texture map each time that you call the display list !!!);
-
-	- Stencil buffer and Accumulation buffer are emulated in software (they are not
-	  directly supported by the Hardware);
-
-	- Color index mode not implemented (this is an hardware limit);
-
-	- Thre is an know bug in the Linux Glide library so the in-window-rendering hack
-	  and any other operations that requires to read the Voodoo frame buffer
-	  (like the accumulation buffer support) doesn't work on Voodoo SLI cards.
-
-	- The driver switch to pure software (_slow_) rendering when:
-
-		- Stencil enabled;
-		- Using the Accumulation buffer;
-		- Blend enabled and blend equation != GL_FUNC_ADD_EXT;
-		- Color logic operation enabled and color logic operation != GL_COPY;
-		- Using GL_SEPARATE_SPECULAR_COLOR;
-		- The four values of glColorMask() aren't the some;
-		- Texture 1D or 3D enabled;
-		- Texture function is GL_BLEND;
-		- Using the Multitexture extension with Voodoo cards with only one TMU;
-		- Using the Multitexture extension with Voodoo cards with more than
-		   one TMU, and texture function isn't GL_MODULATE;
-		- Point size is != 1.0 or point params vector != (1.0,0.0,0.0);
-		- Line width != 1.0 or using stipple lines.
-		- Using polygon offset or stipple polygons;
-
-	NOTE: this is list is not yet complete.
-		
-
-Hints and Special Features:
----------------------------
-
-	- Under Linux and with a Voodoo Graphics board, you can use
-	  XMesaSetFXmode(XMESA_FX_FULLSCREEN or XMESA_FX_WINDOW) in order to
-	  switch on the fly between fullscreen rendering and the in-window-rendering
-	  hack.
-
-	- The driver is able to use all the texture memory available: 2/4MB on
-	  Voodoo1 boards and 8MB (!) on high-end Voodoo1 and Voodoo2 boards.
-
-	- Trilinear filtering is fully supported on Voodoo boards with two TMUs
-	  (high-end Voodoo1 boards and Voodoo2 boards). When only one TMU is
-	  available the driver fallback to bilinear filter also if you ask
-	  for trilinear filtering.
-
-        - The Voodoo driver support multiple Voodoo Graphics boards in the
-          some PC. Using this feature, you can write applications that use
-          multiple monitors, videoprojectors or HMDs for the output. See
-	  Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one
-          context for each board.
-
-	- The v0.19 introduces a new powerful texture memory manager: the
-	  texture memory is used as a cache of the set of all defined texture
-	  maps. You can now define several MBs of texture maps also with a 2MB
-	  of texture memory (the texture memory manager will do automatically
-	  all the swap out/swap in
-	  texture memory work). The new texture memory manager has also
-	  solved a lot of other bugs/no specs compliance/problems
-	  related to the texture memory usage.
-
-	- Use triangles and quads strip: they are a LOT faster than sparse
-	  triangles and quads.
-
-	- The Voodoo driver supports the GL_EXT_paletted_texture. it works
-	  only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
-	  is ignored because this is a limitation of the current Glide
-	  version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
-	  a demo of this extension.
-
-	- The Voodoo driver directly supports 3Dfx Global Palette extension.
-	  It was written for GLQuake and I think that it isn't a good idea
-	  to use this extension for any other purpose (it is a trick). See
-	  Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension.
-
-	- The Voodoo driver chooses the screen resolution according to the
-	  requested window size. If you open a 640x480 window, you will get
-	  a 640x480 screen resolution, if you open a 800x600 window, you
-	  will get a 800x600 screen resolution, etc.
-	  Most GLUT demos support the '-geometry' option, so you can choose
-	  the screen resolution: 'tunnel -geometry 800x600'.
-	  Clearly, you Voodoo board must have enough framebuffer RAM (otherwise
-	  the window creation will fail).
-
-	- The glGetString(GL_RENDERER) returns more information
-          about the hardware configuration: "Mesa Glide <version>
-          <Voodoo_Graphics|Voodoo_Rush|UNKNOWN> <num> CARD/<num> FB/
-          <num> TM/<num> TMU/<NOSLI|SLI>"
-          where: <num> CARD is the card used for the current context,
-          <num> FB is the number of MB for the framebuffer,
-          <num> TM is the number of MB for the texture memory,
-          <num> TMU is the number of TMU. You can try to run
-          Mesa/demos/glinfo in order to have an example of the output.
-
-Did you find a lot BUGs and problems ? Good, send me an email.
-
-
-
-FAQ:
-----
-
-For a complete FAQ check the Bernd Kreimeier's Linux 3Dfx HOWTO
-available at http://www.gamers.org/dEngine/xf3D (it includes also
-a lot of informations not strictly related to Linux, so it can be
-useful also if you don't use Linux)
-
-1. What is 3Dfx?
-
-3Dfx Interactive, Inc. is the company which builds the VooDoo 3-D graphics
-chipset (and others) used in popular PC cards such as the Diamond Monster 3D
-and the Orchid Righteous 3D (more informations at http://www.3dfx.com).
-
-
-2. What is Glide?
-
-Glide is a "thin" programming interface for the 3Dfx hardware.  It was
-originally written for Windows/Intel but has been ported to Linux/Intel
-by Daryll Strauss.
-
-3Dfx, Inc. should be applauded for allowing the Linux version of Glide
-to be written.
-
-You can directly program with the Glide library if you wish.  You can
-obtain Glide from the "Developer" section of the 3Dfx website: www.3dfx.com
-There's a Linux/Glide newsgroup at news://news.3dfx.com/3dfx.glide.linux
-
-
-3. What is fxmesa?
-
-"fxmesa" is the name of the Mesa device driver for the 3Dfx Glide library.
-It was written by David Bucciarelli and others.  It works on both Linux
-and Windows.  Basically, it allows you to write and run OpenGL-style programs
-on the 3Dfx hardware.
-
-
-4. What is GLQuake?
-
-Quake is a very popular game from id software, Inc.  See www.idsoftware.com
-GLQuake is a version of Quake written for OpenGL.  There is now a Linux
-version of GLQuake with works with the Mesa/3Dfx/Glide combo.
-
-Here's what you need to run GLQuake on Linux:
-   PC with 100MHz Pentium or better
-   a 3Dfx-based card
-   Mesa 3.1 libraries:  libMesaGL.so  libMesaGLU.so
-   Glide 2.4 libraries:  libglide2x.so  libtexus.so
-   GLQuake for Linux.
-
-Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
-you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory
-in order to test 'MesaQuake'.
-
-
-5. What is GLUT?
-
-GLUT is Mark Kilgard's OpenGL Utility Toolkit.  It provides an API for
-writing portable OpenGL programs with support for multiple windows, pop-
-up menus, event handling, etc.
-
-Check the Mark's home page for more informations (http://reality.sgi.com/mjk_asd).
-
-Every OpenGL programmer should check out GLUT.
-
-GLUT on Linux uses GLX.
-
-
-6. What is GLX?
-
-GLX is the OpenGL extension to the X Window System.  I defines both a
-programming API (glX*() functions) and a network protocol.  Mesa implements
-an emulation of GLX on Linux.  A real GLX implementation would requires
-hooks into the X server.  The 3Dfx hardware can be used with GLX-based
-programs via the MESA_GLX_FX environment variable.
-
-
-7. Is the Voodoo driver able to use the 4Mb texture memory of
-the Pure3D boards ?
-
-Yes, the Voodoo driver v0.20 includes the support for Voodoo
-Graphics boards with more than 2Mb of texture memory.
-
-
-8. Do the Voodoo driver support the Voodoo Rush under Windows ?
-
-Yes, Diego Picciani has developed the support for the Voodoo
-Rush but David Bucciarelli has a Pure3D and a Monster3D and Brian Paul
-has a Monster3D, so the new versions of the Mesa/Voodoo sometime are
-not tested with the Voodoo Rush.
-
-
-9. Do the Voodoo driver support the Voodoo Rush under Linux ?
-
-No because the Linux Glide doesn't (yet) support the Voodoo Rush.
-
-
-10. Can I sell my Mesa/Voodoo based software and include
-a binary copy of the Mesa in order to make the software
-working out of the box ?
-
-Yes.
-
-
-11. Which is the best make target for compiling the Mesa for
-Linux GLQuake ('make linux-glide', 'make linux-386-glide', etc.) ?
-
-'make linux-386-opt-glide' for Voodoo1 and 'make linux-386-opt-V2-glide'
-for Voodoo2 boards because it doesn't include the '-fPIC'
-option (4-5% faster).
-
-
-12. Can I use a Mesa compiled with a 'make linux-386-opt-V2-glide'
-for my applications/programs/demos ?
-
-Yes, there is only one constrain: you can't run two Mesa applications
-at the some time. This isn't a big issue with the today Voodoo Graphics.
-
-
-Thanks to:
-----------
-
-Henri Fousse       (he has written several parts of the v0.15 and the old GLUT
-	            emulator for Win);
-
-Diego Picciani     (he has developed all the Voodoo Rush support and the wgl
-	            emulator);
-
-Daryll Strauss     (for the Linux Glide and the first Linux support);
-
-Brian Paul         (of course);
-
-Dave 'Zoid' Kirsch (for the Linux GLQuake and Linux Quake2test/Q2 ports)
-
-Bernd Kreimeier    (for the Linux 3Dfx HOWTO and for pushing companies to offer
-                    a better Linux support)
-
-3Dfx and Quantum3D (for actively supporting Linux)
-
-The most update places where find Mesa VooDoo driver related informations are
-the Mesa mailing list and my driver WEB page
-(http://www-hmw.caribel.pisa.it/fxmesa/index.shtml)
-
-
-David Bucciarelli (davibu@tin.it)
-
-Humanware s.r.l. 
-Via XXIV Maggio 62
-Pisa, Italy
-Tel./Fax +39-50-554108
-email: info.hmw@plus.it
-www: www-hmw.caribel.pisa.it
diff --git a/docs/README.AMIWIN b/docs/README.AMIWIN
deleted file mode 100644
index 47cf696..0000000
--- a/docs/README.AMIWIN
+++ /dev/null
@@ -1,181 +0,0 @@
-AMIGA AMIWIN PORT of MESA: THE OPENGL SOFTWARE EMULATION
-========================================================
-Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu) 
-Original Author (Brian Paul (brianp@ssec.wisc.edu)
-
-Dec.1 , 1995: Port of release Mesa 1.2.5
- - Modifications made to minimize changes to Mesa distribution.
-
-Nov.25, 1995: Port of release Mesa 1.2.4
-
-
-HISTORY
-=======
-As a 3D graphics progammer, I was increasingly frustrated to see OpenGL 
-appearing on so many platforms EXCEPT the Amiga. Up to now, the task
-of porting OpenGL directly from native Amiga drawing routines seemed like
-a daunting task. However, two important events made this port possible.
-
-First of all, Brian Paul wrote Mesa, the OpenGL software emulator that 
-can be found on many platforms - except the Amiga and Atari (who cares 
-about the latter!). This was pretty ironic considering that Mesa was 
-originally prototyped on an Amiga! The second great event was when 
-Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely 
-register for this great piece of software) and released a development kit
-so one could compile X programs with SAS/C.
-
-Since Mesa had X routines as its primitive drawing operations, this made
-a marriage of Mesa and Amiwin feasible. I copied over the sources from
-an ftp site, played with the code, wrote some Smakefiles, and voila, 
-I had OpenGL programs displaying on my Amiga.
-
-Although the speed is nothing to be impressed about, this port can be
-potentially useful to those who want to quickly test their code in
-wireframe or perhaps learn more about programming with the OpenGL API.
-
-I hope Amiga developers will continue to write excellent software for
-their machine, especially more X clients for Amiwin. If you have any 
-solutions so some of my problems in the porting notes, please send me
-some email!
-
-See you around,
-Vic.
-
-HOW TO CREATE THE LIBRARIES AND SAMPLE CODE
-===========================================
-
-Just run the shell script mklib.amiwin in the mesa directory. This will
-make all the libraries and copy them into the mesa/lib directory. If you
-don't want to compile everything, just go to the desired directory and
-type smake in that directory.
-
-Change any of the variables in the smakefiles as necessary. You will REQUIRE
-the Amiwin development kit to compile these libraries since you need X11.LIB
-and the shareable X libraries. Some examples require the AmiTCP4.0
-net.lib static link library and related header files for unix related
-header files and functions like sleep().
-
-HOW TO USE THE MESA LIBRARIES
-=============================
-
-Study the Smakefiles in the demos, samples and book directories for the
-proper SAS/C options and linkable libraries to use. Basically aux calls
-require Mesaaux.LIB, gl calls require MesaGL.LIB, glu calls MesaGLU.LIB,
-tk calls Mesatk.LIB. There is a preliminary port of MesaGLUT.LIB toolkit
-available in the lib directory with the other Mesa libraries. However, 
-it seems to cause crashes on some of the sample code. Someone else may want
-to attempt a more stable port.
-
-PORTING NOTES TO AMIWIN
-=======================
-
-My strategy of porting was to leave as much of the code untouched as
-possible. I surrounded any amiga specific changes with 
-#ifdef AMIWIN ... #endif or #ifndef AMIWIN ... #endif preprocessor
-symbols. The code  was ported on an Amiga 2000, with Fusion 40 accelerator
-and a Picasso II graphics card. The SAS/C 6.56 compiler was used, with
-the AmiWin 2.16 X development kit.
-
-All compilations were done for a 68040 CPU with 68882 math coprocessor for
-maximum  speed. Please edit the smakefile for other compilers.
-I wrote smakefiles for the directories I ported. I omitted the Windows
-and Widgets directories. The former is for MS Windows and the latter 
-requires Motif, which is not easily available for the Amiga.
-
-Here are the changes I did per directory:
-
-* mesa
-Nov. 25, 1995 v 1.2.4
-  - added a mklib.amiwin shell script that will make all the libraries and
-    sample code for Mesa
-  - created this readme file: readme.AMIGA
-
-* mesa/include
-Dec. 1, 1995 v 1.2.5
-  - added the following to GL/xmesa.h 
-     #ifdef AMIWIN
-     #include <pragmas/xlib_pragmas.h>
-     extern struct Library *XLibBase;
-     #endif
-NET CHANGE: xmesa.h
-
-* mesa/src 
-Nov. 25, 1995 v 1.2.4
-  - added the necessary pragma calls for X functions to the following:
-    xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c 
-    This prevents undefined symbols errors during the linking phase for 
-    X library calls
-  - created smakefile
-Dec.  1, 1995 v 1.2.5
-  - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, 
-    glx.c since they are now defined in include/GL/xmesa.h
-NET CHANGE: smakefile
-   
-* mesa/src-tk
-Nov. 25, 1995 v 1.2.4
-  - added the necessary pragma calls for X functions to the following:
-    private.h
-  - created smakefile
-Dec.  1, 1995 v 1.2.5
-  - removed AMIWIN includes from private.h since it is now defined in
-    include/GL/xmesa.h
-NET CHANGE: smakefile
-
-* mesa/src-glu
-Nov. 25, 1995 v 1.2.4
-  - created smakefile
-NET CHANGE: smakefile
-
-* mesa/src-aux
-Nov. 25, 1995 v 1.2.4
-  - added the necessary pragma calls for X functions to the following:
-    glaux.c
-  - created smakefile
-NET CHANGE: glaux.c, smakefile
-
-* mesa/demos
-Nov. 25, 1995 v 1.2.4
-  - added the necessary pragma calls for X functions to the following:
-    xdemo.c, glxdemo.c, offset.c
-  - created smakefile
-  - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since 
-    they are not part of AmigaDOS.
-Dec.  1, 1995 v 1.2.5
-  - removed AMIWIN defines from xdemo.c, glxdemo.c, offset.c since
-    already defined in include/GL/xmesa.h
-  - modified Smakefile to include header and includes from the AmiTCP4.0
-    net.lib linkable library to provide unix-compatible sys/time.h and
-    the sleep() function
-    - removed AMIWIN defines in xdemo.c since sleep() now defined
-NET CHANGE: smakefile
-
-* mesa/samples
-Nov. 25, 1995 v 1.2.4
-  - added the necessary pragma calls for X functions to the following:
-    oglinfo.c
-  - created smakefile
-  - put #ifndef AMIWIN ... #endif around sleep() in blendxor.c
-  - removed olympic from smakefile targets since <sys/time.h> not defined
-Dec.  1, 1995 v 1.2.5
-  - removed AMIWIN defines from oglinfo.c, since already defined in 
-    include/GL/xmesa.h
-  - modified Smakefile to include header and includes from the AmiTCP4.0
-    net.lib linkable library to provide unix-compatible sys/time.h and
-    the sleep() function
-    - removed AMIWIN defines in blendxor.c for sleep()
-    - added AMIWIN defines around _MACHTEN_ in olympic.c since xrandom()
-      functions are not defined in any libraries
-    - added olympic back into the Smakefile targets
-NET CHANGE: smakefile, olympic.c
-
-* mesa/book
-Nov. 25, 1995 v 1.2.4
-- created smakefile
-- removed accpersp and dof from smakefile targets since the SAS/C compile seems to
-  confuse the near,far variables with near/far memory models.
-NET CHANGE: smakefile
-
-* mesa/windows
-Dec.  1, 1995 v 1.2.5
-- Removed directory to save space since this is only needed for Windows based 
-  machines.
diff --git a/docs/README.BEOS b/docs/README.BEOS
deleted file mode 100644
index efd84e8..0000000
--- a/docs/README.BEOS
+++ /dev/null
@@ -1,136 +0,0 @@
-
-                         Mesa / BeOS Information
-
-
-
-* Introduction
-
-Brian Paul added in Mesa 3.1 a driver for BeOS R4.5 operating system.
-This driver implements a clone of the BGLView class.  This class,
-derived from BView, allows OpenGL rendering into any BeOS window.  His
-driver was updated in Mesa 4.1 and again in version 6.1 by Philippe
-Houdoin, who's maintaining this driver since.
-
-Any application which uses the BGLView should be able to use Mesa
-instead of Be's OpenGL without changing any code.
-
-Since Be's OpenGL implementation (as of R5) is basically just the
-SGI sample implementation, it's pretty slow.  You'll see that Mesa
-is considerably faster.
-
-
-* Source Code
-
-The source code for the driver is in src/mesa/drivers/beos/ directory.
-It's not 100% finished at this time but many GLUT-based demos are
-working.  No optimizations have been made at this time.
-
-
-* Compiling
-
-Since Mesa 6.x, it can be build under BeOS with both the R5 builtin gcc version
-or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS 
-you can find at http://www.bebits.com/app/2157.
-Anyway, keep in mind that to take full advantage of Mesa x86 optimizations, you better
-want to use gcc 2.95.3 or sooner versions...
-
-To build Mesa-powered BeOS libGL.so version, open an Terminal window,
-move to Mesa root folder and type this command:
-
-$ make beos
-
-Note that the "beos" argument is only needed the first time to setup build config.
-Next times, typing "make" will be enough.
-
-When it finishes the Mesa based libGL.so library for
-BeOS will be in the lib/ directory, along libglut.so library.
-Several demo/test programs should have been build too under progs/* folders.
-If it stop when building one of the progs/* programs, you may want to ignore it
-and force make to move on next target by adding the -k make option:
-
-$ cd progs
-$ make -k
-
-To install it as Be's default libGL.so replacement, put it in your 
-/boot/home/config/lib/ directory. All your GL/GLUT apps will use 
-the Mesa based then. 
-
-By default, it build a non-debug version library.
-The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target.
-For PowerPC BeOS flavor, sorry, Mesa don't have ppc (Altivec) optimizations
-yet.
-
-To build a DEBUG version, type instead this :
-
-$ DEBUG=1 make
-
-
-* Example Programs
-
-Look under progs/beos/ for some BGLView-based programs.
-You should find under progs/samples and progs/redbook directories GLUT-based programs too.
-They all should have been compiled along with the Mesa library.
-
-
-* GLUT
-
-A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at 
-http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
-This is the version currently included in Mesa source code, and
-build in lib/libglut.so.
- 
-A previous 3.5 version of this GLUT BeOS port used to be available at
-http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip.
-
-They're special versions of GLUT for the BeOS platform.  I don't
-believe Mark Kilgard's normal GLUT distribution includes BeOS
-support.
-
-
-* Special Features
-
-Mesa's implementation of the BGLView class has an extra member
-function:  CopySubBufferMESA().  It basically works like SwapBuffers()
-but it only copies a sub region from the back buffer to the front
-buffer.  This is a useful optimization for some applications.
-If you use this method in your code be sure that you check at runtime
-that you're actually using Mesa (with glGetString) so you don't
-cause a fatal error when running with Be's OpenGL.
-
-
-* Work Left To Do
-
-- BDirectWindow single buffering support is not implemented yet.
-- Color index mode is not implemented yet.
-- Reading pixels from the front buffer not implemented yet.
-- There is also a BGLScreen class in BeOS for full-screen OpenGL rendering.
-  This should also be implemented for Mesa.
-- Multiple renderers add-ons support, first step toward hardware acceleration
-  support.
-
-* Other contributors to this BeOS port
-
-Jake Hamby                      jhamby <at> anobject <dot> com
-Marcin Konicki                  ahwayakchih <at> neoni <dot> net
-Francois Revol                  revol <at> free <dot> fr
-Nathan Whitehorn                nathanw <at> uchicago <dot> edu
-
-
-* Older BeOS Driver
-
-Mesa 2.6 had an earlier BeOS driver.  It was based on Mesa's Off-screen
-rendering interface, not BGLView.  If you're interested in the older
-driver you should get Mesa 2.6.
-
-
-* BeOS and Glide
-
-Mesa 3.0 supported the 3Dfx/Glide library on Beos.  Download Mesa 3.0
-if interested.  Ideally, the 3Dfx/Glide support should be updated to
-work with the new Mesa 3.1 BGLView implementation.
-
-The Glide library hasn't been updated for BeOS R4 and newer, to my knowledge,
-as of February, 1999.
-
-
-----------------------------------------------------------------------
diff --git a/docs/README.CYGWIN b/docs/README.CYGWIN
deleted file mode 100644
index 58d5af3..0000000
--- a/docs/README.CYGWIN
+++ /dev/null
@@ -1,256 +0,0 @@
-
-                          Mesa Cygwin/X11 Information
-
-
-WARNING
-=======
-
-If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the 
-latest setup.exe from Cygwin the GL (Mesa) libraries and include are already 
-installed in /usr/X11R6. 
-
-The following will explain how to "replace" them.
-
-Installation
-============
-
-How to compile Mesa on Cygwin/X11 systems:
-
-1. Shared libs:
-    type 'make cygwin-sl'.
-
-    When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and 
-    Mesa-x.y/bin directories.
-
-
-2. Static libs:
-    type 'make cygwin-static'.
-    When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
-
-Header and library files:
-   After you've compiled Mesa and tried the demos I recommend the following
-   procedure for "installing" Mesa.
-
-   Copy the Mesa include/GL directory to /usr/X11R6/include:
-	cp -a include/GL /usr/X11R6/include
-
-   Copy the Mesa library files to /usr/X11R6/lib:
-	cp -a lib/* /usr/X11R6ocal/lib
-
-   Copy the Mesa bin files (used by the DLL stuff) to /usr/X11R6/bin:
-	cp -a lib/cyg* /usr/X11R6/bin
-
-Xt/Motif widgets:
-   If you want to use Mesa or OpenGL in your Xt/Motif program you can build
-   the widgets found in either the widgets-mesa or widgets-sgi directories.
-   The former were written for Mesa and the later are the original SGI
-   widgets.  Look in those directories for more information.
-   For the Motif widgets you must have downloaded the lesstif package.
-
-
-Using the library
-=================
-
-Configuration options:
-   The file src/mesa/main/config.h has many parameters which you can adjust
-   such as maximum number of lights, clipping planes, maximum texture size,
-   etc.  In particular, you may want to change DEPTH_BITS from 16 to 32
-   if a 16-bit depth buffer isn't precise enough for your application.
-
-
-Shared libraries:
-   If you compile shared libraries (Win32 DLLS) you may have to set an 
-   environment variable to specify where the Mesa libraries are located.  
-   Set the PATH variable to include /your-dir/Mesa-2.6/bin.   
-   Otherwise, when you try to run a demo it may fail with a message saying 
-   that one or more DLL couldn't be found.
-
-
-Xt/Motif Widgets:
-   Two versions of the Xt/Motif OpenGL drawing area widgets are included:
-
-      widgets-sgi/	SGI's stock widgets
-      widgets-mesa/	Mesa-tuned widgets
-
-   Look in those directories for details
-
-
-Togl:
-   Togl is an OpenGL/Mesa widget for Tcl/Tk.
-   See http://togl.sourceforge.net for more information.
-
-
-
-X Display Modes:
-   Mesa supports RGB(A) rendering into almost any X visual type and depth.
-
-   The glXChooseVisual function tries its best to pick an appropriate visual
-   for the given attribute list.  However, if this doesn't suit your needs
-   you can force Mesa to use any X visual you want (any supported by your
-   X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL
-   environment variables.  When an RGB visual is requested, glXChooseVisual
-   will first look if the MESA_RGB_VISUAL variable is defined.  If so, it
-   will try to use the specified visual.  Similarly, when a color index
-   visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL
-   variable.
-
-   The format of accepted values is:  <visual-class> <depth>
-   Here are some examples:
-
-   using the C-shell:
-	% setenv MESA_RGB_VISUAL "TrueColor 8"		// 8-bit TrueColor
-	% setenv MESA_CI_VISUAL "PseudoColor 12"	// 12-bit PseudoColor
-	% setenv MESA_RGB_VISUAL "PseudoColor 8"	// 8-bit PseudoColor
-
-   using the KornShell:
-	$ export MESA_RGB_VISUAL="TrueColor 8"
-	$ export MESA_CI_VISUAL="PseudoColor 12"
-	$ export MESA_RGB_VISUAL="PseudoColor 8"
-
-
-Double buffering:
-   Mesa can use either an X Pixmap or XImage as the backbuffer when in
-   double buffer mode.  Using GLX, the default is to use an XImage.  The
-   MESA_BACK_BUFFER environment variable can override this.  The valid
-   values for MESA_BACK_BUFFER are:  Pixmap and XImage (only the first
-   letter is checked, case doesn't matter).
-
-   A pixmap is faster when drawing simple lines and polygons while an
-   XImage is faster when Mesa has to do pixel-by-pixel rendering.  If you
-   need depth buffering the XImage will almost surely be faster.  Exper-
-   iment with the MESA_BACK_BUFFER variable to see which is faster for
-   your application.  
-
-
-Colormaps:
-   When using Mesa directly or with GLX, it's up to the application writer
-   to create a window with an appropriate colormap.  The aux, tk, and GLUT
-   toolkits try to minimize colormap "flashing" by sharing colormaps when
-   possible.  Specifically, if the visual and depth of the window matches
-   that of the root window, the root window's colormap will be shared by
-   the Mesa window.  Otherwise, a new, private colormap will be allocated.
-
-   When sharing the root colormap, Mesa may be unable to allocate the colors
-   it needs, resulting in poor color quality.  This can happen when a
-   large number of colorcells in the root colormap are already allocated.
-   To prevent colormap sharing in aux, tk and GLUT, define the environment
-   variable MESA_PRIVATE_CMAP.  The value isn't significant.
-
-
-Gamma correction:
-   To compensate for the nonlinear relationship between pixel values
-   and displayed intensities, there is a gamma correction feature in
-   Mesa.  Some systems, such as Silicon Graphics, support gamma
-   correction in hardware (man gamma) so you won't need to use Mesa's
-   gamma facility.  Other systems, however, may need gamma adjustment
-   to produce images which look correct.  If in the past you thought
-   Mesa's images were too dim, read on.
-
-   Gamma correction is controlled with the MESA_GAMMA environment
-   variable.  Its value is of the form "Gr Gg Gb" or just "G" where
-   Gr is the red gamma value, Gg is the green gamma value, Gb is the
-   blue gamma value and G is one gamma value to use for all three
-   channels.  Each value is a positive real number typically in the
-   range 1.0 to 2.5.  The defaults are all 1.0, effectively disabling
-   gamma correction.  Examples using csh:
-
-	% setenv MESA_GAMMA "2.3 2.2 2.4"	// separate R,G,B values
-	% setenv MESA_GAMMA "2.0"		// same gamma for R,G,B
-
-   The demos/gamma.c program may help you to determine reasonable gamma
-   value for your display.  With correct gamma values, the color intensities
-   displayed in the top row (drawn by dithering) should nearly match those
-   in the bottom row (drawn as grays).
-
-   Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well
-   on HP displays using the HP-ColorRecovery technology.
-
-   Mesa implements gamma correction with a lookup table which translates
-   a "linear" pixel value to a gamma-corrected pixel value.  There is a
-   small performance penalty.  Gamma correction only works in RGB mode.
-   Also be aware that pixel values read back from the frame buffer will
-   not be "un-corrected" so glReadPixels may not return the same data
-   drawn with glDrawPixels.
-
-   For more information about gamma correction see:
-   http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html
-
-
-Overlay Planes
-
-   Overlay planes in the frame buffer are supported by Mesa but require
-   hardware and X server support.  To determine if your X server has
-   overlay support you can test for the SERVER_OVERLAY_VISUALS property:
-
-	xprop -root | grep SERVER_OVERLAY_VISUALS
-
-
-HPCR glClear(GL_COLOR_BUFFER_BIT) dithering
-
-   If you set the MESA_HPCR_CLEAR environment variable then dithering
-   will be used when clearing the color buffer.  This is only applicable
-   to HP systems with the HPCR (Color Recovery) system.
-
-
-Extensions
-==========
-   There are three Mesa-specific GLX extensions at this time.
-
-   GLX_MESA_pixmap_colormap 
-
-      This extension adds the GLX function:
-
-         GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
-                                           Pixmap pixmap, Colormap cmap )
-
-      It is an alternative to the standard glXCreateGLXPixmap() function.
-      Since Mesa supports RGB rendering into any X visual, not just True-
-      Color or DirectColor, Mesa needs colormap information to convert RGB
-      values into pixel values.  An X window carries this information but a
-      pixmap does not.  This function associates a colormap to a GLX pixmap.
-      See the xdemos/glxpixmap.c file for an example of how to use this
-      extension.
-
-   GLX_MESA_release_buffers
-
-      Mesa associates a set of ancillary (depth, accumulation, stencil and
-      alpha) buffers with each X window it draws into.  These ancillary
-      buffers are allocated for each X window the first time the X window
-      is passed to glXMakeCurrent().  Mesa, however, can't detect when an
-      X window has been destroyed in order to free the ancillary buffers.
-
-      The best it can do is to check for recently destroyed windows whenever
-      the client calls the glXCreateContext() or glXDestroyContext()
-      functions.  This may not be sufficient in all situations though.
-
-      The GLX_MESA_release_buffers extension allows a client to explicitly
-      deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
-      just before an X window is destroyed.  For example:
-
-         #ifdef GLX_MESA_release_buffers
-            glXReleaseBuffersMESA( dpy, window );
-         #endif
-         XDestroyWindow( dpy, window );
-
-      This extension is new in Mesa 2.0.
-
-   GLX_MESA_copy_sub_buffer
-
-      This extension adds the glXCopySubBufferMESA() function.  It works
-      like glXSwapBuffers() but only copies a sub-region of the window
-      instead of the whole window.
-
-      This extension is new in Mesa version 2.6
-
-
-
-Summary of X-related environment variables:
-   MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
-   MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
-   MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
-   MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
-   MESA_GAMMA - gamma correction coefficients (X only)
-
-
-----------------------------------------------------------------------
-README.CYGWIN - lassauge April 2004 - based on README.X11
diff --git a/docs/README.DJ b/docs/README.DJ
deleted file mode 100644
index 5f783ac..0000000
--- a/docs/README.DJ
+++ /dev/null
@@ -1,275 +0,0 @@
-			Mesa 6.5 DOS/DJGPP Port v1.8
-			~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
-
-Description:
-~~~~~~~~~~~~
-
-Well, guess what... this is the DOS port of Mesa 6.5, for DJGPP fans... Whoa!
-The driver uses OSMesa to draw off screen, and then blits the buffer.  This is
-not terribly efficient, and has some drawbacks, but saves maintenance costs.
-
-
-
-Legal:
-~~~~~~
-
-Mesa copyright applies.
-
-
-
-Installation:
-~~~~~~~~~~~~~
-
-Unzip and type:
-
-	make -f Makefile.DJ [OPTIONS...]
-
-Available options:
-
-     Environment variables:
-	CPU		optimize for the given processor.
-			default = pentium
-	GLIDE		path to Glide3 SDK; used with FX.
-			default = $(TOP)/glide3
-	FX=1		build for 3dfx Glide3. Note that this disables
-			compilation of most DMesa code and requires fxMesa.
-			As a consequence, you'll need the DJGPP Glide3
-			library to build any application.
-			default = no
-	X86=1		optimize for x86 (if possible, use MMX, SSE, 3DNow).
-			default = no
-
-     Targets:
-	all:		build everything
-	libgl:		build GL
-	libglu:		build GLU
-	libglut:	build GLUT
-	clean:		remove object files
-	realclean:	remove all generated files
-
-
-
-Tested on:
-	Video card:	Radeon 9500
-	DJGPP:		djdev 2.04 + gcc v4.1.0 + make v3.80
-	OS:		DOS, Win98SE, WinXP (using Videoport driver)
-
-
-
-FAQ:
-~~~~
-
-1. Compilation
-
-   Q) `make' barfs and exits because it cannot find some stupid file.
-   A) You need LFN support.
-   A) When compiling for Glide (FX=1), pay attention to Glide path.
-
-   Q) Libraries built OK, but linker complains about `vsnprintf' every time I
-      compile some demo.
-   A) Upgrade to DJGPP 2.04.
-   A) Add `vsnprintf.c' to the CORE_SOURCES in `src/Makefile.DJ' (untested!).
-   A) Patch `src/mesa/main/imports.c' with the following line:
-	#define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg)
-      This hack should be safe in 90% of the cases, but if anything goes wrong,
-      don't come back to me crying.
-
-   Q) `make' complains about DXE3 or something, yet it builds the libraries.
-   A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
-      DJGPP distro, or download the separate package from my web page. Read the
-      DXE3 documentation on how to use them.
-   A) When compiling for Glide (FX=1), make sure `glide3x.dxe' can be found in
-      LD_LIBRARY_PATH (or top `lib' directory).
-
-2. Using Mesa for DJGPP
-
-   Q) Every test I tried crashes badly.
-   A) If you have compiled with SSE and you're running under plain DOS, you
-      have to disable SSE at run-time. See environment variables below.
-
-   Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
-   A) Is that a question? If you have a 3dfx Voodoo (any model), you're
-      lucky (check http://sourceforge.net/projects/glide for the DJGPP port).
-      If you haven't, sorry; everything is done in software.
-
-   Q) I tried to set refresh rate w/ DMesa, but without success.
-   A) Refresh rate control works only for VESA 3.0 and the 3dfx driver (in
-      which case FX_GLIDE_REFRESH will be overwritten if it is defined and
-      is not 0).
-
-   Q) I made a simple application and it does nothing. It exits right away. Not
-      even a blank screen.
-   A) Software drivers (VESA/VGA/NUL) must to be constructed as single-buffered
-      visuals.  However, DMesaSwapBuffers must be called to get any output.
-   A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a
-      lazy programmer and I found that the easiest way to keep buffer handling
-      at peak performance ;-).
-
-   Q) I'm getting a "bad font!" fatal error.
-   A) Always use GLUT_STROKE_* and GLUT_BITMAP_* constants when dealing with
-      GLUT fonts. If you're using `glut.dxe', then make sure GLUT_STROKE_* and
-      GLUT_BITMAP_* are mapped to integer constants, not to the actual font
-      address (same mechanism used for Win32 _DLL).
-
-   Q) What is NUL driver good for, if I don't get any output at all?
-   A) For debugging. The NUL driver is very much like OSMesa. Everything is
-      done just the same as VESA/VGA drivers, only it doesn't touch your video
-      hardware. You can query the actual buffer by issuing:
-	DMesaGetIntegerv(DMESA_GET_BUFFER_ADDR, &buffer);
-      and dump it to a file.
-
-   Q) How do I query for a list of available video modes to choose as a visual?
-   A) This is an ugly hack, for which I'm sure I'll burn in hell.
-      First, query for a list of modes:
-	n = DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, NULL);
-      If `n' is strictly positive, you allocate an array of pointers to a given
-      struct (which is guaranteed to be extended only - not changed in future):
-	struct {
-		int xres, yres;
-		int bpp;
-	} **l = malloc(n * sizeof(void *));
-      Now pass the newly allocated buffer to fill in:
-	DMesaGetIntegerv(DMESA_GET_VIDEO_MODES, (GLint *)l);
-      And collect the info:
-	for (i = 0; i < n; i++) {
-	    printf("%dx%d:%d\n", l[i]->xres, l[i]->yres, l[i]->bpp);
-	}
-
-   Q) The GLUT is incomplete.
-   A) See below.
-
-
-
-libGLUT (the toolkit):
-~~~~~~~~~~~~~~~~~~~~~~
-
-Well, this "skeletal" GLUT implementation was taken from AllegGL project and
-heavily changed. Thanks should go to Bernhard Tschirren, Mark Kilgard, Brian
-Paul and probably others (or probably not ;-). GLUT functionality will be
-extended only on an "as needed" basis.
-
-GLUT talks to hardware via PC_HW package which was put together from various
-pieces I wrote long time ago. It consists from the keyboard, mouse and timer
-drivers.
-
-My keyboard driver used only scancodes; as GLUT requires ASCII values for keys,
-I borrowed the translation tables (and maybe more) from Allegro -- many thanks
-to Shawn Hargreaves et co. Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users)
-will shut down the GLUT engine unconditionally: it will raise SIGINT, which in
-turn will (hopefully) call the destructors, thus cleaning up your/my mess ;-)
-NB: since the DJGPP guys ensured signal handlers won't go beyond program's
-space (and since dynamic modules shall) the SIGINT can't be hooked (well, it
-can, but it is useless), therefore you must live with the 'Exiting due to
-signal SIGINT' message...
-
-The mouse driver is far from complete (lack of drawing, etc), but is enough to
-make almost all the demos work. Supports the CuteMouse WheelAPI.
-
-The timer is pretty versatile for it supports multiple timers with different
-frequencies. While not being the most accurate timer in the known universe, I
-think it's OK. Take this example: you have timer A with a very high rate, and
-then you have timer B with very low rate compared to A; now, A ticks OK, but
-timer B will probably loose precision!
-
-As an addition, stdout and stderr are redirected and dumped upon exit. This
-means that `printf' can be safely called during graphics. A bit of a hack, I
-know, because all messages come in bulk, but I think it's better than nothing.
-"Borrowed" from LIBRHUTI (Robert Hoehne).
-
-Window creating defaults: (0, 0, 300, 300), 16bpp. However, the video mode is
-chosen in such a way that first window will fit. If you need high resolution
-with small windows, set initial position far to the right (or way down); then
-you can move them back to any position right before the main loop.
-
-
-
-Environment variables:
-~~~~~~~~~~~~~~~~~~~~~~
-	DMESA_NULDRV		- (any value) force NUL driver
-	GLUT_FPS		- print frames/second statistics to stderr
-	MESA_NO_SSE		- (any value) safe option under pure DOS
-	DMESA_GLUT_REFRESH	- set vertical screen refresh rate (VESA3)
-	DMESA_GLUT_BPP		- set default bits per pixel (VGA needs 8)
-	DMESA_GLUT_ALPHA	- set default alpha bits (8)
-	DMESA_GLUT_DEPTH	- set default depth bits (16)
-	DMESA_GLUT_STENCIL	- set default stencil bits (8)
-	DMESA_GLUT_ACCUM	- set default accum bits (16)
-
-
-
-History:
-~~~~~~~~
-
-v1.0 (mar-2002)
-	initial release
-
-v1.1 (sep-2002)
-	+ added 3dfx Glide3 support
-	+ added refresh rate control
-	+ added fonts in GLUT
-	* lots of minor changes
-
-v1.2 (nov-2002)
-	* synced w/ Mesa-4.1
-	- removed dmesadxe.h
-
-v1.3 (mar-2003)
-	+ enabled OpenGL 1.4 support
-	+ added MMX clear/blit routines
-	+ enabled SGI's GLU compilation
-	+ added samples makefile
-	+ added new GLUT functions
-	+ added color-index modes
-	+ added Matrox Millennium MGA2064W driver
-	+ added 8bit FakeColor (thanks to Neil Funk)
-	+ added VGA support (to keep Ben Decker happy)
-	! fixed some compilation errors (reported by Chan Kar Heng)
-	* optimized driver for faster callback access... yeah, right :)
-	* overhauled virtual buffer and internal video drivers
-	* better fxMesa integration
-	* revamped GLUT
-	* switched to DXE3
-
-v1.4 (dec-2003)
-	+ enabled GLUT fonts with DXE
-	+ truly added multi-window support in GLUT (for Adrian Woodward)
-	* accomodated makefiles with the new sourcetree
-	* fixed some ALPHA issues
-	* minor changes to PC_HW/timer interface
-	x hacked and slashed the 3dfx driver (w/ help from Hiroshi Morii)
-
-v1.5 (jan-2004)
-	+ added interface to query available "visuals" (GLFW - Marcus Geelnard)
-	+ added GLUT timer callback
-	- removed Matrox Millennium MGA2064W driver
-	x more changes to the 3dfx driver
-
-v1.6 (aug-2004)
-	+ implemented NUL driver
-	+ added DMesaGetProcAddress and glutGetProcAddress
-	* reorganized fxMesa wrapper to handle multiple contexts
-	! fixed a horrible bug in VGA initialization routine
-	! fixed partial clears
-
-v1.7 (???-2005)
-	+ enabled OpenGL 2.0 support
-	+ added support for sw texture compression
-	+ added FreeGLUT specific functions
-	* no more GLX sources in DOS GLUT
-	* made GLUT timer callbacks less accurate but safer
-
-v1.8 (apr-2006)
-	* killed lots of code, the driver is now a front-end to OSMesa
-	* fixed problem with WinNT (http://www.volny.cz/martin.sulak/)
-	- removed 3dfx Glide3 support (temporarily?)
-
-
-
-Contact:
-~~~~~~~~
-
-Name:   Daniel Borca
-E-mail: dborca@users.sourceforge.net
-WWW:    http://www.geocities.com/dborca/
diff --git a/docs/README.GGI b/docs/README.GGI
deleted file mode 100644
index ddb6772..0000000
--- a/docs/README.GGI
+++ /dev/null
@@ -1,26 +0,0 @@
-GGIMesa for LibGGI 2.x
-
-Requirements:
--------------
-LibGGI 2.0 or greater
-
-Installation:
--------------
-To install GGIMesa, follow the instructions in INSTALL.GNU.  If you 
-wish to install GGIGLUT as well, first install GGIMesa and then run
-
-make
-make install (must be root)
-
-in ggi/ggiglut.
-
-Notes:
-------
-
-* Set the environment variables GGIMESA_DEBUG and/or GGIGLUT_DEBUG 
-to 255 to see lots of debugging output.
-
-* GGIGLUT contains support for all of the GLUT 3.6 API except for the
-high-level primitive drawing functions, but many of the functions (in
-particular the menu drawing functions) are just stubs.
-
diff --git a/docs/README.LYNXOS b/docs/README.LYNXOS
deleted file mode 100644
index e3ab980..0000000
--- a/docs/README.LYNXOS
+++ /dev/null
@@ -1,64 +0,0 @@
-
-Mesa 3.0 for LynxOS builds in the following way:
-
-make lynxos
-
-This will build all the libraries and demo applications. You should have 
-around 400 megabytes free for everything since everything is done with 
-static
-libraries.
-
-Before using this make file however, you should perform the following 
-actions:
-0) cd to the Mesa-3.0 directory
-1) Copy the GL directory under the include directory to /usr/include.
-2) Copy the files in the lib directory to /lib.
-3) Make links so that the Mesa libraries look like ordinary OpenGL 
-libraries
-in /lib. This is important for compatibility with other OpenGL apps. This
-is done as follows:
-
-cd /lib
-ln -s libMesaGL.a libGL.a
-ln -s libMesaGLU.a libGLU.a
-
-Mesa 3.0 includes the GLUT (GL Utility Toolkit) by default.
-The demo applications are done using this toolkit.
-
-Mesa makefiles for building their apps could be used as well, but the
-following one is much more concise. Note that the order of the X libraries
-is important to the linker so that all symbols get resolved correctly.
-Changing the order may result in having to list a library twice to make
-sure all linkages are made correctly.
-
-----cut here for Makefile -----
-
-FILES = your_app.x
-
-SPECIAL_INCLUDES = -I/usr/include/GL
-
-SPECIAL_CFLAGS = -g  -ansi -pedantic -funroll-loops -ffast-math -DSHM
-
-SPECIAL_LIBS = -lglut -lGLU -lGL -lm -L/usr/X11/lib -lXext -lXmu -lXi \
--lX11 -lbsd -g
-
-STANDARD_OFILES = $(FILES:.x=.o)
-
-%.o: %.c
-	gcc -c $(SPECIAL_CFLAGS) $(SPECIAL_INCLUDES) $< -o $@
-
-all: $(STANDARD_OFILES)
-	gcc -o your_app $(STANDARD_OFILES) $(SPECIAL_LIBS)
-
-
-----cut here for Makefile-----
-
-I have tested Mesa under LynxOS 3.0 and 3.01. It should build fine under 
-other
-versions as well. Note, however, that LynxOS versions prior to 3.0 are not
-binary compatible, so you will have to rebuild from source.
-
-
-Vik Sohal
-vik@lynx.com
-January 13, 1999
diff --git a/docs/README.MINGW32 b/docs/README.MINGW32
deleted file mode 100644
index 9477b2b..0000000
--- a/docs/README.MINGW32
+++ /dev/null
@@ -1,153 +0,0 @@
-			     Mesa 6.1 for MinGW32
-			     ~~~~~~~~~~~~~~~~~~~~
-
-
-
-Quick & dirty start:
---------------------
-
-	mingw32-make -f Makefile.mgw [OPTIONS...]
-
-   Look into the corresponding makefiles for further information.
-   Check README.3DFX to find out how to compile Mesa Glide3 driver
-   with MinGW32!
-
-
-
-*******************************************************************************
-The Mingw port for Mesa 3-D Graphics Library was created August 30, 1998 by Paul Garceau.
-
-Updated January 13, 2000; June 3, 2005 -- Paul Garceau <pgarceau@users.sourceforge.net>
-
-DISCLAIMER:  I make this port of the Mesa 3-D Graphics Library as a service
-to the general public.  I can, in no way support or make any guarantee that the
-build will work for your system.
-
-Acknowledgements:
-
-	Daniel Borca, whose work and commitment to maintaining the Mingw port of the Mesa 3-D Graphics Library has been, and will continue to be greatly appreciated by an overworked and underpaid developer such as myself.
-	Without the creative inspiration and personal commitment provided by Mumit Khan, Jan-Jaap Vanderhagen and Colin Peters, Mingw would never have existed.  	Acknowledgements also need to be given to all of the developers who have worked on Mingw, Mesa and Msys over the years.
-	Last, but certainly far from the least, Brian Paul, who has dedicated at least the last seven or eight years of his life to making Mesa 3-D Graphics Library what it is today and managing the development for all of those years.
-*********************************************************************************
-
-Greetings,
-
-	Feel free to modify or change things related to the Mingw build as you see fit, just remember that, the author of the current build may not be able to support any modifications you might want to make to the files which have been included for the build.
-
-Mesa core components are licensed under XFree-86 (for more on licensing of Mesa 3-D Graphics Library, check out the Mesa homepage (http://www.mesa3d.org).
-
-The Mingw generated libraries themselves are licensed under the GNU-LGPL license.  Source code for Mingw can be found at http://www.mingw.org.  For licensing terms on Mingw, please visit http://www.mingw.org.
-
-	It is recommended that you use the latest "stable" release of Mingw.  "Candidates" are beta testing distributions for Mingw.  Mingw is available at http://www.mingw.org.
-
-	This build has been tested under WinNT4/SP6.  Win9x and WinNT5 remain untested by me.  I have not tested any of the demos included with Mesa3d.
-
-Installation:
-
-	This readme assumes that you already have extracted the necessary files to a working directory/folder that Mingw can use to build the Mesa3D libraries and that you know where that directory/folder is located on your Windows system.  If you have any questions about how to set things up properly which is specific to Mesa3D, the folks on the Mesa3D mailing lists (http://www.mesa3d.org) would probably be happy to assist you.  Also you can probably ask anyone on the Mingw mailing lists for any questions specific to Mingw (http://www.mingw.org)
-
-Targets and Environment variables used for Mingw build:
-
-	Before going into the actual build of the libraries, here is a list of available targets for the make process:
-
-	"all" or "libgl"  -- this target will build libopengl.a, a static library.  It will not build the demos, etc.
-
-	clean -- this target will clean up most of the Mesa 3-D Graphics Library/object code from your hard drive.
-
-	realclean -- this target will clean up all of the Mesa 3D Graphics Library and the Mesa object code that it can find.
-
-	Environment Variables:
-
-	The environment variables are used to determine what sort of graphics driver support needs to be included in the finished Mesa 3-D Graphics Library.
-
-	GLIDE		path to Glide3 SDK; used with FX.
-			default = $(TOP)/glide3
-	FX=1		build for 3dfx Glide3. Note that this disables
-			compilation of most WMesa code and requires fxMesa.
-			As a consequence, you'll need the Win32 Glide3
-			library to build any application.
-			default = no
-	ICD=1		build the installable client driver interface
-			(windows opengl driver interface)
-			default = no
-	X86=1		optimize for x86 (if possible, use MMX, SSE, 3DNow).
-			default = no
-
-	
-Running the Build:
-
-	Launch Mingw.
-	From the Windows Command Prompt:
-	Set Environment Variables (as needed).
-	"cd" to your Mesa3D 'root' directory.
-	Enter "mingw32-make -f makefile.mgw <target>
-
-	That's all there is to it.
-
-	Enjoy!
-
-		Paul G. <pgarceau@users.sourceforge.net>
-		Daniel Borca <dborca@users.sourceforge.net>
-
-
-
-******This section is added by Heromyth <zxpmyth@yahoo.com.cn>*************
-
-====================
-Updated on 2007-7-21
-====================
-
-Notice:
-	1) The generated DLLs are *not* compatible with the ones built
-with the other compilers like VC8, especially for GLUT. 
-
-	2) Although more tests are needed, it can be used individually!
-
-	3) You can set the options about whether using STDCALL to build MESA. The 
-config file is <Mesa3D-root>\configs\config.mgw. The default setting is that:
-		ALL_USING_STDCALL = 1
-, which means using STDCALL to build MESA. 
-
-	4) Of course, you can MESA without using STDCALL,I like this:) 
-The setting is :
-		ALL_USING_STDCALL = 0
-To do this, however, you must modify wingdi.h which is in MingW's include dir. 
-For example, run:
-	notepad	C:\MingW\include\wingdi.h
-, and delete all the lines where all the wgl*() functions are. Because they would 
-be conflicted with the ones in <Mesa3D-root>\include\GL\mesa_wgl.h.
-
->>>>>>>>>> Conflicted Functions List >>>>>>>>>>
-WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
-WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
-WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,int);
-WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
-WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
-WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
-WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
-WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
-WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
-WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
-WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
-WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
-WINGDIAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC);
-WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
-WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
-WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
-WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
-====================
-Updated on 2007-7-22
-====================
-	I havn't thought that I would find a better way to solve my problems so soon. 
-I changed the method in which the import-libs and DLLs are made. After this update,
-the DLLs of MESA are more optimized and more compatible. 
-	It seems that there is no need to keep the building way of 'NO-STDCALL'.The 
-way of USING_STDCALL is so nice! The file <Mesa3D-root>\configs\config.mgw is 
-also not needed, and can be deleted safely!
-	
-
-
-*********************************************************************************
\ No newline at end of file
diff --git a/docs/README.MITS b/docs/README.MITS
deleted file mode 100644
index a89176a..0000000
--- a/docs/README.MITS
+++ /dev/null
@@ -1,102 +0,0 @@
-
-			Mesa 3.0 MITS Information
-
-
-This software is distributed under the terms of the GNU Library
-General Public License, see the LICENSE file for details.
-
-
-This document is a preliminary introduction to help you get
-started. For more detaile information consult the web page.
-
-http://10-dencies.zkm.de/~mesa/
-
-
-
-Version 0.1 (Yes it's very alpha code so be warned!)
-Contributors: 
-  Emil Briggs    	(briggs@bucky.physics.ncsu.edu)
-  David Bucciarelli 	(tech.hmw@plus.it)
-  Andreas Schiffler 	(schiffler@zkm.de)
-
-
-
-1. Requirements:
-     Mesa 3.0.
-     An SMP capable machine running Linux 2.x
-     libpthread installed on your machine.
-
-
-2. What does MITS stand for?
-     MITS stands for Mesa Internal Threading System. By adding
-     internal threading to Mesa it should be possible to improve
-     performance of OpenGL applications on SMP machines.
-
-
-3. Do applications have to be recoded to take advantage of MITS?
-     No. The threading is internal to Mesa and transparent to
-     applications.
-
-
-4. Will all applications benefit from the current implementation of MITS?
-     No. This implementation splits the processing of the vertex buffer
-     over two threads. There is a certain amount of overhead involved
-     with the thread synchronization and if there is not enough work
-     to be done the extra overhead outweighs any speedup from using
-     dual processors. You will not for example see any speedup when
-     running Quake because it uses GL_POLYGON and there is only one
-     polygon for each vertex buffer processed. Test results on a
-     dual 200 Mhz. Pentium Pro system show that one needs around
-     100-200 vertices in the vertex buffer before any there is any
-     appreciable benefit from the threading.
-
-
-5. Are there any parameters that I can tune to try to improve performance.
-     Yes. You can try to vary the size of the vertex buffer which is
-     define in VB_MAX located in the file src/vb.h from your top level
-     Mesa distribution. The number needs to be a multiple of 12 and
-     the optimum value will probably depend on the capabilities of
-     your machine and the particular application you are running.
-
-
-6. Are there any ways I can modify the application to improve its
-   performance with the MITS?
-     Yes. Try to use as many vertices between each Begin/End pair
-     as possbile. This will reduce the thread synchronization
-     overhead.
-
-
-7. What sort of speedups can I expect?
-     On some benchmarks performance gains of up to 30% have been
-     observerd. Others may see no gain at all and in a few rare
-     cases even some degradation.
-
-
-8. What still needs to be done?
-     Lots of testing and benchmarking.
-     A portable implementation that works within the Mesa thread API.
-     Threading of additional areas of Mesa to improve performance
-     even more.
-
-
-
-Installation:
-
-   1. This assumes that you already have a working Mesa 3.0 installation
-      from source.
-   2. Place the tarball MITS.tar.gz in your top level Mesa directory.
-   3. Unzip it and untar it. It will replace the following files in
-      your Mesa source tree so back them up if you want to save them.
-
-
-	 README.MITS
-         Make-config
-	 Makefile
-	 mklib.glide
-         src/vbxform.c
-	 src/vb.h
-
-   4. Rebuild Mesa using the command
-
-          make linux-386-glide-mits
-
diff --git a/docs/README.NeXT b/docs/README.NeXT
deleted file mode 100644
index 1ad9a9e..0000000
--- a/docs/README.NeXT
+++ /dev/null
@@ -1,6 +0,0 @@
-The NeXT support has now been incorporated into the OpenStep support.
-You can build NeXT libraries simply by typing "make next", though before
-linking they will need to be ranlib'd by hand. For more information see
-the README.OpenStep file, together with the README files in OpenStep/Old_Demos.
-
--Pete French. (pete@ohm.york.ac.uk) 28/5/1998
diff --git a/docs/README.OS2 b/docs/README.OS2
deleted file mode 100644
index b3374ea..0000000
--- a/docs/README.OS2
+++ /dev/null
@@ -1,96 +0,0 @@
-            README for port of Mesa 3.x to XFree86 on OS/2 (X/2)
-                          (as of 19990514)
-
-
-                           Contents:
-
-                           1) Binary release
-                           2) Building from sources
-                           3) History
-                           4) Todo
-                           5) Mesa Home Page
-
-
-1) Binary release
-
-   Though the Mesa sources should build in a quite reasonable time even on
-   a 585 class machine a binary relase is available (check topic 4) for an URL)
-   This package includes:
-
-     - lib/MesaGL.dll,  MesaGL.a
-     - lib/MesaGLU.dll, MesaGLU.a
-     - lib/glut.dll,    glut.a
-     - include/GL/*.h
-
-    Installing this in your XFree86 tree will enable you to build and
-    run all applications compatible with Mesa (and the current DLL
-    interface, of course ;-)
-    As usual the OMF-style libraries can be created using emxomf.
-    (e.g. "emxomf foo.a"  creates the foo.lib omf-style library).
-    The static libraries are rarely used and you have to rebuild
-    Mesa to get them. They're a supported target, so you get
-    them in a straightforward way (see below).
-
-    The testing of these libraries was limited to the supplied
-    demos/examples and a quite small number of third-party apps.
-    No warranty ... as usual ...  ;-)
-
-
-2)  Instructions to build Mesa 3.x for XFree86/OS2 from sources:
-
-    Except the official Mesa source distribution you need:
-      - a recent version of XFree86 (3.3.x or above) including
-        the programming libraries
-      - EMX 0.9c (0.9d might work, never checked)
-      - GNU make
-      - REXX (!)
-
-    The creation of the DLLs as well as of the static libraries
-    (if you want to have them) is handled in "mklib-emx.cmd",
-    a small REXX script. Perhaps not the best idea, but this
-    way it fits best in the scheme used to build libraries
-    on all platforms in Mesa 3.x.
-
-    To actually build the libraries and demos, check mklib-emx.cmd
-    and modify it as desired. Then type
-      make os2-x11
-    and wait for completion ;-)
-
-
-3)  History
-
-    Initially Darren Abbott (abbott@hiwaay.net) ported Mesa versions 2.x
-    to XFree86 OS/2. This port might still be available from 
-       http://fly.HiWAAY.net/~abbott/xfree86-os2/xfree86.html
-
-    The current port picked up things during the beta test for 3.0. 
-    No major changes in the source were done. The build mechanism under OS/2
-    has been made very similar to other platforms (if you treat mklib-emx.cmd
-    as a "black box").
-    Advantage is that X/2 is now a valid target and all files are
-    integrated in the official source distribution.
-    Disadvantage is that this port (i.e. the DLLs' interface itself) is
-    definitly NOT COMPATIBLE to those of version 2.x. 
-    It's uncertain whether this would be at all possible but since there
-    a _very_ few those apps it's not worth to find out anyway.
-    Also some libs (MesaTK, MesaAUX) are withdrawn from the Mesa distribution,
-    and accordingly from the OS/2 port.
-
-4) Todo
-
-    By now binary compatiblity is ensured by using the function names
-    as entry points instead of ordinals. This might cost performance and
-    is subject to change in future. In addition the supplied X86 assembler
-    source is not used yet.
-
-5)  Mesa Home Page
-
-    You can get the source code and more information about Mesa from
-       http://www.mesa3d.org/
-
-    The OS/2 ports should be available from
-       http://r350.ee.ntu.edu.tw/~hcchu/os2/ports 
-
---
-Alexander Mai
-st002279@hrzpub.tu-darmstadt.de
diff --git a/docs/README.OpenStep b/docs/README.OpenStep
deleted file mode 100644
index a566eca..0000000
--- a/docs/README.OpenStep
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a port of the GL and GLU libraries to NeXT/Apple object
-orientated systems. As these systems have their own window handling
-systems we simply use the offscreen rendering capability of Mesa
-to generate bitmaps which may then be displayed by the application
-with a View as required. Example pieces of code may be found in the
-OpenStep directory.
-
-Sadly there are now a proliferation of different system that we need to
-support compilation for: The original NextStep system, The OpenStep
-system, the Rhapsody/Mac OS X system and also the windows implementations
-of the latter two systems. This version of the code has been compiled and
-tested under the following architectures:
-
-	NextStep 3.3 
-	OpenStep 4.2
-	Rhapsody DR2
-	WebObjects for NT 3.5
-	WebObjects for NT 4.0
-
-All tests were done with Intel processors. Feedback on other systems would,
-however, be appreciated !
-
-On UNIX systems simply type "make openstep". Under Windows systems
-with WebObjects run the "win32-openstep.sh" script from within the Bourne
-shell provided with the development environment. In both cases this will
-build the libraries and place them into the "lib" directory. Some examples
-may be found in the OpenStep directory showing how to use the code in an
-actual application (MesaView) as well as some command line demos.
-
-The CC variable may be specified on the command line for doing such things
-as building FFAT libraries or using alternative compilers to the standard 'cc'
-e.g.  make CC='cc -arch m68k -arch i386' openstep" will build the libraries
-with both intel and motorola architectures.
-
--Pete French. (pete@ohm.york.ac.uk) 7/6/1999
diff --git a/docs/README.QUAKE b/docs/README.QUAKE
deleted file mode 100644
index e90c76a..0000000
--- a/docs/README.QUAKE
+++ /dev/null
@@ -1,207 +0,0 @@
-
-             Info on using Mesa 3.0 with Linux Quake I and Quake II
-
-
-
-Disclaimer
-----------
-
-I am _not_ a Quake expert by any means.  I pretty much only run it to
-test Mesa.  There have been a lot of questions about Linux Quake and
-Mesa so I'm trying to provide some useful info here.  If this file
-doesn't help you then you should look elsewhere for help.  The Mesa
-mailing list or the news://news.3dfx.com/3dfx.linux.glide newsgroup
-might be good.
-
-Again, all the information I have is in this file.  Please don't email
-me with questions.
-
-If you have information to contribute to this file please send it to
-me at brianp@elastic.avid.com
-
-
-
-Linux Quake
------------
-
-You can get Linux Quake from http://www.idsoftware.com/
-
-Quake I and II for Linux were tested with, and include, Mesa 2.6.  You
-shouldn't have too many problems if you simply follow the instructions
-in the Quake distribution.
-
-
-
-RedHat 5.0 Linux problems
--------------------------
-
-RedHat Linux 5.x uses the GNU C library ("glibc" or "libc6") whereas
-previous RedHat and other Linux distributions use "libc5" for its
-runtime C library.
-
-Linux Quake I and II were compiled for libc5.  If you compile Mesa
-on a RedHat 5.x system the resulting libMesaGL.so file will not work
-with Linux Quake because of the different C runtime libraries.
-The symptom of this is a segmentation fault soon after starting Quake.
-
-If you want to use a newer version of Mesa (like 3.x) with Quake on
-RedHat 5.x then read on.
-
-The solution to the C library problem is to force Mesa to use libc5.
-libc5 is in /usr/i486-linux-libc5/lib on RedHat 5.x systems.
-
-Emil Briggs (briggs@tick.physics.ncsu.edu) nicely gave me the following
-info:
-
->   I only know what works on a RedHat 5.0 distribution. RH5 includes
-> a full set of libraries for both libc5 and glibc. The loader ld.so
-> uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs
-> linked against libc5 while it uses the glibc libraries in /lib and
-> /usr/lib for programs linked against glibc.
-> 
-> Anyway I changed line 41 of mklib.glide to
->     GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib"
-> 
-> And I started quake2 up with a script like this
-> #!/bin/csh
-> setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib
-> setenv MESA_GLX_FX f
-> ./quake2 +set vid_ref gl
-> kbd_mode -a
-> reset
-
-
-I've already patched the mklib.glide file.  You'll have to start Quake
-with the script shown above though.
-
-
-
-**********************
-
-Daryll Strauss writes:
-
-Here's my thoughts on the problem. On a RH 5.x system, you can NOT build
-a libc5 executable or library. Red Hat just doesn't include the right
-stuff to do it.
-
-Since Quake is a libc5 based application, you are in trouble. You need
-libc5 libraries.
-
-What can you do about it? Well there's a package called gcc5 that does
-MOST of the right stuff to compile with libc5. (It brings back older
-header files, makes appropriate symbolic links for libraries, and sets
-up the compiler to use the correct directories) You can find gcc5 here: 
-ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm
-
-No, this isn't quite enough. There are still a few tricks to getting
-Mesa to compile as a libc5 application. First you have to make sure that
-every compile uses gcc5 instead of gcc. Second, in some cases the link
-line actually lists -L/usr/lib which breaks gcc5 (because it forces you
-to use the glibc version of things)
-
-If you get all the stuff correctly compiled with gcc5 it should work.
-I've run Mesa 3.0B6  and its demos in a window with my Rush on a Red Hat
-5.1 system. It is a big hassle, but it can be done. I've only made Quake
-segfault, but I think that's from my libRush using the wrong libc. 
-
-Yes, mixing libc5 and glibc is a major pain. I've been working to get
-all my libraries compiling correctly with this setup. Someone should
-make an RPM out of it and feed changes back to Brian once they get it
-all working. If no one else has done so by the time I get the rest of my
-stuff straightened out, I'll try to do it myself.
-
-							- |Daryll
-
-
-
-*********************
-
-David Bucciarelli (tech.hmw@plus.it) writes:
-
-I'm using the Mesa-3.0beta7 and the RedHat 5.1 and QuakeII is
-working fine for me.  I had only to make a small change to the
-Mesa-3.0/mklib.glide file, from:
-
-
-    GLIDELIBS="-L/usr/local/glide/lib -lglide2x
--L/usr/i486-linux-libc5/lib -lm"
-
-to:
-
-    GLIDELIBS="-L/usr/i486-linux-libc5/lib -lglide2x"
-
-and to make two symbolic links:
-
-[david@localhost Mesa]$ ln -s libMesaGL.so libMesaGL.so.2
-[david@localhost Mesa]$ ln -s libMesaGLU.so libMesaGLU.so.2
-
-I'm using the Daryll's Linux glide rpm for the Voodoo2 and glibc (it
-includes also the Glide for the libc5). I'm not using the /dev/3Dfx and
-running QuakeII as root with the following env. var:
-
-export
-LD_LIBRARY_PATH=/dsk1/home/david/src/gl/Mesa/lib:/usr/i486-linux-libc5/lib
-
-I think that all problems are related to the glibc, Quake will never
-work if you get the following output:
-
-[david@localhost Mesa]$ ldd lib/libMesaGL.so
-        libglide2x.so => /usr/lib/libglide2x.so (0x400f8000)
-        libm.so.6 => /lib/libm.so.6 (0x40244000)
-        libc.so.6 => /lib/libc.so.6 (0x4025d000)
-        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
-
-You must get the following outputs:
-
-[david@localhost Mesa]# ldd lib/libMesaGL.so
-        libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so
-(0x400f3000)
-
-[root@localhost quake2]# ldd quake2
-        libdl.so.1 => /lib/libdl.so.1 (0x40005000)
-        libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x40008000)
-        libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40010000)
-
-[root@localhost quake2]# ldd ref_gl.so
-        libMesaGL.so.2 =>
-/dsk1/home/david/src/gl/Mesa/lib/libMesaGL.so.2 (0x400eb000)
-        libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so
-(0x401d9000)
-        libX11.so.6 => /usr/i486-linux-libc5/lib/libX11.so.6
-(0x40324000)
-        libXext.so.6 => /usr/i486-linux-libc5/lib/libXext.so.6
-(0x403b7000)
-        libvga.so.1 => /usr/i486-linux-libc5/lib/libvga.so.1
-(0x403c1000)
-        libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x403f5000)
-        libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x403fd000)
-
-
-***********************
-
-Steve Davies (steve@one47.demon.co.uk) writes:
-
-
-Try using:
-
-    export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib
-    ./quake2 +set vid_ref gl
-
-to start the game... Works for me, but assumes that you have the
-compatability libc5 RPMs installed.
-
-
-***************************
-
-WWW resources - you may find additional Linux Quake help at these URLs:
-
-
-http://quake.medina.net/howto
-
-http://webpages.mr.net/bobz
-
-http://www.linuxgames.com/quake2/
-
-
-
-----------------------------------------------------------------------
diff --git a/docs/README.THREADS b/docs/README.THREADS
deleted file mode 100644
index fb6e0ff..0000000
--- a/docs/README.THREADS
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-Mesa Threads README
--------------------
-
-Thread safety was introduced in Mesa 2.6 by John Stone and
-Christoph Poliwoda.
-
-It was redesigned in Mesa 3.3 so that thread safety is
-supported by default (on systems which support threads,
-that is).  There is no measurable penalty on single
-threaded applications.
-
-NOTE that the only _driver_ which is thread safe at this time
-is the OS/Mesa driver!
-
-
-At present the mthreads code supports three thread APIS:
-  1) POSIX threads (aka pthreads).
-  2) Solaris / Unix International threads.
-  3) Win32 threads (Win 95/NT).
-
-Support for other thread libraries can be added src/glthread.[ch]
-
-
-In order to guarantee proper operation, it is
-necessary for both Mesa and application code to use the same threads API.
-So, if your application uses Sun's thread API, then you should build Mesa
-using one of the targets for Sun threads.
-
-The mtdemos directory contains some example programs which use 
-multiple threads to render to osmesa rendering context(s).
-
-Linux users should be aware that there exist many different POSIX
-threads packages. The best solution is the linuxthreads package
-(http://pauillac.inria.fr/~xleroy/linuxthreads/) as this package is the
-only one that really supports multiprocessor machines (AFAIK). See
-http://pauillac.inria.fr/~xleroy/linuxthreads/README for further
-information about the usage of linuxthreads.
-
-If you are interested in helping with thread safety work in Mesa
-join the Mesa developers mailing list and post your proposal.
-
-
-Regards,
-  John Stone           -- j.stone@acm.org  johns@cs.umr.edu
-  Christoph Poliwoda   -- poliwoda@volumegraphics.com
-
-
-Version info:
-   Mesa 2.6 - initial thread support.
-   Mesa 3.3 - thread support mostly rewritten (Brian Paul)
diff --git a/docs/README.VMS b/docs/README.VMS
deleted file mode 100644
index 6b02909..0000000
--- a/docs/README.VMS
+++ /dev/null
@@ -1,38 +0,0 @@
-
-VMS support contributed by Jouk Jansen (joukj@hrem.stm.tudelft.nl)
-
-
-The latest version was tested on a VMSAlpha7.2 system using DECC6.0, but
-probably also works for other versions.
-
-At the moment only the libraries LIBMESGL.EXE/LIBMESGL.OLB,
-LIBMESAGLU.EXE/LIBMESAGLU.OLB and LIBGLUT.EXE/LIBGLUT.OLB and the demos of the
-directory [.DEMOS] can be build.
-However, feel free to create the missing "decrip.mms-files" in the other
-directories.
-
- The make files were tested
-using the DIGITAL make utility called MMS.  There is also a public domain
-clone available (MMK) and I  think, but it is not tested, that this
-utility will give (hardly) any problem.
-
-To make everything just type MMS (or MMK) in the main directory of
-mesagl.  For MMS the deafult makefile is called descrip.mms, and
-that is what I have called it.  I included alse some config files,
-all having mms somewhere in the name which all the makefiles need
-(just as your unix makefiles).
-
-On Alpha platforms at default a sharable images for the libraries are created.
-To get a static library make it by typing MMS/MACRO=(NOSHARE=1).
-On VAX platforms only static libraries can be build.
-
-23-sep-2005
-changed default compilation to use /float=ieee/ieee=denorm. The reason for 
-this is that it makes Mesa on OpenVMS better compatible with other platforms
-and other packages for VMS that I maintain.
-For more information see
-      http://nchrem.tnw.tudelft.nl/openvms
-      https://bugs.freedesktop.org/show_bug.cgi?id=4270
-You may want to compile Mesa to use VAX-floating point arithmetic, instead
-of IEEE floating point by removing the /float=IEEE/denorm flag from the
-compiler options in the descrip.mms files.
diff --git a/docs/README.WIN32 b/docs/README.WIN32
deleted file mode 100644
index 204b8e6..0000000
--- a/docs/README.WIN32
+++ /dev/null
@@ -1,140 +0,0 @@
-File: docs/README.WIN32
-
-Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
-
-Quick Start
------ -----
-
-Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
-directory.  The libs and demos build separately, so if you do not care
-about the demos or GLUT, you only need to unzip MesaLib.  If you unzip
-more than one ZIP file, they all need to be unzipped into the same
-directory.  Don't worry, you will not overwrite anything.
-
-The Windows build system uses Microsoft Visual Studio.  Project files
-for a specific version of Visual Studio are in their own directory in
-the top-level "windows" directory.  For example, Visual Studio 8 files
-are in windows/VC8.
-
-Support has been dropped for versions of Visual Studio prior to 8. The
-main reason is because Microsoft now provides a free compiler and
-developer environment.  Visual Studio Express can be found at
-
-http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
-
-You'll also need the Platform SDK.  Instructions for obtaining and
-using the SDK with Visual Studio Express can be found at
-
-http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
-
-The project files to build the core Mesa library, Windows Mesa
-drivers, OSMesa, and GLU are in the mesa directory.  The project files
-to build GLUT and some demo programs are in the progs directory.
-
-Makefiles are no longer shipped or supported, but can be generated
-from the projects using Visual Studio.
-
-
-Windows Drivers
-------- -------
-
-At this time, only the GDI driver is known to work.  Most of the demos
-in progs/demos should work with this driver.
-
-Source code also exists in the tree for other drivers in
-src/mesa/drivers/windows, but the status of this code is unknown.
-
-The GDI driver operates basically by writing pixel spans into a DIB
-section and then blitting the DIB to the window.  The driver was
-recently cleaned up and rewitten and so may have bugs or may be
-missing some functionality.  The older versions of the CVS source may
-be useful in figuring out any problems, or report them to me.
-
-To build Mesa with the GDI driver, build the mesa, gdi, and glu
-projects in the Visual Studio workspace found at
-
-	windows/VC8/mesa/mesa.sln
-
-The osmesa DLL can also be built with the osmesa project.
-
-The build system creates a lib top-level directory and copies
-resulting LIB and DLL files to this lib directory.  The files are:
-
-	OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
-	OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
-
-If the MesaDemos ZIP file was extracted, the DLL files are also copied
-to the demos directory.  This facilitates running the demos as described
-below.
-
-
-GLUT and Demos
----- --- -----
-
-A Visual Studio workspace can be found at 
-
-	windows/VC8/progs/progs.sln
-
-It can be used to build GLUT and a few demos.  The GLUT lib and DLL
-are copied to the top-level lib directory, along with the Mesa libs.
-
-The demo build system expects to find the LIB files in the top level
-lib directory, so you must build the Mesa libs first.  The demo
-executables are placed in the demos directory, because some of them
-rely on data files found there.  Also, the Mesa lib DLL's were copied
-there by the Mesa lib build process.  Therefore, you should be able to
-simply run the demo executables from the demo directory.
-
-If you want to run the demos from the Visual Studio, you may have to
-change the startup directory and explicitly state where the executables are.
-
-You may also build all the demo programs by using a makefile.  Go to
-the progs/demos directory and make sure you have executed VCVARS32.BAT
-or whatever setup script is appropriate for your compiler.  Then,
-
-	nmake -f Makefile.win
-
-should build all the demos.
-
-
-Build System Notes
------ ------ -----
-
-VC8
----
-
-No notes.
-
-
-General
--------
-
-After building, you can copy the above DLL files to a place in your
-PATH such as $SystemRoot/SYSTEM32.  If you don't like putting things
-in a system directory, place them in the same directory as the
-executable(s).  Be careful about accidentially overwriting files of
-the same name in the SYSTEM32 directory.
-
-The DLL files are built so that the external entry points use the
-stdcall calling convention.
-
-Static LIB files are not built.  The LIB files that are built with are
-the linker import files associated with the DLL files.
-
-The si-glu sources are used to build the GLU libs.  This was done
-mainly to get the better tessellator code.
-
-To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
-to the project settings.  You will also need to edit src/mesa.def to
-change all the gl* symbols to mgl*.  Because this is easy to do with a
-global replace operation in a text editor, no additional mangled
-version of mesa.def is maintained or shipped.
-
-If you have a Windows-related build problem or question, it is
-probably better to direct it to me (kschultz@users.sourceforge.net),
-rather than directly to the other Mesa developers.  I will help you as
-much as I can.  I also monitor the Mesa mailing lists and will answer
-questions in this area there as well.
-
-
-Karl Schultz
diff --git a/docs/README.WINDML b/docs/README.WINDML
deleted file mode 100644
index 448db71..0000000
--- a/docs/README.WINDML
+++ /dev/null
@@ -1,146 +0,0 @@
-
-                        WindML Driver for Mesa 4.0
-
-
-Requirements
-------------
-
-Tornado 2 + WindML, Cumulative Patchs are recommended. 
-  
-I suppose you have a valid WindML installation. Double buffer hardware
-gives better performance than double buffer software so if you can
-compile your WindML driver with this option, just do it. I/O
-redirection is adviced in target server.
-
-
-Tested on
----------
-
-During the development, my main target was a CoolMonster:
-- Video card: CT69000
-- CPU: PENTIUM 266MHz
-
-and my host a Windows NT + Tornado 2.
-
-
-Installation
-------------
-
-1. Mesa sources must be in root directory (C:\)
-
-2. Add the following line to your torVars.bat:
-set MESA_BASE=C:\Mesa
-
-OR copy the new torVars.bat in your bin path:
-c:/Mesa/src/ugl/tornado/torVars.sample -> 
-/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)
-
-3. In a command prompt:
-$ torVars
-$ cd c:\Mesa
-$ make -f Makefile.ugl CPU=PENTIUM
-
-Take a long while...
-
-5. Include all the files from ugldemos folder to build some downloadable
-   application modules
-
-4. Download UGL/Mesa object files on target
-
-For example via the WindShell:
-ld < c:\Tornado\target\lib\objMesaGL.o
-ld < c:\Tornado\target\lib\objMesaUGL.o
-ld < c:\Tornado\target\lib\objMesaGLU.o
-ld < c:\Tornado\target\lib\objGLUTshapes.o
-ld < c:\Tornado\target\lib\objMesaOS.o
-
-You can put the previous lines in a file and use:
-< filename
-
-6. Download the application modules.
-
-7. In WindShell, run:
--> uglalldemos
-
-During the show some messages will appear, it provides some useful
-information on key management.
-
-
-Coding
-------
-
-Sample Usage:
-
-In addition to the usual ugl calls to initialize UGL, (may be find an
-input driver), you must do the following to use the UGL/Mesa interface:
-
-1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context,
-   given the display format.
-
-2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an
-   UGL/Mesa Context and to make the context the current one.
-
-3. Make gl* calls to render your graphics.
-
-4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers.
-
-5. Before the UGL is destroyed, call MesaDestroyContext().
-
-6. Before exiting, call if required uglEventQDestroy and then
-   uglDeinitialize();
-
-Limitations
------------
-
-I found the following limitations in my driver :
- - Color Indexed management is only in 8 bits
- - It's possible to mix UGL/OpenGL application with a software
-   double buffer
-
-Modifications
-------------
-
-New files in Mesa:
-- Makefile.ugl
-- rules.windmlmesa
-- docs/README.UGL
-- include/GL/uglmesa.h
-- si-glu/Makefile.ugl
-- src/Makefile.ugl
-- src/ugl/torGLUTShapesInit.c
-- src/ugl/torMesaUGLInit.c
-- src/ugl/ugl_api.c
-- src/ugl/ugl_dd.c
-- src/ugl/ugl_glutshapes.c
-- src/ugl/ugl_line.c
-- src/ugl/ugl_span.c
-- src/ugl/ugl_tri.c
-- src/ugl/uglmesaP.h
-- ugldemos/*
-
-Modified files in Tornado 2.0:
-- c:\Tornado\host\x86-win32\bin\torVars.bat
-rem Command line build environments
-set WIND_HOST_TYPE=x86-win32
-set WIND_BASE=C:\Tornado
-set MESA_BASE=C:\Mesa
-set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%
-- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf
-- c:\Tornado\target\h\GL\*
-
-Todo
-----
-- GCC 2.96, ASM compilation
-
-Thanks to:
-----------
-
-Precision Insight team for their great job around Mesa, XFree, and DRI.
-Wind River Systems to take me as an intern.
-
-
-Stephane Raimbault
-<stephane.raimbault@windriver.com>
-<stephane.raimbault@deesse.univ-lemans.fr>
-
-July 24, 2001
diff --git a/docs/RELNOTES-3.1 b/docs/RELNOTES-3.1
deleted file mode 100644
index 65324eb..0000000
--- a/docs/RELNOTES-3.1
+++ /dev/null
@@ -1,145 +0,0 @@
-
-                         Mesa 3.1 release notes
-
-                             PLEASE READ!!!!
-
-
-New copyright
--------------
-
-Mesa 3.1 will be distributed under an XFree86-style copyright instead
-of the GNU LGPL.
-
-
-New directories
----------------
-
-All documentation files are now in the docs/ directory.
-All shell scripts are now in the bin/ directory.
-
-
-New library names
------------------
-
-Formerly, the main Mesa library was named libMesaGL.so (or libMesaGL.a)
-and the GLU library was named libMesaGLU.so (or libMesaGLU.a).
-
-Now, the main library is named libGL.so (or libGL.a) and the GLU library
-is named libGLU.so (or libGLU.a).
-
-The change allows Mesa to be more easily substituted for OpenGL.
-Specifically, the linker/loader on some Unix-like systems won't
-allow libMesaGL.so to be used instead of libGL.so if the application
-was linked with the former.
-
-Warning: if you have another OpenGL implementation installed on your
-system (i.e. you have another OpenGL libGL.so) you'll have to be
-carefull about which library (OpenGL or Mesa) you link against.  Be
-aware of -L linker flags and the value of the LD_LIBRARY_PATH environment
-variable.
-
-
-New library versioning
-----------------------
-
-Previously, the Mesa GL library was named libMesaGL.so.3.0
-To better support Linux/OpenGL standards, the Mesa GL library is now
-named libGL.so.1.2.030100  This indicates version 1.2 of the OpenGL spec
-and Mesa implementation 3.1.0
-
-In the long term this will allow better interoperability with other
-OpenGL implementations, especially on Linux.  In the short term,
-OpenGL apps may have to be relinked to use the new library naming.
-
-
-
-New makefiles
--------------
-
-The old Makefiles found in the various directories have been renamed
-to Makefile.X11 in order to prevent filename collisions with autoconfig-
-generated Makefiles.
-
-The top-level Makefile simply includes Makefile.X11
-If your top-level Makefile get's overwritten/destroyed you can restore
-it by copying Makefile.X11 to Makefile
-
-
-New extensions
---------------
-
-GL_EXT_stencil_wrap
-	Implements two new stencil operations: GL_INCR_WRAP_EXT and
-	GL_DECR_WRAP_EXT which allow stencil increment and decrement
-	without clamping.
-
-GL_INGR_blend_func_separate
-	Allows specification of blend factors for RGB and Alpha independently.
-	(INGR = Intergraph)
-
-GL_ARB_multitexture
-	Multiple simultaneous textures.  (ARB = Architecture Review Board)
-
-GL_NV_texgen_reflection
-	nVidia texgen extension for better reflection mapping.
-
-GL_PGI_misc_hints
-	Assorted transformation hints.
-
-GL_EXT_compiled_vertex_array
-	Compiled vertex arrays.
-
-GL_EXT_clip_volume_hint
-	Allows one to disable clip volume (frustum) testing.
-
-
-
-Extensions removed
-------------------
-
-GL_EXT_multitexture - obsolete in favor of GL_ARB_multitexture
-
-
-
-Config file
------------
-
-By default, /etc/mesa.conf will be read when Mesa starts.  This
-file controls default hints, enable/disable of extensions, and
-more.  See the CONFIG file for documentation.
-
-
-
-Optimizations
--------------
-
-Keith Whitwell has contributed significant optimizations to Mesa's
-vertex transformation code.  Basically, the whole transformation
-stage of Mesa has been rewritten.
-
-It's impossible to give a speedup factor.  You'll just have to
-try your app and see how it performs.
-
-
-
-Device Driver changes
----------------------
-
-A bunch of new device driver functions have been added.  See src/dd.h
-Keith Harrison contributed many of them.  I've been planning on adding
-a bunch of functions like these to make writing hardware drivers easier.
-More such function will probably be added in the near future.
-
-
-
-Miscellaneous
--------------
-
-util/glstate.c has some handy functions for debugging.  Basically, it
-offers a simple function for printing GL state variables.  It's not
-finished yet.  There's a LOT more GLenum records to be added (see the
-code).  Anyone want to help?
-
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.2 b/docs/RELNOTES-3.2
deleted file mode 100644
index ec7d4f8..0000000
--- a/docs/RELNOTES-3.2
+++ /dev/null
@@ -1,11 +0,0 @@
-
-                         Mesa 3.2 release notes
-
-                             PLEASE READ!!!!
-
-
-Mesa 3.2 is a stabilization of the Mesa 3.1 release.  No new features
-have been added.  For a list of bug fixes please read the VERSIONS file.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.2.1 b/docs/RELNOTES-3.2.1
deleted file mode 100644
index d34efcc..0000000
--- a/docs/RELNOTES-3.2.1
+++ /dev/null
@@ -1,31 +0,0 @@
-
-                         Mesa 3.2.1 release notes
-
-                             PLEASE READ!!!!
-
-
-
-The Mesa 3.2.1 release mainly just fixes bugs since the 3.2 release.
-See the VERSIONS file for the exact list.
-
-
-
-GLU Polygon Tessellator
------------------------
-
-The GLU tessellator has been reverted back to the version included
-with Mesa 3.0 since it's more stable.  The Mesa 3.1/3.2 tessellator
-implemented the GLU 1.3 specification but suffered from a number of
-bugs.
-
-Mesa implements GLU 1.1.
-
-Ideally, people should use the GLU 1.3 library included in SGI's
-OpenGL Sample Implementation (SI) available from 
-http://oss.sgi.com/projects/ogl-sample/
-People are working to make easy-to-install Linux RPMs of the
-GLU library.
-
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.3 b/docs/RELNOTES-3.3
deleted file mode 100644
index 3850767..0000000
--- a/docs/RELNOTES-3.3
+++ /dev/null
@@ -1,270 +0,0 @@
-
-                         Mesa 3.3 release notes
-
-                             July 21, 2000
-
-                             PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.2.1) designate stable releases.
-
-Mesa 3.3 has a undergone many internal changes since version 3.2
-and features a lot of new extensions.  3.3 is expected to be pretty
-stable, but perhaps not as stable as 3.2 which has been used by
-thousands of users over the past months.
-
-Everyone is encouraged to try Mesa 3.3.  Bugs should be reported to
-the Mesa bug database on www.sourceforge.net.
-
-
-
-Header file / GLenum changes
-----------------------------
-
-The gl.h and glu.h headers now use #defines to define all GL_* tokens
-instead of C-language enums.  This change improves Mesa/OpenGL
-interoperability.
-
-
-
-New API dispatch code
----------------------
-
-The core Mesa gl* functions are now implemented with a new dispatch
-(jump table) which will allow simultaneous direct/indirect rendering.
-
-The code is found in the glapi*.[ch] files.
-
-Of interest:  the actual "glFooBar" functions are generated with
-templatized code defined in glapitemp.h and included by glapi.c
-The glapitemp.h template should be reusable for all sorts of OpenGL
-projects.
-
-The new dispatch code has also optimized with x86 assembly code.
-This optimization eliminates copying the function arguments during
-dispatch.
-
-
-
-New thread support
-------------------
-
-Thread support in Mesa has been rewritten.  The glthread.[ch] files
-replace mthreads.[ch].  Thread safety is always enabled (on platforms
-which support threads, that is).  There is virtually no performance
-penalty for typical single-thread applications.  See the glapi.c
-file for details.
-
-The Xlib driver (XMesa) is now thread-safe as well.  Be sure to
-call XInitThreads() in your app first.  See the xdemos/glthreads.c
-demo for an example.
-
-
-
-Make configuration changes
---------------------------
-
-If you use the old-style (non GNU automake) method to build Mesa note
-that several of the configuration names have changed:
-
-   Old name        New name
-   -------------   ----------------
-   linux-elf       linux
-   linux           linux-static
-   linux-386-elf   linux-386
-   linux-386       linux-386-static
-   etc.
-
-
-
-New extensions
---------------
-
-GL_ARB_transpose_matrix
-	Adds glLoadTransposeMatrixARB() and glMultTransposeMatrixARB()
-        functions.
-
-GL_ARB_texture_cube_map
-	For cube-based reflection mapping.
-
-GL_EXT_texture_add_env
-	Adds GL_ADD texture environment mode.
-	See http://www.berkelium.com/OpenGL/EXT/texture_env_add.txt
-
-GL_EXT_texture_lod_bias
-	Allows mipmapped texture blurring and sharpening.
-
-GLX_EXT_visual_rating extension
-	This extension has no effect in stand-alone Mesa (used for DRI).
-
-GL_HP_occlusion_test
-	Used for bounding box occlusion testing (see demos/occlude.c).
-
-GL_SGIX_pixel_texture / GL_SGIS_pixel_texture
-	Lets glDraw/CopyPixels draw a texture coordinate image.
-
-GL_SGI_color_matrix
-	Adds a color matrix and another set of scale and bias parameters
-	to the glDraw/CopyPixels paths.
-
-GL_SGI_color_table
-	Adds additional color tables to the glDraw/Read/CopyPixels paths.
-
-GL_EXT_histogram
-	Compute histograms for glDraw/Read/CopyPixels.
-
-GL_EXT_blend_func_separate
-	This is the same as GL_INGR_blend_func_separate.
-
-GL_ARB_texture_cube_mapping
-	6-face cube mapping, nicer than sphere mapping
-
-GL_EXT_texture_env_combine
-	For advanced texture environment effects.
-
-
-Documentation for all these functions can be found at
-http://oss.sgi.com/projects/ogl-sample/registry/
-
-
-
-GLX_SGI_make_current_read functionality
----------------------------------------
-
-The functionality of this extension is needed for GLX 1.3 (and required
-for the Linux/OpenGL standards base).
-
-Implementing this function required a **DEVICE DRIVER CHANGE**.
-The old SetBuffer() function has been replaced by SetReadBuffer() and
-SetDrawBuffer().  All device drivers will have to be updated because
-of this change.
-
-The new function, glXMakeContextCurrent(), in GLX 1.3 now works in Mesa.
-The xdemos/wincopy.c program demonstrates it.
-
-
-
-Image-related code changes
---------------------------
-
-The imaging path code used by glDrawPixels, glTexImage[123]D,
-glTexSubImage[123], etc has been rewritten.  It's now faster,
-uses less memory and has several bug fixes.  This work was
-actually started in Mesa 3.1 with the glTexImage paths but has now
-been carried over to glDrawPixels as well.
-
-
-
-Device driver interface changes
--------------------------------
-
-Added new functions for hardware stencil buffer support:
-   WriteStencilSpan
-   ReadStencilSpan
-   WriteStencilPixels
-   ReadStencilPixels
-
-
-Removed old depth buffer functions:
-   AllocDepthBuffer
-   DepthTestSpan
-   DepthTestPixels
-   ReadDepthSpanFloat
-   ReadDepthSpanInt
-
-
-Added new depth buffer functions:
-   WriteDepthSpan
-   ReadDepthSpan
-   WriteDepthPixels
-   ReadDepthPixels
-
-   These functions always read/write 32-bit GLuints.  This will allow
-   drivers to have anywhere from 0 to 32-bit Z buffers without
-   recompiling for 16 vs 32 bits as was previously needed.
-
-
-New texture image functions
-   The entire interface for texture image specification has been updated.
-   With the new functions, it's optional for Mesa to keep an internal copy
-   of all textures.  Texture download should be a lot faster when the extra
-   copy isn't made.
-
-Misc changes
-   TexEnv now takes a target argument
-   Removed UseGlobalTexturePalette (use Enable function instead)
-
-
-Also added
-   ReadPixels
-   CopyPixels
-
-
-The SetBufffer function has been replaced by SetDrawBuffer and
-SetReadBuffer functions.  This lets core Mesa independently
-specify which buffer is to be used for reading and which for
-drawing.
-
-The Clear function's mask parameter has changed.  Instead of
-mask being the flags specified by the user to glClear, the
-mask is now a bitmask of the DD_*_BIT flags in dd.h.  Now
-multiple color buffers can be specified for clearing (ala
-glDrawBuffers).  The driver's Clear function must also
-check the glColorMask glIndexMask, and glStencilMask settings
-and do the right thing.  See the X/Mesa, OS/Mesa, or FX/Mesa
-drivers for examples.
-
-
-The depth buffer changes shouldn't be hard to make for existing
-drivers.  In fact, it should simply the code.  Be careful with
-the depthBits value passed to gl_create_context().  1 is a bad
-value!  It should normally be 0, 16, 24, or 32.
-
-
-gl_create_framebuffer() takes new arguments which explicitly tell
-core Mesa which ancillary buffers (depth, stencil, accum, alpha)
-should be implemented in software.  Mesa hardware drivers should
-carefully set these flags depending on which buffers are in the
-graphics card.
-
-
-
-Internal constants
-------------------
-
-Point and line size range and granularity limits are now stored
-in the gl_constants struct, which is the Const member of GLcontext.
-The limits are initialized from values in config.h but may be
-overridden by device drivers to reflect the limits of that driver's
-hardware.
-
-Also added constants for NumAuxBuffers and SubPixelBits.
-
-
-
-OpenGL Conformance
-------------------
-
-Mesa now passes all the OpenGL 1.1 conformance tests, except for
-antialiased lines.  AA lines fail on some, but not all, the tests.
-In order to fix the remaining failures, a new AA line algorithm will
-be needed (which computes coverage values for end-point fragments).
-This will be done for Mesa 3.5/3.6.
-
-
-
-OpenGL 1.2 GL_ARB_imaging subset
---------------------------------
-
-Mesa 3.3 implements all the features of GL_ARB_imaging except for
-image convolution.  This will (hopefully) be done for Mesa 3.5/3.6.
-
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.4 b/docs/RELNOTES-3.4
deleted file mode 100644
index 657ccda..0000000
--- a/docs/RELNOTES-3.4
+++ /dev/null
@@ -1,21 +0,0 @@
-
-                         Mesa 3.4 release notes
-
-                             November 3, 2000
-
-                             PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 3.4 simply fixes bugs found in the Mesa 3.3 release.  For details,
-see the VERSIONS file.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.4.1 b/docs/RELNOTES-3.4.1
deleted file mode 100644
index 73d75c6..0000000
--- a/docs/RELNOTES-3.4.1
+++ /dev/null
@@ -1,21 +0,0 @@
-
-                         Mesa 3.4.1 release notes
-
-                             February 9, 2001
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 3.4.1 is a maintenance release that simply fixes bugs found since
-the Mesa 3.4 release.  For details, see the VERSIONS file.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.4.2 b/docs/RELNOTES-3.4.2
deleted file mode 100644
index 9caea90..0000000
--- a/docs/RELNOTES-3.4.2
+++ /dev/null
@@ -1,21 +0,0 @@
-
-                         Mesa 3.4.2 release notes
-
-                               May 17, 2001
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 3.4.2 is a maintenance release that simply fixes bugs found since
-the Mesa 3.4.1 release.  For details, see the VERSIONS file.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-3.5 b/docs/RELNOTES-3.5
deleted file mode 100644
index b2aa1b8..0000000
--- a/docs/RELNOTES-3.5
+++ /dev/null
@@ -1,227 +0,0 @@
-
-                         Mesa 3.5 release notes
-
-                             June 21, 2001
-
-                             PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.5) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-The biggest change in Mesa 3.5 is a complete overhaul of the source
-code in order to make it more modular.  This was driven by the DRI
-hardware drivers.  It simplifies the DRI drivers and opens the door
-to hardware transform/clip/lighting (TCL).  Keith Whitwell can take
-the credit for that.
-
-
-
-Driver Support
---------------
-
-The device driver interface in Mesa 3.5 has changed a lot since Mesa 3.4
-Not all of the older Mesa drivers have been updated.  Here's the status:
-
-Driver			Status
-----------------------	-----------
-XMesa (Xlib)		updated
-OSMesa (off-screen)	updated
-FX (3dfx Voodoo1/2)	updated
-SVGA			updated
-GGI			not updated
-Windows/Win32		not updated
-DOS/DJGPP		not updated
-BeOS			not updated
-Allegro			not updated
-D3D			not updated
-DOS			not updated
-
-We're looking for volunteers to update the remaining drivers.  Please
-post to the Mesa3d-dev mailing list if you can help.
-
-
-
-GLU 1.3
--------
-
-Mesa 3.5 includes the SGI Sample Implementation (SI) GLU library.
-This version of GLU supports the GLU 1.3 specification.  The old
-Mesa GLU library implemented the 1.1 specification.  The SI GLU
-library should work much better.
-
-You'll need a C++ compiler to compile the SI GLU library.  This may
-be a problem on some systems.
-
-
-
-New Extensions
---------------
-
-GL_EXT_convolution
-	Adds image convolution to glRead/Copy/DrawPixels/TexImage.
-
-GL_ARB_imaging
-	This is the optional imaging subset of OpenGL 1.2.
-	It's the GL_EXT_convolution, GL_HP_convolution_border_modes,
-	GL_EXT_histogram, GL_EXT_color_table, GL_EXT_color_subtable
-	GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract
-	and GL_SGI_color_matrix extensions all rolled together.
-	This is supported in all software renderers but not in all
-	hardware drivers (3dfx for example).
-
-GL_ARB_texture_compression
-	This is supported in Mesa but only used by the 3dfx DRI drivers
-	for Voodoo4 and later.
-
-GL_ARB_texture_env_add
-	This is identical to GL_EXT_texture_env_add.
-
-GL_NV_blend_square
-	Adds extra blend source and dest factors which allow squaring
-	of color values.
-
-GL_EXT_fog_coord
-	Allows specification of a per-vertex fog coordinate instead of
-	having fog always computed from the eye distance.
-
-GL_EXT_secondary_color
-	Allows specifying the secondary (specular) color for each vertex
-	instead of getting it only from lighting in GL_SEPARATE_SPECULAR_COLOR
-	mode.
-
-GL_ARB_texture_env_combine
-	Basically the same as GL_EXT_texture_env_combine
-
-GL_ARB_texture_env_add extension
-	Texture addition mode.
-
-GL_ARB_texture_env_dot3 extension
-	Dot product texture environment.
-
-GL_ARB_texture_border_clamp
-	Adds GL_CLAMP_TO_BORDER_ARB texture wrap mode
-
-GL_SGIX_depth_texture, GL_SGIX_shadow and GL_SGIX_shadow_ambient
-	Implements a shadow casting algorithm based on depth map textures
-
-GL_SGIS_generate_mipmap
-	Automatically generate lower mipmap images whenever the base mipmap
-	image is changed with glTexImage, glCopyTexImage, etc.
-
-
-
-libOSMesa.so
-------------
-
-libOSMesa.so is a new library which contains the OSMesa interface for
-off-screen rendering.  Apps which need the OSMesa interface should link
-with both -lOSMesa and -lGL.  This change was made so that stand-alone
-Mesa works the same way as XFree86/DRI's libGL.
-
-
-
-Device Driver Changes / Core Mesa Changes
------------------------------------------
-
-The ctx->Driver.LogicOp() function has been removed.  It used to
-be called during state update in order to determine if the driver
-could do glLogicOp() operations, and if not, set the SWLogicOpEnabled
-flag.  Drivers should instead examine the LogicOp state themselves
-and choose specialized point, line, and triangle functions appropriately,
-or fall back to software rendering.  The Xlib driver was the only driver
-to use this function.  And since the Xlib driver no longer draws
-points, lines or triangles using Xlib, the LogicOp function isn't needed.
-
-The ctx->Driver.Dither() function has been removed.  Drivers should
-detect dither enable/disable via ctx->Driver.Enable() instead.
-
-The ctx->Driver.IndexMask() and ctx->Driver.ColorMask() functions
-are now just called from glIndexMask and glColorMask like the other
-GL state-changing functions.  They are no longer called from inside
-gl_update_state().  Also, they now return void.  The change was made
-mostly for sake of uniformity.
-
-The NEW_DRVSTATE[0123] flags have been removed.  They weren't being used
-and are obsolete w.r.t. the way state updates are done in DRI drivers.
-
-
-Removed obsolete gl_create_visual() and gl_destroy_visual().
-
-Renamed functions (new namespace):
-
-old				new
-gl_create_framebuffer		_mesa_create_framebuffer
-gl_destroy_framebuffer		_mesa_destroy_framebuffer
-gl_create_context		_mesa_create_context
-gl_destroy_context		_mesa_destroy_context
-gl_context_initialize		_mesa_context_initialize
-gl_copy_context			_mesa_copy_context
-gl_make_current			_mesa_make_current
-gl_make_current2		_mesa_make_current2
-gl_get_current_context		_mesa_get_current_context
-gl_flush_vb			_mesa_flush_vb
-gl_warning			_mesa_warning
-gl_compile_error		_mesa_compile_error
-
-
-All the drivers have been updated, but not all of them have been
-tested since I can't test some platforms (DOS, Windows, Allegro, etc).
-
-
-X/Mesa Driver
--------------
-
-The source files for the X/Mesa driver in src/X have been renamed.
-The xmesa[1234].c files are gone.  The new files are xm_api.c,
-xm_dd.c, xm_line.c, xm_span.c and xm_tri.c.
-
-
-
-Multitexture
-------------
-
-Eight texture units are now supported by default.
-
-
-
-OpenGL SI related changes
--------------------------
-
-In an effort to make Mesa's internal interfaces more like the OpenGL
-SI interfaces, a number of changes have been made:
-
-1. Importing the SI's glcore.h file which defines a number of
-interface structures like __GLimports and __GLexports.
-
-2. Renamed "struct gl_context" to "struct __GLcontextRec".
-
-3. Added __glCoreCreateContext() and __glCoreNopDispatch() functions.
-
-4. The GLcontext member Visual is no longer a pointer.
-
-5. New file: imports.c to setup default import functions for Mesa.
-
-
-
-
-16-bit color channels
----------------------
-
-There's experimental support for 16-bit color channels (64-bit pixels)
-in Mesa 3.5.  Only the OSMesa interface can be used for 16-bit rendering.
-Type "make linux-osmesa16" in the top-level directory to build the
-special libOSMesa16.so library.
-
-This hasn't been tested very thoroughly yet so please file bug reports
-if you have trouble.
-
-In the future I hope to implement support for 32-bit, floating point
-color channels.
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-4.0 b/docs/RELNOTES-4.0
deleted file mode 100644
index 2f729db..0000000
--- a/docs/RELNOTES-4.0
+++ /dev/null
@@ -1,162 +0,0 @@
-
-                           Mesa 4.0 release notes
-
-                             October 18, 2001
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa version 4.0 signifies two things:
-
-  1. A stabilization of the 3.5 development release
-  2. Implementation of the OpenGL 1.3 specification
-
-
-Note that the Mesa major version number is incremented with the OpenGL
-minor version number:
-
-   Mesa 1.x  ==  OpenGL 1.0
-   Mesa 2.x  ==  OpenGL 1.1
-   Mesa 3.x  ==  OpenGL 1.2
-   Mesa 4.x  ==  OpenGL 1.3
-
-
-
-New Features
-------------
-
-Mesa 3.5 already had all the new features of OpenGL 1.3, implemented as
-extensions.  These extensions were simply promoted to standard features:
-
-   GL_ARB_multisample
-   GL_ARB_multitexture
-   GL_ARB_texture_border_clamp
-   GL_ARB_texture_compression
-   GL_ARB_texture_cube_map
-   GL_ARB_texture_env_add
-   GL_ARB_texture_env_combine
-   GL_ARB_texture_env_dot3
-   GL_ARB_transpose_matrix
-
-In Mesa 4.0 the functions defined by these extensions are now available
-without the "ARB" suffix.  For example, glLoadTransposeMatrixf() is now
-a standard API function.  The new functions in OpenGL 1.3 and Mesa 4.0 are:
-
-   glActiveTexture
-   glClientActiveTexture
-   glCompressedTexImage1D
-   glCompressedTexImage2D
-   glCompressedTexImage3D
-   glCompressedTexSubImage1D
-   glCompressedTexSubImage2D
-   glCompressedTexSubImage3D
-   glGetCompressedTexImage
-   glLoadTransposeMatrixd
-   glLoadTransposeMatrixf
-   glMultiTexCoord1d
-   glMultiTexCoord1dv
-   glMultiTexCoord1f
-   glMultiTexCoord1fv
-   glMultiTexCoord1i
-   glMultiTexCoord1iv
-   glMultiTexCoord1s
-   glMultiTexCoord1sv
-   glMultiTexCoord2d
-   glMultiTexCoord2dv
-   glMultiTexCoord2f
-   glMultiTexCoord2fv
-   glMultiTexCoord2i
-   glMultiTexCoord2iv
-   glMultiTexCoord2s
-   glMultiTexCoord2sv
-   glMultiTexCoord3d
-   glMultiTexCoord3dv
-   glMultiTexCoord3f
-   glMultiTexCoord3fv
-   glMultiTexCoord3i
-   glMultiTexCoord3iv
-   glMultiTexCoord3s
-   glMultiTexCoord3sv
-   glMultiTexCoord4d
-   glMultiTexCoord4dv
-   glMultiTexCoord4f
-   glMultiTexCoord4fv
-   glMultiTexCoord4i
-   glMultiTexCoord4iv
-   glMultiTexCoord4s
-   glMultiTexCoord4sv
-   glMultTransposeMatrixd
-   glMultTransposeMatrixf
-   glSampleCoverage
-   glSamplePass
-
-
-GLX 1.4 is the companion to OpenGL 1.3.  The only new features in GLX 1.4
-are support for multisampling and the GLX_ARB_get_proc_address extension.
-glXGetProcAddress() is the only new function in GLX 1.4.
-
-
-
-Multisample and Texture Compression
------------------------------------
-
-The OpenGL 1.3 specification allows the multisample and texture compression
-features to essentially be no-ops.  For example, if you query for multisample
-support you'll find none, but the API functions work.
-
-Similarly, texture compression is not implemented by any of the software
-drivers but you can specify a generic compressed texture format (like
-GL_COMPRESSED_RGBA) to glTexImage2D and it'll be accepted.
-
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
-device driver.  If the driver enables all the ARB extensions which are part
-of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
-it'll return "1.2".
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.3
-OSMesa (off-screen)	implements OpenGL 1.3
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.3
-GGI			needs updating
-DOS/DJGPP		needs updating
-BeOS			needs updating
-Allegro			needs updating
-D3D			needs updating
-DOS			needs updating
-
-Special thanks go to Karl Schultz for updating the Windows driver.
-
-The XFree86/DRI drivers	have not yet been updated to use Mesa 4.0 as of
-September 2001, but that should happen eventually.
-
-
-
-Other Changes
--------------
-
-See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-4.0.1 b/docs/RELNOTES-4.0.1
deleted file mode 100644
index e84df6b..0000000
--- a/docs/RELNOTES-4.0.1
+++ /dev/null
@@ -1,21 +0,0 @@
-
-                          Mesa 4.0.1 release notes
-
-                             December 17, 2001
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 4.0.1 only contains bug fixes since version 4.0.
-
-See the docs/VERSIONS file for the list of bug fixes.
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-4.0.2 b/docs/RELNOTES-4.0.2
deleted file mode 100644
index b476956..0000000
--- a/docs/RELNOTES-4.0.2
+++ /dev/null
@@ -1,49 +0,0 @@
-
-                          Mesa 4.0.2 release notes
-
-                             March 25, 2002
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 4.0.2 only contains bug fixes and a new DOS driver since version 4.0.1.
-
-See the docs/VERSIONS file for the list of bug fixes.
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
-device driver.  If the driver enables all the ARB extensions which are part
-of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
-it'll return "1.2".
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.3
-OSMesa (off-screen)	implements OpenGL 1.3
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.3
-DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
-GGI			needs updating
-BeOS			needs updating
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-4.0.3 b/docs/RELNOTES-4.0.3
deleted file mode 100644
index 0b3e34b..0000000
--- a/docs/RELNOTES-4.0.3
+++ /dev/null
@@ -1,51 +0,0 @@
-
-                          Mesa 4.0.3 release notes
-
-                               June 25, 2002
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 3.3) designate new developmental releases.
-Even numbered versions (such as 3.4) designate stable releases.
-
-Mesa 4.0.3 basically just contains bug fixes version 4.0.2.
-
-See the docs/VERSIONS file for the list of bug fixes.
-
-The GGI driver has been updated, thanks to Filip Spacek.
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
-device driver.  If the driver enables all the ARB extensions which are part
-of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
-it'll return "1.2".
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.3
-OSMesa (off-screen)	implements OpenGL 1.3
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.3
-DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
-GGI			implements OpenGL 1.3
-BeOS			needs updating
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-4.1 b/docs/RELNOTES-4.1
deleted file mode 100644
index 24e9299..0000000
--- a/docs/RELNOTES-4.1
+++ /dev/null
@@ -1,307 +0,0 @@
-
-                            Mesa 4.1 release notes
-
-                               October 29, 2002
-
-                                PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even numbered versions (such as 4.0) designate stable releases.
-Odd numbered versions (such as 4.1) designate new developmental releases.
-
-
-New Features in Mesa 4.1
-------------------------
-
-New extensions.  Docs at http://oss.sgi.com/projects/ogl-sample/registry/
-
-GL_NV_vertex_program
-
-    NVIDIA's vertex programming extension
-
-GL_NV_vertex_program1_1
-
-    A few features built on top of GL_NV_vertex_program
-
-GL_ARB_window_pos
-
-    This is the ARB-approved version of GL_MESA_window_pos
-
-GL_ARB_depth_texture
-
-    This is the ARB-approved version of GL_SGIX_depth_texture.
-    It allows depth (Z buffer) data to be stored in textures.
-    This is used by GL_ARB_shadow
-
-GL_ARB_shadow
-
-    Shadow mapping with depth textures.
-    This is the ARB-approved version of GL_SGIX_shadow.
-
-GL_ARB_shadow_ambient
-
-    Allows one to specify the luminance of shadowed pixels.
-    This is the ARB-approved version of GL_SGIX_shadow_ambient.
-
-GL_EXT_shadow_funcs
-
-    Extends the set of GL_ARB_shadow texture comparision functions to
-    include all eight of standard OpenGL dept-test functions.
-
-GL_ARB_point_parameters
-
-    This is basically the same as GL_EXT_point_parameters.
-
-GL_ARB_texture_env_crossbar
-
-    Allows any texture combine stage to reference any texture source unit.
-
-GL_NV_point_sprite
-
-    For rendering points as textured quads.  Useful for particle effects.
-
-GL_NV_texture_rectangle  (new in 4.0.4 actually)
-
-    Allows one to use textures with sizes that are not powers of two.
-    Note that mipmapping and several texture wrap modes are not allowed.
-
-GL_EXT_multi_draw_arrays
-
-    Allows arrays of vertex arrays to be rendered with one call.
-
-GL_EXT_stencil_two_side
-
-   Separate stencil modes for front and back-facing polygons.
-
-GLX_SGIX_fbconfig & GLX_SGIX_pbuffer
-
-   Off-screen rendering support.
-
-GL_ATI_texture_mirror_once
-
-   Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and
-   GL_MIRROR_CLAMP_TO_EDGE_ATI.
-
-
-
-Device Driver Status
---------------------
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of these drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.3
-OSMesa (off-screen)	implements OpenGL 1.3
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.3
-DOS/DJGPP		implements OpenGL 1.3
-GGI			implements OpenGL 1.3
-BeOS			needs updating (underway)
-Allegro			needs updating
-D3D			needs updating
-DOS			needs updating
-
-
-
-New features in GLUT
---------------------
-
-1. Frames per second printing
-
-   GLUT now looks for an environment variable called "GLUT_FPS".  If it's
-   set, GLUT will print out a frames/second statistic to stderr when
-   glutSwapBuffers() is called.  By default, frames/second is computed
-   and displayed once every 5 seconds.  You can specify a different
-   interval (in milliseconds) when you set the env var.  For example
-   'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval
-   to one second.
-
-   NOTE: the demo or application must call the glutInit() function for
-   this to work.  Otherwise, the env var will be ignored.
-
-   Finally, this feature may not be reliable in multi-window programs.
-
-
-2. glutGetProcAddress() function
-
-   The new function:
-
-        void *glutGetProcAddress(const char *procName)
-
-   is a wrapper for glXGetProcAddressARB() and wglGetProcAddress().  It
-   lets you dynamically get the address of an OpenGL function at runtime.
-   The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the
-   GLUT version number from 3.7 since that's probably Mark Kilgard's role.
-
-   This function should probably also be able to return the address of
-   GLUT functions themselves, but it doesn't do that yet.
-
-
-
-XXX Things To Do Yet XXXX
--------------------------
-
-isosurf with vertex program exhibits some missing triangles (probably
-when recycling the vertex buffer for long prims).
-
-
-
-Porting Info
-------------
-
-If you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here
-are some things to change:
-
-1. ctx->Texture._ReallyEnabled is obsolete.
-
-   Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that
-   left room for only 6 units (6*5 < 32) in this field.
-   This field is being replaced by ctx->Texture._EnabledUnits which has one
-   bit per texture unit.  If the bit k of _EnabledUnits is set, that means
-   ctx->Texture.Unit[k]._ReallyEnabled is non-zero.  You'll have to look at
-   ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or
-   rect texture is enabled for unit k.
-
-   This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are
-   obsolete.
-
-   The tokens TEXTURE0_* have been replaced as well (since there's no
-   significance to the "0" part:
-
-   old token           new token
-   TEXTURE0_1D         TEXTURE_1D_BIT
-   TEXTURE0_2D         TEXTURE_2D_BIT
-   TEXTURE0_3D         TEXTURE_3D_BIT
-   TEXTURE0_CUBE       TEXTURE_CUBE_BIT
-   <none>              TEXTURE_RECT_BIT
-
-   These tokens are only used for the ctx->Texture.Unit[i].Enabled and
-   ctx->Texture.Unit[i]._ReallyEnabled fields.  Exactly 0 or 1 bits will
-   be set in _ReallyEnabled at any time!
-
-   Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?"
-   A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any
-      texure unit all at once (an unusual thing to do).
-      OpenGL defines priorities that basically say GL_TEXTURE_2D has
-      higher priority than GL_TEXTURE_1D, etc.  Also, just because a
-      texture target is enabled by the user doesn't mean we'll actually
-      use that texture!  If a texture object is incomplete (missing mip-
-      map levels, etc) it's as if texturing is disabled for that target.
-      The _ReallyEnabled field will have a bit set ONLY if the texture
-      target is enabled and complete.  This spares the driver writer from
-      examining a _lot_ of GL state to determine which texture target is
-      to be used.
-
-
-2. Tnl tokens changes
-
-   During the implementation of GL_NV_vertex_program some of the vertex
-   buffer code was changed.  Specifically, the VERT_* bits defined in
-   tnl/t_context.h have been renamed to better match the conventions of
-   GL_NV_vertex_program.  The old names are still present but obsolete.
-   Drivers should use the newer names.
-
-   For example:  VERT_RGBA is now VERT_BIT_COLOR0 and
-   VERT_SPEC_RGB is now VERT_BIT_COLOR1.
-
-
-
-3. Read/Draw Buffer changes
-
-   The business of setting the current read/draw buffers in Mesa 4.0.x
-   was complicated.  It's much simpler now in Mesa 4.1.
-
-   Here are the changes:
-
-   - Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask
-   - Removed ctx->Color.DriverDrawBuffer
-   - Removed ctx->Pixel.DriverReadBuffer
-   - Removed ctx->Color.MultiDrawBuffer
-   - Removed ctx->Driver.SetDrawBuffer()
-   - Removed swrast->Driver.SetReadBuffer().
-   - Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT
-     values to indicate the current draw buffers.
-   - Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading.
-     The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values.
-   - Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer().
-     These functions exactly correspond to glDrawBuffer and glReadBuffer calls.
-     Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and
-     leave ctx->Draw.ReadBuffer NULL.
-     DRI drivers should implement their own function for ctx->Driver.DrawBuffer
-     and use it to set the current hardware drawing buffer.  You'll probably
-     also want to check for GL_FRONT_AND_BACK mode and fall back to software.
-     Call _swrast_DrawBuffer() too, to update the swrast state.
-   - Added swrast->Driver.SetBuffer().
-     This function should be implemented by all device drivers that use swrast.
-     Mesa will call it to specify the buffer to use for span reading AND
-     writing and point/line/triangle rendering.
-     There should be no confusion between current read or draw buffer anymore.
-   - Added swrast->CurrentBuffer to indicate which color buffer to read/draw.
-     Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT.
-     This value is usually passed to swrast->Driver.SetBuffer().
-
-
-4. _mesa_create_context() changes.  This function now takes a pointer to
-   a __GLimports object.  The __GLimports structure contains function
-   pointers to system functions like fprintf(), malloc(), etc.
-   The _mesa_init_default_imports() function can be used to initialize
-   a __GLimports object.  Most device drivers (like the DRI drivers)
-   should use this.
-
-
-5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords"
-   has been replaced by "NdcPtr" to better match the OpenGL spec's
-   terminology.
-
-
-6. Since GL_EXT_stencil_two_side has been implemented, many of the
-   ctx->Stencil fields are now 2-element arrays.  For example,
-   "GLenum Ref" is now "GLenum Ref[2]"  The [0] elements are the front-face
-   values and the [1] elements are the back-face values.
-   ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for
-   the glStencilOp/Func/Mask() functions.
-   ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling
-   is enabled.
-
-
-7. Removed ctx->Polygon._OffsetAny.  Removed ctx->Polygon.OffsetMRD.
-
-
-8. GLfloat / GLchan changes:
-
-   - Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4].
-     ctx->Color.ClearColor is now GLfloat[4] too.
-   - Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan.
-   - ctx->Color.AlphaRef is now GLfloat.
-   - texObj->BorderColor is now GLfloat[4].  texObj->_BorderChan is GLchan[4].
-
-   This is part of an effort to remove all GLchan types from core Mesa so
-   that someday we can support 8, 16 and 32-bit color channels dynamically
-   at runtime, instead of at compile-time.
-
-
-9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced
-   by GLuint ctx->Transform.ClipPlanesEnabled.  The later is a bitfield.
-
-
-10. There's a new matrix_stack type in mtypes.h used for the Modelview,
-   Projection, Color and Texcoord matrix stacks.
-
-
-11. The ctx->Current.* fields have changed a lot.  Now, there's a
-   ctx->Current.Attrib[] array for all vertex attributes which matches
-   the NV vertex program conventions.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-5.0 b/docs/RELNOTES-5.0
deleted file mode 100644
index 1b22996..0000000
--- a/docs/RELNOTES-5.0
+++ /dev/null
@@ -1,84 +0,0 @@
-
-                            Mesa 5.0 release notes
-
-                              November 13, 2002
-
-                                PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even-numbered versions (such as 5.0) designate stable releases.
-Odd-numbered versions (such as 4.1) designate new developmental releases.
-
-Mesa 5.0 is basically just a stabilization of Mesa 4.1.  To see a list of
-bug fixes, etc. see the VERSIONS file.
-
-
-
-New Features in Mesa 5.0
-------------------------
-
-Mesa 5.0 supports OpenGL 1.4.  Note Mesa's versioning convention:
-
-   OpenGL Version    Mesa Version
-   ------------------------------
-        1.0             1.x
-        1.1             2.x
-        1.2             3.x
-        1.3             4.x
-        1.4             5.x
-
-OpenGL 1.4 (and Mesa 5.0) incorporates the following OpenGL extensions as
-standard features:
-
-	GL_ARB_depth_texture
-	GL_ARB_shadow
-	GL_ARB_texture_env_crossbar
-	GL_ARB_texture_mirror_repeat
-	GL_ARB_window_pos
-	GL_EXT_blend_color
-	GL_EXT_blend_func_separate
-	GL_EXT_blend_logic_op
-	GL_EXT_blend_minmax
-	GL_EXT_blend_subtract
-	GL_EXT_fog_coord
-	GL_EXT_multi_draw_arrays
-	GL_EXT_point_parameters
-	GL_EXT_secondary_color
-	GL_EXT_stencil_wrap
-	GL_SGIS_generate_mipmap
-
-
-
-Device Driver Status
---------------------
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of these drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.4
-OSMesa (off-screen)	implements OpenGL 1.4
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.4
-DOS/DJGPP		implements OpenGL 1.3
-GGI			implements OpenGL 1.3
-DOS			implements OpenGL 1.4
-BeOS			needs updating (underway)
-Allegro			needs updating
-D3D			needs updating
-
-Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
-driver call the _mesa_enable_1_4_extensions() function.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-5.0.1 b/docs/RELNOTES-5.0.1
deleted file mode 100644
index f37e9c4..0000000
--- a/docs/RELNOTES-5.0.1
+++ /dev/null
@@ -1,45 +0,0 @@
-
-                           Mesa 5.0.1 release notes
-
-                               March 30, 2003
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even-numbered versions (such as 5.0.x) designate stable releases.
-Odd-numbered versions (such as 4.1.x) designate new developmental releases.
-
-Mesa 5.0.1 just fixes bugs found since the 5.0 release.  See the VERSIONS
-file for details.
-
-
-Device Driver Status
---------------------
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of these drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.4
-OSMesa (off-screen)	implements OpenGL 1.4
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.4
-DJGPP			implements OpenGL 1.4
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.4
-Allegro			needs updating
-D3D			needs updating
-
-Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
-driver call the _mesa_enable_1_4_extensions() function.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-5.0.2 b/docs/RELNOTES-5.0.2
deleted file mode 100644
index d0e05b2..0000000
--- a/docs/RELNOTES-5.0.2
+++ /dev/null
@@ -1,45 +0,0 @@
-
-                           Mesa 5.0.2 release notes
-
-                               September 5, 2003
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even-numbered versions (such as 5.0.x) designate stable releases.
-Odd-numbered versions (such as 4.1.x) designate new developmental releases.
-
-Mesa 5.0.2 just fixes bugs found since the 5.0.1 release.  See the VERSIONS
-file for details.
-
-
-Device Driver Status
---------------------
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of these drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.4
-OSMesa (off-screen)	implements OpenGL 1.4
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.4
-DJGPP			implements OpenGL 1.4
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.4
-Allegro			needs updating
-D3D			needs updating
-
-Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
-driver call the _mesa_enable_1_4_extensions() function.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-5.1 b/docs/RELNOTES-5.1
deleted file mode 100644
index aed6e10..0000000
--- a/docs/RELNOTES-5.1
+++ /dev/null
@@ -1,279 +0,0 @@
-
-                            Mesa 5.1 release notes
-
-                              December 17, 2003
-
-                                PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even-numbered versions (such as 5.0) designate stable releases.
-Odd-numbered versions (such as 5.1) designate new developmental releases.
-
-
-Bug fixes
----------
-See the VERSIONS file for a list of bugs fixed in this release.
-
-
-
-New Features in Mesa 5.1
-------------------------
-
-GL_ARB_vertex_program / GL_ARB_fragment_program
-   Michal Krol and Karl Rasche implemented these extensions.  Thanks!
-   Be aware that there may be some rough edges and lurking bugs.
-
-GL_ATI_texture_env_combine3 extension
-   This adds a few new texture combine modes.
-   Contributed by Ian Romanick.
-
-GL_SGI_texture_color_table
-   Adds a color table lookup to the RGBA texture path.  There's a separate
-   color table for each texture unit.
-   Contributed by Eric Plante.
-
-GL_NV_fragment_program
-   NVIDIA's fragment-level programming feature.
-   Possible lurking bugs:
-     - the DDX and DDY commands aren't fully tested
-     - there may be bugs in the parser
-     - the TEX and TXP instructions both do perspective correction
-     - the pack/unpack instructions may not be correct
-
-GL_EXT_depth_bounds_test
-   This extension adds a scissor-like test for the Z axis.  It's used to
-   optimize stencil-volume shadow algorithms.
-
-GL_NV_light_max_exponent
-   Lifts the 128 limit for max light exponent.
-
-GL_EXT_texture_rectangle
-   Identical to GL_NV_texture_rectangle
-
-GL_ARB_occlusion_query
-   Useful for visibility-based culling.
-
-GL_ARB_texture_non_power_of_two
-   Removes the restriction that texture dimensions must be powers of two.
-
-GL_ARB_vertex_buffer_object
-   Allows server-side vertex arrays, optimized host/card data transfers, etc.
-
-GL_ARB_point_sprite
-   ARB-approved version of GL_NV_point_sprite.  Basically allows textures
-   to be applied to points.
-
-GL_IBM_multimode_draw_arrays
-   Allows multiple vertex arrays to be drawn with one call, including arrays
-   of different types of primitives.
-
-GL_SUN_multi_draw_arrays
-   An alias for GL_EXT_multi_draw_arrays, standard in OpenGL 1.4.
-
-Faster glDrawPixels / glCopyPixels in X11 driver
-   If your X screen is 32bpp, glDrawPixels to the front color buffer will
-   be accelerated (via XPutImage()) if the image format is GL_BGRA and the
-   type is GL_UNSIGNED_BYTE.  No raster operations, such as depth test,
-   blend, fog, etc. can be enabled.
-
-   If your X screen is 16bpp, glDrawPixels to the front color buffer will
-   be accelerated (via XPutImage()) if the image format is GL_RGB and the
-   type is GL_UNSIGNED_SHORT_5_6_5.  No raster operations, such as depth
-   test, blend, fog, etc. can be enabled.
-
-   glCopyPixels() calls for the front color buffer will be accelerated
-   (via XCopyArea()) if no raster operations, such as depth test, blend,
-   fog, pixel zoom, etc. are enabled.
-
-   The speed-up over typical software rendering is a factor of 10 for
-   glDrawPixels and 100 for glCopyPixels.
-
-
-With the addition of GL_ARB_occlusion_query, GL_ARB_vertex_buffer_object,
-GL_ARB_texture_non_power_of_two and GL_EXT_shadow_funcs, Mesa 5.1 supports
-all the new features of OpenGL 1.5.  Mesa 6.0 (the next stable release)
-will advertise GL_VERSION = "1.5".
- 
-
-
-Vertex/Fragment program debugger
---------------------------------
-
-GL_MESA_program_debug is an experimental extension to support
-interactive debugging of vertex and fragment programs.  See the
-docs/MESA_program_debug.spec file for details.
-
-The bulk of the vertex/fragment program debugger is implemented
-outside of Mesa.  The GL_MESA_program_debug extension just has minimal
-hooks for stopping running programs and inspecting programs.
-
-The progs/tests/debugger.c (only in CVS) program is an example of how
-the extension can be used.  Presently, the debugger code and demo code
-is in the same file.  Eventually the debugger code should be moved
-into a reusable module.
-
-As it is now, the demo lets you set breakpoings in vertex/fragment
-programs, single step, and print intermediate register values.  It's
-basically just a proof of concept.
-
-
-
-Directory tree reorganization
------------------------------
-
-The directory structure for Mesa has been overhauled to improve its layout.
-All source code for Mesa, GLU, GLUT, etc is now under the src/ directory
-in appropriate subdirectories.
-
-The Mesa source code and drivers has been reorganized under src/mesa/.
-
-All demonstration programs and tests are now in subdirectories under progs/.
-
-
-
-Build System Changes
---------------------
-
-The GNU automake/autoconf support has been removed.  As it was, it seldom
-worked on anything but Linux.  The Mesa developers aren't big fans of
-automake/autoconf/libtool and didn't have the time to maintain it.
-If someone wants to contribute new automake/autoconf support (and is
-willing to maintain it), it may be re-incorporated into Mesa, subject
-to some requirements.
-
-The "old style" makefile system has been updated:
-   1. Make-config has been trimmed down to fewer, modern configurations.
-   2. Most of the bin/mklib.* scripts have been rolled into a new "mklib"
-      script that works on all sorts of systems.  There are probably some
-      bugs in it, but it's been tested on Linux, SunOS 5.8 and IRIX 6.5.
-      Improvements/contributes are greatly appreciated.
-   3. The Makefile.X11 files have been cleaned up in various ways
-
-
-
-Source File Changes
--------------------
-
-The mmath.[ch] files are obsolete.  Their contents have been moved
-into the imports.[ch] and macros.[ch] files.
-
-The files related to vertex and fragment programming have changed.
-Old files:
-	vpexec.[ch]
-	vpparse.[ch]
-	vpstate.[ch]
-New files:
-	program.[ch]              - generic ARB/NV program code
-	arbprogram.[ch]           - ARB program API functions
-	arbfragparse.[ch]         - ARB fragment program parsing
-	arbvertparse.[ch]         - ARB vertex program parsing
-	arbparse.[ch]             - ARB vertex/fragment parsing
-	arbparse_syn.h            - vertex/fragment program syntax
-	nvprogram.[ch]            - NV program API functions
-	nvvertprog.h              - NV vertex program definitions
-	nvfragprog.h              - NV fragment program definitions
-	nvvertparse.[ch]          - NV vertex program parser
-	nvfragparse.[ch]          - NV fragment program parser
-	nvvertexec.[ch]           - NV vertex program execution
-	swrast/s_nvfragprog.[ch]  - NV fragment program execution
-
-The files related to per-vertex handling have changed.
-Old files:
-	tnl/t_eval_api.c          - old per-vertex code
-	tnl/t_imm_alloc.c         - old per-vertex code
-	tnl/t_imm_api.c           - old per-vertex code
-	tnl/t_imm_debug.c         - old per-vertex code
-	tnl/t_imm_dlist.c         - old per-vertex code
-	tnl/t_imm_elt.c           - old per-vertex code
-	tnl/t_imm_eval.c          - old per-vertex code
-	tnl/t_imm_exec.c          - old per-vertex code
-	tnl/t_imm_fixup.c         - old per-vertex code
-	tnl/t_vtx_sse.c           - old per-vertex code
-	tnl/t_vtx_x86.c           - old per-vertex code
-New files:
-	tnl/t_save_api.c          - new per-vertex code
-	tnl/t_save_loopback.c     - new per-vertex code
-	tnl/t_save_playback.c     - new per-vertex code
-	tnl/t_vtx_eval.c          - old per-vertex code
-
-Other new files:
-	bufferobj.[ch]		- GL_ARB_vertex_buffer_object functions
-	version.h		- defines the Mesa version info
-
-Other removed files:
-	swrast/s_histogram.[ch]   - moved into src/histogram.c
-
-
-
-Other Changes
--------------
-
-The ctx->Driver.CreateTexture function has been removed - it wasn't used.
-
-New device driver hook functions:
-   NewTextureObject   - used to allocate struct gl_texture_objects
-   NewTextureImage    - used to allocate struct gl_texture_images
-
-New ctx->Texture._EnabledCoordUnits field:
-   With the addition of GL_NV_fragment_program we may need to interpolate
-   various sets of texture coordinates even when the corresponding texture
-   unit is not enabled.  That is, glEnable(GL_TEXTURE_xD) may never get
-   called but we still may have to interpolate texture coordinates across
-   triangles so that the fragment program will get them.
-   This new field indicates which sets of texture coordinates are needed.
-   If a bit is set in the ctx->Texture._EnabledUnits bitmask is set, the
-   same bit MUST be set in ctx->Texture._EnabledCoordUnits.
-
-The ctx->_TriangleCaps field is deprecated.
-   Instead of testing the DD_* bits in _TriangleCaps, you should instead
-   directly test the relevant state variables, or use one of the helper
-   functions like NEED_SECONDARY_COLOR() at the bottom of context.h
-   While testing _TriangleCaps bits was fast, it was kludgey, and setting
-   the bits in the first place could be error prone.
-
-New vertex processing code.
-   The code behind glBegin, glEnd, glVertex, glNormal, etc. has been
-   totally rewritten.  It's a cleaner implementation now and should use
-   less memory. (Keith)
-
-
-
-To Do
------
-Add screen-awareness to fakeglx.c
-
-
-
-
-Device Driver Status
---------------------
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of these drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.4
-OSMesa (off-screen)	implements OpenGL 1.4
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.4
-DJGPP			implements OpenGL 1.4
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.4
-Allegro			needs updating
-D3D			needs updating
-
-Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
-driver call the _mesa_enable_1_4_extensions() function.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.0 b/docs/RELNOTES-6.0
deleted file mode 100644
index 1a3c2fb..0000000
--- a/docs/RELNOTES-6.0
+++ /dev/null
@@ -1,86 +0,0 @@
-
-                           Mesa 6.0 release notes
-
-                             January 16, 2004
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 5.1) designate new developmental releases.
-Even numbered versions (such as 6.0) designate stable releases.
-
-Mesa version 6.0 signifies two things:
-
-  1. A stabilization of the 5.1 development release
-  2. Implementation of the OpenGL 1.5 specification.  When you query
-     glGetString(GL_VERSION) "1.5" will be returned (as long as the
-     driver supports all the required features).
-
-
-Note that the Mesa major version number is incremented with the OpenGL
-minor version number:
-
-   Mesa 1.x  ==  OpenGL 1.0
-   Mesa 2.x  ==  OpenGL 1.1
-   Mesa 3.x  ==  OpenGL 1.2
-   Mesa 4.x  ==  OpenGL 1.3
-   Mesa 5.x  ==  OpenGL 1.4
-   Mesa 6.x  ==  OpenGL 1.5
-
-
-
-New Features
-------------
-
-Mesa 5.1 already had all the new features of OpenGL 1.5, implemented as
-extensions.  These extensions were simply promoted to standard features:
-
-   GL_ARB_occlusion_query extension
-   GL_ARB_texture_non_power_of_two extension
-   GL_ARB_vertex_buffer_object extension
-   GL_EXT_shadow_funcs
-
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on
-the device driver.  For example, if the driver enables all the ARB
-extensions which are part of OpenGL 1.3 then glGetString(GL_VERSION)
-will return "1.3".  Otherwise, it'll return "1.2".
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-
-
-Other Changes
--------------
-
-See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.0.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.0.1 b/docs/RELNOTES-6.0.1
deleted file mode 100644
index 1444b9f..0000000
--- a/docs/RELNOTES-6.0.1
+++ /dev/null
@@ -1,49 +0,0 @@
-
-		       Mesa 6.0.1 release notes
-
-			    April 2, 2003
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Even-numbered versions (such as 6.0.x) designate stable releases.
-Odd-numbered versions (such as 6.1.x) designate new developmental releases.
-
-Mesa 6.0.1 just fixes bugs found since the 6.0 release.  See the VERSIONS
-file for details.
-
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5
-depending on the device driver's capabilities.  For example, if the
-driver enables all the ARB extensions which are part of OpenGL 1.5
-then glGetString(GL_VERSION) will return "1.5".  Otherwise, it'll
-return "1.4" or the next lower version that implements all required
-functionality.
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-FX (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.1 b/docs/RELNOTES-6.1
deleted file mode 100644
index 8de64d1..0000000
--- a/docs/RELNOTES-6.1
+++ /dev/null
@@ -1,111 +0,0 @@
-
-                           Mesa 6.1 release notes
-
-                              August 18, 2004
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.1) designate new developmental releases.
-Even numbered versions (such as 6.0) designate stable releases.
-
-
-New Features
-------------
-
-Half-precision floating point (GLhalf) pixel formats are supported
-in Mesa, but the feature isn't exposed yet since the ARB extension
-hasn't been finalized yet.
-
-
-Texture image handling
-----------------------
-
-The code which implements image conversion, pixel transfer ops, etc
-for glTexImage commands has been rewritten.
-
-Now the gl_texture_format struct has a new StoreImage function
-pointer.  Each texture format must implement this function.  The
-function is totally responsible for converting the user's texture
-image into the specific format.  A few helper functions makes this
-relatively simple.
-
-Overall, the code is much simpler, cleaner and easier to work with
-now.  Adding new texture formats is straight-forward and there's no
-longer any distinction between "hardware" and "software" formats.
-
-Finally, the code for compressed texture images has been reorganized
-as well.
-
-Removed files:
-  texutil.c
-  texutil.h
-  texutil_tmp.h
-
-New files:
-  texcompress_s3tc.c
-  texcompress_fxt1.c
-
-
-
-Driver / context changes
-------------------------
-
-The _mesa_create_context() and _mesa_initialize_context() function
-parameters have changed.  They now take a pointer to a struct
-dd_function_table.  Drivers can initialize this table by calling
-_mesa_init_driver_functions().  Drivers should then plug in the special
-functions they implement.  In particular, the ctx->Driver.NewTextureObject
-pointer _must_ be set so that the default texture objects created in
-_mesa_create/initialize_context() are correctly built.
-
-The _mesa_init_driver_functions() function allows a lot of redundant code
-to be removed from the device drivers (such as initializing
-ctx->Driver.Accum to point to _swrast_Accum).  Adding new functions to
-the dd_function_table can be done with less hassle since the pointer can
-be initialized in _mesa_init_driver_functions() rather than in _all_ the
-drivers.
-
-
-Device Drivers
---------------
-
-Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5
-depending on the device driver's capabilities.  For example, if the
-driver enables all the ARB extensions which are part of OpenGL 1.5
-then glGetString(GL_VERSION) will return "1.5".  Otherwise, it'll
-return "1.4" or the next lower version that implements all required
-functionality.
-
-A number of Mesa's software drivers haven't been actively maintained for
-some time.  We rely on volunteers to maintain many of the drivers.
-Here's the current status of all included drivers:
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-
-Other Changes
--------------
-
-See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.1.
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.2 b/docs/RELNOTES-6.2
deleted file mode 100644
index 06cfba0..0000000
--- a/docs/RELNOTES-6.2
+++ /dev/null
@@ -1,51 +0,0 @@
-
-                           Mesa 6.2 release notes
-
-                              October 2, 2004
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.1) designate new developmental releases.
-Even numbered versions (such as 6.2) designate stable releases.
-
-
-This release primarily just fixes bugs found in the Mesa 6.1 release.
-See the VERSIONS file for details.
-
-
-ToDo: PBO for polygon stipple, convolution filter, etc.
-
-
-
-Known Issues
-------------
-
-The GL_EXT_pixel_buffer_object extension isn't fully implemented for
-functions like glPolygonStipple, glConvolutionFilter, glColorTable,
-etc.  The important functions like glRead/DrawPixels, glTex[Sub]Image,
-and glBitmap work with PBOs.
-
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.2.1 b/docs/RELNOTES-6.2.1
deleted file mode 100644
index c7baa5d..0000000
--- a/docs/RELNOTES-6.2.1
+++ /dev/null
@@ -1,49 +0,0 @@
-
-                           Mesa 6.2.1 release notes
-
-                              December 9, 2004
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.1) designate new developmental releases.
-Even numbered versions (such as 6.2.x) designate stable releases.
-
-
-This release primarily just fixes bugs found in the Mesa 6.2 release.
-See the VERSIONS file for details.
-
-
-
-Known Issues
-------------
-
-The GL_EXT_pixel_buffer_object extension isn't fully implemented for
-functions like glPolygonStipple, glConvolutionFilter, glColorTable,
-etc.  The important functions like glRead/DrawPixels, glTex[Sub]Image,
-and glBitmap work with PBOs.  This has been fixed for Mesa 6.3.
-
-
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.3 b/docs/RELNOTES-6.3
deleted file mode 100644
index 6b4dfaa..0000000
--- a/docs/RELNOTES-6.3
+++ /dev/null
@@ -1,114 +0,0 @@
-
-                           Mesa 6.3 release notes
-
-                              July 20, 2005
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.3) designate new developmental releases.
-Even numbered versions (such as 6.2) designate stable releases.
-
-
-
-New Features
-------------
-
-GL_ARB_draw_buffers - allows a fragment program to write to a number of
-  separate color buffers, instead of just one.
-
-GL_OES_read_format - allows one to query the fastest glReadPixels format
-  and datatype.
-
-GL_ARB_pixel_buffer_object - buffer objects for pixel read/write functions.
-
-GL_EXT_framebuffer_object - allows render-to-texture and provides a
-  window-system indepedent Pbuffer facility.
-  The Mesa CVS tree contains a couple tests of this extension.
-
-DirectFB driver, contributed by Claudio Ciccani.  See docs/README.directfb
-for details.
-
-
-
-Vertex/Fragment Program PRINT Instruction
------------------------------------------
-
-The GL_NV_vertex_program and GL_NV_fragment_program languages have been
-extended with a PRINT instruction.
-
-
-
-glDeleteTextures(), glDeletePrograms() and glDeleteBuffers() Changed
---------------------------------------------------------------------
-
-To match the behaviour of other OpenGL implementations, glDeleteTextures,
-glDeletePrograms and glDeleteBuffers have been modified so that:
-
-  * The named texture/program/buffer ID is immediately freed for re-use.
-
-  * The actual texture object, program or buffers isn't really deleted until
-    it is no longer bound in any rendering context (the reference count
-    is zero).
-
-Previously, the texture/program/buffer ID wasn't freed until the object
-was really deleted.
-
-Note that textures, programs and buffers can be shared by several rendering
-contexts so they can't be deleted until they're unbound in _all_ contexts.
-
-
-
-GL_EXT_framebuffer_object changes
----------------------------------
-
-Implementing this extension involved changing a lot of code (for the better).
-
-The gl_framebuffer object now a collection of gl_renderbuffer objects.
-Renderbuffers may store colors, stencil indices, or depth values.  The
-gl_framebuffer and gl_renderbuffer types are object-oriented in design.
-
-All the old RGB, color index, stencil and depth-related span functions for
-reading/writing pixels from/to buffers has changed.  Now, all pixels are
-read/written through a set of common renderbuffer functions (methods).
-
-Most device drivers have been updated for these changes, but some haven't.
-
-
-
-To Do (someday) items
----------------------
- Switch to freeglut
- Increase MAX_DRAWBUFFERS
- driver hooks for BeginQuery/EndQuery
-
-
-
-Miscellaneous
--------------
-
-The main/get.c file is now generated with a Python script (get_gen.py).
-
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.3.1 b/docs/RELNOTES-6.3.1
deleted file mode 100644
index eacc952..0000000
--- a/docs/RELNOTES-6.3.1
+++ /dev/null
@@ -1,48 +0,0 @@
-
-                           Mesa 6.3.1 release notes
-
-                               July XX, 2005
-
-                              PLEASE READ!!!!
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.3) designate new developmental releases.
-Even numbered versions (such as 6.2) designate stable releases.
-
-
-
-DRI drivers
------------
-
-This release includes the DRI drivers and GLX code for hardware rendering.
-
-
-
-Bug fixes
----------
-
-Bugs fixed in 6.3.1 are listed in the VERSIONS file.
-
-
-
-Driver			Status
-----------------------	---------------------
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.3.2 b/docs/RELNOTES-6.3.2
deleted file mode 100644
index e5243ef..0000000
--- a/docs/RELNOTES-6.3.2
+++ /dev/null
@@ -1,36 +0,0 @@
-
-		       Mesa 6.3.2 Release Notes
-
-			   August 19, 2005
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.3) designate new developmental releases.
-Even numbered versions (such as 6.2) designate stable releases.
-
-
-6.3.2 is primarily a bug-fix release.  See the VERSIONS file for details.
-
-
-
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-
-
-----------------------------------------------------------------------
diff --git a/docs/RELNOTES-6.4 b/docs/RELNOTES-6.4
deleted file mode 100644
index 1a945a1..0000000
--- a/docs/RELNOTES-6.4
+++ /dev/null
@@ -1,49 +0,0 @@
-
-		        Mesa 6.4 Release Notes
-
-			   October 24, 2005
-
-
-
-Introduction
-------------
-
-Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 6.3) designate new developmental releases.
-Even numbered versions (such as 6.4) designate stable releases.
-
-
-6.4 is a bug-fix release.  See the VERSIONS file for details.
-
-
-
-GLUT tarball
-------------
-
-Starting with 6.4, the GLUT library sources are distributed in a separate
-tarball.  This was done at the request of Linux distro vendors who prefer
-to use freeglut.
-
-
-
-
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Windows/Win32		implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)  requires updates	
-SVGA			requires updates
-DJGPP			requires updates
-GGI			requires updates
-BeOS			requires updates
-Allegro			requires updates
-D3D			requires updates
-
-The drivers which require updates mostly need to be updated to work
-with the new gl_renderbuffer / gl_framebuffer infrastructure introduced
-in Mesa 6.3.
-
-
-----------------------------------------------------------------------
diff --git a/docs/VERSIONS b/docs/VERSIONS
deleted file mode 100644
index 0ebcd14..0000000
--- a/docs/VERSIONS
+++ /dev/null
@@ -1,1514 +0,0 @@
-
-
-Mesa Version History
-====================
-
-1.0 beta   February 1995
-    Initial release
-
-1.1 beta   March 4, 1995
-    Changes:
-	faster point and line drawing (2x faster)
-	more systems supported, better Makefiles
-	Renamed lib*.a files to avoid collisions
-	many small bug fixes
-    New:
-	pseudo-GLX functions added
-	new implementation of evaluators (eval2.c)
-	GLUT support
-
-1.1.1 beta   March 7, 1995
-    Changes:
-	Reverted from eval2.c to eval.c due to FPE on Linux
-	more speed improvements
-	more Makefile changes
-
-1.1.2 beta   March 14, 1995
-    New:
-	implementation of SGI's blending extensions
-	glXUseXFont implemented
-	added MESA_DEBUG environment variable support
-    Changes:
-	Using eval2.c again
-	more FPE-prevention checks (0-length normals are OK)
-	a few small bug fixes
-	much faster pixel logic ops!
-	faster transformation arithmetic
-
-1.1.3 beta   March 31, 1995
-    New:
-	gluScaleImage() and gluBuild2DMipMaps() implemented
-	Mesa widgets for Xt/Motif
-	blendEXT demos
-	added environment variables for selecting visuals
-    Changes:
-	almost all GLUT demos work correctly now
-	faster X device driver functions
-	more bug fixes
-
-1.1.4 beta   April 20, 1995
-    Bug fixes:
-	- missing #define SEEK_SET in src-tk/image.c
-	- compile glShadeModel into display lists
-	- fixed pow() domain error in src/light.c
-	- fixed "flickering bitmaps" in double buffer mode
-	- fixed tk.h and aux.h for C++
-	- state of LIGHT_MODEL_LOCAL_VIEWER was inverted
-    New features:
-	- MUCH, MUCH nicer dithering in 8-bit RGB mode
-	- updated widgets and widget demos
-	- Implemented GLXPixmap functions
-	- Added GLU 1.1 and GLX 1.1 functions
-	- Changed the X/Mesa interface API, more versatile
-	- Implemented gluPartialDisk()
-
-1.2   May 22, 1995
-    Bug fixes:
-	- IRIX 4.x makefile problem
-	- modified tk to share root colormap as needed
-	- gluLookAt normalization problem
-	- suppress Expose, NoExpose events in swapbuffers
-	- glBitmap() and glDrawPixels() clipping
-    New features:
-	- GL_BLEND, GL_MODULATE, GL_DECAL, and GL_REPLACE_EXT texture
-	      modes implemented
-	- texture maps stored more efficiently
-	- texture maps can be compiled into display lists
-	- Bogdan Sikorski's GLU polygon tesselation code
-	- Linas Vepstas's sweep and extrusion library
-	- glXCreateContext()'s shareList parameter works as it's supposed to.
-	      XMesaCreateContext() updated to accept a shareList parameter too.
-	- Mesa can be compiled with real OpenGL .h files
-	- MESA_BACK_BUFFER environment variable
-	- better GLX error checking
-
-1.2.1   June 22, 1995
-    Bug fixes:
-	- X/Mesa double buffer window resize crash
-	- widgets now pass PointerMotion events
-	- X/Mesa incorrect default clear color and drawing color
-	- more robust X MIT-SHM support in X/Mesa
-	- glTexImage( format=GL_LUMINANCE ) didn't work
-	- GL_LINE mode polygons with line width > 1.0 could cause a crash
-	- numerous feedback bugs
-	- glReadPixels() from depth buffer was wrong
-	- error prone depth and stencil buffer allocation
-    New features:
-	- Preliminary Microsoft Windows driver
-	- Implemented a number of missing functions: glEvalCoord[12][df]v(),
-	    glGet...(), etc.
-	- Added a few missing symbols to gl.h and glu.h
-	- Faster rendering of smooth-shaded, RGBA, depth-buffered polygons.
-	- Faster rendering of lines when width=2.0
-	- Stencil-related functions now work in display lists
-    Changes:
-	- renamed aux.h as glaux.h (MS-DOS names can't start with aux)
-	- most filenames are in 8.3 format to accomodate MS-DOS
-	- use GLubytes to store arrays of colors instead of GLints
-
-1.2.2   August 2, 1995
-    New features:
-	- texture mapped points and lines
-	- NURBS! (but not 100% complete)
-	- viewports may safely extend beyond window boundaries
-	- MESA_PRIVATE_CMAP environment variable
-	- Grayscale X display support
-	- two new demos:  demos/gears.c and demos/shadow.c
-	- MachTen for Macintosh configuration
-    Bug fixes:
-	- glGet*(GL_DEPTH_BITS) returned bytes, not bits
-	- point, line, and bitmap rasterization suffered from roundoff errors
-	- fixed a division by zero error in line clippping
-	- occasional wrong default background color really fixed!
-	- glDepthFunc(GL_ALWAYS) with glDepthMask(GL_FALSE) didn't work
-	- gluBuild2DMipmaps malloc problem fixed
-	- view volume clipping of smooth shaded lines resulted in bad colors
-    Changes:
-	- new visual selection method in glXChooseVisual()
-	- improved GLU quadric functions
-	- call XSync for glFinish and XFlush for glFlush
-	- glVertex() calls now use a function pointer to avoid conditionals
-	- removed contrib directory from Mesa tar file (available on ftp site)
-	- AIX shared library support
-	- Removed GLUenum type as it's not in OpenGL
-
-1.2.3   September 26, 1995
-    New features:
-	- Mesa header files now equivalent to SGI OpenGL headers
-	- Support for HP's Color Recovery dithering displays
-	- Faster vertex transformation
-	- Faster raster operations into X windows under certain conditions
-	- New configurations:  HP w/ shared libs, Ultrix w/ GCC, Data General
-	- 4-bit visuals now supported
-    Bug fixes:
-	- glScissor bug fixed
-	- round-off errors in clipping lines against clip planes fixed
-	- byte swapping between hosts and display servers implemented
-	- glGetError() can be called without a current rendering context
-	- problem with accidentally culled polygons is fixed
-	- fixed some widget compilation problems
-
-1.2.4   November 17, 1995
-    New features:
-	- More speed improvements (lighting, fogging, polygon drawing)
-	- Window system and OS-independent off-screen rendering
-	- Preliminary Fortran bindings
-	- glPolygonOffsetEXT implemented
-	- glColorMask and glIndexMask now fully implemented
-	- glPixelZoom implemented
-	- display lists fully implemented
-	- gamma correction
-	- dithering in 8-bit TrueColor/DirectColor visuals
-    Changes:
-	- Improved device driver interface
-	- tk.h renamed to gltk.h to avoid conflicts with Tcl's Tk
-	- Dithering support moved from core into device driver
-    Bug fixes:
-	- glEnable/Disable( GL_LIGHTING ) didn't always take effect
-	- glReadPixels byte swapping was broken
-	- glMaterial with pname==GL_AMBIENT_AND_DIFFUSE was broken
-	- duplicate glColor4b() prototype in GL/gl.h removed
-	- stripes in wave -ci demo fixed
-	- GL_LINEAR_MIPMAP_NEAREST had wrong value
-	- bugs in HP Color Recovery support fixed
-	- fixed bug when blending lines, points, bitmaps outside of window
-
-1.2.5   November 30, 1995
-    New Features:
-	- updated MS Windows driver
-	- new implementation of StaticGray/GrayScale visual support
-    Bug fixes:
-	- pixelzooming with gamma correction or blending didn't work
-	- HP color recovery visual wasn't being picked by glXChooseVisual
-	- glClear didn't always observe glColorMask changes
-	- olympic and offset demos didn't compile on some Suns
-	- texcoord clamping wasn't correct
-	- a polygon optimization introduced an occasional sampling problem
-
-1.2.6   January 26, 1996
-    New Features:
-	- faster line and polygon rendering under certain conditions.  See
-	  Performance Tips 9 and 10 in README
-	- profiling
-	- lighting is a bit faster
-	- better perspective corrected texture mapping
-	- Amiga AmiWin (X11) support
-	- preliminary Linux SVGA driver
-    Changes:
-	- now using a 16-bit depth buffer, faster, smaller
-	- GL_NORMALIZE is disabled by default
-    Bug fixes:
-	- projective texture mapping
-	- fixed a memory leak in the context destroy function
-	- GL_POLYGON with less than 3 vertices caused a crash
-	- glGet*() returned wrong result for GL_INDEX_MODE
-	- reading pixels from an unmapped X window caused a BadMatch error
-
-1.2.7   March 5, 1996
-    New:
-	- faster lighting
-	- faster 16-bit TrueColor rendering on Linux
-	- faster 32-bit TrueColor rendering on Linux, HP, IBM
-	- non-depth-buffered XImage polygons are faster
-	- vertex array extension
-	- software alpha planes
-	- updated Macintosh driver
-	- new NeXT driver
-	- GLU quadric functions generate texture coordinates
-	- reflect.c demo - reflective, textured surface demo
-    Changes:
-	- gamma correction code moved into the X driver for better performance
-    Bug fixes:
-	- multiple glClipPlane()'s didn't work reliably
-	- glPolygonMode() didn't always work
-	- glCullFace( GL_FRONT_AND_BACK ) didn't work
-	- texture mapping with gamma correction was buggy
-	- floating point exceptions in texture coordinate interpolation
-	- XImage byte swapping didn't always work
-	- polygon edge flags weren't always used correctly
-
-1.2.8   May 22, 1996
-    New:
-	- overlay planes on X servers with the SERVER_OVERLAY_VISUALS property
-	- better monochrome output
-	- more IRIX 6.x configurations
-	- more robust RGB mode color allocation
-	- added MESA_XSYNC environment variable
-	- GLX_MESA_pixmap_colormap and GLX_EXT_visual_info extensions
-	- GL_MESA_window_pos extension
-	- faster glReadPixels/glDrawPixels for GL_DEPTH and GL_UNSIGNED_SHORT
-	  and GL_UNSIGNED_INT
-        - driver for prototype Cirrus Mondello 3-D board
-	- updated AmigaDOS driver
-        - a few small speed optimizations in polygon rendering
-    Changes:
-	- internal device driver interface modified to simplify device
-	  driver implementations and to support hardware Z buffers
-	- several changes to the X/Mesa interface (xmesa.h)
-    Bug fixes:
-	- fixed pow(0,0) domain error triggered on some systems
-	- glStencilClear() in a display list caused an infinite loop
-	- glRasterPos*() was sometimes off by +/-0.5 in X and Y
-	- color masking and blending were performed in wrong order
-	- auxSolidCylinder() sometimes drew a wire-frame cylinder
-	- fixed file writing bug in osdemo.c
-	- pixel mapping didn't always work
-	- the GL_GEQUAL stencil func didn't work
-	- the GL_INVERT stencil op didn't work
-	- the stencil write mask didn't work
-	- glPush/PopAttrib() didn't do enough error checking
-	- glIsList() didn't always work correctly
-
-2.0  October 10, 1996
-    New:
-	- Implements OpenGL 1.1 API functions
-	- all texture filtering modes supported (mipmapping)
-	- faster texture mapping, see Performance Tip 11 in README
-	- antialiased RGB points
-	- X support for line and polygon stippling
-	- glDrawBuffer( GL_FRONT_AND_BACK ) works
-	- util/ directory of useful stuff
-	- demos/texobj demo of texture objects
-    Changes:
-	- major internal changes for thread-safeness
-	- new device driver interface
-	- MESA_ALPHA env variable removed
-	- triangle rasterizer replaces polygon rasterizer
-    Bug fixes:
-	- glPopAttrib() bug
-	- glDrawBuffer(GL_NONE) works now
-
-2.1  December 14, 1996
-    New:
-	- VMS support
-	- MS-DOS driver
-	- OpenStep support
-	- updated, combined Windows 95/NT driver
-	- implemented glGetLighti() and glGetTexGen*()
-	- GLX does garbage collection of ancillary buffers
-    Bug fixes:
-	- removed unused _EXT constants from gl.h
-	- fixed polygon offset bugs
-	- Z coordinates of clipped lines were incorrect
-	- glEdgeFlag() in display lists didn't always work
-	- glLight*() in display lists didn't work
-	- fixed X line stipple bugs (Michael Pichler)
-	- glXUseXfonts XFreeFont/XFreeFontInfo bug fixed
-	- fixed a feedback bug
-	- glTexGen*() now transforms GL_EYE_PLANE by inverse modelview matrix
-	- polygons were sometimes culled instead of clipped
-	- triangle rasterizer suffered from float/int overflow exceptions
-	- fixed FP underflow exception in lighting (specular exponent)
-	- glEnable/glDisable of GL_EXT_vertex_array enums didn't work
-	- fixed free(NULL) in GLU tesselator code
-	- using 24-bit color on some X servers resulted in garbage rendering
-	- 32-bit per pixel mode for XFree86 now works
-	- glRotate(a,0,0,0) gave unpredictable results
-	- GL_LINE_STRIP with > 480 vertices had occasional clipping problems
-	- 8-bit TrueColor GLXPixmap rendering incorrectly required a colormap
-	- glMaterial() wasn't ignored when GL_COLOR_MATERIAL was enabled
-	- glEnable(GL_COLOR_MATERIAL) followed by glColor() didn't work right
-	- accumulation buffer was limited to positive values
-	- projective textures didn't work
-	- selection buffer overflows weren't handled correctly
-    Changes:
-	- restored the GL_EXT_polygon_offset extension
-	- slightly faster RGB dithering
-	- the SVGA driver works again
-	- Amiga driver now distributed separately
-	- NeXT driver updated for Mesa 2.x
-
-2.2  March 14, 1997
-    New:
-	- better color selection when dithering
-	- added GL_EXT_texture_object extension
-	- updated MS-DOS driver for DJGPP
-	- added openbsd make configuration
-	- faster dithered flat-shaded triangles
-	- various compilation problems with Motif widgets fixed
-	- gl.h, glx.h and glu.h name mangling option
-	- BeOS driver
-	- 3D texture mapping extension
-	- GL_MESA_resize_buffers extension
-	- morph3d, stex3d and spectex demos
-	- 3Dfx support
-    Bug fixes:
-	- glColorMaterial should finally work right in all respects
-	- linear interpolation of mipmap levels was incorrectly weighted
-	- readpix.c didn't compile on Macintosh
-	- GL_INVERT and related logic ops didn't work right
-	- glTexImage[12]D() didn't check its parameters consistantly
-	- fixed a memory leak in glTexImage[12]D()
-	- kludged around a SunOS 5.x/GCC compiler bug in the feedback code
-	- glReadPixels aborted instead of normally catching some errors
-	- a few 1.1 constants were missing or misnamed in gl.h
-	- glBegin(p); glBegin(q); didn't generate an error
-	- fixed a memory leak in GLX code
-	- clipping of concave polygons could cause a core dump
-	- 1-component alpha texture maps didn't work
-	- fixed a GLU polygon tesselator bug
-	- polygons with colinear vertices were sometimes culled
-	- feedback triangle colors were wrong when using smooth shading
-	- textures with borders didn't work correctly
-	- colors returned in feedback mode were wrong when using lighting
-	- spotlights didn't effect ambient lighting correctly
-	- gluPartialDisk() had a few bugs
-    Changes:
-	- device driver interface expanded to support texture mapping
-	- faster matrix inversion subroutine
-	- commented out #include "wmesa_extend.h" from src/wmesa.c
-	- fixed many compiler warnings in the demo programs
-
-2.3  June 30, 1997
-    New:
-	- Mesa distribution divided into two pieces:  library code and demos
-	- faster vertex transformation, clip testing, lighting
-	- faster line drawing
-	- TrueColor visuals how have dithering (for depths < 24 bits)
-	- added MESA_NO_DITHER environment variable
-	- new device driver function: NearFar(), RenderVB(), RasterSetup()
-	- added LynxOS configuration
-	- added cygnus Win32 configuration
-	- added texcyl.c GLUT demo
-	- added XMesaDitherColor() to X/Mesa interface
-	- new NURBS code from Bogdan Sikorski
-	- added demos/shape.c (non-rectangular X window!)
-    Bug fixes:
-	- glEnable/DisableClientState() were missing from GL/gl.h
-	- GL_SPHERE_MAP texcoord generation didn't work correctly
-	- glXGetConfig() returned wrong number of depth, stencil, accum bits
-	- glDrawPixels feedback/selection didn't examine RasterPos valid bit
-	- black and white were reversed on some monochrome displays
-	- fixed potential image memory leak (wasn't setting reference counter)
-	- glDrawPixels sometimes didn't recognize some GL state changes
-	- gluProject/UnProject() didn't check for divide by zero
-	- stex3d demo called random() and srandom(), not portable
-	- fixed memory leaks in context.c and drawpix.c
-	- fixed NULL dereferencing problem in gl_update_texture_state()
-	- glReadPixels between glBegin/glEnd didn't generate an error.
-	- fixed memory leak in polygon tesselator (Randy Frank)
-	- fixed seg fault bug drawing flat-shaded, depth-tested lines
-	- clipped GL_TRIANGLE_STRIPs sometimes had wrong color when flat-shaded
-	- glBindTexture sometimes didn't work
-	- fixed a bug deep in glXReleaseBuffersMESA()
-	- fog was mistakenly applied to alpha
-	- glPopMatrix didn't set "dirty matrix" flag
-	- glPolygonStipple pattern was sometimes wrong
-	- glClear wasn't disabled during feedback and selection
-	- fixed memory leak in glTexSubImage[123]D
-    Changes:
-	- many library source files reorganized
-	- faster X color allocation, colors also freed when finished with them
-	- new texture sampling function pointer in texture objects
-	- incorporated 3Dfx VooDoo driver v0.16 into main source tree
-	- many 3Dfx driver updates
-	- cygnus Makefiles now included
-	- updated DOS driver
-	- made a few changes to dosmesa.c and wmesa.c (VB->Unclipped)
-	- internally, colors now stored in GLubytes, not GLfixed
-	- optimized changing of GL_SHININESS parameter
-
-2.4  September 18, 1997
-    New:
-	- updated 3Dfx Glide driver
-	- hacks for 3Dfx rendering into an X window or fullscreen
-	- added depth buffer access functions to X/Mesa and OS/Mesa interfaces
-    Bug fixes:
-	- pixel buffer could overflow with long, wide lines
-	- fixed FP underflow problems in lighting
-	- glTexSubImage1D() had an unitialized variable
-	- incomplete texture objects could cause a segfault
-	- glDrawPixels with GL_COMPILE_AND_EXECUTE caused infinite loop
-	- flat-shaded quads in a strip were miscolored if clipped
-	- mipmapped triangle lod computation now works correctly
-	- fixed a few under/overflow bugs in triangle rasterizer
-	- glArrayElement() assigned bad normal if normal array disabled
-	- changed argument to glXReleaseBuffersMESA()
-	- fixed small triangle underflow bugs in tritemp.h (hopefully)
-	- glBindTexture(target, 0) caused a crash
-	- glTexImage[123]D() with NULL image pointer caused crash
-	- glPixelStore parameters are now ignored during display list execution
-	- fixed a two-sided lighting w/ clipping bug (black vertices)
-	- textures with width!=height were sometimes mis-rendered
-	- "weird" projection matrices could cause div by 0, other fp errors
-    Changes:
-	- changed precompiled header symbol from PCH to PC_HEADER
-	- split api.c into api1.c and api2.c
-	- added hash.c source file (but not used yet)
-	- a few Sun and HP configuration file changes
-	- MESA_GLX_FX env var replaces MESA_FX_WINDOW and MESA_FX_FULLSCREEN
-	- fixed a few cygnus build problems (src/Makefile.cygnus, src/wmesa.c)
-
-2.5  November 20, 1997
-    New:
-	- updated 3Dfx driver (v20) for GLQuake
-	- added GL_EXT_paletted_texture extension
-	- added GL_EXT_shared_texture_palette extension
-	- added GL_EXT_point_parameters extension
-	- now including Mark Kilgard's GLUT library v3.6
-	- new GLUT-based demos in gdemos/
-	- added a few more Unix config targets
-	- added Intel X86 assembly language vertex transformation code
-	- 3Dfx/Glide driver for Mesa now recognizes SST_SCREENREFRESH env var
-	- Windows 95 S3 Virge driver
-    Bug fixes:
-	- glCopyTexImage?D would crash due to uninitialized variable
-	- glColor w/ glColorMaterial in a display list caused a bug
-	- fixed several glDrawPixels() and ReadPixels() bugs in 3Dfx driver
-	- glVertex4*() vertices weren't always projected correctly
-	- trying to use mipmapped textured points or lines caused crash
-	- glColor[34][fd]() values now clamped to [0,1] before int conversion
-    Changes:
-	- new device driver functions for texture mapping
-	- hash tables used for display list and texture object lookup
-	- fixed GLX visual handling code to avoid saving redundant visuals
-	- 3Dfx Glide libraries automatically linked to libMesaGL.so
-	- dropped the Cirrus Logic Mondello code since it's obsolete
-	- updated Cygnus Makefiles (Stephane Rehel)
-	- updated Windows MSVC++ Makefiles (Oleg Letsinsky)
-	- procedure for making library files has changed: scripts now take
-	  a major and minor version arguments.  Make-config changed a lot.
-	- new implementation of glTexSubImage2D()
-	- updated widgets-mesa directory to create libMesaGLwM.a (Motif widget)
-	- separate linux-glide and linux-386-glide configurations
-
-2.6  February 12, 1998
-    New:
-	- Windows WGL functions
-	- updated VMS, DOS, Windows, Cygnus, BeOS, Amiga compilation support
-	- v0.22 of 3Dfx Glide driver
-	- more X86 assembly language optimizations
-	- faster blending for some modes
-	- XMesaSetFXmode() to switch between 3Dfx window and full-screen mode 
-	- added preliminary thread support
-	- added GLX_MESA_copy_sub_buffer extension
-	- some clipping optimizations
-    Bug fixes:
-	- fixed shading/material bug when drawing long primitive strips
-	- fixed clipping problem in long primitive strips
-	- fixed clipping bug when using 3Dfx driver
-	- fixed a problem when trying to use X fonts w/ 3Dfx driver
-	- fixed a texture filter bug in 3Dfx/Glide driver
-	- fixed bug in 3Dfx/Glide driver involving depth mask & clearing
-	- glLoadMatrix to set projection matrix confused the 3Dfx driver
-	- non-identity texture matrices didn't work with linux-386 configs
-	- glGenTextures() didn't reserve the returned texture IDs
-	- NULL proxy image sent to glTexImageXD() caused crash
-	- added texture state validation optimization (Henk Kok)
-	- fixed colormap reuse problem when using both RGB and CI windows
-	- 32bpp True/DirectColor X visuals weren't recognized
-	- fixed potential problem in evaluators memory allocation
-	- fixed assorted demo compilation bugs
-    Changes:
-	- replaced old Mesa/windows/ directory with Mesa/WIN32/ directory
-	- converted a few old glaux/gltk demos to GLUT
-	- renamed directories:  demos -> xdemos,  gdemos -> demos
-
-
-3.0  September 17, 1998
-    New:
-	- OpenGL 1.2 API
-	- GL_EXT_abgr pixel format extension
-	- GL_SGIS_texture_edge_clamp extension
-	- GL_SGIS_multitexture extension (to be replaced by GL_ARB_multitex)
-	- GL_EXT_multitexture extension (to be replaced by GL_ARB_multitex)
-	- GL_EXT_rescale_normal extension and renormal.c demo
-	- GLX_SGI_video_sync extension (a no-op)
-	- antialiased lines
-	- glGetTexImage() now implemented
-	- glDraw/Copy/ReadPixels() optimizations
-	- optimized textured triangle code (Marten Stromberg)
-	- more optimization of dithered TrueColor triangles in X driver
-	- Linux GGI driver
-	- updated MGL driver
-    Bug fixes:
-	- lots of assorted compilation fixes
-	- glInitNames didn't write initial hit record
-	- glBitmap didn't always check for invalid raster position
-	- switching between GLX and OSMesa contexts caused a crash
-	- fixed uninitialized variable in Mesa widget code
-	- fixed typo in texture code which caused book/texgen to crash
-	- fixed texture sampling bug when filter=GL_LINEAR and wrap=GL_CLAMP
-	- gluDisk() in POINT or LINE mode sometimes failed
-	- fixed texture + fog bug
-	- GL_COMPILE_AND_EXECUTE mode didn't work reliably
-	- glMultMatrix in projection matrix mode w/ 3Dfx driver could fail
-	- glDrawPixels(color index pixels) weren't converted to RGBA
-	- fixed possible getenv() buffer overflow security bug
-	- glBitmap in feedback mode was offset by xOrig, yOrig params
-	- device driver's DrawPixels hook was never used
-	- glDrawPixels with zoomY!=1 and top/bottom clipping didn't work
-	- glDrawPixels optimized for GL_LUMINANCE, GL_LUMINANCE_ALPHA, GLubyte
-	- fixed MakeCurrent bug in GLwRedrawObjects() in MesaWorkstation.c
-	- glCopyTexSubImage2D() didn't work with 3Dfx driver
-	- lines with width = 2 could cause crash
-	- glClear with scissor rect sometimes cleared whole buffer
-	- glTexSubImage2D( .. GL_COLOR_INDEX .. ) didn't work
-	- glTexImageXD( .. GL_ABGR_EXT .. ) didn't work
-	- computation of inverse modelview matrix sometimes failed
-	- fixed GL_CLAMP mode texture sampling bug
-	- textured line interpolation was somewhat broken
-	- textured triangle interpolation was also somewhat broken
-	- glGet(MODELVIEW/PROJECTION/TEXTURE_MATRIX_STACK_DEPTH) off by one
-	- evaluator state wasn't fully initialized
-	- texture coordinate clipping was buggy
-	- evaluator surfaces could be mis-colored
-	- glAccum(GL_RETURN, s) didn't obey glColorMask() settings
-	- zero area polygons shouldn't be culled if polygon mode is point/line
-	- clipped width and height of glReadPixels was sometimes off by one
-	- blending with alpha = 0 or 1.0 wasn't always exact
-	- reading of pixels from clipped region was buggy
-	- minor tweaking of X visual management in GLX emulator
-	- glPolygonStipple now obeys pixel unpacking parameters
-	- glGetPolygonStipple now obeys pixel packing parameters
-	- interleaved vertex array texture coordinates were broken
-	- query of proxy texture internal format was broken
-	- alpha channel wasn't reliably cleared
-	- fixed divide by zero error in gluScaleImage if dest size = 1 x 1
-    Conformance bug fixes:
-	- GL_SELECTION_BUFFER_POINTER and GL_SELECTION_BUFFER_SIZE were missing
-	- GL_TEXTURE_INTERNAL_FORMAT was missing
-	- glGet*(GL_POLYGON_STIPPLE) was broken
-	- glPush/PopAttrib() didn't save/restore all texture state
-	- glBitmap in feedback mode didn't work
-	- feedback of texture coords didn't always work
-	- glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLbyte was broke
-	- glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLubyte was broke
-	- glDrawPixels w/ format=GL_STENCIL_INDEX, type=GL_BITMAP was broke
-    Changes:
-	- upgraded GLUT to version 3.7
-	- only GL and GLU library code included in MesaLib.tar.gz
-	- GLUT and all demos now in MesaDemos.tar.gz
-	- glaux and gltk libraries removed
-	- IRIX -n32 and -64 libs go in lib32/ and lib64/ directories
-
-
-3.1 beta 1  November 19, 1998
-    New:
-	- GL_EXT_stencil_wrap extension
-	- GL_INGR_blend_func_separate extension
-	- GL_ARB_multitexture extension
-	- GL_NV_texgen_reflection extension
-	- newly optimized vertex transformation code
-	- updated GLUT 3.7 code
-	- better precision when using 32-bit Z buffer
-	- Allegro DJGPP driver
-    Bug fixes:
-	- glCopyPixels between front/back buffers didn't copy alpha correctly
-	- fixed out-of-bounds memory access in optimized 2-D texture code
-	- glPixelStorei didn't accept GL_PACK/UNPACK_IMAGE_HEIGHT parameter
-	- glGet*() didn't accept GL_MAX_3D_TEXTURE_SIZE parameter
-	- clipping of texture coordinates sometimes had bad R,Q values
-	- GL_CLAMP_TO_EDGE texture sampling was off by 0.5 texels
-	- glEdgeFlagPointer() now takes a GLvoid * instead of GLboolean *
-	- texture was sometimes applied twice with 3Dfx driver
-	- glPush/PopAttrib() fouled up texture object reference counts
-	- glDeleteLists(0, n) caused assertion failure
-	- bilinear texture sampling wasn't accurate enough
-	- glClear w/ glDepthMask(GL_FALSE) didn't work right on 3Dfx
-	- color components were reversed on big endian 32 bpp X visuals
-    Changes:
-	- removed GL_EXT_multitexture extension
-
-
-3.1 beta 2  May 24, 1999
-    New:
-	- multi-textured points and lines (mjk@nvidia.com)
-	- optimized 24bpp X rendering (bernd.paysan@gmx.de)
-	- added allegro support (bernie-t@geocities.com)
-	- cleaned-up Windows-related stuff (Ted Jump)
-	- minor stereo changes (KendallB@scitechsoft.com)
-	- new BeOS driver which implements BGLView class
-	- new Direct3D driver (see src/D3D)
-	- more efficient filled gluCylinder() function
-	- utilities:  util/showbuffer.[ch] and util/glstate.[ch]
-	- fixed some IRIX compiler warnings
-	- added support for building Mesa in XFree86 with
-	    SGI's GLX (kevin@precisioninsight.com)
-    Bug fixes:
-	- a variety of Windows/Mesa bug fixes (mjk@nvidia.com)
-	- packed pixel images weren't unpacked correctly
-	- patches some win32 files in GLUT (mjk@nvidia.com)
-	- glTexImage[123]D() didn't accept internalFormat == GL_COLOR_INDEX
-	- fixed lighting bug in Keith's new shading code
-	- fixed texture segfault seen in Lament screensaver
-	- fixed miscellaneous low-memory bugs
-	- glClear(GL_COLOR_BUFFER_BIT) with RGBA or CI masking was broken
-	- GL_LINEAR sampling of 3D textures was broken
-	- fixed SVR4 'cc' compiler macro problem (dawes@xfree86.org)
-	- added GL_TEXTURE_PRIORITY fix (keithh@netcomuk.co.uk)
-	- fixed wide point and wide line conformance bugs (brianp)
-    Changes:
-	- some device driver changes (see src/dd.h)
-	- new copyright on core Mesa code
-
-
-3.1 beta 3  September 17, 1999
-    New:
-	- optimized glAccum function
-	- optimized 24bpp rendering in XMesa driver
-	- GLU 1.2 polygon tessellator
-    Bug Fixes:
-	- glGetTexLevelParameter wasn't fully implemented
-	- glXUseXFont now handles multi-byte fonts
-	- glIsEnabled(GL_TEXTURE_2D / 3D) returned wrong result
-	- alpha channel of blending points, lines was sometimes incorrect
-    Changes:
-	- New library names:  "libGL" instead of "libMesaGL"
-	- New library numbering: libGL.so.1.2.310
-	- New subdirectories:  docs/ and bin/
-	- New Makefile-system (autoconf,automake,libtool)
-
-
-3.1 final  December 14, 1999
-    New:
-	- added demos/gloss.c
-	- added xdemos/glxdpyinfo.c
-	- added GLX_ARB_get_proc_address extension
-	- rewritten glTexImage code paths (faster, less memory, bug fixes)
-    Bug Fixes:
-	- several vertex array bug fixes
-	- overlapping glCopyPixels with pixel zooming now works
-	- glXUseXFont() bitmaps were vertically shifted by one pixel
-	- glCopyPixels with pixel zooming now works
-
-
-3.2 final  April 24, 2000
-    Bug fixes:
-	- fixed memcpy bugs in span.c
-	- fixed missing glEnd problem in demos/tessdemo.c
-	- fixed bug when clearing 24bpp Ximages
-	- fixed clipping problem found in Unreal Tournament
-	- fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
-	- fixed Loki's 3dfx RGB vs BGR bug
-	- fixed Loki's 3dfx smooth/flat shading bug in SoF
-    Changes:
-	- updated docs/README file
-	- use bcopy() optimizations on FreeBSD
-	- re-enabled the optimized persp_textured_triangle() function
-
-
-3.2.1  July 19, 2000
-    Bug fixes:
-	- gluBuild2DMipmaps() didn't accept GL_BGRA
-	- Fixed compile/makefile problems on IRIX
-	- fixed segfault in 3dfx driver when using GL selection/feedback
-	- no longer cull very, very tiny triangles
-	- blending w/ drawbuffer==GL_FRONT_BACK caused segfault (sw rendering)
-	- fixed Motif detection code in widgets-mesa/configure.in
-	- glColorMaterial and glMaterial updates to emissive and ambient
-	  didn't always work right
-	- Specular highlights weren't always in the right place
-	- clipped GL_LINE mode polygons had interior lines appear
-	- blend term GL_ONE_MINUS_CONSTANT_ALPHA was broken
-	- GL_NICEST fog didn't always work with flat shading
-	- glRect commands in display lists were sometimes miscolored
-	- Line Z offset didn't always work
-	- fixed texgen normal vector problem (gloss's teapot)
-	- numerous GL conformance bugs fixed
-    Changes:
-	- glColorMask(false, false, false, false) handled better/faster
-	- reverted to old GLU polygon tessellator, GLU 1.1
-	- updated Win32 build files
-
-
-3.3  July 21, 2000
-    New:
-	- antialiased triangles now implemented
-	- GL_EXT_texture_env_add texture mode extension
-	- GLX 1.3 API
-	- support for separate draw/read buffers (ie GL_SGI_make_current_read)
-	- thread-safe API dispath
-	- improved glxinfo program
-	- demos/texdown program to measure texture download performance
-	- glext.h header file
-	- demos/geartrain program
-	- GL_EXT_texture_lod_bias extension
-	- demos/lodbias program
-	- further optimized glRead/DrawPixels for 16-bit TrueColor X visuals
-	- GLX_EXT_visual_rating extension (a no-op, however)
-	- GL_HP_occlusion_test extension (for X and OS/Mesa drivers)
-	- demos/occlude program
-	- GL_SGIS_pixel_texture and GL_SGIX_pixel_texture extensions
-	- demos/pixeltex program
-	- GL_SGI_color_matrix extension
-	- GL_SGI_color_table extension
-	- GL_EXT_histogram extension
-	- GL_ARB_texture_cube_map extension
-	- added xdemos/glxheads and xdemos/manywin
-	- demos/texenv.c demo
-	- GL_EXT_texture_env_combine extension (by Holger Waechtler)
-	- Xlib driver is now thread-safe (see xdemos/glthreads)
-    Bug Fixes:
-	- various GL conformance failures fixed since 3.2.1
-    Changes:
-	- gl.h now uses #defines instead of C enums for all tokens
-	- glu.h now uses #defines instead of C enums for all tokens
-	- moved programs from 3Dfx/demos/ into demos/ directory
-
-
-3.4  November 3, 2000
-    New:
-	- optimized glDrawPixels for glPixelZoom(1,-1)
-    Bug Fixes:
-	- widgets-mesa/src/*.c files were missing from 3.3 distro
-	- include/GL/mesa_wgl.h file was missing from 3.3 distro
-	- fixed some Win32 compile problems
-	- texture object priorities weren't getting initialized to 1.0
-	- glAreTexturesResident return value was wrong when using hardware
-	- glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
-	- glReadPixels with GLushort packed types was broken
-	- fixed a few bugs in the GL_EXT_texture_env_combine texture code
-	- glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
-	- fixed some typos/bugs in the VB code
-	- glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
-	- optimized glDrawPixels paths weren't being used
-	- per-fragment fog calculation didn't work without a Z buffer
-	- improved blending accuracy, fixes Glean blendFunc test failures
-	- glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
-	- glXGetProcAddressARB() didn't always return the right address
-	- gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
-	- texture matrix changes weren't always detected (GLUT projtex demo)
-	- fixed random color problem in vertex fog code
-	- fixed Glide-related bug that let Quake get a 24-bit Z buffer
-    Changes:
-	- finished internal support for compressed textures for DRI
-
-
-3.4.1  February 14, 2001
-    New:
-	- fixed some Linux build problems
-	- fixed some Windows build problems
-	- GL_EXT_texture_env_dot3 extension (Gareth Hughes)
-    Bug fixes:
-	- added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
-	- various state-update code changes needed for DRI bugs
-	- disabled pixel transfer ops in glColorTable commands, not needed
-	- fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
-	- updated sources and fixed compile problems in widgets-mesa/
-	- GLX_PBUFFER enum value was wrong in glx.h
-	- fixed a glColorMaterial lighting bug
-	- fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
-	- glXCopySubBufferMESA() Y position was off by one
-	- Error checking of glTexSubImage3D() was broken (bug 128775)
-	- glPopAttrib() didn't restore all derived Mesa state correctly
-	- Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
-	  conformance problems at 16bpp.
-	- clearing depth buffer with scissoring was broken, would segfault
-	- OSMesaGetDepthBuffer() returned bad bytesPerValue value
-	- fixed a line clipping bug (reported by Craig McDaniel)
-	- fixed RGB color over/underflow bug for very tiny triangles
-    Known problems:
-	- NURBS or evaluator surfaces inside display lists don't always work
-
-
-3.4.2  May 17, 2001
-    Bug fixes:
-	- deleting the currently bound texture could cause bad problems
-	- using fog could result in random vertex alpha values
-	- AA triangle rendering could touch pixels outside right window bound
-	- fixed byteswapping problem in clear_32bit_ximage() function
-	- fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
-	- fixed memory leak in glXUseXFont()
-	- fragment sampling in AA triangle function was off by 1/2 pixel
-	- Windows: reading pixels from framebuffer didn't always work
-	- glConvolutionFilter2D could segfault or cause FP exception
-	- fixed segfaults in FX and X drivers when using tex unit 1 but not 0
-	- GL_NAND logicop didn't work right in RGBA mode
-	- fixed a memory corruption bug in vertex buffer reset code
-	- clearing the softwara alpha buffer with scissoring was broken
-	- fixed a few color index mode fog bugs
-	- fixed some bad assertions in color index mode
-	- fixed FX line 'stipple' bug #420091
-	- fixed stencil buffer clear width/height typo
-	- fixed GL error glitches in gl[Client]ActiveTextureARB()
-	- fixed Windows compilation problem in texutil.c
-	- fixed 1/8-pixel AA triangle sampling error
-    Changes:
-	- optimized writing mono-colored pixel spans to X pixmaps
-	- increased max viewport size to 2048 x 2048
-
-
-3.5  June 21, 2001
-    New:
-	- internals of Mesa divided into modular pieces (Keith Whitwell)
-	- 100% OpenGL 1.2 conformance (passes all conformance tests)
-	- new AA line algorithm
-	- GL_EXT_convolution extension
-	- GL_ARB_imaging subset
-	- OSMesaCreateContextExt() function
-	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-	- GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
-	- GL_EXT_fog_coord extension (Keith Whitwell)
-	- GL_EXT_secondary_color extension (Keith Whitwell)
-	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-	- GL_SGIX_depth_texture extension
-	- GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
-	- demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
-	- GL_ARB_texture_env_combine extension
-	- GL_ARB_texture_env_dot3 extension
-	- GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
-	- OSMesaCreateContextExt() function
-	- libOSMesa.so library, contains the OSMesa driver interface
-	- GL/glxext.h header file for GLX extensions
-	- somewhat faster software texturing, fogging, depth testing
-	- all color-index conformance tests now pass (only 8bpp tested)
-	- SPARC assembly language TCL optimizations (David Miller)
-	- GL_SGIS_generate_mipmap extension
-    Bug Fixes:
-	- fbiRev and tmuRev were unitialized when using Glide3
-	- fixed a few color index mode conformance failures; all pass now
-	- now appling antialiasing coverage to alpha after texturing
-	- colors weren't getting clamped to [0,1] before color table lookup
-	- fixed RISC alignment errors caused by COPY_4UBV macro
-	- drawing wide, flat-shaded lines could cause a segfault
-	- vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
-    Changes:
-	- SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
-	- new libOSMesa.so library, contains the OSMesa driver interface
-
-
-4.0  October 22, 2001
-    New:
-	- Mesa 4.0 implements the OpenGL 1.3 specification
-	- GL_IBM_rasterpos_clip extension
-	- GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
-	- GL_ARB_texture_mirrored_repeat extension
-	- WindML UGL driver (Stephane Raimbault)
-	- added OSMESA_MAX_WIDTH/HEIGHT queries
-	- attempted compiliation fixes for Solaris 5, 7 and 8
-	- updated glext.h and glxext.h files
-	- updated Windows driver (Karl Schultz)
-    Bug fixes:
-	- added some missing GLX 1.3 tokens to include/GL/glx.h
-	- GL_COLOR_MATRIX changes weren't recognized by teximage functions
-	- glCopyPixels with scale and bias was broken
-	- glRasterPos with lighting could segfault
-	- glDeleteTextures could leave a dangling pointer
-	- Proxy textures for cube maps didn't work
-	- fixed a number of 16-bit color channel bugs
-	- fixed a few minor memory leaks
-	- GLX context sharing was broken in 3.5
-	- fixed state-update bugs in glPopClientAttrib()
-	- fixed glDrawRangeElements() bug
-	- fixed a glPush/PopAttrib() bug related to texture binding
-	- flat-shaded, textured lines were broken
-	- fixed a dangling pointer problem in the XMesa code (Chris Burghart)
-	- lighting didn't always produce the correct alpha value
-	- fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
-
-
-4.0.1 December 17, 2001
-    New:
-	- better sub-pixel sample positions for AA triangles (Ray Tice)
-	- slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
-    Bug fixes:
-	- added missing break statements in glGet*() for multisample cases
-	- fixed uninitialized hash table mutex bug (display lists / texobjs)
-	- fixed bad teximage error check conditional (bug 476846)
-	- fixed demos readtex.c compilation problem on Windows (Karl Schultz)
-	- added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
-	- silence some compiler warnings (gcc 2.96)
-	- enable the #define GL_VERSION_1_3 in GL/gl.h
-	- added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
-	- fixed glu.h typedef problem found with MSDev 6.0
-	- build libGL.so with -Bsymbolic (fixes bug found with Chromium)
-	- added missing 'const' to glXGetContextIDEXT() in glxext.h
-	- fixed a few glXGetProcAddress() errors (texture compression, etc)
-	- fixed start index bug in compiled vertex arrays (Keith)
-	- fixed compilation problems in src/SPARC/glapi_sparc.S
-	- fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
-	- use glXGetProcAddressARB in GLUT to avoid extension linking problems
-	- provoking vertex of flat-shaded, color-index triangles was wrong
-	- fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
-	- glTexParameter didn't flush the vertex buffer (Ray Tice)
-	- feedback attributes for glDraw/CopyPixels and glBitmap were wrong
-	- fixed bug in normal length caching (ParaView lighting bug)
-	- fixed separate_specular color bug found in Chimera (18 Dec 2001)
-
-
-4.0.2  April 2, 2002
-    New:
-	- New DOS (DJGPP) driver written by Daniel Borca
-	- New driver interface functions for TCL drivers (such as Radeon DRI)
-	- GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
-	  if using deep color channels
-	- latest GL/glext.h and GL/glxext.h headers from SGI
-    Bug fixes:
-	- GL_BLEND with non-black texture env color wasn't always correct
-	- GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
-	- glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
-	- glReadPixels was sometimes mistakenly clipped by the scissor box
-	- glDraw/ReadPixels didn't catch all the errors that they should have
-	- Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
-	- 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
-	- Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
-	- glColorMask as sometimes effecting glXSwapBuffers()
-	- fixed a potential bug in XMesaGarbageCollect()
-	- N threads rendering into one window didn't work reliably
-	- glCopyPixels didn't work for deep color channels
-	- improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
-	- glPopAttrib() didn't correctly restore user clip planes
-	- user clip planes failed for some perspective projections (Chromium)
-    Known bugs:
-	- mipmap LOD computation
-
-
-4.0.3  June 25, 2002
-    New:
-	- updated GL/glext.h file (version 15)
-	- corrected MMX blend code (Jose Fonseca)
-	- support for software-based alpha planes in Windows driver
-	- updated GGI driver (Filip Spacek)
-    Bug fixes:
-	- glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
-	- OSMesaMakeCurrent() didn't recognize buffer size changes
-	- assorted conformance fixes for 16-bit/channel rendering
-	- texcombine alpha subtraction mode was broken
-	- fixed lighting bug with non-uniform scaling and display lists
-	- fixed bug when deleting shared display lists
-	- disabled SPARC cliptest assembly code (Mesa bug 544665)
-	- fixed a couple Solaris compilation/link problems
-	- blending clipped glDrawPixels didn't always work
-	- glGetTexImage() didn't accept packed pixel types
-	- glPixelMapu[is]v() could explode given too large of pixelmap
-	- glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
-	- glXCopyContext() could lead to segfaults
-	- glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
-    Changes:
-	- lots of C++ (g++) code clean-ups
-	- lots of T&L updates for the Radeon DRI driver
-    Known bugs:
-	- mipmap LOD computation (fixed for Mesa 4.1)
-
-
-4.0.4  October 3, 2002
-    New:
-	- GL_NV_texture_rectangle extension
-	- updated glext.h header (version 17)
-	- updated DOS driver (Daniel Borca)
-	- updated BeOS R5 driver (Philippe Houdoin)
-	- added GL_IBM_texture_mirror_repeat
-	- glxinfo now takes -l option to print interesting OpenGL limits info
-	- GL_MESA_ycbcr_texture extension
-	- GL_APPLE_client_storage extension (for some DRI drivers only)
-	- GL_MESA_pack_invert extension
-    Bug fixes:
-	- fixed GL_LINEAR fog bug by adding clamping
-	- fixed FP exceptions found using Alpha CPU
-	- 3dfx MESA_GLX_FX=window (render to window) didn't work
-	- fixed memory leak in wglCreateContest (Karl Schultz)
-	- define GLAPIENTRY and GLAPI if undefined in glu.h
-	- wglGetProcAddress didn't handle all API functions
-	- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
-	- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
-	- error checking in compressed tex image functions had some glitches
-	- fixed AIX compile problem in src/config.c
-	- glGetTexImage was using pixel unpacking instead of packing params
-	- auto-mipmap generation for cube maps was incorrect
-    Changes:
-	- max texture units reduced to six to accomodate texture rectangles
-	- removed unfinished GL_MESA_sprite_point extension code
-
-
-4.1  October 29, 2002
-    New:
-	- GL_NV_vertex_program extension
-	- GL_NV_vertex_program1_1 extension
-	- GL_ARB_window_pos extension
-	- GL_ARB_depth_texture extension
-	- GL_ARB_shadow extension
-	- GL_ARB_shadow_ambient extension
-	- GL_EXT_shadow_funcs extension
-	- GL_ARB_point_parameters extension
-	- GL_ARB_texture_env_crossbar
-	- GL_NV_point_sprite extension
-	- GL_NV_texture_rectangle extension
-	- GL_EXT_multi_draw_arrays extension
-	- GL_EXT_stencil_two_side extension
-	- GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
-	- GL_ATI_texture_mirror_once extension (Ian Romanick)
-	- massive overhaul/simplification of software rasterizer module,
-	  many contributions from Klaus Niederkrueger
-	- faster software texturing in some cases (i.e. trilinear filtering)
-	- new OSMesaGetProcAddress() function
-	- more blend modes implemented with MMX code (Jose Fonseca)
-	- added glutGetProcAddress() to GLUT
-	- added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
-	- pbinfo and pbdemo PBuffer programs
-	- glxinfo -v prints transprent pixel info (Gerd Sussner)
-    Bug fixes:
-	- better mipmap LOD computation (prevents excessive blurriness)
-	- OSMesaMakeCurrent() didn't recognize buffer size changes
-	- assorted conformance fixes for 16-bit/channel rendering
-	- texcombine alpha subtraction mode was broken
-	- fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
-	- clamp colors to [0,inf] in OSMesa if GLchan==GLfloat (Gerk Huisma)
-	- fixed divide by zero error in NURBS tessellator (Jon Perry)
-	- fixed GL_LINEAR fog bug by adding clamping
-	- fixed FP exceptions found using Alpha CPU
-	- 3dfx/glide driver render-to-window feature was broken
-	- added missing GLX_TRANSPARENT_RGB token to glx.h
-	- fixed error checking related to paletted textures
-	- fixed reference count error in glDeleteTextures (Randy Fayan)
-    Changes:
-	- New spec file and Python code to generate some GL dispatch files
-	- Glide driver defaults to "no" with autoconf/automake
-	- updated demos/stex3d with new options
-
-
-5.0  November 13, 2002
-    New:
-	- OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
-	- removed some overlooked debugging code
-	- glxinfo updated to support GLX_ARB_multisample
-	- GLUT now support GLX_ARB_multisample
-	- updated DOS driver (Daniel Borca)
-    Bug fixes:
-	- GL_POINT and GL_LINE-mode polygons didn't obey cull state
-	- fixed potential bug in _mesa_align_malloc/calloc()
-	- fixed missing triangle bug when running vertex programs
-	- fixed a few HPUX compilation problems
-	- FX (Glide) driver didn't compile
-	- setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
-	- a few EXT functions, like glGenTexturesEXT, were no-ops
-	- a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
-	  glMultiDrawArrays and glMultiDrawElements were missing
-	- glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
-	- Pentium 4 Mobile was mistakenly identified as having 3DNow!
-	- fixed one-bit error in point/line fragment Z calculation
-	- fixed potential segfault in fakeglx code
-	- fixed color overflow problem in DOT3 texture env mode
-
-
-5.0.1  March 30, 2003
-    New:
-	- DOS driver updates from Daniel Borca
-	- updated GL/gl_mangle.h file (Bill Hoffman)
-    Bug fixes:
-	- auto mipmap generation for cube maps was broken (bug 641363)
-	- writing/clearing software alpha channels was unreliable
-	- minor compilation fixes for OS/2 (Evgeny Kotsuba)
-	- fixed some bad assertions found with shadowtex demo
-	- fixed error checking bug in glCopyTexSubImage2D (bug 659020)
-	- glRotate(angle, -x, 0, 0) was incorrect (bug 659677)
-	- fixed potential segfault in texture object validation (bug 659012)
-	- fixed some bogus code in _mesa_test_os_sse_exception_support (Linus)
-	- fix fog stride bug in tnl code for h/w drivers (Michel Danzer)
-	- fixed glActiveTexture / glMatrixMode(GL_TEXTURE) bug (#669080)
-	- glGet(GL_CURRENT_SECONDARY_COLOR) should return 4 values, not 3
-	- fixed compilation problem on Solaris7/x86 (bug 536406)
-	- fixed prefetch bug in 3DNow! code (Felix Kuhling)
-	- fixed NeXT build problem (FABSF macro)
-	- glDrawPixels Z values when glPixelZoom!=1 were invalid (bug 687811)
-	- zoomed glDraw/CopyPixels with clipping sometimes failed (bug 689964)
-	- AA line and triangle Z values are now rounded, not truncated
-	- fixed color interpolation bug when GLchan==GLfloat (bug 694461)
-	- glArePrograms/TexturesResident() wasn't 100% correct (Jose Fonseca)
-	- fixed a minor GL_COLOR_MATERIAL bug
-	- NV vertex program EXP instruction was broken
-	- glColorMask misbehaved with X window / pixmap rendering
-	- fix autoconf/libtool GLU C++ linker problem on Linux (a total hack)
-	- attempt to fix GGI compilation problem when MesaDemos not present
-	- NV vertex program ARL-relative fetches didn't work
-    Changes:
-	- use glPolygonOffset in gloss demo to avoid z-fighting artifacts
-	- updated winpos and pointblast demos to use ARB extensions
-	- disable SPARC normal transformation code (bug 673938)
-	- GLU fixes for OS/2 (Evgeny Kotsuba)
-
-
-5.0.2  September 5, 2003
-    Bug fixes:
-	- fixed texgen problem causing texcoord's Q to be zero (stex3d)
-	- default GL_TEXTURE_COMPARE_MODE_ARB was wrong
-	- GL_CURRENT_MATRIX_NV query was wrong
-	- GL_CURRENT_MATRIX_STACK_DEPTH_NV query was off by one
-	- GL_LIST_MODE query wasn't correct
-	- GL_FOG_COORDINATE_SOURCE_EXT query wasn't supported
-	- GL_SECONDARY_COLOR_ARRAY_SIZE_EXT query returned wrong value
-	- blended, wide lines didn't always work correctly (bug 711595)
-	- glVertexAttrib4svNV w component was always 1
-	- fixed bug in GL_IBM_rasterpos_clip (missing return)
-	- GL_DEPTH_TEXTURE_MODE = GL_ALPHA didn't work correctly
-	- a few Solaris compilation fixes
-	- fixed glClear() problem for DRI drivers (non-existant stencil, etc)
-	- fixed int/REAL mixup in GLU NURBS curve evaluator (Eric Cazeaux)
-	- fixed delete [] bug in SI GLU (bug 721765) (Diego Santa Cruz)
-	- glFog() didn't clamp fog colors
-	- fixed bad float/int conversion for GL_TEXTURE_PRIORITY in the
-	  gl[Get]TexParameteri[v] functions
-	- fixed invalid memory references in glTexGen functions (bug 781602)
-	- integer-valued color arrays weren't handled correctly
-	- glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work
-	- GL_EXT_texture_lod_bias is part of 1.4, overlooked in 5.0.1
-    Changes:
-	- build GLUT with -fexceptions so C++ apps propogate exceptions
-
-
-5.1  December 17, 2003
-    New:
-	- reorganized directory tree
-	- GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
-	- GL_ATI_texture_env_combine3 extension (Ian Romanick)
-	- GL_SGI_texture_color_table extension (Eric Plante)
-	- GL_NV_fragment_program extension
-	- GL_NV_light_max_exponent extension
-	- GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle)
-	- GL_ARB_occlusion_query extension
-	- GL_ARB_point_sprite extension
-	- GL_ARB_texture_non_power_of_two extension
-	- GL_IBM_multimode_draw_arrays extension
-	- GL_EXT_texture_mirror_clamp extension (Ian Romanick)
-	- GL_ARB_vertex_buffer_object extension
-	- new X86 feature detection code (Petr Sebor)
-	- less memory used for display lists and vertex buffers
-	- demo of per-pixel lighting with a fragment program (demos/fplight.c)
-	- new version (18) of glext.h header
-	- new spriteblast.c demo of GL_ARB_point_sprite
-	- faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
-	- faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
-    Bug fixes:
-	- really enable OpenGL 1.4 features in DOS driver.
-	- fixed issues in glDrawPixels and glCopyPixels for very wide images
-	- glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint
-	- fixed some texgen bugs reported by Daniel Borca
-	- fixed wglMakeCurrent(NULL, NULL) bug (#835861)
-	- fixed glTexSubImage3D z-offset bug (Cedric Gautier)
-	- fixed RGBA blend enable bug (Ville Syrjala)
-	- glAccum is supposed to be a no-op in selection/feedback mode
-	- fixed texgen bug #597589 (John Popplewell)
-    Changes:
-	- dropped API trace feature (src/Trace/)
-	- documentation overhaul.  merged with website content.  more html.
-	- glxgears.c demo updated to use GLX swap rate extensions
-	- glTexImage1/2/3D now allows width/height/depth = 0
-	- disable SPARC asm code on Linux (bug 852204)
-
-
-6.0  January 16, 2004
-    New:
-	- full OpenGL 1.5 support
-	- updated GL/glext.h file to version 21
-    Changes:
-	- changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h)
-    Bug fixes:
-	- fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color
-	  clamping issue
-	- updated suno5-gcc configs
-	- glColor3 functions sometimes resulted in undefined alpha values
-	- fixed FP divide by zero error seen on VMS with xlockmore, others
-	- fixed vertex/fragment program debug problem (bug 873011)
-	- building on AIX with gcc works now
-	- glDeleteProgramsARB failed for ARB fragment programs (bug 876160)
-	- glDrawRangeElements tried to modify potentially read-only storage
-	- updated files for building on Windows
-
-
-6.0.1  April 2, 2004
-    New:
-	- upgraded glext.h to version 22
-	- new build targets (Dan Schikore)
-	- new linux-x86-opteron build target (Heath Feather)
-    Bug fixes:
-	- glBindProgramARB didn't update all necessary state
-	- fixed build problems on OpenBSD
-	- omit CVS directories from tarballs
-	- glGetTexImage(GL_COLOR_INDEX) was broken
-	- fixed an infinite loop in t&l module
-	- silenced some valgrind warnings about using unitialized memory
-	- fixed some compilation/link glitches on IRIX (Mike Stephens)
-	- glBindProgram wasn't getting compiled into display lists
-	- GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079)
-	- two-sided lighting and vertex program didn't work (bug 887330)
-	- stores to program parameter registers in vertex state programs
-	  didn't work.
-	- fixed glOrtho bug found with gcc 3.2.2 (RH9)
-	- glXCreateWindow() wasn't fully implemented (bug 890894)
-	- generic vertex attribute arrays didn't work in display lists
-	- vertex buffer objects' default usage and access fields were wrong
-	- glDrawArrays with start!=0 was broken
-	- fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken
-	- linux-osmesa16-static config didn't work
-	- fixed a few color index rendering problems (bug 910687)
-	- glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE
-	- OSMesa RGB and BGR modes were broken
-	- glProgramStringARB mistakenly required a null-terminated string
-	- fragment program XPD instruction was incorrect
-	- glGetMaterial() didn't work reliably
-	- ARB_fragment_program KIL instruction was incorrect
-
-
-6.1  August 18, 2004
-    New:
-	- Revamped Makefile system
-	- glXUseRotatedXFont() utility (see xdemos/xuserotfont.c)
-	- internal driver interface changes related to texture object
-	  allocation, vertex/fragment programs, BlendEquationSeparate, etc.
-	- option to walk triangle edges with double-precision floats
-	  (Justin Novosad of Discreet) (see config.h file)
-	- support for AUX buffers in software GLX driver
-	- updated glext.h to version 24 and glxext.h to version 6
-	- new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars
-	- updated BeOS support (Philippe Houdoin)
-    Changes:
-	- fragment fog interpolation is perspective corrected now
-	- new glTexImage code, much cleaner, may be a bit faster
-    Bug fixes:
-	- glArrayElement in display lists didn't handle generic vertex attribs
-	- glFogCoord didn't always work properly
-	- ARB_fragment_program fog options didn't work
-	- frag prog TEX instruction no longer incorrectly divides s,t,r by q
-	- ARB frag prog TEX and TEXP instructions now use LOD=0
-	- glTexEnviv in display lists didn't work
-	- glRasterPos didn't do texgen or apply texture matrix
-	- GL_DOUBLE-valued vertex arrays were broken in some cases
-	- fixed texture rectangle edge/border sampling bugs
-	- sampling an incomplete texture in a fragment program would segfault
-	- glTexImage was missing a few error checks
-	- fixed some minor glGetTexParameter glitches
-	- GL_INTENSITY was mistakenly accepted as a <format> to glTexImage
-	- fragment program writes to RC/HC register were broken
-	- fixed a few glitches in GL_HP_occlusion_test extension
-	- glBeginQueryARB and glEndQueryARB didn't work inside display lists
-	- vertex program state references were broken
-	- fixed triangle color interpolation bug on AIX (Shane Blackett)
-	- fixed a number of minor memory leaks (bug #1002030)
-
-
-6.2  October 2, 2004
-    New:
-	- enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-	- updated Doxygen support (Jose Fonseca)
-    Changes:
-	- some GGI driver updates (Christoph Egger, bug 1025977)
-    Bug fixes:
-	- Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-	- fixed a few compilation issues on IRIX
-	- fixed a matrix classification bug (reported by Wes Bethel)
-	- we weren't reseting the vertex/fragment program error state
-	  before parsing (Dave Reveman)
-	- adjust texcoords for sampling texture rectangles (Dave Reveman)
-	- glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-	- repeated calls to glDeleteTexture(t) could lead to a crash
-	- fixed potential ref count bugs in VBOs and vertex/fragment programs
-	- spriteblast demo didn't handle window size changes correctly
-	- glTexSubImage didn't handle pixels=NULL correctly for PBOs
-	- fixed color index mode glDrawPixels bug (Karl Schultz)
-
-
-6.2.1  December 9, 2004
-    Bug fixes:
-	- don't apply regular fog or color sum when using a fragment program
-	- glProgramEnvParameter4fARB always generated an error on
-	  GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-	- glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-	- fixed width/height mix-up in glSeparableFilter2D()
-	- fixed regression in glCopyPixels + convolution
-	- glReadPixels from a clipped front color buffer didn't always work
-	- glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-	- Attempting queries/accesses of VBO 0 weren't detected as errors
-	- paletted textures failed if the palette had fewer than 256 entries
-    Changes:
-	- fixed a bunch of compiler warnings found with gcc 3.4
-	- bug reports should to go bugzilla.freedesktop.org
-
-
-6.3  July 20, 2005
-    New:
-	- GL_EXT_framebuffer_object extension
-	- GL_ARB_draw_buffers extension
-	- GL_ARB_pixel_buffer_object extension
-	- GL_OES_read_format extension (Ian Romanick)
-	- DirectFB driver (Claudio Ciccani)
-	- x86_64 vertex transformation code (Mikko T.)
-	- Updated GL/glext.h to version 29
-    Changes:
-	- added -stereo option for glxgears demo (Jacek Rosik)
-	- updated the PBuffer demo code in xdemos/ directory
-	- glDeleteTextures/Programs/Buffers() now makes the object ID
-	  available for immediate re-use
-	- assorted 64-bit clean-ups fixes (x86_64 and Win64)
-	- lots of internal changes for GL_EXT_framebuffer_object
-    Bug fixes:
-	- some functions didn't support PBO functionality
-	- glGetTexImage didn't convert color index images to RGBA as required
-	- fragment program texcoords were sometimes wrong for points and lines
-	- fixed problem with negative dot product in arbfplight, fplight demos
-	- fixed bug in perspective correction of antialiased, textured lines
-	- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
-	- fixed a couple per-pixel fog bugs (Soju Matsumoto)
-	- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
-	- fixed float parsing bug in ARB frag/vert programs (bug 2520)
-	- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
-	- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
-	- glXChooseFBConfig() crashed if attribList pointer was NULL
-	- program state.light[n].spot.direction.w was wrong value (bug 3083)
-	- fragment program fog option required glEnable(GL_FOG) - wrong.
-	- glColorTable() could produce a Mesa implementation error (bug 3135)
-	- RasterPos could get corrupted by color index rendering path
-	- Removed bad XTranslateCoordinates call when rendering to Pixmaps
-	- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
-	- fixed a few Darwin compilation problems
-
-
-6.3.1
-    This was an intermediate release for X.org which wasn't otherwise released.
-
-
-6.3.2  August 19, 2005
-    New:
-	- The distribution now includes the DRI drivers and GLX code
-    Changes:
-	- Made the DRI "new" driver interface standard, remove old code
-    Bug fixes:
-	- GL_ARB_vertex/fragment_shader were mistakenly listed in the
-	  extensions string
-	- negative relative addressing in vertex programs was broken
-	- update/fix SPARC assembly code for vertex transformation
-	- fixed memory leak when freeing GLX drawables/renderbuffers
-	- fixed display list memory leak
-	- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
-	- wglGetProcAddress() didn't handle wgl-functions
-	- fixed glxext.h cross-compile issue (Colin Harrison)
-	- assorted DRI driver fixes
-
-
-6.4  October 24, 2005
-    New:
-	- Added a fast XOR line drawing function in Xlib driver
-	- Added support for GL_ARB_texture_mirrored_repeat to savage
-	  driver (supported only on Savage4 hardware).
-    Changes:
-	- Mesa now packaged in three parts: Library, Demos and GLUT
-    Bug fixes:
-	- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
-	- Some files were present multiple times in the 6.3.2 tarballs
-	- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
-	- glxgears_fbconfig demo didn't work (bug 4237)
-	- fixed bug when bilinear sampling 2d textures with borders
-	- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
-	- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
-	- fixed a few problems with proxy color tables (bug 4270)
-	- fixed precision problem in Z clearing (bug 4395)
-	- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
-	- fixed potential segfault caused by reading pixels outside
-	  of renderbuffer bounds
-	- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
-	- fixed memory corruption bug involving software alpha buffers
-	- glReadPixels clipped by window bounds was sometimes broken
-	- glDraw/CopyPixels of stencil data ignored the stencil write mask
-	- glReadPixels from a texture bound to a framebuffer object didn't work
-	- glIsRender/FramebufferEXT weren't totally correct
-	- fixed a number of point size attenuation/fade bugs
-	- fixed glFogCoord bug 4729
-	- GLX encoding for transpose matrix functions was broken
-	- fixed broken fragment program KIL and SWZ instructions
-	- fragment programs that wrote result.depth.z didn't work
-
-
-6.4.1  November 30, 2005
-    Bug fixes:
-	- redefining a vertex program string didn't take effect in TNL module
-	- fixed occasional segfault upon vertex/fragment parsing error
-	- vertex program LIT instruction didn't handle 0^0=1 correctly
-	- fragment program fog option didn't work with glDrawPixels, glBitmap
-	- USE_MGL_NAMESPACE didn't work for x86-64
-	- OSMesa demos were missing from previous release tarballs
-	- fixed problem with float->ushort conversion in glClear (bug 4992)
-	- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
-	- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
-	- fixed occasional triangle color interpolation problem on VMS
-	- work around invalid free() call (bug 5131)
-	- fixed BSD X server compilation problem by including stdint.h
-
-
-6.4.2  February 2, 2006
-    New:
-	- added OSMesaColorClamp() function/feature
-	- added wglGetExtensionStringARB() function
-    Bug fixes:
-	- fixed some problems when building on Windows
-	- GLw header files weren't installed by installmesa script (bug 5396)
-	- GL/glfbdev.h file was missing from tarballs
-	- fixed TNL initialization bug which could lead to crash (bug 5791)
-
-
-6.5  March 31, 2006
-    New:
-	- OpenGL Shading Language support through GL_ARB_shader_objects,
-	  GL_ARB_shading_language_100, GL_ARB_vertex_shader and
-	  GL_ARB_fragment_shader (done by Michal Krol)
-	- GL_EXT_packed_depth_stencil extension
-	- GL_EXT_timer_query extension
-	- GL_EXT_framebuffer_blit extension
-	- GL_ARB_half_float_pixel
-	- reflect demo improved to support multiple windows
-	- singlebuffer demo (shows no/little-flicker single-buffered rendering)
-	- r200: enable GL_ARB_texture_env_crossbar, separate the texture
-	  sampling unit bits from the texture env combine enable bits
-	- r200: add support for GL_ATI_fragment_shader
-	- added fast XOR-mode line drawing optimization
-	- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
-	  and GL_EXT_fog_coord
-	- MESA_GLX_ALPHA_BITS env var for xlib driver
-	- many DRI driver updates (including screen rotation support
-	  for the Intel DRI driver)
-    Changes:
-	- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
-	- removed GL_SGIX/SGIS_pixel_texture extensions
-    Bug fixes:
-	- fixed glxcontextmodes.c datatype problem (bug 5835)
-	- fixed aix-gcc build/install bugs (bug 5874)
-	- fixed some bugs in texture env program generation
-	- glXCopyContext() didn't handle texture object bindings properly
-	- glXCopyContext() didn't copy all lighting state
-	- fixed FreeBSD config (Pedro Giffuni)
-	- fixed some minor framebuffer object bugs
-	- replaced dprintf() with _glu_printf() in GLU (bug 6244)
-	- fixed a number of thread safety bugs/regressions
-	- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
-	- paletted texturing was broken w/ floating point palettes (K. Schultz)
-	- lots of assorted framebuffer object bug fixes
-
-6.5.1  August 31, 2006
-    New:
-	- Intel i965 DRI driver
-	- GL_APPLE_vertex_array_object extension (Ian Romanick)
-	- GL_EXT_texture_sRGB extension
-	- GL_EXT_gpu_program_parameters (Ian Romanick)
-	- "engine" demo
-	- updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
-	- many updates to the DRI drivers
-    Changes:
-	- The glVertexAttribARB functions no longer alias the conventional
-	  vertex attributes.
-	- glxinfo program prints more info with -l option
-	- GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
-	  compatible, in terms of glBindProgramARB()
-    Bug fixes:
-	- fixed broken texture border handling for depth textures (bug 6498)
-	- removed the test for duplicated framebuffer attachments, per
-	  version 117 of the GL_EXT_framebuffer_object specification
-	- fixed a few render-to-texture bugs, including render to depth texture
-	- clipping of lines against user-defined clip planes was broken (6512)
-	- assembly language dispatch for SPARC was broken (bug 6484)
-	- assorted compilation fixes on various Unix platforms (Dan Schikore)
-	- glPopAttrib could restore an invalid value for GL_DRAW_BUFFER
-	- assorted minor fixes for 16 and 32 bit/channel modes
-	- fixed assorted bugs in texture compression paths
-	- fixed indirect rendering vertex array crashes (bug 6863)
-	- glDrawPixels GL_INDEX_OFFSET didn't always work
-	- fixed convolution memory leak (bug 7077)
-	- rectangular depth textures didn't work
-	- invalid mode to glBegin didn't generate an error (bug 7142)
-	- 'normalized' parameter to glVertexAttribPointerARB didn't work
-	- disable bogus GLX_SGI_video_sync extension in xlib driver
-	- fixed R128 driver locking bug (Martijn van Oosterhout)
-	- using evaluators with vertex programs caused crashes (bug 7564)
-	- fragment.position wasn't set correctly for point/line primitives
-	- fixed parser bug for scalar sources for GL_NV_fragment_program
-	- max fragment program length was incorrectly 128, now 1024
-	- writes to result.depth in fragment programs weren't clamped to [0,1]
-	- fixed potential dangling pointer bug in glBindProgram()
-	- fixed some memory leaks (and potential crashes) in Xlib driver
diff --git a/docs/autoconf.html b/docs/autoconf.html
deleted file mode 100644
index 936ddcf..0000000
--- a/docs/autoconf.html
+++ /dev/null
@@ -1,289 +0,0 @@
-<html>
-
-<title>Compilation and Installation using Autoconf</title>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<body>
-
-
-<h1>Compilation and Installation using Autoconf</h1>
-
-<ol>
-<li><a href="#basic">Basic Usage</a></li>
-<li><a href="#driver">Driver Options</a></li>
-  <ul>
-  <li><a href="#xlib">Xlib Driver Options</a></li>
-  <li><a href="#dri">DRI Driver Options</a></li>
-  <li><a href="#osmesa">OSMesa Driver Options</a></li>
-  </ul>
-<li><a href="#library">Library Options</a></li>
-  <ul>
-  <li><a href="#glu">GLU</a></li>
-  <li><a href="#glw">GLw</a></li>
-  <li><a href="#glut">GLUT</a></li>
-  </ul>
-<li><a href="#demos">Demo Program Options</a></li>
-</ol>
-
-
-<a name="basic">
-<h2>1. Basic Usage</h2>
-
-<p>
-The autoconf generated configure script can be used to guess your
-platform and change various options for building Mesa. To use the
-configure script, type:
-</p>
-
-<pre>
-    ./configure
-</pre>
-
-<p>
-To see a short description of all the options, type <code>./configure
---help</code>. If you are using a development snapshot and the configure
-script does not exist, type <code>./autogen.sh</code> to generate it
-first. If you know the options you want to pass to
-<code>configure</code>, you can pass them to <code>autogen.sh</code>. It
-will run <code>configure</code> with these options after it is
-generated. Once you have run <code>configure</code> and set the options
-to your preference, type:
-</p>
-
-<pre>
-    make
-</pre>
-
-<p>
-This will produce libGL.so and several other libraries depending on the
-options you have chosen. Later, if you want to rebuild for a different
-configuration run <code>make realclean</code> before rebuilding.
-</p>
-
-<p>
-Some of the generic autoconf options are used with Mesa:
-
-<ul>
-<li><code>--prefix=PREFIX</code> - This is the root directory where
-files will be installed by <code>make install</code>. The default is
-<code>/usr/local</code>.
-</li>
-<li><code>--exec-prefix=EPREFIX</code> - This is the root directory
-where architecture-dependent files will be installed. In Mesa, this is
-only used to derive the directory for the libraries. The default is
-<code>${prefix}</code>.
-</li>
-<li><code>--libdir=LIBDIR</code> - This option specifies the directory
-where the GL libraries will be installed. The default is
-<code>${exec_prefix}/lib</code>. It also serves as the name of the
-library staging area in the source tree. For instance, if the option
-<code>--libdir=/usr/local/lib64</code> is used, the libraries will be
-created in a <code>lib64</code> directory at the top of the Mesa source
-tree.
-</li>
-<li><code>--enable-static, --disable-shared</code> - By default, Mesa
-will build shared libraries. Either of these options will force static
-libraries to be built. It is not currently possible to build static and
-shared libraries in a single pass.
-</li>
-<li><code>CC, CFLAGS, CXX, CXXFLAGS</code> - These environment variables
-control the C and C++ compilers used during the build. By default,
-<code>gcc</code> and <code>g++</code> are used with the options
-<code>"-g -O2"</code>.
-</li>
-<li><code>LDFLAGS</code> - An environment variable specifying flags to
-pass when linking programs. These are normally empty, but can be used
-to direct the linker to use libraries in nonstandard directories. For
-example, <code>LDFLAGS="-L/usr/X11R6/lib"</code>.
-</li>
-<li><code>PKG_CONFIG_PATH</code> - When available, the
-<code>pkg-config</code> utility is used to search for external libraries
-on the system. This environment variable is used to control the search
-path for <code>pkg-config</code>. For instance, setting
-<code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for
-package metadata in <code>/usr/X11R6</code> before the standard
-directories.
-</li>
-</ul>
-</p>
-
-<p>
-There are also a few general options for altering the Mesa build:
-<ul>
-<li><code>--with-x</code> - When the X11 development libraries are
-needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
-be used</a> for locating them. If they cannot be found through
-<code>pkg-config</code> a fallback routing using <code>imake</code> will
-be used. In this case, the <code>--with-x</code>,
-<code>--x-includes</code> and <code>--x-libraries</code> options can
-control the use of X for Mesa.
-</li>
-<li><code>--enable-gl-osmesa</code> - The <a href="osmesa.html">OSMesa
-library</a> can be built on top of libGL for drivers that provide it.
-This option controls whether to build libOSMesa. By default, this is
-enabled for the Xlib driver and disabled otherwise. Note that this
-option is different than using OSMesa as the driver.
-</li>
-<li><code>--enable-debug</code> - This option will enable compiler
-options and macros to aid in debugging the Mesa libraries.
-</li>
-<li><code>--disable-asm</code> - There are assembly routines
-available for a few architectures. These will be used by default if
-one of these architectures is detected. This option ensures that
-assembly will not be used.
-</li>
-<li><code>--enable-32-bit, --enable-64-bit</code> - By default, the
-build will compile code as directed by the environment variables
-<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
-<code>gcc</code>, these options offer a helper to add the compiler flags
-to force 32- or 64-bit code generation as used on the x86 and x86_64
-architectures.
-</li>
-</ul>
-</p>
-
-
-<a name="driver">
-<h2>2. Driver Options</h2>
-
-<p>
-There are several different driver modes that Mesa can use. These are
-described in more detail in the <a href="install.html">basic
-installation instructions</a>. The Mesa driver is controlled through the
-configure option --with-driver. There are currently three supported
-options in the configure script.
-</p>
-
-<ul>
-
-<a name="xlib">
-<li><b><em>Xlib</em></b> - This is the default mode for building Mesa.
-It uses Xlib as a software renderer to do all rendering. It corresponds
-to the option <code>--with-driver=xlib</code>. The libX11 and libXext
-libraries, as well as the X11 development headers, will be need to
-support the Xlib driver.
-</li>
-
-<a name="dri">
-<li><b><em>DRI</em></b> - This mode uses the DRI hardware drivers for
-accelerated OpenGL rendering. Enable the DRI drivers with the option
-<code>--with-driver=dri</code>. See the <a href="install.html">basic
-installation instructions</a> for details on prerequisites for the DRI
-drivers.
-</li>
-
-<!-- DRI specific options -->
-<p>
-<ul>
-<li><code>--with-dri-driverdir=DIR</code> - This option specifies the
-location the DRI drivers will be installed to and the location libGL
-will search for DRI drivers. The default is <code>${libdir}/dri</code>.
-</li>
-<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
-allows a specific set of DRI drivers to be built. For example,
-<code>--with-dri-drivers="swrast,i965,radeon,nouveau"</code>. By
-default, the drivers will be chosen depending on the target platform.
-See the directory <code>src/mesa/drivers/dri</code> in the source tree
-for available drivers. Beware that the swrast DRI driver is used by both
-libGL and the X.Org xserver GLX module to do software rendering, so you
-may run into problems if it is not available.</li>
-<!-- This explanation might be totally bogus. Kristian? -->
-<li><code>--disable-driglx-direct</code> - Disable direct rendering in
-GLX. Normally, direct hardware rendering through the DRI drivers and
-indirect software rendering are enabled in GLX. This option disables
-direct rendering entirely. It can be useful on architectures where
-kernel DRM modules are not available.
-</li>
-<li><code>--enable-glx-tls</code> - Enable Thread Local Storage (TLS) in
-GLX.
-</li>
-<li><code>--with-expat=DIR</code> - The DRI-enabled libGL uses expat to
-parse the DRI configuration files in <code>/etc/drirc</code> and
-<code>~/.drirc</code>. This option allows a specific expat installation
-to be used. For example, <code>--with-expat=/usr/local</code> will
-search for expat headers and libraries in <code>/usr/local/include</code>
-and <code>/usr/local/lib</code>, respectively.
-</li>
-</ul>
-</p>
-
-<a name="osmesa">
-<li><b><em>OSMesa</em></b> - No libGL is built in this
-mode. Instead, the driver code is built into the Off-Screen Mesa
-(OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
-page for more details.
-</li>
-
-<!-- OSMesa specific options -->
-<p>
-<ul>
-<li><code>--with-osmesa-bits=BITS</code> - This option allows the size
-of the color channel in bits to be specified. By default, an 8-bit
-channel will be used, and the driver will be named libOSMesa. Other
-options are 16- and 32-bit color channels, which will add the bit size
-to the library name. For example, <code>--with-osmesa-bits=16</code>
-will create the libOSMesa16 library with a 16-bit color channel.
-</li>
-</ul>
-</p>
-
-</ul>
-
-
-<a name="library">
-<h2>3. Library Options</h2>
-
-<p>
-The configure script provides more fine grained control over the GL
-libraries that will be built. More details on the specific GL libraries
-can be found in the <a href="install.html">basic installation
-instructions</a>.
-
-<ul>
-<a name="glu">
-<li><b><em>GLU</em></b> - The libGLU library will be built by default
-on all drivers. This can be disable with the option
-<code>--disable-glu</code>.
-</li>
-
-<a name="glw">
-<li><b><em>GLw</em></b> - The libGLw library will be built by default
-if libGLU has been enabled. This can be disable with the option
-<code>--disable-glw</code>.
-</li>
-
-<a name="glut">
-<li><b><em>GLUT</em></b> - The libglut library will be built by default
-if libGLU has been enabled and the glut source code from the MesaGLUT
-tarball is available. This can be disable with the option
-<code>--disable-glut</code>.
-</li>
-</ul>
-</p>
-
-
-<a name="demos">
-<h2>4. Demo Program Options</h2>
-
-<p>
-There are many demonstration programs in the MesaDemos tarball. If the
-programs are available when <code>./configure</code> is run, a subset of
-the programs will be built depending on the driver and library options
-chosen. See the directory <code>progs</code> for the full set of demos.
-
-<ul>
-<li><code>--with-demos=DEMOS,DEMOS,...</code> - This option allows a
-specific set of demo programs to be built. For example,
-<code>--with-demos="xdemos,slang"</code>. Beware that if this option is
-used, it will not be ensured that the necessary GL libraries will be
-available.
-</li>
-<li><code>--without-demos</code> - This completely disables building the
-demo programs. It is equivalent to <code>--with-demos=no</code>.
-</li>
-</ul>
-</p>
-
-</body>
-</html>
diff --git a/docs/banner.html b/docs/banner.html
deleted file mode 100644
index 9cb27bb..0000000
--- a/docs/banner.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <title>Banner</title>
-</head>
-<body bgcolor="#000000" text="#ffffff">
-<center>
-<table style="width: 95%; text-align: left;" border="0" cellpadding="2"
- cellspacing="2">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">
-      <p><img src="gears.png"> </p>
-      </td>
-      <td style="text-align: center;"><font face="sans-serif" size="5">The
-Mesa 3D Graphics Library</font></td>
-      <td style="vertical-align: top; text-align: right;">
-      <p><img src="gears.png"> </p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<p><font face="sans-serif" size="5"><br>
-</font></p>
-</center>
-</body>
-</html>
diff --git a/docs/bugs.html b/docs/bugs.html
deleted file mode 100644
index 4397339..0000000
--- a/docs/bugs.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Bug Reporting</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Bug Database</H1>
-
-<p>
-The Mesa bug database is hosted on
-<a href="http://freedesktop.org" target="_parent">freedesktop.org</a>.
-The old bug database on SourceForge is no longer used.
-</p>
-
-<p>
-To file a Mesa bug, go to
-<a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"
-target="_parent">
-Bugzilla on freedesktop.org</a>
-</p>
-
-<p>
-Please follow these bug reporting guidelines:
-</p>
-
-<ul>
-<li>Check if a new version of Mesa is available which might have fixed
-the problem.
-<li>Check if your bug is already reported in the database.
-<li>Monitor your bug report for requests for additional information, etc.
-<li>If you're reporting a crash, try to use your debugger (gdb) to get a stack
-trace. Also, recompile Mesa in debug mode to get more detailed information.
-<li>Describe in detail how to reproduce the bug, especially with games
-and applications that the Mesa developers might not be familiar with.
-<li>Provide a simple GLUT-based test program if possible
-</ul>
-
-<p>
-Bug reports will automatically be forwarded by bugzilla to the Mesa
-developer's mailing list.
-</p>
-
-<p>
-The easier a bug is to reproduce, the sooner it will be fixed.
-Please do everything you can to facilitate quickly fixing bugs.
-If your bug report is vague or your test program doesn't compile
-easily, the problem may not be fixed very quickly.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/cell.html b/docs/cell.html
deleted file mode 100644
index 30626b6..0000000
--- a/docs/cell.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<HTML>
-
-<TITLE>Cell Driver</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Mesa/Gallium Cell Driver</H1>
-
-<p>
-The Mesa
-<a href="http://en.wikipedia.org/wiki/Cell_%28microprocessor%29" target="_parent">Cell</a>
-driver is part of the 
-<a href="http://wiki.freedesktop.org/wiki/Software/gallium" target="_parent">Gallium3D</a>
-architecture.
-Tungsten Graphics did the original implementation of the Cell driver.
-</p>
-
-
-<H2>Source Code</H2>
-
-<p>
-The latest Cell driver source code is on the master branch of the Mesa
-git repository.
-</p>
-<p>
-To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
-To use the driver you'll need a Cell system, such as a PS3 running Linux,
-or the Cell Simulator (untested, though).
-</p>
-
-<p>
-If using Cell SDK 2.1, see the configs/linux-cell file for some
-special changes.
-</p>
-
-<p>
-To compile the code, run <code>make linux-cell</code>.
-Or to build in debug mode, run <code>make linux-cell-debug</code>.
-</p>
-
-<p>
-To use the library, make sure your current directory is the top of the
-Mesa tree, then set <code>LD_LIBRARY_PATH</code> like this:
-<pre>
-  export LD_LIBRARY_PATH=$PWD/lib/gallium:$PWD/lib/
-</pre>
-
-<p>
-Verify that the Cell driver is being used by running
-<code>progs/xdemos/glxinfo</code> and looking for:
-<pre>
-  OpenGL renderer string: Gallium 0.3, Cell on Xlib
-</pre>
-
-
-<H2>Driver Implementation Summary</H2>
-
-<p>
-Rasterization is parallelized across the SPUs in a tiled-based manner.
-Batches of transformed triangles are sent to the SPUs (actually, pulled by from
-main memory by the SPUs).
-Each SPU loops over a set of 32x32-pixel screen tiles, rendering the triangles
-into each tile.
-Because of the limited SPU memory, framebuffer tiles are paged in/out of
-SPU local store as needed.
-Similarly, textures are tiled and brought into local store as needed.
-</p>
-
-
-<H2>Status</H2>
-
-<p>
-As of October 2008, the driver runs quite a few OpenGL demos.
-Features that work include:
-</p>
-<ul>
-<li>Point/line/triangle rendering, glDrawPixels
-<li>2D, NPOT and cube texture maps with nearest/linear/mipmap filtering
-<li>Dynamic SPU code generation for fragment shaders, but not complete
-<li>Dynamic SPU code generation for fragment ops (blend, Z-test, etc), but not complete
-<li>Dynamic PPU/PPC code generation for vertex shaders, but not complete
-</ul>
-<p>
-Performance has recently improved with the addition of PPC code generation
-for vertex shaders, but the code quality isn't too great yet.
-</p>
-<p>
-Another bottleneck is SwapBuffers.  It may be the limiting factor for
-many simple GL tests.
-</p>
-
-
-
-<H2>Debug Options</H2>
-
-<p>
-The CELL_DEBUG env var can be set to a comma-separated list of one or
-more of the following debug options:
-</p>
-<ul>
-<li><b>checker</b> - use a different background clear color for each SPU.
-   This lets you see which SPU is rendering which screen tiles.
-<li><b>sync</b> - wait/synchronize after each DMA transfer
-<li><b>asm</b> - print generated SPU assembly code to stdout
-<li><b>fragops</b> - emit fragment ops debug messages
-<li><b>fragopfallback</b> - don't use codegen for fragment ops
-<li><b>cmd</b> - print SPU commands as their received
-<li><b>cache</b> - print texture cache statistics when program exits
-</ul>
-<p>
-Note that some of these options may only work for linux-cell-debug builds.
-</p>
-
-<p>
-If the GALLIUM_NOPPC env var is set, PPC code generation will not be used
-and vertex shaders will be run with the TGSI interpreter.
-</p>
-<p>
-If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
-intead of the Cell driver.
-This is useful for comparison/validation.
-</p>
-
-
-
-<H2>Contributing</H2>
-
-<p>
-If you're interested in contributing to the effort, familiarize yourself
-with the code, join the <a href="lists.html">mesa3d-dev mailing list</a>,
-and describe what you'd like to do.
-</p>
-
-
-</BODY>
-</HTML>
diff --git a/docs/conform.html b/docs/conform.html
deleted file mode 100644
index 3611f8c6..0000000
--- a/docs/conform.html
+++ /dev/null
@@ -1,695 +0,0 @@
-<HTML>
-
-<TITLE>Conformance</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Conformance</H1>
-
-<p>
-The SGI OpenGL conformance tests verify correct operation of OpenGL
-implementations.  I, Brian Paul, have been given a copy of the tests
-for testing Mesa.  The tests are not publically available.
-</p>
-<p>
-This file has the latest results of testing Mesa with the OpenGL 1.2
-conformance tests.  Testing with the preliminary OpenGL 1.3 tests has
-also been done.  Mesa passes all the 1.3 tests.
-</p>
-<p>
-The tests were run using the software X11 device driver on 24-bpp
-and 16-bpp displays.
-</p>
-<p>
-Mesa 4.0 and later pass all conformance tests at all path levels.
-Note that this says nothing about the conformance of hardware drivers
-based upon Mesa.
-</p>
-
-
-<pre>
-
-COVERAGE TESTS
---------------
-
-Test that all API functions accept the legal parameters and reject
-illegal parameters.  The result of each test is either pass or fail.
-
-% covgl
-OpenGL Coverage Test.
-Version 1.2
-
-covgl passed.
-
-covgl passed at 1.1 level.
-
-covgl passed at 1.2 level.
-
-covgl passed for ARB_multitexture.
-
-
-% covglu
-OpenGL GLU Coverage Test.
-Version 1.3
-
-covglu passed.
-
-covglu passed at 1.1 level.
-
-
-% covglx
-OpenGL X Coverage Test.
-Version 1.1.1
-
-covglx passed.
-
-
-% primtest -v
-Open GL Primitives Test.
-Version 1.2
-
-[lots of output deleted]
-
-292159 Combinations.
-primtest passed.
-
-
-
-
-GL CONFORMANCE TEST
-===================
-
-Render test images, read them back, then test for expected results.
-
-
-----------------------------------------------------------------------
-% conform -v 2
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path inactive.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 1
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 1.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 2
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 2.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 3
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 3.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-----------------------------------------------------------------------
-% conform -v 2 -p 4
-
-OpenGL Conformance Test
-Version 1.2
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path level = 4.
-
-Visual Report.
-    Display ID = 35. Indirect Rendering.
-    Double Buffered.
-    RGBA (5, 6, 5, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.0324, 0.016, 0.0324, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-Must Pass test passed.
-Divide By Zero test passed.
-Viewport Clamp test passed.
-Matrix Stack test passed.
-Matrix Stack Mixing test passed.
-Vertex Order test passed.
-Transformations test passed.
-Transformation Normal test passed.
-Viewport Transformation test passed.
-Buffer Clear test passed.
-Buffer Corners test passed.
-Buffer Color test passed.
-Color Ramp test passed.
-Mask test passed.
-Buffer Invariance test passed.
-Accumulation Buffer test passed.
-Select test passed.
-Feedback test passed.
-Scissor test passed.
-Alpha Plane Function test passed.
-Stencil Plane Clear test passed.
-Stencil Plane Corners test passed.
-Stencil Plane Operation test passed.
-Stencil Plane Function test passed.
-Depth Buffer Clear test passed.
-Depth Buffer Function test passed.
-Blend test passed.
-Dither test passed.
-LogicOp Function test does not exist for an RGB visual.
-DrawPixels test passed.
-CopyPixels test passed.
-Bitmap Rasterization test passed.
-Point Rasterization test passed.
-Anti-aliased Point test passed.
-Line Rasterization test passed.
-Line Stipple test passed.
-Anti-aliased Line test passed.
-Horizontal and Vertical Line test passed.
-Triangle Rasterization test passed.
-Triangle Tile test passed.
-Triangle Stipple test passed.
-Anti-aliased Triangles test passed.
-Quad Rasterization test passed.
-Polygon Face test passed.
-Polygon Cull test passed.
-Polygon Stipple test passed.
-Polygon Edge test passed.
-Ambient Material test passed.
-Ambient Scene test passed.
-Attenuation Position test passed.
-Diffuse Light test passed.
-Diffuse Material test passed.
-Diffuse Material Normal test passed.
-Diffuse Material Positioning test passed.
-Emissive Material test passed.
-Specular Exponent test passed.
-Specular Exponent Normal test passed.
-Specular Local Eye Half Angle test passed.
-Specular Light test passed.
-Specular Material test passed.
-Specular Normal test passed.
-Spot Positioning test passed.
-Spot Exponent and Positioning test passed.
-Spot Exponent and Direction test passed.
-Fog Exponential test passed.
-Fog Linear test passed.
-Texture Decal test passed.
-Texture Border test passed.
-Mipmaps Selection test passed.
-Mipmaps Interpolation test passed.
-Display Lists test passed.
-Evaluator test passed.
-Evaluator Color test passed.
-Texture Edge Clamp test passed.
-Packed Pixels test passed.
-Texture LOD test passed.
-Rescale Normal test passed.
-Color Table test passed.
-Convolution test passed.
-Convolution Border test passed.
-Histogram test passed.
-MinMax test passed.
-MultiTexture test passed.
-
-Conform passed.
-
-
-
-GLX CONFORMANCE TEST
-====================
-
-% conformx -v 2
-
-OpenGL X Conformance Test
-Version 1.1.1
-
-Setup Report.
-    Verbose level = 2.
-    Random number seed = 1.
-    Path inactive.
-
-Visual Report.
-    Display ID = 34. Direct Rendering.
-    Double Buffered.
-    RGBA (8, 8, 8, 0).
-    Stencil (8).
-    Depth (16).
-    Accumulation (16, 16, 16, 16).
-
-Epsilon Report.
-    zero error epsilon = 0.000122.
-    RGBA error epsilon = 0.00404, 0.00404, 0.00404, 0.000122.
-    Depth buffer error epsilon = 0.000137.
-    Stencil plane error epsilon = 0.00404.
-    Accumulation error epsilon = 0.000137, 0.000137, 0.000137, 0.000137.
-
-Default State test passed.
-glReadPixels() test passed.
-Font test passed.
-
-Conformx passed.
-
-
-</pre>
-
-NOTE: conformx passes for all machine path levels (-p option).
-
-
-</body>
-</html>
diff --git a/docs/contents.html b/docs/contents.html
deleted file mode 100644
index cf1661e..0000000
--- a/docs/contents.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<html>
-
-<title>Contents</title>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<!--Override a few values from the style sheet: -->
-<style>
-<!--
-body {
-	background-color: #cccccc;
-	color: black;
-}
-a:link {
-	color: #000;
-}
-a:visited {
-	color: #000;
-}
--->
-</style>
-
-
-<b>Documentation</b>
-<ul>
-<li><a href="intro.html" target="MainFrame">Introduction</a>
-<li><a href="news.html" target="MainFrame">News</a>
-<LI><A HREF="developers.html" target="MainFrame">Developers</A>
-<li><a href="systems.html" target="MainFrame">Platforms and Drivers</a>
-<li><a href="license.html" target="MainFrame">License & Copyright</a>
-<li><a href="faq.html" target="MainFrame">FAQ</a>
-<li><a href="relnotes.html" target="MainFrame">Release Notes</a>
-<li><a href="thanks.html" target="MainFrame">Acknowledgements</a>
-<li><a href="conform.html" target="MainFrame">Conformance Testing</a>
-<li>more docs below...
-</ul>
-
-<b>Download / Install</b>
-<ul>
-<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
-<li><a href="install.html" target="MainFrame">Compiling / Installing</a>
-<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
-</ul>
-
-<b>Resources</b>
-<ul>
-<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
-<li><a href="bugs.html" target="MainFrame">Bug Database</a>
-<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
-<li><a href="http://dri.freedesktop.org/" target="_parent">Mesa/DRI Wiki</a>
-</ul>
-
-<b>User Topics</b>
-<ul>
-<li><a href="shading.html" target="MainFrame">Shading Language</a>
-<li><a href="egl.html" target="MainFrame">EGL</a>
-<li><a href="opengles.html" target="MainFrame">OpenGL ES</a>
-<li><a href="openvg.html" target="MainFrame">OpenVG / Vega</a>
-<LI><A HREF="envvars.html" target="MainFrame">Environment Variables</A>
-<LI><A HREF="osmesa.html" target="MainFrame">Off-Screen Rendering</A>
-<LI><A HREF="debugging.html" target="MainFrame">Debugging Tips</A>
-<LI><A HREF="perf.html" target="MainFrame">Performance Tips</A>
-<LI><A HREF="extensions.html" target="MainFrame">Mesa Extensions</A>
-<LI><A HREF="mangling.html" target="MainFrame">Function Name Mangling</A>
-</ul>
-
-<b>Developer Topics</b>
-<ul>
-<li><a href="http://sourceforge.net/projects/mesa3d" target="_parent">SourceForge homepage</a>
-<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
-<li><a href="sourcetree.html" target="MainFrame">Source Code Tree</a>
-<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
-<li><a href="utilities.html" target="MainFrame">Utilities</a>
-<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
-<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
-<li><a href="sourcedocs.html" target="MainFrame">Source Documentation</a>
-<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>
-<li><a href="subset.html" target="MainFrame">Mesa Subset Driver</a>
-<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
-<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
-<li><a href="cell.html" target="MainFrame">Cell Driver</A>
-</ul>
-
-<b>Links</b>
-<ul>
-<li><a href="http://www.opengl.org" target="_parent">OpenGL website</a>
-<li><a href="http://dri.freedesktop.org" target="_parent">DRI website</a>
-<li><a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>
-<li><a href="games.html" target="MainFrame">Games and Entertainment</a>
-<li><a href="libraries.html" target="MainFrame">Libraries and Toolkits</a>
-<li><a href="modelers.html" target="MainFrame">Modeling and Rendering</a>
-<li><a href="science.html" target="MainFrame">Science and Technical</a>
-<li><a href="utility.html" target="MainFrame">Utilities</a>
-</ul>
-
-<b>Hosted by:</b>
-<br>
-<blockquote>
-<A HREF="http://sourceforge.net"
-target="_parent"><IMG SRC="http://sourceforge.net/sflogo.php?group_id=3&type=1"
-WIDTH="88" HEIGHT="31" ALIGN="BOTTOM" ALT="Sourceforge.net" BORDER="0"></A>
-</blockquote>
-
-</body>
-</html>
diff --git a/docs/debugging.html b/docs/debugging.html
deleted file mode 100644
index 2df62f5..0000000
--- a/docs/debugging.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<HTML>
-
-<TITLE>Debugging Tips</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Debugging Tips</H1>
-
-<p>
-   Normally Mesa (and OpenGL) records but does not notify the user of
-   errors.  It is up to the application to call
-   <code>glGetError</code> to check for errors.  Mesa supports an
-   environment variable, MESA_DEBUG, to help with debugging.  If
-   MESA_DEBUG is defined, a message will be printed to stdout whenever
-   an error occurs.
-</p>
-
-<p>
-   More extensive error checking is done when Mesa is compiled with the
-   DEBUG symbol defined.  You'll have to edit the Make-config file and
-   add -DDEBUG to the CFLAGS line for your system configuration.  You may
-   also want to replace any optimization flags with the -g flag so you can
-   use your debugger.  After you've edited Make-config type 'make clean'
-   before recompiling.
-</p>
-<p>
-   In your debugger you can set a breakpoint in _mesa_error() to trap Mesa
-   errors.
-</p>
-<p>
-   There is a display list printing/debugging facility.  See the end of
-   src/dlist.c for details.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/developers.html b/docs/developers.html
deleted file mode 100644
index 8960e7c..0000000
--- a/docs/developers.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<HTML>
-
-<TITLE>Developers</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Developers</H1>
-
-<p>
-Both professional and volunteer developers contribute to Mesa.
-</p>
-<p>
-<a href="http://www.vmware.com/" target="_parent">VMware</a>
-employs several of the main Mesa developers including Brian Paul
-and Keith Whitwell.
-</p>
-
-<p>
-In the past, Tungsten Graphics contracts implemented many Mesa features
-including:
-</p>
-<ul>
-<li>DRI drivers for Intel i965, i945, i915 and other chips
-<li>Advanced memory manager and framebuffer object support
-<li>Shading language compiler and OpenGL 2.0 support
-<li>MiniGLX environment
-</ul>
-
-<p>
-Other companies including
-<a href="http://www.intellinuxgraphics.org/index.html" target="_parent">Intel</a>
-and RedHat also actively contribute to the project.
-Intel has recently contributed the new GLSL compiler in Mesa 7.9.
-</p>
-
-<p>
-<a href="http://www.lunarg.com/" target="_parent">LunarG</a> can be contacted
-for custom Mesa / 3D graphics development.
-</p>
-
-<p>
-Volunteers have made significant contributions to all parts of Mesa, including
-complete device drivers.
-</p>
-
-</body>
-</html>
diff --git a/docs/devinfo.html b/docs/devinfo.html
deleted file mode 100644
index 2d1c125..0000000
--- a/docs/devinfo.html
+++ /dev/null
@@ -1,221 +0,0 @@
-<HTML>
-
-<TITLE>Development Notes</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Development Notes</H1>
-
-
-<H2>Adding Extentions</H2>
-
-<p>
-To add a new GL extension to Mesa you have to do at least the following.
-
-<ul>
-<li>
-   If glext.h doesn't define the extension, edit include/GL/gl.h and add
-   code like this:
-   <pre>
-     #ifndef GL_EXT_the_extension_name
-     #define GL_EXT_the_extension_name 1
-     /* declare the new enum tokens */
-     /* prototype the new functions */
-     /* TYPEDEFS for the new functions */
-     #endif
-   </pre>
-</li>
-<li>
-   In the src/mesa/glapi/ directory, add the new extension functions and
-   enums to the gl_API.xml file.
-   Then, a bunch of source files must be regenerated by executing the
-   corresponding Python scripts.
-</li>
-<li>
-   Add a new entry to the <code>gl_extensions</code> struct in mtypes.h
-</li>
-<li>
-   Update the <code>extensions.c</code> file.
-</li>
-<li>
-   From this point, the best way to proceed is to find another extension,
-   similar to the new one, that's already implemented in Mesa and use it
-   as an example.
-</li>
-<li>
-   If the new extension adds new GL state, the functions in get.c, enable.c
-   and attrib.c will most likely require new code.
-</li>
-</ul>
-
-
-
-<H2>Coding Style</H2>
-
-<p>
-Mesa's code style has changed over the years.  Here's the latest.
-</p>
-
-<p>
-Comment your code!  It's extremely important that open-source code be
-well documented.  Also, strive to write clean, easily understandable code.
-</p>
-
-<p>
-3-space indentation
-</p>
-
-<p>
-If you use tabs, set them to 8 columns
-</p>
-
-<p>
-Brace example:
-</p>
-<pre>
-	if (condition) {
-	   foo;
-	}
-	else {
-	   bar;
-	}
-</pre>
-
-<p>
-Here's the GNU indent command which will best approximate my preferred style:
-</p>
-<pre>
-	indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
-</pre>
-
-
-<p>
-Local variable name example:  localVarName (no underscores)
-</p>
-
-<p>
-Constants and macros are ALL_UPPERCASE, with _ between words
-</p>
-
-<p>
-Global variables are not allowed.
-</p>
-
-<p>
-Function name examples:
-</p>
-<pre>
-	glFooBar()       - a public GL entry point (in glapi_dispatch.c)
-	_mesa_FooBar()   - the internal immediate mode function
-	save_FooBar()    - retained mode (display list) function in dlist.c
-	foo_bar()        - a static (private) function
-	_mesa_foo_bar()  - an internal non-static Mesa function
-</pre>
-
-
-<H2>Making a New Mesa Release</H2>
-
-<p>
-These are the instructions for making a new Mesa release.
-</p>
-
-<H3>Get latest source files</H3>
-<p>
-Use git to get the latest Mesa files from the git repository, from whatever
-branch is relevant.
-</p>
-
-
-<H3>Verify and update version info</H3>
-<p>
-Create/edit the docs/relnotes-x.y.html file to document what's new in the release.
-Add the new relnotes-x.y.html file to <a href="relnotes.html">relnotes.html</a>.
-</p>
-
-<p>
-Update the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in
-configs/default.
-Also update the VERSION line in the top-level Makefile.
-</p>
-
-<p>
-Make sure the values in src/mesa/main/version.h are correct.
-</p>
-
-<p>
-Update docs/news.html.
-</p>
-
-<p>
-Check in all updates to git.
-</p>
-
-<p>
-Tag the files with the release name (in the form <b>mesa_X_Y</b>)
-with: <code>git tag -a mesa_X_Y</code>
-Then: <code>git push origin mesa_X_Y</code>
-</p>
-
-
-<H3>Make the tarballs</H3>
-<p>
-Make a symbolic link from $(DIRECTORY) to 'Mesa'.  For example,
-<code>ln -s Mesa Mesa-7.5</code>
-This is needed in order to make a correct tar file in the next step.
-</p>
-
-<p>
-Make the distribution files.  From inside the Mesa directory:
-<pre>
-	make tarballs
-</pre>
-
-<p>
-After the tarballs are created, the md5 checksums for the files will
-be computed.
-Add them to the docs/relnotes-X.Y.html file.
-</p>
-
-<p>
-Copy the distribution files to a temporary directory, unpack them,
-compile everything, and run some demos to be sure everything works.
-</p>
-
-<H3>Update the website and announce the release</H3>
-<p>
-Follow the directions on SourceForge for creating a new "release" and
-uploading the tarballs.
-</p>
-
-<p>
-Basically, to upload the tarball files with:
-<br>
-<code>
-rsync -avP ssh Mesa*-X.Y.* USERNAME@frs.sourceforge.net:uploads/
-</code>
-</p>
-
-<p>
-Update the web site by copying the docs/ directory's files to 
-/home/users/b/br/brianp/mesa-www/htdocs/ with:
-<br>
-<code>
-sftp USERNAME,mesa3d@web.sourceforge.net
-</code>
-</p>
-
-<p>
-Make an announcement on the mailing lists:
-
-<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>,
-<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
-and
-<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
-</p>
-
-
-
-</body>
-</html>
diff --git a/docs/dispatch.html b/docs/dispatch.html
deleted file mode 100644
index e5587c1..0000000
--- a/docs/dispatch.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GL Dispatch in Mesa</TITLE>
-<LINK REL="stylesheet" TYPE="text/css" HREF="mesa.css">
-</HEAD>
-
-<BODY>
-<H1>GL Dispatch in Mesa</H1>
-
-<p>Several factors combine to make efficient dispatch of OpenGL functions
-fairly complicated.  This document attempts to explain some of the issues
-and introduce the reader to Mesa's implementation.  Readers already familiar
-with the issues around GL dispatch can safely skip ahead to the <A
-HREF="#overview">overview of Mesa's implementation</A>.</p>
-
-<H2>1. Complexity of GL Dispatch</H2>
-
-<p>Every GL application has at least one object called a GL <em>context</em>.
-This object, which is an implicit parameter to ever GL function, stores all
-of the GL related state for the application.  Every texture, every buffer
-object, every enable, and much, much more is stored in the context.  Since
-an application can have more than one context, the context to be used is
-selected by a window-system dependent function such as
-<tt>glXMakeContextCurrent</tt>.</p>
-
-<p>In environments that implement OpenGL with X-Windows using GLX, every GL
-function, including the pointers returned by <tt>glXGetProcAddress</tt>, are
-<em>context independent</em>.  This means that no matter what context is
-currently active, the same <tt>glVertex3fv</tt> function is used.</p>
-
-<p>This creates the first bit of dispatch complexity.  An application can
-have two GL contexts.  One context is a direct rendering context where
-function calls are routed directly to a driver loaded within the
-application's address space.  The other context is an indirect rendering
-context where function calls are converted to GLX protocol and sent to a
-server.  The same <tt>glVertex3fv</tt> has to do the right thing depending
-on which context is current.</p>
-
-<p>Highly optimized drivers or GLX protocol implementations may want to
-change the behavior of GL functions depending on current state.  For
-example, <tt>glFogCoordf</tt> may operate differently depending on whether
-or not fog is enabled.</p>
-
-<p>In multi-threaded environments, it is possible for each thread to have a
-differnt GL context current.  This means that poor old <tt>glVertex3fv</tt>
-has to know which GL context is current in the thread where it is being
-called.</p>
-
-<A NAME="overview"/>
-<H2>2. Overview of Mesa's Implementation</H2>
-
-<p>Mesa uses two per-thread pointers.  The first pointer stores the address
-of the context current in the thread, and the second pointer stores the
-address of the <em>dispatch table</em> associated with that context.  The
-dispatch table stores pointers to functions that actually implement
-specific GL functions.  Each time a new context is made current in a thread,
-these pointers a updated.</p>
-
-<p>The implementation of functions such as <tt>glVertex3fv</tt> becomes
-conceptually simple:</p>
-
-<ul>
-<li>Fetch the current dispatch table pointer.</li>
-<li>Fetch the pointer to the real <tt>glVertex3fv</tt> function from the
-table.</li>
-<li>Call the real function.</li>
-</ul>
-
-<p>This can be implemented in just a few lines of C code.  The file
-<tt>src/mesa/glapi/glapitemp.h</tt> contains code very similar to this.</p>
-
-<blockquote>
-<table border="1">
-<tr><td><pre>
-void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
-{
-    const struct _glapi_table * const dispatch = GET_DISPATCH();
-    
-    (*dispatch-&gt;Vertex3f)(x, y, z);
-}</pre></td></tr>
-<tr><td>Sample dispatch function</td></tr></table>
-</blockquote>
-
-<p>The problem with this simple implementation is the large amount of
-overhead that it adds to every GL function call.</p>
-
-<p>In a multithreaded environment, a niave implementation of
-<tt>GET_DISPATCH</tt> involves a call to <tt>pthread_getspecific</tt> or a
-similar function.  Mesa provides a wrapper function called
-<tt>_glapi_get_dispatch</tt> that is used by default.</p>
-
-<H2>3. Optimizations</H2>
-
-<p>A number of optimizations have been made over the years to diminish the
-performance hit imposed by GL dispatch.  This section describes these
-optimizations.  The benefits of each optimization and the situations where
-each can or cannot be used are listed.</p>
-
-<H3>3.1. Dual dispatch table pointers</H3>
-
-<p>The vast majority of OpenGL applications use the API in a single threaded
-manner.  That is, the application has only one thread that makes calls into
-the GL.  In these cases, not only do the calls to
-<tt>pthread_getspecific</tt> hurt performance, but they are completely
-unnecessary!  It is possible to detect this common case and avoid these
-calls.</p>
-
-<p>Each time a new dispatch table is set, Mesa examines and records the ID
-of the executing thread.  If the same thread ID is always seen, Mesa knows
-that the application is, from OpenGL's point of view, single threaded.</p>
-
-<p>As long as an application is single threaded, Mesa stores a pointer to
-the dispatch table in a global variable called <tt>_glapi_Dispatch</tt>.
-The pointer is also stored in a per-thread location via
-<tt>pthread_setspecific</tt>.  When Mesa detects that an application has
-become multithreaded, <tt>NULL</tt> is stored in <tt>_glapi_Dispatch</tt>.</p>
-
-<p>Using this simple mechanism the dispatch functions can detect the
-multithreaded case by comparing <tt>_glapi_Dispatch</tt> to <tt>NULL</tt>.
-The resulting implementation of <tt>GET_DISPATCH</tt> is slightly more
-complex, but it avoids the expensive <tt>pthread_getspecific</tt> call in
-the common case.</p>
-
-<blockquote>
-<table border="1">
-<tr><td><pre>
-#define GET_DISPATCH() \
-    (_glapi_Dispatch != NULL) \
-        ? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key)
-</pre></td></tr>
-<tr><td>Improved <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
-</blockquote>
-
-<H3>3.2. ELF TLS</H3>
-
-<p>Starting with the 2.4.20 Linux kernel, each thread is allocated an area
-of per-thread, global storage.  Variables can be put in this area using some
-extensions to GCC.  By storing the dispatch table pointer in this area, the
-expensive call to <tt>pthread_getspecific</tt> and the test of
-<tt>_glapi_Dispatch</tt> can be avoided.</p>
-
-<p>The dispatch table pointer is stored in a new variable called
-<tt>_glapi_tls_Dispatch</tt>.  A new variable name is used so that a single
-libGL can implement both interfaces.  This allows the libGL to operate with
-direct rendering drivers that use either interface.  Once the pointer is
-properly declared, <tt>GET_DISPACH</tt> becomes a simple variable
-reference.</p>
-
-<blockquote>
-<table border="1">
-<tr><td><pre>
-extern __thread struct _glapi_table *_glapi_tls_Dispatch
-    __attribute__((tls_model("initial-exec")));
-
-#define GET_DISPATCH() _glapi_tls_Dispatch
-</pre></td></tr>
-<tr><td>TLS <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
-</blockquote>
-
-<p>Use of this path is controlled by the preprocessor define
-<tt>GLX_USE_TLS</tt>.  Any platform capable of using TLS should use this as
-the default dispatch method.</p>
-
-<H3>3.3. Assembly Language Dispatch Stubs</H3>
-
-<p>Many platforms has difficulty properly optimizing the tail-call in the
-dispatch stubs.  Platforms like x86 that pass parameters on the stack seem
-to have even more difficulty optimizing these routines.  All of the dispatch
-routines are very short, and it is trivial to create optimal assembly
-language versions.  The amount of optimization provided by using assembly
-stubs varies from platform to platform and application to application.
-However, by using the assembly stubs, many platforms can use an additional
-space optimization (see <A HREF="#fixedsize">below</A>).</p>
-
-<p>The biggest hurdle to creating assembly stubs is handling the various
-ways that the dispatch table pointer can be accessed.  There are four
-different methods that can be used:</p>
-
-<ol>
-<li>Using <tt>_glapi_Dispatch</tt> directly in builds for non-multithreaded
-environments.</li>
-<li>Using <tt>_glapi_Dispatch</tt> and <tt>_glapi_get_dispatch</tt> in
-multithreaded environments.</li>
-<li>Using <tt>_glapi_Dispatch</tt> and <tt>pthread_getspecific</tt> in
-multithreaded environments.</li>
-<li>Using <tt>_glapi_tls_Dispatch</tt> directly in TLS enabled
-multithreaded environments.</li>
-</ol>
-
-<p>People wishing to implement assembly stubs for new platforms should focus
-on #4 if the new platform supports TLS.  Otherwise, implement #2 followed by
-#3.  Environments that do not support multithreading are uncommon and not
-terribly relevant.</p>
-
-<p>Selection of the dispatch table pointer access method is controlled by a
-few preprocessor defines.</p>
-
-<ul>
-<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
-<li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li>
-<li>If any of <tt>PTHREADS</tt>,
-<tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt>
-is defined, method #2 is used.</li>
-<li>If none of the preceeding are defined, method #1 is used.</li>
-</ul>
-
-<p>Two different techniques are used to handle the various different cases.
-On x86 and SPARC, a macro called <tt>GL_STUB</tt> is used.  In the preamble
-of the assembly source file different implementations of the macro are
-selected based on the defined preprocessor variables.  The assmebly code
-then consists of a series of invocations of the macros such as:
-
-<blockquote>
-<table border="1">
-<tr><td><pre>
-GL_STUB(Color3fv, _gloffset_Color3fv)
-</pre></td></tr>
-<tr><td>SPARC Assembly Implementation of <tt>glColor3fv</tt></td></tr></table>
-</blockquote>
-
-<p>The benefit of this technique is that changes to the calling pattern
-(i.e., addition of a new dispatch table pointer access method) require fewer
-changed lines in the assembly code.</p>
-
-<p>However, this technique can only be used on platforms where the function
-implementation does not change based on the parameters passed to the
-function.  For example, since x86 passes all parameters on the stack, no
-additional code is needed to save and restore function parameters around a
-call to <tt>pthread_getspecific</tt>.  Since x86-64 passes parameters in
-registers, varying amounts of code needs to be inserted around the call to
-<tt>pthread_getspecific</tt> to save and restore the GL function's
-parameters.</p>
-
-<p>The other technique, used by platforms like x86-64 that cannot use the
-first technique, is to insert <tt>#ifdef</tt> within the assembly
-implementation of each function.  This makes the assembly file considerably
-larger (e.g., 29,332 lines for <tt>glapi_x86-64.S</tt> versus 1,155 lines for
-<tt>glapi_x86.S</tt>) and causes simple changes to the function
-implementation to generate many lines of diffs.  Since the assmebly files
-are typically generated by scripts (see <A HREF="#autogen">below</A>), this
-isn't a significant problem.</p>
-
-<p>Once a new assembly file is created, it must be inserted in the build
-system.  There are two steps to this.  The file must first be added to
-<tt>src/mesa/sources</tt>.  That gets the file built and linked.  The second
-step is to add the correct <tt>#ifdef</tt> magic to
-<tt>src/mesa/glapi/glapi_dispatch.c</tt> to prevent the C version of the
-dispatch functions from being built.</p>
-
-<A NAME="fixedsize"/>
-<H3>3.4. Fixed-Length Dispatch Stubs</H3>
-
-<p>To implement <tt>glXGetProcAddress</tt>, Mesa stores a table that
-associates function names with pointers to those functions.  This table is
-stored in <tt>src/mesa/glapi/glprocs.h</tt>.  For different reasons on
-different platforms, storing all of those pointers is inefficient.  On most
-platforms, including all known platforms that support TLS, we can avoid this
-added overhead.</p>
-
-<p>If the assembly stubs are all the same size, the pointer need not be
-stored for every function.  The location of the function can instead be
-calculated by multiplying the size of the dispatch stub by the offset of the
-function in the table.  This value is then added to the address of the first
-dispatch stub.</p>
-
-<p>This path is activated by adding the correct <tt>#ifdef</tt> magic to
-<tt>src/mesa/glapi/glapi.c</tt> just before <tt>glprocs.h</tt> is
-included.</p>
-
-<A NAME="autogen"/>
-<H2>4. Automatic Generation of Dispatch Stubs</H2>
-
-</BODY>
-</HTML>
diff --git a/docs/download.html b/docs/download.html
deleted file mode 100644
index 3cb9423..0000000
--- a/docs/download.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<HTML>
-
-<TITLE>Getting Mesa</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Downloading</H1>
-
-<p>
-Primary Mesa download site:
-<a href="ftp://ftp.freedesktop.org/pub/mesa/"
-target="_parent">freedesktop.org</a> (FTP)
-</p>
-
-<p>
-When a new release is coming, release candidates (betas) may be found
-<a href="ftp://ftp.freedesktop.org/pub/mesa/beta/" target="_parent">here</a>.
-</p>
-
-
-<p>
-Mesa is distributed in several parts:
-</p>
-<ul>
-<li><b>MesaLib-x.y.z</b> - the main Mesa library source code, drivers
-    and documentation.
-</li>
-<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
-    Most of the programs require GLUT (either the
-    <a href="http://www.opengl.org/resources/libraries/glut"
-    target="_parent">original GLUT by Mark Kilgard</a> or
-    <a href="http://freeglut.sourceforge.net" target="_parent">freeglut</a> or
-    <a href="http://openglut.sourceforge.net" target="_parent">OpenGLUT</a>).
-</li>
-<li><b>MesaGLUT-x.y.z</b> - Mark Kilgard's GLUT, easily compiled and used
-    with Mesa.  Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc.
-</li>
-</ul>
-
-<p>
-If you're not interested in running the demos, you'll only need the first
-package.
-</p>
-
-<p>
-If you're new to this and not sure what you're doing, grab all three packages.
-</p>
-
-<p>
-The packages are available in .tar.gz, .tar.bz2 and .zip formats.
-Other sites might offer additional package formats.
-</p>
-
-<H1>Unpacking</H1>
-
-<p>
-All the packages should be in the same directory prior to unpacking.
-</p>
-
-<ul>
-<li>To unpack .tar.gz files:
-<pre>
-	tar zxf MesaLib-X.Y.tar.gz
-	tar zxf MesaDemos-X.Y.tar.gz
-	tar zxf MesaGLUT-X.Y.tar.gz
-</pre>
-or
-<pre>
-	gzcat MesaLib-X.Y.tar.gz | tar xf -
-	gzcat MesaDemos-X.Y.tar.gz | tar xf -
-	gzcat MesaGLUT-X.Y.tar.gz | tar xf -
-</pre>
-or
-<pre>
-	gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
-	gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
-	gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
-</pre>
-<li>To unpack .tar.bz2 files:
-<pre>
-	bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
-	bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
-	bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
-</pre>
-<li>To unpack .zip files:
-<pre>
-	unzip MesaLib-X.Y.zip
-	unzip MesaDemos-X.Y.zip
-	unzip MesaGLUT-X.Y.zip
-</pre>
-</ul>
-
-
-<h1>Contents</h1>
-
-<p>
-After unpacking you'll have these files and directories (among others):
-</p>
-<pre>
-Makefile	- top-level Makefile for most systems
-configs/	- makefile parameter files for various systems
-include/	- GL header (include) files
-bin/		- shell scripts for making shared libraries, etc
-docs/		- documentation
-src/		- source code for libraries
-src/mesa	- sources for the main Mesa library and device drivers
-src/glu		- libGLU source code
-src/glx		- sources for building libGL with full GLX and DRI support
-src/glw		- Xt/Motif/OpenGL widget code
-</pre>
-
-If you downloaded and unpacked the MesaDemos.X.Y package:
-
-<pre>
-progs/demos	- original Mesa demos
-progs/xdemos	- GLX OpenGL/Mesa demos
-progs/redbook	- examples from the OpenGL Programming Guide
-progs/samples	- examples from SGI
-progs/images/	- image files
-</pre>
-
-If you downloaded and unpacked the MesaGLUT.X.Y package:
-<pre>
-src/glut	- GLUT library source code
-</pre>
-
-<p>
-Proceed to the <a href="install.html">compilation and installation
-instructions</a>.
-</p>
-
-
-</BODY>
-</HTML>
diff --git a/docs/egl.html b/docs/egl.html
deleted file mode 100644
index 33e9187..0000000
--- a/docs/egl.html
+++ /dev/null
@@ -1,333 +0,0 @@
-<html>
-
-<title>Mesa EGL</title>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<body>
-
-<h1>Mesa EGL</h1>
-
-<p>The current version of EGL in Mesa implements EGL 1.4.  More information
-about EGL can be found at
-<a href="http://www.khronos.org/egl/" target="_parent">
-http://www.khronos.org/egl/</a>.</p>
-
-<p>The Mesa's implementation of EGL uses a driver architecture.  The main
-library (<code>libEGL</code>) is window system neutral.  It provides the EGL
-API entry points and helper functions for use by the drivers.  Drivers are
-dynamically loaded by the main library and most of the EGL API calls are
-directly dispatched to the drivers.</p>
-
-<p>The driver in use decides the window system to support.</p>
-
-<h2>Build EGL</h2>
-
-<ol>
-<li>
-<p>Run <code>configure</code> with the desired client APIs and enable
-the driver for your hardware.  For example</p>
-
-<pre>
-  $ ./configure --enable-gles2 --enable-openvg --enable-gallium-nouveau
-</pre>
-
-<p>The main library and OpenGL is enabled by default.  The first option above
-enables <a href="opengles.html">OpenGL ES 2.x</a>.  The second option enables
-<a href="openvg.html">OpenVG</a>.</p>
-
-</li>
-
-<li>Build and install Mesa as usual.</li>
-</ol>
-
-<p>In the given example, it will build and install <code>libEGL</code>,
-<code>libGL</code>, <code>libGLESv1_CM</code>, <code>libGLESv2</code>,
-<code>libOpenVG</code>, and one or more EGL drivers.</p>
-
-<h3>Configure Options</h3>
-
-<p>There are several options that control the build of EGL at configuration
-time</p>
-
-<ul>
-<li><code>--enable-egl</code>
-
-<p>By default, EGL is enabled.  When disabled, the main library and the drivers
-will not be built.</p>
-
-</li>
-
-<li><code>--with-egl-driver-dir</code>
-
-<p>The directory EGL drivers should be installed to.  If not specified, EGL
-drivers will be installed to <code>${libdir}/egl</code>.</p>
-
-</li>
-
-<li><code>--with-egl-platforms</code>
-
-<p>List the platforms (window systems) to support.  Its argument is a comma
-seprated string such as <code>--with-egl-platforms=x11,drm</code>.  It decides
-the platforms a driver may support.  The first listed platform is also used by
-the main library to decide the native platform: the platform the EGL native
-types such as <code>EGLNativeDisplayType</code> or
-<code>EGLNativeWindowType</code> defined for.</p>
-
-<p>The available platforms are <code>x11</code>, <code>drm</code>,
-<code>fbdev</code>, and <code>gdi</code>.  The <code>gdi</code> platform can
-only be built with SCons.  Unless for special needs, the build system should
-select the right platforms automatically.</p>
-
-</li>
-
-<li><code>--enable-gles1</code> and <code>--enable-gles2</code>
-
-<p>These options enable OpenGL ES support in OpenGL.  The result is one big
-internal library that supports multiple APIs.</p>
-
-</li>
-
-<li><code>--enable-gles-overlay</code>
-
-<p>This option enables OpenGL ES as separate internal libraries.  This is an
-alternative approach to enable OpenGL ES.</p>
-
-<p>This is only supported by <code>egl_gallium</code>.  For systems using DRI
-drivers, <code>--enable-gles1</code> and <code>--enable-gles2</code> are
-suggested instead as all drivers will benefit.</p>
-
-</li>
-
-<li><code>--enable-openvg</code>
-
-<p>OpenVG must be explicitly enabled by this option.</p>
-
-</li>
-
-<li><code>--enable-gallium-egl</code>
-
-<p>Explicitly enable or disable <code>egl_gallium</code>.</p>
-
-</li>
-
-</ul>
-
-<h2>Use EGL</h2>
-
-<h3>Demos</h3>
-
-<p>There are demos for the client APIs supported by EGL.  They can be found in
-mesa/demos repository.</p>
-
-<h3>Environment Variables</h3>
-
-<p>There are several environment variables that control the behavior of EGL at
-runtime</p>
-
-<ul>
-<li><code>EGL_DRIVERS_PATH</code>
-
-<p>By default, the main library will look for drivers in the directory where
-the drivers are installed to.  This variable specifies a list of
-colon-separated directories where the main library will look for drivers, in
-addition to the default directory.  This variable is ignored for setuid/setgid
-binaries.</p>
-
-<p>This variable is usually set to test an uninstalled build.  For example, one
-may set</p>
-
-<pre>
-  $ export LD_LIBRARY_PATH=$mesa/lib
-  $ export EGL_DRIVERS_PATH=$mesa/lib/egl
-</pre>
-
-<p>to test a build without installation</p>
-
-</li>
-
-<li><code>EGL_DRIVER</code>
-
-<p>This variable specifies a full path to an EGL driver and it forces the
-specified EGL driver to be loaded.  It comes in handy when one wants to test a
-specific driver.  This variable is ignored for setuid/setgid binaries.</p>
-
-</li>
-
-<li><code>EGL_PLATFORM</code>
-
-<p>This variable specifies the native platform.  The valid values are the same
-as those for <code>--with-egl-platforms</code>.  When the variable is not set,
-the main library uses the first platform listed in
-<code>--with-egl-platforms</code> as the native platform.</p>
-
-<p>Extensions like <code>EGL_MESA_drm_display</code> define new functions to
-create displays for non-native platforms.  These extensions are usually used by
-applications that support non-native platforms.  Setting this variable is
-probably required only for some of the demos found in mesa/demo repository.</p>
-
-</li>
-
-<li><code>EGL_LOG_LEVEL</code>
-
-<p>This changes the log level of the main library and the drivers.  The valid
-values are: <code>debug</code>, <code>info</code>, <code>warning</code>, and
-<code>fatal</code>.</p>
-
-</li>
-
-<li><code>EGL_SOFTWARE</code>
-
-<p>For drivers that support both hardware and software rendering, setting this
-variable to true forces the use of software rendering.</p>
-
-</li>
-</ul>
-
-<h2>EGL Drivers</h2>
-
-<ul>
-<li><code>egl_dri2</code>
-
-<p>This driver supports both <code>x11</code> and <code>drm</code> platforms.
-It functions as a DRI driver loader.  For <code>x11</code> support, it talks to
-the X server directly using (XCB-)DRI2 protocol.</p>
-
-<p>This driver can share DRI drivers with <code>libGL</code>.</p>
-
-</li>
-
-<li><code>egl_gallium</code>
-
-<p>This driver is based on Gallium3D.  It supports all rendering APIs and
-hardwares supported by Gallium3D.  It is the only driver that supports OpenVG.
-The supported platforms are X11, DRM, FBDEV, and GDI.</p>
-
-<p>This driver comes with its own hardware drivers
-(<code>pipe_&lt;hw&gt;</code>) and client API modules
-(<code>st_&lt;api&gt;</code>).</p>
-
-</li>
-
-<li><code>egl_glx</code>
-
-<p>This driver provides a wrapper to GLX.  It uses exclusively GLX to implement
-the EGL API.  It supports both direct and indirect rendering when the GLX does.
-It is accelerated when the GLX is.  As such, it cannot provide functions that
-is not available in GLX or GLX extensions.</p>
-</li>
-</ul>
-
-<h2>Packaging</h2>
-
-<p>The ABI between the main library and its drivers are not stable.  Nor is
-there a plan to stabilize it at the moment.  Of the EGL drivers,
-<code>egl_gallium</code> has its own hardware drivers and client API modules.
-They are considered internal to <code>egl_gallium</code> and there is also no
-stable ABI between them.  These should be kept in mind when packaging for
-distribution.</p>
-
-<p>Generally, <code>egl_dri2</code> is preferred over <code>egl_gallium</code>
-when the system already has DRI drivers.  As <code>egl_gallium</code> is loaded
-before <code>egl_dri2</code> when both are available, <code>egl_gallium</code>
-may either be disabled with <code>--disable-gallium-egl</code> or packaged
-separately.</p>
-
-<h2>Developers</h2>
-
-<p>The sources of the main library and the classic drivers can be found at
-<code>src/egl/</code>.  The sources of the <code>egl</code> state tracker can
-be found at <code>src/gallium/state_trackers/egl/</code>.</p>
-
-<p>The suggested way to learn to write a EGL driver is to see how other drivers
-are written.  <code>egl_glx</code> should be a good reference.  It works in any
-environment that has GLX support, and it is simpler than most drivers.</p>
-
-<h3>Lifetime of Display Resources</h3>
-
-<p>Contexts and surfaces are examples of display resources.  They might live
-longer than the display that creates them.</p>
-
-<p>In EGL, when a display is terminated through <code>eglTerminate</code>, all
-display resources should be destroyed.  Similarly, when a thread is released
-throught <code>eglReleaseThread</code>, all current display resources should be
-released.  Another way to destory or release resources is through functions
-such as <code>eglDestroySurface</code> or <code>eglMakeCurrent</code>.</p>
-
-<p>When a resource that is current to some thread is destroyed, the resource
-should not be destroyed immediately.  EGL requires the resource to live until
-it is no longer current.  A driver usually calls
-<code>eglIs&lt;Resource&gt;Bound</code> to check if a resource is bound
-(current) to any thread in the destroy callbacks.  If it is still bound, the
-resource is not destroyed.</p>
-
-<p>The main library will mark destroyed current resources as unlinked.  In a
-driver's <code>MakeCurrent</code> callback,
-<code>eglIs&lt;Resource&gt;Linked</code> can then be called to check if a newly
-released resource is linked to a display.  If it is not, the last reference to
-the resource is removed and the driver should destroy the resource.  But it
-should be careful here because <code>MakeCurrent</code> might be called with an
-uninitialized display.</p>
-
-<p>This is the only mechanism provided by the main library to help manage the
-resources.  The drivers are responsible to the correct behavior as defined by
-EGL.</p>
-
-<h3><code>EGL_RENDER_BUFFER</code></h3>
-
-<p>In EGL, the color buffer a context should try to render to is decided by the
-binding surface.  It should try to render to the front buffer if the binding
-surface has <code>EGL_RENDER_BUFFER</code> set to
-<code>EGL_SINGLE_BUFFER</code>;  If the same context is later bound to a
-surface with <code>EGL_RENDER_BUFFER</code> set to
-<code>EGL_BACK_BUFFER</code>, the context should try to render to the back
-buffer.  However, the context is allowed to make the final decision as to which
-color buffer it wants to or is able to render to.</p>
-
-<p>For pbuffer surfaces, the render buffer is always
-<code>EGL_BACK_BUFFER</code>.  And for pixmap surfaces, the render buffer is
-always <code>EGL_SINGLE_BUFFER</code>.  Unlike window surfaces, EGL spec
-requires their <code>EGL_RENDER_BUFFER</code> values to be honored.  As a
-result, a driver should never set <code>EGL_PIXMAP_BIT</code> or
-<code>EGL_PBUFFER_BIT</code> bits of a config if the contexts created with the
-config won't be able to honor the <code>EGL_RENDER_BUFFER</code> of pixmap or
-pbuffer surfaces.</p>
-
-<p>It should also be noted that pixmap and pbuffer surfaces are assumed to be
-single-buffered, in that <code>eglSwapBuffers</code> has no effect on them.  It
-is desirable that a driver allocates a private color buffer for each pbuffer
-surface created.  If the window system the driver supports has native pbuffers,
-or if the native pixmaps have more than one color buffers, the driver should
-carefully attach the native color buffers to the EGL surfaces, re-route them if
-required.</p>
-
-<p>There is no defined behavior as to, for example, how
-<code>glDrawBuffer</code> interacts with <code>EGL_RENDER_BUFFER</code>.  Right
-now, it is desired that the draw buffer in a client API be fixed for pixmap and
-pbuffer surfaces.  Therefore, the driver is responsible to guarantee that the
-client API renders to the specified render buffer for pixmap and pbuffer
-surfaces.</p>
-
-<h3><code>EGLDisplay</code> Mutex</h3>
-
-The <code>EGLDisplay</code> will be locked before calling any of the dispatch
-functions (well, except for GetProcAddress which does not take an
-<code>EGLDisplay</code>).  This guarantees that the same dispatch function will
-not be called with the sample display at the same time.  If a driver has access
-to an <code>EGLDisplay</code> without going through the EGL APIs, the driver
-should as well lock the display before using it.
-
-<h3>TODOs</h3>
-
-<ul>
-<li>Pass the conformance tests</li>
-<li>Mixed use of OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is supported.  But
-which one of <code>libGL.so</code>, <code>libGLESv1_CM.so</code>, and
-<code>libGLESv2.so</code> should an application link to?  Bad things may happen
-when, say, an application is linked to <code>libGLESv2.so</code> and
-<code>libcairo</code>, which is linked to <code>libGL.so</code> instead.</li>
-
-</ul>
-
-</body>
-</html>
diff --git a/docs/enums.txt b/docs/enums.txt
deleted file mode 100644
index b37768e..0000000
--- a/docs/enums.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-
-See the OpenGL ARB enum registry at http://www.opengl.org/registry/api/enum.spec
-
-Blocks allocated to Mesa:
-       0x8750-0x875F
-       0x8BB0-0x8BBF
-
-
-GL_MESA_packed_depth_stencil
-	GL_DEPTH_STENCIL_MESA            0x8750
-	GL_UNSIGNED_INT_24_8_MESA        0x8751
-	GL_UNSIGNED_INT_8_24_REV_MESA    0x8752
-	GL_UNSIGNED_SHORT_15_1_MESA      0x8753
-	GL_UNSIGNED_SHORT_1_15_REV_MESA  0x8754
-
-GL_MESA_trace.spec:
-	GL_TRACE_ALL_BITS_MESA           0xFFFF
-	GL_TRACE_OPERATIONS_BIT_MESA     0x0001
-	GL_TRACE_PRIMITIVES_BIT_MESA     0x0002
-	GL_TRACE_ARRAYS_BIT_MESA         0x0004
-	GL_TRACE_TEXTURES_BIT_MESA       0x0008
-	GL_TRACE_PIXELS_BIT_MESA         0x0010
-	GL_TRACE_ERRORS_BIT_MESA         0x0020
-	GL_TRACE_MASK_MESA               0x8755
-	GL_TRACE_NAME_MESA               0x8756
-
-MESA_ycbcr_texture.spec:
-	GL_YCBCR_MESA                    0x8757
-	GL_UNSIGNED_SHORT_8_8_MESA       0x85BA /* same as Apple's */
-	GL_UNSIGNED_SHORT_8_8_REV_MESA   0x85BB /* same as Apple's */
-
-GL_MESA_pack_invert.spec
-	GL_PACK_INVERT_MESA              0x8758
-
-GL_MESA_shader_debug.spec: (obsolete)
-        GL_DEBUG_OBJECT_MESA             0x8759
-        GL_DEBUG_PRINT_MESA              0x875A
-        GL_DEBUG_ASSERT_MESA             0x875B
-
-GL_MESA_program_debug.spec: (obsolete)
-	GL_FRAGMENT_PROGRAM_CALLBACK_MESA      0x????
-	GL_VERTEX_PROGRAM_CALLBACK_MESA        0x????
-	GL_FRAGMENT_PROGRAM_POSITION_MESA      0x????
-	GL_VERTEX_PROGRAM_POSITION_MESA        0x????
-	GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x????
-	GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x????
-	GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA   0x????
-	GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA   0x????
-
-GL_MESAX_texture_stack:
-	GL_TEXTURE_1D_STACK_MESAX            0x8759
-	GL_TEXTURE_2D_STACK_MESAX            0x875A
-	GL_PROXY_TEXTURE_1D_STACK_MESAX      0x875B
-	GL_PROXY_TEXTURE_2D_STACK_MESAX      0x875C
-	GL_TEXTURE_1D_STACK_BINDING_MESAX    0x875D
-	GL_TEXTURE_2D_STACK_BINDING_MESAX    0x875E
-
diff --git a/docs/envvars.html b/docs/envvars.html
deleted file mode 100644
index fd1700a..0000000
--- a/docs/envvars.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<HTML>
-
-<TITLE>Environment Variables</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Environment Variables</H1>
-
-<p>
-Mesa supports the following environment variables:
-</p>
-<ul>
-<li>MESA_NO_ASM - if set, disables all assembly language optimizations
-<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
-<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
-<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
-<li>MESA_DEBUG - if set, error messages are printed to stderr.
-If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
-generate exceptions.
-<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
-<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
-fragment programs (intended for developers only)
-<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
-operations with vertex programs (intended for developers only).
-Setting this variable automatically sets the MESA_TEX_PROG variable as well.
-<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
-A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
-and disable the GL_EXT_bar extension.
-<li>MESA_GLSL - <a href="shading.html#envvars">shading language options</a>
-</ul>
-
-<p>
-The following are only applicable to the Xlib software driver.
-See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
-</p>
-<ul>
-<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
-<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
-<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
-    either "pixmap" or "ximage"
-<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
-<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
-<li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
-<li>MESA_GLX_FX - set to either "fullscreen" for full-screen rendering,
-  "window" to render into a window, or "disable" to disable the Glide driver.
-<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
-<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
-<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
-</ul>
-
-
-<p>
-These environment variables are for the Intel i945/i965 drivers:
-</p>
-<ul>
-<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
-    OpenGL conformance.  If set to 2, always use software rendering.
-<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
-    glCopyPixels, glDrawPixels.
-</ul>
-
-
-<p>
-These environment variables are for the Radeon R300 driver:
-</p>
-<ul>
-<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
-</ul>
-
-<p>
-Mesa EGL supports different sets of environment variables.  See the
-<a href="egl.html">Mesa EGL</a> page for the details.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/extensions.html b/docs/extensions.html
deleted file mode 100644
index 91ed20e..0000000
--- a/docs/extensions.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Extensions</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Mesa Extensions</H1>
-
-<p>
-A number of extensions have been developed especially for Mesa.
-The specifications follow.
-</p>
-
-
-<UL>
-<LI><A HREF="MESA_agp_offset.spec">MESA_agp_offset.spec</A>
-<LI><A HREF="MESA_copy_sub_buffer.spec">MESA_copy_sub_buffer.spec</A>
-<LI><A HREF="MESA_packed_depth_stencil.spec">MESA_packed_depth_stencil.spec</A>
-<LI><A HREF="MESA_pack_invert.spec">MESA_pack_invert.spec</A>
-<LI><A HREF="MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</A>
-<LI><A HREF="MESA_release_buffers.spec">MESA_release_buffers.spec</A>
-<LI><A HREF="MESA_resize_buffers.spec">MESA_resize_buffers.spec</A>
-<LI><A HREF="MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</A>
-<LI><A HREF="MESA_sprite_point.spec">MESA_sprite_point.spec</A> (obsolete)
-<LI><A HREF="MESA_texture_signed_rgba.spec">MESA_texture_signed_rgba.spec</A>
-<LI><A HREF="MESA_trace.spec">MESA_trace.spec</A> (obsolete)
-<LI><A HREF="MESA_window_pos.spec">MESA_window_pos.spec</A>
-<LI><A HREF="MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</A>
-</UL>
-
-
-</BODY>
-</HTML>
diff --git a/docs/faq.html b/docs/faq.html
deleted file mode 100644
index 65e279a..0000000
--- a/docs/faq.html
+++ /dev/null
@@ -1,397 +0,0 @@
-<html>
-
-<head><title>Mesa FAQ</title></head>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-
-<center>
-<h1>Mesa Frequently Asked Questions</h1>
-Last updated: 21 August 2006
-</center>
-
-<br>
-<br>
-<h2>Index</h2>
-<a href="#part1">1. High-level Questions and Answers</a>
-<br>
-<a href="#part2">2. Compilation and Installation Problems</a>
-<br>
-<a href="#part3">3. Runtime / Rendering Problems</a>
-<br>
-<a href="#part4">4. Developer Questions</a>
-<br>
-<br>
-<br>
-
-
-
-<a name="part1">
-</a><h1><a name="part1">1. High-level Questions and Answers</a></h1>
-
-<h2><a name="part1">1.1 What is Mesa?</a></h2>
-<p>
-<a name="part1">Mesa is an open-source implementation of the OpenGL specification.
-OpenGL is a programming library for writing interactive 3D applications.
-See the </a><a href="http://www.opengl.org/">OpenGL website</a> for more
-information.
-</p>
-<p>
-Mesa 6.x supports the OpenGL 1.5 specification.
-</p>
-
-
-<h2>1.2 Does Mesa support/use graphics hardware?</h2>
-<p>
-Yes.  Specifically, Mesa serves as the OpenGL core for the open-source DRI
-drivers for XFree86/X.org.  See the <a href="http://dri.freedesktop.org/">DRI
-website</a> for more information.
-</p>
-<p>
-There have been other hardware drivers for Mesa over the years (such as
-the 3Dfx Glide/Voodoo driver, an old S3 driver, etc) but the DRI drivers
-are the modern ones.
-</p>
-
-<h2>1.3 What purpose does Mesa serve today?</h2>
-<p>
-Hardware-accelerated OpenGL implementations are available for most popular
-operating systems today.
-Still, Mesa serves at least these purposes:
-</p>
-<ul>
-<li>Mesa is used as the core of the open-source XFree86/X.org DRI
-    hardware drivers.
-</li>
-<li>Mesa is quite portable and allows OpenGL to be used on systems
-    that have no other OpenGL solution.
-</li>
-<li>Software rendering with Mesa serves as a reference for validating the
-    hardware drivers.
-</li>
-<li>A software implementation of OpenGL is useful for experimentation,
-    such as testing new rendering techniques.
-</li>
-<li>Mesa can render images with deep color channels: 16-bit integer
-    and 32-bit floating point color channels are supported.
-    This capability is only now appearing in hardware.
-</li>
-<li>Mesa's internal limits (max lights, clip planes, texture size, etc) can be
-    changed for special needs (hardware limits are hard to overcome).
-</li>
-</ul>
-
-
-<h2>1.4 What's the difference between"Stand-Alone" Mesa and the DRI drivers?</h2>
-<p>
-<em>Stand-alone Mesa</em> is the original incarnation of Mesa.
-On systems running the X Window System it does all its rendering through
-the Xlib API:
-<ul>
-<li>The GLX API is supported, but it's really just an emulation of the
-     real thing.
-<li>The GLX wire protocol is not supported and there's no OpenGL extension
-    loaded by the X server.
-<li>There is no hardware acceleration.
-<li>The OpenGL library, libGL.so, contains everything (the programming API,
-    the GLX functions and all the rendering code).
-</ul>
-</p>
-<p>
-Alternately, Mesa acts as the core for a number of OpenGL hardware drivers
-within the DRI (Direct Rendering Infrastructure):
-<ul>
-<li>The libGL.so library provides the GL and GLX API functions, a GLX
-    protocol encoder, and a device driver loader.
-<li>The device driver modules (such as r200_dri.so) contain a built-in
-    copy of the core Mesa code.
-<li>The X server loads the GLX module.
-    The GLX module decodes incoming GLX protocol and dispatches the commands
-    to a rendering module.
-    For the DRI, this module is basically a software Mesa renderer.
-</ul>
-
-
-
-<h2>1.5 How do I upgrade my DRI installation to use a new Mesa release?</h2>
-<p>
-This wasn't easy in the past.
-Now, the DRI drivers are included in the Mesa tree and can be compiled
-separately from the X server.
-Just follow the Mesa <a href="install.html">compilation instructions</a>.
-</p>
-
-
-<h2>1.6 Are there other open-source implementations of OpenGL?</h2>
-<p>
-Yes, SGI's <a href="http://oss.sgi.com/projects/ogl-sample/index.html"
-target="_parent">
-OpenGL Sample Implemenation (SI)</a> is available.
-The SI was written during the time that OpenGL was originally designed.
-Unfortunately, development of the SI has stagnated.
-Mesa is much more up to date with modern features and extensions.
-</p>
-
-<p>
-<a href="http://ogl-es.sourceforge.net" target="_parent">Vincent</a> is
-an open-source implementation of OpenGL ES for mobile devices.
-
-<p>
-<a href="http://www.dsbox.com/minigl.html" target="_parent">miniGL</a>
-is a subset of OpenGL for PalmOS devices.
-
-<p>
-<a href="http://fabrice.bellard.free.fr/TinyGL/"
-target="_parent">TinyGL</a> is a subset of OpenGL.
-</p>
-
-<p>
-<a href="http://softgl.studierstube.org/" target="_parent">SoftGL</a>
-is an OpenGL subset for mobile devices.
-</p>
-
-<p>
-<a href="http://chromium.sourceforge.net/" target="_parent">Chromium</a>
-isn't a conventional OpenGL implementation (it's layered upon OpenGL),
-but it does export the OpenGL API.  It allows tiled rendering, sort-last
-rendering, etc.
-</p>
-
-<p>
-<a href="http://www.ticalc.org/archives/files/fileinfo/361/36173.html"
-target="_parent">ClosedGL</a> is an OpenGL subset library for TI
-graphing calculators.
-</p>
-
-<p>
-There may be other open OpenGL implementations, but Mesa is the most
-popular and feature-complete.
-</p>
-
-
-
-<br>
-<br>
-
-
-<a name="part2">
-</a><h1><a name="part2">2. Compilation and Installation Problems</a></h1>
-
-
-<h2><a name="part2">2.1 What's the easiest way to install Mesa?</a></h2>
-<p>
-<a name="part2">If you're using a Linux-based system, your distro CD most likely already
-has Mesa packages (like RPM or DEB) which you can easily install.
-</a></p>
-
-
-<h2><a name="part2">2.2 I get undefined symbols such as bgnpolygon, v3f, etc...</a></h2>
-<p>
-<a name="part2">You're application is written in IRIS GL, not OpenGL.
-IRIS GL was the predecessor to OpenGL and is a different thing (almost)
-entirely.
-Mesa's not the solution.
-</a></p>
-
-
-<h2><a name="part2">2.3 Where is the GLUT library?</a></h2>
-<p>
-<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaGLUT-x.y.z.tar.gz file.
-If you don't already have GLUT installed, you should grab the MesaGLUT
-package and compile it with the rest of Mesa.
-</a></p>
-
-
-
-<h2><a name="part2">2.4 What's the proper place for the libraries and headers?</a></h2>
-<p>
-<a name="part2">On Linux-based systems you'll want to follow the
-</a><a href="http://oss.sgi.com/projects/ogl-sample/ABI/index.html"
-target="_parent">Linux ABI</a> standard.
-Basically you'll want the following:
-</p>
-<ul>
-<li>/usr/include/GL/gl.h - the main OpenGL header
-</li><li>/usr/include/GL/glu.h - the OpenGL GLU (utility) header
-</li><li>/usr/include/GL/glx.h - the OpenGL GLX header
-</li><li>/usr/include/GL/glext.h - the OpenGL extensions header
-</li><li>/usr/include/GL/glxext.h - the OpenGL GLX extensions header
-</li><li>/usr/include/GL/osmesa.h - the Mesa off-screen rendering header
-</li><li>/usr/lib/libGL.so - a symlink to libGL.so.1
-</li><li>/usr/lib/libGL.so.1 - a symlink to libGL.so.1.xyz
-</li><li>/usr/lib/libGL.so.xyz - the actual OpenGL/Mesa library.  xyz denotes the
-Mesa version number.
-</li><li>/usr/lib/libGLU.so - a symlink to libGLU.so.1
-</li><li>/usr/lib/libGLU.so.1 - a symlink to libGLU.so.1.3.xyz
-</li><li>/usr/lib/libGLU.so.xyz - the OpenGL Utility library.  xyz denotes the Mesa
-version number.
-</li></ul>
-<p>
-After installing XFree86/X.org and the DRI drivers, some of these files
-may be symlinks into the /usr/X11R6/ tree.
-</p>
-<p>
-The old-style Makefile system doesn't install the Mesa libraries; it's
-up to you to copy them (and the headers) to the right place.
-</p>
-<p>
-The GLUT header and library should go in the same directories.
-</p>
-<br>
-<br>
-
-
-<a name="part3">
-</a><h1><a name="part3">3. Runtime / Rendering Problems</a></h1>
-
-<h2><a name="part3">3.1 Rendering is slow / why isn't my graphics hardware being used?</a></h2>
-<p>
-<a name="part3">Stand-alone Mesa (downloaded as MesaLib-x.y.z.tar.gz) doesn't have any
-support for hardware acceleration (with the exception of the 3DFX Voodoo
-driver).
-</a></p>
-<p>
-<a name="part3">What you really want is a DRI or NVIDIA (or another vendor's OpenGL) driver
-for your particular hardware.
-</a></p>
-<p>
-<a name="part3">You can run the <code>glxinfo</code> program to learn about your OpenGL
-library.
-Look for the GL_VENDOR and GL_RENDERER values.
-That will identify who's OpenGL library you're using and what sort of
-hardware it has detected.
-</a></p>
-<p>
-<a name="part3">If your DRI-based driver isn't working, go to the
-</a><a href="http://dri.sf.net/" target="_parent">DRI website</a> for trouble-shooting information.
-</p>
-
-
-<h2>3.2 I'm seeing errors in depth (Z) buffering.  Why?</h2>
-<p>
-Make sure the ratio of the far to near clipping planes isn't too great.
-Look
-<a href="http://www.opengl.org/resources/faq/technical/depthbuffer.htm#0040"
-target="_parent"> here</a> for details.
-</p>
-<p>
-Mesa uses a 16-bit depth buffer by default which is smaller and faster
-to clear than a 32-bit buffer but not as accurate.
-If you need a deeper you can modify the parameters to
-<code> glXChooseVisual</code> in your code.
-</p>
-
-
-<h2>3.3 Why Isn't depth buffering working at all?</h2>
-<p>
-Be sure you're requesting a depth buffered-visual.  If you set the MESA_DEBUG
-environment variable it will warn you about trying to enable depth testing
-when you don't have a depth buffer.
-</p>
-<p>Specifically, make sure <code>glutInitDisplayMode</code> is being called
-with <code>GLUT_DEPTH</code> or <code>glXChooseVisual</code> is being
-called with a non-zero value for GLX_DEPTH_SIZE.
-</p>
-<p>This discussion applies to stencil buffers, accumulation buffers and
-alpha channels too.
-</p>
-
-
-<h2>3.4 Why does glGetString() always return NULL?</h2>
-<p>
-Be sure you have an active/current OpenGL rendering context before
-calling glGetString.
-</p>
-
-
-<h2>3.5 GL_POINTS and GL_LINES don't touch the right pixels</h2>
-<p>
-If you're trying to draw a filled region by using GL_POINTS or GL_LINES
-and seeing holes or gaps it's because of a float-to-int rounding problem.
-But this is not a bug.
-See Appendix H of the OpenGL Programming Guide - "OpenGL Correctness Tips".
-Basically, applying a translation of (0.375, 0.375, 0.0) to your coordinates
-will fix the problem.
-</p>
-
-<h2>3.6 How can I change the maximum framebuffer size in Mesa's
-<tt>swrast</tt> backend?</h2>
-<p>
-These can be overridden by using the <tt>--with-max-width</tt> and
-<tt>--with-max-height</tt> options.  The two need not be equal.
-</p><p>
-Do note that Mesa uses these values to size some internal buffers,
-so increasing these sizes will cause Mesa to require additional
-memory.  Furthermore, increasing these limits beyond <tt>4096</tt>
-may introduce rasterization artifacts; see the leading comments in
-<tt>src/mesa/swrast/s_tritemp.h</tt>.
-</p>
-
-<br>
-<br>
-
-
-<a name="part4">
-</a><h1><a name="part4">4. Developer Questions</a></h1>
-
-<h2>4.1 How can I contribute?</a></h2>
-<p>
-First, join the <a href="http://www.mesa3d.org/lists.html">Mesa3d-dev
-mailing list</a>.
-That's where Mesa development is discussed.
-</p>
-<p>
-The <a href="http://www.opengl.org/documentation" target="_parent">
-OpenGL Specification</a> is the bible for OpenGL implemention work.
-You should read it.
-</p>
-<p>Most of the Mesa development work involves implementing new OpenGL
-extensions, writing hardware drivers (for the DRI), and code optimization.
-</p>
-
-<h2>4.2 How do I write a new device driver?</h2>
-<p>
-Unfortunately, writing a device driver isn't easy.
-It requires detailed understanding of OpenGL, the Mesa code, and your
-target hardware/operating system.
-3D graphics are not simple.
-</p>
-<p>
-The best way to get started is to use an existing driver as your starting
-point.
-For a software driver, the X11 and OSMesa drivers are good examples.
-For a hardware driver, the Radeon and R200 DRI drivers are good examples.
-</p>
-<p>The DRI website has more information about writing hardware drivers.
-The process isn't well document because the Mesa driver interface changes
-over time, and we seldome have spare time for writing documentation.
-That being said, many people have managed to figure out the process.
-</p>
-<p>
-Joining the appropriate mailing lists and asking questions (and searching
-the archives) is a good way to get information.
-</p>
-
-
-<h2>4.3 Why isn't GL_EXT_texture_compression_s3tc implemented in Mesa?</h2>
-<p>
-The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt" target="_parent">specification for the extension</a>
-indicates that there are intellectual property (IP) and/or patent issues
-to be dealt with.
-</p>
-<p>We've been unsucessful in getting a response from S3 (or whoever owns
-the IP nowadays) to indicate whether or not an open source project can
-implement the extension (specifically the compression/decompression
-algorithms).
-</p>
-<p>
-In the mean time, a 3rd party <a href=
-"http://homepage.hispeed.ch/rscheidegger/dri_experimental/s3tc_index.html"
-target="_parent">plug-in library</a> is available.
-</p>
-
-
-</body>
-</html>
diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html
deleted file mode 100644
index 0eea5e8..0000000
--- a/docs/fbdev-dri.html
+++ /dev/null
@@ -1,343 +0,0 @@
-<html><head><title>Mesa fbdev/DRI Environment</title>
-
-
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<body>
-
-<center><h1>Mesa fbdev/DRI Drivers</h1></center>
-<br>
-
-<h1><center>NOTE: this information is obsolete and will be removed at
-a future date</center></h1>
-
-<h1>1. Introduction</h1>
-
-<p>
-The fbdev/DRI environment supports hardware-accelerated 3D rendering without
-the X window system.  This is typically used for embedded applications.
-</p>
-
-<p>
-Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
-</p>
-
-<p>
-Applications in the fbdev/DRI environment use
-the MiniGLX interface to choose pixel
-formats, create rendering contexts, etc.  It's a subset of the GLX and
-Xlib interfaces allowing some degree of application portability between
-the X and X-less environments.
-</p>
-
-<p>
-Note that this environment is not well-supported and these instructions
-may not be completely up to date.
-</p>
-<br>
-
-
-
-<h1>2. Compilation</h1>
-<p>
-
-<h2>2.1 glxproto</h2>
-
-Get <a href="http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/include/GL/glxproto.h?rev=1.9">glxproto.h</a>. Copy it to the /mesa/include/GL/ directory.
-</p>
-
-<h2>2.2 libpciaccess</h2>
-<p>
-Check if you have libpciaccess installed:
-</p>
-
-<pre>pkg-config --modversion pciaccess
-</pre>
-<p>
-If not you can download the latest code from:
-</p>
-<pre>   git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
-</pre>
-<p>
-Run autogen.sh to generate a configure file. autogen.sh uses autoconf
-utility. This utility may not be installed with your linux distro,
-check if it is available. if not you can use your package manager or
-type:
-</p>
-<pre>sudo apt-get install autoconf
-</pre>
-The next step is to install the libpciaccess library. 
-<pre>make
-make install
-</pre>
-<p> Now your libpciaccess.a file is saved into /usr/local/lib
-directory. If you have a libpciaccess.a in /usr/lib you may simply copy
-and overwrite these files. Don't forget to copy libpciaccess.pc file to
-/usr/lib/pkgconfig, which is also located in /usr/local/lib/pkgconfig/.
-Or you may use the following system variables:
-</p>
-<pre>export LD_LIBRARY_PATH=/usr/local/lib
-export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
-</pre>
-
-<h2>2.3 drm</h2>
-
-<p>The next step is to compile the drm. DRM consists of two seperate parts,
-the DRM client library(lindrm.so) and kernel device module(such as
-radeon.ko). We need to make a small change in kernel device module. So
-you need to download the kernel source. You may choose the nearest
-mirror from www.kernel.org, or you are using Fedora Core 5, for
-example, you may need to install RPMs such as:
-kernel-smp-devel-2.16.15-1.2054_FC5.i686.rpm
-kernel-devel-2.6.15-1.2054_FC5.i686.rpm
-etc. You can find a detailed information <a href="http://www.howtoforge.com/kernel_compilation_fedora">here.</a>
-</p>
-
-<p>You will find drm_drv.c at /usr/src/LINUX-VERSION/drivers/char/drm/. Edit this code and comment out the following part:
-</p>
-
-<pre>
-   /* ||
-   ((ioctl-&gt;flags &amp; DRM_MASTER) &amp;&amp; !priv-&gt;master)*/
-</pre>
-Now you are ready to compile your kernel. If your kernel version is
-identical to the version you have compiled, you can simply over write
-your new "ko" files over older ones. If you have compiled a different
-kernel, you must configure your grub or lilo to be able to boot your
-new kernel. <p>
-You'll need fbdev header files.  Check with:
-</p>
-<pre>
-   ls -l /usr/include/linux/fb.
-</pre>
-<p>This file may be missing if you have not installed linux header files.
-
-
-<h2>2.4 Mesa</h2>
-
-</p><p>Get latest development Mesa sources from git repository
-(currently 7.1-prerelease)
-</p>
-<pre>
-   git clone git://anongit.freedesktop.org/git/mesa/mesa
-</pre>
-
-<p>You will need the makedepend utility which is a part of mesa project
-to build your linux-solo. You probably wont have this utility. You can
-download its source from following git repulsitory:
-</p>
-<pre>
-   git clone git://anongit.freedesktop.org/git/xorg/util/makedepend
-</pre>
-
-<p>Get the latest stable mesa version from SourceForge (currently 7.0.3)
-<a href="http://sourceforge.net/project/showfiles.php?group_id=3">http://sourceforge.net/project/showfiles.php?group_id=3</a>
-</p>
-
-<p>Copy the miniglx folder from 7.1-prerelease to 7.0.3.
-You may also extract GLUT to 7.0.3 version at this step. 
-</p>
-
-<p>Edit linux-solo.conf at /conf directory, just only compile the
-graphics driver you need, delete the unwanted drivers names from the
-list(some drivers are causing problems...)
-</p>
-<pre>
-   while(build==0)
-   {
-     make linux-solo
-
-     There will be some missing header files, copy them from 7.1-prerelease
-   }
-</pre>
-
-<p>
-When complete you should have the following:
-</p>
-<ul>
-<li>lib/libGL.so - the GL library which applications link with
-</li><li>lib/*_dri_so - DRI drivers
-</li><li>lib/miniglx.conf - sample MiniGLX config file
-</li><li>progs/miniglx/* - several MiniGLX sample programs
-</li></ul>
-
-To install these files into appropriate locations in system:
-<pre>
-   make install
-</pre>
-
-Now your openGL libraries are copied to /usr/local/lib and
-miniglx.conf is copied to /etc. You may copy them to /usr/lib and
-overwrite your old GL libraries. Or you may export following variable:
-
-<pre>
-   export LIBGL_DRIVERS_PATH=/usr/local/lib
-</pre>
-<br>
-
-
-<h1>3. Using fbdev/DRI</h1>
-
-<p>
-If an X server currently running, exit/stop it so you're working from
-the console. Following command shuts down the x window and also the multi user support.
-</p>
-<pre>
-   init 1
-</pre>
-
-<p>Also you may define the runlevel as 1 in "/etc/inittab". Your system
-will always start in single user mode and without x-window with this
-option set.
-</p><h2>3.1 Load Kernel Modules</h2>
-
-<p>
-You'll need to load the kernel modules specific to your graphics hardware.
-Typically, this consists of the agpgart module, an fbdev driver module
-and the DRM kernel module.
-</p>
-<p>
-As root, the kernel modules can be loaded as follows:
-</p>
-
-<p>
-If you have Intel i915/i945 hardware:
-</p>
-<pre>   modprobe agpgart            # the AGP GART module
-   modprobe intelfb            # the Intel fbdev driver
-   modprobe i915               # the i915/945 DRI kernel module
-</pre>
-
-<p>
-If you have ATI Radeon/R200 hardware:
-</p>
-<pre>   modprobe agpgart            # the AGP GART module
-   modprobe radeonfb           # the Radeon fbdev driver
-   modprobe radeon             # the Radeon DRI kernel module
-</pre>
-
-<p>
-If you have ATI Rage 128 hardware:
-</p>
-<pre>   modprobe agpgart            # the AGP GART module
-   modprobe aty128fb           # the Rage 128 fbdev driver
-   modprobe r128               # the Rage 128 DRI kernel module
-</pre>
-
-<p>
-If you have Matrox G200/G400 hardware:
-</p>
-<pre>   modprobe agpgart            # the AGP GART module
-   modprobe mgafb              # the Matrox fbdev driver
-   modprobe mga                # the Matrox DRI kernel module
-</pre>
-
-<p>
-To verify that the agpgart, fbdev and drm modules are loaded:
-</p>
-<pre>   ls -l /dev/agpgart /dev/fb* /dev/dri
-</pre>
-<p>
-Alternately, use lsmod to inspect the currently installed modules.
-If you have problems, look at the output of dmesg.
-</p>
-
-
-<h2>3.2 Configuration File</h2>
-
-<p>
-review/edit /etc/miniglx.conf.
-Alternately, the MINIGLX_CONF environment variable can be used to
-indicate the location of miniglx.conf
-</p>
-
-To determine the pciBusID value, run lspci and examine the output.
-For example:
-<p></p>
-<pre>   /sbin/lspci:
-   00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
-</pre>
-<p>
-00:02.0 indicates that pciBusID should be PCI:0:2:0
-</p>
-
-
-
-
-<h2>3.3 Running fbdev/DRI Programs</h2>
-
-<p>
-Make sure your LD_LIBRARY_PATH environment variable is set to the
-location of the libGL.so library.  You may need to append other paths
-to LD_LIBRARY_PATH if libpciaccess.so is in a non-standard location,
-for example.
-</p>
-
-<p>
-Change to the <code>Mesa/progs/miniglx/</code> directory and
-start the sample_server program in the background:
-</p>
-<pre>   ./sample_server &amp;
-</pre>
-
-<p>
-Then try running the <code>miniglxtest</code> program:
-</p>
-<pre>   ./miniglxtest
-</pre>
-<p>
-You should see a rotating quadrilateral which changes color as it rotates.
-It will exit automatically after a bit.
-</p>
-
-<p>
-If you run other tests in the miniglx/ directory, you may want to run
-them from a remote shell so that you can stop them with ctrl-C.
-</p>
-<br>
-
-
-<h1>4.0 Troubleshooting</h1>
-
-<ol>
-<li>
-If you try to run miniglxtest and get the following:
-<br>
-<pre>   [miniglx] failed to probe chipset
-   connect: Connection refused
-   server connection lost
-</pre>
-It means that the sample_server process is not running.
-<br>
-<br>
-</li>
-</ol>
-
-
-<h1>5.0 Programming Information</h1>
-
-<p>
-OpenGL/Mesa is interfaced to fbdev via the MiniGLX interface.
-MiniGLX is a subset of Xlib and GLX API functions which provides just
-enough functionality to setup OpenGL rendering and respond to simple
-input events.
-</p>
-
-<p>
-Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written
-to the MiniGLX API can also be run on full Xlib/GLX implementations.
-This allows some degree of flexibility for software development and testing.
-</p>
-
-<p>
-However, the MiniGLX API is not binary-compatible with full Xlib/GLX.
-Some of the structures are different and some macros/functions work
-differently.
-See the GL/miniglx.h header file for details.
-</p>
-
-
-
-</body>
-</html>
diff --git a/docs/games.html b/docs/games.html
deleted file mode 100644
index dcf5cf2..0000000
--- a/docs/games.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<HTML>
-
-<TITLE>Games</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Games</H1>
-
-
-<ul>
-	<li><a href="http://www.psc.edu/%7Esmp/a3d/">Asteroids3D</a> - 3D asteroids game
-	</li><li><a href="http://evlweb.eecs.uic.edu/aej/AndyBattalion.html" target="_parent">Battalion</a>
-	- battle game
-	</li><li><a href="http://bzflag.sourceforge.net/" target="_parent">BZFLAG</a> - 3-D tank
-	battle game
-	</li><li><a href="http://www.speakeasy.org/%7Emorse/copter-commander">Copter Commander</a> - 2d multiplayer side scroller
-	</li><li><a href="http://www.crystalspace.org/" target="_parent">CrystalSpace</a> - Free
-	3d game engine
-	</li><li><a href="http://www.afn.org/%7Ecthugha/" target="_parent">Cthugha</a> - music-sync'ed
-	graphical effects
-	</li><li><a href="http://www.sics.se/dive/" target="_parent">DIVE</a> - Distributed Interactive
-	Virtual Environment
-	</li><li><a href="http://www.newdoom.com/doomlegacy/" target="_parent">Doom Legacy</a>
-	- an OpenGL port of id software's popular game, Doom
-	</li><li><a href="http://www.asimov.de/intern_dropit.html" target="_parent">DropIt</a> - 3-D tetris game
-	</li><li><a href="http://www.flightgear.org/" target="_parent">Flight Gear</a> - Flight
-	simulator
-	</li><li><a href="http://freetrek.linuxgames.com/" target="_parent">Free Trek</a> - Star
-	Trek battle simulator
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">Gepetto</a> - Dance Choreography
-	</li><li><a href="http://glchess.sourceforge.net/" target="_parent">GLChess</a> - chess game
-	</li><li><a href="http://heretic.linuxgames.com/" target="_parent">GLHeretic</a> - Heretic
-	for Linux
-	</li><li><a href="http://glider3d.free.fr/" target="_parent">Glider3D</a> - flight simulator
-	</li><li><a href="http://www.gltron.org/" target="_parent">glTron</a> - Tron lightcycles
-	game
-	</li><li><a href="http://gracer.sourceforge.net/" target="_parent">GRacer</a> - 3D Motor
-	Sports Simulator
-	</li><li><a href="http://jongl.home.pages.de/" target="_parent">JONGL</a> - Juggling simulator
-	</li><li><a href="http://samba.anu.edu.au/KnightCap/" target="_parent">KnightCap</a> -
-	chess game
-	</li><li><a href="http://www.hackcraft.de/games/linwarrior_3d/">LinWarrior 3D</a> - A Battle Mech Simulator
-	</li><li><a href="http://www.nada.kth.se/%7Ef96-lfo/lunar/" target="_parent">Lunar Lander
-	2000</a> - 3D version of the classis lunar lander game
-	</li><li><a href="http://www.majik3d.org/" target="_parent">Majik 3D</a> - an online role-playing
-	world
-	</li><li><a href="http://www.pobox.com/%7Eshankel/opentrek.html" target="_parent">OpenTrek</a>
-	- Super Star Trek
-	</li><li><a href="http://www.idsoftware.com/" target="_parent">Quake(2,3)</a> - the popular
-	games from id software
-	</li><li><a href="http://torcs.free.fr/indexm.html" target="_parent">TORCS</a> - car racing
-	simulator
-	</li><li><a href="http://www.woodsoup.org/projs/tux_aqfh" target="_parent">TUX-AQFH</a>
-	- Tux the Penguin - a Quest for Herring
-	</li><li><a href="http://mordred.8m.com/voidrunner/" target="_parent">Void Runner</a>
-	- freeware arcade style game
-	</li><li><a href="http://xracer.annexia.org/" target="_parent">XRacer</a> - Free spaceship
-	racing game, similar to Wipeout
-</li></ul>
-
-
-</body></html>
\ No newline at end of file
diff --git a/docs/gears.png b/docs/gears.png
deleted file mode 100644
index 4052b30..0000000
--- a/docs/gears.png
+++ /dev/null
Binary files differ
diff --git a/docs/glfbdev-driver.html b/docs/glfbdev-driver.html
deleted file mode 100644
index 981df7c..0000000
--- a/docs/glfbdev-driver.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<HTML>
-
-<TITLE>Mesa glFBDev Driver</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<center><H1>Mesa glFBDev Driver</H1></center>
-
-
-<H1>1. Introduction</H1>
-
-<p>
-The GLFBDev driver interface allows one to do OpenGL rendering into a
-framebuffer managed with the Linux's fbdev interface.
-</p>
-
-<p>
-Basically, the programmer uses the fbdev functions to initialize the
-graphics hardware and setup the framebuffer.
-Then, using a calls to Mesa's glFBDev API functions, one can render
-into the framebuffer with the OpenGL API functions.
-</p>
-
-<p>
-Note, only software rendering is supported; there is no hardware
-acceleration.
-</p>
-
-
-<p>
-The GL/glfbdev.h header file defines the glFBDev interface.
-</p>
-
-<p>
-The progs/fbdev/glfbdevtest.c demonstrates how to use the glFBDev interface.
-</p>
-
-
-<p>
-For more information about fbdev, see the
-<a href="http://www.tldp.org/HOWTO/Framebuffer-HOWTO.html" target="_parent">
-Framebuffer Howto</a>
-</p>
-<p>
-You will need at minimum, a framebuffer device, check /dev/fb0
-</p>
-
-<h1>2. Compilation</h1>
-
-<p>
-To compile Mesa with support for the glFBDev interface:
-<pre>
-      make realclean
-      make linux-fbdev
-</pre>
-
-<p>
-When compilation is finished look in progs/glfbdev/ for the glfbdevtest demo.
-</p>
-<h1>3. Permissions</h1>
-
-<p>
-Typically /dev/fb/0 is grouped to the video group.  It may be useful to add
-your user to the video group so the demos will not have to be run as root.
-To use fbdevglut with the prefered tty input, you should add the user to the
-tty group as well
-<p>
-
-<h1>4. Using fbdevglut</h1>
-Almost all of the programs in the progs directory use glut, and they compile with fbdevglut.
-
-<p>
-To compile the redbook sample programs:
-<pre>
-       cd progs/redbook
-       make
-</pre>
-</p>
-<p>glut features not supported:
-<li>Overlays
-<li>Subwindows
-<li>Input devices other than Keyboard/Mouse
-<li>No support for GLUT_MULTISAMPLE, GLUT_STEREO, or GLUT_LUMINANCE
-<li>Cursor and Menu Support will flicker in GLUT_SINGLE mode
-
-<p>Keyboard input is read by opening /dev/tty and reading keycodes in medium raw mode.
-<p>Mouse input is read from env var MOUSE, or /dev/gpmdata and should be in ms3 format.
-To forward data in this format to /dev/gpmdata, run gpm with the -Rms3 option.
-<p> glutInit allows glut programs to pass parameters to the glut library, currently the
-following options are supported for fbdevglut:
-<p><li>-geometry widthxheight  --  This will force the resolution to be widthxheight instead of autodetecting.
-The modes are read from /etc/fb.modes
-<p><li>-bpp -- This will force the bitdepth to the one specified
-<p><li>-vt -- This allows you to specify the virtual terminal to attach keyboard input to.  It is useful to specify when running inside screen.
-<p><li>-mousespeed -- A floating point multiplication factor to increase mouse speed
-<p><li>-nomouse -- Disable mouse support
-<p><li>-nokeyboard -- Disable keyboard support (this will probably break mouse support as well)
-<p><li>-stdin -- Use stdin for input instead of attaching to kbd in medium-raw mode.
-This will make it impossible to detect keypresses like Shift+Tab, you will also need to specify -gpmmouse for mouse support.  This option can be used with a debugger, and it is possible to single step a program with gdb and set the FRAMEBUFFER environment variable to a different framebuffer for display.  The program will not be able to handle vt switching on it's own, so it will always display.
-<p><li>-gpmmouse -- This will attempt to connect to the /dev/gpmctl socket using liblow
-for mouse data.  Gpm does not provide this data when in graphics mode, so vt switching
-will briefly display text.  This mode typically has no initial mouse delay.
-<p><li>-- Ignore any additional arguments
-<p>Notes:
-<p>
-1. The mouse pointer flickers in single buffering mode, as it must be rendered in software.  Hopefully in the future there will be a way to access hardware cursors in fbdev devices.
-</p>
-</body>
-</html>
diff --git a/docs/glu.html b/docs/glu.html
deleted file mode 100644
index 8adaf42..0000000
--- a/docs/glu.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<HTML>
-
-<TITLE>SGI GLU</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>SGI SI GLU</H1>
-
-(Silicon Graphics, Inc. Sample Implementation of the OpenGL Utility library)
-
-<p>
-SGI open-sourced their OpenGL Sample Implementation (SI) in January, 2000.
-This includes the GLU library.
-</p>
-
-<p>
-The SI GLU library implements GLU version 1.3 whereas the original
-Mesa GLU library only implemented version 1.2.
-We recommend using the SI GLU library instead of Mesa's GLU library
-since it's more up-to-date, complete and reliable.
-We're no longer developing the original Mesa GLU library.
-</p>
-
-<p>
-The SI GLU library code is included in the Mesa distribution.
-You don't have to download it separately.
-</p>
-
-
-<p>
-<b>Olivier Michel</b> has made Linux RPMs of GLU for i386 and PowerPC.
-You can download them from the
-<a href="http://www.sourceforge.net/project/showfiles.php?group_id=3"
-target="_parent">download area</a> under <b>Miscellaneous</b>.
-</p>
-
-<p>
-Visit the <a href="http://oss.sgi.com/projects/ogl-sample/" target="_parent">
-OpenGL Sample Implementation home page</a> for more information about the SI.
-</p>
-
-</body>
-</html>
diff --git a/docs/helpwanted.html b/docs/helpwanted.html
deleted file mode 100644
index 34afe49..0000000
--- a/docs/helpwanted.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<HTML>
-
-<TITLE>Help Wanted</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Help Wanted / To-Do List</H1>
-
-<p>
-We can always use more help with the Mesa project.
-Here are some specific ideas and areas where help would be appreciated:
-</p>
-
-<ol>
-<li>
-<b>Driver patching and testing.</b>
-Patches are often posted to the mesa3d-dev mailing list, but aren't
-immediately checked into git because not enough people are testing them.
-Just applying patches, testing and reporting back is helpful.
-<li>
-<b>Driver debugging.</b>
-There are plenty of open bugs in the bug database.
-<li>
-<b>Remove aliasing warnings.</b>
-Enable gcc -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing
-issues in the code.
-<li>
-<b>Windows driver building, testing and maintenance.</b>
-The Visual Studio project files aren't always updated in a timely manner
-when new source files are added or old ones are removed.
-Fixing these tends to delay new Mesa releases.
-<li>
-<b>Maintenance and testing of lesser-used drivers.</b>
-Drivers such as DOS/DJGPP, GGI, etc that aren't being maintained are being
-deprecated starting in Mesa 7.3.
-<li>
-<b>Contribute more tests to
-<a href="http://glean.sourceforge.net/" target="_parent">glean</a>.</b>
-<li>
-<b>Automatic testing.
-</b>
-It would be great if someone would set up an automated system for grabbing
-the latest Mesa code and run tests (such as glean) then report issues to
-the mailing list.
-</ol>
-
-
-<p>
-If you want to do something new in Mesa, first join the Mesa developer's
-mailing list.
-Then post a message to propose what you want to do, just to make sure
-there's no issues.
-</p>
-
-</p>
-Anyone is welcome to contribute code to the Mesa project.
-By doing so, it's assumed that you agree to the code's licensing terms.
-</p>
-
-<p>
-Finally:
-<p>
-
-<ol>
-<li>Try to write high-quality code that follows the existing style.
-<li>Use uniform indentation, write comments, use meaningful identifiers, etc.
-<li>Test your code thoroughly.  Include test programs if appropriate.
-</ol>
-
-
-</BODY>
-</HTML>
diff --git a/docs/index.html b/docs/index.html
deleted file mode 100644
index eec4d72..0000000
--- a/docs/index.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
-
-<head>
-<title>Mesa Home Page</title>
-</head>
-
-<frameset rows="80,*" border="0" frameborder="yes">
-
-  <frame src="banner.html" name="BannerFrame"
-   scrolling="no" marginwidth="1" marginheight="1">
-
-  <frameset cols="28%,72% " border="1" frameborder="yes">
-
-    <frame src="contents.html" name="ContentsFrame"
-     marginwidth="2" marginheight="1" noresize="noresize">
-
-    <frame src="news.html" name="MainFrame"
-     marginwidth="3" marginheight="1" noresize="noresize">
-
-  </frameset>
-
-<noframes>
-<p>Sorry, this site requires frame support</p>
-</noframes>
-
-</frameset>
-
-</html>
diff --git a/docs/install.html b/docs/install.html
deleted file mode 100644
index 3962ea5..0000000
--- a/docs/install.html
+++ /dev/null
@@ -1,402 +0,0 @@
-<HTML>
-
-<TITLE>Compiling and Installing</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-
-<H1>Compiling and Installing</H1>
-
-<ol>
-<li><a href="#unix-x11">Unix / X11</a>
-  <ul>
-  <li><a href="#prereq">Prerequisites for DRI and hardware acceleration</a>
-  <li><a href="#autoconf">Building with autoconf</a>
-  <li><a href="#traditional">Building with traditional Makefiles</a>
-  <li><a href="#libs">The Libraries</a>
-  <li><a href="#demos">Running the demos
-  <li><a href="#install">Installing the header and library files
-  <li><a href="#pkg-config">Building OpenGL programs with pkg-config
-  </ul>
-<li><a href="#windows">Windows</a>
-<li><a href="#scons">SCons</a>
-<li><a href="#other">Other</a>
-</ol>
-<br>
-
-
-<a name="unix-x11">
-<H2>1. Unix/X11 Compilation and Installation</H1>
-
-
-<a name="prereq">
-<h3>1.1 Prerequisites for DRI and hardware acceleration</h3>
-
-<p>
-The following are required for DRI-based hardware acceleration with Mesa:
-</p>
-
-<ul>
-<li><a href="http://xorg.freedesktop.org/releases/individual/proto/">dri2proto</a> version 1.99.3 or later
-<li>Linux 2.6.28
-<li><a href="http://dri.freedesktop.org/libdrm/" target="_parent">libDRM</a>
-version 2.4.15 or later
-<li>Xorg server version 1.5 or later
-</ul>
-</p>
-
-
-<a name="autoconf">
-<h3>1.2 Building with Autoconf</h3>
-
-<p>
-Mesa may be <a href="autoconf.html">built using autoconf</a>.
-This should work well on most GNU-based systems.
-If that fails the traditional Mesa build system is available.
-
-
-
-<a name="traditional">
-<h3>1.3 Building with traditional Makefiles</h3>
-
-<p>
-The traditional Mesa build system is based on a collection of pre-defined
-system configurations.
-</p>
-<p>
-To see the list of configurations, just type <code>make</code>.
-Then choose a configuration from the list and type <code>make</code>
-<em>configname</em>.
-</p>
-
-<p>
-Mesa may be built in several different ways using the predefined configurations:
-</p>
-<ul>
-<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa will be compiled as
-a software renderer using Xlib to do all rendering.
-The libGL.so library will be a self-contained rendering library that will
-allow you to run OpenGL/GLX applications on any X server (regardless of
-whether it supports the GLX X server extension).
-You will <em>not</em> be able to use hardware 3D acceleration.
-<p>
-To compile stand-alone Mesa type <code>make</code> in the top-level directory.
-You'll see a list of supported system configurations.
-Choose one from the list (such as linux-x86), and type:
-</p>
-<pre>
-    make linux-x86
-</pre>
-<p>This will produce libGL.so and several other libraries</p>
-</li>
-
-<li><b><em>DRI/accelerated</em></b> - The DRI hardware drivers for
-accelerated OpenGL rendering (for ATI, Intel, Matrox, etc) will be built.
-The libGL.so library will support the GLX extension and will load/use
-the DRI hardware drivers.
-
-
-<p>
-Build Mesa and the DRI hardware drivers by running
-</p>
-<pre>
-   make linux-dri
-</pre>
-<p>
-There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>, 
-and <code>linux-ppc</code> configurations which are optimized for those
-architectures.
-</p>
-<p>
-Make sure you have the prerequisite versions of DRM and Xserver mentioned
-above.
-</p>
-
-</li>
-
-</ul>
-
-
-<p>
-Later, if you want to rebuild for a different configuration run
-<code>make realclean</code> before rebuilding.
-</p>
-
-
-<a name="libs">
-<h3>1.4 The libraries</h3>
-
-<p>
-When compilation has finished, look in the top-level <code>lib/</code>
-(or <code>lib64/</code>) directory.
-You'll see a set of library files similar to this:
-</p>
-<pre>
-lrwxrwxrwx    1 brian    users          10 Mar 26 07:53 libGL.so -> libGL.so.1*
-lrwxrwxrwx    1 brian    users          19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
--rwxr-xr-x    1 brian    users     3375861 Mar 26 07:53 libGL.so.1.5.060100*
-lrwxrwxrwx    1 brian    users          11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
-lrwxrwxrwx    1 brian    users          20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
--rwxr-xr-x    1 brian    users      549269 Mar 26 07:53 libGLU.so.1.3.060100*
-lrwxrwxrwx    1 brian    users          12 Mar 26 07:53 libglut.so -> libglut.so.3*
-lrwxrwxrwx    1 brian    users          16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
--rwxr-xr-x    1 brian    users      597754 Mar 26 07:53 libglut.so.3.7.1*
-lrwxrwxrwx    1 brian    users          11 Mar 26 08:04 libGLw.so -> libGLw.so.1*
-lrwxrwxrwx    1 brian    users          15 Mar 26 08:04 libGLw.so.1 -> libGLw.so.1.0.0*
--rwxr-xr-x    1 brian    users       20750 Mar 26 08:04 libGLw.so.1.0.0*
-lrwxrwxrwx    1 brian    users          14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
-lrwxrwxrwx    1 brian    users          23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
--rwxr-xr-x    1 brian    users       23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
-</pre>
-
-<p>
-<b>libGL</b> is the main OpenGL library (i.e. Mesa).
-<br>
-<b>libGLU</b> is the OpenGL Utility library.
-<br>
-<b>libglut</b> is the GLUT library.
-<br>
-<b>libGLw</b> is the Xt/Motif OpenGL drawing area widget library.
-<br>
-<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
-</p>
-
-<p>
-If you built the DRI hardware drivers, you'll also see the DRI drivers:
-</p>
-<pre>
--rwxr-xr-x   1 brian users 15607851 Jul 21 12:11 ffb_dri.so
--rwxr-xr-x   1 brian users 15148747 Jul 21 12:11 i810_dri.so
--rwxr-xr-x   1 brian users 14497814 Jul 21 12:11 i830_dri.so
--rwxr-xr-x   1 brian users 16895413 Jul 21 12:11 i915_dri.so
--rwxr-xr-x   1 brian users 11320803 Jul 21 12:11 mach64_dri.so
--rwxr-xr-x   1 brian users 11418014 Jul 21 12:12 mga_dri.so
--rwxr-xr-x   1 brian users 11064426 Jul 21 12:12 r128_dri.so
--rwxr-xr-x   1 brian users 11849858 Jul 21 12:12 r200_dri.so
--rwxr-xr-x   1 brian users 16050488 Jul 21 12:11 r300_dri.so
--rwxr-xr-x   1 brian users 11757388 Jul 21 12:12 radeon_dri.so
--rwxr-xr-x   1 brian users 11232304 Jul 21 12:13 s3v_dri.so
--rwxr-xr-x   1 brian users 11062970 Jul 21 12:13 savage_dri.so
--rwxr-xr-x   1 brian users 11214212 Jul 21 12:13 sis_dri.so
--rwxr-xr-x   1 brian users 11368736 Jul 21 12:13 tdfx_dri.so
--rwxr-xr-x   1 brian users 10598868 Jul 21 12:13 trident_dri.so
--rwxr-xr-x   1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
-</pre>
-
-
-<a name="demos">
-<h3>1.5 Running the demos</h3>
-
-<p>
-If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
-obtained Mesa from CVS, the <b>progs/</b> directory will contain a
-bunch of demonstration programs.
-</p>
-
-<p>
-Before running a demo, you'll probably have to set two environment variables
-to indicate where the libraries are located.  For example:
-<p>
-<blockquote>
-<b>cd lib/</b>
-<br>
-<b>export LD_LIBRARY_PATH=${PWD}</b>
-<br>
-<b>export LIBGL_DRIVERS_PATH=${PWD}</b> (if using DRI drivers)
-</blockquote>
-
-<p>
-Next, change to the Mesa/demos/ directory:
-</p>
-<blockquote>
-<b>cd ../progs/demos</b>
-</blockquote>
-
-<p>
-Run a demo such as gears:
-</p>
-<blockquote>
-<b>./gears</b>
-</blockquote>
-
-<p>
-If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
-and see that it prints the expected Mesa version number.
-</p>
-
-<p>
-If you're using Linux or a similar OS, verify that the demo program is
-being linked with the proper library files:
-</p>
-<blockquote>
-<b>ldd gears</b>
-</blockquote>
-
-<p>
-You should see something like this:
-</p>
-<pre>
-        libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
-        libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
-        libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
-        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
-        libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
-        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
-        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
-        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
-        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
-        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
-        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
-        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
-        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
-        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
-        libdl.so.2 => /lib/libdl.so.2 (0x40644000)
-        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
-        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
-</pre>
-
-<p>
-Retrace your steps if this doesn't look right.
-</p>
-
-
-<a name="install">
-<H3>1.6 Installing the header and library files</H3>
-
-<p>
-The standard location for the OpenGL header files on Unix-type systems is
-in <code>/usr/include/GL/</code>.
-The standard location for the libraries is <code>/usr/lib/</code>.
-For more information see, the
-<a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
-Linux/OpenGL ABI specification</a>.
-</p>
-
-<p>
-If you'd like Mesa to co-exist with another implementation of OpenGL that's
-already installed, you'll have to choose different directories, like
-<code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
-</p>
-
-<p>
-To install Mesa's headers and libraries, run <code>make install</code>.
-But first, check the Mesa/configs/default file and examine the values
-of the <b>INSTALL_DIR</b> and <b>DRI_DRIVER_INSTALL_DIR</b> variables.
-Change them if needed, then run <code>make install</code>.
-</p>
-
-<p>
-The variable
-<b>DESTDIR</b> may also be used to install the contents to a temporary
-staging directory.
-This can be useful for package management.
-For example: <code>make install DESTDIR=/somepath/</code>
-</p>
-
-<p>
-Note: at runtime you can use the LD_LIBRARY_PATH environment variable
-(on Linux at least) to switch
-between the Mesa libraries and other vendor's libraries whenever you want.
-This is a handy way to compare multiple OpenGL implementations.
-</p>
-
-
-<a name="pkg-config">
-<H3>1.7 Building OpenGL programs with pkg-config</H3>
-
-<p>
-Running <code>make install</code> will install package configuration files
-for the pkg-config utility.
-</p>
-
-<p>
-When compiling your OpenGL application you can use pkg-config to determine
-the proper compiler and linker flags.
-</p>
-
-<p>
-For example, compiling and linking a GLUT application can be done with:
-</p>
-<pre>
-   gcc `pkg-config --cflags --libs glut` mydemo.c -o mydemo
-</pre>
-
-<br>
-
-<a name="windows">
-<H2>2. Windows Compilation and Installation</H1>
-
-<p>
-Please see the <a href="#scons">instructions on building with SCons</a>.
-Alternatively see <a href="README.WIN32">README.WIN32</a> file.
-</p>
-
-
-
-<a name="scons">
-<H2>3. Building with SCons</H1>
-
-<p>
-To build Mesa with SCons on Linux or Windows do
-</p>
-<pre>
-    scons
-</pre>
-<p>
-The build output will be placed in
-build/<i>platform</i>-<i>machine</i>-<i>debug</i>/..., where <i>platform</i> is for
-example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
-by -debug for debug builds.
-</p>
-
-<p>
-To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
-</p>
-<pre>
-    scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
-</pre>
-<p>
-This will create:
-</p>
-<ul>
-<li>build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll &mdash; Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll 
-<li>build/windows-x86-debug/glut/glx/glut32.dll
-<li>progs/build/windows-x86-debug/wgl/wglinfo.exe
-<li>progs/build/windows-x86-debug/trivial/tri.exe
-<li>and many other samples in progs/build/windows-x86-debug/...
-</ul>
-<p>
-Put them all in the same directory to test them.
-</p>
-
-
-<a name="other">
-<H2>4. Other systems</H1>
-
-<p>
-Documentation for other environments (some may be very out of date):
-</p>
-
-<UL>
-<li><A HREF="README.VMS">README.VMS</A> - VMS
-<LI><A HREF="README.GGI">README.GGI</A> - GGI
-<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
-<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
-<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
-<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
-<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
-<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
-<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
-<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
-<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
-<LI><A HREF="README.OS2">README.OS2</A> - OS/2
-<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
-</UL>
-
-
-
-
-</body>
-</html>
diff --git a/docs/intro.html b/docs/intro.html
deleted file mode 100644
index 0806caf..0000000
--- a/docs/intro.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Introduction</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Introduction</H1>
-
-<p>
-Mesa is an open-source implementation of the
-<a href="http://www.opengl.org/" target="_parent">OpenGL</a> specification -
-a system for rendering interactive 3D graphics.
-</p>
-
-<p>
-A variety of device drivers allows Mesa to be used in many different
-environments ranging from software emulation to complete hardware acceleration
-for modern GPUs.
-</p>
-
-<p>
-Mesa ties into several other open-source projects: the 
-<a href="http://dri.freedesktop.org/" target="_parent">Direct Rendering 
-Infrastructure</a> and <a href="http://x.org" target="_parent">X.org</a> to 
-provide OpenGL support to users of X on Linux, FreeBSD and other operating 
-systems.
-</p>
-
-
-
-<H1>Project History</H1>
-
-<p>
-The Mesa project was originally started by Brian Paul.
-Here's a short history of the project.
-</p>
-
-<p>
-August, 1993: I begin working on Mesa in my spare time.  The project
-has no name at that point.  I was simply interested in writing a simple
-3D graphics library that used the then-new OpenGL API.  I was partially
-inspired by the <em>VOGL</em> library which emulated a subset of IRIS GL.
-I had been programming with IRIS GL since 1991.
-</p>
-
-<p>
-November 1994: I contact SGI to ask permission to distribute my OpenGL-like
-graphics library on the internet.  SGI was generally receptive to the
-idea and after negotiations with SGI's legal department, I get permission
-to release it.
-</p>
-
-<p>
-February 1995: Mesa 1.0 is released on the internet.  I expected that
-a few people would be interested in it, but not thousands.
-I was soon receiving patches, new features and thank-you notes on a
-daily basis.  That encouraged me to continue working on Mesa.  The
-name Mesa just popped into my head one day.  SGI had asked me not to use
-the terms <em>"Open"</em> or <em>"GL"</em> in the project name and I didn't
-want to make up a new acronym.  Later, I heard of the Mesa programming
-language and the Mesa spreadsheet for NeXTStep.
-</p>
-
-<p>
-In the early days, OpenGL wasn't available on too many systems.
-It even took a while for SGI to support it across their product line.
-Mesa filled a big hole during that time.
-For a lot of people, Mesa was their first introduction to OpenGL.
-I think SGI recognized that Mesa actually helped to promote
-the OpenGL API, so they didn't feel threatened by the project.
-</p>
-
-
-<p>
-1995-1996: I continue working on Mesa both during my spare time and during
-my work hours at the Space Science and Engineering Center at the University
-of Wisconsin in Madison.  My supervisor, Bill Hibbard, lets me do this because
-Mesa is now being using for the <a href="http://www.ssec.wisc.edu/%7Ebillh/vis.html" target="_parent">Vis5D</a> project.
-</p><p>
-October 1996: Mesa 2.0 is released.  It implements the OpenGL 1.1 specification.
-</p>
-
-<p>
-March 1997: Mesa 2.2 is released.  It supports the new 3dfx Voodoo graphics
-card via the Glide library.  It's the first really popular hardware OpenGL
-implementation for Linux.
-</p>
-
-<p>
-September 1998: Mesa 3.0 is released.  It's the first publicly-available
-implementation of the OpenGL 1.2 API.
-</p>
-
-<p>
-March 1999: I attend my first OpenGL ARB meeting.  I contribute to the
-development of several official OpenGL extensions over the years.
-</p>
-
-<p>
-September 1999: I'm hired by Precision Insight, Inc.  Mesa is a key
-component of 3D hardware acceleration in the new DRI project for XFree86.
-Drivers for 3dfx, 3dLabs, Intel, Matrox and ATI hardware soon follow.
-</p>
-
-<p>
-October 2001: Mesa 4.0 is released.
-It implements the OpenGL 1.3 specification.
-</p>
-
-
-<p>
-November 2001: I cofounded Tungsten Graphics, Inc. with Keith Whitwell,
-Jens Owen, David Dawes and Frank LaMonica.
-Tungsten Graphics was acquired by VMware in December 2008.
-</p>
-
-<p>
-November 2002: Mesa 5.0 is released.
-It implements the OpenGL 1.4 specification.
-</p>
-
-<p>
-January 2003: Mesa 6.0 is released.  It implements the OpenGL 1.5
-specification as well as the GL_ARB_vertex_program and
-GL_ARB_fragment_program extensions.
-</p>
-
-<p>
-June 2007: Mesa 7.0 is released, implementing the OpenGL 2.1 specification
-and OpenGL Shading Language.
-</p>
-
-
-<p>
-Ongoing: Mesa is used as the core of many hardware OpenGL drivers for
-the XFree86 and X.org X servers within the
-<A href="http://dri.freedesktop.org/" target="_parent">DRI project</A>.
-I continue to enhance Mesa with new extensions and features.
-</p>
-
-
-
-<H1>Major Versions</H1>
-
-<p>
-This is a summary of the major versions of Mesa.
-Mesa's major version number has been incremented whenever a new version
-of the OpenGL specification is implemented.
-</p>
-
-
-<H2>Version 7.x features</H2>
-<p>
-Version 7.x of Mesa implements the OpenGL 2.1 API.  The main feature
-of OpenGL 2.x is the OpenGL Shading Language.
-</p>
-
-
-<H2>Version 6.x features</H2>
-<p>
-Version 6.x of Mesa implements the OpenGL 1.5 API with the following
-extensions incorporated as standard features:
-</p>
-<ul>
-<li>GL_ARB_occlusion_query
-<li>GL_ARB_vertex_buffer_object
-<li>GL_EXT_shadow_funcs
-</ul>
-<p>
-Also note that several OpenGL tokens were renamed in OpenGL 1.5
-for the sake of consistency.
-The old tokens are still available.
-</p>
-<pre>
-New Token                   Old Token
-------------------------------------------------------------
-GL_FOG_COORD_SRC            GL_FOG_COORDINATE_SOURCE
-GL_FOG_COORD                GL_FOG_COORDINATE
-GL_CURRENT_FOG_COORD        GL_CURRENT_FOG_COORDINATE
-GL_FOG_COORD_ARRAY_TYPE     GL_FOG_COORDINATE_ARRAY_TYPE
-GL_FOG_COORD_ARRAY_STRIDE   GL_FOG_COORDINATE_ARRAY_STRIDE
-GL_FOG_COORD_ARRAY_POINTER  GL_FOG_COORDINATE_ARRAY_POINTER
-GL_FOG_COORD_ARRAY          GL_FOG_COORDINATE_ARRAY
-GL_SRC0_RGB                 GL_SOURCE0_RGB
-GL_SRC1_RGB                 GL_SOURCE1_RGB
-GL_SRC2_RGB                 GL_SOURCE2_RGB
-GL_SRC0_ALPHA               GL_SOURCE0_ALPHA
-GL_SRC1_ALPHA               GL_SOURCE1_ALPHA
-GL_SRC2_ALPHA               GL_SOURCE2_ALPHA
-</pre>
-<p>
-See the
-<a href="http://www.opengl.org/documentation/spec.html" target="_parent">
-OpenGL specification</a> for more details.
-</p>
-
-
-
-<H2>Version 5.x features</H2>
-<p>
-Version 5.x of Mesa implements the OpenGL 1.4 API with the following
-extensions incorporated as standard features:
-</p>
-<ul>
-<li>GL_ARB_depth_texture
-<li>GL_ARB_shadow
-<li>GL_ARB_texture_env_crossbar
-<li>GL_ARB_texture_mirror_repeat
-<li>GL_ARB_window_pos
-<li>GL_EXT_blend_color
-<li>GL_EXT_blend_func_separate
-<li>GL_EXT_blend_logic_op
-<li>GL_EXT_blend_minmax
-<li>GL_EXT_blend_subtract
-<li>GL_EXT_fog_coord
-<li>GL_EXT_multi_draw_arrays
-<li>GL_EXT_point_parameters
-<li>GL_EXT_secondary_color
-<li>GL_EXT_stencil_wrap
-<li>GL_EXT_texture_lod_bias (plus, a per-texture LOD bias parameter)
-<li>GL_SGIS_generate_mipmap
-</ul>
-
-
-<H2>Version 4.x features</H2>
-
-<p>
-Version 4.x of Mesa implements the OpenGL 1.3 API with the following
-extensions incorporated as standard features:
-</p>
-
-<ul>
-<li>GL_ARB_multisample
-<li>GL_ARB_multitexture
-<li>GL_ARB_texture_border_clamp
-<li>GL_ARB_texture_compression
-<li>GL_ARB_texture_cube_map
-<li>GL_ARB_texture_env_add
-<li>GL_ARB_texture_env_combine
-<li>GL_ARB_texture_env_dot3
-<li>GL_ARB_transpose_matrix
-</ul>
-
-<H2>Version 3.x features</H2>
-
-<p>
-Version 3.x of Mesa implements the OpenGL 1.2 API with the following
-features:
-</p>
-<ul>
-<li>BGR, BGRA and packed pixel formats
-<li>New texture border clamp mode
-<li>glDrawRangeElements()
-<li>standard 3-D texturing
-<li>advanced MIPMAP control
-<li>separate specular color interpolation
-</ul>
-
-
-<H2>Version 2.x features</H2>
-<p>
-Version 2.x of Mesa implements the OpenGL 1.1 API with the following
-features.
-</p>
-<ul>
-<li>Texture mapping:
-	<ul>
-	<li>glAreTexturesResident
-	<li>glBindTexture
-	<li>glCopyTexImage1D
-	<li>glCopyTexImage2D
-	<li>glCopyTexSubImage1D
-	<li>glCopyTexSubImage2D
-	<li>glDeleteTextures
-	<li>glGenTextures
-	<li>glIsTexture
-	<li>glPrioritizeTextures
-	<li>glTexSubImage1D
-	<li>glTexSubImage2D
-	</ul>
-<li>Vertex Arrays:
-	<ul>
-	<li>glArrayElement
-	<li>glColorPointer
-	<li>glDrawElements
-	<li>glEdgeFlagPointer
-	<li>glIndexPointer
-	<li>glInterleavedArrays
-	<li>glNormalPointer
-	<li>glTexCoordPointer
-	<li>glVertexPointer
-	</ul>
-<li>Client state management:
-	<ul>
-	<li>glDisableClientState
-	<li>glEnableClientState
-	<li>glPopClientAttrib
-	<li>glPushClientAttrib
-	</ul>
-<li>Misc:
-	<ul>
-	<li>glGetPointer
-	<li>glIndexub
-	<li>glIndexubv
-	<li>glPolygonOffset
-	</ul>
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/libGL.txt b/docs/libGL.txt
deleted file mode 100644
index cb98840..0000000
--- a/docs/libGL.txt
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-Introduction
-------------
-
-This document describes the implementation of the XFree86 4.0 libGL.so
-library defined by the Linux/OpenGL Base specification found at
-http://reality.sgi.com/opengl/linux/linuxbase.html.
-
-The documentation is divided into two sections:
-    User's Guide
-    Driver Developer's Guide
-
-Author:  Brian Paul     (brian@precisioninsight.com)
-Date:    February 2000
-
-
-
-User's Guide
-------------
-
-Using libGL.so
-
-The libGL.so library defines the gl- and glX-prefixed functions needed to
-run OpenGL programs.  OpenGL client applications should link with the
--lGL option to use it.
-
-libGL.so serves two primary functions: GLX protocol generation for indirect
-rendering and loading/management of hardware drivers for direct rendering.
-
-When libGL.so initializes itself it uses the DRI to determine the
-appropriate hardware driver for each screen on the local X display.
-The hardware drivers are expected to be in the /usr/X11R6/lib/modules/dri/
-directory.  Drivers are named with the convention <name>_dri.so where
-<name> is a driver such as "tdfx", "i810", "gamma", etc.
-
-The LIBGL_DRIVERS_DIR environment variable may be used to specify a
-different DRI modules directory, overriding /usr/X11R6/lib/modules/dri/.
-This environment variable is ignored in setuid programs for security
-reasons.
-
-When libGL.so is unable to locate appropriate hardware drivers it will
-fall back to using indirect GLX rendering.
-
-To aid in solving problems, libGL.so will print diagnostic messages to
-stderr if the LIBGL_DEBUG environment variable is defined.
-
-libGL.so is thread safe.  The overhead of thread safety for common,
-single-thread clients is negligible.  However, the overhead of thread
-safety for multi-threaded clients is significant.  Each GL API call
-requires two calls to pthread_get_specific() which can noticably
-impact performance.  Warning:  libGL.so is thread safe but individual
-DRI drivers may not be.  Please consult the documentation for a driver
-to learn if it is thread safe.
-
-
-
-Indirect Rendering
-
-You can force indirect rendering mode by setting the LIBGL_ALWAYS_INDIRECT
-environment variable.  Hardware acceleration will not be used.
-
-
-
-libGL.so Extensibility
-
-libGL.so is designed to be extended without upgrading.  That is,
-drivers may install new OpenGL extension functions into libGL.so
-without requiring libGL.so to be replaced.  Clients of libGL.so should
-use the glXGetProcAddressEXT() function to obtain the address of
-functions by name.  For more details of GLX_ARB_get_proc_address see
-http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.spec
-
-libGL.so is also designed with flexibility such that it may be used
-with many generations of hardware drivers to come.
-
-
-
-
-Driver Developer's Guide
-------------------------
-
-This section describes the requirements to make an XFree86 4.0
-libGL.so-compatible hardware driver.  It is not intended for end
-users of libGL.so.
-
-
-XFree86 source files
-
-libGL.so is built inside XFree86 with sources found in xc/lib/GL/.
-Specifically, libGL.so is built from:
-
-	xc/lib/GL/glx/*.c
-	xc/lib/dri/XF86dri.c
-	xc/lib/dri/dri_glx.c
-	xc/lib/GL/mesa/src/glapi.c
-	xc/lib/GL/mesa/src/glapitemp.h
-	xc/lib/GL/mesa/src/glapitable.h
-	xc/lib/GL/mesa/src/glapioffsets.h
-	xc/lib/GL/mesa/src/glapinoop.c
-	xc/lib/GL/mesa/src/glheader.h
-	xc/lib/GL/mesa/src/glthread.c
-	xc/lib/GL/mesa/src/glthread.h
-	xc/lib/GL/mesa/src/X86/glapi_x86.S
-	xc/lib/GL/mesa/src/X86/assyntax.h
-
-Understand that the mesa/src/gl*.[ch] files are not tied to Mesa.  They
-have no dependencies on the rest of Mesa and are designed to be reusable
-in a number of projects.
-
-The glapi_x86.X and assyntax.h files implement x86-optimized dispatch
-of GL functions.  They are not required; C-based dispatch can be used
-instead, with a slight performance penalty.
-
-
-
-Driver loading and binding
-
-When libGL.so initializes itself (via the __glXInitialize function) a
-call is made to driCreateDisplay().  This function uses DRI facilities
-to determine the driver file appropriate for each screen on the local
-display.  Each screen's driver is then opened with dlopen() and asked
-for its __driCreateScreen() function.  The pointers to the __driCreateScreen()
-functions are kept in an array, indexed by screen number, in the
-__DRIdisplayRec struct.
-
-When a driver's __driCreateScreen() function is called, it must initialize
-a __DRIscreenRec struct.  This struct acts as the root of a tree of
-function pointers which are called to create and destroy contexts and
-drawables and perform all the operations needed by the GLX interface.
-See the xc/lib/GL/glx/glxclient.h file for details.
-
-
-
-Dynamic Extension Function Registration
-
-In order to provide forward compatibility with future drivers, libGL.so
-allows drivers to register new OpenGL extension functions which weren't
-known when libGL.so was built.
-
-The register_extensions() function in xc/lib/GL/dri/dri_glx.c is called
-as soon as libGL.so is loaded.  This is done with gcc's constructor
-attribute.  This mechanism will likely have to be changed for other compilers.
-
-register_extensions() loops over all local displays and screens, determines
-the DRI driver for each, and calls the driver's __driRegisterExtensions()
-function, if present.
-
-The __driRegisterExtensions() function can add new entrypoints to libGL
-by calling:
-
-    GLboolean _glapi_add_entrypoint(const char *funcName, GLuint offset)
-
-The parameters are the name of the function (such as "glFoobarEXT") and the
-offset of the dispatch slot in the API dispatch table.  The return value
-indicates success (GL_TRUE) or failure (GL_FALSE).
-
-_glapi_add_entrypoint() will synthesize entrypoint code in assembly
-language.  Assembly languages is required since parameter passing
-can't be handled correctly using a C-based solution.
-
-The address of the new entrypoint is obtained by calling the
-glXGetProcAddressARB() function.
-
-The dispatch offset number MUST be a number allocated by SGI in the same
-manner in which new GL_* constants are allocated.  Using an arbitrary
-offset number will result in many problems.
-
-
-
-Dispatch Management
-
-When a GL context is made current, the driver must install its dispatch
-table as the current dispatch table.  This is done by calling
-
-	void _glapi_set_dispatch(struct _glapi_table *dispatch);
-
-This will install the named dispatch table for the calling thread.
-The current dispatch table for a thread can be obtained by calling
-
-	struct _glapi_table *_glapi_get_dispatch(void);
-
-For higher performance in the common single-thread case, the global
-variable _glapi_Dispatch will point to the current dispatch table.
-This variable will be NULL when in multi-thread mode.
-
-
-
-Context Management
-
-libGL.so uses the XFree86 xthreads package to manage a thread-specific
-current context pointer.  See __glXGet/SetCurrentContext() in glext.c
-
-Drivers may use the _glapi_set/get_context() functions to maintain
-a private thread-specific context pointer.
-
diff --git a/docs/libraries.html b/docs/libraries.html
deleted file mode 100644
index eaeb045..0000000
--- a/docs/libraries.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<HTML>
-
-<TITLE>Libraries and Toolkits</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Libraries and Toolkits</H1>
-
-<ul>
-<li><a href="http://mrpowers.com/Apprentice/">Apprentice</a> - free OpenInventor work-alike
-<li><a href="http://www.coin3d.org/coin.html" target="_parent">Coin</a> - OSS Open Inventor clone
-<li><a href="http://www.softintegration.com/products/toolkit/opengl/" target="_parent">Ch</a> - OpenGL bindings for the Ch C/C++ interpreter
-<li><a href="http://www.cfdrc.com/FOX/fox.html" target="_parent">FOX</a> - GUI Library
-<li><a href="http://www.jausoft.com/gl4java.html" target="_parent">GL4Java</a> - a Java wrapper for OpenGL
-<li><a href="http://www.student.oulu.fi/%7Ejlof/gtkglarea/" target="_parent">GtkGLArea</a> - OpenGL Gtk widget
-<li><a href="http://www.ece.ucdavis.edu/%7Ekenelson/gtk-glarea/" target="_parent">GtkGLArea--</a> - OpenGL Gtk-- widget for C++
-<li><a href="http://gtkpas.sourceforge.net/" target="_parent">GTKpas</a> - OpenGL Gtk widget for <a href="http://www.freepascal.org/" target="_parent">FreePascal</a>
-<li><a href="http://freeglut.sourceforge.net/" target="_parent">FreeGLUT</a> - a GLUT work-alike
-<li><a href="http://math.nist.gov/f90gl" target="_parent">Fortran77/90 bindings for OpenGL and Mesa</a> - by William Mitchell
-<li><a href="http://glow.sourceforge.net/" target="_parent">GLOW</a> - a GUI toolkit for GLUT and OpenGL
-<li><a href="http://www.nigels.com/glt/">Glt</a> - an OpenGL C++ toolkit
-<li><a href="http://www.opengl.org/resources/libraries/glut.html" target="_parent">GLUT (GL Utility Toolkit)</a> - by Mark Kilgard
-<li><a href="http://atrey.karlin.mff.cuni.cz/%7E0rfelyus/guileGL/" target="_parent">GuileGL</a> - OpenGL and GtkGLArea language bindings for Guile
-<li><a href="http://www.rsinc.com/" target="_parent">IDL</a> - Interactive Data Language
-<li><a href="http://www.newplanetsoftware.com/jx/" target="_parent">JX</a> - C++ application framework and GUI library
-<li><a href="http://www.vrs3d.org/" target="_parent">MAM/VRS</a> - object-oriented toolkit for 3D graphics
-<li><a href="http://www.jwdt.com/%7Epaysan/bigforth.html" target="_parent">MINOS</a> - GUI library
-<li><a href="http://sourceforge.net/project/?group_id=2795" target="_parent">OglCLib</a> - C++ wrapper for OpenGL
-<li><a href="http://oss.sgi.com/projects/inventor" target="_parent"> Open Inventor</a> - the Open Inventor toolkit from SGI
-<li><a href="http://www.tgs.com/" target="_parent">Open Inventor</a> - the Open Inventor toolkit from Template Graphics Software, Inc.
-<li><a href="http://openrm.sourceforge.net/" target="_parent">OpenRM</a>
-- Open Source, multithreaded, parallel scene graph API
-<li><a href="http://www.opensg.org/OpenSGPLUS/index.EN.html" target="_parent">
-Open SG PLUS</a> - a scene-graph library
-<li><a href="http://www.openscenegraph.org/" target="_parent">Open Scene Graph
-</a> - a scene-graph library
-<li><a href="http://www.openvrml.org/" target="_parent">OpenVRML</a>
-- a VRML parsing/display library with "lookat" - an example VRML browser
-<li><a href="http://plib.sourceforge.net/" target="_parent">PLIB</a> - A collection of portable games libraries, including an OpenGL GUI and a simple Scene Graph API
-<li><a href="ftp://ftp.troll.no/contest/Pryan-1.2.tar.gz" target="_parent">Pryan</a> - an OpenInventor-like toolkit
-<li><a href="http://starship.python.net:9673/crew/da/Code/PyOpenGL" target="_parent">PyOpenGL</a> - OpenGL interface for Python
-<li><a href="http://www.quesa.org/" target="_parent">Quesa</a> - QuickDraw3D-compatible library based on OpenGL, Mesa or Direct3D
-<li><a href="http://www.mesa3d.org/brianp/repgl.txt" target="_parent">repGL</a> - IRIS GL emulated with OpenGL
-<li><a href="http://www.scitechsoft.com/dp_mgl.html" target="_parent">SciTech MGL</a> - A multiplatform (Windows, Linux, OS/2, DOS, QNX, SMX, RT-Target &amp; more) graphics library
-<li><a href="http://sgl.sourceforge.net/" target="_parent">SGL</a> - a 3D Scene Graph Library
-<li><a href="http://www.lal.in2p3.fr/SI/SoFree/" target="_parent">SoFree</a> - a free implementation of Open Inventor
-<li><a href="http://togl.sourceforge.net/" target="_parent">Togl</a> - Tcl/Tk widget for OpenGL
-<li><a href="http://mesa3d.sourceforge.net/notfound.html">VLE</a> - Virtual Reality Toolkit
-<li><a href="http://www.int.com/" target="_parent">View3D Widget</a> - 3-D GUI widget
-<li><a href="http://www.vtk.org/" target="_parent">VTK</a> - Visualization Toolkit
-<li><a href="http://home.earthlink.net/%7Erzeh/YAJOGLB/doc/YAJOGLB.html" target="_parent">YAJOGL</a> - Yet Another Java GL Binding.
-</ul>
-
-
-</body></html>
\ No newline at end of file
diff --git a/docs/license.html b/docs/license.html
deleted file mode 100644
index 44b980d..0000000
--- a/docs/license.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<HTML>
-
-<TITLE>License / Cppyright Information</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Disclaimer</H1>
-
-<p>
-Mesa is a 3-D graphics library with an API which is very similar to
-that of <a href="http://www.opengl.org/" target="_parent">OpenGL</a>.*
-To the extent that Mesa utilizes the OpenGL command syntax or state
-machine, it is being used with authorization from <a
-href="http://www.sgi.com/" target="_parent">Silicon Graphics,
-Inc.</a>(SGI). However, the author does not possess an OpenGL license
-from SGI, and makes no claim that Mesa is in any way a compatible
-replacement for OpenGL or associated with SGI. Those who want a
-licensed implementation of OpenGL should contact a licensed
-vendor.
-</p>
-
-<p>
-Please do not refer to the library as <em>MesaGL</em> (for legal
-reasons). It's just <em>Mesa</em> or <em>The Mesa 3-D graphics
-library</em>. <br>
-</p>
-
-<p>
-* OpenGL is a trademark of <a href="http://www.sgi.com/"
-target="_parent">Silicon Graphics Incorporated</a>.
-</p>
-
-
-
-<H1>License / Copyright Information</H1>
-
-<p>
-The Mesa distribution consists of several components.  Different copyrights
-and licenses apply to different components.  For example, GLUT is copyrighted
-by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa
-device drivers are copyrighted by their authors.  See below for a list of
-Mesa's main components and the license for each.
-</p>
-<p>
-The core Mesa library is licensed according to the terms of the MIT license.
-This allows integration with the XFree86, Xorg and DRI projects.
-</p>
-<p>
-The default Mesa license is as follows:
-</p>
-
-<pre>
-Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-</pre>
-
-
-<H1>Attention, Contributors</H1>
-
-<p>
-When contributing to the Mesa project you must agree to the licensing terms
-of the component to which you're contributing.
-The following section lists the primary components of the Mesa distribution
-and their respective licenses.
-</p>
-
-
-<H1>Mesa Component Licenses</H1>
-
-<pre>
-Component         Location               License
-------------------------------------------------------------------
-Main Mesa code    src/mesa/              Mesa (MIT)
-
-Device drivers    src/mesa/drivers/*     MIT, generally
-
-Ext headers       include/GL/glext.h     Khronos
-                  include/GL/glxext.h
-
-GLUT              src/glut/              Mark Kilgard's copyright
-
-SGI GLU library   src/glu/sgi/           SGI Free B
-
-demo programs     progs/demos/           see source files
-
-X demos           progs/xdemos/          see source files
-
-SGI demos         progs/samples/         SGI license
-
-RedBook demos     progs/redbook/         SGI license
-</pre>
-
-<p>
-In general, consult the source files for license terms.
-</p>
-
-
-</body>
-</html>
diff --git a/docs/lists.html b/docs/lists.html
deleted file mode 100644
index 1487891..0000000
--- a/docs/lists.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Mailing Lists</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Mailing Lists</H1>
-
-
-<p>There are four Mesa 3D / DRI mailing lists:
-</p>
-
-<ul>
-<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users"
-target="_parent">mesa-users</a> - intended for end-users of Mesa and DRI
-drivers.  Newbie questions are OK, but please try the general OpenGL
-resources and Mesa/DRI documentation first.
-</li>
-<br>
-<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"
-target="_parent">mesa-dev</a> - for Mesa, Gallium and DRI development
-discussion.  Not for beginners.
-</li>
-<br>
-<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
-target="_parent">mesa-commit</a> - relays git check-in messages
-(for developers).
-In general, people should not post to this list.
-</li>
-<br>
-<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-announce"
-target="_parent">mesa-announce</a> - announcements of new Mesa
-versions are sent to this list.  Very low traffic.
-</li>
-</ul>
-
-<p>
-Follow the links above for list archives.
-</p>
-
-<p>
-The old Mesa lists hosted at SourceForge are no longer in use.
-The archives are still available, however:
-<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-announce" target="_parent">mesa3d-announce</a>,
-<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-users" target="_parent">mesa3d-users</a>,
-<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-dev" target="_parent">mesa3d-dev</a>.
-</p>
-
-
-<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD 
-kernels, see the
-<a href="http://dri.freedesktop.org/wiki/MailingLists" target="_parent">
-DRI wiki</a>.
-</p>
-
-<p>
-<b>Notice</b>: You must subscribe to these lists in order to post to them.
-</p>
-
-
-<br>
-
-<H1>OpenGL Forums</H1>
-
-<p>
-Here are some other OpenGL-related forums you might find useful:
-</p>
-
-<ul>
-<li><a href="http://www.opengl.org/cgi-bin/ubb/ultimatebb.cgi"
-target="_parent">OpenGL discussion forums</A> at www.opengl.org</li>
-<li>Usenet newsgroups:
-<ul>
-<li>comp.graphics.algorithms</li>
-<li>comp.graphics.api.opengl</li>
-<li>comp.os.linux.x</li>
-</ul>
-</ul>
-
-</HTML>
-</BODY>
diff --git a/docs/mangling.html b/docs/mangling.html
deleted file mode 100644
index 5507154..0000000
--- a/docs/mangling.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<HTML>
-
-<TITLE>Function Name Mangling</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Function Name Mangling</H1>
-
-<p>
-If you want to use both Mesa and another OpenGL library in the same
-application at the same time you may find it useful to compile Mesa with
-<i>name mangling</i>.
-This results in all the Mesa functions being prefixed with
-<b>mgl</b> instead of <b>gl</b>.
-</p>
-
-<p>
-To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE.
-Add the flag to CFLAGS in the configuration file which you want to use.
-For example:
-<pre>
-CFLAGS += -DUSE_MGL_NAMESPACE
-</pre>
-</p>
-
-
-</BODY>
-</HTML>
diff --git a/docs/mesa.css b/docs/mesa.css
deleted file mode 100644
index a53a9df..0000000
--- a/docs/mesa.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Mesa CSS */
-body {
-	background-color: #ffffff;
-	font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-	color: black;
- 	link: #111188;
-}
-
-h1 {
-	font: 24px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-	font-weight: bold;
-	color: black;
-}
-
-h2 {
-	font: 18px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif, bold;
-	font-weight: bold;
-	color: black;
-}
-
-code {
-	font-family: monospace;
-	font-size: 10pt;
-	color: black;
-}
-
-
-pre {
-	/*font-family: monospace;*/
-	font-size: 10pt;
-	/*color: black;*/
-}
-
diff --git a/docs/modelers.html b/docs/modelers.html
deleted file mode 100644
index aae9686..0000000
--- a/docs/modelers.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-
-<TITLE>Modelers, Renderers and Viewers</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Modelers, Renderers and Viewers</H1>
-
-<ul>
-        <li><a href="http://www.aqsis.org/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
-	<li><a href="http://www.ac3d.org/" target="_parent">AC3D</a> - 3-D modeler
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
-	</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides
-	functionality like Corel Draw and Illustrator
-	</li><li><a href="http://www.blender.org/" target="_parent">Blender</a> - 3-D animation
-	software
-	</li><li><a href="http://www.arq.net/%7Ekasten/demtools/" target="_parent">Demtools</a>
-	- Map viewer
-	</li><li><a href="http://www.holometric.de/dimension/" target="_parent">DIMENSION</a>
-	- freeform surface reconstruction
-	</li><li><a href="http://www.vectaport.com/vhclmaps/demviewer.html" target="_parent">demviewer</a>
-	- interactive terrain viewer
-	</li><li><a href="http://www.crc.ca/FreeWRL" target="_parent">FreeWRL</a> - VRML browser
-	</li><li><a href="http://www.geomview.org/" target="_parent">Geomview</a> - 3-D geometry
-	exploration
-	</li><li><a href="http://innovation3d.sourceforge.net/" target="_parent">Innovation3D</a>
-	- 3D modeling program
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html" target="_parent">KWRL</a> - VRML browser
-	</li><li><a href="http://www.openvrml.org/" target="_parent">LibVRML97/Lookat</a>
-	- VRML viewer
-	</li><li><a href="http://aig.cs.man.ac.uk/systems/Maverik/" target="_parent">Maverik</a>
-	- VR graphics and interaction system
-	</li><li><a href="http://www.swissquake.ch/chumbalum-soft/md2v" target="_parent">MD2 Viewer</a>
-	- View .MD2 files
-	</li><li><a href="http://www.megacads.dlr.de/" target="_parent">MegaCads</a>
-	- Multiblock-Elliptic-Grid-Generation-And-CAD-System
-	</li><li><a href="http://www.swissquake.ch/chumbalum-soft/" target="_parent">MilkShape
-	3D</a> - 3D modeler/animator
-	</li><li><a href="http://mindseye.sourceforge.net/" target="_parent">Mindseye</a> - Rendering/Modeling
-	Package
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">Moonlight Atelier</a> - modeling and rendering package
-	</li><li><a href="http://www.neuralvr.com/" target="_parent">Pansophica</a> - Virtual Reality web organizer
-	</li><li><a href="http://www.sim.no/reducer.html" target="_parent">Rational Reducer</a>
-	- polygon reduction tool
-	</li><li><a href="http://www.cs.kuleuven.ac.be/cwis/research/graphics/RENDERPARK/" target="_parent">RenderPark</a>
-	- photorealistic rendering
-	</li><li><a href="http://www.hardgeus.com/revolution" target="_parent">Revolution 3D Engine</a>
-	- .3ds rendering engine
-	</li><li><a href="http://www.dgp.toronto.edu/%7Emjmcguff/eversion/" target="_parent">sphereEversion</a>
-	- inside-out sphere visualization
-	</li><li><a href="http://www.cs.kuleuven.ac.be/cwis/research/graphics/3DOM/" target="_parent">3Dom</a>
-	- 3-D modeler
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">3D Studio file viewer</a> - by David Farrell
-	</li><li><a href="http://www.microform.se/" target="_parent">VARKON</a> - product engineering,
-	design, modeling
-	</li><li><a href="http://www.sim.no/vrmlview.html" target="_parent">VRMLview</a> - VRML
-	model viewer
-	</li><li><a href="http://www.iicm.edu/vrwave/" target="_parent">VRWave</a> - a VRML 2.0
-	browser
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">VRweb</a> - VRML browser
-	</li><li><a href="http://www.csv.ica.uni-stuttgart.de/vrml/dune/" target="_parent">white_dune</a>
-	- graphical VRML97 Editor and animation tool
-</li></ul>
-
-
-</body></html>
diff --git a/docs/news.html b/docs/news.html
deleted file mode 100644
index 72d38ee..0000000
--- a/docs/news.html
+++ /dev/null
@@ -1,1310 +0,0 @@
-<HTML>
-
-<TITLE>Mesa News</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>News</H1>
-
-
-<h2>October 4, 2010</h2>
-
-<p>
-<a href="relnotes-7.9.html">Mesa 7.9</a> (final) is released.  This is a new
-development release.
-</p>
-
-
-<h2>September 27, 2010</h2>
-
-<p>
-<a href="relnotes-7.9.html">Mesa 7.9.0-rc1</a> is released.  This is a
-release candidate for the 7.9 development release.
-</p>
-
-
-<h2>June 16, 2010</h2>
-
-<p>
-<a href="relnotes-7.8.2.html">Mesa 7.8.2</a> is released.  This is a bug-fix
-release collecting fixes since the 7.8.1 release.
-</p>
-
-
-<h2>April 5, 2010</h2>
-
-<p>
-<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released.  This is a bug-fix
-release for a few critical issues in the 7.8 release.
-</p>
-
-
-<h2>March 28, 2010</h2>
-<p>
-<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released.  This is a bug-fix
-release fixing issues found in the 7.7 release.
-</p>
-<p>
-Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released.  This is a new
-development release.
-</p>
-
-
-
-<h2>December 21, 2009</h2>
-<p>
-<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released.  This is a bug-fix
-release fixing issues found in the 7.6 release.
-</p>
-<p>
-Also, <a href="relnotes-7.7.html">Mesa 7.7</a> is released.  This is a new
-development release.
-</p>
-
-
-<h2>September 28, 2009</h2>
-<p>
-<a href="relnotes-7.6.html">Mesa 7.6</a> is released.  This is a new feature
-release.  Those especially concerned about stability may want to wait for the
-follow-on 7.6.1 bug-fix release.
-</p>
-<p>
-<a href="relnotes-7.5.2.html">Mesa 7.5.2</a> is also released.
-This is a stable release fixing bugs since the 7.5.1 release.
-</p>
-
-
-<h2>September 3, 2009</h2>
-<p>
-<a href="relnotes-7.5.1.html">Mesa 7.5.1</a> is released.
-This is a bug-fix release which fixes bugs found in version 7.5.
-</p>
-
-
-<h2>July 17, 2009</h2>
-<p>
-<a href="relnotes-7.5.html">Mesa 7.5</a> is released.
-This is a new features release.  People especially concerned about
-stability may want to wait for the follow-on 7.5.1 bug-fix release.
-</p>
-
-
-<h2>June 23, 2009</h2>
-<p>
-<a href="relnotes-7.4.4.html">Mesa 7.4.4</a> is released.
-This is a stable release that fixes a regression in the i915/i965 drivers
-that slipped into the 7.4.3 release.
-</p>
-
-
-<h2>June 19, 2009</h2>
-<p>
-<a href="relnotes-7.4.3.html">Mesa 7.4.3</a> is released.
-This is a stable release fixing bugs since the 7.4.2 release.
-</p>
-
-
-<h2>May 15, 2009</h2>
-<p>
-<a href="relnotes-7.4.2.html">Mesa 7.4.2</a> is released.
-This is a stable release fixing bugs since the 7.4.1 release.
-</p>
-
-
-<h2>April 18, 2009</h2>
-<p>
-<a href="relnotes-7.4.1.html">Mesa 7.4.1</a> is released.
-This is a stable release fixing bugs since the 7.4 release.
-</p>
-
-
-<h2>March 27, 2009</h2>
-<p>
-<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
-This is a stable release fixing bugs since the 7.3 release.
-</p>
-
-
-<h2>January 22, 2009</h2>
-<p>
-<a href="relnotes-7.3.html">Mesa 7.3</a> is released.
-This is a new development release.
-Mesa 7.4 will follow and will have bug fixes relative to 7.3.
-</p>
-
-
-<h2>September 20, 2008</h2>
-<p>
-<a href="relnotes-7.2.html">Mesa 7.2</a> is released.
-This is a stable, bug-fix release.
-</p>
-
-
-<h2>August 26, 2008</h2>
-<p>
-<a href="relnotes-7.1.html">Mesa 7.1</a> is released.
-This is a new development release.
-It should be relatively stable, but those especially concerned about
-stability should wait for the 7.2 release or use Mesa 7.0.4 (the
-previous stable release).
-</p>
-
-
-<h2>August 16, 2008</h2>
-<p>
-<a href="relnotes-7.0.4.html">Mesa 7.0.4</a> is released.
-This is a bug-fix release.
-</p>
-
-
-<h2>April 4, 2008</h2>
-<p>
-<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
-This is a bug-fix release.
-</p>
-
-
-<h2>January 24, 2008</h2>
-
-<p>
-Added a new page describing the <a href="cell.html">Mesa Cell driver</a>.
-</p>
-
-
-
-<h2>November 13, 2007</h2>
-
-<p>
-Gallium3D is the codename for the new Mesa device driver architecture
-which is currently under development.
-</p>
-<p>
-Gallium3D development is taking place on the <em>gallium-0.1</em> branch
-of the git repository.
-Currently, there's only a software-only driver and an Intel i915/945 driver
-but other drivers will be coming...
-</p>
-
-
-<h2>November 10, 2007</h2>
-<p>
-<a href="relnotes-7.0.2.html">Mesa 7.0.2</a> is released.
-This is a bug-fix release.
-</p>
-
-
-<h2>August 3, 2007</h2>
-<p>
-<a href="relnotes-7.0.1.html">Mesa 7.0.1</a> is released.
-This is a bug-fix release.
-</p>
-
-
-<h2>June 22, 2007</h2>
-<p>
-<a href="relnotes-7.0.html">Mesa 7.0</a> is released.
-This is a stable release featuring OpenGL 2.1 support.
-</p>
-
-
-<h2>April 27, 2007</h2>
-<p>
-<a href="relnotes-6.5.3.html">Mesa 6.5.3</a> is released.
-This is a development release which will lead up to the Mesa 7.0 release
-(which will advertise OpenGL 2.1 API support).
-</p>
-
-
-<h2>March 26, 2007</h2>
-<p>
-The new Shading Language compiler branch has been merged into the git
-master branch.  This is a step toward hardware support for the OpenGL
-2.0 Shading Language and will be included in the next Mesa release.
-In conjunction, <a href="http://glean.sf.net" target="_parent">Glean
-</a> has been updated with a new test that does over 130 tests of the
-shading language and built-in functions.
-</p>
-
-<h2>April 2007</h2>
-<p>
-Thomas Hellstr&ouml;m of Tungsten Graphics has written a whitepaper
-describing the new DRI memory management system</a>.
-</p>
-
-<h2>December 5, 2006</h2>
-<p>
-Mesa is now using git as its source code management system.
-The previous CVS repository should no longer be used.
-See the <a href="repository.html">repository page</a> for more information.
-</p>
-
-<h2>December 2, 2006</h2>
-<p>
-<a href="relnotes-6.5.2.html">Mesa 6.5.2</a> has been released.
-This is a new development release.
-</p>
-
-<h2>September 15, 2006</h2>
-<p>
-<a href="relnotes-6.5.1.html">Mesa 6.5.1</a> has been released.
-This is a new development release.
-</p>
-
-<h2>March 31, 2006</h2>
-<p>
-<a href="relnotes-6.5.html">Mesa 6.5</a> has been released.
-This is a new development release.
-</p>
-
-
-<h2>February 2, 2006</h2>
-<p>
-<a href="relnotes-6.4.2.html">Mesa 6.4.2</a> has been released.
-This is stable, bug-fix release.
-</p>
-
-
-<h2>November 29, 2005</h2>
-<p>
-<a href="relnotes-6.4.1.html">Mesa 6.4.1</a> has been released.
-This is stable, bug-fix release.
-</p>
-
-
-
-<h2>October 24, 2005</h2>
-<p>
-<a href="relnotes-6.4.html">Mesa 6.4</a> has been released.
-This is stable, bug-fix release.
-</p>
-
-
-<h2>August 19, 2005</h2>
-<p>
-Mesa 6.3.2 has been released.
-Note: there was no public release of version 6.3.1.
-</p>
-<a href="versions.html#6.3.2">Changes in version 6.3.1</a>
-<p>
-The MD5 checksums are:
-</p>
-<pre>
-98192e45ed8d69113688f89f90869346  MesaLib-6.3.2.tar.gz
-0df27701df0924d17ddf41185efa8ce1  MesaLib-6.3.2.tar.bz2
-ccb2423aab77fc7e81ce628734586140  MesaLib-6.3.2.zip
-9d0fca0a7d051c34a0b485423fb3e85d  MesaDemos-6.3.2.tar.gz
-96708868450c188205e42229b5d813c4  MesaDemos-6.3.2.tar.bz2
-c5102501e609aa8996d832fafacb8ab9  MesaDemos-6.3.2.zip
-</pre>
-
-
-<h2>July 20, 2005</h2>
-<p>
-Mesa 6.3 has been released.
-This is a development release with new features, changes and bug fixes.
-</p>
-<pre>
-    New:
-	- GL_EXT_framebuffer_object extension
-	- GL_ARB_draw_buffers extension
-	- GL_ARB_pixel_buffer_object extension
-	- GL_OES_read_format extension (Ian Romanick)
-	- DirectFB driver (Claudio Ciccani)
-	- x86_64 vertex transformation code (Mikko T.)
-    Changes:
-	- added -stereo option for glxgears demo (Jacek Rosik)
-	- updated the PBuffer demo code in xdemos/ directory
-	- glDeleteTextures/Programs/Buffers() now makes the object ID
-	  available for immediate re-use
-	- assorted 64-bit clean-ups fixes (x86_64 and Win64)
-	- lots of internal changes for GL_EXT_framebuffer_object
-    Bug fixes:
-	- some functions didn't support PBO functionality
-	- glGetTexImage didn't convert color index images to RGBA as required
-	- fragment program texcoords were sometimes wrong for points and lines
-	- fixed problem with negative dot product in arbfplight, fplight demos
-	- fixed bug in perspective correction of antialiased, textured lines
-	- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
-	- fixed a couple per-pixel fog bugs (Soju Matsumoto)
-	- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
-	- fixed float parsing bug in ARB frag/vert programs (bug 2520)
-	- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
-	- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
-	- glXChooseFBConfig() crashed if attribList pointer was NULL
-	- program state.light[n].spot.direction.w was wrong value (bug 3083)
-	- fragment program fog option required glEnable(GL_FOG) - wrong.
-	- glColorTable() could produce a Mesa implementation error (bug 3135)
-	- RasterPos could get corrupted by color index rendering path
-	- Removed bad XTranslateCoordinates call when rendering to Pixmaps
-	- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
-	- fixed a few Darwin compilation problems
-</pre>
-<p>
-The MD5 checksums are:
-</p>
-<pre>
-0236f552d37514776945d5a013e5bb7b  MesaLib-6.3.tar.gz
-60e1a8f78c4a8c7750a1e95753190986  MesaLib-6.3.tar.bz2
-ca7c950fbace68c70caa822322db7223  MesaLib-6.3.zip
-25ea801645b376c014051804fe4974b2  MesaDemos-6.3.tar.gz
-9248e74872ea88c57ec25c900c295057  MesaDemos-6.3.tar.bz2
-8537dfa734ef258dcc7272097558d434  MesaDemos-6.3.zip
-</pre>
-
-
-<h2>December 9, 2004</h2>
-<p>
-Mesa 6.2.1 has been released.
-This is a stable release which just fixes bugs since the 6.2 release.
-</p>
-<pre>
-    Bug fixes:
-	- don't apply regular fog or color sum when using a fragment program
-	- glProgramEnvParameter4fARB always generated an error on
-	  GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-	- glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-	- fixed width/height mix-up in glSeparableFilter2D()
-	- fixed regression in glCopyPixels + convolution
-	- glReadPixels from a clipped front color buffer didn't always work
-	- glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-	- Attempting queries/accesses of VBO 0 weren't detected as errors
-	- paletted textures failed if the palette had fewer than 256 entries
-    Changes:
-	- fixed a bunch of compiler warnings found with gcc 3.4
-	- bug reports should to go bugzilla.freedesktop.org
-</pre>
-<p>
-The MD5 checksums are:
-</p>
-<pre>
-80008a92f6e055d3bfdde2cf331ec3fa  MesaLib-6.2.1.tar.gz
-f43228cd2bf70f583ef3275c1c545421  MesaLib-6.2.1.tar.bz2
-dec26cfd40116ad021020fea2d94f652  MesaLib-6.2.1.zip
-2c7af3c986a7571c8713c8bfee7e49e3  MesaDemos-6.2.1.tar.gz
-3cac74667b50bcbd4f67f594fb4224a2  MesaDemos-6.2.1.tar.bz2
-75b3edd12eb2b370caf05f29b99e508a  MesaDemos-6.2.1.zip
-</pre>
-
-
-<h2>October 2, 2004</h2>
-<p>
-Mesa 6.2 has been released.
-This is a stable release which just fixes bugs since the 6.1 release.
-</p>
-<pre>
-    New:
-	- enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-	- updated Doxygen support (Jose Fonseca)
-    Changes:
-	- some GGI driver updates (Christoph Egger, bug 1025977)
-    Bug fixes:
-	- Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-	- fixed a few compilation issues on IRIX
-	- fixed a matrix classification bug (reported by Wes Bethel)
-	- we weren't reseting the vertex/fragment program error state
-	  before parsing (Dave Reveman)
-	- adjust texcoords for sampling texture rectangles (Dave Reveman)
-	- glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-	- repeated calls to glDeleteTexture(t) could lead to a crash
-	- fixed potential ref count bugs in VBOs and vertex/fragment programs
-	- spriteblast demo didn't handle window size changes correctly
-	- glTexSubImage didn't handle pixels=NULL correctly for PBOs
-	- fixed color index mode glDrawPixels bug (Karl Schultz)
-</pre>
-<p>
-The MD5 checksums are:
-</p>
-<pre>
-9e8f34b059272dbb8e1f2c968b33bbf0  MesaLib-6.2.tar.gz
-3d6a6362390b6a37d3cb2e615f3ac7db  MesaLib-6.2.tar.bz2
-6cfd7895d28e695c0dbbed9469564091  MesaLib-6.2.zip
-3e06e33b0809f09855cb60883b8bdfef  MesaDemos-6.2.tar.gz
-9d160009c3dfdb35fe7e4088c9ba8f85  MesaDemos-6.2.tar.bz2
-856f7ec947122eb3c8985ebc2f654dcd  MesaDemos-6.2.zip
-</pre>
-
-
-<h2>August 18, 2004</h2>
-<p>
-Mesa 6.1 has been released.
-This is a new development release (version 6.2 will be a stabilization
-release).
-</p>
-<pre>
-    New:
-	- Revamped Makefile system
-	- glXUseRotatedXFont() utility (see xdemos/xuserotfont.c)
-	- internal driver interface changes related to texture object
-	  allocation, vertex/fragment programs, BlendEquationSeparate, etc.
-	- option to walk triangle edges with double-precision floats
-	  (Justin Novosad of Discreet) (see config.h file)
-	- support for AUX buffers in software GLX driver
-	- updated glext.h to version 24 and glxext.h to version 6
-	- new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars
-	- updated BeOS support (Philippe Houdoin)
-    Changes:
-	- fragment fog interpolation is perspective corrected now
-	- new glTexImage code, much cleaner, may be a bit faster
-    Bug fixes:
-	- glArrayElement in display lists didn't handle generic vertex attribs
-	- glFogCoord didn't always work properly
-	- ARB_fragment_program fog options didn't work
-	- frag prog TEX instruction no longer incorrectly divides s,t,r by q
-	- ARB frag prog TEX and TEXP instructions now use LOD=0
-	- glTexEnviv in display lists didn't work
-	- glRasterPos didn't do texgen or apply texture matrix
-	- GL_DOUBLE-valued vertex arrays were broken in some cases
-	- fixed texture rectangle edge/border sampling bugs
-	- sampling an incomplete texture in a fragment program would segfault
-	- glTexImage was missing a few error checks
-	- fixed some minor glGetTexParameter glitches
-	- GL_INTENSITY was mistakenly accepted as a <format> to glTexImage
-	- fragment program writes to RC/HC register were broken
-	- fixed a few glitches in GL_HP_occlusion_test extension
-	- glBeginQueryARB and glEndQueryARB didn't work inside display lists
-	- vertex program state references were broken
-	- fixed triangle color interpolation bug on AIX (Shane Blackett)
-	- fixed a number of minor memory leaks (bug #1002030)
-</pre>
-The MD5 checksums are:
-</p>
-<pre>
-c9284d295ebcd2e0486cc3cd54e5863c  MesaLib-6.1.tar.gz
-5de1f53ec0709f60fc68fdfed57351f3  MesaLib-6.1.tar.bz2
-483e77cac4789a5d36c42f3c0136d6d8  MesaLib-6.1.zip
-8c46cfa6f9732acc6f6c25724aad0246  MesaDemos-6.1.tar.gz
-89bfe0f6c69b39fd0ebd9fff481a4e9b  MesaDemos-6.1.tar.bz2
-161268531fcc6f0c5a056430ee97e0c1  MesaDemos-6.1.zip
-</pre>
-
-
-
-<h2>April 2, 2004</h2>
-
-<p>
-Mesa 6.0.1 has been released.
-This release basically just fixes bugs since the 6.0. release.
-</p>
-<pre>
-    New:
-	- upgraded glext.h to version 22
-	- new build targets (Dan Schikore)
-	- new linux-x86-opteron build target (Heath Feather)
-    Bug fixes:
-	- glBindProgramARB didn't update all necessary state
-	- fixed build problems on OpenBSD
-	- omit CVS directories from tarballs
-	- glGetTexImage(GL_COLOR_INDEX) was broken
-	- fixed an infinite loop in t&l module
-	- silenced some valgrind warnings about using unitialized memory
-	- fixed some compilation/link glitches on IRIX (Mike Stephens)
-	- glBindProgram wasn't getting compiled into display lists
-	- GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079)
-	- two-sided lighting and vertex program didn't work (bug 887330)
-	- stores to program parameter registers in vertex state programs
-	  didn't work.
-	- fixed glOrtho bug found with gcc 3.2.2 (RH9)
-	- glXCreateWindow() wasn't fully implemented (bug 890894)
-	- generic vertex attribute arrays didn't work in display lists
-	- vertex buffer objects' default usage and access fields were wrong
-	- glDrawArrays with start!=0 was broken
-	- fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken
-	- linux-osmesa16-static config didn't work
-	- fixed a few color index rendering problems (bug 910687)
-	- glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE
-	- OSMesa RGB and BGR modes were broken
-	- glProgramStringARB mistakenly required a null-terminated string
-	- fragment program XPD instruction was incorrect
-	- glGetMaterial() didn't work reliably
-</pre>
-The MD5 checksums are:
-</p>
-<pre>
-011be0e79666c7a6eb9693fbf9348653  MesaLib-6.0.1.tar.gz
-b7f14088c5c2f14490d2739a91102112  MesaLib-6.0.1.tar.bz2
-bf0510cf0a2b87d64cdd317eca3f1db1  MesaLib-6.0.1.zip
-b7b648599e0aaee1c4ffc554a2a9139e  MesaDemos-6.0.1.tar.gz
-dd6aadfd9ca8e1cfa90c6ee492bc6f43  MesaDemos-6.0.1.tar.bz2
-eff71d59c211825e949199852f5a2316  MesaDemos-6.0.1.zip
-</pre>
-
-
-
-<h2>January 16, 2004</h2>
-
-<p>
-Mesa 6.0 has been released.  This is a stabilization of the 5.1 release
-and primarily just incorporates bug fixes.
-</p>
-<pre>
-    New:
-	- full OpenGL 1.5 support
-	- updated GL/glext.h file to version 21
-    Changes:
-	- changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h)
-    Bug fixes:
-	- fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color
-	  clamping issue
-	- updated suno5-gcc configs
-	- glColor3 functions sometimes resulted in undefined alpha values
-	- fixed FP divide by zero error seen on VMS with xlockmore, others
-	- fixed vertex/fragment program debug problem (bug 873011)
-	- building on AIX with gcc works now
-	- glDeleteProgramsARB failed for ARB fragment programs (bug 876160)
-	- glDrawRangeElements tried to modify potentially read-only storage
-	- updated files for building on Windows
-</pre>
-
-
-
-<h2>December 28, 2003</h2>
-
-<p>
-The Mesa CVS server has been moved to <a href="http://www.freedesktop.org"
-target="_parent">
-freedesktop.org</a> because of problems with SourceForge's anonymous
-CVS service.
-</p>
-
-<p>Please see the <a href="cvs_access.html">CVS access page</a> for details.
-</p>
-
-
-<h2>December 17, 2003</h2>
-
-<p>
-Mesa 5.1 has been released.  This is a new development release.
-Mesa 6.0 will be the next stable release and will support all
-OpenGL 1.5 features.
-</p>
-<pre>
-    New features:
-	- reorganized directory tree
-	- GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
-	- GL_ATI_texture_env_combine3 extension (Ian Romanick)
-	- GL_SGI_texture_color_table extension (Eric Plante)
-	- GL_NV_fragment_program extension
-	- GL_NV_light_max_exponent extension
-	- GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle)
-	- GL_ARB_occlusion_query extension
-	- GL_ARB_point_sprite extension
-	- GL_ARB_texture_non_power_of_two extension
-	- GL_IBM_multimode_draw_arrays extension
-	- GL_EXT_texture_mirror_clamp extension (Ian Romanick)
-	- GL_ARB_vertex_buffer_object extension
-	- new X86 feature detection code (Petr Sebor)
-	- less memory used for display lists and vertex buffers
-	- demo of per-pixel lighting with a fragment program (demos/fplight.c)
-	- new version (18) of glext.h header
-	- new spriteblast.c demo of GL_ARB_point_sprite
-	- faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
-	- faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
-    Bug fixes:
-	- really enable OpenGL 1.4 features in DOS driver.
-	- fixed issues in glDrawPixels and glCopyPixels for very wide images
-	- glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint
-	- fixed some texgen bugs reported by Daniel Borca
-	- fixed wglMakeCurrent(NULL, NULL) bug (#835861)
-	- fixed glTexSubImage3D z-offset bug (Cedric Gautier)
-	- fixed RGBA blend enable bug (Ville Syrjala)
-	- glAccum is supposed to be a no-op in selection/feedback mode
-	- fixed texgen bug #597589 (John Popplewell)
-    Changes:
-	- dropped API trace feature (src/Trace/)
-	- documentation overhaul.  merged with website content.  more html.
-	- glxgears.c demo updated to use GLX swap rate extensions
-	- glTexImage1/2/3D now allows width/height/depth = 0
-	- disable SPARC asm code on Linux (bug 852204)
-</pre>
-
-The MD5 checksums are:
-</p>
-<pre>
-78f452f6c55478471a744f07147612b5  MesaLib-5.1.tar.gz
-67b3b8d3f7f4c8c44904551b851d01af  MesaLib-5.1.tar.bz2
-6dd19ffa750ec7f634e370a987505c9d  MesaLib-5.1.zip
-e0214d4ebb22409dfa9262f2b52fd828  MesaDemos-5.1.tar.gz
-066c9aff4fd924405de1ae9bad5ec9a7  MesaDemos-5.1.tar.bz2
-d2b5ba32b53e0ad0576c637a4cc1fb41  MesaDemos-5.1.zip
-</pre>
-
-
-<H2>November 12, 2003</H2>
-
-<p>
-New Mesa 5.0.2 tarballs have been uploaded to SourceForge which fix a
-number of automake/libtool problems.
-</p>
-<p>
-The new MD5 checksums are:
-</p>
-<pre>
-a9dcf3ff9ad1b7d6ce73a0df7cff8b5b  MesaLib-5.0.2.tar.gz
-7b4bf9261657c2fca03796d4955e6f50  MesaLib-5.0.2.tar.bz2
-79c141bddcbad557647535d02194f346  MesaLib-5.0.2.zip
-952d9dc823dd818981d1a648d7b2668a  MesaDemos-5.0.2.tar.gz
-b81fafff90995025d2f25ea02b786642  MesaDemos-5.0.2.tar.bz2
-a21be975589e8a2d1871b6bb7874fffa  MesaDemos-5.0.2.zip
-</pre>
-
-
-
-<h2>September 5, 2003</h2>
-
-<p>
-Mesa 5.0.2 has been released.  This is a stable, bug-fix release.
-</p>
-<pre>
-    Bug fixes:
-	- fixed texgen problem causing texcoord's Q to be zero (stex3d)
-	- default GL_TEXTURE_COMPARE_MODE_ARB was wrong
-	- GL_CURRENT_MATRIX_NV query was wrong
-	- GL_CURRENT_MATRIX_STACK_DEPTH_NV query was off by one
-	- GL_LIST_MODE query wasn't correct
-	- GL_FOG_COORDINATE_SOURCE_EXT query wasn't supported
-	- GL_SECONDARY_COLOR_ARRAY_SIZE_EXT query returned wrong value
-	- blended, wide lines didn't always work correctly (bug 711595)
-	- glVertexAttrib4svNV w component was always 1
-	- fixed bug in GL_IBM_rasterpos_clip (missing return)
-	- GL_DEPTH_TEXTURE_MODE = GL_ALPHA didn't work correctly
-	- a few Solaris compilation fixes
-	- fixed glClear() problem for DRI drivers (non-existant stencil, etc)
-	- fixed int/REAL mixup in GLU NURBS curve evaluator (Eric Cazeaux)
-	- fixed delete [] bug in SI GLU (bug 721765) (Diego Santa Cruz)
-	- glFog() didn't clamp fog colors
-	- fixed bad float/int conversion for GL_TEXTURE_PRIORITY in the
-	  gl[Get]TexParameteri[v] functions
-	- fixed invalid memory references in glTexGen functions (bug 781602)
-	- integer-valued color arrays weren't handled correctly
-	- glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work
-	- GL_EXT_texture_lod_bias is part of 1.4, overlooked in 5.0.1
-    Changes:
-	- build GLUT with -fexceptions so C++ apps propogate exceptions
-</pre>
-
-
-
-<h2>June 2003</h2>
-
-<p>
-Mesa's directory tree has been overhauled.
-Things are better organized now with some thought toward future needs.
-</p>
-<p>
-In CVS, the latest Mesa 5.1 development code is now rooted under the
-<b>Mesa-newtree/</b> directory.  The old top-level <b>Mesa/</b> directory
-holds the Mesa 5.0.x code which will be abandoned at some point.
-</p>
-
-
-
-<h2>March 30, 2003</h2>
-
-<p>
-Mesa 5.0.1 has been released.  This is a stable, bug-fix release.
-</p>
-<pre>
-    New:
-	- DOS driver updates from Daniel Borca
-	- updated GL/gl_mangle.h file (Bill Hoffman)
-    Bug fixes:
-	- auto mipmap generation for cube maps was broken (bug 641363)
-	- writing/clearing software alpha channels was unreliable
-	- minor compilation fixes for OS/2 (Evgeny Kotsuba)
-	- fixed some bad assertions found with shadowtex demo
-	- fixed error checking bug in glCopyTexSubImage2D (bug 659020)
-	- glRotate(angle, -x, 0, 0) was incorrect (bug 659677)
-	- fixed potential segfault in texture object validation (bug 659012)
-	- fixed some bogus code in _mesa_test_os_sse_exception_support (Linus)
-	- fix fog stride bug in tnl code for h/w drivers (Michel Danzer)
-	- fixed glActiveTexture / glMatrixMode(GL_TEXTURE) bug (#669080)
-	- glGet(GL_CURRENT_SECONDARY_COLOR) should return 4 values, not 3
-	- fixed compilation problem on Solaris7/x86 (bug 536406)
-	- fixed prefetch bug in 3DNow! code (Felix Kuhling)
-	- fixed NeXT build problem (FABSF macro)
-	- glDrawPixels Z values when glPixelZoom!=1 were invalid (bug 687811)
-	- zoomed glDraw/CopyPixels with clipping sometimes failed (bug 689964)
-	- AA line and triangle Z values are now rounded, not truncated
-	- fixed color interpolation bug when GLchan==GLfloat (bug 694461)
-	- glArePrograms/TexturesResident() wasn't 100% correct (Jose Fonseca)
-	- fixed a minor GL_COLOR_MATERIAL bug
-	- NV vertex program EXP instruction was broken
-	- glColorMask misbehaved with X window / pixmap rendering
-	- fix autoconf/libtool GLU C++ linker problem on Linux (a total hack)
-	- attempt to fix GGI compilation problem when MesaDemos not present
-	- NV vertex program ARL-relative fetches didn't work
-    Changes:
-	- use glPolygonOffset in gloss demo to avoid z-fighting artifacts
-	- updated winpos and pointblast demos to use ARB extensions
-	- disable SPARC normal transformation code (bug 673938)
-	- GLU fixes for OS/2 (Evgeny Kotsuba)
-</pre>
-<p>
-MD5 checksums follow:
-</p>
-<pre>
-b80f8b5d53a3e9f19b9fde5af0c542f0  MesaLib-5.0.1.tar.gz
-513b4bbd7d38951f05027179063d876b  MesaLib-5.0.1.tar.bz2
-eebd395678f4520d33b267e5d5c22651  MesaLib-5.0.1.zip
-49d7feaec6dc1d2091d7c3cc72a9b320  MesaDemos-5.0.1.tar.gz
-37190374a98c3c892f0698be9ca3acf0  MesaDemos-5.0.1.tar.bz2
-becd8bf17f5791361b4a54ba2a78e5c9  MesaDemos-5.0.1.zip
-</pre>
-
-
-
-<h2>March 7, 2003</h2>
-<p>
-Website and documentation overhaul.
-</p>
-<p>
-The website content and Mesa documentation (from the doc/ directory) have
-been merged together.
-All the documentation files have been entered into the CVS repository.
-Many of the old plain-text files have been converted to html and modernized.
-</p>
-
-
-<h2>November 13, 2002</h2>
-<p>Mesa 5.0 has been released.  This is a stable release which
-implements the OpenGL 1.4 specification.
-</p><pre>New:
-    - OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
-    - removed some overlooked debugging code
-    - glxinfo updated to support GLX_ARB_multisample
-    - GLUT now support GLX_ARB_multisample
-    - updated DOS driver (Daniel Borca)
-Bug fixes:
-    - GL_POINT and GL_LINE-mode polygons didn't obey cull state
-    - fixed potential bug in _mesa_align_malloc/calloc()
-    - fixed missing triangle bug when running vertex programs
-    - fixed a few HPUX compilation problems
-    - FX (Glide) driver didn't compile
-    - setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
-    - a few EXT functions, like glGenTexturesEXT, were no-ops
-    - a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
-      glMultiDrawArrays and glMultiDrawElements were missing
-    - glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
-    - Pentium 4 Mobile was mistakenly identified as having 3DNow!
-    - fixed one-bit error in point/line fragment Z calculation
-    - fixed potential segfault in fakeglx code
-    - fixed color overflow problem in DOT3 texture env mode
-</pre>
-
-
-<h2>October 29, 2002</h2>
-<p>Mesa 4.1 has been released.  This is a new development release.
-For a stable release, get 4.0.4.
-</p><pre>New:
-    - GL_NV_vertex_program extension
-    - GL_NV_vertex_program1_1 extension
-    - GL_ARB_window_pos extension
-    - GL_ARB_depth_texture extension
-    - GL_ARB_shadow extension
-    - GL_ARB_shadow_ambient extension
-    - GL_EXT_shadow_funcs extension
-    - GL_ARB_point_parameters extension
-    - GL_ARB_texture_env_crossbar
-    - GL_NV_point_sprite extension
-    - GL_NV_texture_rectangle extension
-    - GL_EXT_multi_draw_arrays extension
-    - GL_EXT_stencil_two_side extension
-    - GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
-    - GL_ATI_texture_mirror_once extension (Ian Romanick)
-    - massive overhaul/simplification of software rasterizer module,
-      many contributions from Klaus Niederkrueger
-    - faster software texturing in some cases (i.e. trilinear filtering)
-    - new OSMesaGetProcAddress() function
-    - more blend modes implemented with MMX code (Jose Fonseca)
-    - added glutGetProcAddress() to GLUT
-    - added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
-    - pbinfo and pbdemo PBuffer programs
-    - glxinfo -v prints transprent pixel info (Gerd Sussner)
-Bug fixes:
-    - better mipmap LOD computation (prevents excessive blurriness)
-    - OSMesaMakeCurrent() didn't recognize buffer size changes
-    - assorted conformance fixes for 16-bit/channel rendering
-    - texcombine alpha subtraction mode was broken
-    - fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
-    - clamp colors to [0,1] in OSMesa if GLchan==GLfloat (Gerk Huisma)
-    - fixed divide by zero error in NURBS tessellator (Jon Perry)
-    - fixed GL_LINEAR fog bug by adding clamping
-    - fixed FP exceptions found using Alpha CPU
-    - 3dfx/glide driver render-to-window feature was broken
-    - added missing GLX_TRANSPARENT_RGB token to glx.h
-    - fixed error checking related to paletted textures
-    - fixed reference count error in glDeleteTextures (Randy Fayan)
-Changes:
-    - New spec file and Python code to generate some GL dispatch files
-    - Glide driver defaults to "no" with autoconf/automake
-    - floating point color channels now clamped to [0,inf)
-    - updated demos/stex3d with new options
-</pre>
-
-
-<h2>October 4, 2002</h2>
-<p>
-The <a href="http://mesa3d.sourceforge.net/docs/MesaFAQ.html">Mesa FAQ</a> has been rewritten.
-</p>
-
-<h2>October 3, 2002</h2>
-<p>Mesa 4.0.4 has been released.  This is a stable bug-fix release.
-</p><pre>    New:
-	- GL_NV_texture_rectangle extension
-	- updated glext.h header (version 17)
-	- updated DOS driver (Daniel Borca)
-	- updated BeOS R5 driver (Philippe Houdoin)
-	- added GL_IBM_texture_mirror_repeat
-	- glxinfo now takes -l option to print interesting OpenGL limits info
-	- GL_MESA_ycbcr_texture extension
-	- GL_APPLE_client_storage extension (for some DRI drivers only)
-	- GL_MESA_pack_invert extension
-    Bug fixes:
-	- fixed GL_LINEAR fog bug by adding clamping
-	- fixed FP exceptions found using Alpha CPU
-	- 3dfx MESA_GLX_FX=window (render to window) didn't work
-	- fixed memory leak in wglCreateContest (Karl Schultz)
-	- define GLAPIENTRY and GLAPI if undefined in glu.h
-	- wglGetProcAddress didn't handle all API functions
-	- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
-	- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
-	- error checking in compressed tex image functions had some glitches
-	- fixed AIX compile problem in src/config.c
-	- glGetTexImage was using pixel unpacking instead of packing params
-	- auto-mipmap generation for cube maps was incorrect
-    Changes:
-	- max texture units reduced to six to accomodate texture rectangles
-	- removed unfinished GL_MESA_sprite_point extension code
-</pre>
-
-<h2>June 25, 2002</h2>
-<p>Mesa 4.0.3 has been released.  This is a stable bug-fix release.
-</p><pre>    New:
-    - updated GL/glext.h file (version 15)
-    - corrected MMX blend code (Jose Fonseca)
-    - support for software-based alpha planes in Windows driver
-    - updated GGI driver (Filip Spacek)
-    Bug fixes:
-    - glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
-    - OSMesaMakeCurrent() didn't recognize buffer size changes
-    - assorted conformance fixes for 16-bit/channel rendering
-    - texcombine alpha subtraction mode was broken
-    - fixed lighting bug with non-uniform scaling and display lists
-    - fixed bug when deleting shared display lists
-    - disabled SPARC cliptest assembly code (Mesa bug 544665)
-    - fixed a couple Solaris compilation/link problems
-    - blending clipped glDrawPixels didn't always work
-    - glGetTexImage() didn't accept packed pixel types
-    - glPixelMapu[is]v() could explode given too large of pixelmap
-    - glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
-    - glXCopyContext() could lead to segfaults
-    - glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
-    Changes:
-    - lots of C++ (g++) code clean-ups
-    - lots of T&amp;L updates for the Radeon DRI driver
-    Known bugs:
-    - mipmap LOD computation (fixed for Mesa 4.1)
-</pre>
-
-<h2>April 2, 2002</h2>
-<p>Mesa 4.0.2 has been released.  This is a stable bug-fix release.
-</p><pre>    New:
-      - New DOS (DJGPP) driver written by Daniel Borca
-      - New driver interface functions for TCL drivers (such as Radeon DRI)
-      - GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
-        if using deep color channels
-      - latest GL/glext.h and GL/glxext.h headers from SGI
-    Bug fixes:
-      - GL_BLEND with non-black texture env color wasn't always correct
-      - GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
-      - glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
-      - glReadPixels was sometimes mistakenly clipped by the scissor box
-      - glDraw/ReadPixels didn't catch all the errors that they should have
-      - Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
-      - 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
-      - Fixed 1-bit float-&gt;int conversion bug in glDrawPixels(GL_DEPTH_COMP)
-      - glColorMask as sometimes effecting glXSwapBuffers()
-      - fixed a potential bug in XMesaGarbageCollect()
-      - N threads rendering into one window didn't work reliably
-      - glCopyPixels didn't work for deep color channels
-      - improved 8 -&gt; 16bit/channel texture image conversion (Gerk Huisma)
-      - glPopAttrib() didn't correctly restore user clip planes
-      - user clip planes failed for some perspective projections (Chromium)
-</pre>
-
-<h2>December 17, 2001</h2>
-<p>Mesa 4.0.1 has been released.  This is a stable bug-fix release.
-</p><pre>    New:
-      - better sub-pixel sample positions for AA triangles (Ray Tice)
-      - slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
-    Bug fixes:
-      - added missing break statements in glGet*() for multisample cases
-      - fixed uninitialized hash table mutex bug (display lists / texobjs)
-      - fixed bad teximage error check conditional (bug 476846)
-      - fixed demos readtex.c compilation problem on Windows (Karl Schultz)
-      - added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
-      - silence some compiler warnings (gcc 2.96)
-      - enable the #define GL_VERSION_1_3 in GL/gl.h
-      - added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
-      - fixed glu.h typedef problem found with MSDev 6.0
-      - build libGL.so with -Bsymbolic (fixes bug found with Chromium)
-      - added missing 'const' to glXGetContextIDEXT() in glxext.h
-      - fixed a few glXGetProcAddress() errors (texture compression, etc)
-      - fixed start index bug in compiled vertex arrays (Keith)
-      - fixed compilation problems in src/SPARC/glapi_sparc.S
-      - fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
-      - use glXGetProcAddressARB in GLUT to avoid extension linking problems
-      - provoking vertex of flat-shaded, color-index triangles was wrong
-      - fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
-      - glTexParameter didn't flush the vertex buffer (Ray Tice)
-      - feedback attributes for glDraw/CopyPixels and glBitmap were wrong
-      - fixed bug in normal length caching (ParaView lighting bug)
-</pre>
-
-<h2>October 22, 2001</h2>
-<p>Mesa 4.0 has been released.  This is a stable release.
-</p><pre>    New:
-      - Mesa 4.0 implements the OpenGL 1.3 specification
-      - GL_IBM_rasterpos_clip extension
-      - GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
-      - GL_ARB_texture_mirrored_repeat extension
-      - WindML UGL driver (Stephane Raimbault)
-      - added OSMESA_MAX_WIDTH/HEIGHT queries
-      - attempted compiliation fixes for Solaris 5, 7 and 8
-      - updated glext.h and glxext.h files
-      - updated Windows driver (Karl Schultz)
-    Bug fixes:
-      - added some missing GLX 1.3 tokens to include/GL/glx.h
-      - GL_COLOR_MATRIX changes weren't recognized by teximage functions
-      - glCopyPixels with scale and bias was broken
-      - glRasterPos with lighting could segfault
-      - glDeleteTextures could leave a dangling pointer
-      - Proxy textures for cube maps didn't work
-      - fixed a number of 16-bit color channel bugs
-      - fixed a few minor memory leaks
-      - GLX context sharing was broken in 3.5
-      - fixed state-update bugs in glPopClientAttrib()
-      - fixed glDrawRangeElements() bug
-      - fixed a glPush/PopAttrib() bug related to texture binding
-      - flat-shaded, textured lines were broken
-      - fixed a dangling pointer problem in the XMesa code (Chris Burghart)
-      - lighting didn't always produce the correct alpha value
-      - fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
-</pre>
-
-
-<h2>June 21, 2001</h2>
-<p>Mesa 3.5 has been released.  This is a new development release.
-</p><pre>    New:
-	- internals of Mesa divided into modular pieces (Keith Whitwell)
-	- 100% OpenGL 1.2 conformance (passes all conformance tests)
-	- new AA line algorithm
-	- GL_EXT_convolution extension
-        - GL_ARB_imaging subset
-        - OSMesaCreateContextExt() function
-        - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-        - GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
-        - GL_EXT_fog_coord extension (Keith Whitwell)
-        - GL_EXT_secondary_color extension (Keith Whitwell)
-        - GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-        - GL_SGIX_depth_texture extension
-        - GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
-        - demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
-        - GL_ARB_texture_env_combine extension
-        - GL_ARB_texture_env_dot3 extension
-        - GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
-        - OSMesaCreateContextExt() function
-        - libOSMesa.so library, contains the OSMesa driver interface
-        - GL/glxext.h header file for GLX extensions
-        - somewhat faster software texturing, fogging, depth testing
-        - all color-index conformance tests now pass (only 8bpp tested)
-        - SPARC assembly language TCL optimizations (David Miller)
-        - GL_SGIS_generate_mipmap extension
-    Bug Fixes:
-        - fbiRev and tmuRev were unitialized when using Glide3
-        - fixed a few color index mode conformance failures; all pass now
-        - now appling antialiasing coverage to alpha after texturing
-        - colors weren't getting clamped to [0,1] before color table lookup
-        - fixed RISC alignment errors caused by COPY_4UBV macro
-        - drawing wide, flat-shaded lines could cause a segfault
-        - vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
-    Changes:
-        - SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
-        - new libOSMesa.so library, contains the OSMesa driver interface
-</pre>
-
-
-<h2>May 17, 2001</h2>
-<p>Mesa 3.4.2 has been released.  This is basically just a bug-fix release.
-Here's what's new:</p>
-<pre>    Bug fixes:
-        - deleting the currently bound texture could cause bad problems
-        - using fog could result in random vertex alpha values
-         - AA triangle rendering could touch pixels outside right window bound
-        - fixed byteswapping problem in clear_32bit_ximage() function
-        - fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
-        - fixed memory leak in glXUseXFont()
-        - fragment sampling in AA triangle function was off by 1/2 pixel
-        - Windows: reading pixels from framebuffer didn't always work
-        - glConvolutionFilter2D could segfault or cause FP exception
-        - fixed segfaults in FX and X drivers when using tex unit 1 but not 0
-        - GL_NAND logicop didn't work right in RGBA mode
-        - fixed a memory corruption bug in vertex buffer reset code
-        - clearing the softwara alpha buffer with scissoring was broken
-        - fixed a few color index mode fog bugs
-        - fixed some bad assertions in color index mode
-        - fixed FX line 'stipple' bug #420091
-    Changes:
-        - optimized writing mono-colored pixel spans to X pixmaps
-        - increased max viewport size to 2048 x 2048
-</pre>
-
-
-<h2>April 29, 2001</h2>
-<p>New Mesa website</p>
-<p>Mark Manning produced the new website.<br>Thanks, Mark!</p>
-
-
-<h2>February 14, 2001</h2>
-<p>Mesa 3.4.1 has been released.  Here's what's new:</p>
-<pre>    New:
-        - fixed some Linux build problems
-        - fixed some Windows build problems
-        - GL_EXT_texture_env_dot3 extension (Gareth Hughes)
-    Bug fixes:
-        - added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
-        - various state-update code changes needed for DRI bugs
-        - disabled pixel transfer ops in glColorTable commands, not needed
-        - fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
-        - updated sources and fixed compile problems in widgets-mesa/
-        - GLX_PBUFFER enum value was wrong in glx.h
-        - fixed a glColorMaterial lighting bug
-        - fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
-        - glXCopySubBufferMESA() Y position was off by one
-        - Error checking of glTexSubImage3D() was broken (bug 128775)
-        - glPopAttrib() didn't restore all derived Mesa state correctly
-        - Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
-          conformance problems at 16bpp.
-        - clearing depth buffer with scissoring was broken, would segfault
-        - OSMesaGetDepthBuffer() returned bad bytesPerValue value
-        - fixed a line clipping bug (reported by Craig McDaniel)
-        - fixed RGB color over/underflow bug for very tiny triangles
-    Known problems:
-        - NURBS or evaluator surfaces inside display lists don't always work
-</pre>
-<p>
-</p><h2>November 3, 2000</h2>
-<p>Mesa 3.4 has been released. Here's what's new since the 3.3 release:</p>
-<pre>    New:
-    - optimized glDrawPixels for glPixelZoom(1,-1)
-    Bug Fixes:
-    - widgets-mesa/src/*.c files were missing from 3.3 distro
-    - include/GL/mesa_wgl.h file was missing from 3.3 distro
-    - fixed some Win32 compile problems
-    - texture object priorities weren't getting initialized to 1.0
-    - glAreTexturesResident return value was wrong when using hardware
-    - glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
-    - glReadPixels with GLushort packed types was broken
-    - fixed a few bugs in the GL_EXT_texture_env_combine texture code
-    - glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
-    - fixed some typos/bugs in the VB code
-    - glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
-    - optimized glDrawPixels paths weren't being used
-    - per-fragment fog calculation didn't work without a Z buffer
-    - improved blending accuracy, fixes Glean  blendFunc test failures
-    - glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
-    - glXGetProcAddressARB() didn't always return the right address
-    - gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
-    - texture matrix changes weren't always detected (GLUT projtex demo)
-    - fixed random color problem in vertex fog code
-    - fixed Glide-related bug that let Quake get a 24-bit Z buffer
-    Changes:
-    - finished internal support for compressed textures for DRI
-</pre>
-<p>
-</p><h2>April 24, 2000</h2>
-<p>Mesa 3.2 has been released. Here's what's new since the beta release:</p>
-<pre>    Bug fixes:
-    - fixed memcpy bugs in span.c
-    - fixed missing glEnd problem in demos/tessdemo.c
-    - fixed bug when clearing 24bpp Ximages
-    - fixed clipping problem found in Unreal Tournament
-    - fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
-    - fixed Loki's 3dfx RGB vs BGR bug
-    - fixed Loki's 3dfx smooth/flat shading bug in SoF
-    Changes:
-    - updated docs/README file
-    - use bcopy() optimizations on FreeBSD
-    - re-enabled the optimized persp_textured_triangle() function
-</pre>
-<p>
-</p><h2>March 23, 2000</h2>
-<p>I've just upload the Mesa 3.2 beta 1 files to SourceForge at <a href="http://sourceforge.net/project/showfiles.php?group_id=3" target="_parent">http://sourceforge.net/project/filelist.php?group_id=3</a><a href="http://sourceforge.net/project/showfiles.php?group_id=3"></a></p>
-<p>3.2 (note even number) is a stabilization release of Mesa 3.1 meaning it's mainly
-just bug fixes.</p>
-<p>Here's what's changed:
-
-</p><ul>
-	Bug fixes:
-	<ul>
-		- mixed drawing of lines and bitmaps sometimes had wrong colors<br>
-		- added missing glHintPGI() function<br>
-		- fixed a polygon culling bug<br>
-		- fixed bugs in gluPartialDisk()<br>
-		- Z values in selection mode were wrong<br>
-		- added missing tokens:
-		<ul>
-			GL_SMOOTH_POINT_SIZE_RANGE<br>
-			GL_SMOOTH_POINT_SIZE_GRANULARITY<br>
-			GL_SMOOTH_LINE_WIDTH_RANGE<br>
-			GL_SMOOTH_LINE_WIDTH_GRANULARITY<br>
-			GL_ALIASED_POINT_SIZE_RANGE<br>
-			GL_ALIASED_LINE_WIDTH_RANGE
-		</ul>
-		- fixed glCopyPixels when copying from back to front buffer<br>
-		- GL_EXT_compiled_vertex_array tokens had _SGI suffix instead of _EXT<br>
-		- glDrawRangeElements(GL_LINES, 0, 1, 2, type, indices) was broken<br>
-		- glDeleteTextures() didn't decrement reference count correctly<br>
-		- GL_SRCA_ALPHA_SATURATE blend mode didn't work correctly<br>
-		- Actual depth of transformation matrix stacks was off by one<br>
-		- 24bpp visuals didn't address pixels correctly<br>
-		- mipmap level of detail (lambda) calculation simplified, more accurate<br>
-		- 101691 - Polygon clipping and GL_LINE<br>
-		- 101928 - Polygon clipping and GL_LINE (same fix as above)<br>
-		- 101808 - Non-glVertexArrays tristrip bug<br>
-		- 101971 - find_last_3f on Dec OSF (worked around)<br>
-		- 102369 - segv on dec osf (possibly a duplicate of the above)<br>
-		- 102893 - orientations of modelview cause segfault
-	</ul>
-	New:
-	<ul>
-		- updated SVGA Linux driver<br>
-		- added the MESA_FX_NO_SIGNALS env var, see docs/README.3DFX<br>
-		- build libGLw.a (Xt/OpenGL drawing area widget) library by default<br>
-		- changed -O2 to -O3 for a number of gcc configs
-	</ul>
-	Changes:
-	<ul>
-		- glXCopyContext's mask parameter is now unsigned long, per GLX spec
-	</ul>
-</ul>
-
-<p>Please report any problems with this release ASAP. Bugs should be filed on the
-Mesa3D website at sourceforge.<br>
-After 3.2 is wrapped up I hope to release 3.3 beta 1 soon afterward.</p>
-<p>-- Brian</p>
-<p>
-</p><h2>December 17, 1999</h2>
-<p>A Slashdot interview with Brian about Mesa (questions submitted by Slashdot readers)
-can be found at <a href="http://slashdot.org/interviews/99/12/17/0927212.shtml" target="_parent">http://slashdot.org/interviews/99/12/17/0927212.shtml</a>.</p>
-<p>
-</p><h2>December 14, 1999</h2>
-<p>Mesa 3.1 is released!</p>
-<p>
-</p><h2>September 21, 1999</h2>
-<p>There appear to be two new files on the ftp site, <a href="ftp://ftp.mesa3d.org/mesa/beta/MesaLib-3.1beta3.tar.gz">MesaLib-3.1beta3.tar.gz</a>
-and <a href="ftp://ftp.mesa3d.org/mesa/beta/MesaDemos-3.1beta3.tar.gz">MesaDemos-3.1beta3.tar.gz</a>,
-that seem to be... yes, I've just received confirmation from the beta center, they
-are indeed the <b>THIRD</b> beta release of Mesa 3.1! Happy Days. Happy Days. Thanks
-Keith Whitwell for preparing these for us during Brian's absence.</p>
-<p>
-</p><h2>August 30, 1999</h2>
-<p>I'm pleased to announce that I've accepted a position with Precision Insight,
-Inc. effective October, 1999. I'll be leaving Avid Technology in September.</p>
-<p>I've been working on Mesa in my spare time for over five years. With Precision
-Insight I now have the opportunity to devote my full attention to advancing Mesa
-and OpenGL on Linux.</p>
-<p>While I'll be focused on Linux, the X Window System, and hardware acceleration,
-my work will continue to be open sourced and available to any other programmers who
-may want to contribute to it, or use it for other projects or platforms</p>
-<p>PS: I'm going to be traveling until Sep 6 and won't be reading email until then.</p>
-<p>
-</p><h2>August 23, 1999</h2>
-<p>Anonymous CVS access is back online so suck up all the bandwidth you can afford.
-Note that this is a new archive, so you will need to re-checkout the archive. That
-means don't <i>cvs update</i> from a previous download.</p>
-<p>
-</p><h2>August 17, 1999</h2>
-<p>A report from the SIGGRAPH '99 Linux/OpenGL
-BOF meeting is now available.</p>
-<p>-Brian</p>
-<p>
-</p><h2>August 14, 1999</h2>
-<p>www.mesa3d.org is having technical problems due to hardware failures at VA Linux
-systems. The Mac pages, ftp, and CVS services aren't fully restored yet. Please be
-patient.</p>
-<p>-Brian</p>
-<p>
-</p><h2>June 7, 1999</h2>
-<p>RPMS of the nVidia RIVA server can be found at <a href="ftp://ftp.mesa3d.org/mesa/misc/nVidia/">ftp://ftp.mesa3d.org/mesa/misc/nVidia/</a>.</p>
-<p>
-</p><h2>June 2, 1999</h2>
-<p><a href="http://www.nvidia.com/">nVidia</a> has released some Linux binaries for
-xfree86 3.3.3.1, along with the <b>full source</b>, which includes GLX acceleration
-based on Mesa 3.0. They can be downloaded from <a href="http://www.nvidia.com/Products.nsf/htmlmedia/software_drivers.html">http://www.nvidia.com/Products.nsf/htmlmedia/software_drivers.html</a>.</p>
-<p>
-</p><h2>May 24, 1999</h2>
-<p>Beta 2 of Mesa 3.1 has been make available at <a href="ftp://ftp.mesa3d.org/mesa/beta/">ftp://ftp.mesa3d.org/mesa/beta/</a>.
-If you are into the quake scene, you may want to try this out, as it contains some
-optimizations specifically in the Q3A rendering path.
-<p>
-</p><h2>May 13, 1999</h2>
-<p>For those interested in the integration of Mesa into XFree86 4.0, Precision Insight
-has posted their lowlevel design documents at http://www.precisioninsight.com.</p>
-<p>
-</p><h2>May 13, 1999</h2>
-<pre>May 1999 - John Carmack of id Software, Inc. has made a donation of
-US$10,000 to the Mesa project to support its continuing development.
-Mesa is a free implementation of the OpenGL 3D graphics library and id's
-newest game, Quake 3 Arena, will use Mesa as the 3D renderer on Linux.
-
-The donation will go to Keith Whitwell, who has been optimizing Mesa to
-improve performance on 3d hardware.  Thanks to Keith's work, many
-applications using Mesa 3.1 will see a dramatic performance increase
-over Mesa 3.0.  The donation will allow Keith to continue working on
-Mesa full time for some time to come.
-
-For more information about Mesa see www.mesa3d.org.  For more
-information about id Software, Inc. see www.idsoftware.com.
-
---------------------------------
-
-This donation from John/id is very generous.  Keith and I are very
-grateful.
-
-</pre>
-<p>
-</p><h2>May 1, 1999</h2>
-<p>John Carmack made an interesting .plan update yesterday:
-
-</p><ul>
-	<i>"I put together a document on optimizing OpenGL drivers for Q3 that
-	should be helpful to the various Linux 3D teams. <br>
-	</i>http://www.quake3arena.com/news/glopt.html</i>"
-</ul>
-
-<p>
-</p><h2>April 7, 1999</h2>
-<p>Updated the Mesa contributors section and added links to RPM Mesa packages.</p>
-<p>
-</p><h2>March 18, 1999</h2>
-<p>The new webpages are now online. Enjoy, and let me know if you find any errors.
-<p>
-</p><h2>February 16, 1999</h2>
-<p><a href="http://www.sgi.com/">SGI</a> releases its <a href="http://www.sgi.com/software/opensource/glx/">GLX
-source code</a>.</p>
-<p>
-</p><h2>January 22, 1999</h2>
-<p>www.mesa3d.org established</p>
-
-
-</p>
-
-
-<hr>
-</body>
-</html>
diff --git a/docs/opengles.html b/docs/opengles.html
deleted file mode 100644
index 63cc114..0000000
--- a/docs/opengles.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html>
-
-<title>OpenGL ES</title>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<body>
-
-<h1>OpenGL ES</h1>
-
-<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0.  More informations about
-OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"
-target="_parent"> http://www.khronos.org/opengles/</a>.</p>
-
-<p>OpenGL ES depends on a working EGL implementation.  Please refer to
-<a href="egl.html">Mesa EGL</a> for more information about EGL.</p>
-
-<h2>Build the Libraries</h2>
-<ol>
-<li>Run <code>configure</code> with <code>--enable-gles-overlay</code> and enable the Gallium driver for your hardware.</li>
-<li>Build and install Mesa as usual.</li>
-</ol>
-
-Alternatively, if XCB-DRI2 is installed on the system, one can use
-<code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers
-
-<ol>
-<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li>
-<li>Build and install Mesa as usual.</li>
-</ol>
-
-<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
-EGL drivers for your hardware.</p>
-
-<h2>Run the Demos</h2>
-
-<p>There are some demos in <code>progs/egl/</code>.  You can use them to test
-your build.  For example,</p>
-
-<pre>
-  $ cd progs/egl/eglut
-  $ make
-  $ cd ../opengles1
-  $ make
-  $ ./torus_x11
-</pre>
-
-<h2>Developers</h2>
-
-<h3>Internal Libraries</h3>
-
-<table border="1" style="text-align: center;">
-	<tr><td>Library Name</td><td>Used By</td><td>Enabled</td><td>OpenGL</td><td>OpenGL ES 1.x</td><td>OpenGL ES 2.x</td></tr>
-	<tr><td><code>libmesa.a</td><td>Classic DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
-	<tr><td><code>libmesagallium.a</td><td>Gallium EGL and DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
-	<tr><td><code>libes1gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>y</td><td>n</td></tr>
-	<tr><td><code>libes2gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>n</td><td>y</td></tr>
-</table>
-
-<h3>Dispatch Table</h3>
-
-<p>OpenGL ES has an additional indirection when dispatching fucntions</p>
-
-<pre>
-  Mesa:       glFoo() --&gt; _mesa_Foo()
-  OpenGL ES:  glFoo() --&gt; _es_Foo() --&gt; _mesa_Foo()
-</pre>
-
-<p>The indirection serves several purposes</p>
-
-<ul>
-<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
-<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
-<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
-</ul>
-
-<p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
-
-</body>
-</html>
diff --git a/docs/openvg.html b/docs/openvg.html
deleted file mode 100644
index eff8c58..0000000
--- a/docs/openvg.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<HTML>
-
-<TITLE>OpenVG State Tracker</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>OpenVG State Tracker</H1>
-
-<p>
-The current version of the OpenVG state tracker implements OpenVG 1.0.
-</p>
-<p>
-More informations about OpenVG can be found at
-<a href="http://www.khronos.org/openvg/" target="_parent">
-http://www.khronos.org/openvg/</a> .
-</p>
-<p>
-The OpenVG state tracker depends on the Gallium architecture and a working EGL implementation.
-Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
-</p>
-
-
-<h2>Building the library</h2>
-<ol>
-<li>Run <code>configure</code> with <code>--enable-openvg</code>.  If you do
-not need OpenGL, you can add <code>--disable-opengl</code> to save the
-compilation time.</li>
-
-<li>Build and install Mesa as usual.</li>
-</ol>
-
-<h3>Sample build</h3>
-A sample build looks as follows:
-<pre>
-  $ ./configure --disable-opengl --enable-openvg
-  $ make
-  $ make install
-</pre>
-
-<p>It will install <code>libOpenVG.so</code>, <code>libEGL.so</code>, and one
-or more EGL drivers.</p>
-
-<h2>OpenVG Demos</h2>
-
-<p>OpenVG demos can be found in mesa/demos repository.</p>
-
-</body>
-</html>
diff --git a/docs/osmesa.html b/docs/osmesa.html
deleted file mode 100644
index 525da4d..0000000
--- a/docs/osmesa.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<HTML>
-
-<TITLE>Off-screen Rendering</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Off-screen Rendering</H1>
-
-
-<p>
-Mesa's off-screen rendering interface is used for rendering into
-user-allocated blocks of memory.
-That is, the GL_FRONT colorbuffer is actually a buffer in main memory,
-rather than a window on your display.
-There are no window system or operating system dependencies.
-One potential application is to use Mesa as an off-line, batch-style renderer.
-</p>
-
-<p>
-The <B>OSMesa</B> API provides three basic functions for making off-screen
-renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
-OSMesaDestroyContext().  See the Mesa/include/GL/osmesa.h header for
-more information about the API functions.
-</p>
-
-<p>
-There are several examples of OSMesa in the <code>progs/osdemos/</code>
-directory.
-</p>
-
-
-<H2>Deep color channels</H2>
-
-<p>
-For some applications 8-bit color channels don't have sufficient
-precision.
-OSMesa supports 16-bit and 32-bit color channels through the OSMesa interface.
-When using 16-bit channels, channels are GLushorts and RGBA pixels occupy
-8 bytes.
-When using 32-bit channels, channels are GLfloats and RGBA pixels occupy
-16 bytes.
-</p>
-
-<p>
-Before version 6.5.1, Mesa had to be recompiled to support exactly
-one of 8, 16 or 32-bit channels.
-With Mesa 6.5.1, Mesa can be compiled for either 8, 16 or 32-bit channels
-and render into any of the smaller size channels.
-For example, if Mesa's compiled for 32-bit channels, you can also render
-16 and 8-bit channel images.
-</p>
-
-<p>
-To build Mesa/OSMesa for 16 and 8-bit color channel support:
-<pre>
-      make realclean
-      make linux-osmesa16
-</pre>
-
-<p>
-To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
-<pre>
-      make realclean
-      make linux-osmesa32
-</pre>
-
-<p>
-You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
-Otherwise, most Mesa configurations build an 8-bit/channel libOSMesa.so library
-by default.
-</p>
-
-<p>
-If performance is important, compile Mesa for the channel size you're
-most interested in.
-</p>
-
-<p>
-If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
-to a new config file and edit it as needed.  Then, add the new config name to
-the top-level Makefile.  Send a patch to the Mesa developers too, if you're
-inclined.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/perf.html b/docs/perf.html
deleted file mode 100644
index ee9c4b1..0000000
--- a/docs/perf.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-
-<TITLE>Performance Tips</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Performance Tips</H1>
-
-<p>
-Performance tips for software rendering:
-</P>
-<ol>
-
-<li> Turn off smooth shading when you don't need it (glShadeModel)
-<li> Turn off depth buffering when you don't need it.
-<li> Turn off dithering when not needed.
-<li> Use double buffering as it's often faster than single buffering
-<li> Compile in the X Shared Memory extension option if it's supported
-      on your system by adding -DSHM to CFLAGS and -lXext to XLIBS for
-      your system in the Make-config file.
-<li> Recompile Mesa with more optimization if possible.
-<li> Try to maximize the amount of drawing done between glBegin/glEnd pairs.
-<li> Use the MESA_BACK_BUFFER variable to find best performance in double
-      buffered mode.  (X users only)
-<li> Optimized polygon rasterizers are employed when:
-         rendering into back buffer which is an XImage
-         RGB mode, not grayscale, not monochrome
-         depth buffering is GL_LESS, or disabled
-         flat or smooth shading
-         dithered or non-dithered
-         no other rasterization operations enabled (blending, stencil, etc)
-<li> Optimized line drawing is employed when:
-         rendering into back buffer which is an XImage
-         RGB mode, not grayscale, not monochrome
-         depth buffering is GL_LESS or disabled
-         flat shading
-         dithered or non-dithered
-         no other rasterization operations enabled (blending, stencil, etc)
-<li> Textured polygons are fastest when:
-         using a 3-component (RGB), 2-D texture
-         minification and magnification filters are GL_NEAREST
-         texture coordinate wrap modes for S and T are GL_REPEAT
-         GL_DECAL environment mode
-         glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST )
-         depth buffering is GL_LESS or disabled
-<li> Lighting is fastest when:
-         Two-sided lighting is disabled
-         GL_LIGHT_MODEL_LOCAL_VIEWER is false
-         GL_COLOR_MATERIAL is disabled
-         No spot lights are used (all GL_SPOT_CUTOFFs are 180.0)
-         No local lights are used (all position W's are 0.0)
-         All material and light coefficients are >= zero
-<li> XFree86 users:  if you want to use 24-bit color try starting your
-      X server in 32-bit per pixel mode for better performance.  That is,
-      start your X server with
-         startx -- -bpp 32
-      instead of
-         startx -- -bpp 24
-<li> Try disabling dithering with the MESA_NO_DITHER environment variable.
-      If this env var is defined Mesa will disable dithering and the
-      command glEnable(GL_DITHER) will be ignored.
-</ol>
-
-
-</BODY>
-</HTML>
diff --git a/docs/precompiled.html b/docs/precompiled.html
deleted file mode 100644
index 50cb2af..0000000
--- a/docs/precompiled.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-
-<TITLE>Precompiled libraries</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Precompiled Libraries</H1>
-
-<p>
-In general, precompiled Mesa libraries are not available.
-</p>
-<p>
-However, some Linux distros (such as Ubuntu) seem to closely track
-Mesa and often have the latest Mesa release available as an update.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/relnotes-6.4.1.html b/docs/relnotes-6.4.1.html
deleted file mode 100644
index 3d6ff1c..0000000
--- a/docs/relnotes-6.4.1.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.4.1 / November 29, 2006</H1>
-
-<p>
-Mesa 6.4.1 is a stable, bug-fix release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-698ceb574cf882b0226761f5913c0da9  MesaLib-6.4.1.tar.gz
-ea148c828ec6f645526451db1b8556f1  MesaLib-6.4.1.tar.bz2
-42e93279468975ed2bf3111b8721e5d9  MesaLib-6.4.1.zip
-e3b0d50807fd2bdcd1a95aaddd786f13  MesaDemos-6.4.1.tar.gz
-99df1fdcb98d391666b476ca6f1dda8a  MesaDemos-6.4.1.tar.bz2
-b999d2c6d92fb4b7740a3dbd889348e3  MesaDemos-6.4.1.zip
-eadfe01fe5ddfb1eb8227dd567b31635  MesaGLUT-6.4.1.tar.gz
-bd003bb4f981a4f91dee4c38644d4f3f  MesaGLUT-6.4.1.tar.bz2
-71c401c037088bf688a88afdaeb3420f  MesaGLUT-6.4.1.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>redefining a vertex program string didn't take effect in TNL module
-<li>fixed occasional segfault upon vertex/fragment parsing error
-<li>vertex program LIT instruction didn't handle 0^0=1 correctly
-<li>fragment program fog option didn't work with glDrawPixels, glBitmap
-<li>USE_MGL_NAMESPACE didn't work for x86-64
-<li>OSMesa demos were missing from previous release tarballs
-<li>fixed problem with float->ushort conversion in glClear (bug 4992)
-<li>popping of GL_EYE_PLANE texgen state was broken (bug 4996)
-<li>popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
-<li>fixed occasional triangle color interpolation problem on VMS
-<li>work around invalid free() call (bug 5131)
-<li>fixed BSD X server compilation problem by including stdint.h
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Windows/Win32		implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)  requires updates	
-SVGA			requires updates
-DJGPP			requires updates
-GGI			requires updates
-BeOS			requires updates
-Allegro			requires updates
-D3D			requires updates
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.4.2.html b/docs/relnotes-6.4.2.html
deleted file mode 100644
index f5a658f..0000000
--- a/docs/relnotes-6.4.2.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.4.2 / February 2, 2006</H1>
-
-<p>
-Mesa 6.4.2 is a stable, bug-fix release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-cb0d745d520fa7c2bb9178058b763544  MesaLib-6.4.2.tar.gz
-7674d2c603b5834259e4e5a820cefd5b  MesaLib-6.4.2.tar.bz2
-d224e1325b33ff71a0f3893fc6b4d594  MesaLib-6.4.2.zip
-d4b345d4588fc750cd3d34f3ac26673e  MesaDemos-6.4.2.tar.gz
-9cae1ab874af533ce356bd7dfe2e0bb0  MesaDemos-6.4.2.tar.bz2
-2da6e1d1245e441d27813595c6ba50de  MesaDemos-6.4.2.zip
-84427d18c3453f0ea52388eeba7169b5  MesaGLUT-6.4.2.tar.gz
-b157ba8ad1ea63260cf5339132e7aac6  MesaGLUT-6.4.2.tar.bz2
-fe1523744fc05edc3811dfc6a1bf4181  MesaGLUT-6.4.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>added OSMesaColorClamp() function/feature
-<li>added wglGetExtensionStringARB() function
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>GLUT tarball
-<br>
-Starting with 6.4, the GLUT library sources are distributed in a separate
-tarball.  This was done at the request of Linux distro vendors who prefer
-to use freeglut.
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>fixed some problems when building on Windows
-<li>GLw header files weren't installed by installmesa script (bug 5396)
-<li>GL/glfbdev.h file was missing from tarballs
-<li>fixed TNL initialization bug which could lead to crash (bug 5791)
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Windows/Win32		implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)  requires updates	
-SVGA			requires updates
-DJGPP			requires updates
-GGI			requires updates
-BeOS			requires updates
-Allegro			requires updates
-D3D			requires updates
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.4.html b/docs/relnotes-6.4.html
deleted file mode 100644
index 1fffa27..0000000
--- a/docs/relnotes-6.4.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.4 / October 24, 2005</H1>
-
-<p>
-Mesa 6.4 is a stable, bug-fix release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-1cce0c1eb4fd15e9dfe837a1ce0c9812  MesaLib-6.4.tar.gz
-85a84e47a3f718f752f306b9e0954ef6  MesaLib-6.4.tar.bz2
-b976fea4f3ee06354c53f91b6e3f2ffc  MesaLib-6.4.zip
-d8734f2c69bcf7ef9f5ae454a85743ba  MesaDemos-6.4.tar.gz
-1a8c4d4fc699233f5fdb902b8753099e  MesaDemos-6.4.tar.bz2
-607ab7c7a7de0cc5febbdde2bfa03098  MesaDemos-6.4.zip
-3260156f66174322a092be0767962d34  MesaGLUT-6.4.tar.gz
-0465d053f83775f44a12dec4050dfd78  MesaGLUT-6.4.tar.bz2
-02abfcdcdf72ba938ae00f6e3b70fbe0  MesaGLUT-6.4.zip
-</pre>
-
-
-<h2>New</h2>
-<ul>
-<li>Added a fast XOR line drawing function in Xlib driver
-<li>Added support for GL_ARB_texture_mirrored_repeat to savage driver (supported only on Savage4 hardware).
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Mesa now packaged in three parts: Library, Demos and GLUT
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
-<li>Some files were present multiple times in the 6.3.2 tarballs
-<li>r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
-<li>glxgears_fbconfig demo didn't work (bug 4237)
-<li>fixed bug when bilinear sampling 2d textures with borders
-<li>glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
-<li>fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
-<li>fixed a few problems with proxy color tables (bug 4270)
-<li>fixed precision problem in Z clearing (bug 4395)
-<li>glBitmap, glDraw/CopyPixels mistakenly generated selection hits
-<li>fixed potential segfault caused by reading pixels outside
-	of renderbuffer bounds
-<li>glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
-<li>fixed memory corruption bug involving software alpha buffers
-<li>glReadPixels clipped by window bounds was sometimes broken
-<li>glDraw/CopyPixels of stencil data ignored the stencil write mask
-<li>glReadPixels from a texture bound to a framebuffer object didn't work
-<li>glIsRender/FramebufferEXT weren't totally correct
-<li>fixed a number of point size attenuation/fade bugs
-<li>fixed glFogCoord bug 4729
-<li>GLX encoding for transpose matrix functions was broken
-<li>fixed broken fragment program KIL and SWZ instructions
-<li>fragment programs that wrote result.depth.z didn't work
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa (Xlib)		implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Windows/Win32		implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)  requires updates	
-SVGA			requires updates
-DJGPP			requires updates
-GGI			requires updates
-BeOS			requires updates
-Allegro			requires updates
-D3D			requires updates
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.5.1.html b/docs/relnotes-6.5.1.html
deleted file mode 100644
index 0f03f93..0000000
--- a/docs/relnotes-6.5.1.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.5.1 Release Notes / September 15, 2006</H1>
-
-<p>
-Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
-bug fixes.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-d9a555297319bb932a3192952d53d073  MesaLib-6.5.1.tar.gz
-c46f2c6646a270911b791dd8e1c2d977  MesaLib-6.5.1.tar.bz2
-939eaaff33322bfeafac784402b45f4f  MesaLib-6.5.1.zip
-9e4bbe83c007bfbaa67449a81cc3d36a  MesaDemos-6.5.1.tar.gz
-0f2794baf7a9d98b22caea9f78c6942d  MesaDemos-6.5.1.tar.bz2
-14c77eab9cc7a265c331abf239927c1c  MesaDemos-6.5.1.zip
-c5f87c23aaf4eaf1bda0d007ea98366c  MesaGLUT-6.5.1.tar.gz
-2525642fe7f454e3e1a1aad01359b406  MesaGLUT-6.5.1.tar.bz2
-e33b165c22551e23b58ede8767378543  MesaGLUT-6.5.1.zip
-</pre>
-
-
-<h2>New Features</h2>
-<ul>
-<li>Intel i965 "broadwater" DRI driver
-
-<li>GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
-	arrays in an object.
-
-<li>GL_EXT_texture_sRGB - non-linearly mapped texture formats
-
-<li>GL_EXT_gpu_program_parameters - addes a few new functions for setting
-	multiple vertex/fragment program parameters with one call.
-<li>"engine" demo
-<li>updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
-<li>many updates to the DRI drivers
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>The glVertexAttribARB functions no longer alias the conventional
-	vertex attributes.
-<li>glxinfo program prints more info with -l option
-<li>GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
-	compatible, in terms of glBindProgramARB()
-<li>The GL_ARB_vertex_program attribute <code>vertex.weight</code> is now
-	accepted by the parser, even though the	GL_ARB_vertex_blend and
-	GL_EXT_vertex_weighting extensions aren't supported.
-	Allows Warcraft to run.
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>fixed broken texture border handling for depth textures (bug 6498)
-<li>removed the test for duplicated framebuffer attachments, per
-	version 117 of the GL_EXT_framebuffer_object specification
-<li>fixed a few render-to-texture bugs, including render to depth texture
-<li>clipping of lines against user-defined clip planes was broken (6512)
-<li>assembly language dispatch for SPARC was broken (bug 6484)
-<li>assorted compilation fixes on various Unix platforms (Dan Schikore)
-<li>glPopAttrib could restore an invalid value for GL_DRAW_BUFFER
-<li>assorted minor fixes for 16 and 32 bit/channel modes
-<li>fixed assorted bugs in texture compression paths
-<li>fixed indirect rendering vertex array crashes (bug 6863)
-<li>glDrawPixels GL_INDEX_OFFSET didn't always work
-<li>fixed convolution memory leak (bug 7077)
-<li>rectangular depth textures didn't work
-<li>invalid mode to glBegin didn't generate an error (bug 7142)
-<li>'normalized' parameter to glVertexAttribPointerARB didn't work
-<li>disable bogus GLX_SGI_video_sync extension in xlib driver
-<li>fixed R128 driver locking bug (Martijn van Oosterhout)
-<li>using evaluators with vertex programs caused crashes (bug 7564)
-<li>fragment.position wasn't set correctly for point/line primitives
-<li>fixed parser bug for scalar sources for GL_NV_fragment_program
-<li>max fragment program length was incorrectly 128, now 1024
-<li>writes to result.depth in fragment programs weren't clamped to [0,1]
-<li>fixed potential dangling pointer bug in glBindProgram()
-<li>fixed some memory leaks (and potential crashes) in Xlib driver
-<li>fixed a number of build issues on HP-UX (Christopher Bell)
-<li>accum buffer didn't work with OSMesa interface
-</ul>
-
-
-<h2>Internal code changes</h2>
-
-<p>
-A number of Mesa program-related structs were renamed.
-For example <i>struct vertex_program</i> is now <i>struct gl_vertex_program</i>.
-All the effected drivers have been updated.
-</p>
-
-<p>Ian Romanick updated the GL API dispatch code in a number of ways.
-First, many old/unused extensions were removed.
-Second, the static entrypoints for some extensions were removed.
-This means GL function pointers will have to be used more often
-(e.g. use glXGetProcAddressARB()).
-</p>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Increase MAX_DRAWBUFFERS
-<li>Fix linux-glide target/driver.
-<li>Fix lambda calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.5.2.html b/docs/relnotes-6.5.2.html
deleted file mode 100644
index db2038a..0000000
--- a/docs/relnotes-6.5.2.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.5.2 Release Notes / December 2, 2006</H1>
-
-<p>
-Mesa 6.5.2 is a 6.5 follow-on development release with a few new features
-but mostly consisting of bug fixes.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-11a033b078e090b3caaeb467234fe299  MesaLib-6.5.2.tar.gz
-e4d894181f1859651658b3704633e10d  MesaLib-6.5.2.tar.bz2
-63bf1d444fa738cca52ce1043e284021  MesaLib-6.5.2.zip
-2b8f1375d16bda5f5a2304174cd5bcf7  MesaDemos-6.5.2.tar.gz
-e870efe98d3a50be01ab211b9b2e25d9  MesaDemos-6.5.2.tar.bz2
-d92cc6f5fee5ca75af0be04f9f4908f0  MesaDemos-6.5.2.zip
-8d4d77e3a7132f4217bbc7c1ab157030  MesaGLUT-6.5.2.tar.gz
-e84edbb11c69c8e408dfadd2ed08e95b  MesaGLUT-6.5.2.tar.bz2
-c6d7134843ed5faf11f6686ecb5d2a2e  MesaGLUT-6.5.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>New DRI memory manager system.  Currently used by the i915tex driver.
-Other DRI drivers will be updated to use the new memory manager in coming
-months.
-<br>
-To use the new driver you'll need the most recent DRM library and drivers
-(version 2.2 or later) and a recent xf86-video-intel driver module from X.org.
-<br>
-New features resulting from this work include:
-<ul>
-<li>EXT_framebuffer_objects, render to texture
-<li>ARB_pixel_buffer_objects
-<li>Accelerated CopyTexSubimage, DrawPixels, ReadPixels, CopyPixels
-<li>Accelerated texture uploads from pixel buffer objects
-<li>Potentially texturing directly from the pixel buffer object (zero 
-copy texturing).
-</ul>
-<li>New Intel i965 DRI driver
-<li>New <code>minstall</code> script to replace normal install program
-<li>Faster fragment program execution in software
-<li>Added (or fixed) support for <a href="http://www.opengl.org/registry/specs/SGI/make_current_read.txt">
-    GLX_SGI_make_current_read</a> to the following drivers:</li>
-    <ul>
-    <li>radeon</li>
-    <li>savage</li>
-    <li>mga</li>
-    <li>tdfx</li>
-    </ul>
-<li>Added support for ARB_occlusion_query to the tdfx driver (Ian
-Romanick).</li>
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>fixed invalid memory read while rendering textured points (bug 8320)
-<li>fixed problems with freebsd-dri configuration (bug 8344)
-<li>Mesa's fake glxGetCurrentContext() wasn't thread-aware
-<li>OPTION NV_position_invariant didn't work in NV vertex programs
-<li>glDrawPixels into a user-created framebuffer object could crash Xlib driver
-<li>Line clipping was broken in some circumstances
-<li>fragment.fogcoord register didn't always contain the correct value
-<li>RGBA logicops didn't work reliably in some DRI drivers
-<li>Fixed broken RGBA LogicOps in Intel DRI drivers
-<li>Fixed some fragment program bugs in Intel i915 DRI driver
-<li>Fixed glGetVertexAttribfvARB bug 8883
-<li>Implemented glGetUniform[fi]vARB() functions
-<li>Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044)
-<li>Fixed some gluBuild2DMipmaps() bugs (Greg McGarragh)
-<li>Fixed broken "mgl" name mangling
-<li>Indirect rending was broken for glMap* functions (bug 8899)
-</ul>
-
-
-<h2>Internal code changes</h2>
-
-<ul>
-<li>The device driver functions ResizeBuffers and GetBufferSize have been
-decprecated.
-<li>OpenGL 2.0 and 2.1 support is nearly done.  We need to do quite a bit
-more testing of the shading language functions.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Increase MAX_DRAWBUFFERS
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.5.3.html b/docs/relnotes-6.5.3.html
deleted file mode 100644
index 0d68d99..0000000
--- a/docs/relnotes-6.5.3.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.5.3 Release Notes / April 27, 2007</H1>
-
-<p>
-Mesa 6.5.3 is a development release with many changes and new features.
-Mesa 7.0 is expected to follow shortly.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-39f33ea64e34e2d5b20640b008b57649  MesaLib-6.5.3.tar.gz
-46359457147c469745f24b5074a186f0  MesaLib-6.5.3.tar.bz2
-a8946fa861634ce15971396f47992c41  MesaLib-6.5.3.zip
-08e26948d57eaca74d02a530b2d8106e  MesaDemos-6.5.3.tar.gz
-8af91773ab2653fe537499676b05f2e8  MesaDemos-6.5.3.tar.bz2
-783f81b171bf89b0929abc894efd25a6  MesaDemos-6.5.3.zip
-9467d415388fe1ad82991fb20704b812  MesaGLUT-6.5.3.tar.gz
-360843e46b7ebb6909290b023f9b26fa  MesaGLUT-6.5.3.tar.bz2
-7686065e5c15a30de08a1610860b6840  MesaGLUT-6.5.3.zip
-</pre>
-
-
-<h2>Shared library numbering</h2>
-<p>
-Mesa 6.5.3 supports the OpenGL 2.0/2.1 API.  However, the (unix)
-shared library version is still 1.5 (i.e. libGL.so.1.5.xxxxxx).
-Bumping the shared library version to 2.x would cause linking problems
-with existing OpenGL applications.  Since OpenGL 2.x is backward
-compatible with OpenGL 1.x the shared library version number doesn't
-have to be incremented (which would indicate an incompatible ABI).
-</p>
-<p>
-Other OpenGL vendors name their OpenGL 2.x libraries libGL.so.1.0.xxxxx
-for the same reason.
-</p>
-
-
-
-<h2>New features</h2>
-<ul>
-<li>OpenGL 2.0 and 2.1 API support.
-<li>Entirely new Shading Language code generator.  See the
-<a href="shading.html">Shading Language</a> page for more information.
-<li>Much faster software execution of vertex, fragment shaders.
-<li>New vertex buffer object (vbo) infrastructure
-<li>Updated glext.h file (version 39)
-<li>Updated glxext.h file (version 19)
-<li>GL_MAX_DRAWBUFFERS is now 4 (software rendering) so
-    "multiple render targets" are really supported.
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fog was errantly applied when a fragment shader was enabled (bug 9346)
-<li>glPush/PopClientAttrib didn't handle VBO bindings correctly (bug 9445)
-<li>With 32-bit Z buffer, the fragment Z of lines and points was sometimes wrong.
-<li>GL_POST_CONVOLUTION_ALPHA_BIAS/SCALE was broken.
-<li>1D convolution state could effect 2D image transfers
-<li>Overlapping glCopyPixels with negative Y zoom didn't work (bug 10521)
-<li>Fixed a number of framebuffer/renderbuffer reference counting bugs
-<li>Fixed a few bugs in software-emulated alpha planes
-<li>Assorted minor bug fixes in glCopy/DrawPixels, glPixelZoom, etc.
-<li>Assorted DRI driver bug fixes.
-<li>Fixed a number of bugs that prevented "depth-peeling" rendering from working.
-</ul>
-
-
-<h2>Internal code changes</h2>
-<ul>
-<li>Old array_cache module replaced by new vbo module.  All geometry
-rendering is now cast in the form of vertex buffer objects.
-<li>Massive changes to the Shading Language compiler and related state.
-<li>Vertex/fragment shaders are compiled into GPU instructions and
-programs very similar to GL_ARB_vertex/fragment_program.
-<li>Vertex and fragment programs are executed with the same code now.
-<li>The SSE-optimized vertex program path has been removed since it didn't
-support more than 12 temp registers, didn't support branching/looping, etc.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-6.5.html b/docs/relnotes-6.5.html
deleted file mode 100644
index 9d1d669..0000000
--- a/docs/relnotes-6.5.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 6.5 Release Notes / March 31, 2006</H1>
-
-<p>
-Mesa 6.5 is a new development release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-657be3b92f6dabc78a67ed9cb8d67813  MesaLib-6.5.tar.gz
-61beda590bfc5b4a12e979d5f2d70d7a  MesaLib-6.5.tar.bz2
-19d48b872d579d4f91466060804a59ac  MesaLib-6.5.zip
-694ad3a7007010c7418a9c72d1cba5b7  MesaDemos-6.5.tar.gz
-ab95b590dcd640726a2d89e62068c66e  MesaDemos-6.5.tar.bz2
-b792c303fefd87294488e2b7eab976e5  MesaDemos-6.5.zip
-ac1d585483617db0c91e5c15cb5ec3a3  MesaGLUT-6.5.tar.gz
-59f0bf2b2ffb67fe23ee479f9b044f31  MesaGLUT-6.5.tar.bz2
-005decb2136718e22222ac1c4805cd15  MesaGLUT-6.5.zip
-</pre>
-
-
-
-<h2>New Features</h2>
-<ul>
-<li>OpenGL Shading language support
-<br>
-   This includes the GL_ARB_shader_objects, GL_ARB_shading_language_100,
-   GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions.  Most of
-   the work was done by Michal Krol.
-   There's probably a fair number of bugs since this is a pretty large,
-   complicated body of code.
-<br>
-   The OpenGL 2.0 interface to these features will be implemented in a
-   future version of Mesa,
-
-<li>GL_EXT_timer_query
-<br>
-   Used to measure the time of OpenGL operations at high precision.
-   Only supported in the software/Xlib driver at this time.
-
-<li>GL_EXT_packed_depth_stencil
-<br>
-   Defines a new GL_DEPTH_STENCIL_EXT pixel format.
-
-<li>GL_EXT_framebuffer_blit
-<br>
-   A simplified glCopyPixels-like feature for copying pixel rectangles.
-
-<li>GL_ARB_half_float_pixel
-<br>
-   Adds a new half-precision floating point format for image transfers,
-   such as for glDrawPixels, glReadPixels, glTexImage, etc.
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
-<li>removed GL_SGIX/SGIS_pixel_texture extensions
-</ul>
-<h2>Bug fixes</h2>
-<ul>
-<li>fixed glxcontextmodes.c datatype problem (bug 5835)
-<li>fixed aix-gcc build/install bugs (bug 5874)
-<li>fixed some bugs in texture env program generation
-<li>glXCopyContext() didn't handle texture object bindings properly
-<li>glXCopyContext() didn't copy all lighting state
-<li>fixed FreeBSD config (Pedro Giffuni)
-<li>fixed some minor framebuffer object bugs
-<li>replaced dprintf() with _glu_printf() in GLU (bug 6244)
-<li>fixed a number of thread safety bugs/regressions
-<li>fixed a number of GLU tesselator bugs (John Shell, bug 6339)
-<li>paletted texturing was broken w/ floating point palettes (K. Schultz)
-<li>lots of assorted framebuffer object bug fixes
-</ul>
-
-
-<h2>Known Issues</h2>
-<ul>
-<li>Rendering to depth textures will not work.  Rendering to GL_DEPTH_STENCIL
-textures should work.
-</ul>
-
-
-<h2>Driver Interface Changes</h2>
-<ul>
-<li>Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
-the two-sided versions: Driver.Stencil*Separate().
-<li>Render-to-texture: The functions for rendering to textures have changed.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Increase MAX_DRAWBUFFERS
-<li>Fix linux-glide target/driver.
-<li>Fix lambda calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 1.5
-OSMesa (off-screen)	implements OpenGL 1.5
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			implements OpenGL 1.3
-Wind River UGL		implements OpenGL 1.3
-Windows/Win32		implements OpenGL 1.5
-DJGPP			implements OpenGL 1.5
-GGI			implements OpenGL 1.3
-BeOS			implements OpenGL 1.5
-Allegro			needs updating
-D3D			needs updating
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.0.1.html b/docs/relnotes-7.0.1.html
deleted file mode 100644
index 02713ad..0000000
--- a/docs/relnotes-7.0.1.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.0.1 Release Notes / August 3, 2007</H1>
-
-<p>
-Mesa 7.0.1 is a stable release with bug fixes since version 7.0.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-db55141a44b902fcc61d9265b7862c06  MesaLib-7.0.1.tar.gz
-c056abd763e899114bf745c9eedbf9ad  MesaLib-7.0.1.tar.bz2
-ecc2637547fae2b38271ae362d013afa  MesaLib-7.0.1.zip
-b85a4a5be4e829f4a1165e4514b13183  MesaDemos-7.0.1.tar.gz
-3b66b3268df12ca8a6c4e0c4c457912c  MesaDemos-7.0.1.tar.bz2
-b1c18006f16e44e80fea66774c59b391  MesaDemos-7.0.1.zip
-b87a69986839ae43ce12fc8e3dc1ebb4  MesaGLUT-7.0.1.tar.gz
-25f30d0c1651997b4412366ba0572f7f  MesaGLUT-7.0.1.tar.bz2
-676ee6682a6ce78a5540554fd975c03e  MesaGLUT-7.0.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Added a bluegene-osmesa build config
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed some MingW build issues
-<li>Added a few missing OpenGL 2.0 API entrypoints:
-  <ul>
-  <li>glVertexAttrib4bv
-  <li>glVertexAttrib4iv
-  <li>glVertexAttrib4ubv
-  <li>glVertexAttrib4uiv
-  <li>glVertexAttrib4usv
-  </ul>
-<li>Fixed glDrawPixels(GL_STENCIL_INDEX) pixel transfer bug 11457
-<li>GLSL bug fix: added vec2(vec4) constructor
-<li>GLSL bug fix: .strq and .rgba writemasks didn't always work
-<li>Stencil pixel map didn't always work for glDrawPixels (bug 11475)
-<li>Fixed polygon stipple bug in i915 driver
-<li>Binding a zero-sized texture didn't disable texturing (bug 11309)
-<li>Queries of GL_INFO_LOG_LENGTH, GL_SHADER_SOURCE_LENGTH didn't include
-the terminating zero (bug 11588)
-<li>glXChooseFBConfig() in Xlib driver didn't handle GLX_STEREO flag properly
-<li>Fixed a GLSL function call bug (#11731)
-<li>glPointParameteriv(GL_DISTANCE_ATTENUATION_EXT) didn't work (bug 11754)
-<li>glGetAttribLocation() always returned 1 (bug 11774)
-<li>Fixed a few memory-related bugs in GLU library
-</ul>
-
-
-<h2>Changes</h2>
-<ul>
-<li>The libOSMesa library version has been reverted to 6.5.3 (soname=6)
-in order to avoid application linking issues.  Otherwise, applications
-previously linked with libOSMesa.so.6 would no longer link with libOSMesa.so.7
-<li>Dropped obsolete, unmaintained Windows project files for VC6 and VC7.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.0.2.html b/docs/relnotes-7.0.2.html
deleted file mode 100644
index 7a7c70f1..0000000
--- a/docs/relnotes-7.0.2.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.0.2 Release Notes / November 10, 2007</H1>
-
-<p>
-Mesa 7.0.2 is a stable release with bug fixes since version 7.0.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-c9cf607f36e7e50172f5f9c7d552c34e  MesaLib-7.0.2.tar.gz
-93e6ed7924ff069a4f883b4fce5349dc  MesaLib-7.0.2.tar.bz2
-10c324c3613f90f059cb8429f700f300  MesaLib-7.0.2.zip
-aa8b1244a5de1d23e5814bf9b67f1435  MesaDemos-7.0.2.tar.gz
-11a10410bae7be85cf25bc7119966468  MesaDemos-7.0.2.tar.bz2
-1dd0b5fd6d69430a2fd76a6adbfd8fff  MesaDemos-7.0.2.zip
-a7dbf25c025955858bd2d89a6eb6db4c  MesaGLUT-7.0.2.tar.gz
-3a33f8efc8c58a592a854cfc7a643286  MesaGLUT-7.0.2.tar.bz2
-eba4ef2aa8c362ead81b54357f1903a3  MesaGLUT-7.0.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Updated Windows VC7 project files
-<li>Added DESTDIR variable for 'make install'
-<li>Added pkg-config files for gl, glu, glut and glw libraries
-<li>Added bluegene-xlc-osmesa and catamount-osmesa-pgi configs
-<li>Support for Intel G33/Q33/Q35 graphics chipsets
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed a vertex buffer wrapping issue (bug 9962)
-<li>Added mutex protection around texture object reference counters
-<li>Added checking/support for additional chips in the i915/i945 family
-(see 11978)
-<li>Fixed a blending/banding issue (bug 11931)
-<li>Fixed a GLU matrix inversion bug (#6748)
-<li>Fixed problem with large glDrawArrays calls and indirect rendering (bug 12141)
-<li>Fixed an assortment of i965 driver bugs
-<li>Fixed x86-64 vertex transformation bug (12216)
-<li>Fixed X server crash caused by multiple indirect rendering clients
-<li>Parsing of state.texgen in ARB vertex/fragment programs didn't work (bug 12313)
-<li>Fixed a glCopyPixels/glPixelZoom bug (12417)
-<li>Fixed a bug when using glMaterial in display lists (bug 10604)
-<li>Fixed a few GLUT/Fortran issues (Bill Mitchell)
-<li>Fixed Blender crash bug (12164)
-<li>Fixed some issues preventing cross-compiling
-<li>Fixed up broken GL_ATI_separate_stencil extension
-<li>glDrawArrays(count=0) led to a crash
-<li>Fix SSE code gen memory leak, possible crash
-<li>Fixed MMX 565 rgb conversion problem (bug 12614)
-<li>Added -fno-strict-aliasing and -fPIC flags for gcc
-<li>Fixed Blender crash in Unichrome driver (bug 13142)
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.0.3.html b/docs/relnotes-7.0.3.html
deleted file mode 100644
index 5c8efc7..0000000
--- a/docs/relnotes-7.0.3.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.0.3 Release Notes / April 4, 2008</H1>
-
-<p>
-Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-3fd1cb76531b2515ef7db92d9a93dbf8  MesaLib-7.0.3.tar.gz
-e6e6379d7793af40a6bc3ce1bace572e  MesaLib-7.0.3.tar.bz2
-97882bac195229ee0b78cab82e0e3be1  MesaLib-7.0.3.zip
-8abf6bbcb1661e7dd4ce73b3fbb85898  MesaDemos-7.0.3.tar.gz
-47fd6863621d3c9c7dbb870ab7f0c303  MesaDemos-7.0.3.tar.bz2
-99e442e14da1928f76a7297bb421a3af  MesaDemos-7.0.3.zip
-2b50fe9fadc4709b57c52adef09fce3c  MesaGLUT-7.0.3.tar.gz
-0ff23c4e91b238abae63a5fc9fa003e7  MesaGLUT-7.0.3.tar.bz2
-70e83554a4462dad28e0d6e20f79aada  MesaGLUT-7.0.3.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Added missing glw.pc.in file to release tarball
-<li>Fix GLUT/Fortran issues
-<li>GLSL gl_FrontLightModelProduct.sceneColor variable wasn't defined
-<li>Fix crash upon GLSL variable array indexes (not yet supported)
-<li>Two-sided stencil test didn't work in software rendering
-<li>Fix two-sided lighting bugs/crashes (bug 13368)
-<li>GLSL gl_FrontFacing didn't work properly
-<li>glGetActiveUniform returned incorrect sizes (bug 13751)
-<li>Fix several bugs relating to uniforms and attributes in GLSL API (Bruce Merry, bug 13753)
-<li>glTexImage3D(GL_PROXY_TEXTURE_3D) mis-set teximage depth field
-<li>Fixed GLX indirect vertex array rendering bug (14197)
-<li>Fixed crash when deleting framebuffer objects (bugs 13507, 14293)
-<li>User-defined clip planes enabled for R300 (bug 9871)
-<li>Fixed glBindTexture() crash upon bad target (bug 14514)
-<li>Fixed potential crash in glDrawPixels(GL_DEPTH_COMPONENT) (bug 13915)
-<li>Bad strings given to glProgramStringARB() didn't generate GL_INVALID_OPERATION
-<li>Fixed minor point rasterization regression (bug 11016)
-<li>state.texenv.color state var didn't work in GL_ARB_fragment_program (bug 14931)
-<li>glBitmap from a PBO didn't always work
-<li>glGetTexImage into a PBO didn't always work
-<li>Comments at the end of ARB vertex/fragment programs crashed the parser
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Updated glext.h to version 40
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.0.4.html b/docs/relnotes-7.0.4.html
deleted file mode 100644
index f100d99..0000000
--- a/docs/relnotes-7.0.4.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.0.4 Release Notes / August 16, 2008</H1>
-
-<p>
-Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-909afa3a01ae31478d363837681415ac  MesaLib-7.0.4.tar.gz
-8d7bacbe0234742a5d08c8088c4619e9  MesaLib-7.0.4.tar.bz2
-5e44261ef85b049a868e1785d9adc276  MesaLib-7.0.4.zip
-53dcd77d37a819feaf50b5fcdd0a6e0f  MesaDemos-7.0.4.tar.gz
-c1215b31c5f7b85f81eed3bfba07d556  MesaDemos-7.0.4.tar.bz2
-b1825a7361f116b28d82d328077630b4  MesaDemos-7.0.4.zip
-d7677d015f52602d1bf8b837fb717848  MesaGLUT-7.0.4.tar.gz
-f5f8b46f7e763d9f7b7d1d115c1c44ee  MesaGLUT-7.0.4.tar.bz2
-a786775271a02c62a3370b13b26bf48d  MesaGLUT-7.0.4.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>define #extension GL_ARB_texture_rectangle in shading language
-<li>fixed WIN32 compile problem in libGLU
-<li>Fixed a per-vertex glMaterial bug which could cause bad lighting
-<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
-<li>Fixed glDrawElement + VBO segfault (bug 16156)
-<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
-<li>Fixed stack overflow when using glPixelZoom on Windows
-<li>Fixed broken all(bvec2) GLSL function, added misc missing bvec constructors
-<li>ARB program "state.clip[n].plane" didn't parse correctly
-<li>Fixed broken glGetUniformiv() (bug 13774)
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Including the latest glext.h and glxext.h header files from Khronos
-<li>Added support for DragonFly OS
-<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
-<li>Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers
-<li>Enabled GL_ARB_point_sprite extension in I965 driver
-<li>Enabled GL_EXT_texture_sRGB extension in I965 driver
-<li>Added support for GL shading language in I965 driver
-</ul>
-
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.0.html b/docs/relnotes-7.0.html
deleted file mode 100644
index 2c036b2..0000000
--- a/docs/relnotes-7.0.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.0 Release Notes / June 22, 2007</H1>
-
-<p>
-Mesa 7.0 is a stable release, featuring OpenGL 2.1 API support.
-A number of bugs have been fixed since the 6.5.3 release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-35a1698986f7ac8dc435624ee9256cda  MesaLib-7.0.tar.gz
-50c371455fa7532c04aa0a970f9bc51f  MesaLib-7.0.tar.bz2
-bcedb6f43c97c1bc49e5cc7f12835722  MesaLib-7.0.zip
-9bad332c7b74f59be96556135212ca9e  MesaDemos-7.0.tar.gz
-fada2bc1f29da513e015fda1e3abd0c0  MesaDemos-7.0.tar.bz2
-84e3bbe470d983ae32f1f0c779faf99e  MesaDemos-7.0.zip
-76c7bb54f9850c689eba844f6daed332  MesaGLUT-7.0.tar.gz
-4af28296e02772ef1de00e4e79bf3d12  MesaGLUT-7.0.tar.bz2
-9043cb0b54cc03d1874728d74b12188c  MesaGLUT-7.0.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>OpenGL 2.0 and 2.1 API support.
-</ul>
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed a few fog-related bugs.
-<li>Fixed broken GLSL mix() function.
-<li>Fixed broken GLSL exp() functions.
-<li>Fixed GLSL mod4(vec4, vec4) bug.
-<li>Implemented GLSL asin(), acos(), atan() functions.
-<li>Fixed an R300 driver bug that caused Xorg composite manager to crash
-<li>Fixed R300 vertex program/matrix bug (10848)
-<li>GLSL dFdx() and dFdy() work for fragment program inputs now (texcoords)
-<li>Specifying an invalid texture unit as a sampler could lead to a crash
-<li>The GLX protocol request for glXDestroyPBuffer() was incorrect (bug 10983)
-<li>ARB vp state.light[n].half value was incorrect (bug 10987)
-<li>Fixed a positional light source bug (bug 11009)
-<li>Fixed point size attenuation problem (bug 11042)
-<li>glPopAttrib didn't restore texture object's LOD bias (bug 11049)
-<li>Fixed a TLS / TEXTREL problem (bug 7459)
-</ul>
-
-
-<h2>Internal code changes</h2>
-<ul>
-<li>Some texture code consolidation and simplifiction (Ian Romanick)
-<li>R300 driver clean-ups.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Switch to freeglut
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.1.html b/docs/relnotes-7.1.html
deleted file mode 100644
index e8a39c8..0000000
--- a/docs/relnotes-7.1.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.1 Release Notes / August 26, 2008</H1>
-
-<p>
-Mesa 7.1 is a new development release.
-There have been many internal code changes since Mesa 7.0.x.
-It should be relatively stable, but those who are especially concerned about
-stability should wait for Mesa 7.2 or use Mesa 7.0.4 (the previous stable
-release).
-</p>
-</>
-Note that this version of Mesa does not use the GEM memory manager.
-The master branch of git uses GEM.
-</p>
-<p>
-DRM version 2.3.1 should be used with Mesa 7.1
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-971c2fe6e6949dc5ba200a6f97a6dc81  MesaLib-7.1.tar.gz
-6bff7f532d16f90f944a400c8bd7074d  MesaLib-7.1.tar.bz2
-d48224bf9d54c3da6776adb4869ba024  MesaLib-7.1.zip
-3de268420efca43e9a19ab506cdfc993  MesaDemos-7.1.tar.gz
-abfc9775e1462363af8ec160d1feb01f  MesaDemos-7.1.tar.bz2
-f7b3623387c4036e9895cd9ac0dfad99  MesaDemos-7.1.zip
-fdf348f78cd09304b6ff801ef8acc8eb  MesaGLUT-7.1.tar.gz
-f6d88a4eeb02e98c7e92f1c895d3c76b  MesaGLUT-7.1.tar.bz2
-4dc102a5ca51e1c41dde87d3f8c7b22a  MesaGLUT-7.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>autoconf-based configuration (and clean-up of Makefiles)
-<li>Assorted DRI driver enhancements
-<li>Reduced dependencies between X server and Mesa
-<li>GL_EXT_texture_from_pixmap extension for Xlib driver
-<li>Support for the GL shading language with i965 driver (implemented by Intel)
-<li>ATI R500 series support (Radeon X1300&#8211;X1950) in r300 DRI driver
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Numerous GLSL fixes
-<li>Fixed some error code/detection bugs in the GLSL-related API functions
-<li>Lots of DRI driver fixes.
-</ul>
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
-Probably do the same for malloc, calloc, etc.
-The wrappers were useful in the past for memory debugging but now we
-have valgrind.  Not worried about SunOS 4 support anymore either...
-<li>Switch to freeglut
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.10.html b/docs/relnotes-7.10.html
deleted file mode 100644
index 2abbc4a..0000000
--- a/docs/relnotes-7.10.html
+++ /dev/null
@@ -1,2788 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.10 Release Notes / January 7, 2011</H1>
-
-<p>
-Mesa 7.10 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 7.10.1.
-</p>
-<p>
-Mesa 7.10 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-tbd
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>GL_ARB_explicit_attrib_location extension (Intel and software drivers).
-<li>GL_ARB_texture_rg (Intel, software drivers, gallium drivers).
-<li>GL_EXT_separate_shader_objects extension (Intel and software drivers).
-<li>GL_NV_primitive_restart extension (Gallium softpipe, llvmpipe).
-<li>New fragment shader back-end for i965-class hardware.
-<li>Support for Sandybridge chipset in i965 DRI driver.
-</ul>
-
-
-<h2>Bug fixes</h2>
-<p>This list is likely incomplete.</p>
-<ul>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28800">Bug 28800</a> - [r300c, r300g] Texture corruption with World of Warcraft</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29420">Bug 29420</a> - Amnesia / HPL2 RendererFeatTest - not rendering correctly</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29946">Bug 29946</a> - [swrast] piglit valgrind glsl-array-bounds-04 fails</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30261">Bug 30261</a> - [GLSL 1.20] allowing inconsistent invariant declaration between two vertex shaders</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30632">Bug 30632</a> - [softpipe] state_tracker/st_manager.c:489: st_context_notify_invalid_framebuffer: Assertion `stfb &amp;&amp; stfb-&gt;iface == stfbi' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30694">Bug 30694</a> - wincopy will crash on Gallium drivers when going to front buffer</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30771">Bug 30771</a> -  [r600g] vert-tex glsl demo</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30787">Bug 30787</a> - Invalid asm shader does not generate draw-time error when used with GLSL shader</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30974">Bug 30974</a> - [llvmpipe] SIGABRT src/gallium/drivers/llvmpipe/lp_state_fs.c:779</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30993">Bug 30993</a> - getFramebufferAttachmentParameteriv wrongly generates error</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31101">Bug 31101</a> -  [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31193">Bug 31193</a> -  [regression] aa43176e break water reflections</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31194">Bug 31194</a> - The mesa meta save/restore code doesn't ref the current GLSL program</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31371">Bug 31371</a> - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type &gt;= 0) &amp;&amp; (type->base_type &lt;= 3)' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31439">Bug 31439</a> - Crash in glBufferSubData() with size == 0</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31495">Bug 31495</a> - [i965 gles2c bisected] OpenGL ES 2.0 conformance GL2Tests_GetBIFD_input.run regressed</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31514">Bug 31514</a> - isBuffer returns true for unbound buffers</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31560">Bug 31560</a> - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31617">Bug 31617</a> - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31648">Bug 31648</a> -  [GLSL] array-struct-array gets assertion: `(size &gt;= 1) && (size &lt;= 4)' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31650">Bug 31650</a> - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31673">Bug 31673</a> - GL_FRAGMENT_PRECISION_HIGH preprocessor macro undefined in GLSL ES</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31690">Bug 31690</a> -  i915 shader compiler fails to flatten if in Aquarium webgl demo.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31832">Bug 31832</a> - [i915] Bad renderbuffer format: 21</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31841">Bug 31841</a> - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31894">Bug 31894</a> - Writing to gl_PointSize with GLES2 corrupts other varyings</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31909">Bug 31909</a> - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr-&gt;operands[i]-&gt;type-&gt;is_scalar()' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31934">Bug 31934</a> - [gallium] Mapping empty buffer object causes SIGSEGV</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31983">Bug 31983</a> -  [i915 gles2] "if (expression with builtin/varying variables) discard" breaks linkage</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31985">Bug 31985</a> - [GLSL 1.20] initialized uniform array considered as "unsized"</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31987">Bug 31987</a> - [gles2] if input a wrong pname(GL_NONE) to glGetBoolean, it will not case GL_INVALID_ENUM</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32035">Bug 32035</a> - [GLSL bisected] comparing unsized array gets segfault</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32070">Bug 32070</a> - llvmpipe renders stencil demo incorrectly</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32273">Bug 32273</a> - assertion fails when starting vdrift 2010 release with shaders enabled</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32287">Bug 32287</a> - [bisected GLSL] float-int failure</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32311">Bug 32311</a> - [965 bisected] Array look-ups broken on GM45</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32520">Bug 32520</a> -  [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32825">Bug 32825</a> - egl_glx driver completely broken in 7.9 branch [fix in master]</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li>
-
-</ul>
-
-
-<h2>Changes</h2>
-<p>Adam Jackson (2):
-<ul>
-  <li>i965: Update renderer strings for sandybridge</li>
-  <li>drivers/x11: unifdef XFree86Server</li>
-</ul></p>
-
-<p>Alex Deucher (30):
-<ul>
-  <li>r600c: fix mipmap stride on evergreen</li>
-  <li>r600c: add reloc for CB_COLOR0_ATTRIB</li>
-  <li>r600c: pull over 6xx/7xx vertex fixes for evergreen</li>
-  <li>r600c: fix segfault in evergreen stencil code</li>
-  <li>r100: revalidate after radeon_update_renderbuffers</li>
-  <li>r600c: add missing radeon_prepare_render() call on evergreen</li>
-  <li>r600c: properly align mipmaps to group size</li>
-  <li>egl_dri2: Add radeon chip ids</li>
-  <li>r600c/evergreen: texture align is group_bytes just like 6xx/7xx</li>
-  <li>r600g: fix buffer alignment</li>
-  <li>r600g: All EVENT_WRITE packets need the EVENT_INDEX field</li>
-  <li>r600g: translate ARR instruction for evergreen</li>
-  <li>r600g: use meaningful defines for chiprev</li>
-  <li>r600g: use full range of VS resources for vertex samplers</li>
-  <li>r600g: fix additional EVENT_WRITE packet</li>
-  <li>r600g: fix some winsys functions to deal properly with evergreen</li>
-  <li>r600c: add Ontario Fusion APU support</li>
-  <li>r600g: add support for ontario APUs</li>
-  <li>r600c: fix VC flush on cedar and palm</li>
-  <li>gallium/egl: fix r300 vs r600 loading</li>
-  <li>r600c: fix some opcodes on evergreen</li>
-  <li>r600c: bump texture limits to hw limits</li>
-  <li>r600g: bump texture/cb limits appropriately for evergreen</li>
-  <li>radeon: bump mip tree levels to 15</li>
-  <li>r600g: fix rendering with a vertex attrib having a zero stride</li>
-  <li>r600g: remove useless switch statements</li>
-  <li>r600g: add support for NI (northern islands) asics</li>
-  <li>r600c: add support for NI asics</li>
-  <li>r600g: support up to 64 shader constants</li>
-  <li>r600c: fix up SQ setup in blit code for Ontario/NI</li>
-</ul></p>
-
-<p>Andre Maasikas (3):
-<ul>
-  <li>r600c: fix buffer height setting in dri2 case</li>
-  <li>r600g: break alu clause earlier</li>
-  <li>r600g: fix evergreen interpolation setup</li>
-</ul></p>
-
-<p>Andrew Randrianasulu (2):
-<ul>
-  <li>dri/nv04: Don't expose ARB_texture_env_combine/dot3.</li>
-  <li>dri/nv04: Enable eng3dm for A8/L8 textures.</li>
-</ul></p>
-
-<p>Aras Pranckevicius (2):
-<ul>
-  <li>glsl: fix crash in loop analysis when some controls can't be determined</li>
-  <li>glsl: fix matrix type check in ir_algebraic</li>
-</ul></p>
-
-<p>Bas Nieuwenhuizen (3):
-<ul>
-  <li>r600g: set ENABLE_KILL in the shader state in the new design</li>
-  <li>r600g: set ENABLE_KILL on evergreen too</li>
-  <li>r600g: use dirty list to track dirty blocks</li>
-</ul></p>
-
-<p>Ben Skeggs (3):
-<ul>
-  <li>nv50: DST</li>
-  <li>nv50: DPH</li>
-  <li>nv50: silence some unknown get_param warnings</li>
-</ul></p>
-
-<p>Benjamin Franzke (2):
-<ul>
-  <li>st/egl image: multiply drm buf-stride with blocksize</li>
-  <li>r600g: implement texture_get_handle (needed for eglExportDRMImageMESA)</li>
-</ul></p>
-
-<p>Brian Paul (296):
-<ul>
-  <li>glx: add const qualifiers to __indirect_glMultiDrawArraysEXT()</li>
-  <li>glsl2: fix signed/unsigned comparison warning</li>
-  <li>llvmpipe: cast to silence warning</li>
-  <li>llvmpipe: s/boolean/unsigned/ in bitfield to silence warning</li>
-  <li>nv50: use unsigned int for bitfields to silence warnings</li>
-  <li>tgsi: fix incorrect usage_mask for shadow tex instructions</li>
-  <li>gallivm: expand AoS sampling to cover all filtering modes</li>
-  <li>gallivm: fix incorrect vector shuffle datatype</li>
-  <li>gallivm: move i32_vec_type inside the #ifdef</li>
-  <li>mesa: include mfeatures.h in formats.c</li>
-  <li>gallivm: fix wrong return value in bitwise functions</li>
-  <li>tgsi/sse: fix aos_to_soa() loop to handle num_inputs==0</li>
-  <li>gallivm: added missing case for PIPE_TEXTURE_RECT</li>
-  <li>gallium: better docs for pipe_rasterizer_state::sprite_coord_enable</li>
-  <li>gallium: rework handling of sprite_coord_enable state</li>
-  <li>gallium/docs: added new pipeline.txt diagram</li>
-  <li>mesa: don't call valid_texture_object() in non-debug builds</li>
-  <li>glsl2: silence compiler warnings in printf() calls</li>
-  <li>docs: remove old broken link</li>
-  <li>docs: mark as obsolete, remove dead links</li>
-  <li>llvmpipe: fix query bug when no there's no scene</li>
-  <li>gallivm: remove debug code</li>
-  <li>llvmpipe: maintain fragment shader state for draw module</li>
-  <li>llvmpipe: indentation fix</li>
-  <li>llvmpipe: reformatting, remove trailing whitespace, etc</li>
-  <li>llvmpipe: clean-up, comments in setup_point_coefficient()</li>
-  <li>llvmpipe: rename sprite field, add sprite_coord_origin</li>
-  <li>llvmpipe: implement sprite coord origin modes</li>
-  <li>draw: fix test for using the wide-point stage</li>
-  <li>llvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS</li>
-  <li>draw: check bitshift against PIPE_MAX_SHADER_OUTPUS</li>
-  <li>Merge branch 'sprite-coord'</li>
-  <li>draw: new draw_fs.[ch] files</li>
-  <li>glsl2: fix typo in error msg</li>
-  <li>gallivm: fix lp_build_sample_compare()</li>
-  <li>softpipe: add missing calls to set draw vertex samplers/views</li>
-  <li>mesa: don't advertise bogus GL_ARB_shading_language_120 extension</li>
-  <li>configs: remove egl-swrast target from linux-dri config</li>
-  <li>llvmpipe: fix sprite texcoord setup for non-projective texturing</li>
-  <li>mesa: fix assertions to handle srgb formats</li>
-  <li>st/mesa: add missing MESA_FORMAT_S8 case in st_mesa_format_to_pipe_format()</li>
-  <li>st/mesa: use the wrapped renderbuffer in CopyPixels()</li>
-  <li>llvmpipe: make min/max lod and lod bias dynamic state</li>
-  <li>llvmpipe: make texture border_color dynamic state</li>
-  <li>softpipe: fix repeat() function for NPOT textures</li>
-  <li>gallivm: fix repeat() function for NPOT textures</li>
-  <li>swrast: update comments for REMAINDER() macro</li>
-  <li>softpipe: rename sp_state_fs.c -&gt; sp_state_shader.c</li>
-  <li>softpipe: make shader-related functions static</li>
-  <li>softpipe: make blend/stencil/depth functions static</li>
-  <li>softpipe: make sampler state functions static</li>
-  <li>softpipe: make vertex state functions static</li>
-  <li>softpipe: make rasterizer state functions static</li>
-  <li>softpipe: make stream out state functions static</li>
-  <li>softpipe: make clip state functions static</li>
-  <li>softpipe: minor asst. clean-ups</li>
-  <li>softpipe: allocate tile data on demand</li>
-  <li>llvmpipe: fix swizzling of texture border color</li>
-  <li>softpipe: fix swizzling of texture border color</li>
-  <li>draw: pass sampler state down to llvm jit state</li>
-  <li>gallivm: check for level=0 case in lp_build_minify()</li>
-  <li>gallivm: added some comments</li>
-  <li>draw: check for null sampler pointers</li>
-  <li>swrast: fix choose_depth_texture_level() to respect mipmap filtering state</li>
-  <li>st/mesa: replace assertion w/ conditional in framebuffer invalidation</li>
-  <li>glsl2: fix signed/unsigned comparison warning</li>
-  <li>st/xlib: add some comments</li>
-  <li>ir_to_mesa: assorted clean-ups, const qualifiers, new comments</li>
-  <li>mesa: remove assertion w/ undeclared variable texelBytes</li>
-  <li>gallivm: remove newlines</li>
-  <li>draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELS</li>
-  <li>mesa: reformatting, comments, code movement</li>
-  <li>x11: fix breakage from gl_config::visualType removal</li>
-  <li>gallivm: work-around trilinear mipmap filtering regression with LLVM 2.8</li>
-  <li>mesa: remove post-convolution width/height vars</li>
-  <li>gallivm: add compile-time option to emit inst addrs and/or line numbers</li>
-  <li>llvmpipe: code to dump bytecode to file (disabled)</li>
-  <li>gallivm: added lp_build_print_vec4()</li>
-  <li>gallivm: added lp_build_load_volatile()</li>
-  <li>glsl: add ir_unop_round_even case to silence unhandled enum warning</li>
-  <li>st/mesa: fix regressions in glDrawPixels(GL_STENCIL_INDEX)</li>
-  <li>st/mesa: reformatting in st_cb_drawpixels.c</li>
-  <li>st/mesa: use GLuint to avoid problem w/ uint not defined on mingw32</li>
-  <li>st/mesa: update function name, comments</li>
-  <li>gallivm: use util_snprintf()</li>
-  <li>llvmpipe: remove lp_setup_coef*.c files from Makefile</li>
-  <li>mesa: fix mesa version string construction</li>
-  <li>gallivm: fix incorrect type for zero vector in emit_kilp()</li>
-  <li>llvmpipe/draw: always enable LLVMAddInstructionCombiningPass()</li>
-  <li>draw: use float version of LLVM Mul/Add instructions</li>
-  <li>draw: fix typo in comment</li>
-  <li>mesa: add GL_RG case to _mesa_source_buffer_exists()</li>
-  <li>mesa: add missing cases for packing red/green images</li>
-  <li>st/mesa: added cases for GL_COMPRESSED_RED/RG in st_choose_format()</li>
-  <li>docs: update texture red/green support in GL3.txt</li>
-  <li>docs: add GL_ARB_texture_rg to release notes</li>
-  <li>mesa: driver hook for primitive restart</li>
-  <li>mesa: set/get primitive restart state</li>
-  <li>mesa: API spec for primitive restart</li>
-  <li>mesa: regenerated files with primitive restart</li>
-  <li>mesa: plug in primitive restart function</li>
-  <li>vbo: support for primitive restart</li>
-  <li>gallium: new CAP, state for primitive restart</li>
-  <li>st/mesa: support for primitive restart</li>
-  <li>draw: implement primitive splitting for primitive restart</li>
-  <li>softpipe: enable primitive restart</li>
-  <li>llvmpipe: enable primitive restart</li>
-  <li>docs: added GL_NV_primitive_restart extension</li>
-  <li>Merge branch 'primitive-restart-cleanup'</li>
-  <li>winsys/xlib: formatting fixes</li>
-  <li>winsys/xlib: use Bool type for shm field</li>
-  <li>winsys/xlib: fix up allocation/dealloction of XImage</li>
-  <li>winsys/xlib: rename xm-&gt;xlib</li>
-  <li>galahad: silence warnings</li>
-  <li>mesa: move declaration before code</li>
-  <li>docs: updated GL3 status for primitive restart</li>
-  <li>mesa: 80-column wrapping</li>
-  <li>mesa: simplify fbo format checking code</li>
-  <li>mesa: split up the image.c file</li>
-  <li>mesa: add pixel packing for unscaled integer types</li>
-  <li>mesa: _mesa_ClearColorIuiEXT() and _mesa_ClearColorIiEXT()</li>
-  <li>mesa: _mesa_is_format_integer() function</li>
-  <li>mesa: minor reformatting, clean-ups</li>
-  <li>mesa: added _mesa_is_fragment_shader_active() helper</li>
-  <li>mesa: new glDrawPixels error check for integer formats</li>
-  <li>softpipe: added some texture sample debug code (disabled)</li>
-  <li>mesa: added new gl_extensions::EXT_gpu_shader4 field</li>
-  <li>mesa: added new gl_framebuffer::_IntegerColor field</li>
-  <li>mesa: added glGet query for GL_RGBA_INTEGER_MODE_EXT</li>
-  <li>mesa: compute _IntegerColor field in _mesa_test_framebuffer_completeness()</li>
-  <li>mesa: added cases for GL_EXT_texture_integer formats</li>
-  <li>mesa: added cases for GL_EXT_texture_integer</li>
-  <li>st/mesa: add format selection for signed/unsigned integer formats</li>
-  <li>mesa: simplify target_can_be_compressed() function</li>
-  <li>glapi: GL_EXT_texture_integer API</li>
-  <li>glapi: include/build EXT_texture_integer.xml</li>
-  <li>mesa: regenerated API files for GL_EXT_texture_integer</li>
-  <li>mesa: plug in GL_EXT_texture_integer functions</li>
-  <li>mesa: display list support for GL_EXT_texture_integer</li>
-  <li>st/mesa: be smarter choosing texture format for glDrawPixels()</li>
-  <li>softpipe: remove &gt;32bpp color restriction</li>
-  <li>mesa: silence enum comparison warning</li>
-  <li>mesa: fix uninitialized var warning</li>
-  <li>xlib: silence unused var warning</li>
-  <li>util: use pointer_to_func() to silence warning</li>
-  <li>rtasm: use pointer_to_func() to silence warning</li>
-  <li>translate: use function typedefs, casts to silence warnings</li>
-  <li>translate: remove unused prototypes</li>
-  <li>mesa: additional glReadPixels error checks for GL_EXT_texture_integer</li>
-  <li>mesa: additional switch cases for GL_EXT_texture_integer</li>
-  <li>mesa: additional teximage error checks for GL_EXT_texture_integer</li>
-  <li>mesa: do integer FB / shader validation check in _mesa_valid_to_render()</li>
-  <li>mesa: call _mesa_valid_to_render() in glDrawPixels, glCopyPixels, glBitmap</li>
-  <li>mesa: remove the unused _mesa_is_fragment_shader_active() function</li>
-  <li>mesa: fix bug in _mesa_is_format_integer()</li>
-  <li>mesa: rename function to _mesa_is_format_integer_color()</li>
-  <li>mesa: remove 'normalized' parameter from _mesa_VertexAttribIPointer()</li>
-  <li>vbo: re-indent file</li>
-  <li>glapi: xml spec file for GL_EXT_gpu_shader4</li>
-  <li>glapi: include EXT_gpu_shader4.xml</li>
-  <li>glapi: regenerated API files</li>
-  <li>mesa: plug in stubs for glBindFragDataLocation(), glGetFragDataLocation()</li>
-  <li>mesa: add glGetUniformuiv(), plug in uint glUniform funcs</li>
-  <li>mesa: plug in more GL_EXT_gpu_shader4 functions</li>
-  <li>mesa: add new GLvertexformat entries for integer-valued attributes</li>
-  <li>mesa: implement integer-valued vertex attribute functions</li>
-  <li>mesa: add gl_client_array::Integer field and related vertex array state code</li>
-  <li>mesa: consolidate glVertex/Color/etcPointer() code</li>
-  <li>mesa: state/queries for GL_MIN/MAX_PROGRAM_TEXEL_OFFSET_EXT</li>
-  <li>mesa: glArrayElement support for integer-valued arrays</li>
-  <li>mesa: clean-up array element code</li>
-  <li>mesa: add extension table entry for GL_EXT_gpu_shader4</li>
-  <li>mesa: remove obsolete comment</li>
-  <li>mesa: fix incorrect type in _mesa_texstore_rgba_int16()</li>
-  <li>mesa: fix integer cases in _mesa_is_legal_format_and_type()</li>
-  <li>mesa: add const qualifier to _mesa_is_legal_format_and_type()</li>
-  <li>mesa: additional integer formats in _mesa_bytes_per_pixel()</li>
-  <li>mesa: pixel transfer ops do not apply to integer-valued textures</li>
-  <li>mesa: remove dead code</li>
-  <li>osmesa: fix renderbuffer memleak in OSMesaMakeCurrent()</li>
-  <li>mesa: use GLubyte for edge flag arrays</li>
-  <li>mesa: move the gl_config struct declaration</li>
-  <li>dri/util: add a bunch of comments</li>
-  <li>mesa: remove always-false conditional in check_compatible()</li>
-  <li>mesa: fix aux/accum comment and error message mixups</li>
-  <li>llvmpipe: assign context's frag shader pointer before using it</li>
-  <li>llvmpipe: add a cast</li>
-  <li>mesa: silence new warnings in texobj.c</li>
-  <li>egl/gdi: fix typo: xsurf-&gt;gsurf</li>
-  <li>mesa: code to unpack RGBA as uints</li>
-  <li>gallivm: implement scatter stores into temp register file</li>
-  <li>gallivm: add some LLVM var labels</li>
-  <li>gallivm: added debug code to dump temp registers</li>
-  <li>gallivm: add pixel offsets in scatter stores</li>
-  <li>gallivm: added lp_elem_type()</li>
-  <li>gallivm: implement execution mask for scatter stores</li>
-  <li>tgsi: remove unused function</li>
-  <li>llvmpipe: added some debug assertions, but disabled</li>
-  <li>gallivm: alloca() was called too often for temporary arrays</li>
-  <li>gallivm: add const qualifiers, fix comment string</li>
-  <li>softpipe: disable vertex texturing with draw/llvm</li>
-  <li>mesa: consolidate pixel packing/unpacking code</li>
-  <li>mesa: rename vars in pixel pack/unpack code</li>
-  <li>mesa: implement uint texstore code</li>
-  <li>mesa: remove stray GL_FLOAT case in _mesa_is_legal_format_and_type()</li>
-  <li>mesa: make fixed-pt and byte-valued arrays a runtime feature</li>
-  <li>softpipe: can't no-op depth test stage when occlusion query is enabled</li>
-  <li>mesa: no-op glBufferSubData() on size==0</li>
-  <li>mesa: #include mfeatures.h in enums.h</li>
-  <li>mesa: improve error message</li>
-  <li>mesa: add missing formats in _mesa_format_to_type_and_comps()</li>
-  <li>mesa: handle more pixel types in mipmap generation code</li>
-  <li>mesa: make glIsBuffer() return false for never bound buffers</li>
-  <li>mesa: fix glDeleteBuffers() regression</li>
-  <li>tdfx: s/Format/_BaseFormat/</li>
-  <li>mesa: consolidate assertions in teximage code</li>
-  <li>radeon: set gl_texture_image::TexFormat field in radeonSetTexBuffer2()</li>
-  <li>r600: set gl_texture_image::TexFormat field in r600SetTexBuffer2()</li>
-  <li>r200: set gl_texture_image::TexFormat field in r200SetTexBuffer2()</li>
-  <li>r300: set gl_texture_image::TexFormat field in r300SetTexBuffer2()</li>
-  <li>evergreen: set gl_texture_image::TexFormat field in evergreenSetTexBuffer()</li>
-  <li>st/mesa: fix glDrawPixels(depth/stencil) bugs</li>
-  <li>glsl: fix assorted MSVC warnings</li>
-  <li>mesa: add more work-arounds for acoshf(), asinhf(), atahf()</li>
-  <li>glsl: remove opt_constant_expression.cpp from SConscript</li>
-  <li>mesa: fix error messages and minor reindenting</li>
-  <li>mesa: whitespace cleanups</li>
-  <li>mesa: 80-column wrapping</li>
-  <li>mesa: reorder texture_error_check() params</li>
-  <li>mesa: minor clean-ups in context code</li>
-  <li>mesa: upgrade to glext.h version 66</li>
-  <li>mesa: pass gl_format to _mesa_init_teximage_fields()</li>
-  <li>mesa: fix error msg typo</li>
-  <li>glapi: rename GL3.xml to GL3x.xml as it covers all GL 3.x versions</li>
-  <li>mesa: hook up GL 3.x entrypoints</li>
-  <li>docs: update some GL 3.0 status</li>
-  <li>mesa: fix get_texture_dimensions() for texture array targets</li>
-  <li>swrast: init alpha value to 1.0 in opt_sample_rgb_2d()</li>
-  <li>glsl: fix off by one in register index assertion</li>
-  <li>glsl: use gl_register_file in a few places</li>
-  <li>mesa: rename, make _mesa_register_file_name() non-static</li>
-  <li>mesa: _mesa_valid_register_index() to validate register indexes</li>
-  <li>mesa: replace #defines with new gl_shader_type enum</li>
-  <li>mesa: use gl_shader_type enum</li>
-  <li>glsl: better handling of linker failures</li>
-  <li>glsl: start restoring some geometry shader code</li>
-  <li>mesa: add assertion and update comment in _mesa_format_image_size()</li>
-  <li>mesa: added _mesa_format_image_size64()</li>
-  <li>x11: remove test_proxy_teximage() function</li>
-  <li>st/mesa: fix mapping of zero-sized buffer objects</li>
-  <li>gallivm/llvmpipe: squash merge of the llvm-context branch</li>
-  <li>mesa: raise max texture sizes to 16K</li>
-  <li>softpipe: increase max texture size to 16K</li>
-  <li>mesa: replace large/MAX_WIDTH stack allocations with heap allocations</li>
-  <li>mesa: replace large/MAX_WIDTH stack allocations with heap allocations</li>
-  <li>swrast: avoid large stack allocations in blend code</li>
-  <li>swrast: avoid large stack allocations in tex combine code</li>
-  <li>st/mesa: avoid large stack allocations in readpixels code</li>
-  <li>mesa: replace more MAX_WIDTH stack allocations with heap allocations</li>
-  <li>gallivm/llvmpipe: remove lp_build_context::builder</li>
-  <li>gallivm: fix null builder pointers</li>
-  <li>mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query</li>
-  <li>mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type</li>
-  <li>llvmpipe: fix broken stencil writemask</li>
-  <li>mesa: consolidate some compiler -D flags</li>
-  <li>swrast: allow GL_RG format in glDrawPixels()</li>
-  <li>swrast: fix indentation</li>
-  <li>swrast: accept GL_RG in glReadPixels()</li>
-  <li>swrast: restructure some glReadPixels() code</li>
-  <li>mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM</li>
-  <li>mesa: remove unneeded cast</li>
-  <li>mesa: update comments, remove dead code</li>
-  <li>st/mesa: new comment about updating state vars</li>
-  <li>mesa: add error margin to clip mask debug/check code</li>
-  <li>gallium/util: minor formatting fixes</li>
-  <li>mesa/llvm: use llvm-config --cppflags</li>
-  <li>st/mesa: fix mipmap generation bug</li>
-  <li>mesa: test for cube map completeness in glGenerateMipmap()</li>
-  <li>mesa: set gl_texture_object::_Complete=FALSE in incomplete()</li>
-  <li>mesa: consolidate glTexImage1/2/3D() code</li>
-  <li>mesa: simplify proxy texture code in texture_error_check()</li>
-  <li>mesa: consolidate the glTexSubImage1/2/3D() functions</li>
-  <li>mesa: consolidate glCopyTexImage1/2D() code</li>
-  <li>mesa: consolidate glCopyTexSubImage1/2/3D() functions</li>
-  <li>mesa: consolidate glCompressedTexImage1/2/3D() functions</li>
-  <li>mesa: make _mesa_test_proxy_teximage() easier to read</li>
-  <li>configure: use llvm-config --cppflags instead of --cflags</li>
-  <li>mesa: revamp error checking for compressed texture images</li>
-  <li>mesa: simplify target checking for TexImage functions</li>
-  <li>draw/llvm: don't flush in vs_llvm_delete()</li>
-  <li>tnl: Initialize gl_program_machine memory in run_vp.</li>
-  <li>tnl: a better way to initialize the gl_program_machine memory</li>
-  <li>mesa, st/mesa: disable GL_ARB_geometry_shader4</li>
-  <li>mesa/meta: fix broken assertion, rename stack depth var</li>
-  <li>glsl: new glsl_strtod() wrapper to fix decimal point interpretation</li>
-  <li>st/mesa: fix renderbuffer pointer check in st_Clear()</li>
-</ul></p>
-
-<p>Brian Rogers (1):
-<ul>
-  <li>mesa: Add missing else in do_row_3D</li>
-</ul></p>
-
-<p>Chad Versace (25):
-<ul>
-  <li>intel_extensions: Add ability to set GLSL version via environment</li>
-  <li>glsl: Add glsl_type::uvecN_type for N=2,3</li>
-  <li>glsl: Add lexer rules for uint and uvecN (N=2..4)</li>
-  <li>glsl: Changes in generated file glsl_lexer.cpp</li>
-  <li>glsl: Add lexer rules for &lt&lt and &gt;&gt; in GLSL 1.30</li>
-  <li>glsl: Change generated file glsl_lexer.cpp</li>
-  <li>glsl: Implement ast-to-hir for binary shifts in GLSL 1.30</li>
-  <li>glsl: Implement constant expr evaluation for bitwise-not</li>
-  <li>glsl: Implement constant expr evaluation for bit-shift ops</li>
-  <li>glsl: Implement constant expr evaluation for bitwise logic ops</li>
-  <li>glsl: Fix ir validation for bit logic ops</li>
-  <li>glsl: Define shift_result_type() in ast_to_hir.cpp</li>
-  <li>glsl: Implement ast-to-hir for bit-shift-assignment</li>
-  <li>glsl: Define bit_logic_result_type() in ast_to_hir.cpp</li>
-  <li>glsl: Implement ast-to-hir for bit-logic ops</li>
-  <li>glsl: Fix lexer rule for ^=</li>
-  <li>glsl: Commit generated file glsl_lexer.cpp</li>
-  <li>glsl: Fix ast-to-hir for ARB_fragment_coord_conventions</li>
-  <li>mesa: Fix C++ includes in sampler.cpp</li>
-  <li>glsl: Fix ir_expression::constant_expression_value()</li>
-  <li>glsl: Fix erroneous cast in ast_jump_statement::hir()</li>
-  <li>glsl: Fix Doxygen tag file in recently renamed files</li>
-  <li>glsl: Improve usage message for glsl_compiler</li>
-  <li>glsl: Fix linker bug in cross_validate_globals()</li>
-  <li>glsl: In ast_to_hir, check sampler array indexing</li>
-</ul></p>
-
-<p>Chia-I Wu (149):
-<ul>
-  <li>glapi: Fix build errors for ES.</li>
-  <li>glapi: Fix ES build errors again.</li>
-  <li>mesa: Update ES APIspec.xml.</li>
-  <li>st/xlib: Notify the context when the front/back buffers are swapped.</li>
-  <li>targets/egl: Use C++ compiler to link GL/ES state trackers.</li>
-  <li>libgl-xlib: Remove unused st_api_create_OpenGL.</li>
-  <li>st/egl: Split modeset code support to modeset.c.</li>
-  <li>st/egl: Rename kms backend to drm.</li>
-  <li>st/egl: s/kms/drm/ on the drm backend.</li>
-  <li>egl: Enable drm platform by default.</li>
-  <li>egl: Check extensions.</li>
-  <li>st/egl: Skip single-buffered configs in EGL.</li>
-  <li>mapi: Fix compiler warnings.</li>
-  <li>st/egl: Drop context argument from egl_g3d_get_egl_image.</li>
-  <li>targets/egl: Fix linking with libdrm.</li>
-  <li>st/vega: Fix version check in context creation.</li>
-  <li>egl: Use attribute names as the _EGLConfig member names.</li>
-  <li>egl: Access config attributes directly.</li>
-  <li>st/egl: Access _EGLConfig directly.</li>
-  <li>st/egl: Do not finish a fence that is NULL.</li>
-  <li>mesa: Remove unused vtxfmt_tmp.h.</li>
-  <li>egl_dri2: Drop the use of _egl[SG]etConfigKey.</li>
-  <li>egl_glx: Drop the use of [SG]ET_CONFIG_ATTRIB.</li>
-  <li>egl_glx: Fix borken driver.</li>
-  <li>egl: Move attributes in _EGLImage to _EGLImageAttribs.</li>
-  <li>egl: Parse image attributes with _eglParseImageAttribList.</li>
-  <li>egl: Move fallback routines to eglfallbacks.c.</li>
-  <li>egl: Drop dpy argument from the link functions.</li>
-  <li>egl: Minor changes to the _EGLConfig interface.</li>
-  <li>egl: Minor changes to the _EGLScreen interface.</li>
-  <li>egl: Fix _eglModeLookup.</li>
-  <li>st/egl: Fix native_mode refresh mode.</li>
-  <li>egl: Add reference count for resources.</li>
-  <li>egl: Use reference counting to replace IsLinked or IsBound.</li>
-  <li>egl: Fix a false negative check in _eglCheckMakeCurrent.</li>
-  <li>st/egl: Use resource reference count for egl_g3d_sync.</li>
-  <li>egl_dri2: Fix a typo that make glFlush be called at wrong time.</li>
-  <li>glapi: Do not use glapidispatch.h.</li>
-  <li>glapi: Move glapidispatch.h to core mesa.</li>
-  <li>glapi: Do not use glapioffsets.h.</li>
-  <li>glapi: Merge glapioffsets.h into glapidispath.h.</li>
-  <li>vbo: Use CALL_* macros.</li>
-  <li>mesa: Remove unnecessary glapitable.h includes.</li>
-  <li>autoconf: Better client API selection.</li>
-  <li>docs: Update egl and openvg docs.</li>
-  <li>autoconf: Update configuration info.</li>
-  <li>Merge branch 'glapi-reorg'</li>
-  <li>targets: Add missing quotes to Makefile.xorg.</li>
-  <li>autoconf: st/vega requires --enable-openvg.</li>
-  <li>st/mesa: Unreference the sampler view in st_bind_surface.</li>
-  <li>autoconf: Tidy configure output for EGL.</li>
-  <li>targets/egl: Fix a warning with --disable-opengl build.</li>
-  <li>egl: Rework _eglGetSearchPath.</li>
-  <li>mesa: Select FEATURE_remap_table when multiple APIs are enabled.</li>
-  <li>mesa: Allow contexts of different APIs to coexist.</li>
-  <li>egl: Set up the pthread key even TLS is used.</li>
-  <li>st/egl: Add native_surface::present callback.</li>
-  <li>st/egl: Use native_surface::present callback.</li>
-  <li>d3d1x: Use native_surface::present.</li>
-  <li>st/egl: Remove flush_frontbuffer and swap_buffers.</li>
-  <li>st/egl: Add support for swap interval and swap behavior.</li>
-  <li>st/egl: Add support for EGL_MATCH_NATIVE_PIXMAP.</li>
-  <li>st/egl: Add extern "C" wrapper to native.h.</li>
-  <li>st/egl: Add native_display_buffer interface.</li>
-  <li>st/egl: Use native_display_buffer for EGL_MESA_drm_image.</li>
-  <li>autoconf: Add --enable-gallium-egl.</li>
-  <li>docs: Update egl docs.</li>
-  <li>st/dri: Add support for surfaceless current contexts.</li>
-  <li>egl_dri2: Fix __DRI_DRI2 version 1 support.</li>
-  <li>st/vega: Do not wait NULL fences.</li>
-  <li>gallium: Add st_api::name.</li>
-  <li>gallium: Add st_context_iface::share to st_api.</li>
-  <li>st/wgl: Use st_context_iface::share for DrvShareLists.</li>
-  <li>st/glx: Replace MESA_VERSION_STRING by xmesa_get_name.</li>
-  <li>mesa: Clean up core.h.</li>
-  <li>scons: Define IN_DRI_DRIVER.</li>
-  <li>tgsi: Add STENCIL to text parser.</li>
-  <li>st/vega: vegaLookupSingle should validate the state.</li>
-  <li>st/vega: Set wrap_r for mask and blend samplers.</li>
-  <li>st/vega: Fix vgReadPixels with a subrectangle.</li>
-  <li>egl_dri2: Fix one context, multiple surfaces.</li>
-  <li>auxiliary: util_blit_pixels_tex should restore the viewport.</li>
-  <li>st/vega: Fix a crash with empty paths.</li>
-  <li>st/vega: Masks and surfaces should share orientation.</li>
-  <li>st/vega: No flipping in vg_prepare_blend_surface.</li>
-  <li>st/vega: Fix a typo in EXTENDED_BLENDER_OVER_FUNC.</li>
-  <li>llvmpipe: Fix build errors on x86.</li>
-  <li>st/vega: Overhaul renderer with renderer states.</li>
-  <li>st/vega: Add DRAWTEX renderer state.</li>
-  <li>st/vega: Add SCISSOR renderer state.</li>
-  <li>st/vega: Add CLEAR renderer state for vgClear.</li>
-  <li>st/vega: Add FILTER renderer state for image filtering.</li>
-  <li>st/vega: Use the renderer for vgMask.</li>
-  <li>st/vega: Add POLYGON_STENCIL and POLYGON_FILL renderer state.</li>
-  <li>st/vega: Delay fb state update to vg_validate_state.</li>
-  <li>st/vega: Use st_framebuffer for fb width/height.</li>
-  <li>st/vega: Move g3d states to renderer.</li>
-  <li>st/vega: Make shader_bind call into the renderer.</li>
-  <li>st/vega: vg_manager should care about only the color buffer.</li>
-  <li>st/vega: Clean up vg_context fields and functions.</li>
-  <li>st/vega: Clean up renderer fields and functions.</li>
-  <li>st/vega: vg_copy_texture and vg_copy_surface should share code.</li>
-  <li>st/vega: Get rid of renderer_copy_texture.</li>
-  <li>st/vega: Update to latest headers.</li>
-  <li>st/vega: Fix image sampler views for alpha-only formats.</li>
-  <li>st/vega: Make path_render and path_stroke take a matrix.</li>
-  <li>st/vega: Make image_draw take a matrix.</li>
-  <li>st/vega: Add primitive text support.</li>
-  <li>st/vega: Revive mask layer support.</li>
-  <li>st/vega: More flexible shader selection.</li>
-  <li>st/vega: Add color transformation support.</li>
-  <li>st/vega: Bump version to 1.1.</li>
-  <li>st/vega: Fix paint coordinates transformations.</li>
-  <li>st/vega: Fix negated logic in image_draw.</li>
-  <li>st/vega: Fix degenerate paints.</li>
-  <li>st/vega: Simplify radial gradient.</li>
-  <li>st/vega: Remove st_inlines.h.</li>
-  <li>st/vega: Delay blend texture creation until needed.</li>
-  <li>st/vega: Create drawing surface mask as needed.</li>
-  <li>st/vega: Initialize pipe states with renderer.</li>
-  <li>st/vega: Avoid unnecessary constant bufer upload.</li>
-  <li>st/vega: Destroy the pipe context with vg_context.</li>
-  <li>st/vega: polygon_array requires a deep free.</li>
-  <li>st/egl: Set pipe_resource::array_size to 1.</li>
-  <li>st/vega: Set pipe_resource::array_size to 1.</li>
-  <li>st/vega: Move vertex transformation to shader.</li>
-  <li>st/vega: Add a missing break.</li>
-  <li>st/vega: Add some comments to pipeline shaders.</li>
-  <li>st/vega: Refactor blend shaders.</li>
-  <li>st/vega: Move masking after blending.</li>
-  <li>st/vega: Add support for per-channel alpha.</li>
-  <li>st/vega: Blending should use premultiplied alpha.</li>
-  <li>st/vega: Fix VG_BLEND_MULTIPLY.</li>
-  <li>st/vega: Add blend shaders for all blend modes.</li>
-  <li>st/vega: Fix pipe blend state for various blend modes.</li>
-  <li>egl: _eglFilterArray should not allocate.</li>
-  <li>mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.</li>
-  <li>vbo: Drop second ATTR macro.</li>
-  <li>vbo: Fix GLES2 glVertexAttrib.</li>
-  <li>mesa: Do not advertise GL_OES_texture_3D.</li>
-  <li>mesa: Fix GL_FIXED arrays.</li>
-  <li>mesa: Fix glTexCoordPointer with type GL_FIXED.</li>
-  <li>st/egl: Plug pbuffer leaks.</li>
-  <li>st/egl: Fix eglCopyBuffers.</li>
-  <li>st/egl: Assorted fixes for dri2_display_get_configs.</li>
-  <li>docs/egl: Update egl.html.</li>
-  <li>st/egl: Fix eglChooseConfig when configs is NULL.</li>
-  <li>docs: Add an example for EGL_DRIVERS_PATH.</li>
-  <li>autoconf: Fix --with-driver=xlib --enable-openvg.</li>
-</ul></p>
-
-<p>Chris Wilson (2):
-<ul>
-  <li>i915g: Fix closure of full batch buffers</li>
-  <li>intel: Check for unsupported texture when finishing using as a render target</li>
-</ul></p>
-
-<p>Christoph Bumiller (80):
-<ul>
-  <li>nv50: import new compiler</li>
-  <li>nouveau: update nouveau_class.h</li>
-  <li>nv50: introduce the big formats table</li>
-  <li>nv50: don't produce MOV immediate to output reg in store opt</li>
-  <li>nv50: change back accidentally swapped UNORM,SNORM vertex type</li>
-  <li>nv50: add/fix some license headers</li>
-  <li>nv50: simple reload elimination and local CSE</li>
-  <li>nv50: fix constant_operand opt mul by 2 case</li>
-  <li>nv50: permit usage of undefined TGSI TEMPs</li>
-  <li>nv50: add missing 2nd source for POW multiplication</li>
-  <li>nv50: add signed RGTC1 to format table, allow 2_10_10_10 for vbufs</li>
-  <li>nv50: fix for empty BBs</li>
-  <li>nv50: insert MOVs also for PHI sources from dominating block</li>
-  <li>nv50: explicitly set src type for SET ops</li>
-  <li>nv50: fixes for nested IFs</li>
-  <li>nv50: don't eliminate loads to dedicated values</li>
-  <li>nv50: fix constbuf validation</li>
-  <li>nv50: build proper phi functions in the first place</li>
-  <li>nv50: fix reg count</li>
-  <li>nv50: begin implementing loops</li>
-  <li>nv50: more constant folding</li>
-  <li>nv50: loops part 2</li>
-  <li>nv50: flatten simple IF/ELSE/ENDIF constructs</li>
-  <li>nv50: fix thinko in store to output reg possible check</li>
-  <li>nv50: generate JOINs for outermost IF clauses</li>
-  <li>nv50: more TGSI opcodes (SIN, SCS, ARL, RET, KILP)</li>
-  <li>nv50: fix PSIZ and PRIMID mapping</li>
-  <li>nv50: check dst compatibility in CSE</li>
-  <li>nv50: initialize edgeflag input index</li>
-  <li>nv50: emit predicate for interp</li>
-  <li>Merge remote branch 'origin/master' into nv50-compiler</li>
-  <li>nv50: DP2, fix ARL</li>
-  <li>nv50: yet another case we need a nop.exit</li>
-  <li>nv50: fix check for sprite/point coord enable</li>
-  <li>nv50: handle TEXTURE_SWIZZLE and GEOMETRY_SHADER4 caps</li>
-  <li>nv50: set the FragDepth output index</li>
-  <li>nv50: turn off verbose debug output by default</li>
-  <li>nv50: attempt at making more complicated loops work</li>
-  <li>nv50: SSG</li>
-  <li>nv50: make FrontFacing -1 or +1</li>
-  <li>nv50: re-add proper TEXBIAS sequence</li>
-  <li>nv50: make use of TGSI immediate type</li>
-  <li>nv50: must join SELECT inputs before MOV inputs</li>
-  <li>nv50: fix XPD, was negated</li>
-  <li>nv50: fix find_dom_frontier</li>
-  <li>nv50: fix build-predicate function</li>
-  <li>Merge remote branch 'origin/master' into nv50-compiler</li>
-  <li>nv50: load address register before using it, not after</li>
-  <li>nv50: save tgsi instructions</li>
-  <li>nv50: prepare for having multiple functions</li>
-  <li>nv50: don't parse again in tgsi_2_nc</li>
-  <li>nv50: use actual loads/stores if TEMPs are accessed indirectly</li>
-  <li>nv50: create value references with the right type</li>
-  <li>nv50: duplicate interps in load_proj_tex_coords</li>
-  <li>nv50: address regs are 16 bit</li>
-  <li>nv50: fix can_load check for 3rd source</li>
-  <li>nv50: reduce bb_reachable_by runtime from pot to linear</li>
-  <li>nv50: minor compiler fixes and cleanups</li>
-  <li>nv50: cannot move from local mem to output reg directly</li>
-  <li>nv50: newlines in shader bincode printing</li>
-  <li>nv50: match TEMP limit with nv50 ir builder</li>
-  <li>nv50: handle TGSI EXP and LOG again</li>
-  <li>nv50: check for immediates when turning MUL ADD into MAD</li>
-  <li>nv50: interp cannot write flags reg</li>
-  <li>nv50: MOV TEMP[0], -CONST[0] must be float32 negation</li>
-  <li>nv50: fix indirect CONST access with large or negative offsets</li>
-  <li>nv50: fix TXP depth comparison value</li>
-  <li>nv50: consider address register in reload elimination</li>
-  <li>nv50: improve and fix modifier folding optimization</li>
-  <li>nv50: put low limit on REG_ALLOC_TEMP and FP_RESULT_COUNT</li>
-  <li>Merge remote branch 'origin/nv50-compiler'</li>
-  <li>nv50: don't segfault on shaders with 0 instructions</li>
-  <li>nv50: get shader fixups/relocations into working state</li>
-  <li>nv50: add relocs for stack and local mem buffers</li>
-  <li>nv50: emit constbuf relocs before uploading constants</li>
-  <li>nv50: fix typo in fifo packet length limit</li>
-  <li>nv50: use formats table in nv50_surface.c</li>
-  <li>nv50: use CLEAR_BUFFERS for surface fills</li>
-  <li>nv50: fix/handle a few more PIPE_CAPs</li>
-  <li>nv50: fix GP state bind and validate</li>
-</ul></p>
-
-<p>Corbin Simpson (8):
-<ul>
-  <li>r600g: Use align() instead of handrolled code.</li>
-  <li>r600g: Trivially deobfuscate r600_hw_states.</li>
-  <li>r600g: Deobfuscate and comment a few more functions in r600_hw_states.</li>
-  <li>r600g: Clean up some indentation and |= vs. | usage.</li>
-  <li>r600g: Fix false and true.</li>
-  <li>r600g: "tmp" is such a bad name for a texture.</li>
-  <li>r600g: Clean up PS setup.</li>
-  <li>r600g: Cleanup viewport floats.</li>
-</ul></p>
-
-<p>Daniel Lichtenberger (1):
-<ul>
-  <li>radeon: fix potential segfault in renderbuffer update</li>
-</ul></p>
-
-<p>Daniel Vetter (21):
-<ul>
-  <li>r200: revalidate after radeon_update_renderbuffers</li>
-  <li>i915g: rip out -&gt;sw_tiled</li>
-  <li>i915g: s/hw_tiled/tiling</li>
-  <li>i915g: add pineview pci ids</li>
-  <li>i915g: kill RGBA/X formats</li>
-  <li>i915g: kill buf-&gt;map_gtt</li>
-  <li>i915g: kill idws-&gt;pool</li>
-  <li>i915g: drop alignment parameter from iws-&gt;buffer_create</li>
-  <li>i915g: add winsys function to create tiled buffers</li>
-  <li>i915g: switch to tiled allocations, kill set_fence</li>
-  <li>i915g: prepare winsys/batchbuffer for execbuf2</li>
-  <li>i915g: return tiling in iws-&gt;buffer_from_handle</li>
-  <li>i915g: implement unfenced color&amp;depth buffer using tiling bits</li>
-  <li>i915g: implement unfenced relocs for textures using tiling bits</li>
-  <li>i915g: postpone mipmap/face offset calculation</li>
-  <li>i915g: don't pot-align stride for tiled buffers</li>
-  <li>i915g: enable X-tiling for textures</li>
-  <li>i915g: switch rendering to mipmapped textures to (x,y) offsets</li>
-  <li>i915g: enable x-tiling for render targets</li>
-  <li>i915g: assert(depth_surface-&gt;offset == 0)</li>
-  <li>i915g: track TODO items</li>
-</ul></p>
-
-<p>Dave Airlie (182):
-<ul>
-  <li>r300g: fix buffer reuse issue caused by previous commit</li>
-  <li>r600g: pull r600_draw struct out into header</li>
-  <li>r600g: use index min/max + index buffer offset.</li>
-  <li>r600g: add vgt dma src defines</li>
-  <li>r600g: fixup texture state on evergreen.</li>
-  <li>r600g: fix texture bos and avoid doing depth blit on evergreen</li>
-  <li>r600g: hide radeon_ctx inside winsys.</li>
-  <li>r600g: attempt to abstract kernel bos from pipe driver.</li>
-  <li>r600g: move constant buffer creation behind winsys abstraction.</li>
-  <li>r600g: use malloc bufmgr for constant buffers</li>
-  <li>r600g: add support for kernel bo</li>
-  <li>r600g: add winsys bo caching.</li>
-  <li>r600g: add upload manager support.</li>
-  <li>r600g: fixup map flushing.</li>
-  <li>r600g: use calloc for ctx bo allocations</li>
-  <li>r600g: oops got the use_mem_constant the wrong way around.</li>
-  <li>r600g; add uses waterfall to asm cf for r6xx.</li>
-  <li>r600g: only emit uses waterfall on r6xx hw.</li>
-  <li>util/r300g: split the r300 index buffer modifier functions out to util</li>
-  <li>r600g: modify index buffers for sizes the hw can't deal with.</li>
-  <li>r600g: send correct surface base update for multi-cbufs</li>
-  <li>r600g: fix fbo-drawbuffers-maxtargets</li>
-  <li>r600g: clean up valgrind issues on maxtargets test.</li>
-  <li>r600g: drop debugging that snuck in</li>
-  <li>r600g: fix tiling support for ddx supplied buffers</li>
-  <li>r600g: add z16 to color setup</li>
-  <li>r600g: add color/texture support for more depth formats.</li>
-  <li>r600g: fix r700 cube map sizing.</li>
-  <li>r600g: fixup r700 CB_SHADER_CONTROL register.</li>
-  <li>r600g: add missing BC_INST wrapper for evergreen</li>
-  <li>r600g: only flush for the correct colorbuffer, not all of them.</li>
-  <li>r600g: deal with overflow of VTX/TEX CF clauses.</li>
-  <li>r600g: set back to correct codepaths.</li>
-  <li>r600g: fixup evergreen miptree setup.</li>
-  <li>r600g: fix eg texture borders.</li>
-  <li>r600g: fix typo in struct member name</li>
-  <li>r600g: cleanup some of the DB blit code</li>
-  <li>r600g: make stencil readback work</li>
-  <li>r600g: disable dirty handling on texture from depth code.</li>
-  <li>r600g: use floats instead of hex for blit vbo</li>
-  <li>r600g: fix depth readback on rv610 and other quirky variants.</li>
-  <li>r600g: fix typo in evergreen register list</li>
-  <li>u_blitter: add a custom blitter call passing a dsa cso</li>
-  <li>r600g: use blitter to do db-&gt;cb flushing.</li>
-  <li>r600g: fix warnings since last commit.</li>
-  <li>egl: fix build since 17eace581d25a626a7d75d9d1205d012cbb14a6e</li>
-  <li>r300g: fix point sprite coord.</li>
-  <li>r600g: add vert support for 16/16 and 16/16/16 floats.</li>
-  <li>r600g: add some more vertex format support.</li>
-  <li>r600g: some more vertex formats</li>
-  <li>r600g: fix draw-elements and draw-elements-base-vertex</li>
-  <li>r600g: drop index_offset parameter to index buffer translate.</li>
-  <li>r600g: fixup tex wrapping.</li>
-  <li>r600g: fixup VP-&gt;FP output-&gt;input routing.</li>
-  <li>r600g: fix typo in r700 alu emit</li>
-  <li>r600g: fixup sprite coord enable.</li>
-  <li>r600g: fix polygon mode</li>
-  <li>mesa/mipmap: fix warning since 1acadebd6270d3604b026842b8a21360968618a0</li>
-  <li>r600g: add eg poly mode code.</li>
-  <li>r600g: make index bias fix for evergreen</li>
-  <li>r600g: add eg db count control register.</li>
-  <li>r300g: fix glsl-fs-pointcoord</li>
-  <li>r600g: add evergreen texture resource properly.</li>
-  <li>r600g: fix db flush breaking config state</li>
-  <li>r600g: on evergreen the centroid isn't set in this register.</li>
-  <li>r600g: add back evergreen name.</li>
-  <li>r600g: add evergreen texture border support to new path</li>
-  <li>r600g: move radeon.h members around to add back map flushing.</li>
-  <li>r600g: add initial vertex translate support.</li>
-  <li>r600g: remove old assert from new codepath</li>
-  <li>Revert "r600g: add initial vertex translate support."</li>
-  <li>r600g: port r300g fix for X* formats in texformat code</li>
-  <li>r600g: add L8A8 unorm.</li>
-  <li>r600g: clean up some code from move to new paths.</li>
-  <li>r600g: return string for chip family</li>
-  <li>r600g: use Elements macro instead of manual sizeofs</li>
-  <li>r600g: fix evergreen depth flushing.</li>
-  <li>r600g: add winsys support for CTL constants.</li>
-  <li>r600g: drop depth quirk on evergreen</li>
-  <li>r600g: add reloc for evergreen color attrib</li>
-  <li>r600g: realign evergreen code with r600 code.</li>
-  <li>r600g: add assembler support for other vtx fetch fields.</li>
-  <li>r600g: fixup vertex format picking.</li>
-  <li>r600g: sync vertex/texture cache on resources on evergreen</li>
-  <li>r600g: add cb flushing for extra buffers + depth buffer on r600/evergreen</li>
-  <li>r600g: fix evergreen draw-buffers</li>
-  <li>r600g: flush SH cache on constant change on evergreen</li>
-  <li>r600g: only set the Z export if shader exports it.</li>
-  <li>r600g: setup basic loop consts on r600 + evergreen.</li>
-  <li>mesa/st: initial attempt at RG support for gallium drivers</li>
-  <li>r600g: break out of search for reloc bo after finding it.</li>
-  <li>r600g: the code to check whether a new vertex shader is needed was wrong</li>
-  <li>r600g: fix wwarning in bo_map function</li>
-  <li>r600g: TODO domain management</li>
-  <li>r600g: add bo fenced list.</li>
-  <li>pb: don't keep checking buffers after first busy</li>
-  <li>r600g: add bo busy backoff.</li>
-  <li>r600g: drop mman allocator</li>
-  <li>r600g: drop use_mem_constant.</li>
-  <li>r600g: avoid unneeded bo wait</li>
-  <li>pb: fix numDelayed accounting</li>
-  <li>r600g: add evergreen stencil support.</li>
-  <li>r600g: use format from the sampler view not from the texture.</li>
-  <li>r600g: fix Z export enable bits.</li>
-  <li>r600g: add some RG texture format support.</li>
-  <li>r600g: drop width/height per level storage.</li>
-  <li>r600g: fix input/output Z export mixup for evergreen.</li>
-  <li>r600g: evergreen has no request size bit in texture word4</li>
-  <li>r600g: enable vertex samplers.</li>
-  <li>r600g: add TXL opcode support.</li>
-  <li>r600g: don't run with scissors.</li>
-  <li>r600g: fix typo in vertex sampling on r600</li>
-  <li>gallium/tgsi: add support for stencil writes.</li>
-  <li>gallium/format: add support for X24S8 and S8X24 formats.</li>
-  <li>gallium/format: add X32_S8X24_USCALED format.</li>
-  <li>gallium/util: add S8 tile sampling support.</li>
-  <li>mesa: add support for FRAG_RESULT_STENCIL.</li>
-  <li>mesa: improve texstore for 8/24 formats and add texstore for S8.</li>
-  <li>softpipe: add support for shader stencil export capability</li>
-  <li>st/mesa: add option to choose a texture format that we won't render to.</li>
-  <li>st/mesa: use shader stencil export to accelerate shader drawpixels.</li>
-  <li>r600g: add support for S8, X24S8 and S8X24 sampler formats.</li>
-  <li>r600g: add shader stencil export support.</li>
-  <li>glsl: add support for shader stencil export</li>
-  <li>st/mesa: enable stencil shader export extension if supported</li>
-  <li>r600g: fix depth0 setting</li>
-  <li>r600g: fix scissor/cliprect confusion</li>
-  <li>r600g: store samplers/views across blit when we need to modify them</li>
-  <li>r600g: reduce size of context structure.</li>
-  <li>r600g: the vs/ps const arrays weren't actually being used.</li>
-  <li>r600g: add copy into tiled texture</li>
-  <li>r600g: split out miptree setup like r300g</li>
-  <li>r600g: use common texture object create function</li>
-  <li>r600g: rename pitch in texture to pitch_in_bytes</li>
-  <li>r600g: remove bpt and start using pitch_in_bytes/pixels.</li>
-  <li>r600g: fix transfer stride.</li>
-  <li>r600g: drop all use of unsigned long</li>
-  <li>r600g: use blitter for hw copy region</li>
-  <li>r600g: evergreen add stencil export bit</li>
-  <li>r600g: add missing eg reg definition</li>
-  <li>r600g: fix stencil export for evergreen harder</li>
-  <li>r600g: drop unused context members</li>
-  <li>r600g: only pick centroid coordinate when asked.</li>
-  <li>r600g: fixup pos/face ena/address properly</li>
-  <li>r600g: fixup typo in macro name</li>
-  <li>r600g: select linear interpolate if tgsi input requests it</li>
-  <li>r300g: clean up warning due to unknown cap.</li>
-  <li>tgsi: add scanner support for centroid inputs</li>
-  <li>r600g: evergreen interpolation support.</li>
-  <li>r600g: add evergreen ARL support.</li>
-  <li>r600g: switch to a common formats.h file since they are in different regs</li>
-  <li>r600g: add defines for tiling</li>
-  <li>r600g: get tiling info from kernel</li>
-  <li>r600g: set tiling bits in hw state</li>
-  <li>r600g: do proper tracking of views/samplers.</li>
-  <li>r600g: fix typo in tiling setup cb code.</li>
-  <li>r600g: depth needs to bound to ds</li>
-  <li>r600g: attempt to cleanup depth blit</li>
-  <li>r600g: fix transfer function for tiling.</li>
-  <li>r600g: retrieve tiling info from kernel for shared buffers.</li>
-  <li>r600g: all non-0 mipmap levels need to be w/h aligned to POT.</li>
-  <li>r600g: move to per-miplevel array mode.</li>
-  <li>r600g: start adding hooks for aligning width/height for tiles.</li>
-  <li>r600g: add r600 surface to store the aligned height.</li>
-  <li>r600g: introduce a per-driver resource flag for transfers.</li>
-  <li>r600g: add texture tiling alignment support.</li>
-  <li>r600g: add texture tiling enable under a debug option.</li>
-  <li>r600g: initial translate state support</li>
-  <li>r600g: start splitting out common code from eg/r600.</li>
-  <li>r600g: not fatal if we can't get tiling info from kernel</li>
-  <li>r600g: merge more of the common r600/evergreen state handling</li>
-  <li>r600g: drop more common state handling code</li>
-  <li>r600g: fix magic 0x1 -&gt;flat shade ena</li>
-  <li>r600g: add assembler support for all the kcache fields.</li>
-  <li>gallium/noop: report GL 2.1</li>
-  <li>r600g: pick correct color swap for A8 fbos.</li>
-  <li>r300g/r600g: bump cache manager timeouts to 1s</li>
-  <li>r600g: it looks like r600 can handle dword offsets in the indices.</li>
-  <li>r300g: try and use all of vertex constant space</li>
-  <li>r300g: fixup rs690 tiling stride alignment calculations.</li>
-  <li>r600g: fix evergreen segfaults.</li>
-  <li>r600g: hack around property unknown issues.</li>
-</ul></p>
-
-<p>Eric Anholt (300):
-<ul>
-  <li>glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.</li>
-  <li>i965: Share the KIL_NV implementation between glsl and non-glsl.</li>
-  <li>i965: Also enable CC statistics when doing OQs.</li>
-  <li>i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ</li>
-  <li>glsl: Rework assignments with write_masks to have LHS chan count match RHS.</li>
-  <li>glsl: Fix copy'n'wasted ir_noop_swizzle conditions.</li>
-  <li>ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal</li>
-  <li>i965: Fix the vector/expression splitting for the write_mask change.</li>
-  <li>i965: When splitting vector variable assignment, ignore unset channels.</li>
-  <li>i965: Update expression splitting for the vector-result change to compares.</li>
-  <li>i965: Warning fix for vector result any_nequal/all_equal change.</li>
-  <li>mesa: Remove the non-required ARB_imaging extension.</li>
-  <li>mesa: Remove EXT_histogram.</li>
-  <li>mesa: Remove SGI_color_table.</li>
-  <li>mesa: Remove SGI_color_matrix.</li>
-  <li>mesa: Remove EXT_convolution.</li>
-  <li>intel: Remove disabled stencil drawpixels acceleration.</li>
-  <li>intel: Remove unnecessary minimum pitch alignment to 32 bytes.</li>
-  <li>intel: Replace my intel_texture_bitmap code with _mesa_meta_Bitmap.</li>
-  <li>radeon: Remove copied minimum pitch alignment code.</li>
-  <li>unichrome: Mostly revert my convolution removal changes.</li>
-  <li>intel: Remove dead intelIsTextureResident().</li>
-  <li>i915: Remove a dead if (0) block.</li>
-  <li>intel: Dead comment removal.</li>
-  <li>intel: Corresponding FinishRenderTexture debug to BeginRenderTexture.</li>
-  <li>i965: Add support for rendering to SARGB8 FBOs.</li>
-  <li>intel: Fix segfault on INTEL_DEBUG=fbo with unsupported framebuffers.</li>
-  <li>intel: Add fallback debug to glGenerateMipmap.</li>
-  <li>intel: More reverting of the sw fallback for depth texture border color.</li>
-  <li>intel: Improve some of the miptree debugging.</li>
-  <li>mesa: Fix type typo in glGenerateMipmap handling of GL_UNSIGNED_INT data.</li>
-  <li>glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.</li>
-  <li>glsl: Add validation that a swizzle only references valid channels.</li>
-  <li>i965: Fix up writemasked assignments in the new FS.</li>
-  <li>i965: Remove swizzling of assignment to vector-splitting single-channel LHS.</li>
-  <li>i965: Handle all_equal/any_nequal in the new FS.</li>
-  <li>i965: Fix vector splitting RHS channel selection with sparse writemasks.</li>
-  <li>i965: Add support for dFdx()/dFdy() to the FS backend.</li>
-  <li>i965: Add support for attribute interpolation on Sandybridge.</li>
-  <li>i965: Set up inputs to the fragment shader according to FP InputsRead.</li>
-  <li>i965: Add support for POW in gen6 FS.</li>
-  <li>i965: Fix negation in the new FS backend.</li>
-  <li>i965: Actually track the "if" depth in loop in the new FS backend.</li>
-  <li>i965: Apply the same set of lowering passes to new FS as to Mesa IR.</li>
-  <li>i965: Fix valgrind complaint about base_ir for new FS debugging.</li>
-  <li>i965: Fix up the FS backend for the variable array indexing pass.</li>
-  <li>i965: Set the variable type when dereferencing an array.</li>
-  <li>i965: Add support for dereferencing structs to the new FS backend.</li>
-  <li>i965: Add support for struct, array, and matrix uniforms to FS backend.</li>
-  <li>i965: Fix all non-snb regression in the snb attribute interpolation commit.</li>
-  <li>i965: Fix up part of my Sandybridge attributes support patch.</li>
-  <li>i965: Add support for gl_FrontFacing to the new FS backend.</li>
-  <li>i965: Subtract instead of adding when computing y delta in new FS backend.</li>
-  <li>mesa: Pull ir_to_mesa's sampler number fetcher out to shared code.</li>
-  <li>i965: Set up sampler numbers in the FS backend.</li>
-  <li>i965: Add support for non-color render target write data to new FS backend.</li>
-  <li>i965: Add support for MRT to the new FS backend.</li>
-  <li>i965: Add support for ir_loop counters to the new FS backend.</li>
-  <li>i965: Add support for ARB_fragment_coord_conventions to the new FS backend.</li>
-  <li>glsl: Also update implicit sizes of varyings at link time.</li>
-  <li>i965: Do interpolation for varying matrices and arrays in the FS backend.</li>
-  <li>i965: Don't try to emit interpolation for unused varying slots.</li>
-  <li>i965: Fix array indexing of arrays of matrices.</li>
-  <li>i965: Clean up obsolete FINISHME comment.</li>
-  <li>mesa: Move the list of builtin uniform info from ir_to_mesa to shared code.</li>
-  <li>i965: Add support for builtin uniforms to the new FS backend.</li>
-  <li>i965: Fix use of undefined mem_ctx in vector splitting.</li>
-  <li>i956: Make new FS discard do its work in a temp, not the null reg!</li>
-  <li>i965: Clean up the virtual GRF handling.</li>
-  <li>ra: First cut at a graph-coloring register allocator for mesa.</li>
-  <li>i965: First cut at register allocation using graph coloring.</li>
-  <li>i965: Add live interval analysis and hook it up to the register allocator.</li>
-  <li>i965: Remove my "safety counter" code from loops.</li>
-  <li>i965: Fix whole-structure/array assignment in new FS.</li>
-  <li>mesa: Don't reference a W component in setting up a vec3 uniform component.</li>
-  <li>i965: Fix new FS handling of builtin uniforms with packed scalars in structs.</li>
-  <li>glsl: Add a lowering pass for texture projection.</li>
-  <li>i965: Use the lowering pass for texture projection.</li>
-  <li>i965: Split the gen4 and gen5 sampler handling apart.</li>
-  <li>i965: Add gen6 attribute interpolation to new FS backend.</li>
-  <li>i965: Fix the gen6 jump size for BREAK/CONT in new FS.</li>
-  <li>i965: Also increment attribute location when skipping unused slots.</li>
-  <li>i965: Pre-gen6, map VS outputs (not FS inputs) to URB setup in the new FS.</li>
-  <li>i965: Add real support for pre-gen5 texture sampling to the new FS.</li>
-  <li>i965: Fix up copy'n'pasteo from moving coordinate setup around for gen4.</li>
-  <li>i965: Restore the forcing of aligned pairs for delta_xy on chips with PLN.</li>
-  <li>i965: When producing a single channel swizzle, don't make a temporary.</li>
-  <li>i965: Add a sanity check for register allocation sizes.</li>
-  <li>i965: Fix off-by-ones in handling the last members of register classes.</li>
-  <li>i965: Don't try to emit code if we failed register allocation.</li>
-  <li>i965: Add support for EXT_texture_swizzle to the new FS backend.</li>
-  <li>i965: Set up swizzling of shadow compare results for GL_DEPTH_TEXTURE_MODE.</li>
-  <li>i965: Fix glean/texSwizzle regression in previous commit.</li>
-  <li>i965: Be more conservative on live interval calculation.</li>
-  <li>i965: Add trivial dead code elimination in the new FS backend.</li>
-  <li>i965: Add initial folding of constants into operand immediate slots.</li>
-  <li>i965: In disasm, gen6 fb writes don't put msg reg # in destreg_conditionalmod.</li>
-  <li>i965: Add support for gen6 FB writes to the new FS.</li>
-  <li>i965: Enable the constant propagation code.</li>
-  <li>i965: Also do constant propagation for the second operand of CMP.</li>
-  <li>i965: Add back gen6 headerless FB writes to the new FS backend.</li>
-  <li>i965: Gen6 no longer has the IFF instruction; always use IF.</li>
-  <li>i965: Fix up IF/ELSE/ENDIF for gen6.</li>
-  <li>i965: Fix botch in the header_present case in the new FS.</li>
-  <li>i965: Add some clarification of the WECtrl field.</li>
-  <li>i965: Don't do 1/w multiplication in new FS for gen6</li>
-  <li>i965: Gen6's sampler messages are the same as Ironlake.</li>
-  <li>i965: Refactor gl_FrontFacing setup out of general variable setup.</li>
-  <li>i965: Add support for gl_FrontFacing on gen6.</li>
-  <li>i965: Don't assume that WPOS is always provided on gen6 in the new FS.</li>
-  <li>i965: Fix gen6 pointsize handling to match pre-gen6.</li>
-  <li>i965: Disable emitting if () statements on gen6 until we really fix them.</li>
-  <li>i965: Normalize cubemap coordinates like is done in the Mesa IR path.</li>
-  <li>mesa: Simplify a bit of _mesa_add_state_reference using memcmp.</li>
-  <li>i965: Drop the check for duplicate _mesa_add_state_reference.</li>
-  <li>i965: Drop the check for YUV constants in the param list.</li>
-  <li>i965: Handle swizzles in the addition of YUV texture constants.</li>
-  <li>i965: Fix gen6 WM push constants updates.</li>
-  <li>i965: Fix new FS gen6 interpolation for sparsely-populated arrays.</li>
-  <li>i965: Enable attribute swizzling (repositioning) in the gen6 SF.</li>
-  <li>i965: Add register coalescing to the new FS backend.</li>
-  <li>i965: Split FS_OPCODE_DISCARD into two steps.</li>
-  <li>i965: Reduce register interference checks for changed FS_OPCODE_DISCARD.</li>
-  <li>i965: Move FS backend structures to a header.</li>
-  <li>i965: Give the math opcodes information on base mrf/mrf len.</li>
-  <li>i965: Give the FB write and texture opcodes the info on base MRF, like math.</li>
-  <li>i965: Compute to MRF in the new FS backend.</li>
-  <li>i965: Don't consider gen6 math instructions to write to MRFs.</li>
-  <li>i965: Add a couple of checks for gen6 math instruction limits.</li>
-  <li>i965: Don't compute-to-MRF in gen6 math instructions.</li>
-  <li>i965: Expand uniform args to gen6 math to full registers to get hstride == 1.</li>
-  <li>i965: Don't compute-to-MRF in gen6 VS math.</li>
-  <li>i965: Fix gen6 pixel_[xy] setup to avoid mixing int and float src operands.</li>
-  <li>i965: Always use the new FS backend on gen6.</li>
-  <li>i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.</li>
-  <li>intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.</li>
-  <li>i965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.</li>
-  <li>i965: Add support for rescaling GL_TEXTURE_RECTANGLE coords to new FS.</li>
-  <li>i965: Set class_sizes[] for the aligned reg pair class.</li>
-  <li>i965: Update the live interval when coalescing regs.</li>
-  <li>i965: Add a pass to the FS to split virtual GRFs to float channels.</li>
-  <li>i965: Add a function for handling the move of boolean values to flag regs.</li>
-  <li>i965: Add peepholing of conditional mod generation from expressions.</li>
-  <li>i965: Enable the new FS backend on pre-gen6 as well.</li>
-  <li>i965: Fix texturing on pre-gen5.</li>
-  <li>i965: Set the type of the null register to fix gen6 FS comparisons.</li>
-  <li>i965: Disable the debug printf I added for FS disasm.</li>
-  <li>i965: Fix a weirdness in NOT handling.</li>
-  <li>i965: Fix assertion failure on gen6 BufferSubData to busy BO.</li>
-  <li>i965: Assert out on gen6 VS constant buffer reads that hang the GPU for now.</li>
-  <li>i965: Fix scissor-offscreen on gen6 like we did pre-gen6.</li>
-  <li>i965: Avoid blits in BufferCopySubdata on gen6.</li>
-  <li>i965: Tell the shader compiler when we expect depth writes for gen6.</li>
-  <li>i965: Remove the gen6 emit_mi_flushes I sprinkled around the driver.</li>
-  <li>i965: Disable thread dispatch when the FS doesn't do any work.</li>
-  <li>i965: Add EU emit support for gen6's new IF instruction with comparison.</li>
-  <li>i965: Set the source operand types for gen6 if/else/endif to integer.</li>
-  <li>i965: Use the new style of IF statement with embedded comparison on gen6.</li>
-  <li>i965: Split register allocation out of the ever-growing brw_fs.cpp.</li>
-  <li>i965: Fix gl_FrontFacing emit on pre-gen6.</li>
-  <li>i965: Add support for register spilling.</li>
-  <li>i965: Don't emit register spill offsets directly into g0.</li>
-  <li>i965: Correct scratch space allocation.</li>
-  <li>i965: Be more aggressive in tracking live/dead intervals within loops.</li>
-  <li>i965: Move the FS disasm/annotation printout to codegen time.</li>
-  <li>i965: Add support for pull constants to the new FS backend.</li>
-  <li>i965: Add EU code for dword scattered reads (constant buffer array indexing).</li>
-  <li>i965: Clarify an XXX comment in FB writes with real info.</li>
-  <li>i965: Use SENDC on the first render target write on gen6.</li>
-  <li>i965: Clear some undefined fields of g0 when using them for gen6 FB writes.</li>
-  <li>i965: Add disasm for the flag register.</li>
-  <li>i965: Add support for discard instructions on gen6.</li>
-  <li>i965: Handle new ir_unop_round_even in channel expression splitting.</li>
-  <li>i965: Fix typo in comment about state flags.</li>
-  <li>i965: Set up the constant buffer on gen6 when it's needed.</li>
-  <li>i965: Add support for constant buffer loads on gen6.</li>
-  <li>i965: Drop the eot argument to read messages, which can never be set.</li>
-  <li>i965: Fix VS URB entry sizing.</li>
-  <li>i965: Disable register spilling on gen6 until it's fixed.</li>
-  <li>i965: Make FS uniforms be the actual type of the uniform at upload time.</li>
-  <li>i965: Add user clip planes support to gen6.</li>
-  <li>i965: Update gen6 SF state when point state (sprite or attenuation) changes.</li>
-  <li>i965: Upload required gen6 VS push constants even when using pull constants.</li>
-  <li>i965: Update the gen6 stencil ref state when stencil state changes.</li>
-  <li>mesa: Make metaops use program refcounts instead of names.</li>
-  <li>mesa: Don't compute an unused texture completeness debug string.</li>
-  <li>intel: For batch, use GTT mapping instead of writing to a malloc and copying.</li>
-  <li>intel: Annotate debug printout checks with unlikely().</li>
-  <li>intel: Remove the magic unaligned memcpy code.</li>
-  <li>i965: Remove dead intel_structs.h file.</li>
-  <li>intel: Avoid taking logbase2 of several things that we max.</li>
-  <li>intel: Remove duplicated teximage miptree to object miptree promotion.</li>
-  <li>intel: Remove leftover dri1 locking fields in the context.</li>
-  <li>mesa: Fix delayed state flagging for EXT_sso-related program changes.</li>
-  <li>intel: Fix the client-side swapbuffers throttling.</li>
-  <li>Revert "intel: Fix the client-side swapbuffers throttling."</li>
-  <li>i965: Allow OPCODE_SWZ to put immediates in the first arg.</li>
-  <li>i965: Add support for math on constants in gen6 brw_wm_glsl.c path.</li>
-  <li>i965: Work around strangeness in swizzling/masking of gen6 math.</li>
-  <li>i965: re-enable gen6 IF statements in the fragment shader.</li>
-  <li>glsl: Free the loop state context when we free the loop state.</li>
-  <li>i965: Fix gl_FragCoord inversion when drawing to an FBO.</li>
-  <li>i965: Shut up spurious gcc warning about GLSL_TYPE enums.</li>
-  <li>mesa: Don't spam the console in a debug build unless some spam is requested.</li>
-  <li>i965: Add state dumping for sampler state.</li>
-  <li>i965: Add dumping of the sampler default color.</li>
-  <li>i965: Fail on loops on gen6 for now until we write the EU emit code for it.</li>
-  <li>i965: Eliminate dead code more aggressively.</li>
-  <li>mesa: Include C++ files in the makedepend of DRI drivers.</li>
-  <li>i965: Fix compute_to_mrf to not move a MRF write up into another live range.</li>
-  <li>i965: Just use memset() to clear most members in FS constructors.</li>
-  <li>i965: Remove extra n at the end of every instruction in INTEL_DEBUG=wm.</li>
-  <li>i965: Fold constants into the second arg of BRW_SEL as well.</li>
-  <li>glsl: Add a helper function for determining if an rvalue could be a saturate.</li>
-  <li>i965: Recognize saturates and turn them into a saturated mov.</li>
-  <li>ir_to_mesa: Detect and emit MOV_SATs for saturate constructs.</li>
-  <li>i965: Improve compute-to-mrf.</li>
-  <li>i965: Remove duplicate MRF writes in the FS backend.</li>
-  <li>i965: Move gen4 blend constant color to the gen4 blending file.</li>
-  <li>i965: Don't upload polygon stipple unless required.</li>
-  <li>i965: Don't upload line stipple pattern unless we're stippling.</li>
-  <li>i965: Don't upload line smooth params unless we're line smoothing.</li>
-  <li>i965: Use the new embedded compare in SEL on gen6 for VS MIN and MAX opcodes.</li>
-  <li>i965: Fix type of gl_FragData[] dereference for FB write.</li>
-  <li>glsl: Make the symbol table's add_function just use the function's name.</li>
-  <li>glsl: Make the symbol table's add_variable just use the variable's name.</li>
-  <li>glsl: Add a helper constructor for expressions that works out result type.</li>
-  <li>glsl: Fix structure and array comparisions.</li>
-  <li>glsl: Quiet unreachable no-return-from-function warning.</li>
-  <li>i965: Dump the WHILE jump distance on gen6.</li>
-  <li>i965: Add support for gen6 DO/WHILE ISA emit.</li>
-  <li>i965: Add support for gen6 BREAK ISA emit.</li>
-  <li>i965: Add support for gen6 CONTINUE instruction emit.</li>
-  <li>i965: Enable IF statements in the VS.</li>
-  <li>i965: Add support for loops in the VS.</li>
-  <li>glsl: Mark the array access for whole-array comparisons.</li>
-  <li>glsl: Fix flipped return of has_value() for array constants.</li>
-  <li>mesa: Add getters for the rest of the supported draw buffers.</li>
-  <li>mesa: Add getters for ARB_copy_buffer's attachment points.</li>
-  <li>intel: Add an env var override to execute for a different GPU revision.</li>
-  <li>i965: Update gen6 WM state on compiled program change, not just FP change.</li>
-  <li>i965: Update gen6 SF state on fragment program change too.</li>
-  <li>i965: Fix compile warning about missing opcodes.</li>
-  <li>i965: Move payload reg setup to compile, not lookup time.</li>
-  <li>i965: Provide delta_xy reg to gen6 non-GLSL path PINTERP.</li>
-  <li>i965: Fix up 16-wide gen6 FB writes after various refactoring.</li>
-  <li>i965: Don't smash a group of coordinates doing gen6 16-wide sampler headers.</li>
-  <li>i965: Fix gen6 interpolation setup for 16-wide.</li>
-  <li>i965: Fix up gen6 samplers for their usage by brw_wm_emit.c</li>
-  <li>i965: Make the sampler's implied move on gen6 be a raw move.</li>
-  <li>i965: Align gen6 push constant size to dispatch width.</li>
-  <li>i965: Add support for the instruction compression bits on gen6.</li>
-  <li>i965: Nuke brw_wm_glsl.c.</li>
-  <li>i965: Remove INTEL_DEBUG=glsl_force now that there's no brw_wm_glsl.c</li>
-  <li>i965: Fix comment about gen6_wm_constants.</li>
-  <li>i965: Handle saturates on gen6 math instructions.</li>
-  <li>i965: Always hand the absolute value to RSQ.</li>
-  <li>i965: Add disabled debug code for dumping out the WM constant payload.</li>
-  <li>i965: Work around gen6 ignoring source modifiers on math instructions.</li>
-  <li>i965: Fix flipped value of the not-embedded-in-if on gen6.</li>
-  <li>i965: Don't try to store gen6 (float) blend constant color in bytes.</li>
-  <li>i965: Set up the color masking for the first drawbuffer on gen6.</li>
-  <li>i965: Set up the per-render-target blend state on gen6.</li>
-  <li>i965: Set the render target index in gen6 fixed-function/ARB_fp path.</li>
-  <li>i965: Use the new pixel mask location for gen6 ARB_fp KIL instructions.</li>
-  <li>i965: Drop KIL_NV from the ff/ARB_fp path since it was only used for GLSL.</li>
-  <li>i965: Drop push-mode reladdr constant loading and always use constant_map.</li>
-  <li>i965: Fix VS constants regression pre-gen6.</li>
-  <li>i965: Clean up VS constant buffer location setup.</li>
-  <li>i965: Set up the correct texture border color state struct for Ironlake.</li>
-  <li>i965: Set render_cache_read_write surface state bit on gen6 constant surfs.</li>
-  <li>i965: remove unused variable since brw_wm_glsl.c removal.</li>
-  <li>intel: Use plain R8 and RG8 for COMPRESSED_RED and COMPRESSED_RG.</li>
-  <li>intel: Set the swizzling for depth textures using the GL_RED depth mode.</li>
-  <li>glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.</li>
-  <li>i965: Correct the dp_read message descriptor setup on g4x.</li>
-  <li>intel: Include stdbool so we can stop using GLboolean when we want to.</li>
-  <li>i965: Fix ARL to work on gen6.</li>
-  <li>i956: Fix the old FP path fragment position setup on gen6.</li>
-  <li>i965: Fix gl_FragCoord.z setup on gen6.</li>
-  <li>i965: Add support for using the BLT ring on gen6.</li>
-  <li>intel: Update renderbuffers before looking up CopyTexImage's read buffer.</li>
-  <li>intel: Drop commented intel_flush from copy_teximage.</li>
-  <li>intel: Try to sanely check that formats match for CopyTexImage.</li>
-  <li>intel: Support glCopyTexImage() from XRGB8888 to ARGB8888.</li>
-  <li>i965: Avoid using float type for raw moves, to work around SNB issue.</li>
-  <li>i965: Set the alternative floating point mode on gen6 VS and WM.</li>
-  <li>i965: Add support for gen6 constant-index constant loading.</li>
-  <li>i965: Add support for gen6 reladdr VS constant loading.</li>
-  <li>i965: Improve the hacks for ARB_fp scalar^scalar POW on gen6.</li>
-  <li>i965: Factor out the ir comparision to BRW_CONDITIONAL_* code.</li>
-  <li>i965: Fix regression in FS comparisons on original gen4 due to gen6 changes.</li>
-  <li>i965: Do lowering of array indexing of a vector in the FS.</li>
-  <li>intel: Only do frame throttling at glFlush time when using frontbuffer.</li>
-  <li>intel: Handle forced swrast clears before other clear bits.</li>
-  <li>intel: Use tri clears when we don't know how to blit clear the format.</li>
-  <li>intel: Add spans code for the ARB_texture_rg support.</li>
-  <li>intel: Add a couple of helper functions to reduce rb code duplication.</li>
-  <li>intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.</li>
-  <li>intel: When validating an FBO's combined depth/stencil, use the given FBO.</li>
-</ul></p>
-
-<p>Fabian Bieler (2):
-<ul>
-  <li>r600g: set address of pop instructions to next instruction</li>
-  <li>glsl: fix lowering conditional returns in subroutines</li>
-</ul></p>
-
-<p>Francisco Jerez (51):
-<ul>
-  <li>dri/nv04: Fix PGRAPH_ERRORs when running OA.</li>
-  <li>dri/nv04: Mipmapping fixes.</li>
-  <li>dri/nv04: Align SIFM transfer dimensions.</li>
-  <li>dri/nv04: Fix up color mask.</li>
-  <li>dri/nv04: Fix maximum texture size.</li>
-  <li>dri/nv04: Fix provoking vertex.</li>
-  <li>dri/nouveau: Update nouveau_class.h.</li>
-  <li>dri/nouveau: Add some more extensions.</li>
-  <li>dri/nouveau: Fix glRenderbufferStorage with DEPTH_COMPONENT as internal format.</li>
-  <li>dri/nouveau: Don't request a fake front unnecessarily.</li>
-  <li>dri/nouveau: Don't reemit the BO state in nouveau_state_emit().</li>
-  <li>dri/nouveau: Cleanup references to the old FBOs on glMakeCurrent().</li>
-  <li>meta: Don't bind the created texture object in init_temp_texture().</li>
-  <li>dri/nv10: Fix the CLAMP texture wrap mode.</li>
-  <li>dri/nv04: Use nvgl_wrap_mode().</li>
-  <li>dri/nouveau: Remove unnecessary assertion.</li>
-  <li>dri/nouveau: Cleanup more references to old FBOs and VBOs.</li>
-  <li>dri/nv10-nv20: Fix texturing in some cases after a base level change.</li>
-  <li>dri/nouveau: Fix software mipmap generation on 1x1 textures.</li>
-  <li>dri/nouveau: Have a smaller amount of larger scratch buffers.</li>
-  <li>dri/nouveau: Remove unnecessary flush.</li>
-  <li>dri/nv10: Use fast Z clears.</li>
-  <li>dri/nouveau: Minor cleanup.</li>
-  <li>dri/nv10: Fake fast Z clears for pre-nv17 cards.</li>
-  <li>dri/nouveau: Initialize tile_flags when allocating a render target.</li>
-  <li>nouveau: Get larger push buffers.</li>
-  <li>dri/nouveau: Force a "slow" Z clear if we're getting a new depth buffer.</li>
-  <li>dri/nv20: Clear with the 3D engine.</li>
-  <li>dri/nouveau: Don't assert(0) on compressed internal formats.</li>
-  <li>dri/nv25: Bind a hierarchical depth buffer.</li>
-  <li>dri/nouveau: Call _mesa_update_state() after framebuffer invalidation.</li>
-  <li>dri/nouveau: Honor the access flags in nouveau_bufferobj_map_range.</li>
-  <li>dri/nouveau: Tell the vbo module we want real hardware BOs.</li>
-  <li>dri/nouveau: Split out the scratch helpers to a separate file.</li>
-  <li>dri/nouveau: Avoid recursion in nouveau_bo_context_reset().</li>
-  <li>dri/nouveau: Use a macro to iterate over the bound vertex attributes.</li>
-  <li>dri/nouveau: Split out array handling to its own file.</li>
-  <li>dri/nouveau: Optimize VBO binding re-emission.</li>
-  <li>dri/nouveau: Keep small DYNAMIC_DRAW vertex buffers in system ram.</li>
-  <li>dri/nouveau: Pipeline glTexSubImage texture transfers.</li>
-  <li>dri/nouveau: Fix type promotion issue on 32bit platforms.</li>
-  <li>dri/nouveau: Validate the framebuffer state on read buffer changes.</li>
-  <li>dri/nouveau: Re-emit the BO state when coming back from a software fallback.</li>
-  <li>meta: Don't leak alpha function/reference value changes.</li>
-  <li>meta: Fix incorrect rendering of the bitmap alpha component.</li>
-  <li>vbo: Avoid unnecessary copy to/from current in vertex format upgrade.</li>
-  <li>meta: Don't try to disable cube maps if the driver doesn't expose the extension.</li>
-  <li>meta: Handle bitmaps with alpha test enabled.</li>
-  <li>dri/nouveau: Split hardware/software TNL instantiation more cleanly.</li>
-  <li>dri/nouveau: Fix typo.</li>
-  <li>dri/nouveau: Kill a bunch of ternary operators.</li>
-</ul></p>
-
-<p>Fredrik Höglund (2):
-<ul>
-  <li>r600g: Fix texture sampling with swizzled coords</li>
-  <li>r600g: fix pow(0, 0) evaluating to NaN</li>
-</ul></p>
-
-<p>Guillermo S. Romero (1):
-<ul>
-  <li>r300g: Do not use buf param before checking for NULL.</li>
-</ul></p>
-
-<p>Henri Verbeet (19):
-<ul>
-  <li>r600g: Flush upload buffers before draws instead of before flushes.</li>
-  <li>r600g: Check for other references before checking for existing mappings in radeon_bo_pb_map_internal().</li>
-  <li>r600g: Remove a redundant flush in r600_texture_transfer_map().</li>
-  <li>r600g: Buffer object maps imply a wait.</li>
-  <li>r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal().</li>
-  <li>Revert "r600g: Flush upload buffers before draws instead of before flushes."</li>
-  <li>r600g: fix exports_ps to export a number not a mask.</li>
-  <li>r600g: Mention AMD in the renderer string.</li>
-  <li>r600g: Cleanup the fenced_bo list in r600_context_fini().</li>
-  <li>r600g: Evergreen has two extra frac_bits for the sampler LOD state.</li>
-  <li>r600: Evergreen has two extra frac_bits for the sampler LOD state.</li>
-  <li>r600g: Add PIPE_FORMAT_L8A8_UNORM for Evergreen as well.</li>
-  <li>r600g: Swizzle vertex data only once.</li>
-  <li>r600g: Synchronize supported color formats between Evergreen and r600/r700.</li>
-  <li>r600g: Fix the PIPE_FORMAT_L8A8_UNORM color swaps.</li>
-  <li>r600g: Fix the PIPE_FORMAT_A8_UNORM color swap for Evergreen as well.</li>
-  <li>r600g: Cleanup block bo references in r600_context_fini().</li>
-  <li>r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().</li>
-  <li>st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().</li>
-</ul></p>
-
-<p>Hui Qi Tay (10):
-<ul>
-  <li>llvmpipe: minor changes in llvm coefficient calcs</li>
-  <li>draw: cliptest and viewport done in a single loop in vertex shader</li>
-  <li>draw: added viewport and cliptest flags</li>
-  <li>draw: sanitize llvm variant key</li>
-  <li>draw: corrections for w coordinate</li>
-  <li>draw: corrections to allow for different cliptest cases</li>
-  <li>llvmpipe: Moved draw pipeline twoside function to llvm setup code</li>
-  <li>llvmpipe: added llvm offset setup code</li>
-  <li>llvmpipe: clean up polygon offset function in lp setup code</li>
-  <li>llvmpipe: fix such that offset/twoside function only does in-place modification</li>
-</ul></p>
-
-<p>Ian Romanick (102):
-<ul>
-  <li>glsl2: Refactor testing for whether a deref is of a matrix or array</li>
-  <li>glsl2: Add flags to enable variable index lowering</li>
-  <li>glsl: Add doxygen comments</li>
-  <li>EGL DRI2: Silence piles of 'unused variable' warnings</li>
-  <li>EGL DRI2: Silence 'missing initializer' warnings</li>
-  <li>egl_glx: Silence piles of 'unused variable' warnings</li>
-  <li>egl: Fix several 'comparison between signed and unsigned integer' warnings</li>
-  <li>dri: Ensure that DRI driver cpp files are in tarballs</li>
-  <li>mesa: Force GL_ARB_copy_buffer to always be enabled</li>
-  <li>mesa: Force GL_SGIS_generate_mipmap to always be enabled</li>
-  <li>Remove GL_MESA_packed_depth_stencil</li>
-  <li>Remove GL_EXT_cull_vertex</li>
-  <li>Regenerate files changed by previous commit</li>
-  <li>Remove unnescessary initializations of UpdateTexturePalette</li>
-  <li>ARB_texture_rg: Add GLX protocol support</li>
-  <li>ARB_texture_rg: Correct some errors in RED / RG internal format handling</li>
-  <li>ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support</li>
-  <li>ARB_texture_rg: Add GL_RED as a valid GL_DEPTH_TEXTURE_MODE</li>
-  <li>ARB_texture_rg: Handle RED and RG the same as RGB for tex env</li>
-  <li>ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formats</li>
-  <li>ARB_texture_rg: Allow RED and RG textures as FBO color buffer attachments</li>
-  <li>mesa: Enable GL_ARB_texture_rg in software paths</li>
-  <li>i965: Enable GL_ARB_texture_rg</li>
-  <li>mesa: Add ARB_texture_compression_rgtc as an alias for EXT_texture_compression_rgtc</li>
-  <li>ARB_texture_rg: Add GL_COMPRESSED_{RED,RG} cases in _mesa_is_color_format</li>
-  <li>mesa: Fix misplaced #endif</li>
-  <li>mesa: Trivial correction to comment</li>
-  <li>rgtc: Detect RGTC formats as color formats and as compressed formats</li>
-  <li>docs: Add list of bugs fixed in 7.9</li>
-  <li>docs: Import 7.9 release notes from 7.9 branch.</li>
-  <li>docs: Import 7.8.x release notes from 7.8 branch.</li>
-  <li>docs: download.html does not need to be updated for each release</li>
-  <li>docs: Update mailing lines from sf.net to freedesktop.org</li>
-  <li>docs: Import news updates from 7.9 branch</li>
-  <li>docs: added news item for 7.9 release</li>
-  <li>glsl: Fail linking if assign_attribute_locations fails</li>
-  <li>glsl: Refactor 'layout' grammar to match GLSL 1.60 spec grammar</li>
-  <li>glsl: Slight refactor of error / warning checking for ARB_fcc layout</li>
-  <li>glsl: Clear type_qualifier using memset</li>
-  <li>glsl: Wrap ast_type_qualifier contents in a struct in a union</li>
-  <li>glsl: Regenerate files modified by previous commits</li>
-  <li>glcpp: Add the define for ARB_explicit_attrib_location when present</li>
-  <li>glcpp: Regenerate files changes by previous commit</li>
-  <li>glsl: Add parser support for GL_ARB_explicit_attrib_location layouts</li>
-  <li>glsl: Regenerate files changes by previous commit</li>
-  <li>glsl: Track explicit location in AST to IR translation</li>
-  <li>glsl: Add linker support for explicit attribute locations</li>
-  <li>main: Enable GL_ARB_explicit_attrib_location for swrast</li>
-  <li>intel: Enable GL_ARB_explicit_attrib_location</li>
-  <li>glsl: Remove const decoration from inlined function parameters</li>
-  <li>docs: skeleton for 7.10 release notes</li>
-  <li>docs: Update status of GL 3.x related extensions</li>
-  <li>mesa: Validate assembly shaders when GLSL shaders are used</li>
-  <li>glsl: Fix incorrect assertion</li>
-  <li>linker: Reject shaders that have unresolved function calls</li>
-  <li>mesa: Silence unused variable warning</li>
-  <li>mesa: Refactor validation of shader targets</li>
-  <li>mesa: Clean up two 'comparison between signed and unsigned' warnings</li>
-  <li>mesa: Clean up various 'unused parameter' warnings in shaderapi</li>
-  <li>glsl: Slightly change the semantic of _LinkedShaders</li>
-  <li>linker: Trivial indention fix</li>
-  <li>i965: Fix indentation after commit 3322fbaf</li>
-  <li>linker: Improve handling of unread/unwritten shader inputs/outputs</li>
-  <li>glapi: Add GL_EXT_separate_shader_objects</li>
-  <li>glapi: Commit files changed by previous commit</li>
-  <li>mesa: Add infrastructure to track GL_EXT_separate_shader_objects</li>
-  <li>mesa: Skeletal support for GL_EXT_separate_shader_objects</li>
-  <li>mesa: Add display list support for GL_EXT_separate_shader_objects functions</li>
-  <li>mesa: Track an ActiveProgram distinct from CurrentProgram</li>
-  <li>Track separate programs for each stage</li>
-  <li>swrast: Enable GL_EXT_separate_shader_objects in software paths</li>
-  <li>intel: Enable GL_EXT_separate_shader_objects in Intel drivers</li>
-  <li>docs: add GL_EXT_separate_shader_objects to release notes</li>
-  <li>glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow</li>
-  <li>ir_to_mesa: Refactor code for emitting DP instructions</li>
-  <li>mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample</li>
-  <li>glsl: Refactor is_vec_{zero,one} to be methods of ir_constant</li>
-  <li>glsl: Simplify generation of swizzle for vector constructors</li>
-  <li>glsl: Make is_zero and is_one virtual methods of ir_rvalue</li>
-  <li>ir_to_mesa: Generate smarter code for some conditional moves</li>
-  <li>glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced</li>
-  <li>glsl: Eliminate assumptions about size of ir_expression::operands</li>
-  <li>glsl: Add ir_rvalue::is_negative_one predicate</li>
-  <li>glsl: Add unary ir_expression constructor</li>
-  <li>glsl: Add ir_quadop_vector expression</li>
-  <li>glsl: Fix matrix constructors with vector parameters</li>
-  <li>i915: Disallow alpha, red, RG, and sRGB as render targets</li>
-  <li>glsl: Use M_LOG2E constant instead of calling log2</li>
-  <li>glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2</li>
-  <li>i915: Request that POW instructions be lowered</li>
-  <li>i915: Correctly generate unconditional KIL instructions</li>
-  <li>glsl: Ensure that equality comparisons don't return a NULL IR tree</li>
-  <li>i965: Correctly emit constants for aggregate types (array, matrix, struct)</li>
-  <li>glsl: Inherrit type of declared variable from initializer</li>
-  <li>linker: Ensure that unsized arrays have a size after linking</li>
-  <li>linker: Fix regressions caused by previous commit</li>
-  <li>glsl: Inherrit type of declared variable from initializer after processing assignment</li>
-  <li>linker: Allow built-in arrays to have different sizes between shader stages</li>
-  <li>ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors</li>
-  <li>Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Allow less restrictive uses of sampler array indexing in GLSL &lt= 1.20</li>
-  <li>docs: Import 7.9.1 release notes from 7.9 branch</li>
-</ul></p>
-
-<p>Jakob Bornecrantz (27):
-<ul>
-  <li>rbug: Cast opcode to corrent int size</li>
-  <li>rbug: Add function to get opcode name string</li>
-  <li>scons: Link against talloc in the Gallium DRI drivers</li>
-  <li>i915g: Link with wrapper sw winsys with scons</li>
-  <li>tgsi: Actually care what check_soa_dependencies says</li>
-  <li>tgsi: Fix missing test before check</li>
-  <li>llvmpipe: Move makefile include to before targets</li>
-  <li>wrapper: Fix spelling</li>
-  <li>wrapper: Add a way to dewrap a pipe screen without destroying it</li>
-  <li>egl: Remove unnecessary headers</li>
-  <li>target-helpers: Remove per target software wrapper check</li>
-  <li>graw: Tidy graw xlib scons file a bit</li>
-  <li>scons: Remove old pipebuffer SConscript</li>
-  <li>scons: Detabify</li>
-  <li>scons: Check for pkg-config before trying to use it</li>
-  <li>scons: Check for libdrm_[intel|radeon] as well</li>
-  <li>scons: Move dependancy checks to the main gallium scons file</li>
-  <li>scons: Unify state tracker SConscripts</li>
-  <li>galahad: Correct the name of the scons library</li>
-  <li>graw: Use inline sw helper instead of roll your own loader</li>
-  <li>libgl-xlib: Use sw helper instead of roll your own</li>
-  <li>libgl-xlib: Use inline debug helper instead of non-inline version</li>
-  <li>graw: Use inline debug helper instead of non-inline version</li>
-  <li>gallium: Remove redundant sw and debug target helpers</li>
-  <li>i915g: Improve debug printing for textures</li>
-  <li>i915g: Make sure that new vbo gets updated</li>
-  <li>st/mesa: Unbind all constant buffers</li>
-</ul></p>
-
-<p>Jerome Glisse (75):
-<ul>
-  <li>r600g: alternative command stream building from context</li>
-  <li>r600g: move chip class to radeon common structure</li>
-  <li>r600g: use pipe context for flushing inside map</li>
-  <li>r600g: add back reference check when mapping buffer</li>
-  <li>r600g: directly allocate bo for user buffer</li>
-  <li>r600g: fix multi buffer rendering</li>
-  <li>r600g: occlusion query for new design</li>
-  <li>r600g: flush color buffer after draw command</li>
-  <li>r600g: disable shader rebuild optimization &amp; account cb flush packet</li>
-  <li>r600g: fix multiple occlusion query on same id</li>
-  <li>r600g: initial evergreen support in new path</li>
-  <li>r600g: fix typo in evergreen define (resource are in x range)</li>
-  <li>r600g: move use_mem_constants flags for new designs structure alignment</li>
-  <li>r600g: evergreen fix for new design</li>
-  <li>r600g: fix compilation after change to evergreend.h</li>
-  <li>r600g: fixup some evergreen register definitions</li>
-  <li>r600g: fix evergreen new path</li>
-  <li>r600g: fix reg definition</li>
-  <li>r600g: fix evergreen new path</li>
-  <li>r600g: bring over fix from old path to new path</li>
-  <li>r600g: fix vertex resource &amp; polygon offset</li>
-  <li>r600g: disable early cull optimization when occlusion query running</li>
-  <li>r600g: move around variables to share depth uncompression code</li>
-  <li>r600g: use depth decompression in new path</li>
-  <li>r600g: fix index buffer drawing</li>
-  <li>r600g: build packet header once</li>
-  <li>r600g: fix pointsprite &amp; resource unbinding</li>
-  <li>r600g: fix routing btw vertex &amp; pixel shader</li>
-  <li>r600g: fix occlusion query after change to block structure</li>
-  <li>r600g: use ptr for blit depth uncompress function</li>
-  <li>r600g: fix remaining piglit issue in new design</li>
-  <li>r600g: switch to new design</li>
-  <li>r600g: suspend/resume occlusion query around clear/copy</li>
-  <li>r600g: avoid rebuilding the vertex shader if no change to input format</li>
-  <li>r600g: use a hash table instead of group</li>
-  <li>r600g: delete old path</li>
-  <li>r600g: cleanup</li>
-  <li>r600g: more cleanup</li>
-  <li>r600g: use constant buffer instead of register for constant</li>
-  <li>r600g: fix constant &amp; literal src splitting, also fix mplayer gl2 shader</li>
-  <li>evergreeng: avoid overlapping border color btw VS &amp; PS</li>
-  <li>r600g: indentation fixes</li>
-  <li>r600g: rename radeon_ws_bo to r600_bo</li>
-  <li>r600g: allow r600_bo to be a sub allocation of a big bo</li>
-  <li>r600g: use r600_bo for relocation argument, simplify code</li>
-  <li>r600g: rename radeon_ws_bo to r600_bo</li>
-  <li>r600g: remove dead label &amp; fix indentation</li>
-  <li>r600g: store reloc information in bo structure</li>
-  <li>r600g: improve bo flushing</li>
-  <li>r600g: simplify block relocation</li>
-  <li>r600g: userspace fence to avoid kernel call for testing bo busy status</li>
-  <li>r600g: avoid segfault due to unintialized list pointer</li>
-  <li>r600g: fix dirty state handling</li>
-  <li>r600g: allow driver to work without submitting cmd to GPU</li>
-  <li>gallium/noop: no operation gallium driver</li>
-  <li>r600g: code cleanup (indent, trailing space, empty line ...)</li>
-  <li>r600g: fix occlusion query on evergreen (avoid lockup)</li>
-  <li>r600g: add fetch shader capabilities</li>
-  <li>r600g: dump raw shader output for debugging</li>
-  <li>r600g: update polygon offset only when rasterizer or zbuffer change</li>
-  <li>r600g: indentation fix</li>
-  <li>r600g: more indentation fix + warning silencing + dead code removal</li>
-  <li>r600g: build fetch shader from vertex elements</li>
-  <li>r600g: avoid useless shader rebuild at draw call</li>
-  <li>r600g: remove useless flush map</li>
-  <li>r600g: remove dead code</li>
-  <li>r600g: fix userspace fence against lastest kernel</li>
-  <li>r600g: avoid using pb* helper we are loosing previous cpu cycle with it</li>
-  <li>r600g: specialized upload manager</li>
-  <li>r600g: indentation cleanup</li>
-  <li>r600g: fix bo size when creating bo from handle</li>
-  <li>r600g: fix segfault when translating vertex buffer</li>
-  <li>r600g: need to reference upload buffer as the might still live accross flush</li>
-  <li>r600g: properly unset vertex buffer</li>
-  <li>r600g: avoid segfault</li>
-</ul></p>
-
-<p>Joakim Sindholt (3):
-<ul>
-  <li>util/u_blitter: fix leak</li>
-  <li>radeong: fix leaks</li>
-  <li>r300g: silence guard band cap errors</li>
-</ul></p>
-
-<p>Johann Rudloff (3):
-<ul>
-  <li>radeon: Implement EGL_MESA_no_surface_extension</li>
-  <li>radeon: Implement __DRI_IMAGE and EGL_MESA_image_drm</li>
-  <li>radeon: Implement GL_OES_EGL_image</li>
-</ul></p>
-
-<p>John Doe (3):
-<ul>
-  <li>r600g: misc cleanup</li>
-  <li>r600g: don't double count dirty block</li>
-  <li>r600g: keep a mapping around for each bo</li>
-</ul></p>
-
-<p>Jon TURNEY (1):
-<ul>
-  <li>Ensure -L$(TOP)/$(LIB_DIR) appears in link line before any -L in $LDFLAGS</li>
-</ul></p>
-
-<p>José Fonseca (128):
-<ul>
-  <li>gallivm: Fix address register swizzle.</li>
-  <li>gallivm: Start collecting bitwise arithmetic helpers in a new module.</li>
-  <li>gallivm: Clamp indirect register indices to file_max.</li>
-  <li>util: linearized sRGB values don't fit into 8bits</li>
-  <li>llvmpipe: Default to no threading on single processor systems.</li>
-  <li>tgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies</li>
-  <li>llvmpipe: Describe how to profile llvmpipe.</li>
-  <li>llvmpipe: When failing free fs shader too.</li>
-  <li>util: Flush stdout on util_format.</li>
-  <li>gallivm: Add unorm support to lp_build_lerp()</li>
-  <li>llvmpipe: Special case complementary and identify blend factors in SoA.</li>
-  <li>llvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.</li>
-  <li>draw: Prevent clipped vertices overflow.</li>
-  <li>draw: Fullfil the new min_lod/max_lod/lod_bias/border_color dynamic state</li>
-  <li>gallivm: Fetch the lod from the dynamic state when min_lod == max_lod.</li>
-  <li>gallivm: Remove dead experimental code.</li>
-  <li>llvmpipe: Decouple sampler view and sampler state updates.</li>
-  <li>scons: New build= option, with support for checked builds.</li>
-  <li>scons: New build= option, with support for checked builds.</li>
-  <li>trace: Fix set_index_buffer and draw_vbo tracing.</li>
-  <li>python/retrace: Handle set_index_buffer and draw_vbo.</li>
-  <li>gallivm: Use SSE4.1's ROUNDSS/ROUNDSD for scalar rounding.</li>
-  <li>gallivm: More comprehensive border usage logic.</li>
-  <li>retrace: Handle clear_render_target and clear_depth_stencil.</li>
-  <li>llvmpipe: Dump a few missing shader key flags.</li>
-  <li>llvmpipe: Fix perspective interpolation for point sprites.</li>
-  <li>llvmpipe: Fix sprite coord perspective interpolation of Q.</li>
-  <li>gallivm: Take the type signedness in consideration in round/ceil/floor.</li>
-  <li>gallivm: Use a faster (and less accurate) log2 in lod computation.</li>
-  <li>gallivm: Fast implementation of iround(log2(x))</li>
-  <li>gallivm: Combined ifloor &amp; fract helper.</li>
-  <li>gallivm: Only apply min/max_lod when necessary.</li>
-  <li>gallivm: Compute lod as integer whenever possible.</li>
-  <li>util: Cleanup util_pack_z_stencil and friends.</li>
-  <li>llvmpipe: Cleanup depth-stencil clears.</li>
-  <li>gallivm: Vectorize the rho computation.</li>
-  <li>gallivm: Do not do mipfiltering when magnifying.</li>
-  <li>gallivm: Simplify lp_build_mipmap_level_sizes' interface.</li>
-  <li>gallivm: Don't compute the second mipmap level when frac(lod) == 0</li>
-  <li>gallivm: Use lp_build_ifloor_fract for lod computation.</li>
-  <li>gallivm: Clamp mipmap level and zero mip weight simultaneously.</li>
-  <li>gallivm: Fix copy'n'paste typo in previous commit.</li>
-  <li>gallivm: Implement brilinear filtering.</li>
-  <li>gallivm: Use the wrappers for SSE pack intrinsics.</li>
-  <li>gallivm: Avoid control flow for two-sided stencil test.</li>
-  <li>gallivm: Warn when doing inefficient integer comparisons.</li>
-  <li>gallivm: Move into the as much of the second level code as possible.</li>
-  <li>llvmpipe: First minify the texture size, then broadcast.</li>
-  <li>gallivm: Help for combined extraction and broadcasting.</li>
-  <li>gallivm: Do size computations simultanously for all dimensions (AoS).</li>
-  <li>llvmpipe: Prevent z &gt; 1.0</li>
-  <li>llvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.</li>
-  <li>gallivm: Handle code have ret correctly.</li>
-  <li>util: Defined M_SQRT2 when not available.</li>
-  <li>gallivm: Less code duplication in log computation.</li>
-  <li>gallivm: Special bri-linear computation path for unmodified rho.</li>
-  <li>gallivm: Don't generate Phis for execution mask.</li>
-  <li>gallivm: Use varilables instead of Phis for cubemap selection.</li>
-  <li>gallivm: Remove support for Phi generation.</li>
-  <li>gallivm: Factor out the SI-&gt;FP texture size conversion for SoA path too</li>
-  <li>gallivm: Simplify if/then/else implementation.</li>
-  <li>gallivm: Cleanup the rest of the flow module.</li>
-  <li>gallivm: Fix a long standing bug with nested if-then-else emission.</li>
-  <li>gallivm: Allow to disable bri-linear filtering with GALLIVM_DEBUG=no_brilinear runtime option</li>
-  <li>gallivm: Use variables instead of Phis in loops.</li>
-  <li>gallivm: Pass texture coords derivates as scalars.</li>
-  <li>llvmpipe: Remove outdated comment about stencil testing.</li>
-  <li>gallivm: Eliminate unsigned integer arithmetic from texture coordinates.</li>
-  <li>gallium: Define C99 restrict keyword where absent.</li>
-  <li>tgsi: Export some names for some tgsi enums.</li>
-  <li>gallivm: More detailed analysis of tgsi shaders.</li>
-  <li>llvmpipe: Use lp_tgsi_info.</li>
-  <li>llvmpipe: Do not dispose the execution engine.</li>
-  <li>llvmpipe: Fix MSVC build.</li>
-  <li>llmvpipe: improve mm_mullo_epi32</li>
-  <li>gallivm: Name anonymous union.</li>
-  <li>llvmpipe: Unbreak Z32_FLOAT.</li>
-  <li>gallivm: More accurate float -&gt; 24bit &amp; 32bit unorm conversion.</li>
-  <li>llvmpipe: Generalize the x8z24 fast path to all depth formats.</li>
-  <li>llvmpipe: Fix depth-stencil regression.</li>
-  <li>llvmpipe: Ensure z_shift and z_width is initialized.</li>
-  <li>gallivm: Fix SoA cubemap derivative computation.</li>
-  <li>llvmpipe: Fix bad refactoring.</li>
-  <li>llvmpipe: Initialize bld ctx via lp_build_context_init instead of ad-hoc and broken code.</li>
-  <li>gallivm: Comment lp_build_insert_new_block().</li>
-  <li>gallivm: Add a note about SSE4.1's nearest mode rounding.</li>
-  <li>llvmpipe: Don't test rounding of x.5 numbers.</li>
-  <li>gallium: Avoid using __doc__ in python scripts.</li>
-  <li>gallivm: always enable LLVMAddInstructionCombiningPass()</li>
-  <li>gallivm: Remove the EMMS opcodes.</li>
-  <li>mesa: Fix windows build (uint -&gt; GLuint).</li>
-  <li>scons: Revamp how to specify targets to build.</li>
-  <li>scons: Fix MinGW cross-compilation.</li>
-  <li>scons: Some pipe drivers are not portable for MSVC</li>
-  <li>scons: Restore x11 tool behavior for backwards compatability.</li>
-  <li>scons: Disable python state tracker when swig is not present.</li>
-  <li>r600g: List recently added files in SConscript.</li>
-  <li>scons: Add aliases for several pipe drivers.</li>
-  <li>scons: i915 can't build on MSVC either.</li>
-  <li>scons: Propagate installation targets.</li>
-  <li>xorg/vmwgfx: Add missing source file to SConscript.</li>
-  <li>st/xorg: Add missing n to error message.</li>
-  <li>st/xorg: Detect libkms with scons too.</li>
-  <li>xorg/vmwgfx: Link libkms when available.</li>
-  <li>r600g: Swap the util_blitter_destroy call order.</li>
-  <li>gallivm: Allocate TEMP/OUT arrays only once.</li>
-  <li>libgl-gdi: Allow to pick softpipe/llvmpipe on runtime.</li>
-  <li>scons: Use inline wrap helpers more consistently.</li>
-  <li>svga: Use consistent hexadecimal representation on debug output.</li>
-  <li>scons: Alias for svga</li>
-  <li>wgl: Stub WGL_ARB_pbuffer support.</li>
-  <li>wgl: More complete WGL_ARB_pbuffer support.</li>
-  <li>svga: Silence debug printf.</li>
-  <li>scons: Move MSVS_VERSION option to common module.</li>
-  <li>vega: Remove extraneous ;</li>
-  <li>retrace: Some fixes.</li>
-  <li>util: C++ safe.</li>
-  <li>wgl: Fix double free. Remove dead code.</li>
-  <li>util: Plug leaks in util_destroy_gen_mipmap.</li>
-  <li>util: __builtin_frame_address() doesn't work on mingw.</li>
-  <li>util: Don't try to use imagehlp on mingw.</li>
-  <li>wgl: Unreference the current framebuffer after the make_current call.</li>
-  <li>WIN32_THREADS -&gt; WIN32</li>
-  <li>mapi: Hack to avoid vgCreateFont being generated as vgCreateFontA.</li>
-  <li>wgl: Fix visual's buffer_mask configuration.</li>
-  <li>mesa: Temporary hack to prevent stack overflow on windows</li>
-  <li>mesa: Bump the number of bits in the register index.</li>
-  <li>llvmpipe: Plug fence leaks.</li>
-</ul></p>
-
-<p>Julien Cristau (1):
-<ul>
-  <li>Makefile: don't include the same files twice in the tarball</li>
-</ul></p>
-
-<p>Keith Whitwell (89):
-<ul>
-  <li>llvmpipe: brackets around macro arg</li>
-  <li>llvmpipe: remove duplicate code</li>
-  <li>llvmpipe: return zero from floor_pot(zero)</li>
-  <li>gallivm: make lp_build_sample_nop public</li>
-  <li>llvmpipe: add LP_PERF flag to disable various aspects of rasterization</li>
-  <li>llvmpipe: add DEBUG_FS to dump variant information</li>
-  <li>llvmpipe: use llvm for attribute interpolant calculation</li>
-  <li>graw: add frag-face shader</li>
-  <li>llvmpipe: fix flatshading in new line code</li>
-  <li>draw: don't apply flatshading to clipped tris with &lt3 verts</li>
-  <li>llvmpipe: handle FACING interpolants in line and point setup</li>
-  <li>llvmpipe: handle up to 8 planes in triangle binner</li>
-  <li>llvmpipe: make debug_fs_variant respect variant-&gt;nr_samplers</li>
-  <li>gallivm: don't apply zero lod_bias</li>
-  <li>llvmpipe: fail gracefully on oom in scene creation</li>
-  <li>llvmpipe: avoid overflow in triangle culling</li>
-  <li>gallivm: special case conversion 4x4f to 1x16ub</li>
-  <li>gallivm: round rather than truncate in new 4x4f-&gt;1x16ub conversion path</li>
-  <li>llvmpipe: clean up setup_tri a little</li>
-  <li>llvmpipe: add rast_tri_4_16 for small lines and points</li>
-  <li>llvmpipe: fix off-by-one in tri_16</li>
-  <li>llvmpipe: defer attribute interpolation until after mask and ztest</li>
-  <li>llvmpipe: use alloca for fs color outputs</li>
-  <li>llvmpipe: store zero into all alloca'd values</li>
-  <li>llvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs</li>
-  <li>gallivm: specialized x8z24 depthtest path</li>
-  <li>gallivm: prefer blendvb for integer arguments</li>
-  <li>gallivm: simpler uint8-&gt;float conversions</li>
-  <li>llvmpipe: try to be sensible about whether to branch after mask updates</li>
-  <li>llvmpipe: clean up shader pre/postamble, try to catch more early-z</li>
-  <li>llvmpipe: simplified SSE2 swz/unswz routines</li>
-  <li>llvmpipe: try to do more of rast_tri_3_16 with intrinsics</li>
-  <li>llvmpipe: add debug helpers for epi32 etc</li>
-  <li>llvmpipe: try to keep plane c values small</li>
-  <li>llvmpipe: fix typo in last commit</li>
-  <li>gallium: move sse intrinsics debug helpers to u_sse.h</li>
-  <li>r600g: add missing file to sconscript</li>
-  <li>gallivm: don't branch on KILLs near end of shader</li>
-  <li>Revert "llvmpipe: try to keep plane c values small"</li>
-  <li>llvmpipe: make sure intrinsics code is guarded with PIPE_ARCH_SSE</li>
-  <li>llvmpipe: don't try to emit non-existent color outputs</li>
-  <li>r600/drm: fix segfaults in winsys create failure path</li>
-  <li>r600g: emit hardware linewidth</li>
-  <li>r600g: handle absolute modifier in shader translator</li>
-  <li>llvmpipe: reintroduce SET_STATE binner command</li>
-  <li>llvmpipe: don't pass frontfacing as a float</li>
-  <li>llvmpipe: slightly shrink the size of a binned triangle</li>
-  <li>llvmpipe: don't store plane.ei value in binned data</li>
-  <li>gallium: move some intrinsics helpers to u_sse.h</li>
-  <li>llvmpipe: do plane calculations with intrinsics</li>
-  <li>llvmpipe: use aligned loads/stores for plane values</li>
-  <li>llvmpipe: fix non-sse build after recent changes</li>
-  <li>llvmpipe: check shader outputs are non-null before using</li>
-  <li>llvmpipe: validate color outputs against key-&gt;nr_cbufs</li>
-  <li>llvmpipe: clean up fields in draw_llvm_variant_key</li>
-  <li>llvmpipe: remove setup fallback path</li>
-  <li>llvmpipe: fail cleanly on malloc failure in lp_setup_alloc_triangle</li>
-  <li>Merge remote branch 'origin/master' into lp-setup-llvm</li>
-  <li>llvmpipe: remove unused file</li>
-  <li>llvmpipe: remove unused arg from jit_setup_tri function</li>
-  <li>Merge branch 'llvm-cliptest-viewport'</li>
-  <li>draw: make sure viewport gets updated in draw llvm shader</li>
-  <li>llvmpipe: turn off draw offset/twoside when we can handle it</li>
-  <li>llvmpipe: avoid generating tri_16 for tris which extend past tile bounds</li>
-  <li>llvmpipe: guard against NULL task-&gt;query pointer</li>
-  <li>st/mesa: unbind constant buffer when not in use</li>
-  <li>r600g: propagate usage flags in texture transfers</li>
-  <li>r600g: propogate resource usage flags to winsys, use to choose bo domains</li>
-  <li>r600g: use a buffer in GTT as intermediate on texture up and downloads</li>
-  <li>r600g: remove unused flink, domain fields from r600_resource</li>
-  <li>r600g: set hardware pixel centers according to gl_rasterization_rules</li>
-  <li>evergreeng: protect against null constant buffers</li>
-  <li>r600g: don't call debug_get_bool_option for tiling more than once</li>
-  <li>evergreeng: respect linewidth state, use integer widths only</li>
-  <li>evergreeng: set hardware pixelcenters according to gl_rasterization_rules</li>
-  <li>r600g: avoid recursion with staged uploads</li>
-  <li>r600g: attempt to turn on DXTn formats</li>
-  <li>r600g: translate ARR instruction</li>
-  <li>r600: fix my pessimism about PIPE_TRANSFER_x flags</li>
-  <li>ws/r600: match bo_busy shared/fence logic in bo_wait</li>
-  <li>r600g: guard experimental s3tc code with R600_ENABLE_S3TC</li>
-  <li>r600g: do not try to use staging resource for depth textures</li>
-  <li>r600g: enforce minimum stride on render target texture images</li>
-  <li>llvmpipe: fix up twoside after recent changes</li>
-  <li>llvmpipe: twoside for specular color also</li>
-  <li>Merge branch 'lp-offset-twoside'</li>
-  <li>llvmpipe: raise dirty flag on transfers to bound constbuf</li>
-  <li>llvmpipe: remove misleading debug string</li>
-  <li>llvmpipe: shortcircuit some calls to set_scene_state</li>
-</ul></p>
-
-<p>Kenneth Graunke (94):
-<ul>
-  <li>glsl: Change from has_builtin_signature to has_user_signature.</li>
-  <li>glsl: Don't print blank (function ...) headers for built-ins.</li>
-  <li>glsl: Properly handle nested structure types.</li>
-  <li>glsl/builtins: Fix equal and notEqual builtins.</li>
-  <li>glsl/builtins: Switch comparison functions to just return an expression.</li>
-  <li>glsl: Add comments to clarify the types of comparison binops.</li>
-  <li>glsl: Fix broken handling of ir_binop_equal and ir_binop_nequal.</li>
-  <li>glsl: "Copyright", not "Constantright"</li>
-  <li>i965: Fix incorrect batchbuffer size in gen6 clip state command.</li>
-  <li>i965: Use logical-not when emitting ir_unop_ceil.</li>
-  <li>glsl: Add front-end support for the "trunc" built-in.</li>
-  <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
-  <li>i965: Use RNDZ for ir_unop_trunc in the new FS.</li>
-  <li>i965: Correctly emit the RNDZ instruction.</li>
-  <li>i965: Clean up a warning in the old fragment backend.</li>
-  <li>glsl: Add a new ir_unop_round_even opcode for GLSL 1.30's roundEven.</li>
-  <li>glsl: Add front-end support for GLSL 1.30's roundEven built-in.</li>
-  <li>i965: Add support for ir_unop_round_even via the RNDE instruction.</li>
-  <li>glsl: Add support for the 1.30 round() built-in.</li>
-  <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Don't return NULL IR for erroneous bit-shift operators.</li>
-  <li>i965: Add missing "break" statement.</li>
-  <li>glsl: Fix copy and paste error in ast_bit_and node creation.</li>
-  <li>glsl: Regenerate parser files.</li>
-  <li>i965: Remove unused variable.</li>
-  <li>glsl: Remove useless ir_shader enumeration value.</li>
-  <li>mesa: Remove FEATURE_ARB_shading_language_120 macro.</li>
-  <li>glcpp: Return NEWLINE token for newlines inside multi-line comments.</li>
-  <li>glcpp: Refresh autogenerated lexer file.</li>
-  <li>glsl: Add support for GLSL 1.30's modf built-in.</li>
-  <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
-  <li>generate_builtins.py: Output large strings as arrays of characters.</li>
-  <li>Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Fix constant component count in vector constructor emitting.</li>
-  <li>Fix build on systems where "python" is python 3.</li>
-  <li>i965: Add bit operation support to the fragment shader backend.</li>
-  <li>glsl: Remove unused ARRAY_SIZE macro.</li>
-  <li>glsl/builtins: Rename 'x' to 'y_over_x' in atan(float) implementation.</li>
-  <li>glsl/builtins: Clean up some ugly autogenerated code in atan.</li>
-  <li>Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Don't print a useless space at the end of an S-Expression list.</li>
-  <li>ir_reader: Return a specific ir_dereference variant.</li>
-  <li>ir_reader: Remove useless error check.</li>
-  <li>ir_reader: Fix some potential NULL pointer dereferences.</li>
-  <li>ir_dead_functions: Actually free dead functions and signatures.</li>
-  <li>glsl: Remove unnecessary "unused variable" warning suppression.</li>
-  <li>glsl: Remove GLSL_TYPE_FUNCTION define.</li>
-  <li>glsl: Convert glsl_type::base_type from #define'd constants to an enum.</li>
-  <li>glsl: Rework reserved word/keyword handling in the lexer.</li>
-  <li>glsl: Add new keywords and reserved words for GLSL 1.30.</li>
-  <li>glsl: Add support for the 'u' and 'U' unsigned integer suffixes.</li>
-  <li>glsl: Refresh autogenerated lexer and parser files.</li>
-  <li>generate_builtins.py: Fix inconsistent use of tabs and spaces warning.</li>
-  <li>glsl: Implement the asinh, acosh, and atanh built-in functions.</li>
-  <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Add constant expression handling for asinh, acosh, and atanh.</li>
-  <li>glsl: Remove unused and out of date Makefile.am.</li>
-  <li>glsl: Rename various ir_* files to lower_* and opt_*.</li>
-  <li>glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version &gt;= 1.30.</li>
-  <li>Refresh autogenerated glcpp parser.</li>
-  <li>glsl: Fix constant expression handling for &lt, &gt;, &lt=, &gt;= on vectors.</li>
-  <li>glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.</li>
-  <li>Regenerate glcpp parser.</li>
-  <li>glsl: Reimplement the "cross" built-in without ir_binop_cross.</li>
-  <li>Refresh autogenerated file builtin_function.cpp.</li>
-  <li>glsl: Remove the ir_binop_cross opcode.</li>
-  <li>glsl: Refactor get_num_operands.</li>
-  <li>glsl: Simplify a type check by using type-&gt;is_integer().</li>
-  <li>glsl: Combine many instruction lowering passes into one.</li>
-  <li>mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.</li>
-  <li>glsl: Don't inline function prototypes.</li>
-  <li>glsl: Use do_common_optimization in the standalone compiler.</li>
-  <li>glsl: Add a virtual as_discard() method.</li>
-  <li>glsl: Refactor out cloning of function prototypes.</li>
-  <li>glsl: Lazily import built-in function prototypes.</li>
-  <li>glsl: Remove anti-built-in hacks from the print visitor.</li>
-  <li>glsl/linker: Free any IR discarded by optimization passes.</li>
-  <li>glsl: Add an optimization pass to simplify discards.</li>
-  <li>glsl: Add a lowering pass to move discards out of if-statements.</li>
-  <li>glsl: Remove "discard" support from lower_jumps.</li>
-  <li>glsl: Add comments to lower_jumps (from the commit message).</li>
-  <li>ir_print_visitor: Print out constant structure values.</li>
-  <li>glsl: Factor out code which emits a new function into the IR stream.</li>
-  <li>symbol_table: Add support for adding a symbol at top-level/global scope.</li>
-  <li>glsl: Properly add functions during lazy built-in prototype importing.</li>
-  <li>glcpp: Don't emit SPACE tokens in conditional_tokens production.</li>
-  <li>Refresh autogenerated glcpp parser.</li>
-  <li>glsl: Clean up code by adding a new is_break() function.</li>
-  <li>glsl: Consider the "else" branch when looking for loop breaks.</li>
-  <li>Remove OES_compressed_paletted_texture from the ES2 extension list.</li>
-  <li>glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).</li>
-  <li>glsl: Support if-flattening beyond a given maximum nesting depth.</li>
-  <li>i965: Flatten if-statements beyond depth 16 on pre-gen6.</li>
-  <li>i965: Internally enable GL_NV_blend_square on ES2.</li>
-</ul></p>
-
-<p>Kristian Høgsberg (16):
-<ul>
-  <li>glx: Hold on to drawables if we're just switching to another context</li>
-  <li>intel: Fix GL_ARB_shading_language_120 commit</li>
-  <li>dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext</li>
-  <li>glx: Invalidate buffers after binding a drawable</li>
-  <li>dri: Pass the __DRIscreen and the __DRIscreen private back to image lookup</li>
-  <li>glx: Only remove drawables from the hash when we actually delete them</li>
-  <li>gles2: Add GL_EXT_texture_format_BGRA8888 support</li>
-  <li>Get rid of GL/internal/glcore.h</li>
-  <li>gl: Remove unused GLcontextModes fields</li>
-  <li>Rename GLvisual and __GLcontextModes to struct gl_config</li>
-  <li>Drop GLframebuffer typedef and just use struct gl_framebuffer</li>
-  <li>Drop GLcontext typedef and use struct gl_context instead</li>
-  <li>Drop the "neutral" tnl module</li>
-  <li>Only install vtxfmt tables for OpenGL</li>
-  <li>i965: Don't write mrf assignment for pointsize output</li>
-  <li>docs: Fix MESA_drm_image typo</li>
-</ul></p>
-
-<p>Krzysztof Smiechowicz (1):
-<ul>
-  <li>nvfx: Pair os_malloc_aligned() with os_free_aligned().</li>
-</ul></p>
-
-<p>Luca Barbieri (84):
-<ul>
-  <li>auxiliary: fix unintended fallthrough</li>
-  <li>glsl: add pass to lower variable array indexing to conditional assignments</li>
-  <li>auxiliary: fix depth-only and stencil-only clears</li>
-  <li>gallium: avoid the C++ keyword "template" in sw_winsys.h</li>
-  <li>softpipe: make z/s test always pass if no zsbuf, instead of crashing</li>
-  <li>tgsi: add switch/case opcodes to tgsi_opcode_tmp.h</li>
-  <li>softpipe: fix whitespace</li>
-  <li>d3d1x: add new Direct3D 10/11 COM state tracker for Gallium</li>
-  <li>d3d1x: add blob and signature extraction APIs</li>
-  <li>d3d1x: fix compilation with recent Wine versions installed</li>
-  <li>d3d1x: add missing file</li>
-  <li>d3d1x: actually enable and fix blob apis</li>
-  <li>d3d1x: fix build with compilers other than GCC 4.5</li>
-  <li>d3d1x: add template parameters to base class ctor calls for GCC 4.4</li>
-  <li>d3d1x: fix GCC 4.1/4.2 build</li>
-  <li>d3d1x: ignore errors while building docs</li>
-  <li>d3d1x: attempt to fix/workaround bug #30322</li>
-  <li>nvfx: remove gl_PointCoord hack</li>
-  <li>glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build</li>
-  <li>winsys: automatically build sw winsys needed by EGL and d3d1x</li>
-  <li>d3d1x: don't build progs automatically</li>
-  <li>d3d1x: add missing memory barrier</li>
-  <li>d3d1x: link with CXXFLAGS</li>
-  <li>d3d1x: fix cf analysis</li>
-  <li>d3d1x: fix warning</li>
-  <li>d3d1x: fix segfault when hashing</li>
-  <li>d3d1x: destroy native_display on adapter destruction</li>
-  <li>d3d1x: fix GUID declarations</li>
-  <li>d3d1x: redesign the HWND resolver interface</li>
-  <li>d3d1x: fix API name</li>
-  <li>d3d1x: define GUIDs in the normal way</li>
-  <li>d3d1x: add Wine dlls (tri, tex working, but no other testing)</li>
-  <li>d3d1x: properly reference count the backend</li>
-  <li>d3d1x: fix deadlocks on non-recursive mutex</li>
-  <li>d3d1x: bind NULL CSOs before destroying default CSOs on context dtor</li>
-  <li>d3d1x: initialize the mutex</li>
-  <li>d3d1x: autogenerate shader enums and text from def files</li>
-  <li>d3d1x: s/tpf/sm4/g</li>
-  <li>d3d1x: normalize whitespace</li>
-  <li>d3d1x: remove specstrings</li>
-  <li>d3d1x: minifix</li>
-  <li>d3d1x: rename context params</li>
-  <li>d3d11: rename screen params</li>
-  <li>d3d1x: rename params in misc and objects</li>
-  <li>d3d1x: rename parameters in dxgi</li>
-  <li>d3d11: obliterate IDL parameter names</li>
-  <li>d3d1x: remove specstrings.h include</li>
-  <li>d3d1x: flush the pipe context when presenting</li>
-  <li>d3d1x: remove another include specstrings.h</li>
-  <li>d3d1x: flush properly</li>
-  <li>d3d1x: add missing guid.cpp</li>
-  <li>d3d1x: fix build without system EGL/egl.h</li>
-  <li>d3d1x: add autogenerated files as prerequisites, so make builds them</li>
-  <li>d3d1x: obliterate IDL parameter names from d3d10.idl from Wine too</li>
-  <li>d3d1x: add shader dumping</li>
-  <li>d3d1x: add untested support for geometry shader translation</li>
-  <li>d3d1x: don't assert on unsupported resource types</li>
-  <li>d3d1x: fix CheckMultisampleQualityLevels</li>
-  <li>d3d1x: draw to the correct buffer</li>
-  <li>d3d1x: fix linking of dxbc2tgsi</li>
-  <li>nvfx: allow setting NULL constant buffers</li>
-  <li>nvfx: add RGB framebuffer format support in addition to BGR</li>
-  <li>d3d1x: don't crash on drivers not supporting vertex or geometry sampling</li>
-  <li>d3d1x: assert if X visual is not among enumerated visuals</li>
-  <li>d3d1x: stop using GLX in demos, just use the default visual</li>
-  <li>d3d1x: CRLF -&gt; LF in progs</li>
-  <li>mesa: make makedepend an hard requirement</li>
-  <li>gallium: add $(PROGS_DEPS) as dependencies for $(PROGS)</li>
-  <li>d3d1x: fix parallel build</li>
-  <li>d3d1x: add private gitignore file</li>
-  <li>d3d1x: fix progs linking if not all EGL platforms are enabled</li>
-  <li>d3d1x: link progs with CXXFLAGS</li>
-  <li>d3d11: advertise IDXGIDevice1, not just IDXGIDevice</li>
-  <li>d3d11: ignore StructureByteStride</li>
-  <li>d3d1x: link to libdrm for X11 platform too</li>
-  <li>ureg: support centroid interpolation</li>
-  <li>d3d1x: support centroid interpolation</li>
-  <li>d3d1x: properly support specifying MipLevels as 0</li>
-  <li>d3d1x: put proper calling convention in headers, fixes 64-bit builds</li>
-  <li>d3d1x: rework DXGI for occlusion testing and default width/height</li>
-  <li>d3d1x: fix Map</li>
-  <li>d3d11: fix reference counting so devices get freed</li>
-  <li>d3d1x: work around crash in widl</li>
-  <li>glsl: Unroll loops with conditional breaks anywhere (not just the end)</li>
-</ul></p>
-
-<p>Lucas Stach (1):
-<ul>
-  <li>nvfx: fill PIPE_CAP_PRIMITIVE_RESTART and PIPE_CAP_SHADER_STENCIL_EXPORT</li>
-</ul></p>
-
-<p>Marek Olšák (100):
-<ul>
-  <li>r300g: prevent creating multiple winsys BOs for the same handle</li>
-  <li>r300g/swtcl: fix CS overrun</li>
-  <li>st/mesa: fix assertion failure in GetTexImage for cubemaps</li>
-  <li>util: make calling remove_from_list multiple times in a row safe</li>
-  <li>r300g: fixup long-lived BO maps being incorrectly unmapped when flushing</li>
-  <li>r300g: make accessing map_list and buffer_handles thread-safe</li>
-  <li>r300g: fix a copy-paste typo for logging</li>
-  <li>r300g: fix the border color for every format other than PIPE_FORMAT_B8G8R8A8</li>
-  <li>Build r300g by default</li>
-  <li>util: fix util_pack_color for B4G4R4A4</li>
-  <li>r300g: fix macrotiling on R350</li>
-  <li>r300g: code cleanups</li>
-  <li>r300/compiler: fix projective mapping of 2D NPOT textures</li>
-  <li>r300/compiler: do not use copy propagation if SaturateMode is used</li>
-  <li>r300/compiler: fix shadow sampling with swizzled coords</li>
-  <li>r300g: add support for 3D NPOT textures without mipmapping</li>
-  <li>r300g: fix swizzling of texture border color</li>
-  <li>configure.ac: look for libdrm_radeon before building gallium/r300,r600</li>
-  <li>configure.ac: do not build xorg-r300g by default</li>
-  <li>Makefile: ensure Gallium's Makefile.xorg and SConscript.dri are in the tarball</li>
-  <li>r300g: add support for formats beginning with X, like X8R8G8B8</li>
-  <li>r300g: fix conditional rendering in non-wait path</li>
-  <li>r300g: add support for R8G8 colorbuffers</li>
-  <li>r300g: add support for L8A8 colorbuffers</li>
-  <li>update release notes for Gallium</li>
-  <li>r300g: fix microtiling for 16-bits-per-channel formats</li>
-  <li>r300g: do not print get_param errors in non-debug build</li>
-  <li>r300g: say no to PIPE_CAP_STREAM_OUTPUT and PIPE_CAP_PRIMITIVE_RESTART</li>
-  <li>mesa: allow FBO attachments of formats LUMINANCE, LUMINANCE_ALPHA, and INTENSITY</li>
-  <li>r300g: fix texture border for 16-bits-per-channel formats</li>
-  <li>st/mesa: support RGBA16 and use it for RGBA12 as well</li>
-  <li>r300g: add a default channel ordering of texture border for unhandled formats</li>
-  <li>r300g: mention ATI in the renderer string</li>
-  <li>r300g: rename has_hyperz -&gt; can_hyperz</li>
-  <li>r300g: turn magic numbers into names in the hyperz code</li>
-  <li>gallium: add CAPs for indirect addressing and lower it in st/mesa when needed</li>
-  <li>tgsi: fill out CAPs for indirect addressing</li>
-  <li>i915g: fill out CAPs for indirect addressing</li>
-  <li>i965g: fill out CAPs for indirect addressing</li>
-  <li>nv50: fill out CAPs for indirect addressing</li>
-  <li>nvfx: fill out CAPs for indirect addressing</li>
-  <li>r300g: fill out CAPs for indirect addressing</li>
-  <li>r600g: fill out CAPs for indirect addressing</li>
-  <li>svga: fill out CAPs for indirect addressing</li>
-  <li>r300g: fix texture border color for all texture formats</li>
-  <li>r300g: clean up redundancy in draw functions</li>
-  <li>r300g: return shader caps from Draw for SWTCL vertex shaders</li>
-  <li>r300g: remove the hack with OPCODE_RET</li>
-  <li>r300g: print FS inputs uninitialized due to hardware limits to stderr</li>
-  <li>r300g: fix rendering with no vertex elements</li>
-  <li>st/mesa: enable ARB_explicit_attrib_location and EXT_separate_shader_objects</li>
-  <li>docs: add GL 4.1 status</li>
-  <li>gallium: add PIPE_SHADER_CAP_SUBROUTINES</li>
-  <li>st/mesa: set MaxUniformComponents</li>
-  <li>u_blitter: use PIPE_TRANSFER_DISCARD to prevent cpu/gpu stall</li>
-  <li>r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction</li>
-  <li>r300/compiler: remove duplicate function rc_mask_to_swz</li>
-  <li>r300/compiler: add a function for swizzling a mask</li>
-  <li>r300/compiler: move util functions to radeon_compiler_util</li>
-  <li>u_blitter: interpolate clear color using a GENERIC varying instead of COLOR</li>
-  <li>st/mesa: fix texture border color for RED and RG base formats</li>
-  <li>util: rename u_mempool -&gt; u_slab</li>
-  <li>r300g: fix texture border color once again</li>
-  <li>r300/compiler: implement and lower OPCODE_CLAMP</li>
-  <li>ir_to_mesa: Add support for conditional discards.</li>
-  <li>r300g: fix texture swizzling with compressed textures on r400-r500</li>
-  <li>r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only</li>
-  <li>r300g: fix up cubemap texture offset computation</li>
-  <li>r300/compiler: disable the swizzle lowering pass in vertex shaders</li>
-  <li>r300g: fix build</li>
-  <li>r300g: use internal BO handle for add_buffer and write_reloc</li>
-  <li>r300g: implement simple transfer_inline_write for buffers</li>
-  <li>mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium</li>
-  <li>r300g: fix pointer arithmetic with void* in transfer_inline_write</li>
-  <li>r300g: do not remove unused constants if we are not near the limit</li>
-  <li>r300g: add capability bit index_bias_supported</li>
-  <li>r300g: one more r500_index_bias_supported leftover</li>
-  <li>r300g: do not use the index parameter in set_constant_buffer</li>
-  <li>r300g: cleanup winsys</li>
-  <li>r300g: optimize looping over atoms</li>
-  <li>st/mesa: initialize key in st_vp_varient</li>
-  <li>u_blitter: use util_is_format_compatible in the assert</li>
-  <li>r300g: cache packet dwords of 3D_LOAD_VBPNTR in a command buffer if possible</li>
-  <li>r300g: validate buffers only if any of bound buffers is changed</li>
-  <li>r300g: also revalidate the SWTCL vertex buffer after its reallocation</li>
-  <li>r300/compiler: don't terminate regalloc if we surpass max temps limit</li>
-  <li>r300/compiler: add a function to query program stats (alu, tex, temps..)</li>
-  <li>r300/compiler: cleanup rc_run_compiler</li>
-  <li>r300/compiler: do not print pair/tex/presub program stats for vertex shaders</li>
-  <li>r300/compiler: handle DPH and XPD in rc_compute_sources_for_writemask</li>
-  <li>r300/compiler: make lowering passes possibly use up to two less temps</li>
-  <li>r300/compiler: remove at least unused immediates if externals cannot be removed</li>
-  <li>r300/compiler: fix LIT in VS</li>
-  <li>r300/compiler: fix swizzle lowering with a presubtract source operand</li>
-  <li>r300g: fix rendering with a vertex attrib having a zero stride</li>
-  <li>r300g: finally fix the texture corruption on r3xx-r4xx</li>
-  <li>r300g/swtcl: re-enable LLVM</li>
-  <li>r300g: mark vertex arrays as dirty after a buffer_offset change</li>
-  <li>mesa: fix texel store functions for some float formats</li>
-  <li>r300/compiler: disable the rename_regs pass for loops</li>
-</ul></p>
-
-<p>Mario Kleiner (1):
-<ul>
-  <li>mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.</li>
-</ul></p>
-
-<p>Mathias Fröhlich (3):
-<ul>
-  <li>r300g: Avoid returning values in a static array, fixing a potential race</li>
-  <li>r600g: Only compare active vertex elements</li>
-  <li>st/mesa: Set PIPE_TRANSFER_DISCARD for GL_MAP_INVALIDATE_RANGE/BUFFFER_BIT</li>
-</ul></p>
-
-<p>Michal Krol (10):
-<ul>
-  <li>svga: Fix relative addressing translation for pixel shaders.</li>
-  <li>svga: Integer constant register file has a separate namespace.</li>
-  <li>tgsi/exec: Cleanup the remaining arithmetic instructions.</li>
-  <li>tgsi/exec: Get rid of obsolete condition codes.</li>
-  <li>tgsi/build: Reduce interface clutter.</li>
-  <li>graw/gdi: Initial commit.</li>
-  <li>scons: Hook-up graw-gdi target.</li>
-  <li>graw/gdi: Fix window dimensions.</li>
-  <li>os: Open file streams in binary mode.</li>
-  <li>graw: Export graw_save_surface_to_file().</li>
-</ul></p>
-
-<p>Nicolas Kaiser (26):
-<ul>
-  <li>swrast: remove duplicated include</li>
-  <li>egl: remove duplicated include</li>
-  <li>gallium/rtasm: remove duplicated include</li>
-  <li>gallium/util: remove duplicated include</li>
-  <li>gallium/i915: remove duplicated include</li>
-  <li>gallium/llvmpipe: remove duplicated include</li>
-  <li>gallium/softpipe: remove duplicated include</li>
-  <li>gallium/st: remove duplicated includes</li>
-  <li>gallium/winsys: remove duplicated include</li>
-  <li>glx: remove duplicated include</li>
-  <li>dri/common: remove duplicated include</li>
-  <li>dri/i810: remove duplicated include</li>
-  <li>dri/i915: remove duplicated include</li>
-  <li>dri/i965: remove duplicated include</li>
-  <li>dri/intel: remove duplicated include</li>
-  <li>dri/mga: remove duplicated include</li>
-  <li>dri/r128: remove duplicated include</li>
-  <li>dri/r300: remove duplicated include</li>
-  <li>dri/r600: remove duplicated include</li>
-  <li>dri/radeon: remove duplicated includes</li>
-  <li>dri/savage: remove duplicated include</li>
-  <li>main: remove duplicated includes</li>
-  <li>math: remove duplicated includes</li>
-  <li>st: remove duplicated include</li>
-  <li>i965g: use Elements macro instead of manual sizeofs</li>
-  <li>nv50: fix always true conditional in shader optimization</li>
-</ul></p>
-
-<p>Orion Poplawski (1):
-<ul>
-  <li>osmesa: link against libtalloc</li>
-</ul></p>
-
-<p>Owen W. Taylor (1):
-<ul>
-  <li>r600g: Fix location for clip plane registers</li>
-</ul></p>
-
-<p>Peter Clifton (3):
-<ul>
-  <li>intel: Fix emit_linear_blit to use DWORD aligned width blits</li>
-  <li>intel: Add assert check for blitting alignment.</li>
-  <li>meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear</li>
-</ul></p>
-
-<p>Robert Hooker (2):
-<ul>
-  <li>intel: Add a new B43 pci id.</li>
-  <li>egl_dri2: Add missing intel chip ids.</li>
-</ul></p>
-
-<p>Roland Scheidegger (16):
-<ul>
-  <li>gallivm: fix copy&amp;paste bug</li>
-  <li>gallivm: don't use URem/UDiv when calculating offsets for blocks</li>
-  <li>gallivm: optimize yuv decoding</li>
-  <li>gallivm: fix trunc/itrunc comment</li>
-  <li>gallivm: faster iround implementation for sse2</li>
-  <li>gallivm: replace sub/floor/ifloor combo with ifloor_fract</li>
-  <li>gallivm: optimize some tex wrap mode calculations a bit</li>
-  <li>gallivm: more linear tex wrap mode calculation simplification</li>
-  <li>gallivm: avoid unnecessary URem in linear wrap repeat case</li>
-  <li>gallivm: optimize soa linear clamp to edge wrap mode a bit</li>
-  <li>gallivm: make use of new iround code in lp_bld_conv.</li>
-  <li>gallivm: fix different handling of [non]normalized coords in linear soa path</li>
-  <li>gallivm: only use lp_build_conv 4x4f -&gt; 1x16 ub fastpath with sse2</li>
-  <li>r200: fix r200 large points</li>
-  <li>mesa: remove unneeded DD_POINT_SIZE and DD_LINE_WIDTH tricaps</li>
-  <li>gallium: support for array textures and related changes</li>
-</ul></p>
-
-<p>Shuang He (1):
-<ul>
-  <li>mesa: allow GLfixed arrays for OpenGL ES 2.0</li>
-</ul></p>
-
-<p>Stephan Schmid (1):
-<ul>
-  <li>r600g: fix relative addressing when splitting constant accesses</li>
-</ul></p>
-
-<p>Thomas Hellstrom (21):
-<ul>
-  <li>st/xorg: Don't try to use option values before processing options</li>
-  <li>xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers</li>
-  <li>st/xorg: Add a customizer option to get rid of annoying cursor update flicker</li>
-  <li>xorg/vmwgfx: Don't hide HW cursors when updating them</li>
-  <li>st/xorg: Don't try to remove invalid fbs</li>
-  <li>st/xorg: Fix typo</li>
-  <li>st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments</li>
-  <li>st/xorg: Fix compilation errors for Xservers compiled without Composite</li>
-  <li>st/xorg: Don't use deprecated x*alloc / xfree functions</li>
-  <li>xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions</li>
-  <li>st/xorg: Fix compilation for Xservers &gt;= 1.10</li>
-  <li>mesa: Make sure we have the talloc cflags when using the talloc headers</li>
-  <li>egl: Add an include for size_t</li>
-  <li>mesa: Add talloc includes for gles</li>
-  <li>st/egl: Fix build for include files in nonstandard places</li>
-  <li>svga/drm: Optionally resolve calls to powf during link-time</li>
-  <li>gallium/targets: Trivial crosscompiling fix</li>
-  <li>st/xorg: Add a function to flush pending rendering and damage</li>
-  <li>gallium/targets/xorg-vmwgfx: Xv fixes</li>
-  <li>xorg/vmwgfx: Flush even if we don't autopaint the color key</li>
-  <li>xorg/vmwgfx: Don't clip video to viewport</li>
-</ul></p>
-
-<p>Tilman Sauerbeck (35):
-<ul>
-  <li>r600g: Fixed a bo leak in r600_blit_state_ps_shader().</li>
-  <li>r600g: Use clamped math for RCP and RSQ.</li>
-  <li>r600g: Formatting fixes.</li>
-  <li>r600g: Added DB_SHADER_CONTROL defines.</li>
-  <li>r600g: Only set PA_SC_EDGERULE on rv770 and greater.</li>
-  <li>r600g: Enable PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED.</li>
-  <li>r600g: Fixed the shift in S_02880C_KILL_ENABLE.</li>
-  <li>glsl2: Empty functions can be inlined.</li>
-  <li>glsl2: Fixed cloning of ir_call error instructions.</li>
-  <li>r600g: Added support for TGSI_SEMANTIC_FACE.</li>
-  <li>gallium/docs: Fixed a typo in the SCS opcode description.</li>
-  <li>r600g: Honour destination operand's writemask in the SCS implementation.</li>
-  <li>r600g: Implemented the Z and W component write for the SCS opcode.</li>
-  <li>python/tests: Fixed tri.py for API and TGSI syntax changes.</li>
-  <li>r600g: Removed debug code.</li>
-  <li>gallium/docs: The RET opcode may appear anywhere in a subroutine.</li>
-  <li>r600g: Destroy the blitter.</li>
-  <li>r600g: Fixed two texture surface leaks in r600_blit_uncompress_depth().</li>
-  <li>r600g: Cleaned up index buffer reference handling in the draw module.</li>
-  <li>r600g: Fixed r600_vertex_element leak.</li>
-  <li>r600g: Added r600_pipe_shader_destroy().</li>
-  <li>r600g: Also clear bc data when we're destroying a shader.</li>
-  <li>r600g: In radeon_bo(), call LIST_INITHEAD early.</li>
-  <li>r600g: Destroy the blitter.</li>
-  <li>r600g: Removed unused 'ptr' argument from radeon_bo().</li>
-  <li>r600g: Made radeon_bo_pb_map_internal() actually call radeon_bo_map().</li>
-  <li>r600g: Fixed unmap condition in radeon_bo_pb_destroy().</li>
-  <li>r600g: Made radeon_bo::map_count signed.</li>
-  <li>r600g: We don't support PIPE_CAP_PRIMITIVE_RESTART.</li>
-  <li>r600g: Delete custom_dsa_flush on shutdown.</li>
-  <li>r600g: Fixed two memory leaks in winsys.</li>
-  <li>r600g: Destroy the winsys in r600_destroy_screen().</li>
-  <li>st/mesa: Reset the index buffer before destroying the pipe context.</li>
-  <li>st/mesa: Reset the constant buffers before destroying the pipe context.</li>
-  <li>r600g: Removed duplicated call to tgsi_split_literal_constant().</li>
-</ul></p>
-
-<p>Timo Wiren (1):
-<ul>
-  <li>Fix typos in comments and debug output strings.</li>
-</ul></p>
-
-<p>Tom Fogal (3):
-<ul>
-  <li>Implement x86_64 atomics for compilers w/o intrinsics.</li>
-  <li>Prefer intrinsics to handrolled atomic ops.</li>
-  <li>Revert "Prefer intrinsics to handrolled atomic ops."</li>
-</ul></p>
-
-<p>Tom Stellard (32):
-<ul>
-  <li>r300/compiler: Refactor the pair instruction data structures</li>
-  <li>r300g: Always try to build libr300compiler.a</li>
-  <li>r300/compiler: Fix two mistakes in the presubtract optimization pass.</li>
-  <li>r300/compiler: Add more helper functions for iterating through sources</li>
-  <li>r300/compiler: Print immediate values after "dead constants" pass</li>
-  <li>r300/compiler: radeon_remove_constants.c: fix indentation</li>
-  <li>r300/compiler: Use rc_for_all_reads_src() in "dead constants" pass</li>
-  <li>r300/compiler: Fix segfault in error path</li>
-  <li>r300/compiler: Don't use rc_error() unless the error is unrecoverable</li>
-  <li>r300/compiler: Don't merge instructions that write output regs and ALU result</li>
-  <li>r300/compiler: Create a helper function for merging presubtract sources</li>
-  <li>r300/compiler: Fix incorrect assumption</li>
-  <li>r300/compiler: Clear empty registers after constant folding</li>
-  <li>r300/compiler: Add a new function for more efficient dataflow analysis</li>
-  <li>r300g: Add new debug option for logging vertex/fragment program stats</li>
-  <li>r300/compiler: Use rc_get_readers_normal() for presubtract optimizations</li>
-  <li>r300/compiler: Don't clobber presubtract sources during optimizations</li>
-  <li>r300/compiler: Don't track readers into an IF block.</li>
-  <li>r300/compiler: Make sure presubtract sources use supported swizzles</li>
-  <li>r300/compiler: Fix register allocator's handling of loops</li>
-  <li>r300/compiler: Fix instruction scheduling within IF blocks</li>
-  <li>r300/compiler: Use zero as the register index for unused sources</li>
-  <li>r300/compiler: Ignore alpha dest register when replicating the result</li>
-  <li>r300/compiler: Add rc_get_readers()</li>
-  <li>r300/compiler: Handle BREAK and CONTINUE in rc_get_readers()</li>
-  <li>r300/compiler: Track readers through branches in rc_get_readers()</li>
-  <li>r300/compiler: Convert RGB to alpha in the scheduler</li>
-  <li>r300/compiler: Use presubtract operations as much as possible</li>
-  <li>r300/compiler: Enable rename_reg pass for r500 cards</li>
-  <li>r300/compiler: Add a more efficient version of rc_find_free_temporary()</li>
-  <li>r300/compiler: Don't allow presubtract sources to be remapped twice</li>
-  <li>r300/compiler: Fix black terrain in Civ4</li>
-</ul></p>
-
-<p>Victor Tseng (1):
-<ul>
-  <li>egl/i965: include inline_wrapper_sw_helper.h</li>
-</ul></p>
-
-<p>Viktor Novotný (6):
-<ul>
-  <li>dri/nouveau: Import headers from rules-ng-ng</li>
-  <li>dri/nouveau: nv04: Use rules-ng-ng headers</li>
-  <li>dri/nouveau: nv10: Use rules-ng-ng headers</li>
-  <li>dri/nouveau nv20: Use rules-ng-ng headers</li>
-  <li>dri/nouveau: Remove nouveau_class.h, finishing switch to rules-ng-ng headers</li>
-  <li>dri/nouveau: Clean up magic numbers in get_rt_format</li>
-</ul></p>
-
-<p>Vinson Lee (214):
-<ul>
-  <li>llvmpipe: Remove unnecessary header.</li>
-  <li>r600g: Remove unnecessary headers.</li>
-  <li>mesa: Include missing header in program.h.</li>
-  <li>glsl: Fix 'format not a string literal and no format arguments' warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>nvfx: Silence uninitialized variable warnings.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence unused variable warning.</li>
-  <li>nv50: Update files in SConscript to match Makefile.</li>
-  <li>nv50: Remove unnecessary headers.</li>
-  <li>nv50: Silence uninitialized variable warning.</li>
-  <li>nv50: Silence uninitialized variable warning.</li>
-  <li>nv50: Silence uninitialized variable warning.</li>
-  <li>gallivm: Remove unnecessary headers.</li>
-  <li>draw: Remove unnecessary header.</li>
-  <li>nv50: Silence uninitialized variable warnings.</li>
-  <li>nv50: Fix 'control reaches end of non-void function' warning.</li>
-  <li>mesa/st: Silence uninitialized variable warning.</li>
-  <li>gallivm: Remove unnecessary header.</li>
-  <li>r600g: Remove unnecessary header.</li>
-  <li>r600g: Remove unnecessary headers.</li>
-  <li>r600g: Fix implicit declaration warning.</li>
-  <li>r600g: Fix memory leak on error path.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence unused variable warnings.</li>
-  <li>mesa: bump version to 7.10</li>
-  <li>ir_to_mesa: Remove unused member array_indexed from struct statevar_element.</li>
-  <li>mesa: Silence "'valid_texture_object' defined but not used" warning.</li>
-  <li>x86: Silence unused variable warning on Mac OS X.</li>
-  <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
-  <li>nvfx: Remove const qualifer from nvfx_vertprog_translate.</li>
-  <li>nvfx: Silence uninitialized variable warnings.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>nv50: Silence missing initializer warning.</li>
-  <li>nv50: Remove dead initialization.</li>
-  <li>nv50: Remove dead initialization.</li>
-  <li>tgsi: Remove duplicate case value.</li>
-  <li>glut: Define markWindowHidden for non-Windows only.</li>
-  <li>glut: Define eventParser for non-Windows only.</li>
-  <li>r300g: Silence uninitialized variable warning.</li>
-  <li>intel: Fix implicit declaration of function '_mesa_meta_Bitmap' warning.</li>
-  <li>mesa: Remove unnecessary headers.</li>
-  <li>r600g: Remove unnecessary header.</li>
-  <li>unichrome: Remove unnecessary header.</li>
-  <li>intel: Remove unnecessary headers.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r600g: Disable unused variables.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r600g: Silence 'control reaches end of non-void function' warning.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r600g: Disable unused variables.</li>
-  <li>intel: Remove unnecessary header.</li>
-  <li>st/dri: Remove unnecessary header.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r300g: Remove unused variable.</li>
-  <li>r600g: Don't return a value in function returning void.</li>
-  <li>r600g: Remove unused variables.</li>
-  <li>r600g: Include p_compiler.h instead of malloc.h.</li>
-  <li>r600g: Silence uninitialized variable warnings.</li>
-  <li>scons: Add MinGW-w64 prefixes for MinGW build.</li>
-  <li>dri: Add GET_PROGRAM_NAME definition for Mac OS X.</li>
-  <li>scons: Add program/sampler.cpp to SCons build.</li>
-  <li>mesa: Fix printf format warning.</li>
-  <li>mesa: Fix printf format warning.</li>
-  <li>mesa: Fix printf format warning.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r600g: Update SConscript.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r600g: Update SConscript.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r600g: Update SConscript.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r600g: Fix SCons build.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Remove declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>glsl: Remove unnecessary header.</li>
-  <li>savage: Remove unnecessary header.</li>
-  <li>r600g: Remove unused variable.</li>
-  <li>r600g: Remove unnecessary headers.</li>
-  <li>r600g: Fix SCons build.</li>
-  <li>r600g: Remove unnecessary header.</li>
-  <li>gallivm: Remove unnecessary header.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>r600g: Silence uninitialized variable warning.</li>
-  <li>i915: Silence unused variable warning in non-debug builds.</li>
-  <li>i915: Silence unused variable warning in non-debug builds.</li>
-  <li>i965: Silence unused variable warning on non-debug builds.</li>
-  <li>i965: Silence unused variable warning on non-debug builds.</li>
-  <li>i965: Initialize member variables.</li>
-  <li>r300: Silence uninitialized variable warning.</li>
-  <li>tdfx: Silence unused variable warning on non-debug builds.</li>
-  <li>gallivm: Remove unnecessary header.</li>
-  <li>glsl: Initialize variable in ir_derefence_array::constant_expression_value</li>
-  <li>mesa: Add missing header to shaderobj.h.</li>
-  <li>llvmpipe: Return non-zero exit code for lp_test_round failures.</li>
-  <li>r300/compiler: Remove unused variable.</li>
-  <li>st/xorg: Fix memory leak on error path.</li>
-  <li>llvmpipe: Initialize state variable in debug_bin function.</li>
-  <li>llvmpipe: Initialize variable.</li>
-  <li>draw: Move loop variable declaration outside for loop.</li>
-  <li>r600g: Ensure r600_src is initialized in tgsi_exp function.</li>
-  <li>glsl: Add assert for unhandled ir_shader case.</li>
-  <li>swrast: Print out format on unexpected failure in _swrast_DrawPixels.</li>
-  <li>llvmpipe: Remove unnecessary header.</li>
-  <li>draw: Remove unnecessary header.</li>
-  <li>gallivm: Silence uninitialized variable warnings.</li>
-  <li>gallivm: Silence uninitialized variable warnings.</li>
-  <li>gallivm: Silence uninitialized variable warning.</li>
-  <li>r300g: Silence uninitialized variable warning.</li>
-  <li>mesa: Remove unnecessary headers.</li>
-  <li>r600g: Silence uninitialized variable warnings.</li>
-  <li>st/mesa: Remove unnecessary header.</li>
-  <li>mesa: Remove unnecessary header.</li>
-  <li>egl: Remove unnecessary headers.</li>
-  <li>swrast: Print out format on unexpected failure in _swrast_ReadPixels.</li>
-  <li>st/mesa: Silence uninitialized variable warning.</li>
-  <li>savage: Remove unnecessary header.</li>
-  <li>st/vega: Remove unnecessary headers.</li>
-  <li>dri/nouveau: Silence uninitialized variable warning.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>i965: Silence uninitialized variable warning.</li>
-  <li>i965: Silence uninitialized variable warning.</li>
-  <li>mesa: Clean up header file inclusion in accum.h.</li>
-  <li>mesa: Clean up header file inclusion in version.h.</li>
-  <li>mesa: Clean up header file inclusion in api_loopback.h.</li>
-  <li>mesa: Clean up header file inclusion in api_validate.h.</li>
-  <li>mesa: Include mfeatures.h in api_loopback for FEATURE_beginend.</li>
-  <li>mesa: Include mfeatures.h in api_validate.c for FEATURE_* symbols.</li>
-  <li>mesa: Clean up header file inclusion in arrayobj.h.</li>
-  <li>mesa: Clean up header file inclusion in atifragshader.h.</li>
-  <li>mesa: Clean up header file inclusion in attrib.h.</li>
-  <li>mesa: Clean up header file inclusion in blend.h.</li>
-  <li>mesa: Clean up header file inclusion in buffers.h.</li>
-  <li>mesa: Clean up header file inclusion in colortab.h.</li>
-  <li>mesa: Clean up header file inclusion in convolve.h.</li>
-  <li>mesa: Clean up header file inclusion in debug.h.</li>
-  <li>mesa: Clean up header file inclusion in depth.h.</li>
-  <li>mesa: Clean up header file inclusion in depthstencil.h.</li>
-  <li>mesa: Clean up header file inclusion in drawpix.h.</li>
-  <li>mesa: Clean up header file inclusion in drawtex.h.</li>
-  <li>mesa: Clean up header file inclusion in enable.h.</li>
-  <li>mesa: Clean up header file inclusion in extensions.h.</li>
-  <li>graw: Add struct pipe_surface forward declaration.</li>
-  <li>mesa: Clean up header file inclusion in fbobject.h.</li>
-  <li>mesa: Clean up header file inclusion in ffvertex_prog.h.</li>
-  <li>mesa: Clean up header file inclusion in fog.h.</li>
-  <li>mesa: Clean up header file inclusion in framebuffer.h.</li>
-  <li>mesa: Clean up header file inclusion in hint.h.</li>
-  <li>mesa: Clean up header file inclusion in histogram.h.</li>
-  <li>mesa: Clean up header file inclusion in image.h.</li>
-  <li>mesa: Add missing header and forward declarations in dd.h.</li>
-  <li>mesa: Clean up header file inclusion in light.h.</li>
-  <li>mesa: Clean up header file inclusion in lines.h.</li>
-  <li>mesa: Clean up header file inclusion in matrix.h.</li>
-  <li>mesa: Clean up header file inclusion in multisample.h.</li>
-  <li>mesa: Clean up header file inclusion in nvprogram.h.</li>
-  <li>winsys/xlib: Add cygwin to SConscript.</li>
-  <li>mesa: Clean up header file inclusion in pixel.h.</li>
-  <li>mesa: Clean up header file inclusion in pixelstore.h.</li>
-  <li>mesa: Fix printf format warnings.</li>
-  <li>mesa: Clean up header file inclusion in points.h.</li>
-  <li>i965: Silence uninitialized variable warning.</li>
-  <li>glsl: Add ir_constant_expression.cpp to SConscript.</li>
-  <li>mesa: Add definitions for inverse hyperbolic function on MSVC.</li>
-  <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
-  <li>glsl: Add lower_vector.cpp to SConscript.</li>
-  <li>glsl: Fix type of label 'default' in switch statement.</li>
-  <li>st/mesa: Remove unnecessary headers.</li>
-  <li>swrast: Remove unnecessary header.</li>
-  <li>r600: Remove unnecesary header.</li>
-  <li>intel: Remove unnecessary header.</li>
-  <li>mesa: Clean up header file inclusion in polygon.h.</li>
-  <li>mesa: Clean up header file inclusion in rastpos.h.</li>
-  <li>mesa: Clean up header file inclusion in readpix.h.</li>
-  <li>mesa: Clean up header file inclusion in renderbuffer.h.</li>
-  <li>mesa: Clean up header file inclusion in scissor.h.</li>
-  <li>mesa: Clean up header file inclusion in shaderapi.h.</li>
-  <li>mesa: Clean up header file inclusion in shared.h.</li>
-  <li>mesa: Clean up header file inclusion in stencil.h.</li>
-  <li>r600: Remove unnecessary header.</li>
-  <li>llvmpipe: Remove unnecessary headers.</li>
-  <li>mesa: Clean up header file inclusion in syncobj.h.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>r300/compiler: Move declaration before code.</li>
-  <li>mesa: Clean up header file inclusion in texcompress.h.</li>
-  <li>st/vega: Silence uninitialized variable warning.</li>
-  <li>mesa: Clean up header file inclusion in texcompress_s3tc.h.</li>
-  <li>mesa: Clean up header file inclusion in texenvprogram.h.</li>
-  <li>mesa: Clean up header file inclusion in texformat.h.</li>
-  <li>mesa: Clean up header file inclusion in texgetimage.h.</li>
-  <li>mesa: Clean up header file inclusion in texobj.h.</li>
-  <li>gallium/noop: Add prototype for noop_init_state_functions.</li>
-  <li>mesa: Clean up header file inclusion in texrender.h.</li>
-  <li>mesa: Clean up header file inclusion in transformfeedback.h.</li>
-  <li>mesa: Clean up header file inclusion in varray.h.</li>
-  <li>mesa: Clean up header file inclusion in viewport.h.</li>
-  <li>r200: Silence uninitialized variable warning.</li>
-  <li>r600g: Fix SCons build.</li>
-  <li>i965: Silence uninitialized variable warning.</li>
-</ul></p>
-
-<p>Xavier Chantry (8):
-<ul>
-  <li>nv50: fix size of outputs_written array</li>
-  <li>nv50: apply layout_mask to tile_flags</li>
-  <li>nvfx: only expose one rt on nv30</li>
-  <li>nvfx: fb-&gt;nr_cbufs &lt= 1 on nv30</li>
-  <li>nvfx: reset nvfx-&gt;hw_zeta</li>
-  <li>nvfx: fixes after array textures merge</li>
-  <li>init ps-&gt;context with util_surfaces_get and do_get</li>
-  <li>gallium/trace: check bind_vertex_sampler_states and set_vertex_sampler_views</li>
-</ul></p>
-
-<p>Xiang, Haihao (10):
-<ul>
-  <li>mesa: fix regression from b4bb6680200b5a898583392f4c831c02f41e63f7</li>
-  <li>i965: add support for polygon mode on Sandybridge.</li>
-  <li>i965: fix for flat shading on Sandybridge</li>
-  <li>i965: set minimum/maximum Point Width on Sandybridge</li>
-  <li>meta: allow nested meta operations</li>
-  <li>i965: support for two-sided lighting on Sandybridge</li>
-  <li>i965: fix register region description</li>
-  <li>i965: use align1 access mode for instructions with execSize=1 in VS</li>
-  <li>i965: don't spawn GS thread for LINELOOP on Sandybridge</li>
-  <li>i965: use BLT to clear buffer if possible on Sandybridge</li>
-</ul></p>
-
-<p>Zack Rusin (8):
-<ul>
-  <li>rbug: fix rbug when contexts are being destroyed</li>
-  <li>llvmpipe: fix rasterization of vertical lines on pixel boundaries</li>
-  <li>scons: build the xorg state trackers only when env includes drm</li>
-  <li>gallivm: implement indirect addressing of the output registers</li>
-  <li>gallivm: implement indirect addressing over inputs</li>
-  <li>gallivm: fix storing of the addr register</li>
-  <li>scons: add alias for identity</li>
-  <li>gallium/util: add states relevant to geometry shaders</li>
-</ul></p>
-
-<p>Zhenyu Wang (40):
-<ul>
-  <li>i965: disasm quarter and write enable instruction control on sandybridge</li>
-  <li>i965: new state dump for sandybridge</li>
-  <li>i965: enable accumulator update in PS kernel too on sandybridge</li>
-  <li>i965: Fix color interpolation on sandybridge</li>
-  <li>i965: force zero in clipper to ignore RTAIndex on sandybridge</li>
-  <li>i965: fix point size setting in header on sandybridge</li>
-  <li>i965: ff sync message change for sandybridge</li>
-  <li>i965: ignore quads for GS kernel on sandybridge</li>
-  <li>i965: add sandybridge viewport state bo into validation list</li>
-  <li>i965: VS use SPF mode on sandybridge for now</li>
-  <li>i965: fix jump count on sandybridge</li>
-  <li>i965: Fix sampler on sandybridge</li>
-  <li>i965: fix const register count for sandybridge</li>
-  <li>i965: Add all device ids for sandybridge</li>
-  <li>i965: sandybridge pipe control workaround before write cache flush</li>
-  <li>i965: only allow SIMD8 kernel on sandybridge now</li>
-  <li>i965: don't do calculation for delta_xy on sandybridge</li>
-  <li>i965: fix pixel w interpolation on sandybridge</li>
-  <li>i965: enable polygon offset on sandybridge</li>
-  <li>i965: fix scissor state on sandybridge</li>
-  <li>i965: fix point sprite on sandybridge</li>
-  <li>i965: fix occlusion query on sandybridge</li>
-  <li>i965: fallback bitmap operation on sandybridge</li>
-  <li>i965: Always set tiling for depth buffer on sandybridge</li>
-  <li>i965: fallback lineloop on sandybridge for now</li>
-  <li>Revert "i965: Always set tiling for depth buffer on sandybridge"</li>
-  <li>i965: always set tiling for fbo depth buffer on sandybridge</li>
-  <li>i965: Fix GS hang on Sandybridge</li>
-  <li>Revert "i965: fallback lineloop on sandybridge for now"</li>
-  <li>i965: refresh wm push constant also for BRW_NEW_FRAMENT_PROGRAM on gen6</li>
-  <li>i965: fix dest type of 'endif' on sandybridge</li>
-  <li>Revert "i965: VS use SPF mode on sandybridge for now"</li>
-  <li>i965: also using align1 mode for math2 on sandybridge</li>
-  <li>i965: Fix GS state uploading on Sandybridge</li>
-  <li>i965: upload WM state for _NEW_POLYGON on sandybridge</li>
-  <li>i965: Use MI_FLUSH_DW for blt ring flush on sandybridge</li>
-  <li>i965: explicit tell header present for fb write on sandybridge</li>
-  <li>i965: Fix occlusion query on sandybridge</li>
-  <li>i965: Use last vertex convention for quad provoking vertex on sandybridge</li>
-  <li>i965: Fix provoking vertex select in clip state for sandybridge</li>
-</ul></p>
-
-<p>Zou Nan hai (1):
-<ul>
-  <li>i965: skip too small size mipmap</li>
-</ul></p>
-
-<p>delphi (2):
-<ul>
-  <li>draw: added userclip planes and updated variant_key</li>
-  <li>draw: some changes to allow for runtime changes to userclip planes</li>
-</ul></p>
-
-<p>nobled (3):
-<ul>
-  <li>r300g: Abort if atom allocations fail</li>
-  <li>r300g: Abort if draw_create() fails</li>
-  <li>r300g: Drop unnecessary cast</li>
-</ul></p>
-
-<p>pontus lidman (1):
-<ul>
-  <li>mesa: check for posix_memalign() errors</li>
-</ul></p>
-
-<p>richard (2):
-<ul>
-  <li>evergreen : fix z format setting, enable stencil.</li>
-  <li>r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well.</li>
-</ul></p>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.2.html b/docs/relnotes-7.2.html
deleted file mode 100644
index 0ad3b5b..0000000
--- a/docs/relnotes-7.2.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.2 Release Notes / 20 September 2008</H1>
-
-<p>
-Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a
-new development release.
-</p>
-<p>
-Mesa 7.2 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-Note that this version of Mesa does not use the GEM memory manager.
-The master branch of git uses GEM.
-The prototype DRI2 code that was in 7.1 has also been removed.
-</p>
-<p>
-DRM version 2.3.1 should be used with Mesa 7.2
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-81a2a4b7cbfce7553f7ad8d924edbe2f  MesaLib-7.2.tar.gz
-04d379292e023df0b0266825cb0dbde5  MesaLib-7.2.tar.bz2
-8bc497a37977a55e987a4d1fabc3d882  MesaLib-7.2.zip
-10c762e39486df395838af1d7b57e69c  MesaDemos-7.2.tar.gz
-22e03dc4038cd63f32c21eb60994892b  MesaDemos-7.2.tar.bz2
-1197bc4eb3bf44e291c14d4eb2e19381  MesaDemos-7.2.zip
-42e3c6c6d156cd9dc545dbef72407354  MesaGLUT-7.2.tar.gz
-f67daf93e12c4a459703bbf3e4004e31  MesaGLUT-7.2.tar.bz2
-0390567eb2c2d12fbf82e8523fd77e2b  MesaGLUT-7.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>i965 driver: added support for G41 chipset (Intel)
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed display list bug involving primitives split across lists (bug 17564)
-<li>Fixed some issues with glBindAttribLocation()
-<li>Fixed crash in _tnl_InvalidateState() found with Amira (bug 15834)
-<li>Assorted bug fixes for Ming build
-<li>Fixed some vertex/pixel buffer object reference counting bugs
-<li>Fixed depth/stencil bug in i915/945 driver
-<li>Fixed some shader flow control bugs in i965 driver
-<li>Fixed a few tdfx driver bugs which prevented driver from working
-<li>Fixed multisample enable/disable bug
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Updated SGI header files with new license terms.
-</ul>
-
-
-
-<h2>To Do (someday) items</h2>
-<ul>
-<li>Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
-Probably do the same for malloc, calloc, etc.
-The wrappers were useful in the past for memory debugging but now we
-have valgrind.  Not worried about SunOS 4 support anymore either...
-<li>Switch to freeglut
-<li>Fix linux-glide target/driver.
-<li>Improved lambda and derivative calculation for frag progs.
-</ul>
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
deleted file mode 100644
index df89884..0000000
--- a/docs/relnotes-7.3.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.3 Release Notes / 22 January 2009</H1>
-
-<p>
-Mesa 7.3 is a new development release.
-Users especially concerned with stability should stick with latest
-stable release: version 7.2.
-</p>
-<p>
-Mesa 7.3 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-8ed03191432b22d118d88d6db497f304  MesaLib-7.3.tar.gz
-781e7811a6ed5c97b2b8defefc8ffbc9  MesaLib-7.3.tar.bz2
-3ccba9a1734ed6d4b3389e1535d90fbf  MesaLib-7.3.zip
-d312e974b31043b13b61bac5fbf00b87  MesaDemos-7.3.tar.gz
-3f0741394069bdf2329565a387396cda  MesaDemos-7.3.tar.bz2
-4d0887fd4c66a824295cdd619f6d34cb  MesaDemos-7.3.zip
-2d7661b66022bcb8878728f3d5bd33ab  MesaGLUT-7.3.tar.gz
-abe8036a724c1a483bdad6b5a55ddc1a  MesaGLUT-7.3.tar.bz2
-5f247819b47e2a7c62d07a6afe5262fb  MesaGLUT-7.3.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Support for GLSL 1.20
-<li>Intel DRI drivers now use GEM and DRI2
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Assorted GLSL bug fixes
-<li>Assorted i965 driver fixes
-<li>Fix for wglCreateLayerContext() in WGL/Windows driver
-<li>Build fixes for OpenBSD and gcc 2.95
-<li>GLSL preprocessor handles #pragma now
-<li>Fix incorrect transformation of GL_SPOT_DIRECTION
-<li>Fixed several bugs (#18367 and #19625) in glXMakeContextCurrent()
-<li>Assorted Windows build fixes
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Deprecated the "XMesa" interface (include/GL/xmesa*.h files)
-<li>Deprecated the "FXMesa" interface (include/GL/fxmesa.h file)
-<li>Deprecated the "Allegro" interface (include/GL/amesa.h file)
-<li>Removed include/GL/uglmesa.h header
-<li>Removed include/GLView.h header for BeOS
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.4.1.html b/docs/relnotes-7.4.1.html
deleted file mode 100644
index 40f4fb1..0000000
--- a/docs/relnotes-7.4.1.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.4.1 Release Notes / 18 April 2009</H1>
-
-<p>
-Mesa 7.4.1 is a stable development release fixing bugs since the 7.4 release.
-</p>
-<p>
-Mesa 7.4.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-0c3a72f3295a53a134c04bd7d209ea62  MesaLib-7.4.1.tar.gz
-423260578b653818ba66c2fcbde6d7ad  MesaLib-7.4.1.tar.bz2
-84f78b154d4bd5c3ecc42eeff2e56676  MesaLib-7.4.1.zip
-aa0ad323e59d6d10ff33ac0dde462a60  MesaDemos-7.4.1.tar.gz
-1e169fb6abc2b45613f1c98a82dfe690  MesaDemos-7.4.1.tar.bz2
-294e42be2d74176596c994ec23322fcf  MesaDemos-7.4.1.zip
-92373bfa48e7b68dddf356e86b0e5699  MesaGLUT-7.4.1.tar.gz
-336f3824b578b072211e0beecf4f04f4  MesaGLUT-7.4.1.tar.bz2
-20751388d8ef16b42d25d9e3d705d101  MesaGLUT-7.4.1.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed a two-sided lighting bug in fixed-function-to-GPU code generation
-<li>Fixed some Darwin issues (Jeremy Huddleston)
-<li>Indexing the GLSL gl_EyePlane[] or gl_ObjectPlane[] arrays with a variable
-    was broken, bug 20986
-<li>Fixed incorrect texture unit bias in TXB instruction
-<li>glTexParameter settings weren't always propogated to drivers
-<li>Assorted vertex/fragment program bug fixes
-<li>Fixed point rendering in software rasterizer
-<li>Fixed potential deadlock in object hash functions
-<li>Fix a couple bugs surrounding front-buffer rendering with DRI2, but this
-    is not quite complete.
-<li>Fixed glPopAttrib() bug when restoring user clip planes
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.4.2.html b/docs/relnotes-7.4.2.html
deleted file mode 100644
index 7d066e4..0000000
--- a/docs/relnotes-7.4.2.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.4.2 Release Notes / May 15, 2009</H1>
-
-<p>
-Mesa 7.4.2 is a stable development release fixing bugs since the 7.4.1 release.
-</p>
-<p>
-Mesa 7.4.2 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-172f5193154dad731387f97bd44ab68f  MesaLib-7.4.2.tar.gz
-b10a76e32bde4645cfc34ea0416d7d8b  MesaLib-7.4.2.tar.bz2
-cc6dfc2efd424cc342b84e6bcd78ce5d  MesaLib-7.4.2.zip
-182a7e78aa7a480b3650a5c956dbddd1  MesaDemos-7.4.2.tar.gz
-bf559a0485667a3bfa4513a23501579b  MesaDemos-7.4.2.tar.bz2
-5379e622b65e8c22022dba34aeb6f4f9  MesaDemos-7.4.2.zip
-7cc43c1c35bf6a279a16e063dea3b8c5  MesaGLUT-7.4.2.tar.gz
-e0dfc44d537904a030861e5b3c760c11  MesaGLUT-7.4.2.tar.bz2
-4a6cf5bbbac190d6ba97448b3098b7f4  MesaGLUT-7.4.2.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed segfault when rendering to front buffer with DRI 1.
-<li>Fixed swrast texture rectangle bug when wrap mode = GL_CLAMP_TO_BORDER and
-    filter mode = GL_LINEAR.  (bug 21461)
-<li>Fixed texture object mem leak during context destruction.
-<li>Fixed a state validation bug in glCopyTex[Sub]Image()
-<li>Fixed some i965 GLSL bugs.
-<li>Fixed an R300 driver texture object bad memory reference.
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.4.3.html b/docs/relnotes-7.4.3.html
deleted file mode 100644
index 35b5dcc..0000000
--- a/docs/relnotes-7.4.3.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.4.3 Release Notes / 19 June 2009</H1>
-
-<p>
-Mesa 7.4.3 is a stable development release fixing bugs since the 7.4.2 release.
-</p>
-<p>
-Mesa 7.4.3 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-34c5a6c47ed51f31c4fa36e269831352  MesaLib-7.4.3.tar.gz
-70a983ba3deaa8bd63b18bbab283f698  MesaLib-7.4.3.tar.bz2
-34f21b3205b271d575030aa98a2dda51  MesaLib-7.4.3.zip
-56752b7adede212e6097afb10d0c0d59  MesaDemos-7.4.3.tar.gz
-8ffa51c4833b1e298300a005e2d7ca2a  MesaDemos-7.4.3.tar.bz2
-0037d24d41400d6fb9800ae55b8c863f  MesaDemos-7.4.3.zip
-20e24f6692c0c90e7e3b220f79c4108d  MesaGLUT-7.4.3.tar.gz
-03a4beeef74fc5ef0b1d6d04710e5a8a  MesaGLUT-7.4.3.tar.bz2
-273788230adbdb9d57371309adedcf5f  MesaGLUT-7.4.3.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed texture object reference counting bug (bug 21756)
-<li>Allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT point
-    (SF bug 2793846)
-<li>Added missing glGet case for GL_VERTEX_ARRAY_BINDING_APPLE
-<li>Fixed some OSMesa build issues
-<li>Fixed a vertex buffer object crash
-<li>Fixed broken glTexImage3D() when image type = GL_BITMAP
-<li>Fixed some GLSL preprocessor bugs
-<li>Fixed framebuffer mem leak in i945/i965 DRI drivers
-<li>Fixed texture coordinate repeat bug in swrast (bug 21872)
-<li>Fixed incorrect viewport clamping (lower bound is zero, not one)
-<li>GLX fix for glean's makeCurrent test case
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.4.4.html b/docs/relnotes-7.4.4.html
deleted file mode 100644
index 2a34568..0000000
--- a/docs/relnotes-7.4.4.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.4.4 Release Notes / 23 June 2009</H1>
-
-<p>
-Mesa 7.4.4 is a stable development release fixing bugs since the 7.4.3 release.
-</p>
-<p>
-Mesa 7.4.4 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-0b56fe5a88ab0c3c5b2da5068f63f416  MesaLib-7.4.4.tar.gz
-b66528d314c574dccbe0ed963cac5e93  MesaLib-7.4.4.tar.bz2
-2818076f3ba23fa87fdfe4602a637a18  MesaLib-7.4.4.zip
-3e77b208386c47b18165bce5ae317e2c  MesaDemos-7.4.4.tar.gz
-628142ec9a54cd28cc027e6ce26cff47  MesaDemos-7.4.4.tar.bz2
-d08a30d30ab7174859aa709cba6c726d  MesaDemos-7.4.4.zip
-e6e91ba16e274d40cf3a97ad3218af01  MesaGLUT-7.4.4.tar.gz
-e14bbb52517e8121b31f1387515365ab  MesaGLUT-7.4.4.tar.bz2
-f10ed20469753c2b3d68c99854f80fd4  MesaGLUT-7.4.4.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed i965/i915 segfault in screen destruction (bug 22408)
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.4.html b/docs/relnotes-7.4.html
deleted file mode 100644
index 55ba019..0000000
--- a/docs/relnotes-7.4.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.4 Release Notes / 27 March 2009</H1>
-
-<p>
-Mesa 7.4 is a stable development release fixing bugs since the 7.3 release.
-</p>
-<p>
-Mesa 7.4 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-ed6bd7437177307e51e16d0c7c381dfa  MesaLib-7.4.tar.gz
-7ecddb341a2691e0dfdb02f697109834  MesaLib-7.4.tar.bz2
-433e823f8245f9fd5f397e7b719a8e47  MesaLib-7.4.zip
-656eee6128016fb237e01aa8dabbc703  MesaDemos-7.4.tar.gz
-02816f10f30b1dc5e069e0f68c177c98  MesaDemos-7.4.tar.bz2
-44a70d6db4aa4c64ecc47871b6aceee8  MesaDemos-7.4.zip
-25f80db4f8645cd3e58e2c9af53ec341  MesaGLUT-7.4.tar.gz
-04ec01caebde44f5b0d619f00716b368  MesaGLUT-7.4.tar.bz2
-019dc213baecaa3cb1278847d41b8591  MesaGLUT-7.4.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Added MESA_GLX_FORCE_DIRECT env var for Xlib/software driver
-<li>GLSL version 1.20 is returnd by the GL_SHADING_LANGUAGE_VERSION query
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>glGetActiveUniform() returned wrong size for some array types
-<li>Fixed some error checking in glUniform()
-<li>Fixed a potential glTexImage('proxy target') segfault
-<li>Fixed bad reference counting for 1D/2D texture arrays
-<li>Fixed VBO + glPush/PopClientAttrib() bug #19835
-<li>Assorted i965 driver bug fixes
-<li>Fixed a Windows compilation failure in s_triangle.c
-<li>Fixed a GLSL array indexing bug
-<li>Fixes for building on Haiku
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Updated GL/glxext.h to version 48
-<li>Assorted updates for building on Solaris
-</ul>
-
-
-
-<h2>Driver Status</h2>
-
-<pre>
-Driver			Status
-----------------------	----------------------
-DRI drivers		varies with the driver
-XMesa/GLX (on Xlib)	implements OpenGL 2.1
-OSMesa (off-screen)	implements OpenGL 2.1
-Windows/Win32		implements OpenGL 2.1
-Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
-SVGA			unsupported
-Wind River UGL		unsupported
-DJGPP			unsupported
-GGI			unsupported
-BeOS			unsupported
-Allegro			unsupported
-D3D			unsupported
-</pre>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.5.1.html b/docs/relnotes-7.5.1.html
deleted file mode 100644
index 1a4f608..0000000
--- a/docs/relnotes-7.5.1.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.5.1 Release Notes, 3 September 2009</H1>
-
-<p>
-Mesa 7.5.1 is a bug-fix release fixing issues found since the 7.5 release.
-</p>
-<p>
-The main new feature of Mesa 7.5.x is the
-<a href="http://wiki.freedesktop.org/wiki/Software/gallium"
-target="_parent">Gallium3D</a> infrastructure.
-</p>
-<p>
-Mesa 7.5.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-d7269e93bc7484430637d54ced250876  MesaLib-7.5.1.tar.gz
-877d6a4b24efc2b1d02aa553f262cba8  MesaLib-7.5.1.tar.bz2
-23f4fb757a05c8396425681234ae20e5  MesaLib-7.5.1.zip
-5af4bd113652108f5cec5113dad813f2  MesaDemos-7.5.1.tar.gz
-785402e3b9f0e335538fcc6bf19f6987  MesaDemos-7.5.1.tar.bz2
-950058cc6d6106e9c7d5876a03789fe9  MesaDemos-7.5.1.zip
-cb52ce2c93389c2711cbe8d857ec5303  MesaGLUT-7.5.1.tar.gz
-e3a9892e056d625c5353617a7c5b7e9c  MesaGLUT-7.5.1.tar.bz2
-da1de364df148c94b4994006191a1e69  MesaGLUT-7.5.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Added configure --with-max-width=W, --with-max-height=H options to specify
-    max framebuffer, viewport size.
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Added missing GLEW library to MesaDemos tarballs.
-<li>Fixed swapbuffers jerkiness in Doom3/etc in Intel drivers.
-<li>Fixed front buffer rendering bug in Intel drivers.
-<li>Fixed minor GLX memory leaks.
-<li>Fixed some texture env / fragment program state bugs.
-<li>Fixed some Gallium glBlitFramebuffer() bugs
-<li>Empty glBegin/glEnd() pair could cause divide by zero (bug 23489)
-<li>Fixed Gallium glBitmap() Z position bug
-<li>Setting arrays of sampler uniforms did not work
-<li>Selection/Feedback mode didn't handle polygon culling correctly (bug 16866)
-<li>Fixed 32/64-bit cross compilation issue in gen_matypes.c
-<li>Fixed glXCreateGLXPixmap() for direct rendering.
-<li>Fixed Gallium glCopyPixels(GL_STENCIL_INDEX) mispositioned image bug.
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/relnotes-7.5.2.html b/docs/relnotes-7.5.2.html
deleted file mode 100644
index 5c395d9..0000000
--- a/docs/relnotes-7.5.2.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.5.2 Release Notes, 28 September 2009</H1>
-
-<p>
-Mesa 7.5.2 is a bug-fix release fixing issues found since the 7.5.1 release.
-</p>
-<p>
-The main new feature of Mesa 7.5.x is the
-<a href="http://wiki.freedesktop.org/wiki/Software/gallium"
-target="_parent">Gallium3D</a> infrastructure.
-</p>
-<p>
-Mesa 7.5.2 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-43a90191dd9f76cd65dcc1ac91f3be70  MesaLib-7.5.2.tar.gz
-94e47a499f1226803869c2e37a6a8e3a  MesaLib-7.5.2.tar.bz2
-1ecb822b567ad67a0617361d45206b67  MesaLib-7.5.2.zip
-2718fdce7e075911d6147beb8f27104b  MesaDemos-7.5.2.tar.gz
-4e0f5ccd58afe21eddcd94327d926e86  MesaDemos-7.5.2.tar.bz2
-f621f8c223b278d7c8e49a012d56ca25  MesaDemos-7.5.2.zip
-83c16c1d6bcfcc3f97aab5d2fe430b4c  MesaGLUT-7.5.2.tar.gz
-e5d03bedae369ea3705783573bb33813  MesaGLUT-7.5.2.tar.bz2
-e82ba28e00d653e6f437d32be8ca8481  MesaGLUT-7.5.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Detect B43 chipset in Intel driver
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Assorted bug fixes for i965/i945 drivers
-<li>Fixed Gallium glDrawPixels(GL_STENCIL_INDEX) failure.
-<li>Fixed GLSL linker/preprocessor version directive issue seen in Wine
-    (such as bug 23946)
-<li>glUseProgram() is now compiled into display lists (bug 23746).
-<li>glUniform functions are now compiled into display lists
-<li>Auto mipmap generation didn't work reliably with Gallium.
-<li>Fixed random number usage in GLX code.
-<li>Fixed invalid GL_OUT_OF_MEMORY error sometimes raised by glTexSubImage2D
-    when using Gallium.
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.5.html b/docs/relnotes-7.5.html
deleted file mode 100644
index 56deca6a8..0000000
--- a/docs/relnotes-7.5.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.5 Release Notes / 17 July 2009</H1>
-
-<p>
-Mesa 7.5 is a new development release.
-People who are concerned with stability and reliability should stick
-with the 7.4.x branch or wait for Mesa 7.5.1.
-</p>
-<p>
-The main new feature of Mesa 7.5 is the
-<a href="http://wiki.freedesktop.org/wiki/Software/gallium"
-target="_parent">Gallium3D</a> infrastructure.
-</p>
-<p>
-Mesa 7.5 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-<p>
-Note that the Mesa project is no longer using odd/even version numbers
-to indicate development/stable releases.
-The so-called development releases have been fairly stable.
-If you're especially concerned with stability you should probably look for
-"point" releases such as 7.5.1 which will be a bug-fix release.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-553fd956e544727f30fbe249619b6286  MesaLib-7.5.tar.gz
-459f332551f6ebb86f384d21dd15e1f0  MesaLib-7.5.tar.bz2
-8c02c0e17a9025250d20424ae32f5163  MesaLib-7.5.zip
-a188da2886fa5496ea0c2cda602b2eeb  MesaDemos-7.5.tar.gz
-398ee8801814a00e47f6c2314e3dfddc  MesaDemos-7.5.tar.bz2
-15a0c8ae013c54335a26335e1a98d609  MesaDemos-7.5.zip
-81010147def5a644ba14f9bbb7a49a2a  MesaGLUT-7.5.tar.gz
-baa7a1e850b6e39bae58868fd0684004  MesaGLUT-7.5.tar.bz2
-265228418e4423fa328f2f5b7970cf08  MesaGLUT-7.5.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Gallium3D - this is the new architecture for OS-independent and
-    API-independent 3D drivers.
-    Gallium3D is intended for GPUs that fully support  vertex/fragment shaders.
-    The Gallium3D drivers currently included are:
-    <ul>
-    <li>softpipe - a software/reference driver
-    <li>i915 - Intel 915/945 driver
-    <li><a href="cell.html">Cell</a> - IBM/Sony/Toshiba Cell processor driver
-    <li>nouveau (for NVIDIA GPUs) and R300 for (AMD/ATI R300).
-        <b>PLEASE NOTE: these drivers are incomplete and still under development.
-        It's probably NOT worthwhile to report any bugs unless you have patches.
-        </b>
-    </ul>
-<li>GL_ARB_framebuffer_object extension (software drivers, i965 driver)
-<li>Reworked two-sided stencil support.
-This allows a driver to support all three variations of two-sided stencil
-including GL_ATI_separate_stencil, GL_EXT_stencil_two_side and OpenGL 2.0
-<li>GL_EXT_vertex_array_bgra extension (software drivers, i965 driver)
-<li>GL_NV_texture_env_combine4 extension (software drivers, i965/i915 drivers)
-<li>GL_EXT_texture_swizzle extension (software drivers, i965 driver)
-<li>Updated SPARC assembly optimizations (David S. Miller)
-<li>Initial support for separate compilation units in GLSL compiler.
-<li>Increased max number of generic GLSL varying variables to 16 (formerly 8).
-<li>GLSL linker now detects when too many varying variables are used.
-<li>Optimize-out redundant glMaterial and glShadeModel calls in display lists
-<li>Fixed gl_TextureMatrix[i][j] array indexing bug in GLSL compiler.
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Lots of i965 driver bug fixes
-<li>Fixed some GLSL preprocessor bugs
-<li>GLSL: continue inside of a for-loop didn't work
-</ul>
-
-
-<h2>Changes</h2>
-<ul>
-<li>Remove support for GL_SGIX_shadow, GL_SGIX_shadow_ambient and
-GL_SGIX_depth_texture extensions.  Superseded by the ARB versions.
-<li>Omitted some old Mesa demos from the release tarballs, added some others.
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html
deleted file mode 100644
index 1d0ecd2..0000000
--- a/docs/relnotes-7.6.1.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.6.1 Release Notes, 21 December 2009</H1>
-
-<p>
-Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6.
-</p>
-<p>
-Mesa 7.6.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-e80fabad2e3eb7990adae773d6aeacba  MesaLib-7.6.1.tar.gz
-7db4617e9e10ad3aca1b64339fd71b7d  MesaLib-7.6.1.tar.bz2
-dd3275dbf9833480d2e92d0c69b22abd  MesaLib-7.6.1.zip
-f7fdcfe3c0f363e571c60f02f74368fb  MesaDemos-7.6.1.tar.gz
-a4226f06732a02556fcf6be290b86dff  MesaDemos-7.6.1.tar.bz2
-849425f356bd940726cebedfa79de176  MesaDemos-7.6.1.zip
-d40cc7c5e337a85b674e27a8e494f52f  MesaGLUT-7.6.1.tar.gz
-ca9aecb91f05b1da9fd7d5eeb19d47d7  MesaGLUT-7.6.1.tar.bz2
-23fad8398004c977a1d8953079b72ca6  MesaGLUT-7.6.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>Upgraded GL/glext.h to version 56, GL/glxext.h to version 25,
-    GL/wglext.h to version 17
-<li>New 3D driver, r600, for Radeon R6xx, R7xx hardware
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed crash caused by glXCopyContext() and glXDestroyContext(), bug 24217
-<li>glXQueryContext(GLX_RENDER_TYPE) returned wrong values (bug 24211)
-<li>GLSL sqrt(0) returned unpredictable results
-<li>Fixed default texture binding bug when a bound texture was deleted.
-<li>r300: Work around an issue with very large fragment programs on R500.
-<li>Fake glXQueryDrawable() didn't return good values (bug 24320)
-<li>Fixed AUX buffer breakage (bug 24426).
-<li>Fixed locale-dependent float parsing bug in GLSL compiler (bug 24531)
-<li>Fixed Gallium Cell driver compilation failure.
-<li>Fixed glGetTexLevelParameter(GL_TEXTURE_INTERNAL_FORMAT) query so that
-    it returns the actual compressed format chosen.
-<li>Fixed glBitmap bugs in Intel drivers.
-<li>Fixed a number of Microsoft Visual Studio compilation problems.
-<li>Fixed clipping / provoking vertex bugs in i965 driver.
-<li>Assorted build fixes for AIX.
-<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
-<li>Point sprite fixes for i915/945 driver.
-<li>Fixed assorted memory leaks (usually on error paths)
-<li>Fixed some GLSL compiler bugs (ex: 25579)
-<li>Assorted build fixes for BlueGene
-</ul>
-
-<h2>Changes</h2>
-<ul>
-<li>Removed old VC6, VC7 project files for Windows
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/relnotes-7.6.html b/docs/relnotes-7.6.html
deleted file mode 100644
index 410b6ef..0000000
--- a/docs/relnotes-7.6.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.6 Release Notes, 28 September 2009</H1>
-
-<p>
-Mesa 7.6 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 7.6.1.
-</p>
-<p>
-Mesa 7.6 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-5ffa7d7abf8973f57a1bc4f813e6dade  MesaLib-7.6.tar.gz
-8c75f90cd0303cfac9e4b6d54f6759ca  MesaLib-7.6.tar.bz2
-27fcfd69708599c978cb34ba5cd363e1  MesaLib-7.6.zip
-e7befb3ae604f591806194a4da445628  MesaDemos-7.6.tar.gz
-0ede7adf217951acd90dbe4551210c07  MesaDemos-7.6.tar.bz2
-ed9298409cf6613bc0964525ca4afc8a  MesaDemos-7.6.zip
-666955668e44ff14acf7d15dc78407d3  MesaGLUT-7.6.tar.gz
-b8b59706f827d18d1b784a0ff98b4dc2  MesaGLUT-7.6.tar.bz2
-c49c19c2bbef4f3b7f1389974dff25f4  MesaGLUT-7.6.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li><a href="openvg.html">OpenVG</a> front-end (state tracker for Gallium).
-This was written by Zack Rusin at Tungsten Graphics.
-<li>GL_ARB_vertex_array_object and GL_APPLE_vertex_array_object extensions
-    (supported in Gallium drivers, Intel DRI drivers, and software drivers)</li>
-<li>GL_ARB_copy_buffer extension
-    (supported in Gallium drivers, Intel DRI drivers, and software drivers)</li>
-<li>GL_ARB_map_buffer_range extension
-    (supported in Gallium drivers, Intel DRI drivers, and software drivers)</li>
-<li>GL_ARB_seamless_cube_map extension
-    (supported in software drivers and i965 drivers)</li>
-<li>GL_ARB_vertex_array_bgra (ARB synonym for GL_EXT_vertex_array_bgra)</li>
-<li>GL_ARB_sync (supported in software drivers and Intel DRI drivers)</li>
-<li>GL_EXT_provoking_vertex extension (supported in Gallium, i915, i965, and software drivers)
-<li>Rewritten radeon/r200/r300 driver using a buffer manager
-<li>radeon/r200/r300 GL_EXT_framebuffer_object support when used with
-    kernel memory manager
-<li>radeon/r200/r300 support for GL_ARB_occlusion_query</li>
-<li>r300 driver supports OpenGL 1.5</li>
-<li>r300 driver support for GL_EXT_vertex_array_bgra, GL_EXT_texture_sRGB
-<li>i915/945 driver support for GL_ARB_point_sprite, GL_EXT_stencil_two_side
-    and GL_ATI_separate_stencil extensions
-<li>Rewritten assembler for GL_ARB_vertex_program /
-    GL_ARB_fragment_program.</li>
-<li>Added configure --with-max-width=W, --with-max-height=H options to specify
-    max framebuffer, viewport size.
-<li>Initial version of Gallium llvmpipe driver.  This is a new driver based
-    on LLVM which makes exensive use of run-time code generation.  This is
-    an "alpha" stage driver.  See the src/gallium/drivers/llvmpipe/README
-    file for more information.
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>i965 DRI driver fixes, including support for "unlimited" size constant
-    buffers (GLSL uniforms)
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.7.1.html b/docs/relnotes-7.7.1.html
deleted file mode 100644
index 00b3671..0000000
--- a/docs/relnotes-7.7.1.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.7.1 Release Notes / March 28, 2010</H1>
-
-<p>
-Mesa 7.7.1 is a bug-fix release.
-</p>
-<p>
-Mesa 7.7.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-3ab0638cfa7ce8157337a229cf0db2c4  MesaLib-7.7.1.tar.gz
-46664d99e03f1e3ac078a7fea02af115  MesaLib-7.7.1.tar.bz2
-4e73ba8abb59aff79485eb95d7cefff7  MesaLib-7.7.1.zip
-bf1b108983995f7a712cf3343df1c918  MesaDemos-7.7.1.tar.gz
-aeb39645d80d656e0adebaa09e5bcd03  MesaDemos-7.7.1.tar.bz2
-01c49b7454fd292244eaf8bdc6ed8cf0  MesaDemos-7.7.1.zip
-37ec6386693dcb6dc770d1efd63a7a93  MesaGLUT-7.7.1.tar.gz
-1e16c85282f843791a21f7bc7b6a1ca8  MesaGLUT-7.7.1.tar.bz2
-d352c9e36a8e4d1059f4abc017b131e0  MesaGLUT-7.7.1.zip
-</pre>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Assorted fixes to VMware SVGA gallium driver.
-<li>Fixed broken blending to multiple color buffers in swrast driver.
-<li>Allocate constants more tightly in GL_ARB_vertex/fragment parser.
-<li>Fixed mipmap generation bug caused by invalid viewport state.
-<li>Gallium SSE codegen for XPD didn't always work.
-<li>Fixed Windows build.
-<li>Fixed broken glMultiDrawElements().
-<li>Silence bogus GL errors generated in glxinfo.
-<li>Fixed several render to texture bugs.
-<li>Assorted bug fixes in Mesa/Gallium state tracker including
-    glCopy/DrawPixels() to FBOs.
-<li>Assorted fixes to Gallium drivers.
-<li>Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code.
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/relnotes-7.7.html b/docs/relnotes-7.7.html
deleted file mode 100644
index c1ed654..0000000
--- a/docs/relnotes-7.7.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.7 Release Notes / 21 December 2009</H1>
-
-<p>
-Mesa 7.7 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 7.7.1.
-</p>
-<p>
-Mesa 7.7 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-395c9516edf1ad54b0934d8db15557bf  MesaLib-7.7.tar.gz
-e3fa64a1508bc23dd9de9dd2cea7cfb1  MesaLib-7.7.tar.bz2
-e54903eb5e49c3969821fa16b32da245  MesaLib-7.7.zip
-53b5b6f78e55de170d43c98cb6aaab7e  MesaDemos-7.7.tar.gz
-6fd616b27b9826d0faa23e08e05d9435  MesaDemos-7.7.tar.bz2
-240fe06159ad73d5e22c27033b66c80a  MesaDemos-7.7.zip
-9fe11a904b2a9d8cd06cc52bc330b716  MesaGLUT-7.7.tar.gz
-e8dceed05a59a2d3c2619d7d734587e3  MesaGLUT-7.7.tar.bz2
-96af041d435349ee23ead4667ec36363  MesaGLUT-7.7.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>VMware "SVGA" Gallium driver.  This is a Gallium3D driver which targets the
-    VMware virtual graphics device.  It allows Linux OpenGL guest applications
-    to utilize the 3D graphics hardware of the host operating system.
-<li>GL_ARB_draw_elements_base_vertex (supported in Intel i965 and software drivers)</li>
-<li>GL_ARB_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
-<li>GL_NV_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
-<li>GL_ARB_provoking_vertex (same as GL_EXT_provoking_vertex)</li>
-<li>Wavefront .obj file loader/viewer demo (progs/demos/objviewer)
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Many assorted i965 driver fixes.
-<li>Many r300-gallium driver fixes; this driver is now considered unstable-quality instead of experimental-quality.
-</ul>
-
-
-<h2>Changes</h2>
-<ul>
-<li>New Mesa texture/surface format infrastructure
-<li>Removed some unused Mesa device driver hooks
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.8.1.html b/docs/relnotes-7.8.1.html
deleted file mode 100644
index 1ba68fd..0000000
--- a/docs/relnotes-7.8.1.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.8.1 Release Notes / April, 5, 2010</H1>
-
-<p>
-Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release.  Even
-though this is a bug fix release, given its proximity to the 7.8 release, a
-new development release, it should also be considered new development release.
-People who are concerned with stability and reliability should stick
-with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
-</p>
-<p>
-Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-62e8e47cbd63741b4bbe634dcdc8a56a  MesaLib-7.8.1.tar.gz
-25ec15f8e41fde6d206118cc786dbac4  MesaLib-7.8.1.tar.bz2
-22b1153010ffdf513836ea9931159e80  MesaLib-7.8.1.zip
-c9c0a830923d3820807a08c09d521b3e  MesaDemos-7.8.1.tar.gz
-9ef47f911869657c6bf2f43ebce86b61  MesaDemos-7.8.1.tar.bz2
-93720605eb3f784f9bcc289a4dd2ff52  MesaDemos-7.8.1.zip
-ed1d0b1e960afe6a3768eab747cbdbd3  MesaGLUT-7.8.1.tar.gz
-6bae516a44c6d26ff3152c960ab648e7  MesaGLUT-7.8.1.tar.bz2
-ba306f603ea73c30ee0e7efa14dc5581  MesaGLUT-7.8.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<p>None.</p>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
-  version 27 from OpenGL.org.</li>
-<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
-<li>Various fixes for building Mesa on OS X.</li>
-<li>Pass GLX drawable ID to dri2InvalidateBuffers.  Fixes bug #27190.</li>
-</ul>
-
-
-<h2>Changes</h2>
-<p>None.</p>
-</body>
-</html>
diff --git a/docs/relnotes-7.8.2.html b/docs/relnotes-7.8.2.html
deleted file mode 100644
index 1393b2e..0000000
--- a/docs/relnotes-7.8.2.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.8.2 Release Notes / (date tbd)</H1>
-
-<p>
-Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
-</p>
-<p>
-Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-c89b63d253605ed40e8ac370d25a833c  MesaLib-7.8.2.tar.gz
-6be2d343a0089bfd395ce02aaf8adb57  MesaLib-7.8.2.tar.bz2
-a04ad3b06ac5ff3969a003fa7bbf7d5b  MesaLib-7.8.2.zip
-7c213f92efeb471f0331670d5079d4c0  MesaDemos-7.8.2.tar.gz
-757d9e2e06f48b1a52848be9b0307ced  MesaDemos-7.8.2.tar.bz2
-8d0e5cfe68b8ebf90265d350ae2c48b1  MesaDemos-7.8.2.zip
-b74482e3f44f35ed395c4aada4fd8240  MesaGLUT-7.8.2.tar.gz
-a471807b65e49c325808ba4551be93ed  MesaGLUT-7.8.2.tar.bz2
-9f190268c42be582ef66e47365ee61e3  MesaGLUT-7.8.2.zip
-</pre>
-
-
-<h2>New features</h2>
-<p>None.</p>
-
-
-<h2>Changes</h2>
-<ul>
-<li>Upgraded glext.h to version 61, and upgraded glxext.h
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
-<li>Fixed Gallium Cell driver to buildable, runable state
-<li>Fixed bad error checking for glFramebufferRenderbuffer(attachment=GL_DEPTH_STENCIL_ATTACHMENT).
-<li>Fixed incorrect Z coordinate handling in "meta" glDraw/CopyPixels.
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">Bug
-    #23670</a>.</li>
-
-<li>Assorted i965 driver fixes.
-    Including but not limited to:
-  <ul>
-    <li>Fix scissoring when width or height is
-    0.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27643">Bug
-    #27643</a>.
-    <li>Fix bit allocation for number of color regions for
-    ARB_draw_buffers.</li>
-    <li>Set the correct provoking vertex for clipped first-mode
-    trifans.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24470">Bug
-    #24470</a>.</li>
-    <li>Use <code>R16G16B16A16_FLOAT</code> for 3-component half-float.</li>
-    <li>Fix assertion for surface tile offset usage on Ironlake.</li>
-    <li>Fix cube map layouts on Ironlake.</li>
-    <li>When an RB gets a new region, clear the old from the state
-    cache.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24119">Bug
-    #24119</a>.</li>
-    <li>Reject shaders with uninlined function calls instead of hanging.</li>
-  </ul>
-</li>
-
-<li>Assorted i915 driver fixes.  Including but not limited to:
-  <ul>
-    <li>Fixed texture LOD clamping in i915 driver.
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24846">Bug
-    #24846</a>.</li>
-    <li>Fix off-by-one for drawing rectangle.
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27408">Bug
-    #27408</a>.</li>
-  </ul>
-</li>
-
-<li>Fixed hangs in etracer on 830 and 845
-    chipsets.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=26557">Bug
-    #26557</a>.</li>
-<li>Fixed tiling of small textures on all Intel drivers.</li>
-<li>Fixed crash in Savage driver when using <code>_mesa_CopyTexImage2D</code>.
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27652">Bug
-    #27652</a>.</li>
-
-<li>Assorted GLX fixes.  Including but not limited to:
-  <ul>
-    <li>Fixed <code>__glXInitializeVisualConfigFromTags</code>'s handling of
-        unrecognized fbconfig tags.</li>
-    <li>Fixed regression with <code>GLX_USE_GL</code>.
-    <li>Fixed config chooser logic for 'mask' matching.</li>
-    <li>Report swap events correctly in direct rendered case (DRI2)</li>
-    <li>Fixed build with dri2proto which doesn't define
-        <code>X_DRI2SwapInterval</code>.</li>
-    <li>Get <code>GLX_SCREEN</code> first in <code>__glXQueryContextInfo</code>.
-        <a href="https://bugs.freedesktop.org/show_bug.cgi?id=14245">Bug
-	#14245</a>.</li>
-  </ul>
-</li>
-
-<li>Assorted GLSL fixes.  Including but not limited to:
-  <ul>
-    <li>Change variable declared assertion into conditional in GLSL
-        compiler.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27921">Bug
-        #27921</a>.</li>
-    <li>Fix instruction indexing
-        bugs.  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27566">Bug
-        #27566</a>.</li>
-    <li>Updated uniform location / offset encoding to be more like
-        other implementations.</li>
-    <li>Don't overwrite a driver's shader infolog with generic failure
-        message.</li>
-  </ul>
-</li>
-
-<li>Fixed OSMesa build for 16 and 32-bit color channel depth.
-<li>Fixed OSMesa build with hidden symbol visibility. libOSMesa no longer links to libGL.
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28305">Bug
-    #28305</a>.
-<li>Fixed handling of multiple render targets in fixed-function
-    texture envrionmnent programs.</li>
-<li>Fixed conversion errors in <code>signed_rgba8888[rev]</code> texel
-    fetch.</li>
-<li>Don't set srcLevel on <code>GL_TEXTURE_RECTANGLE_ARB</code> targets.</li>
-<li>Various build fixes for OpenBSD.</li>
-<li>Various build fixes for OS X.</li>
-<li>Various build fixes for GCC 3.3.</li>
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/relnotes-7.8.3.html b/docs/relnotes-7.8.3.html
deleted file mode 100644
index 1e9f433..0000000
--- a/docs/relnotes-7.8.3.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.8.3 Release Notes / (date tbd)</H1>
-
-<p>
-Mesa 7.8.3 is a bug fix release which fixes bugs found since the 7.8.2 release.
-</p>
-<p>
-Mesa 7.8.3 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-x  MesaLib-7.8.3.tar.gz
-x  MesaLib-7.8.3.tar.bz2
-x  MesaLib-7.8.3.zip
-x  MesaDemos-7.8.3.tar.gz
-x  MesaDemos-7.8.3.tar.bz2
-x  MesaDemos-7.8.3.zip
-x  MesaGLUT-7.8.3.tar.gz
-x  MesaGLUT-7.8.3.tar.bz2
-x  MesaGLUT-7.8.3.zip
-</pre>
-
-
-<h2>New features</h2>
-<p>None.</p>
-
-
-<h2>Changes</h2>
-<ul>
-<li>The radeon driver should use less memory when searching for a valid mip
-image.</li>
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Fix unsupported FB with D24S8 (bug 
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">29116</a>)</li>
-<li>Fix ReadPixels crash when reading depth/stencil from an FBO</li>
-<li>Fixed a bug rendering to 16-bit buffers using swrast.</li>
-<li>Fixed a state tracker/TGSI bug that caused crashes when using Windows'
-    memory debugging features.</li>
-<li>Fixed an issue rendering to 32-bit channels with swrast (bug
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=29487">29487</a>)</li>
-<li>GLSL: fix indirect <TT>gl_TextureMatrix</TT> addressing (bug
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28967">28967</a>)</li>
-<li>GLSL: fix for bug
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27216">27216</a></li>
-<li>GLSL: fix zw fragcoord entries in some cases (bug
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=29183">29183</a>)</li>
-<li>Fix texture env generation in some cases (bug
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28169">28169</a>)</li>
-<li>osmesa: a fix for calling <TT>OSMesaMakeCurrent</TT> twice was applied (bug 
-    <a href="https://bugs.freedesktop.org/show_bug.cgi?id=10966">10966</a></li>
-<li>A bug was fixed which could cause Mesa to ignore the
-    <TT>MESA_EXTENSION_OVERRIDE</TT> environment variable.</li>
-<li>A bug related to specular highlights on backfaces was fixed.</li>
-<li>A radeon-specific issue with <TT>glCopyTex(Sub)Image</TT> was
-    corrected.</li>
-<li>radeon/wine: flush command stream in more cases, fixing wine d3d9
-    tests.</li>
-<li>r600: fix sin+cos normalization.</li>
-<li>r600: (properly) ignore <TT>GL_COORD_REPLACE</TT> when point sprites are
-    disabled.</li>
-<li>radeon: avoid flushing when the context is not current.</li>
-<li>r300c: a bug affecting unaligned BOs was fixed.</li>
-<li>r300c: a hardlock caused by ARB_half_float_vertex incorrectly advertised on some chipsets.</li>
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/relnotes-7.8.html b/docs/relnotes-7.8.html
deleted file mode 100644
index 1fed087..0000000
--- a/docs/relnotes-7.8.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.8 Release Notes / March 28, 2010</H1>
-
-<p>
-Mesa 7.8 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 7.8.1.
-</p>
-<p>
-Mesa 7.8 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-5fcfde5383eccb3e9fd665f08a0ea59b  MesaLib-7.8.tar.gz
-85cb891eecb89aae4fdd3499cccd934b  MesaLib-7.8.tar.bz2
-754f39593006effc1c8ec3c27c2f1296  MesaLib-7.8.zip
-c3869c29fa6c3dbdd763f7428d271e12  MesaDemos-7.8.tar.gz
-9fe8ec184c7f78691e43c4c0a7f97d56  MesaDemos-7.8.tar.bz2
-063a96947f7b83d4ad789c6cf291b184  MesaDemos-7.8.zip
-5f4246756b7daaddb4fb3f970cad1e28  MesaGLUT-7.8.tar.gz
-ca7048a4aa7a437dcc84cc2c7d731336  MesaGLUT-7.8.tar.bz2
-b54581aeb79b585b158d6a32f94feff2  MesaGLUT-7.8.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>GL_NV_conditional_render extension (swrast driver only)
-<li>GL_EXT_draw_buffers2 extension (swrast and i965 driver only)
-<li>GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers)
-<li>GL_EXT_texture_array extension (swrast driver only)
-<li>GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers)
-<li>Much improved support for <a href="egl.html">EGL in Mesa</a>
-<li>New state trackers for <a href="opengles.html">OpenGL ES 1.1 and 2.0</a>
-<li>Dedicated documentation for Gallium
-</ul>
-
-
-<h2>Bug fixes</h2>
-<ul>
-<li>Massive improvements to the Gallium driver for R300-R500 Radeons; this
-    driver is now moderately stable but not terribly performant.
-</ul>
-
-
-<h2>Changes</h2>
-<ul>
-<li>Removed support for color-index rendering</li>
-<li>Removed support for GCC versions earlier than 3.3.0.</li>
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.9.1.html b/docs/relnotes-7.9.1.html
deleted file mode 100644
index a46eb16..0000000
--- a/docs/relnotes-7.9.1.html
+++ /dev/null
@@ -1,404 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.9.1 Release Notes / January 7, 2011</H1>
-
-<p>
-Mesa 7.9.1 is a bug fix release which fixes bugs found since the 7.9 release.
-</p>
-<p>
-Mesa 7.9.1 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-78422843ea875ad4eac35b9b8584032b  MesaLib-7.9.1.tar.gz
-07dc6cfb5928840b8b9df5bd1b3ae434  MesaLib-7.9.1.tar.bz2
-c8eaea5b3c3d6dee784bd8c2db91c80f  MesaLib-7.9.1.zip
-ee9ecae4ca56fbb2d14dc15e3a0a7640  MesaGLUT-7.9.1.tar.gz
-41fc477d524e7dc5c84da8ef22422bea  MesaGLUT-7.9.1.tar.bz2
-90b287229afdf19317aa989d19462e7a  MesaGLUT-7.9.1.zip
-</pre>
-
-
-<h2>New features</h2>
-<p>None.</p>
-
-<h2>Bug fixes</h2>
-<p>This list is likely incomplete.</p>
-<ul>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28800">Bug 28800</a> - [r300c, r300g] Texture corruption with World of Warcraft</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29420">Bug 29420</a> - Amnesia / HPL2 RendererFeatTest - not rendering correctly</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29946">Bug 29946</a> - [swrast] piglit valgrind glsl-array-bounds-04 fails</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30261">Bug 30261</a> - [GLSL 1.20] allowing inconsistent invariant declaration between two vertex shaders</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30632">Bug 30632</a> - [softpipe] state_tracker/st_manager.c:489: st_context_notify_invalid_framebuffer: Assertion `stfb &amp;&amp; stfb-&gt;iface == stfbi' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30694">Bug 30694</a> - wincopy will crash on Gallium drivers when going to front buffer</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30787">Bug 30787</a> - Invalid asm shader does not generate draw-time error when used with GLSL shader</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30993">Bug 30993</a> - getFramebufferAttachmentParameteriv wrongly generates error</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31101">Bug 31101</a> -  [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31193">Bug 31193</a> -  [regression] aa43176e break water reflections</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31194">Bug 31194</a> - The mesa meta save/restore code doesn't ref the current GLSL program</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31371">Bug 31371</a> - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type &gt;= 0) &amp;&amp; (type->base_type &lt;= 3)' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31439">Bug 31439</a> - Crash in glBufferSubData() with size == 0</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31495">Bug 31495</a> - [i965 gles2c bisected] OpenGL ES 2.0 conformance GL2Tests_GetBIFD_input.run regressed</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31514">Bug 31514</a> - isBuffer returns true for unbound buffers</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31560">Bug 31560</a> - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31617">Bug 31617</a> - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31648">Bug 31648</a> -  [GLSL] array-struct-array gets assertion: `(size &gt;= 1) && (size &lt;= 4)' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31650">Bug 31650</a> - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31673">Bug 31673</a> - GL_FRAGMENT_PRECISION_HIGH preprocessor macro undefined in GLSL ES</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31690">Bug 31690</a> -  i915 shader compiler fails to flatten if in Aquarium webgl demo.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31832">Bug 31832</a> - [i915] Bad renderbuffer format: 21</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31841">Bug 31841</a> - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31894">Bug 31894</a> - Writing to gl_PointSize with GLES2 corrupts other varyings</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31909">Bug 31909</a> - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr-&gt;operands[i]-&gt;type-&gt;is_scalar()' failed.</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31934">Bug 31934</a> - [gallium] Mapping empty buffer object causes SIGSEGV</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31983">Bug 31983</a> -  [i915 gles2] "if (expression with builtin/varying variables) discard" breaks linkage</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31985">Bug 31985</a> - [GLSL 1.20] initialized uniform array considered as "unsized"</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31987">Bug 31987</a> - [gles2] if input a wrong pname(GL_NONE) to glGetBoolean, it will not case GL_INVALID_ENUM</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32035">Bug 32035</a> - [GLSL bisected] comparing unsized array gets segfault</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32070">Bug 32070</a> - llvmpipe renders stencil demo incorrectly</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32273">Bug 32273</a> - assertion fails when starting vdrift 2010 release with shaders enabled</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32287">Bug 32287</a> - [bisected GLSL] float-int failure</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32311">Bug 32311</a> - [965 bisected] Array look-ups broken on GM45</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32520">Bug 32520</a> -  [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM</li>
-
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32825">Bug 32825</a> - egl_glx driver completely broken in 7.9 branch [fix in master]</li>
-</ul>
-
-
-<h2>Changes</h2>
-<p>The full set of changes can be viewed by using the following GIT command:</p>
-
-<pre>
-  git log mesa-7.9..mesa-7.9.1
-</pre>
-
-<p>Alex Deucher (5):
-<ul>
-  <li>r100: revalidate after radeon_update_renderbuffers</li>
-  <li>r600c: add missing radeon_prepare_render() call on evergreen</li>
-  <li>r600c: properly align mipmaps to group size</li>
-  <li>gallium/egl: fix r300 vs r600 loading</li>
-  <li>r600c: fix some opcodes on evergreen</li>
-</ul></p>
-
-<p>Aras Pranckevicius (2):
-<ul>
-  <li>glsl: fix crash in loop analysis when some controls can't be determined</li>
-  <li>glsl: fix matrix type check in ir_algebraic</li>
-</ul></p>
-
-<p>Brian Paul (27):
-<ul>
-  <li>swrast: fix choose_depth_texture_level() to respect mipmap filtering state</li>
-  <li>st/mesa: replace assertion w/ conditional in framebuffer invalidation</li>
-  <li>egl/i965: include inline_wrapper_sw_helper.h</li>
-  <li>mesa: Add missing else in do_row_3D</li>
-  <li>mesa: add missing formats in _mesa_format_to_type_and_comps()</li>
-  <li>mesa: handle more pixel types in mipmap generation code</li>
-  <li>mesa: make glIsBuffer() return false for never bound buffers</li>
-  <li>mesa: fix glDeleteBuffers() regression</li>
-  <li>swrast: init alpha value to 1.0 in opt_sample_rgb_2d()</li>
-  <li>meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear</li>
-  <li>st/mesa: fix mapping of zero-sized buffer objects</li>
-  <li>mesa: check for posix_memalign() errors</li>
-  <li>llvmpipe: fix broken stencil writemask</li>
-  <li>mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query</li>
-  <li>mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type</li>
-  <li>mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM</li>
-  <li>mesa: test for cube map completeness in glGenerateMipmap()</li>
-  <li>tnl: Initialize gl_program_machine memory in run_vp.</li>
-  <li>tnl: a better way to initialize the gl_program_machine memory</li>
-  <li>mesa, st/mesa: disable GL_ARB_geometry_shader4</li>
-  <li>glsl: fix off by one in register index assertion</li>
-  <li>st/mesa: fix mipmap generation bug</li>
-  <li>glsl: new glsl_strtod() wrapper to fix decimal point interpretation</li>
-  <li>mesa: no-op glBufferSubData() on size==0</li>
-  <li>tdfx: s/Format/_BaseFormat/</li>
-  <li>st/mesa: fix renderbuffer pointer check in st_Clear()</li>
-  <li>mesa: Bump the number of bits in the register index.</li>
-</ul></p>
-
-<p>Chad Versace (5):
-<ul>
-  <li>glsl: Fix lexer rule for ^=</li>
-  <li>glsl: Fix ast-to-hir for ARB_fragment_coord_conventions</li>
-  <li>glsl: Fix ir_expression::constant_expression_value()</li>
-  <li>glsl: Fix erroneous cast in ast_jump_statement::hir()</li>
-  <li>glsl: Fix linker bug in cross_validate_globals()</li>
-</ul></p>
-
-<p>Chia-I Wu (10):
-<ul>
-  <li>targets/egl: Fix linking with libdrm.</li>
-  <li>st/vega: Fix version check in context creation.</li>
-  <li>st/egl: Do not finish a fence that is NULL.</li>
-  <li>egl: Fix a false negative check in _eglCheckMakeCurrent.</li>
-  <li>st/mesa: Unreference the sampler view in st_bind_surface.</li>
-  <li>egl_dri2: Fix __DRI_DRI2 version 1 support.</li>
-  <li>st/vega: Do not wait NULL fences.</li>
-  <li>mesa: Do not advertise GL_OES_texture_3D.</li>
-  <li>egl_glx: Fix borken driver.</li>
-  <li>egl: Check extensions.</li>
-</ul></p>
-
-<p>Daniel Lichtenberger (1):
-<ul>
-  <li>radeon: fix potential segfault in renderbuffer update</li>
-</ul></p>
-
-<p>Daniel Vetter (1):
-<ul>
-  <li>r200: revalidate after radeon_update_renderbuffers</li>
-</ul></p>
-
-<p>Dave Airlie (1):
-<ul>
-  <li>r300g: fixup rs690 tiling stride alignment calculations.</li>
-</ul></p>
-
-<p>Eric Anholt (13):
-<ul>
-  <li>intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.</li>
-  <li>glsl: Free the loop state context when we free the loop state.</li>
-  <li>i965: Allow OPCODE_SWZ to put immediates in the first arg.</li>
-  <li>i965: Add support for rendering to SARGB8 FBOs.</li>
-  <li>glsl: Add a helper constructor for expressions that works out result type.</li>
-  <li>glsl: Fix structure and array comparisions.</li>
-  <li>glsl: Quiet unreachable no-return-from-function warning.</li>
-  <li>glsl: Mark the array access for whole-array comparisons.</li>
-  <li>glsl: Fix flipped return of has_value() for array constants.</li>
-  <li>mesa: Add getters for the rest of the supported draw buffers.</li>
-  <li>mesa: Add getters for ARB_copy_buffer's attachment points.</li>
-  <li>i965: Correct the dp_read message descriptor setup on g4x.</li>
-  <li>glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.</li>
-</ul></p>
-
-<p>Fabian Bieler (1):
-<ul>
-  <li>glsl: fix lowering conditional returns in subroutines</li>
-</ul></p>
-
-<p>Francisco Jerez (3):
-<ul>
-  <li>meta: Don't leak alpha function/reference value changes.</li>
-  <li>meta: Fix incorrect rendering of the bitmap alpha component.</li>
-  <li>meta: Don't try to disable cube maps if the driver doesn't expose the extension.</li>
-</ul></p>
-
-<p>Henri Verbeet (2):
-<ul>
-  <li>r600: Evergreen has two extra frac_bits for the sampler LOD state.</li>
-  <li>st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().</li>
-</ul></p>
-
-<p>Ian Romanick (33):
-<ul>
-  <li>Add 7.9 md5sums</li>
-  <li>docs: Import 7.8.x release notes from 7.8 branch.</li>
-  <li>docs: download.html does not need to be updated for each release</li>
-  <li>docs: Update mailing lines from sf.net to freedesktop.org</li>
-  <li>docs: added news item for 7.9 release</li>
-  <li>mesa: Validate assembly shaders when GLSL shaders are used</li>
-  <li>linker: Reject shaders that have unresolved function calls</li>
-  <li>mesa: Refactor validation of shader targets</li>
-  <li>glsl: Slightly change the semantic of _LinkedShaders</li>
-  <li>linker: Improve handling of unread/unwritten shader inputs/outputs</li>
-  <li>glsl: Commit lexer files changed by previous cherry picking</li>
-  <li>mesa: Make metaops use program refcounts instead of names.</li>
-  <li>glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow</li>
-  <li>mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample</li>
-  <li>glsl: better handling of linker failures</li>
-  <li>mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.</li>
-  <li>i915: Disallow alpha, red, RG, and sRGB as render targets</li>
-  <li>glsl/linker: Free any IR discarded by optimization passes.</li>
-  <li>glsl: Add an optimization pass to simplify discards.</li>
-  <li>glsl: Add a lowering pass to move discards out of if-statements.</li>
-  <li>i915: Correctly generate unconditional KIL instructions</li>
-  <li>glsl: Add unary ir_expression constructor</li>
-  <li>glsl: Ensure that equality comparisons don't return a NULL IR tree</li>
-  <li>glcpp: Commit changes in generated files cause by previous commit</li>
-  <li>glsl: Inherrit type of declared variable from initializer</li>
-  <li>glsl: Inherrit type of declared variable from initializer after processing assignment</li>
-  <li>linker: Ensure that unsized arrays have a size after linking</li>
-  <li>linker: Fix regressions caused by previous commit</li>
-  <li>linker: Allow built-in arrays to have different sizes between shader stages</li>
-  <li>ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors</li>
-  <li>Refresh autogenerated file builtin_function.cpp.</li>
-  <li>docs: Initial set of release notes for 7.9.1</li>
-  <li>mesa: set version string to 7.9.1</li>
-</ul></p>
-
-<p>Julien Cristau (1):
-<ul>
-  <li>Makefile: don't include the same files twice in the tarball</li>
-</ul></p>
-
-<p>Kenneth Graunke (19):
-<ul>
-  <li>glcpp: Return NEWLINE token for newlines inside multi-line comments.</li>
-  <li>generate_builtins.py: Output large strings as arrays of characters.</li>
-  <li>glsl: Fix constant component count in vector constructor emitting.</li>
-  <li>ir_dead_functions: Actually free dead functions and signatures.</li>
-  <li>glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version &gt;= 1.30.</li>
-  <li>glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.</li>
-  <li>glsl: Fix constant expression handling for &lt, &gt;, &lt=, &gt;= on vectors.</li>
-  <li>glsl: Use do_common_optimization in the standalone compiler.</li>
-  <li>glsl: Don't inline function prototypes.</li>
-  <li>glsl: Add a virtual as_discard() method.</li>
-  <li>glsl: Remove "discard" support from lower_jumps.</li>
-  <li>glsl: Refactor get_num_operands.</li>
-  <li>glcpp: Don't emit SPACE tokens in conditional_tokens production.</li>
-  <li>glsl: Clean up code by adding a new is_break() function.</li>
-  <li>glsl: Consider the "else" branch when looking for loop breaks.</li>
-  <li>Remove OES_compressed_paletted_texture from the ES2 extension list.</li>
-  <li>glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).</li>
-  <li>Fix build on systems where "python" is python 3.</li>
-  <li>i965: Internally enable GL_NV_blend_square on ES2.</li>
-</ul></p>
-
-<p>Kristian Høgsberg (1):
-<ul>
-  <li>i965: Don't write mrf assignment for pointsize output</li>
-</ul></p>
-
-<p>Luca Barbieri (1):
-<ul>
-  <li>glsl: Unroll loops with conditional breaks anywhere (not just the end)</li>
-</ul></p>
-
-<p>Marek Olšák (17):
-<ul>
-  <li>r300g: fix microtiling for 16-bits-per-channel formats</li>
-  <li>r300g: fix texture border for 16-bits-per-channel formats</li>
-  <li>r300g: add a default channel ordering of texture border for unhandled formats</li>
-  <li>r300g: fix texture border color for all texture formats</li>
-  <li>r300g: fix rendering with no vertex elements</li>
-  <li>r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction</li>
-  <li>r300g: fix texture border color once again</li>
-  <li>r300g: fix texture swizzling with compressed textures on r400-r500</li>
-  <li>r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only</li>
-  <li>mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium</li>
-  <li>st/mesa: initialize key in st_vp_varient</li>
-  <li>r300/compiler: fix swizzle lowering with a presubtract source operand</li>
-  <li>r300g: fix rendering with a vertex attrib having a zero stride</li>
-  <li>ir_to_mesa: Add support for conditional discards.</li>
-  <li>r300g: finally fix the texture corruption on r3xx-r4xx</li>
-  <li>mesa: fix texel store functions for some float formats</li>
-  <li>r300/compiler: disable the rename_regs pass for loops</li>
-</ul></p>
-
-<p>Mario Kleiner (1):
-<ul>
-  <li>mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.</li>
-</ul></p>
-
-<p>Peter Clifton (1):
-<ul>
-  <li>intel: Fix emit_linear_blit to use DWORD aligned width blits</li>
-</ul></p>
-
-<p>Robert Hooker (2):
-<ul>
-  <li>intel: Add a new B43 pci id.</li>
-  <li>egl_dri2: Add missing intel chip ids.</li>
-</ul></p>
-
-<p>Roland Scheidegger (1):
-<ul>
-  <li>r200: fix r200 large points</li>
-</ul></p>
-
-<p>Thomas Hellstrom (17):
-<ul>
-  <li>st/xorg: Don't try to use option values before processing options</li>
-  <li>xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers</li>
-  <li>st/xorg: Add a customizer option to get rid of annoying cursor update flicker</li>
-  <li>xorg/vmwgfx: Don't hide HW cursors when updating them</li>
-  <li>st/xorg: Don't try to remove invalid fbs</li>
-  <li>st/xorg: Fix typo</li>
-  <li>st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments</li>
-  <li>st/xorg: Fix compilation errors for Xservers compiled without Composite</li>
-  <li>st/xorg: Don't use deprecated x*alloc / xfree functions</li>
-  <li>xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions</li>
-  <li>st/xorg: Fix compilation for Xservers &gt;= 1.10</li>
-  <li>mesa: Make sure we have the talloc cflags when using the talloc headers</li>
-  <li>egl: Add an include for size_t</li>
-  <li>mesa: Add talloc includes for gles</li>
-  <li>st/egl: Fix build for include files in nonstandard places</li>
-  <li>svga/drm: Optionally resolve calls to powf during link-time</li>
-  <li>gallium/targets: Trivial crosscompiling fix</li>
-</ul></p>
-
-<p>Tom Stellard (7):
-<ul>
-  <li>r300/compiler: Make sure presubtract sources use supported swizzles</li>
-  <li>r300/compiler: Fix register allocator's handling of loops</li>
-  <li>r300/compiler: Fix instruction scheduling within IF blocks</li>
-  <li>r300/compiler: Use zero as the register index for unused sources</li>
-  <li>r300/compiler: Ignore alpha dest register when replicating the result</li>
-  <li>r300/compiler: Use correct swizzles for all presubtract sources</li>
-  <li>r300/compiler: Don't allow presubtract sources to be remapped twice</li>
-</ul></p>
-
-<p>Vinson Lee (1):
-<ul>
-  <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
-</ul></p>
-
-<p>richard (1):
-<ul>
-  <li>r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well.</li>
-</ul></p>
-
-</body>
-</html>
diff --git a/docs/relnotes-7.9.html b/docs/relnotes-7.9.html
deleted file mode 100644
index fe1fd5e..0000000
--- a/docs/relnotes-7.9.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<H1>Mesa 7.9 Release Notes / October 4, 2010</H1>
-
-<p>
-Mesa 7.9 is a new development release.
-People who are concerned with stability and reliability should stick
-with a previous release or wait for Mesa 7.9.1.
-</p>
-<p>
-Mesa 7.9 implements the OpenGL 2.1 API, but the version reported by
-glGetString(GL_VERSION) depends on the particular driver being used.
-Some drivers don't support all the features required in OpenGL 2.1.
-</p>
-<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI hardware acceleration.
-</p>
-
-
-<h2>MD5 checksums</h2>
-<pre>
-ed65ab425b25895c7f473d0a5e6e64f8  MesaLib-7.9.tar.gz
-82c740c49d572baa6da2b1a1eee90bca  MesaLib-7.9.tar.bz2
-cd2b6ecec759b0457475e94bbb38fedb  MesaLib-7.9.zip
-7b54af9fb9b1f6a1a65db2520f50848f  MesaGLUT-7.9.tar.gz
-20d07419d1929f833fdb36bced290ad5  MesaGLUT-7.9.tar.bz2
-62a7edecd7c92675cd6029b05217eb0a  MesaGLUT-7.9.zip
-</pre>
-
-
-<h2>New features</h2>
-<ul>
-<li>New, improved GLSL compiler written by Intel.
-    See the <a href="shading.html"> Shading Language</a> page for
-    more information.
-<li>New, very experimental Gallium driver for R600-R700 Radeons.
-<li>Support for AMD Evergreen-based Radeons (HD 5xxx)
-<li>GL_EXT_timer_query extension (i965 driver and softpipe only)
-<li>GL_EXT_framebuffer_multisample extension (intel drivers, MAX_SAMPLES = 1)
-<li>GL_ARB_texture_swizzle extension (alias of GL_EXT_texture_swizzle)
-<li>GL_ARB_draw_elements_base_vertex, GL_ARB_fragment_program_shadow,
-    GL_ARB_window_pos, GL_EXT_gpu_program_parameters,
-    GL_ATI_texture_env_combine3, GL_MESA_pack_invert, and GL_OES_EGL_image
-    extensions in Gallium drivers
-<li>GL_ARB_depth_clamp and GL_NV_depth_clamp extensions (in nv50 and r600
-    Gallium drivers)
-<li>GL_ARB_half_float_vertex extension (in nvfx, r300, r600, softpipe,
-    and llvmpipe Gallium drivers)
-<li>GL_EXT_draw_buffers2 (in nv50, r600, softpipe, and llvmpipe Gallium
-    drivers)
-<li>GL_EXT_texture_swizzle (in nvfx, r300, r600, softpipe, and llvmpipe
-    Gallium drivers)
-<li>GL_ATI_texture_mirror_once (in nvfx, nv50, r300, r600, softpipe, and
-    llvmpipe Gallium drivers)
-<li>GL_NV_conditional_render (in r300 Gallium driver)
-<li>Initial "signs of life" support for Sandybridge hardware in i965 DRI
-    driver.
-</ul>
-
-
-<h2>Bug fixes</h2>
-<p>This list is likely incomplete.</p>
-<ul>
-<li>Massive improvements to the Gallium driver for R300-R500 Radeons; this
-    driver is now considered stable for use as a DRI (OpenGL) driver.
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=10908">Bug 10908</a> - GLSL: gl_FogParamaters gl_Fog built-in uniform not functioning</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=13753">Bug 13753</a> - Numerous bugs in GLSL uniform handling</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=16854">Bug 16854</a> - GLSL function call at global scope causes SEGV</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=16856">Bug 16856</a> - GLSL indexing of unsized array results in assertion failure</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=18659">Bug 18659</a> - Crash in shader/slang/slang_codegen.c _slang_gen_function_call_name()</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=19089">Bug 19089</a> - [GLSL] glsl1/shadow2D() cases fail</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=22622">Bug 22622</a> - [GM965 GLSL] noise*() cause GPU lockup</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=23743">Bug 23743</a> - For loop from 0 to 0 not optimized out</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=24553">Bug 24553</a> - shader compilation times explode when using more () pairs</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25664">Bug 25664</a> - [GLSL] re-declaring an empty array fails to compile</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25769">Bug 25769</a> - [GLSL] "float" can be implicitly converted to "int"</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25808">Bug 25808</a> - [GLSL] const variable is modified successfully</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25826">Bug 25826</a> - [GLSL] declaring an unsized array then re-declaring with a size fails</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25827">Bug 25827</a> - [GLSL] vector constructor accepts too many arguments successfully</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25829">Bug 25829</a> - [GLSL] allowing non-void function without returning value</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25830">Bug 25830</a> - [GLSL] allowing non-constant-expression as const declaration initializer</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25877">Bug 25877</a> - [GLSL 1.10] implicit conversion from "int" to "float" should not be allowed</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25878">Bug 25878</a> - [GLSL] sampler is converted to int successfully</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25994">Bug 25994</a> - [GM45][GLSL] 'return' statement in vertex shader unsupported</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=25999">Bug 25999</a> - [GLSL] embedded structure constructor fails to compile</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26000">Bug 26000</a> - [GLSL] allowing different parameter qualifier between the function definition and declaration</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26001">Bug 26001</a> - [GLSL 1.10] constructing matrix from matrix succeeds</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26224">Bug 26224</a> - [GLSL] Cannot get location of a uniform struct member</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26990">Bug 26990</a> - [GLSL] variable declaration in "while" fails to compile</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27004">Bug 27004</a> - [GLSL] allowing macro redefinition</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27060">Bug 27060</a> - [965] piglit glsl-fs-raytrace failure due to lack of function calls.</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27216">Bug 27216</a> - Assignment with a function call in an if statement causes an assertion failure</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27261">Bug 27261</a> - GLSL Compiler fails on the following vertex shader</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27265">Bug 27265</a> - GLSL Compiler doesnt link the attached vertex shader</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27388">Bug 27388</a> - [i965] piglit glsl-vs-arrays failure</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27403">Bug 27403</a> - GLSL struct causing "Invalid src register file ..." error</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27914">Bug 27914</a> - GLSL compiler uses MUL+ADD where it could use MAD</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28055">Bug 28055</a> - glsl-texcoord-array fails GLSL compilation</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28374">Bug 28374</a> - SIGSEGV shader/slang/slang_typeinfo.c:534</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28748">Bug 28748</a> - [i965] uninlined function calls support</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28833">Bug 28833</a> - piglit/shaders/glsl-texcoord-array fail</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28834">Bug 28834</a> - Add support for system fpclassify to GL_OES_query_matrix function for OpenBSD / NetBSD</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28837">Bug 28837</a> - varying vec4 index support</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28845">Bug 28845</a> - The GLU tesselator code has some warnings</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28889">Bug 28889</a> - [regression] wine game crash</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28894">Bug 28894</a> - slang build fails if absolute path contains spaces</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28913">Bug 28913</a> - [GLSL] allowing two version statements</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28931">Bug 28931</a> - Floating Point Exception in Warzone2100 Trunk version</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28966">Bug 28966</a> - [r300g] Dynamic branching 3 demo does not run</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28967">Bug 28967</a> - slang/slang_emit.c:350: storage_to_src_reg: Assertion `index &gt;= 0' failed.</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29013">Bug 29013</a> - [r300g] translate_rgb_op: unknown opcode ILLEGAL OPCODE</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29020">Bug 29020</a> - [r300g] Wine d3d9 tests hardlock</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29910">Bug 29910</a> - Mesa advertises bogus GL_ARB_shading_language_120</li>
-<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30196">Bug 30196</a> - [GLSL] gl_TextureMatrix{Inverse,Transpose,InverseTranspose} unsupported</li>
-</ul>
-
-
-<h2>Changes</h2>
-<ul>
-<li>The Mesa demo/test programs have been moved into a separate git
-repository.
-<li>GL/glext.h file upgraded to version 64
-<li>GL/glxext.h file upgraded to version 32
-<li>GL/wglext.h file upgraded to version 22
-</ul>
-
-</body>
-</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
deleted file mode 100644
index 4487af9..0000000
--- a/docs/relnotes.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Release Notes</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Release Notes</H1>
-
-<p>
-The release notes summarize what's new or changed in each Mesa release.
-</p>
-
-<UL>
-<LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
-<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
-<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
-<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
-<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
-<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
-<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
-<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>
-<LI><A HREF="relnotes-7.6.html">7.6 release notes</A>
-<LI><A HREF="relnotes-7.5.2.html">7.5.2 release notes</A>
-<LI><A HREF="relnotes-7.5.1.html">7.5.1 release notes</A>
-<LI><A HREF="relnotes-7.5.html">7.5 release notes</A>
-<LI><A HREF="relnotes-7.4.4.html">7.4.4 release notes</A>
-<LI><A HREF="relnotes-7.4.3.html">7.4.3 release notes</A>
-<LI><A HREF="relnotes-7.4.2.html">7.4.2 release notes</A>
-<LI><A HREF="relnotes-7.4.1.html">7.4.1 release notes</A>
-<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
-<LI><A HREF="relnotes-7.3.html">7.3 release notes</A>
-<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
-<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
-<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
-<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
-<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
-<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
-<LI><A HREF="relnotes-7.0.html">7.0 release notes</A>
-<LI><A HREF="relnotes-6.5.3.html">6.5.3 release notes</A>
-<LI><A HREF="relnotes-6.5.2.html">6.5.2 release notes</A>
-<LI><A HREF="relnotes-6.5.1.html">6.5.1 release notes</A>
-<LI><A HREF="relnotes-6.5.html">6.5 release notes</A>
-<LI><A HREF="relnotes-6.4.2.html">6.4.2 release notes</A>
-<LI><A HREF="relnotes-6.4.1.html">6.4.1 release notes</A>
-<LI><A HREF="relnotes-6.4.html">6.4 release notes</A>
-</UL
-
-<p>
-Versions of Mesa prior to 6.4 are summarized in the
-<a href="versions.html">versions file</a> and the following release notes.
-</p>
-
-<UL>
-<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
-<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
-<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
-<LI><A HREF="RELNOTES-6.2">RELNOTES-6.2</A>
-<LI><A HREF="RELNOTES-6.1">RELNOTES-6.1</A>
-<LI><A HREF="RELNOTES-6.0">RELNOTES-6.0</A>
-<LI><A HREF="RELNOTES-5.1">RELNOTES-5.1</A>
-<LI><A HREF="RELNOTES-5.0.2">RELNOTES-5.0.2</A>
-<LI><A HREF="RELNOTES-5.0.1">RELNOTES-5.0.1</A>
-<LI><A HREF="RELNOTES-5.0">RELNOTES-5.0</A>
-<LI><A HREF="RELNOTES-4.1">RELNOTES-4.1</A>
-<LI><A HREF="RELNOTES-4.0.3">RELNOTES-4.0.3</A>
-<LI><A HREF="RELNOTES-4.0.2">RELNOTES-4.0.2</A>
-<LI><A HREF="RELNOTES-4.0.1">RELNOTES-4.0.1</A>
-<LI><A HREF="RELNOTES-4.0">RELNOTES-4.0</A>
-<LI><A HREF="RELNOTES-3.5">RELNOTES-3.5</A>
-<LI><A HREF="RELNOTES-3.4.2">RELNOTES-3.4.2</A>
-<LI><A HREF="RELNOTES-3.4.1">RELNOTES-3.4.1</A>
-<LI><A HREF="RELNOTES-3.4">RELNOTES-3.4</A>
-<LI><A HREF="RELNOTES-3.3">RELNOTES-3.3</A>
-<LI><A HREF="RELNOTES-3.2.1">RELNOTES-3.2.1</A>
-<LI><A HREF="RELNOTES-3.2">RELNOTES-3.2</A>
-<LI><A HREF="RELNOTES-3.1">RELNOTES-3.1</A>
-</UL>
-
-
-</BODY>
-</HTML>
diff --git a/docs/repository.html b/docs/repository.html
deleted file mode 100644
index 954bd0d..0000000
--- a/docs/repository.html
+++ /dev/null
@@ -1,216 +0,0 @@
-<HTML>
-
-<TITLE>Code Repository</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<h1>Code Repository</h1>
-
-<p>
-Mesa uses <a href="http://git.or.cz/"target="_parent">git</a>
-as its source code management system.
-</p>
-
-The master git repository is hosted on
-<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
-</p>
-
-<p>
-You may access the repository either as an
-<a href="#anonymous">anonymous user</a> (read-only) or as a
-<a href="#developer">developer</a>
-(read/write).
-</p>
-
-<p>
-You may also 
-<a href="http://gitweb.freedesktop.org/?p=mesa/mesa.git"
-target="_parent">browse the main Mesa git repository</a> and the
-<a href="http://cgit.freedesktop.org/mesa/demos"
-target="_parent">Mesa demos and tests git repository</a>.
-</p>
-
-
-<a name="anonymous">
-<H2>Anonymous git Access</H2>
-
-<p>
-To get the Mesa sources anonymously (read-only):
-</p>
-
-<ol>
-<li>Install the git software on your computer if needed.<br><br>
-<li>Get an initial, local copy of the repository with:
-    <pre>
-    git clone git://anongit.freedesktop.org/git/mesa/mesa
-    </pre>
-<li>Later, you can update your tree from the master repository with:
-    <pre>
-    git pull origin
-    </pre>
-<li>If you also want the Mesa demos/tests repository:
-    <pre>
-    git clone git://anongit.freedesktop.org/git/mesa/demos
-    </pre>
-</ol>
-
-
-<a name="developer">
-<H2>Developer git Access</H2>
-
-<p>
-Mesa developers need to first have an account on
-<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
-To get an account, please ask Brian or the other Mesa developers for
-permission.
-Then, if there are no objections, follow this
-<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent">
-procedure</a>.
-</p>
-
-<p>
-Once your account is established:
-</p>
-
-<ol>
-<li>Install the git software on your computer if needed.<br><br>
-<li>Get an initial, local copy of the repository with:
-    <pre>
-    git clone git+ssh://username@git.freedesktop.org/git/mesa/mesa
-    </pre>
-    Replace <em>username</em> with your actual login name.<br><br>
-<li>Later, you can update your tree from the master repository with:
-    <pre>
-    git pull origin
-    </pre>
-<li>If you also want the Mesa demos/tests repository:
-    <pre>
-    git clone git+ssh://username@git.freedesktop.org/git/mesa/demos
-    </pre>
-</ol>
-
-
-<H2>Windows Users</H2>
-
-<p>
-If you're <a href="http://git.or.cz/gitwiki/WindowsInstall" target="_parent">
-using git on Windows</a> you'll want to enable automatic CR/LF conversion in
-your local copy of the repository:
-</p>
-<pre>
-   git config --global core.autocrlf true
-</pre>
-
-<p>
-This will cause git to convert all text files to CR+LF on checkout,
-and to LF on commit.
-</p>
-<p>
-Unix users don't need to set this option.
-</p>
-<br>
-
-
-<a name="developer">
-<H2>Development Branches</H2>
-
-<p>
-At any given time, there may be several active branches in Mesa's
-repository.
-Generally, the trunk contains the latest development (unstable)
-code while a branch has the latest stable code.
-</p>
-
-<p>
-The command <code>git-branch</code> will list all available branches.
-</p>
-
-<p>
-Questions about branch status/activity should be posted to the
-mesa3d-dev mailing list.
-</p>
-
-<H2>Developer Git Tips</H2>
-
-<ol>
-<li>Setting up to edit the master branch
-<p>
-If you try to do a pull by just saying<code> git pull </code>
-and git complains that you have not specified a
-branch, try:
-<pre>
-    git config branch.master.remote origin
-    git config branch.master.merge master
-</pre>
-Otherwise, you have to say<code> git pull origin master </code>
-each time you do a pull.
-</p>
-<li>Small changes to master
-<p>
-If you are an experienced git user working on substancial modifications,
-you are probably
-working on a separate branch and would rebase your branch prior to
-merging with master.
-But for small changes to the master branch itself,
-you also need to use the rebase feature in order to avoid an
-unnecessary and distracting branch in master.
-</p>
-<p>
-If it has been awhile since you've done the initial clone, try
-<pre>
-    git pull
-</pre>
-to get the latest files before you start working.
-</p>
-<p>
-Make your changes and use
-<pre>
-    git add &lt;files to commit&gt;
-    git commit
-</pre>
-to get your changes ready to push back into the fd.o repository.
-</p>
-<p>
-It is possible (and likely) that someone has changed master since
-you did your last pull.  Even if your changes do not conflict with
-their changes, git will make a fast-forward 
-merge branch, branching from the point in time
-where you did your last pull and merging it to a point after the other changes.
-</p>
-<p>
-To avoid this, 
-<pre>
-    git pull --rebase
-    git push
-</pre>
-If you are familiar with CVS or similar system, this is similar to doing a
-<code> cvs update </code> in order to update your source tree to
-the current repository state, instead of the time you did the last update.
-(CVS doesn't work like git in this respect, but this is easiest way
-to explain it.)
-</br>
-In any case, your repository now looks like you made your changes after
-all the other changes.
-</p>
-<p>
-If the rebase resulted in conflicts or changes that could affect
-the proper operation of your changes, you'll need to investigate
-those before doing the push.
-</p>
-<p>
-If you want the rebase action to be the default action, then
-<pre>
-    git config branch.master.rebase true
-    git config --global branch.autosetuprebase=always
-</pre>
-<p>
-See <a href="http://www.eecs.harvard.edu/~cduan/technical/git/" target="_parent">Understanding Git Conceptually</a> for a fairly clear explanation about all of this.
-</p>
-</ol>
-
-</body>
-</html>
-
-
diff --git a/docs/science.html b/docs/science.html
deleted file mode 100644
index f55cf31..0000000
--- a/docs/science.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<HTML>
-
-<TITLE>Science and Technical</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Science and Technical</H1>
-
-<ul>
-	<li><a href="http://www.softintegration.com/products/toolkit/opengl/" target="_parent">Ch</a> - OpenGL bindings for the Ch C/C++ interpreter
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">CLEO3D</a> - event displayer for the CLEOIII detector
-	</li><li><a href="http://www.bioz.unibas.ch/%7Exray/dino/" target="_parent">DINO</a> - Visualizing
-	Structural Biology
-	</li><li><a href="http://www-xdiv.lanl.gov/XCM/gmv/GMVHome.html" target="_parent">General
-	Mesh Viewer (GMV)</a> - scientific vis.
-	</li><li><a href="http://gid.cimne.upc.es/" target="_parent">GiD</a> - finite element
-	analysis
-	</li><li><a href="http://sig.co.za/download.htm" target="_parent">glpoisson</a> - A finite
-	element analysis program that simulates wave in an arbitrary region.
-	</li><li><a href="http://glwaves.sourceforge.net/" target="_parent">GLWaves</a> -
-	Electromagnetic wave visualization
-	</li><li><a href="http://www.geuz.org/gmsh/" target="_parent">Gmsh</a> -
-	finite element mesh generator / viewer
-	</li><li><a href="http://laaksonen.csc.fi/gopenmol/gopenmol.htmls" target="_parent">gOpenMol</a>
-	- computational chemistry
-	</li><li><a href="http://www.mgix.com/gps3d/" target="_parent">GPS 3D</a> - GPS-based map visualization
-	</li><li><a href="http://hirame.hiram.edu/%7Eworleyam/" target="_parent">Hitchhiker</a>
-	- virtual solar system
-	</li><li><a href="http://www-xdiv.lanl.gov/XCM/Hydra/" target="_parent">Hydra</a> - physics
-	and engineering pkg
-	</li><li><a href="http://fox.mit.edu/skunk/soft/lightspeed/" target="_parent">Light Speed</a>
-	- a real-time, interactive relativistic simulator
-	</li><li><a href="http://linkwinds.jpl.nasa.gov/" target="_parent">LinkWinds</a> - scientific
-	vis
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html" target="_parent">MathGL3d</a> - Mathematica viewer
-	</li><li><a href="http://www.mathworks.com/products/matlab" target="_parent">Mathworks</a>
-	- mathematics and visualization
-	  </li><li><a href="http://www-rocq.inria.fr/gamma/medit/medit.html" target="_parent">Medit</a> - 3D surface mesh viewer
-	</li><li><a href="http://www.mol.biol.ethz.ch/wuthrich/software/molmol/" target="_parent">MOLMOL</a>
-	- molecular modeling and analysis
-	</li><li><a href="http://www.avatar.se/molscript/" target="_parent">Molscript</a> - molecular
-	modeling
-	</li>
-	<li><a href="http://www.opendx.org/" target="_parent">OpenDX</a> - Data visualization
-	system
-	</li>
-	<li><a href="http://orsa.sourceforge.net/" target="_parent">ORSA</a> - An interactive tool for Celestial Mechanics
-	</li>
-	<li><a href="http://www.paraview.org/" target="_parent">ParaView</a> - Scientific visualization package
-	</li>
-	<li><a href="http://mesa3d.sourceforge.net/notfound.html">PHLEX</a> - Finite element vis
-	</li><li><a href="http://root.cern.ch/" target="_parent">ROOT</a> - Object Oriented Data
-	Analysis Framework
-	</li><li><a href="http://www.slffea.com/" target="_parent">SLFFEA</a> - GNU finite element
-	package
-	</li><li><a href="http://quorum.tamu.edu/jon/spock" target="_parent">Spock</a> - molecular
-	modeling
-	</li><li><a href="http://www1.las.es/%7Eamil/ssystem" target="_parent">Ssystem</a> - solar
-	system simulation
-	</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">SPARROW</a> - robot simulation
-	</li><li><a href="http://www.ssec.wisc.edu/%7Ebillh/vis5d.html" target="_parent">Vis5D</a>
-	- atmospheric visualization
-	</li><li><a href="http://www.ks.uiuc.edu/Research/vmd/" target="_parent">VMD</a> - molecular
-	modeling
-	</li><li><a href="http://www.cyberbotics.com/" target="_parent">Webots</a> - 3-D mobile
-	robot simulator
-</li></ul>
-
-
-</body></html>
\ No newline at end of file
diff --git a/docs/shading.html b/docs/shading.html
deleted file mode 100644
index c41d4a9..0000000
--- a/docs/shading.html
+++ /dev/null
@@ -1,268 +0,0 @@
-<HTML>
-
-<TITLE>Shading Language Support</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Shading Language Support</H1>
-
-<p>
-This page describes the features and status of Mesa's support for the
-<a href="http://opengl.org/documentation/glsl/" target="_parent">
-OpenGL Shading Language</a>.
-</p>
-
-<p>
-Contents
-</p>
-<ul>
-<li><a href="#envvars">Environment variables</a>
-<li><a href="#120">GLSL 1.20 support</a>
-<li><a href="#unsup">Unsupported Features</a>
-<li><a href="#notes">Implementation Notes</a>
-<li><a href="#hints">Programming Hints</a>
-<li><a href="#standalone">Stand-alone GLSL Compiler</a>
-<li><a href="#implementation">Compiler Implementation</a>
-<li><a href="#validation">Compiler Validation</a>
-</ul>
-
-
-
-<a name="envvars">
-<h2>Environment Variables</h2>
-
-<p>
-The <b>MESA_GLSL</b> environment variable can be set to a comma-separated
-list of keywords to control some aspects of the GLSL compiler and shader
-execution.  These are generally used for debugging.
-</p>
-<ul>
-<li><b>dump</b> - print GLSL shader code to stdout at link time
-<li><b>log</b> - log all GLSL shaders to files.
-    The filenames will be "shader_X.vert" or "shader_X.frag" where X
-    the shader ID.
-<li><b>nopt</b> - disable compiler optimizations
-<li><b>opt</b> - force compiler optimizations
-<li><b>uniform</b> - print message to stdout when glUniform is called
-<li><b>nopvert</b> - force vertex shaders to be a simple shader that just transforms
-    the vertex position with ftransform() and passes through the color and
-    texcoord[0] attributes.
-<li><b>nopfrag</b> - force fragment shader to be a simple shader that passes
-    through the color attribute.
-<li><b>useprog</b> - log glUseProgram calls to stderr
-</ul>
-<p>
-Example:  export MESA_GLSL=dump,nopt
-</p>
-
-
-<a name="120">
-<h2>GLSL Version</h2>
-
-<p>
-The GLSL compiler currently supports version 1.20 of the shading language.
-</p>
-
-<p>
-Several GLSL extensions are also supported:
-</p>
-<ul>
-<li>GL_ARB_draw_buffers
-<li>GL_ARB_texture_rectangle
-<li>GL_ARB_fragment_coord_conventions
-<li>GL_EXT_texture_array
-</ul>
-
-
-<a name="unsup">
-<h2>Unsupported Features</h2>
-
-<p>XXX update this section</p>
-
-<p>
-The following features of the shading language are not yet fully supported
-in Mesa:
-</p>
-
-<ul>
-<li>Linking of multiple shaders does not always work.  Currently, linking
-    is implemented through shader concatenation and re-compiling.  This
-    doesn't always work because of some #pragma and preprocessor issues.
-<li>gl_ClipVertex
-<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
-    without perspective correction
-</ul>
-
-<p>
-All other major features of the shading language should function.
-</p>
-
-
-<a name="notes">
-<h2>Implementation Notes</h2>
-
-<ul>
-<li>Shading language programs are compiled into low-level programs
-    very similar to those of GL_ARB_vertex/fragment_program.
-<li>All vector types (vec2, vec3, vec4, bvec2, etc) currently occupy full
-    float[4] registers.
-<li>Float constants and variables are packed so that up to four floats
-    can occupy one program parameter/register.
-<li>All function calls are inlined.
-<li>Shaders which use too many registers will not compile.
-<li>The quality of generated code is pretty good, register usage is fair.
-<li>Shader error detection and reporting of errors (InfoLog) is not
-    very good yet.
-<li>The ftransform() function doesn't necessarily match the results of
-    fixed-function transformation.
-</ul>
-
-<p>
-These issues will be addressed/resolved in the future.
-</p>
-
-
-<a name="hints">
-<h2>Programming Hints</h2>
-
-<ul>
-<li>Use the built-in library functions whenever possible.
-    For example, instead of writing this:
-<pre>
-        float x = 1.0 / sqrt(y);
-</pre>
-    Write this:
-<pre>
-        float x = inversesqrt(y);
-</pre>
-</li>
-</ul>
-
-
-<a name="standalone">
-<h2>Stand-alone GLSL Compiler</h2>
-
-<p>
-The stand-alone GLSL compiler program can be used to compile GLSL shaders
-into low-level GPU code.
-</p>
-
-<p>
-This tool is useful for:
-<p>
-<ul>
-<li>Inspecting GPU code to gain insight into compilation
-<li>Generating initial GPU code for subsequent hand-tuning
-<li>Debugging the GLSL compiler itself
-</ul>
-
-<p>
-After building Mesa, the compiler can be found at src/glsl/glsl_compiler
-</p>
-
-<p>
-Here's an example of using the compiler to compile a vertex shader and
-emit GL_ARB_vertex_program-style instructions:
-</p>
-<pre>
-    src/glsl/glslcompiler --dump-ast myshader.vert
-</pre>
-
-Options include
-<ul>
-<li><b>--dump-ast</b> - dump GPU code
-<li><b>--dump-hir</b> - dump high-level IR code
-<li><b>--dump-lir</b> - dump low-level IR code
-<li><b>--link</b> - ???
-</ul>
-
-
-
-
-<a name="implementation">
-<h2>Compiler Implementation</h2>
-
-<p>
-The source code for Mesa's shading language compiler is in the
-<code>src/glsl/</code> directory.
-</p>
-
-<p>
-XXX provide some info about the compiler....
-</p>
-
-<p>
-The final vertex and fragment programs may be interpreted in software
-(see prog_execute.c) or translated into a specific hardware architecture
-(see drivers/dri/i915/i915_fragprog.c for example).
-</p>
-
-<h3>Code Generation Options</h3>
-
-<p>
-Internally, there are several options that control the compiler's code
-generation and instruction selection.
-These options are seen in the gl_shader_state struct and may be set
-by the device driver to indicate its preferences:
-
-<pre>
-struct gl_shader_state
-{
-   ...
-   /** Driver-selectable options: */
-   GLboolean EmitHighLevelInstructions;
-   GLboolean EmitCondCodes;
-   GLboolean EmitComments;
-};
-</pre>
-
-<ul>
-<li>EmitHighLevelInstructions
-<br>
-This option controls instruction selection for loops and conditionals.
-If the option is set high-level IF/ELSE/ENDIF, LOOP/ENDLOOP, CONT/BRK
-instructions will be emitted.
-Otherwise, those constructs will be implemented with BRA instructions.
-</li>
-
-<li>EmitCondCodes
-<br>
-If set, condition codes (ala GL_NV_fragment_program) will be used for
-branching and looping.
-Otherwise, ordinary registers will be used (the IF instruction will
-examine the first operand's X component and do the if-part if non-zero).
-This option is only relevant if EmitHighLevelInstructions is set.
-</li>
-
-<li>EmitComments
-<br>
-If set, instructions will be annoted with comments to help with debugging.
-Extra NOP instructions will also be inserted.
-</br>
-
-</ul>
-
-
-<a name="validation">
-<h2>Compiler Validation</h2>
-
-<p>
-Developers working on the GLSL compiler should test frequently to avoid
-regressions.
-</p>
-
-<p>
-The <a href="http://people.freedesktop.org/~nh/piglit/">Piglit</a> project
-has many GLSL tests and the
-<a href="http://glean.sf.net" target="_parent">Glean</a> glsl1 test 
-tests GLSL features.
-</p>
-
-<p>
-The Mesa demos repository also has some good GLSL tests.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/sourcedocs.html b/docs/sourcedocs.html
deleted file mode 100644
index 90538af..0000000
--- a/docs/sourcedocs.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<HTML>
-
-<TITLE>Source Code Documentation</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Source Code Documentation</H1>
-
-<p>
-<A HREF="http://www.doxygen.org" target="_parent">Doxygen</A>
-is used to automatically
-produce cross-referenced documentation from the Mesa source code.
-</p>
-
-<p>
-The Doxygen configuration files and generated files are not included
-in the normal Mesa distribution (they're very large).
-To generate Doxygen documentation, download Mesa from CVS, change to
-the <code>doxygen</code> directory and run <code>make</code>.
-</P>
-
-<p>
-For an example of Doxygen usage in Mesa, see a recent source file
-such as <a href="http://webcvs.freedesktop.org/mesa/Mesa/src/mesa/main/bufferobj.c?view=markup" target="_parent">bufferobj.c</a>.
-</p>
-
-
-<P>
-If you're reading this page from your local copy of Mesa, and have
-run the doxygen scripts, you can read the documentation
-<A HREF="../doxygen/main/index.html" target="_parent">here</A>
-</P>
-
-</BODY>
-</HTML>
diff --git a/docs/sourcetree.html b/docs/sourcetree.html
deleted file mode 100644
index 00dc4e7..0000000
--- a/docs/sourcetree.html
+++ /dev/null
@@ -1,165 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Source Tree</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<h1>Mesa source code tree overview</h1>
-
-<p>
-This is a brief summary of Mesa's directory tree and what's contained in
-each directory.
-</p>
-
-
-<ul>
-<li><b>docs</b> - Documentation
-<li><b>include</b> - Public OpenGL header files
-<li><b>src</b>
-  <ul>
-  <li><b>egl</b> - EGL library sources
-    <ul>
-    <li><b>docs</b> - EGL documentation
-    <li><b>drivers</b> - EGL drivers
-    <li><b>main</b> - main EGL library implementation.  This is where all
-        the EGL API functions are implemented, like eglCreateContext().
-    </ul>
-  <li><b>mesa</b> - Main Mesa sources
-    <ul>
-    <li><b>glapi</b> - OpenGL API dispatch layer.  This is where all the
-        GL entrypoints like glClear, glBegin, etc. are generated, as well as
-        the GL dispatch table.  All GL function calls jump through the
-        dispatch table to functions found in main/.
-    <li><b>main</b> - The core Mesa code (mainly state management)
-    <li><b>drivers</b> - Mesa drivers (not used with Gallium)
-        <ul>
-	<li><b>common</b> - code which may be shared by all drivers
-        <li><b>dri</b> - Direct Rendering Infrastructure drivers
-           <ul>
-	   <li><b>common</b> - code shared by all DRI drivers
-	   <li><b>i915</b> - driver for Intel i915/i945
-	   <li><b>i965</b> - driver for Intel i965
-	   <li>XXX more
-           </ul>
-        <li><b>x11</b> - Xlib-based software driver
-        <li><b>osmesa</b> - off-screen software driver
-	<li><b>glslcompiler</b> - a stand-alone GLSL compiler driver
-        <li>XXX more
-        </ul>
-    <li><b>es</b> - OpenGL ES overlay, parallelly buildable with the core Mesa
-    <li><b>math</b> - vertex array translation and transformation code
-        (not used with Gallium)
-    <li><b>ppc</b> - Assembly code/optimizations for PPC systems
-        (not used with Gallium)
-    <li><b>shader</b> - Vertex/fragment shader and GLSL compiler code
-    <li><b>sparc</b> - Assembly code/optimizations for SPARC systems
-        (not used with Gallium)
-    <li><b>state_tracker</b> - State tracker / driver for Gallium.  This
-        is basically a Mesa device driver that speaks to Gallium.  This
-        directory may be moved to src/mesa/drivers/gallium at some point.
-    <li><b>swrast</b> - Software rasterization module.  For drawing points,
-        lines, triangles, bitmaps, images, etc. in software.
-        (not used with Gallium)
-    <li><b>swrast_setup</b> - Software primitive setup.  Does things like
-        polygon culling, glPolygonMode, polygon offset, etc.
-        (not used with Gallium)
-    <li><b>tnl</b> - Software vertex Transformation 'n Lighting.
-        (not used with Gallium)
-    <li><b>tnl_dd</b> - TNL code for device drivers.
-        (not used with Gallium)
-    <li><b>vbo</b> - Vertex Buffer Object code.  All drawing with
-        glBegin/glEnd, glDrawArrays, display lists, etc. goes through this
-        module.  The results is a well-defined set of vertex arrays which
-        are passed to the device driver (or tnl module) for rendering.
-    <li><b>vf</b> - vertex format conversion (currently unused)
-    <li><b>x86</b> - Assembly code/optimizations for 32-bit x86 systems
-        (not used with Gallium)
-    <li><b>x86-64</b> - Assembly code/optimizations for 64-bit x86 systems
-        (not used with Gallium)
-    </ul>
-  <li><b>gallium</b> - Gallium3D source code
-    <ul>
-    <li><b>include</b> - Gallium3D header files which define the Gallium3D
-        interfaces
-    <li><b>drivers</b> - Gallium3D device drivers
-      <ul>
-      <li><b>cell</b> - Driver for Cell processor.
-      <li><b>i915</b> - Driver for Intel i915/i945.
-      <li><b>i965</b> - Driver for Intel i965.
-      <li><b>llvmpipe</b> - Software driver using LLVM for runtime code generation.
-      <li><b>nv*</b> - Drivers for NVIDIA GPUs.
-      <li><b>r300</b> - Driver for ATI/AMD R300.
-      <li><b>softpipe</b> - Software reference driver.
-      <li><b>svga</b> - Driver for VMware's SVGA virtual GPU.
-      <li><b>trace</b> - Driver for tracing Gallium calls.
-      <li>XXX more
-      </ul>
-    <li><b>auxiliary</b> - Gallium support code
-      <ul>
-      <li><b>draw</b> - Software vertex processing and primitive assembly
-          module.  This includes vertex program execution, clipping, culling
-          and optional stages for drawing wide lines, stippled lines,
-          polygon stippling, two-sided lighting, etc.
-          Intended for use by drivers for hardware that does not have
-          vertex shaders.
-          Geometry shaders will also be implemented in this module.
-      <li><b>cso_cache</b> - Constant State Objects Cache.  Used to filter out
-          redundant state changes between state trackers and drivers.
-      <li><b>gallivm</b> - LLVM module for Gallium.  For LLVM-based
-           compilation, optimization and code generation for TGSI shaders.
-           Incomplete.
-      <li><b>pipebuffer</b> - utility module for managing buffers
-      <li><b>rbug</b> - Gallium remote debug utility
-      <li><b>rtasm</b> - run-time assembly/machine code generation.
-          Currently there's run-time code generation for x86/SSE, PowerPC
-          and Cell SPU.
-      <li><b>tgsi</b> - TG Shader Infrastructure.  Code for encoding,
-          manipulating and interpretting GPU programs.
-      <li><b>translate</b> - module for translating vertex data from one format
-          to another.
-      <li><b>util</b> - assorted utilities for arithmetic, hashing, surface
-          creation, memory management, 2D blitting, simple rendering, etc.
-      </ul>
-    <li><b>state_trackers</b> -
-       <ul>
-       <li><b>dri</b> - Meta state tracker for DRI drivers
-       <li><b>egl</b> - Meta state tracker for EGL drivers
-       <li><b>es</b> - OpenGL ES 1.x and 2.x state trackers
-       <li><b>g3dvl</b> -
-       <li><b>glx</b> - Meta state tracker for GLX
-       <li><b>python</b> -
-       <li><b>vega</b> - OpenVG 1.x state tracker
-       <li><b>wgl</b> -
-       <li><b>xorg</b> - Meta state tracker for Xorg video drivers
-       </ul>
-    <li><b>winsys</b> -
-       <ul>
-       <li><b>drm</b> -
-       <li><b>g3dvl</b> -
-       <li><b>gdi</b> -
-       <li><b>xlib</b> -
-       </ul>
-    </ul>
-  </ul>
-  <ul>
-  <li><b>glu</b> - The OpenGL Utility library
-     <ul>
-     <li><b>sgi</b> - GLU from SGI
-     <li><b>mesa</b> - Mesa version of GLU (deprecated)
-     </ul>
-  <li><b>glut</b> - Mark Kilgard's OpenGL OpenGL Utility Toolkit library
-  <li><b>glx</b> - The GLX library code for building libGL.  This is used for
-         direct rendering drivers.  It will dynamically load one of the 
-         xxx_dri.so drivers.
-  <li><b>glw</b> - Widgets for Xt/Motif.
-  <li><b>glew</b> - OpenGL Extension Wrangler library (used by demo programs)
-  </ul>
-<li><b>progs</b> - OpenGL test and demonstration programs
-<li><b>lib</b> - where the GL libraries are placed
-</ul>
-
-
-</BODY>
-</HTML>
diff --git a/docs/subset-A.html b/docs/subset-A.html
deleted file mode 100644
index d576bb6..0000000
--- a/docs/subset-A.html
+++ /dev/null
@@ -1,3578 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <title>Mini GLX Specification</title>
-</head>
-<body>
-<span style="font-style: italic;"></span><span
- style="font-weight: bold;"></span>
-<h1>
-<center>Mesa Subset Specification</center>
-</h1>
-<h2>
-<center>
-<h3>Tungsten Graphics, Inc.</h3>
-<h3>February 26, 2003<br>
-</h3>
-</center>
-</h2>
-<p> Copyright &copy; 2002-2003 by Tungsten Graphics, Inc.,
-Cedar Park, Texas. All Rights Reserved. <br>
-<br>
-Permission is granted to make and distribute verbatim copies of this
-document provided the copyright notice and this permission notice are
-preserved on all copies.<br>
-</p>
-<p> OpenGL is a trademark of <a href="http://www.sgi.com">Silicon
-Graphics, Inc.</a>.</p>
-<h1>1. Introduction</h1>
-This document describes a subset of the Mesa implemented by Tungsten
-Graphics, Inc. for embedded devices. &nbsp;Prior to reading this
-document the reader should be familiar with the OpenGL 1.2.1
-specification dated April 1, 1999 (available from <a
- href="http://www.opengl.org/developers/documentation/specs.html">http://www.opengl.org/developers/documentation/specs.html</a>.)
-&nbsp;Experience with OpenGL programming is highly advisable.<a
- href="http://www.opengl.org/developers/documentation/specs.html"><br>
-</a><br>
-Tungsten Graphics, Inc. is working with industry standards
-organizations +in an attempt to standardize this Mesa subset and any
-other possible subsets +as a result of this work. <br>
-<br>
-Appendix A contains a list of issues of which some may not be resolved.<br>
-<br>
-To summarize, the following major features of Mesa are omitted from the
-subset:<br>
-<ul>
-  <li>Vertex arrays</li>
-  <li>Texture coordinate generation</li>
-  <li>Lighting</li>
-  <li>Point size</li>
-  <li>Polygon stipple</li>
-  <li>DrawPixels, CopyPixels, PixelZoom</li>
-  <li>1-D and 3-D textures</li>
-  <li>CopyTex[Sub]Image</li>
-  <li>Fog</li>
-  <li>Depth test</li>
-  <li>Color Index mode</li>
-  <li>Accumulation buffer</li>
-  <li>Feedback mode</li>
-  <li>Evaluators</li>
-  <li>Push/Pop attributes</li>
-  <li>Display lists<br>
-  </li>
-</ul>
-<p>Further reductions are made at a lower level of detail.<br>
-</p>
-<p>Mesa function names are printed in <span style="font-weight: bold;">bold
-face</span>. &nbsp;Function parameters are printed in <span
- style="font-style: italic;">italics</span>.<br>
-</p>
-<p>The Tungsten Graphics, Inc. Mesa subset library is hereafter
-referred to as <span style="font-style: italic;">the subset.</span><br>
-<br>
-</p>
-<h1>2. Primitive Specification</h1>
-<h2>2.1 glBegin, glEnd and glVertex Commands</h2>
-The basic rendering primitives are points, lines and triangles.
-&nbsp;Quadrilaterals and polygons are composed of triangles.
-&nbsp;Primitives are drawn with the <span style="font-weight: bold;">glBegin</span>
-and <span style="font-weight: bold;">glEnd</span> commands and a subset
-of the <span style="font-weight: bold;">glVertex</span> commands:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glBegin</span>(GLenum<span
- style="font-style: italic;">mode</span>)<br>
-void <span style="font-weight: bold;">glEnd</span>(void)<br>
-<br>
-void <span style="font-weight: bold;">glVertex2f</span>(GLfloat <span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>)<br>
-void <span style="font-weight: bold;">glVertex2fv</span>(const GLfloat
-*<span style="font-style: italic;">v</span>)<br>
-void <span style="font-weight: bold;">glVertex3f</span>(GLfloat <span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>, GLfloat <span
- style="font-style: italic;">z</span>)<br>
-void <span style="font-weight: bold;">glVertex3fv</span>(const GLfloat
-*<span style="font-style: italic;">v</span>)<br>
-</div>
-<br>
-The <span style="font-style: italic;">mode</span> parameter to <span
- style="font-weight: bold;">glBegin</span> may be one of the following<br>
-<br>
-<div style="margin-left: 40px;">GL_POINTS - a series of individual
-points<br>
-GL_LINES - a series of disjoint line segments<br>
-GL_LINE_STRIP - series of connected line segments<br>
-GL_LINE_LOOP - a closed loop of line segments<br>
-GL_TRIANGLES - a series of individual triangles<br>
-GL_TRIANGLE_STRIP - a connected strip of triangles<br>
-GL_TRIANGLE_FAN - a sequence of triangles all sharing a common vertex<br>
-GL_QUADS - a sequence of individual quadrilaterals<br>
-GL_QUAD_STRIP - a connected strip of quadrilaterals<br>
-GL_POLYGON - a closed, convex polygon<br>
-<br>
-</div>
-<br>
-The <span style="font-weight: bold;">glVertex</span> commands take two
-or three floating point coordinates, or a pointer to an array of two or
-three floating point coordinates. &nbsp;Vertices are actually 4-element
-homogeneous coordinates. &nbsp;The fourth component, unspecified by the
-subset's <span style="font-weight: bold;">glVertex</span> commands, is
-one.<br>
-<br>
-<span style="font-weight: bold;"></span>
-<h2>2.2 Other Per-vertex Commands<br>
-</h2>
-The <span style="font-weight: bold;">glColor</span> and <span
- style="font-weight: bold;">glTexCoord</span> commands may be used to
-specify colors and texture coordinates for each vertex:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glColor3f</span>(GLfloat<span
- style="font-style: italic;">red</span>, GLfloat <span
- style="font-style: italic;">green</span>, GLfloat <span
- style="font-style: italic;">blue</span>)<br>
-void <span style="font-weight: bold;">glColor3fv</span>(const GLfloat *<span
- style="font-style: italic;">rgb</span>)<br>
-void <span style="font-weight: bold;">glColor4f</span>(GLfloat <span
- style="font-style: italic;">red,</span> GLfloat <span
- style="font-style: italic;">green,</span> GLfloat <span
- style="font-style: italic;">blue,</span> GLfloat <span
- style="font-style: italic;">alpha</span>)<br>
-void <span style="font-weight: bold;">glColor4fv</span>(const GLfloat *<span
- style="font-style: italic;">rgba</span>)<br>
-void <span style="font-weight: bold;">glTexCoord2f</span>(GLfloat <span
- style="font-style: italic;">s</span>, GLfloat<span
- style="font-style: italic;"> t</span>)<br>
-void <span style="font-weight: bold;">glTexCoord2fv</span>(const
-GLfloat *<span style="font-style: italic;">c</span>)<br>
-<br>
-</div>
-The <span style="font-weight: bold;">glColor</span> commands specify
-the color and optionally, the alpha value, for subsequent vertices.
-&nbsp;For the <span style="font-weight: bold;">glColor3</span> commands,
-alpha is set to one.<br>
-<br>
-The <span style="font-weight: bold;">glTexCoord2</span> commands
-specify the texture coordinate for subsequent vertices. &nbsp;Texture
-coordinates are actually four-component coordinates: (s, t, r, q).
-&nbsp;The <span style="font-weight: bold;">glTexCoord2</span> commands
-set s and t explicitly. &nbsp;The r and q components are zero and one,
-respectively.<br>
-<br>
-<span style="font-weight: bold;"></span>Only <span
- style="font-weight: bold;">glVertex, glColor</span> and <span
- style="font-weight: bold;">glTexCoord</span> commands are allowed
-between <span style="font-weight: bold;">glBegin</span> and <span
- style="font-weight: bold;">glEnd.</span> &nbsp;Calling any other
-command between <span style="font-weight: bold;">glBegin</span> and <span
- style="font-weight: bold;">glEnd</span> will result in the error
-GL_INVALID_OPERATION.<br>
-<br>
-<h2>2.3 Unsupported Commands</h2>
-None of the following commands related to primitive specification are
-supported by the subset:<br>
-<br>
-<div style="margin-left: 40px;">Per-Vertex commands:<br>
-</div>
-<div style="margin-left: 40px;">
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glVertex2d,
-glVertex2i, glVertex2s, glVertex3d, glVertex3i, glVertex3s, glVertex4d,
-glVertex4i, glVertex4s, glVertex2dv, glVertex2iv, glVertex2sv,
-glVertex3dv, glVertex3iv, glVertex3sv, glVertex4dv, glVertex4iv,
-glVertex4sv,<br>
-glNormal3b, glNormal3d, glNormal3f, glNormal3i, glNormal3s, </span><span
- style="font-weight: bold;">glNormal3bv, glNormal3dv, glNormal3fv,
-glNormal3iv, glNormal3sv,<br>
-glIndexd, glIndexf, glIndexi, glIndexs, glIndexub, glIndexdv,
-glIndexfv, glIndexiv, glIndexsv, glIndexubv,<br>
-glColor3b, glColor3d, glColor3i, glColor3s, glColor3ub, glColor3ui,
-glColor3us, </span><span style="font-weight: bold;">glColor3bv,
-glColor3dv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv,
-glColor3usv,</span><span style="font-weight: bold;"> lColor4b,
-glColor4d, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, </span><span
- style="font-weight: bold;">glColor4bv, glColor4dv, glColor4iv,
-glColor4sv, glColor4ubv, glColor4uiv, glColor4usv,<br>
-</span><span style="font-weight: bold;">glTexCoord1d, glTexCoord1f,
-glTexCoord1i, glTexCoord1s, glTexCoord2d, glTexCoord2i, glTexCoord2s,
-glTexCoord3d, glTexCoord3f, glTexCoord3i, glTexCoord3s, glTexCoord4d,
-glTexCoord4f, glTexCoord4i, glTexCoord4s, glTexCoord1dv, glTexCoord1fv,
-glTexCoord1iv, glTexCoord1sv, glTexCoord2dv, glTexCoord2iv,
-glTexCoord2sv, glTexCoord3dv, glTexCoord3fv, glTexCoord3iv,
-glTexCoord3sv, glTexCoord4dv, glTexCoord4fv, glTexCoord4iv,
-glTexCoord4sv,<br>
-glEdgeFlag, glEdgeFlagv</span><br style="font-weight: bold;">
-<br>
-</div>
-Vertex array commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glVertexPointer,
-glColorPointer, glIndexPointer, glTexCoordPointer, glEdgeFlagPointer,
-glNormalPointer, glInterleavedArrays, glArrayElement, glDrawArrays,
-glDrawElements, glDrawRangeElements, glEnableClientState,
-glDisableClientState</span><br>
-</div>
-</div>
-<div style="margin-left: 40px;"><br>
-Rectangle commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glRects,
-glRecti, glRectf, glRectd, glRectsv, glRectiv, glRectfv, glRectdv,<br>
-<br>
-</span></div>
-</div>
-<div style="margin-left: 40px;">Lighting commands:<br>
-</div>
-<div style="margin-left: 80px;"><span style="font-weight: bold;">glMaterialf,
-glMateriali, glMaterialfv, glMaterialiv<br>
-</span><br>
-</div>
-<div style="margin-left: 40px;"> Evaluator commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glEvalCoord1d,
-glEvalCoord1f, glEvalCoord1dv, glEvalCoord1fv,&nbsp;</span><span
- style="font-weight: bold;">glEvalCoord2d, glEvalCoord2f,
-glEvalCoord2dv, glEvalCoord2fv,<br>
-</span><span style="font-weight: bold;">glEvalPoint1, glEvalPoint2</span><br>
-<br>
-</div>
-</div>
-<h1>3. Coordinate Transformation</h1>
-<h2>3.1 Vertex Transformation</h2>
-Vertex coordinates are transformed by the current modelview and
-projection matrices then mapped to window coordinates as specified by
-the viewport. &nbsp;The following coordinate transformation commands are
-supported by the subset<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;">glMatrixMode<span
- style="font-weight: normal;">(GLenum <span style="font-style: italic;">mode</span>)</span><br>
-glLoadIdentity<span style="font-weight: normal;">(void)</span><br>
-glPushMatrix<span style="font-weight: normal;">(void)</span><br>
-glPopMatrix<span style="font-weight: normal;">(void)</span><br>
-glLoadMatrixf<span style="font-weight: normal;">(const GLfloat *<span
- style="font-style: italic;">m</span>)</span><br>
-glMultMatrixf<span style="font-weight: normal;">(const GLfloat *<span
- style="font-style: italic;">m</span>)</span><br>
-glRotatef<span style="font-weight: normal;">(GLfloat <span
- style="font-style: italic;">angle</span>, GLfloat <span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>, GLfloat <span
- style="font-style: italic;">z</span>)</span><br>
-glTranslatef<span style="font-weight: normal;">(GLfloat <span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>, GLfloat <span
- style="font-style: italic;">z</span>)</span><br>
-glScalef<span style="font-weight: normal;">(GLfloat <span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>, GLfloat <span
- style="font-style: italic;">z</span>)<br>
-<span style="font-weight: bold;">glFrustum(</span>GLdouble <span
- style="font-style: italic;">left,</span> GLdouble <span
- style="font-style: italic;">right,</span> GLdouble <span
- style="font-style: italic;">bottom,</span> GLdouble <span
- style="font-style: italic;">top,</span> GLdouble <span
- style="font-style: italic;">near,</span> GLdouble <span
- style="font-style: italic;">far</span>)</span><br>
-<span style="font-weight: normal;"><span style="font-weight: bold;">glOrtho(</span>GLdouble<span
- style="font-style: italic;"> left,</span> GLdouble <span
- style="font-style: italic;">right,</span> GLdouble <span
- style="font-style: italic;">bottom,</span> GLdouble <span
- style="font-style: italic;">top,</span> GLdouble <span
- style="font-style: italic;">near,</span> GLdouble <span
- style="font-style: italic;">far</span>)</span><br>
-glViewport<span style="font-weight: normal;">(GLint <span
- style="font-style: italic;">x</span>, GLint <span
- style="font-style: italic;">y</span>, GLsize <span
- style="font-style: italic;">width,</span> GLsizei <span
- style="font-style: italic;">height</span>)</span><br>
-</div>
-<br>
-The <span style="font-weight: bold;">glMatrixMode</span> command
-specifies the <span style="font-style: italic;">current matrix.</span>
-&nbsp;The mode parameter may be GL_MODELVIEW or GL_PROJECTION to specify
-the modelview matrix or projection matrix. &nbsp;Subsequent matrix
-commands will effect the current matrix. &nbsp;Also associated with the
-modelview and projection matrices are a modelview matrix stack and
-projection matrix stack.<br>
-<br>
-The <span style="font-weight: bold;">glLoadIdentity</span> command
-replaces the current matrix with the identity matrix. &nbsp;The matrix
-elements are specified in column-major order.<br>
-<br>
-The <span style="font-weight: bold;">glPushMatrix</span> command pushes
-a copy of the current matrix onto either the modelview matrix stack or
-the projection matrix stack. &nbsp;The <span style="font-weight: bold;">glPopMatrix</span>
-command replaces the current matrix with a copy of the top matrix off
-the modelview matrix stack or projection matrix stack, the pops the
-stack. &nbsp;Matrix stacks are useful for traversing and rendering
-hierarchical models.<br>
-<br>
-The <span style="font-weight: bold;">glMultMatrixf</span> command
-post-multiplies the current matrix by the specified matrix. &nbsp;The
-matrix elements are specified in column-major order.<br>
-<br>
-The <span style="font-weight: bold;">glRotatef</span> command
-post-multiplies the current matrix by a rotation matrix defined by the
-angle and rotation axis defined by x, y and z.<br>
-<br>
-The <span style="font-weight: bold;">glTranslatef</span> command
-post-multiplies the current matrix by a translation matrix defined by
-the <span style="font-style: italic;">x</span>, <span
- style="font-style: italic;">y</span> and <span
- style="font-style: italic;">z</span> translation parameters.<br>
-<span style="font-weight: bold;"></span><br>
-The <span style="font-weight: bold;">glScalef</span> command
-post-multiplies the current matrix by a scaling matrix defined by the <span
- style="font-style: italic;">x</span>, <span
- style="font-style: italic;">y</span> and <span
- style="font-style: italic;">z</span> scale factors.<br>
-<span style="font-weight: bold;"></span><br>
-The <span style="font-weight: bold;">glFrustum</span> command
-post-multiplies the current matrix by a perspective projection matrix.
-&nbsp;The <span style="font-style: italic;">near</span> and <span
- style="font-style: italic;">far</span> values specify the position of
-the hither and yon Z-axis clipping planes. &nbsp;The <span
- style="font-style: italic;">left, right, bottom</span> and <span
- style="font-style: italic;">top</span> parameters are the X and Y
-extents at the near clipping plane. &nbsp;<span
- style="font-weight: bold;">glFrustum</span> is normally used to modify
-the projection matrix.<br>
-<br>
-The <span style="font-weight: bold;">glOrtho</span> command
-post-multiplies the current matrix by an orthographic projection matrix.
-&nbsp;The <span style="font-style: italic;">near</span> and <span
- style="font-style: italic;">far</span> values specify the position of
-the hither and yon Z-axis clipping planes. &nbsp;The <span
- style="font-style: italic;">left, right, bottom</span> and <span
- style="font-style: italic;">top</span> parameters specify the X and
-Y-axis clipping planes. &nbsp;<span style="font-weight: bold;">glOrtho</span>
-is normally used to modify the projection matrix.<br>
-<br>
-The <span style="font-weight: bold;">glViewport</span> command
-specifies the mapping of coordinates from normalized device coordinates
-to window coordinates. &nbsp;The <span style="font-style: italic;">x</span>
-and <span style="font-style: italic;">y</span> parameters specify the
-viewport's lower-left corner in the window and the <span
- style="font-style: italic;">width</span> and <span
- style="font-style: italic;">height</span> parameters specify the size
-of the viewport. &nbsp;<span style="font-weight: bold;">glViewport</span>
-does not effect the current matrix.<br>
-<br>
-A coordinate transformed to window coordinates is hereafter known as (x<sub>w</sub>,
-y<sub>w</sub>, z<sub>w</sub>).<br>
-<br>
-<h2>3.2 Clipping</h2>
-View-volume clipping automatically discards or trims primitives which
-lie completely or partially outside of the view volume specified by <span
- style="font-weight: bold;">glFrustum</span> and <span
- style="font-weight: bold;">glOrtho</span>. &nbsp;Note that the <span
- style="font-weight: bold;">glViewport</span> command does not define a
-clipping region.<br>
-<br>
-Clipping occurs in <span style="font-style: italic;">clip coordinate
-space - </span>the coordinates produced after applying the projection
-matrix.<br>
-<br>
-<h2>3.3 Current Raster Position</h2>
-The current raster position specifies the location for drawing images
-with <span style="font-weight: bold;">glBitmap.</span> &nbsp;The current
-raster position is set with the commands:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glRasterPos2f</span>(GLfloat<span
- style="font-style: italic;">x</span>, GLfloat <span
- style="font-style: italic;">y</span>)<br>
-void <span style="font-weight: bold;">glRasterPos2fv</span>(const
-GLfloat *<span style="font-style: italic;">v</span>)<br>
-void <span style="font-weight: bold;">glRasterPos2i</span>(GLint <span
- style="font-style: italic;">x</span>, GLint <span
- style="font-style: italic;">y</span>)<br>
-void <span style="font-weight: bold;">glRasterPos2iv</span>(const
-GLint *<span style="font-style: italic;">v</span>)<br>
-</div>
-<br>
-<span style="font-weight: bold;">glRasterPos</span> specifies a
-4-component coordinate (x, y, 0, 1). &nbsp;The coordinate is processed
-like a vertex; it is transformed by the modelview matrix, the projection
-matrix and mapped to the viewport. &nbsp;The resulting window coordinate
-is stored as the current raster position. &nbsp;The coordinate is
-clipped-tested against the frustum like a vertex. &nbsp;If the
-coordinate is clipped, then the current raster position becomes invalid
-and subsequent <span style="font-weight: bold;">glBitmap</span> commands
-have no effect.<br>
-<br>
-<span style="font-weight: bold;">glRasterPos</span> also updates the
-current raster color and current raster texture coordinates. &nbsp;The
-current raster color is updated (copied) from the current color (as
-specified by <span style="font-weight: bold;">glColor</span>).
-&nbsp;The current raster texture coordinate is updated (copied) from the
-current texture coordinate (as specified by <span
- style="font-weight: bold;">glTexCoord</span>).<br>
-<br>
-<h2>3.4 Unsupported Commands</h2>
-The following commands related to vertex transformation are not
-supported by the subset:<br>
-<br>
-<div style="margin-left: 40px;">User-defined clip plane commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glClipPlane</span><br>
-</div>
-<span style="font-weight: bold;"></span></div>
-<br>
-<div style="margin-left: 40px;">Lighting and material commands:</div>
-<div style="margin-left: 80px;"><span style="font-weight: bold;">glLightModeli,
-glLightModelf,&nbsp;</span><span style="font-weight: bold;">glLightModeliv,
-glLightModelfv,</span><span style="font-weight: bold;"> glLightf,
-glLighti, glLightfv, glLightiv, glColorMaterial</span><br>
-</div>
-<br>
-<div style="margin-left: 40px;">Automatic texture coordinate generation
-commands:<br>
-</div>
-<div style="margin-left: 40px;">
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glTexGend,
-glTexGenf, glTexGeni, </span><span style="font-weight: bold;">glTexGendv,
-glTexGenfv, glTexGeniv, </span><br>
-<br style="font-weight: bold;">
-</div>
-Double-valued commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glLoadMatrixd,
-glMultMatrixd, glRotated, glTranslated, glScaled</span><br
- style="font-weight: bold;">
-</div>
-<br>
-Depth Range command:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glDepthRange</span>
-(the near value is always 0.0 and the far value is always 1.0)<br>
-</div>
-<br>
-Extra RasterPos commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glRasterPos2d,
-glRasterPos2s, glRasterPos3d, glRasterPos3f, glRasterPos3i,
-glRasterPos3s, glRasterPos4d, glRasterPos4f, glRasterPos4i,
-glRasterPos4s, glRasterPos2dv, glRasterPos2sv, glRasterPos3dv,
-glRasterPos3fv, glRasterPos3iv, glRasterPos3sv, glRasterPos4dv,
-glRasterPos4fv, glRasterPos4iv, glRasterPos4sv</span><br>
-</div>
-<br>
-<br>
-</div>
-<h1>4. Rasterization</h1>
-This section describes the commands and options for drawing points,
-lines, triangles and bitmaps. &nbsp;<span style="font-style: italic;">Rasterization</span>
-is the term for the process which produces fragments from the geometric
-description of a primitive (a point, line, polygon or bitmap). &nbsp;For
-example, given the two coordinates for the end-points of a line segment,
-rasterization determines which pixels in the frame buffer are modified
-to <span style="font-style: italic;">draw</span> the line. &nbsp;A
-fragment is a tuple which consists of a window coordinate, colors and
-texture coordinates. &nbsp;The fragments produced by rasterization are
-subsequently processed by the per-fragment operations described later.<br>
-<br>
-<h2>4.1 Point Rasterization</h2>
-Points are rendered with the command sequence <span
- style="font-weight: bold;">glBegin</span>(GL_POINTS), <span
- style="font-weight: bold;">glVertex</span>, ... <span
- style="font-weight: bold;">glEnd</span>. &nbsp;The window coordinate (x<sub>w</sub>,
-y<sub>w</sub>, z<sub>w</sub>) is truncated to rasterize the point.
-&nbsp;The truncated coordinate with its associated color and texture
-coordinate is sent as a single fragment to the per-fragment processing
-stages.<br>
-<br>
-The <span style="font-weight: bold;">glPointSize</span> command is not
-supported; only 1-pixel points are supported.<br>
-<br>
-Point smoothing (antialiasing) is also not supported.<br>
-<br>
-<h2>4.2 Line Rasterization</h2>
-Lines are rendered with the command sequence <span
- style="font-weight: bold;">glBegin</span>(<span
- style="font-style: italic;">mode</span>), <span
- style="font-weight: bold;">glVertex</span>, <span
- style="font-weight: bold;">glVertex</span>, ... <span
- style="font-weight: bold;">glEnd</span> where <span
- style="font-style: italic;">mode</span> is one of GL_LINES,
-GL_LINE_STRIP or GL_LINE_LOOP. &nbsp;Lines are rasterized as described
-in the OpenGL specification. &nbsp;Note that OpenGL specifies the <span
- style="font-style: italic;">half-open</span> convention for drawing
-lines: the last fragment in a line segment is omitted so that endpoint
-pixels shared by two line segments will only be drawn once instead of
-twice.<br>
-<br>
-<h3>4.2.1 Line Width</h3>
-The width of lines can be controlled by<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glLineWidth</span>(GLfloat<span
- style="font-style: italic;">width</span>)<br>
-</div>
-<br>
-where <span style="font-style: italic;">width</span> is the line width
-in pixels. &nbsp;The width defaults to 1.0. &nbsp;Attempting to set the
-width to a value less than or equal to zero will raise the error
-GL_INVALID_VALUE.<br>
-<br>
-<h3>4.2.2 Line Stipple<br>
-</h3>
-Lines may be stippled (i.e. dashed) with the command<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glLineStipple</span>(GLint<span
- style="font-style: italic;">factor</span>, GLushort <span
- style="font-style: italic;">pattern</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">pattern</span> describes an on/off
-pattern for the fragments produced by rasterization and <span
- style="font-style: italic;">factor</span> specifies how many subsequent
-fragments are kept or culled for each pattern bit. &nbsp;Line stippling
-can be enabled or disabled by the commands <span
- style="font-weight: bold;">glEnable</span>(GL_LINE_STIPPLE) and <span
- style="font-weight: bold;">glDisable</span>(GL_LINE_STIPPLE).<br>
-<br>
-<h3>4.2.3 Line Antialiasing</h3>
-Lines may be antialiased. &nbsp;For antialiased lines, each fragment
-produced by rasterization is assigned a <span
- style="font-style: italic;">coverage value</span> which describes how
-much of the fragment's area is considered to be <span
- style="font-style: italic;">inside</span> the line. &nbsp;Later, the
-alpha value of each fragment is multiplied by the coverage value.
-&nbsp;By blending the fragments into the frame buffer, the edges of
-lines appear smoothed.<br>
-<br>
-Line antialiasing can be enabled or disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_LINE_SMOOTH) and <span
- style="font-weight: bold;">glDisable</span>(GL_LINE_SMOOTH).<br>
-<br>
-<h2>4.3 Polygon Rasterization</h2>
-Polygons, quadrilaterals and triangles share the same polygon
-rasterization options. <br>
-<br>
-Triangles are rendered by the command sequence <span
- style="font-weight: bold;">glBegin</span><span
- style="font-style: italic;"><span style="font-style: italic;">(mode</span></span>),<span
- style="font-weight: bold;">glVertex</span>, <span
- style="font-weight: bold;">glVertex</span>, ... <span
- style="font-weight: bold;">glEnd</span> where <span
- style="font-style: italic;">mode</span> may be one of GL_TRIANGLES,
-GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN.<span style="font-weight: bold;"></span>
-&nbsp;For GL_TRIANGLES mode, the number of vertices should be a multiple
-of three - extra vertices will be ignored. &nbsp;For GL_TRIANGLE_STRIP
-and GL_TRIANGLE_FAN, at least three vertices should be specified.
-&nbsp;If less than three are specified, nothing is drawn. &nbsp;<br>
-<br>
-Quadrilaterals are <span style="font-weight: bold;"></span>rendered by
-the command sequence <span style="font-weight: bold;">glBegin</span>(<span
- style="font-style: italic;"><span style="font-style: italic;">mode</span></span>),<span
- style="font-weight: bold;">glVertex</span>, <span
- style="font-weight: bold;">glVertex</span>, ... <span
- style="font-weight: bold;">glEnd</span> where <span
- style="font-style: italic;">mode</span> may be one of GL_QUADS or
-GL_QUAD_STRIP.<span style="font-weight: bold;"></span> &nbsp; For
-GL_QUADS, the number of vertices should be a multiple of four - extra
-vertices will be ignored. &nbsp;For GL_QUAD_STRIP, the number of
-vertices should be even and at least four. &nbsp;Extra vertices (one)
-will be ignored.<br>
-<br>
-Convex polygons are <span style="font-weight: bold;"></span>rendered
-by the command sequence <span style="font-weight: bold;">glBegin</span><span
- style="font-style: italic;"><span style="font-style: italic;"></span></span>(GL_POLYGON),<span
- style="font-weight: bold;">glVertex</span>, <span
- style="font-weight: bold;">glVertex</span>, ... <span
- style="font-weight: bold;">glEnd</span>.<span
- style="font-style: italic;"></span><span style="font-weight: bold;"></span>
-&nbsp;If less than three vertices are specified, nothing is drawn.<br>
-<br>
-<h3>4.3.1 Polygon Orientation</h3>
-The <span style="font-style: italic;">winding order</span> of vertices
-(clockwise or counter-clockwise) is significant. &nbsp;It is used to
-determine the <span style="font-style: italic;">front-facing</span> or <span
- style="font-style: italic;">back-facing</span> orientation of polygons.
-&nbsp;By default, a front-facing polygon's vertices are in
-counter-clockwise order (in window coordinates). &nbsp;Figures 2.4 and
-2.5 of the OpenGL 1.2.1 specification illustrate the winding order for
-front-facing triangles and quadrilaterals, respectively.<br>
-<br>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glFrontFace</span>(GLenum<span
- style="font-style: italic;"> mode</span>)<br>
-</div>
-<br>
-specifies whether clockwise or counter-clockwise winding indicates a
-front-facing polygon. &nbsp;If <span style="font-style: italic;">mode</span>
-is GL_CW then polygons with clockwise winding are front-facing. &nbsp;If <span
- style="font-style: italic;">mode</span> is GL_CCW then polygons with
-counter-clockwise winding are front-facing. &nbsp;The default value is
-GL_CCW. &nbsp;If <span style="font-style: italic;">mode</span> is not
-GL_CCW or GL_CW then the error GL_INVALID_ENUM will be raised.<span
- style="font-style: italic;"></span><span style="font-style: italic;"></span><br>
-<br>
-<h3>4.3.2 Polygon Culling</h3>
-Polygons may be culled (discarded) depending on whether they are
-front-facing or back-facing. &nbsp;The command<br>
-<br>
-<div style="margin-left: 40px;">void<span style="font-weight: bold;">
-glCullFace</span>(GLenum <span style="font-style: italic;">mode</span>)<br>
-</div>
-<br>
-specifies whether front-facing, back-facing or all polygons should be
-culled. &nbsp;If <span style="font-style: italic;">mode</span> is
-GL_FRONT then front-facing polygons will be culled. &nbsp;If <span
- style="font-style: italic;">mode</span> is GL_BACK then back-facing
-polygons will be culled. Otherwise, if <span style="font-style: italic;">mode</span>
-is GL_FRONT_AND_BACK then all polygons will be culled. &nbsp;Any other
-value for <span style="font-style: italic;">mode</span> will raise the
-error GL_INVALID_ENUM.<br>
-<br>
-Polygon culling is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_CULL_FACE) and <span
- style="font-weight: bold;">glDisable</span>(GL_CULL_FACE),
-respectively.<br>
-<br>
-<h3>4.3.3 Polygon Antialiasing</h3>
-Polygons may be antialiased in order to smooth their edges.
-&nbsp;Polygon antialiasing is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_POLYGON_SMOOTH) and <span
- style="font-weight: bold;">glDisable</span>(GL_POLYGON_SMOOTH).<br>
-<br>
-When polygon antialiasing is enabled each fragment produced by polygon,
-triangle and quadrilateral rasterization will be given a <span
- style="font-style: italic;">coverage</span> value which indicates how
-much of the fragment is covered by the polygon. &nbsp;Fragments
-completely inside the polygon have coverage 1.0. &nbsp;Fragments
-completely outside the polygon have zero coverage (in theory).
-&nbsp;Fragments which intersect the polygon's edge have a coverage value
-in the range (0, 1).<br>
-<br>
-The fragment's alpha value is multiplied by the coverage value.
-&nbsp;By enabling the appropriate blending mode, polygon edges will
-appear smoothed.<br>
-<br>
-<h2>4.4 Shading</h2>
-The command<br>
-<br>
-<div style="margin-left: 40px;"> void <span style="font-weight: bold;">glShadeModel</span>(GLenum<span
- style="font-style: italic;">mode</span>)<br>
-</div>
-<br>
-determines whether colors are interpolated between vertices during
-rasterization. &nbsp;If <span style="font-style: italic;">mode</span> is
-GL_FLAT then vertex colors are not interpolated. &nbsp;The color used
-for drawing lines, triangles and quadrilaterals is that of the last
-vertex used to specify each primitive. &nbsp;For polygons, the color of
-the first vertex specifies the color for the entire polygon. &nbsp;If <span
- style="font-style: italic;">mode</span> is GL_SMOOTH then vertex colors
-are linearly interpolated to produce the fragment colors.<br>
-<br>
-<h2>4.5 Bitmap Rasterization</h2>
-A bitmap is a monochromatic, binary image in which each image element
-(or pixel) is represented by one bit. &nbsp;Fragments are only generated
-for the bits (pixels) which are set.  &nbsp;Bitmaps are commonly used to
-draw text (glyphs) and markers.<br>
-<br>
-A bitmap is drawn with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glBitmap</span>(GLsizei<span
- style="font-style: italic;">width</span>, GLsizei <span
- style="font-style: italic;">height</span>, GLfloat <span
- style="font-style: italic;">xOrig</span>, GLfloat <span
- style="font-style: italic;">yOrig</span>, GLfloat <span
- style="font-style: italic;">xMove</span>, GLfloat <span
- style="font-style: italic;">yMove</span>, const &nbsp;GLubyte *<span
- style="font-style: italic;">image</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">width </span>and <span
- style="font-style: italic;">height</span> specify the image size in
-pixels. &nbsp;<span style="font-style: italic;">xOrig</span> and <span
- style="font-style: italic;">yOrig</span> specify the bitmap origin.
-&nbsp;<span style="font-style: italic;">xMove</span> and <span
- style="font-style: italic;">yMove</span> are added to the current
-raster position after the bitmap is rasterized. &nbsp;<span
- style="font-style: italic;">image</span> is a pointer to the bitmap
-data.<br>
-<br>
-If the current raster position is not valid, <span
- style="font-weight: bold;">glBitmap</span> has no effect.<br>
-<br>
-<h3>4.5.1 Bitmap Unpacking</h3>
-The first step in bitmap rendering is <span style="font-style: italic;">unpacking.
-&nbsp;</span>Unpacking is the process of extracting image data from
-client memory subject to byte swapping, non-default row strides, etc.
-&nbsp;The unpacking parameters are specified with the command<br>
-<br>
-<div style="margin-left: 40px;">void<span style="font-weight: bold;">
-glPixelStorei</span>(GLenum pname, GLint value)<br>
-</div>
-<span style="font-style: italic;"></span><br>
-The following unpacking parameters may be set:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Parameter (<span
- style="font-style: italic;">pname</span>)<br>
-      </td>
-      <td style="vertical-align: top;">Value (<span
- style="font-style: italic;">value</span>)<br>
-      </td>
-      <td style="vertical-align: top;">Default<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_UNPACK_ROW_LENGTH<br>
-      </td>
-      <td style="vertical-align: top;">Width of the image in memory, in
-pixels.<br>
-      </td>
-      <td style="vertical-align: top;">0<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_UNPACK_LSB_FIRST<br>
-      </td>
-      <td style="vertical-align: top;">GL_FALSE indicates that the most
-significant bit is unpacked first from each byte. &nbsp;GL_TRUE
-indicates that the least significant bit is unpacked first from each
-byte. <br>
-      </td>
-      <td style="vertical-align: top;">GL_FALSE<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<br>
-The GL_UNPACK_ROW_LENGTH specifies the stride (in pixels) for advancing
-from one row of the image to the next.&nbsp; If it's zero, the <span
- style="font-style: italic;">width</span> parameter to <span
- style="font-weight: bold;">glBitmap</span> specifies the width of the
-image in memory.<br>
-<br>
-GL_UNPACK_LSB_FIRST determines whether the least significant or most
-significant bit in each byte is unpacked first. &nbsp;Unpacking occurs
-in left to right order (in image space).<br>
-<br>
-The value of bit (i, j) of the image (where i is the image row and j is
-the image column) is found as follows:<br>
-<br>
-<div style="margin-left: 40px;">rowLength = (GL_UNPACK_ROW_LENGTH != 0)
-? GL_UNPACK_ROW_LENGTH : <span style="font-style: italic;">width</span>;<br>
-<br>
-byte = <span style="font-style: italic;">image</span>[((rowLength + 7)
-/ 8) * i + j / 8];<br>
-<br>
-if (GL_UNPACK_LSB_FIRST != 0)<br>
-&nbsp;&nbsp;&nbsp; bitMask = 1 &lt;&lt; (j % 8);<br>
-else<br>
-&nbsp;&nbsp;&nbsp; bitMask = 128 &gt;&gt; (j % 8);<br>
-<br>
-if (byte &amp; bitMask)<br>
-&nbsp;&nbsp;&nbsp; bit = 1;<br>
-else<br>
-&nbsp;&nbsp;&nbsp; bit = 0;<br>
-<br>
-</div>
-<span style="font-style: italic;"><span style="font-style: italic;"></span></span>
-<h3>4.5.2 Rasterization</h3>
-If the current raster position is (x<sub>rp</sub>, y<sub>rp</sub>, z<sub>rp</sub>,
-w<sub>rp</sub>), then the bitmap is rasterized according to the
-following algorithm:<br>
-<br>
-for (j = 0; j &lt; <span style="font-style: italic;">height</span>;
-j++) {<br>
-&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">width</span>;
-i++) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (bit(i,j)) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fragment.x =
-floor(x<sub>rp</sub> - <span style="font-style: italic;">xOrig</span>)
-+ i;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fragment.y =
-floor(y<sub>rp</sub> - <span style="font-style: italic;">yOrig</span>)
-+ j;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fragment.color
-= GL_CURRENT_RASTER_COLOR;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
-fragment.texture = GL_CURRENT_RASTER_TEXTURE_COORDS;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
-ProcessFragment(fragment)<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>
-&nbsp;&nbsp;&nbsp; }<br>
-}<br>
-<br>
-After the bitmap has been rendered the current raster position is
-updated as follows:<br>
-<br>
-<div style="margin-left: 40px;">x<sub>rp</sub> = x<sub>rp</sub> + <span
- style="font-style: italic;">xMove</span><br>
-y<sub>rp</sub> = y<sub>rp</sub> + <span style="font-style: italic;">yMove</span><br>
-</div>
-<br>
-<h3>4.5.3 Per-fragment Operations</h3>
-XXX supported? &nbsp;See issue in appendix A.<br>
-<br>
-<h2>4.6 Unsupported Commands</h2>
-The following commands related to rasterization are not supported by
-the subset.<br>
-<br>
-<div style="margin-left: 40px;">Point commands:<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glPointSize</span><br>
-</div>
-<br>
-Polygon commands:<br>
-<div style="margin-left: 40px; font-weight: bold;">glPolygonStipple<br>
-glPolygonOffset<br>
-glPolygonMode<br>
-<br>
-</div>
-</div>
-<div style="margin-left: 40px;">Pixel storage commands:<br>
-</div>
-<div style="font-weight: bold; margin-left: 80px;">glPixelStoref<br>
-</div>
-<br>
-<br>
-<h1>5. Texture Mapping<br>
-</h1>
-There are four elements to texture mapping: texture coordinate
-specification, texture image specification, texture sampling and texture
-application.<br>
-<br>
-Texture mapping is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_TEXTURE_2D) and <span
- style="font-weight: bold;">glDisable</span>(GL_TEXTURE_2D).<br>
-<br>
-<h2>5.1 Texture Image Specification</h2>
-A texture image is specified with the command:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glTexImage2D</span>(GLenum<span
- style="font-style: italic;"> target</span>, GLint <span
- style="font-style: italic;">level</span>, GLint <span
- style="font-style: italic;">internalFormat,</span> GLsizei <span
- style="font-style: italic;">width,</span> GLsizei <span
- style="font-style: italic;">height,</span> GLint <span
- style="font-style: italic;">border,</span> GLenum <span
- style="font-style: italic;">format,</span> GLenum <span
- style="font-style: italic;">type,</span> const GLvoid *<span
- style="font-style: italic;">pixels</span> )<br>
-</div>
-<br>
-<span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
-&nbsp;<span style="font-style: italic;">level </span>indicates the
-mipmap level for mipmap textures. &nbsp;<span style="font-style: italic;">internalFormat</span>
-is a hint to indicate the preferred internal storage format for the
-texture. &nbsp;<span style="font-style: italic;">width</span> and <span
- style="font-style: italic;">height </span>indicate the image size in
-pixels (or texels). &nbsp;<span style="font-style: italic;">border </span>must
-be zero. &nbsp;<span style="font-style: italic;">format</span> and <span
- style="font-style: italic;">type</span> describe the pixel format and
-data type for the incoming image. &nbsp;<span style="font-style: italic;">pixels</span>
-points to the incoming texture image. &nbsp;These parameters are
-described in more detail below.<br>
-<br>
-<h3>5.1.1 Texture Image Size and Mipmaps</h3>
-<h3><span style="font-style: italic;"></span></h3>
-Texture images must have dimensions (width and height) that are powers
-of two. For example: 256 x 256, 32 x 1024, 1 x 8, etc. &nbsp;That is, it
-must be the case that <span style="font-style: italic;">width </span>=
-2<sup>n</sup> and <span style="font-style: italic;">height</span> = 2<sup>m</sup>
-for some positive integers n and m.<br>
-<br>
-Mipmapping is a method of antialiasing or filtering textures to improve
-their appearance. &nbsp;A mipmap is a set of images consisting of a base
-image and a set of filtered, reduced-resolution images. &nbsp;If the
-base image (<span style="font-style: italic;">level</span>=0) is of
-width 2<sup>n</sup> and height 2<sup>m</sup> then the level 1 image must
-be of width 2<sup>n-1</sup> and height 2<sup>m-1</sup>. &nbsp;Each mipmap
-level is half the width and height of the previous level, or at least
-one. &nbsp;The last mipmap level has a width and height of one.<br>
-<br>
-The following is an example of a mipmap's image levels:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">mipmap level<br>
-      </td>
-      <td style="vertical-align: top;">width<br>
-      </td>
-      <td style="vertical-align: top;">height<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">0<br>
-      </td>
-      <td style="vertical-align: top;">256<br>
-      </td>
-      <td style="vertical-align: top;">64<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">128<br>
-      </td>
-      <td style="vertical-align: top;">32<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">2<br>
-      </td>
-      <td style="vertical-align: top;">64<br>
-      </td>
-      <td style="vertical-align: top;">16<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">3<br>
-      </td>
-      <td style="vertical-align: top;">32<br>
-      </td>
-      <td style="vertical-align: top;">8<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">16<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">5<br>
-      </td>
-      <td style="vertical-align: top;">8<br>
-      </td>
-      <td style="vertical-align: top;">2<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">6<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">7<br>
-      </td>
-      <td style="vertical-align: top;">2<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">8<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-If the <span style="font-style: italic;">width</span> or <span
- style="font-style: italic;">height</span> parameters are not powers of
-two, the error GL_INVALID_VALUE is raised. &nbsp;If the image levels in
-a mipmap do not satisfy the restrictions listed above the texture is
-considered to be <span style="font-style: italic;">inconsistent</span>
-and the system will behave as if the texturing is disabled.<br>
-<br>
-<h3>5.1.2 Texture Image Formats and Unpacking</h3>
-The <span style="font-weight: bold;">glTexImage2D</span> command's <span
- style="font-style: italic;"><span style="font-weight: bold;"></span></span><span
- style="font-style: italic;">format</span> and <span
- style="font-style: italic;">type</span> parameters describe the format
-of the incoming texture image.&nbsp; Accepted values for <span
- style="font-style: italic;">format</span> are GL_INTENSITY, GL_RGB and
-GL_RGBA. &nbsp;The <span style="font-style: italic;">type</span>
-parameter must be GL_UNSIGNED_BYTE. &nbsp;Pixel component values are
-thus in the range 0 through 255.<br>
-<br>
-If <span style="font-style: italic;">format</span> is GL_INTENSITY then
-the image has one byte per pixel which specifies the pixel's red, green,
-blue and alpha values.<span style="font-style: italic;"></span><br>
-<br>
-If <span style="font-style: italic;">format</span> is GL_RGB then the
-image has three bytes per pixel which specify the pixel's red, green and
-blue values (in that order). &nbsp;The alpha value defaults to 255.<br>
-<br>
-If <span style="font-style: italic;">format</span> is GL_RGBA then the
-image has four bytes per pixel which specify the pixel's red, green,
-blue and alpha values (in that order).<br>
-<br>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void<span style="font-weight: bold;">
-glPixelStorei</span>(GLenum <span style="font-style: italic;">pname</span>,
-GLint <span style="font-style: italic;">value</span>)<br>
-</div>
-<br>
-controls the unpacking of texture image data from client memory. &nbsp;<span
- style="font-style: italic;">pname</span> may be GL_UNPACK_ROW_LENGTH to
-indicate the stride, in pixels, between subsequent rows of the image in
-client memory. &nbsp;If GL_UNPACK_ROW_LENGTH is zero (the default) then
-the <span style="font-style: italic;">width</span> parameter to <span
- style="font-weight: bold;">glTexImage2D </span>determines the stride.<span
- style="font-style: italic;"></span><br>
-<br>
-<h3>5.1.3 Internal Texture Format</h3>
-<span style="font-weight: bold;">glTexImage2D<span
- style="font-style: italic;"> </span></span>converts the incoming
-texture image to one of the supported internal texture formats.<br>
-<br>
-The <span style="font-style: italic;">internalFormat</span> parameter
-indicates the desired internal format for the texture and may be either
-GL_INTENSITY8, GL_RGB5 or GL_RGBA8.<br>
-<br>
-If <span style="font-style: italic;">internalFormat</span> is
-GL_INTENSITY8 then the texture has one byte per texel (texture element)
-which indicates the texel's intensity (or brightness). &nbsp;The
-intensity is obtained from the incoming image's red channel.<br>
-<br>
-If <span style="font-style: italic;">internalFormat</span> is GL_RGB5
-then the texture is stored with two bytes per texel: &nbsp;5 bits per
-red value, 5 bits per green value and 5 bits per blue value.<br>
-<br>
-If <span style="font-style: italic;">internalFormat </span>is
-GL_RGBA8 then the texture is stored with four bytes per texel: &nbsp;8
-bits for each of the red, green, &nbsp;blue and alpha values.<br>
-<br>
-The internal format is also significant to texture application (see
-section 5.4).<br>
-<br>
-<h2>5.2 Texture Coordinates</h2>
-Texture coordinates control the mapping from local polygon space to
-texture image space. &nbsp;Texture coordinates are set for each vertex
-with the <span style="font-weight: bold;">glTexCoord</span> commands.
-&nbsp;During line and polygon rasterization the vertex's texture
-coordinates are interpolated across the primitive to produce a texture
-coordinate for each fragment. &nbsp;The fragment texture coordinates are
-used to sample the current texture image.<br>
-<br>
-Texture coordinates are normally in the range [0, 1]. &nbsp;Values
-outside that range are processed according to the <span
- style="font-style: italic;">texture wrap mode</span>. &nbsp;The
-texture wrap mode is set with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glTexParameteri</span>(GLenum<span
- style="font-style: italic;"> target</span>, GLenum <span
- style="font-style: italic;">pname</span>, GLint <span
- style="font-style: italic;">value</span>)<br>
-<br>
-</div>
-<span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
-&nbsp;If <span style="font-style: italic;">pname</span> is
-GL_TEXTURE_WRAP_S or GL_TEXTURE_WRAP_T then <span
- style="font-style: italic;">value</span> must be either
-GL_CLAMP_TO_EDGE or GL_REPEAT.<br>
-<br>
-For GL_CLAMP_TO_EDGE, texture coordinates are effectively clamped to
-the interval [0, 1].<br>
-<br>
-For GL_REPEAT, the integer part of texture coordinates is ignored; only
-the fractional part of the texture coordinates is used. &nbsp;This
-allows texture images to repeated or tiled across an object.<br>
-<br>
-<h2>5.3 Texture Sampling</h2>
-Texture sampling is the process of using texture coordinates to extract
-a color from the texture image. &nbsp;Multiple, weighted samples may be
-taken from the texture and combined during the filtering step.<br>
-<br>
-During texture coordinate interpolation a <span
- style="font-style: italic;">level of detail</span> value (lambda) is
-computed for each fragment. &nbsp;For a mipmapped texture, lambda
-determines which level (or levels) of the mipmap will be sampled to
-obtain the texture color.<br>
-<br>
-If lambda indicates that multiple texels map to a single screen pixel,
-then the texture <span style="font-style: italic;">minification</span>
-filter will be used. &nbsp;Otherwise, if lambda indicates that a single
-texel maps to multiple screen pixels, then the texture <span
- style="font-style: italic;">magnification</span> filter will be used.<br>
-<span style="font-weight: bold;"></span><span
- style="font-style: italic;"></span><br>
-<h3>5.3.1 Texture Minification</h3>
-The texture minification filter is set with the <span
- style="font-weight: bold;">glTexParameteri </span><span
- style="font-style: italic;"></span><span style="font-weight: bold;"></span><span
- style="font-style: italic;"></span> command by setting <span
- style="font-style: italic;">target</span> to GL_TEXTURE_2D, setting <span
- style="font-style: italic;">pname</span> to GL_TEXTURE_MIN_FILTER and
-setting <span style="font-style: italic;">value</span> to GL_NEAREST,
-GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST,&nbsp;
-GL_NEAREST_MIPMAP_LINEAR,&nbsp; &nbsp;GL_LINEAR_MIPMAP_NEAREST or
-GL_LINEAR_MIPMAP_LINEAR.<br>
-<br>
-GL_NEAREST samples the texel nearest the texture coordinate in the
-level 0 texture image.<br>
-<br>
-GL_LINEAR samples the four texels around the texture coordinate in the
-level 0 texture image. &nbsp;The four texels are linearly weighted to
-compute the final texel value.<br>
-<br>
-GL_NEAREST_MIPMAP_NEAREST samples the texel nearest the texture
-coordinate in the level N texture image. &nbsp;N is the level of detail
-and is computed by the partial derivatives of the texture coordinates
-with respect to the window coordinates.<br>
-<br>
-GL_NEAREST_MIPMAP_LINEAR samples two texels nearest the texture
-coordinates in the level N and N+1 texture images. &nbsp;The two texels
-are linearly weighted to compute the final texel value. &nbsp;N is the
-level of detail and is computed by the partial derivatives of the
-texture coordinates with respect to the window coordinates.<br>
-<br>
-GL_LINEAR_MIPMAP_NEAREST samples four texels around the texture
-coordinate in the level N texture image. &nbsp;The four texels are
-linearly weighted to compute the final texel value. &nbsp;N is the level
-of detail and is computed by the partial derivatives of the texture
-coordinates with respect to the window coordinates.<br>
-<br>
-GL_LINEAR_MIPMAP_LINEAR samples four texels around the texture
-coordinate in the level N texture image and four texels around the
-texture coordinate in the level N+1 texture image. &nbsp;The eight
-texels are linearly weighted to compute the final texel value. &nbsp;N
-is the level of detail and is computed by the partial derivatives of the
-texture coordinates with respect to the window coordinates.<br>
-<br>
-Filter modes other than GL_LINEAR and GL_NEAREST requires that the
-texture have a complete set of mipmaps. &nbsp;If the mipmap is
-incomplete, it is as if texturing is disabled.<br>
-&nbsp;<br>
-<h3>5.3.2 Texture Magnification</h3>
-The texture magnification filter is set with the <span
- style="font-weight: bold;">glTexParameteri </span><span
- style="font-style: italic;"></span><span style="font-weight: bold;"></span>command
-by setting <span style="font-style: italic;">target</span> to
-GL_TEXTURE_2D, setting <span style="font-style: italic;">pname</span> to
-GL_TEXTURE_MAG_FILTER and setting <span style="font-style: italic;">value</span>
-to GL_NEAREST or GL_LINEAR.<br>
-<br>
-GL_NEAREST samples the texel nearest the texture coordinate in the
-level 0 texture image.<br>
-<br>
-GL_LINEAR samples the four texels around the texture coordinate in the
-level 0 texture image. &nbsp;The four texels are linearly weighted to
-compute the final texel value.<br>
-<br>
-<h2>5.4 Texture Application</h2>
-The sampled texture value is combined with the incoming fragment color
-to produce a new fragment color. &nbsp;The fragment and texture colors
-are combined according to the texture environment mode and the current
-texture's base internal format. &nbsp;The texture environment mode is
-set with the command<br>
-<br>
-<div style="margin-left: 40px;">void<span style="font-weight: bold;">
-glTexEnvi</span>(GLenum <span style="font-style: italic;">target</span>,
-GLenum <span style="font-style: italic;">pname</span>, GLint <span
- style="font-style: italic;">value</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">target</span> must be GL_TEXTURE_ENV.
-&nbsp;If <span style="font-style: italic;">pname</span> is
-GL_TEXTURE_ENV_MODE then <span style="font-style: italic;">value</span>
-must be one of GL_REPLACE, GL_MODULATE, GL_DECAL, or GL_BLEND.<br>
-<br>
-There is also a <span style="font-style: italic;">texture environment
-color</span> that can factor into texture application. &nbsp;The texture
-environment color can be set with the command<br>
-<br>
-<div style="margin-left: 40px;">void<span style="font-weight: bold;">
-glTexEnvfv</span>(GLenum <span style="font-style: italic;">target</span>,
-GLenum <span style="font-style: italic;">pname</span>, const GLfloat *<span
- style="font-style: italic;">value</span>)<br>
-</div>
-<span style="font-style: italic;"></span><br>
-<span style="font-style: italic;">target</span> must be GL_TEXTURE_ENV.
-&nbsp;If <span style="font-style: italic;">pname</span> is
-GL_TEXTURE_ENV_COLOR then <span style="font-style: italic;">value </span>must
-point to an array of four values which specify the red, green, blue,
-and alpha values of the texture environment color. &nbsp;The values are
-clamped to the range [0, 1]. &nbsp;The default color is (0, 0, 0, 0).<br>
-<span style="font-style: italic;"></span><br>
-The following table describes the arithmetic used for each combination
-of environment mode and base internal format. &nbsp;(Rf, Gf, Bf, Af) is
-the incoming fragment color. &nbsp;(Rt, Gt, Bt, At) is the sampled
-texture color. &nbsp;Lt is the sampled texture luminance. &nbsp;<span
- style="font-style: italic;"></span>'It' is the sampled texture
-intensity. &nbsp;(Rc, Gc, Bc, Ac) is the texture environment color.
-&nbsp;(Rv, Gv, Bv, Av) is the resulting value.<br>
-<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Base Internal Format<br>
-      </td>
-      <td style="vertical-align: top;">GL_REPLACE<br>
-      </td>
-      <td style="vertical-align: top;">GL_MODULATE<br>
-      </td>
-      <td style="vertical-align: top;">GL_DECAL<br>
-      </td>
-      <td style="vertical-align: top;">GL_BLEND<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INTENSITY<br>
-      </td>
-      <td style="vertical-align: top;">Rv = It<br>
-Gv = It<br>
-Bv = It<br>
-Bf = It<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rf * It<br>
-Gv = Gf * It<br>
-Bv = Bf * It<br>
-Av = Af * It</td>
-      <td style="vertical-align: top;">undefined<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rf*(1-It) + Rc*It<br>
-Gv = Gf*(1-It) + Gc*It<br>
-Bv = Bf*(1-It) + Bc*It<br>
-Av = Af*(1-It) + Ac*It</td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RGB<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rt<br>
-Gv = Gt<br>
-Bv = Bt<br>
-Av = Af<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rf * Rt<br>
-Gv = Gf * Gt<br>
-Bv = Bf * Bt<br>
-Av = Af<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rt<br>
-Gv = Gt<br>
-Bv = Bt<br>
-Av = Af</td>
-      <td style="vertical-align: top;">Rv = Rf*(1-Rt) + Rc*Rt<br>
-Gv = Gf*(1-Gt) + Gc*Gt<br>
-Bv = Bf*(1-Bt) + Bc*Bt<br>
-Av = Af</td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RGBA<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rt<br>
-Gv = Gt<br>
-Bv = Bt<br>
-Av = At<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rf * Rt<br>
-Gv = Gf * Gt<br>
-Bv = Bf * Bt<br>
-Av = Af * At</td>
-      <td style="vertical-align: top;">Rv = Rf*(1-At) + Rt*At<br>
-Gv = Gf*(1-At) + Gt*At<br>
-Bv = Bf*(1-At) + Bt*At<br>
-Av = Af<br>
-      </td>
-      <td style="vertical-align: top;">Rv = Rf*(1-Rt) + Rc*Rt<br>
-Gv = Gf*(1-Gt) + Gc*Gt<br>
-Bv = Bf*(1-Bt) + Bc*Bt<br>
-Av = Af*At</td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<br>
-<br>
-<h2>5.5 Texture Objects</h2>
-Texture objects encapsulate a set of texture images (mipmap) and
-related state into a named object. &nbsp;This facilitates use of
-multiple textures in an application. &nbsp;Texture objects are named
-with GLuints (unsigned integers). &nbsp;There is a default texture
-object with the name/identifier zero which can never be deleted.<br>
-<br>
-<h3>5.5.1 Creating Texture Objects</h3>
-A texture object is created by binding a new GLuint identifier to the
-GL_TEXTURE_2D target with the command:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glBindTexture</span>(GLenum<span
- style="font-style: italic;"> target</span>, GLuint <span
- style="font-style: italic;">textureID</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
-&nbsp;<span style="font-style: italic;">textureID</span> may be any
-unsigned integer. &nbsp;If <span style="font-style: italic;">textureID</span>
-does not name an existing texture object, a new texture object with that
-ID will be created, initialized to the default state. &nbsp;Whether the
-ID is new or existed previously, that named texture object is bound as
-the <span style="font-style: italic;">current texture object</span>.
-&nbsp;Subsequent <span style="font-weight: bold;">glTexParameter </span>and<span
- style="font-weight: bold;">glTexImage2D<span
- style="font-style: italic;"> </span></span>calls will effect the
-current texture object.<br>
-<span style="font-style: italic;"></span><span
- style="font-weight: bold;"><span style="font-style: italic;"> </span></span><br>
-<h3>5.5.2 Deleting Texture Objects</h3>
-One or more texture objects may be deleted with the command:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glDeleteTextures</span>(GLsizei<span
- style="font-style: italic;">n</span>, const GLuint *<span
- style="font-style: italic;">textureIDs</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">textureIDs</span> is an array of <span
- style="font-style: italic;">n</span> texture IDs. &nbsp;The named
-texture objects will be deleted. &nbsp;If the current texture object is
-deleted the default texture object (number 0) will be bound as the
-current texture object.<br>
-<br>
-<h3>5.5.3 Allocating Texture Object Identifiers</h3>
-A list of new, unused texture IDs can be obtained by calling the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glGenTextures</span>(GLsizei<span
- style="font-style: italic;"> n</span>, GLuint *<span
- style="font-style: italic;">textureIDs</span>)<br>
-</div>
-<br>
-An array of <span style="font-style: italic;">n</span> unused texture
-IDs will be returned in the <span style="font-style: italic;">textureIDs</span>
-array.<br>
-<br>
-<br>
-<h1>6. Per-fragment Operations</h1>
-The fragments produced by rasterization are subjected to a number of
-operations which either modify the fragment or test the fragment
-(discarding the fragment if the test fails.) &nbsp;This chapter
-describes the per-fragment operations. &nbsp;They are presented in the
-order in which they're performed. &nbsp;If a fragment fails a test it is
-discarded and not subjected to subsequent tests or modifications.<br>
-<br>
-<h2>6.1 Scissor Test</h2>
-The scissor test limits rendering to a 2-D rectangular region of the
-framebuffer. &nbsp;The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glScissor</span>(GLint<span
- style="font-style: italic;">x</span>, GLint <span
- style="font-style: italic;">y</span>, GLsizei <span
- style="font-style: italic;">width</span>, GLsizei<span
- style="font-style: italic;"> height</span>)<br>
-</div>
-<br>
-defines a clipping region with the lower-left corner at (<span
- style="font-style: italic;">x, y</span>) and the given <span
- style="font-style: italic;">width</span> and <span
- style="font-style: italic;">height</span>. &nbsp;The scissor test is
-enabled and disabled with the command <span style="font-weight: bold;">glEnable</span>(GL_SCISSOR_TEST)
-and <span style="font-weight: bold;">glDisable</span>(GL_SCISSOR_TEST).<br>
-<br>
-If the incoming fragment's position is (x<sub>f</sub>, y<sub>f</sub>)
-then the fragment will pass the test if <span
- style="font-style: italic;">x</span> &lt;= x<sub>f</sub> &lt; <span
- style="font-style: italic;">x</span> + <span
- style="font-style: italic;">width</span> and <span
- style="font-style: italic;">y</span> &lt;= y<sub>f</sub> &lt; <span
- style="font-style: italic;">y</span> + <span
- style="font-style: italic;">height. &nbsp;</span>Otherwise, the
-fragment is discarded.<br>
-<br>
-If <span style="font-style: italic;">width</span> or <span
- style="font-style: italic;">height</span> is less than zero the error
-GL_INVALID_VALUE is raised. &nbsp;The default scissor rectangle bounds
-are (0, 0, w, h) where w is the initial window width and h is the
-initial window height. &nbsp;The scissor test is disabled by default.<br>
-<br>
-<h2>6.2 Alpha Test</h2>
-The alpha test compares the fragment's alpha value against a reference
-value and discards the fragment if the comparison fails. &nbsp;The test
-is specified by the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glAlphaFunc</span>(GLenum<span
- style="font-style: italic;">mode</span>, GLclampf <span
- style="font-style: italic;">reference</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">mode</span> specifies an inequality
-and <span style="font-style: italic;">reference</span> specifies a value
-to compare against. &nbsp;The following table lists all possible
-modes&nbsp;<span style="font-style: italic;"></span>and the
-corresponding test:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Comparison mode<br>
-      </td>
-      <td style="vertical-align: top;">The test passes if<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LESS<br>
-      </td>
-      <td style="vertical-align: top;">alpha &lt; <span
- style="font-style: italic;">reference</span><br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LEQUAL<br>
-      </td>
-      <td style="vertical-align: top;">alpha &lt;= <span
- style="font-style: italic;">reference</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_GREATER<br>
-      </td>
-      <td style="vertical-align: top;">alpha &gt; <span
- style="font-style: italic;">reference</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_GEQUAL<br>
-      </td>
-      <td style="vertical-align: top;">alpha &gt;= <span
- style="font-style: italic;">reference</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_EQUAL<br>
-      </td>
-      <td style="vertical-align: top;">alpha == <span
- style="font-style: italic;">reference</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NOTEQUAL<br>
-      </td>
-      <td style="vertical-align: top;">alpha != <span
- style="font-style: italic;">reference</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NEVER<br>
-      </td>
-      <td style="vertical-align: top;">never pass<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALWAYS<br>
-      </td>
-      <td style="vertical-align: top;">always passes<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-The <span style="font-style: italic;">reference</span> parameter is
-clamped to the range [0, 1].<br>
-<br>
-The alpha test is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_ALPHA_TEST) and <span
- style="font-weight: bold;">glDisable</span>(GL_ALPHA_TEST).<br>
-<br>
-The default mode is GL_ALWAYS and the default reference value is 0.<br>
-<br>
-<h2>6.3 Stencil Test</h2>
-The stencil buffer stores an N-bit integer value for each pixel in the
-frame buffer. &nbsp;The stencil test compares the stencil buffer value
-at the fragment's position to a reference value and possibly discards
-the fragment based on the outcome. &nbsp;Furthermore, the stencil buffer
-value may be updated or modified depending on the outcome. &nbsp;If
-there is no stencil buffer the stencil test is bypassed.<br>
-<br>
-Stenciling is controlled by the commands<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glStencilFunc</span>(GLenum<span
- style="font-style: italic;">func</span>, GLint <span
- style="font-style: italic;">ref</span>, GLuint <span
- style="font-style: italic;">mask</span>)<br>
-void <span style="font-weight: bold;">glStencilOp</span>(GLenum <span
- style="font-style: italic;">stencilFail</span>, GLenum <span
- style="font-style: italic;">depthTestFail</span>, GLenum <span
- style="font-style: italic;">depthTestPass</span>)<br>
-</div>
-<br>
-The <span style="font-weight: bold;">glStencilFunc<span
- style="font-style: italic;"> </span></span>command controls the
-stencil test while <span style="font-weight: bold;">glStencilOp</span>
-command controls the how the stencil buffer is updated/modified after
-the test.<br>
-<br>
-<span style="font-style: italic;">ref</span> is clamped to the range [0,
-2<sup>N</sup>-1] where N is the number of bits per stencil value in the
-stencil buffer.<span style="font-style: italic;"></span><br>
-<br>
-The following table lists all possible values for the <span
- style="font-style: italic;">func</span> parameter and when the stencil
-test will pass. &nbsp;Both the stencil buffer value and the stencil
-reference value are bit-wise ANDed with the <span
- style="font-style: italic;">mask</span> parameter before the test.<br>
-<br>
-<span style="font-style: italic;"></span><span
- style="font-style: italic;"></span><span style="font-style: italic;"></span>
-<table
- style="text-align: left; margin-left: auto; margin-right: auto; width: 70%;"
- border="1" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Stencil <span
- style="font-style: italic;">func</span> value<br>
-      </td>
-      <td style="vertical-align: top;">Stencil test passes if<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LESS<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>&amp;<span
- style="font-style: italic;">mask)</span> &lt; (stencil buffer value
-&amp; <span style="font-style: italic;">mask)</span><br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LEQUAL<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
-&amp; <span style="font-style: italic;">mask) </span>&lt;= (stencil
-buffer value &amp; <span style="font-style: italic;">mask)</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_GREATER<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
-&amp; <span style="font-style: italic;">mask) </span>&gt; (stencil
-buffer value &amp; <span style="font-style: italic;">mask)</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_GEQUAL<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
-&amp; <span style="font-style: italic;">mask) </span>&gt;= (stencil
-buffer value &amp; <span style="font-style: italic;">mask)</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_EQUAL<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
-&amp; <span style="font-style: italic;">mask) </span>== (stencil
-buffer value &amp; <span style="font-style: italic;">mask)</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NOTEQUAL<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
-&amp; <span style="font-style: italic;">mask) </span>!= (stencil
-buffer value &amp; <span style="font-style: italic;">mask)</span></td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NEVER<br>
-      </td>
-      <td style="vertical-align: top;">never passes<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALWAYS<br>
-      </td>
-      <td style="vertical-align: top;">always passes<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<span style="font-style: italic;"></span><br>
-If the stencil test passes, the fragment is passed to the next
-per-fragment operation. &nbsp;Otherwise, if the stencil test fails, the
-value in the stencil buffer is updated according to the value of the <span
- style="font-style: italic;">stencilFail</span> parameter to <span
- style="font-weight: bold;">glStencilOp</span>.<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><span style="font-style: italic;">stencilFail</span>
-value<br>
-      </td>
-      <td style="vertical-align: top;">New stencil buffer value<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_KEEP<br>
-      </td>
-      <td style="vertical-align: top;">originalValue<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ZERO<br>
-      </td>
-      <td style="vertical-align: top;">0<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INVERT<br>
-      </td>
-      <td style="vertical-align: top;">BitWiseInvert(originalValue)
-i.e. ~originalValue<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_REPLACE<br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">ref</span><br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INCR<br>
-      </td>
-      <td style="vertical-align: top;">originalValue + 1, clamped to
-[0, 2<sup>N</sup>-1]</td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DECR<br>
-      </td>
-      <td style="vertical-align: top;">originalValue - 1, clamped to
-[0, 2<sup>N</sup>-1]</td>
-    </tr>
-  </tbody>
-</table>
-<span style="font-style: italic;"></span><span
- style="font-style: italic;"></span><br>
-<br>
-The <span style="font-style: italic;">depthTestFail</span> and <span
- style="font-style: italic;">depthTestPass</span> parameters to <span
- style="font-weight: bold;">glStencilOp</span> are ignored. &nbsp;Values
-for <span style="font-style: italic;">func</span> and <span
- style="font-style: italic;">stencilFail</span> other than those listed
-in the table will cause the error GL_INVALID_ENUM to be raised.<br>
-<br>
-The stencil test is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_STENCIL_TEST) and <span
- style="font-weight: bold;">glDisable</span>(GL_STENCIL_TEST).<br>
-<br>
-The default stencil function is GL_ALWAYS. &nbsp;The default stencil
-reference value is 0. &nbsp;The default stencil mask is ~0. &nbsp;The
-default stencil fail operation is GL_KEEP.<br>
-<br>
-Values written into the stencil buffer are masked with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glStencilMask</span>(GLuint<span
- style="font-style: italic;">mask</span>)<br>
-</div>
-<br>
-Only the bits which are set in <span style="font-style: italic;">mask</span>
-will be modified in the stencil buffer when written to. &nbsp;If each
-stencil buffer value has N bits, only the least significant N bits of <span
- style="font-style: italic;">mask</span> are relevant. &nbsp;The default
-stencil mask is ~0.<br>
-<br>
-<h2>6.4 Blending and Logicop</h2>
-Blending or a logic operation combines the incoming fragment color with
-the destination frame buffer color according to a blending equation or
-bit-wise Boolean logical operation.<br>
-<br>
-Blending is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_BLEND) and <span
- style="font-weight: bold;">glDisable</span>(GL_BLEND).<br>
-<br>
-The logic operation is enabled and disabled with the commands <span
- style="font-weight: bold;">glEnable</span>(GL_LOGIC_OP) and <span
- style="font-weight: bold;">glDisable</span>(GL_LOGIC_OP).<br>
-<br>
-If both blending and the logic operation are enabled, the logic
-operation has higher priority; blending is bypassed.<br>
-<br>
-<h3>6.4.1 Logic Op</h3>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glLogicop</span>(GLenum<span
- style="font-style: italic;">mode</span>)<br>
-<br>
-</div>
-Specifies the Boolean logic operation for combining the incoming
-fragment color with the destination frame buffer color. &nbsp;Both the
-incoming fragment color and destination frame buffer colors are
-interpreted as four-tuples of unsigned integer color components in the
-range [0, 2<sup>N</sup>-1] where N is the number of bits per color
-channel. &nbsp;N may not be the same for all color channels.<br>
-<br>
-The following table lists all values for <span
- style="font-style: italic;">mode</span> and the boolean arithmetic used
-to combine the incoming fragment color value (src)<span
- style="font-style: italic;"></span><span style="font-style: italic;"></span><span
- style="font-style: italic;"></span><span style="font-style: italic;"></span><span
- style="font-style: italic;"></span> with the destination framebuffer
-color value (dst). &nbsp;Standard ANSI C operators used.<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">LogicOp <span
- style="font-style: italic;">mode</span><br>
-      </td>
-      <td style="vertical-align: top;">Resulting channel value<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CLEAR<br>
-      </td>
-      <td style="vertical-align: top;">0<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SET<br>
-      </td>
-      <td style="vertical-align: top;">~0<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_COPY<br>
-      </td>
-      <td style="vertical-align: top;">src<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_COPY_INVERTED<br>
-      </td>
-      <td style="vertical-align: top;">~s<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NOOP<br>
-      </td>
-      <td style="vertical-align: top;">dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INVERT<br>
-      </td>
-      <td style="vertical-align: top;">~dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_AND<br>
-      </td>
-      <td style="vertical-align: top;">src &amp; dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NAND<br>
-      </td>
-      <td style="vertical-align: top;">~(src &amp; dst)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_AND_REVERSE<br>
-      </td>
-      <td style="vertical-align: top;">src &amp; ~dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_AND_INVERTED<br>
-      </td>
-      <td style="vertical-align: top;">~src &amp; dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_OR<br>
-      </td>
-      <td style="vertical-align: top;">src | dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NOR<br>
-      </td>
-      <td style="vertical-align: top;">~(src | dst)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_OR_REVERSE<br>
-      </td>
-      <td style="vertical-align: top;">src | ~dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_OR_INVERTED<br>
-      </td>
-      <td style="vertical-align: top;">~src | dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_XOR<br>
-      </td>
-      <td style="vertical-align: top;">src ^ dst<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_EQUIV<br>
-      </td>
-      <td style="vertical-align: top;">~(src ^ dst)<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-The fragment's color is replaced by the result of the logic operation.<br>
-<br>
-Specifying any value for <span style="font-style: italic;">mode</span>
-other than those listed in the above table will cause the error
-GL_INVALID_ENUM to be raised.<br>
-<br>
-The default value for <span style="font-style: italic;">mode</span> is
-GL_COPY. &nbsp;The logic operation is disabled by default.<br>
-<br>
-<h3>6.4.2 Blending</h3>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glBlendFunc</span>(GLenum<span
- style="font-style: italic;">srcTerm</span>, GLenum <span
- style="font-style: italic;">dstTerm</span>)<br>
-</div>
-<br>
-specifies the terms of the blending equation. &nbsp;If Cf = (Rf, Gf,
-Bf, Af) is the incoming fragment color and Cb = (Rb, Gb, Bb, Ab) is the
-frame buffer color, then the resulting color Cv = (Rv, Gv, Bv, Av) is
-computed by:<br>
-<br>
-<div style="margin-left: 40px;">Cv = Cf * <span
- style="font-style: italic;">srcTerm</span> + Cb * <span
- style="font-style: italic;">dstTerm</span><br>
-<span style="font-style: italic;"></span></div>
-<span style="font-style: italic;"> </span><br>
-All possible values for <span style="font-style: italic;">srcTerm</span>
-and the corresponding arithmetic term are listed in the following table:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><span style="font-style: italic;">srcTerm</span><br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">srcTerm</span>Arithmetic<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ZERO<br>
-      </td>
-      <td style="vertical-align: top;">(0, 0, 0, 0)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE<br>
-      </td>
-      <td style="vertical-align: top;">(1, 1, 1, 1)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DST_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">(Rb, Gb, Bb, Ab)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_DST_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">(1-Rb, 1-Gb, 1-Bb, 1-Ab)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SRC_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(Af, Af, Af, AF)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_SRC_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(1-Af, 1-Af, 1-Af, 1-Af)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DST_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(Ab, Ab, Ab, Ab)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_DST_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(1-Ab, 1-Ab, 1-Ab, 1-Ab)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SRC_ALPHA_SATURATE<br>
-      </td>
-      <td style="vertical-align: top;">(m, m, m, 1) where m = MIN(Af,
-1-Ab)<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-All possible values for <span style="font-style: italic;">srcTerm</span>
-and the corresponding arithmetic term are listed in the following table:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><span style="font-style: italic;">dstTerm</span><br>
-      </td>
-      <td style="vertical-align: top;"><span style="font-style: italic;">dstTerm</span>Arithmetic<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ZERO<br>
-      </td>
-      <td style="vertical-align: top;">(0, 0, 0, 0)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE<br>
-      </td>
-      <td style="vertical-align: top;">(1, 1, 1, 1)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SRC_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">(Rf, Gf, Bf, Af)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_SRC_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">(1-Rf, 1-Gf, 1-Bf, 1-Af)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SRC_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(Af, Af, Af, AF)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_SRC_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(1-Af, 1-Af, 1-Af, 1-Af)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DST_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(Ab, Ab, Ab, Ab)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ONE_MINUS_DST_ALPHA<br>
-      </td>
-      <td style="vertical-align: top;">(1-Ab, 1-Ab, 1-Ab, 1-Ab)<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-The fragment's color is replaced by the result of the blending equation.<br>
-<br>
-Values for <span style="font-style: italic;">srcTerm</span> and <span
- style="font-style: italic;">dstTerm</span> other than those listed in
-the table will cause the error GL_INVALID_ENUM to be raised.<br>
-<br>
-The default value for <span style="font-style: italic;">srcTerm</span>
-is GL_ONE. &nbsp;The default value for <span style="font-style: italic;">dstTerm</span>
-is GL_ZERO. &nbsp;Blending is disabled by default.<br>
-<br>
-<h2>6.5 Color Mask</h2>
-The final fragment color is written into the current color buffer at
-the end of the per-fragment operations. &nbsp;Normally, all color
-channels in the frame buffer are replaced with the final fragment color.
-&nbsp;However, the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glColorMask</span>(GLboolean<span
- style="font-style: italic;">redMask</span>, GLboolean <span
- style="font-style: italic;">greenMask</span>, GLboolean <span
- style="font-style: italic;">blueMask</span>, GLboolean <span
- style="font-style: italic;">alphaMask</span>)<br>
-</div>
-<br>
-allows selective writing to individual color channels. &nbsp;If <span
- style="font-style: italic;">redMask</span> is GL_TRUE then writing to
-the red color channel is enabled, otherwise it's disabled.
-&nbsp;Similarly, the green, blue and alpha channels can also be masked.<br>
-<br>
-Initially all four mask values are GL_TRUE.<br>
-<br>
-Color masking is not enabled/disabled with the <span
- style="font-weight: bold;">glEnable</span>/<span
- style="font-weight: bold;">glDisable</span> commands.<br>
-<br>
-<h1>7. Frame Buffer Operations</h1>
-The frame buffer is considered to be a two-dimensional array of pixels.
-&nbsp;The frame buffer is also organized into layers or logical buffers.
-&nbsp;There may be a front color buffer, back color buffer and stencil
-buffer. &nbsp;A double-buffered frame buffer has both a front color
-buffer and back color buffer. &nbsp;A single-buffered framebuffer only
-has a front color buffer. &nbsp;Each pixel in a color buffer has a red,
-green and blue value and an optional alpha value.<br>
-<br>
-<h2>7.1 Clearing Buffers</h2>
-Buffers are cleared (set to uniform values) with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glClear</span>(GLbitfield<span
- style="font-style: italic;">buffers</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">buffers</span> is a bitmask for which
-the value may be the bitwise-OR of the values GL_COLOR_BUFFER_BIT and
-GL_STENCIL_BUFFER_BIT. &nbsp;If the GL_COLOR_BUFFER_BIT bit is
-specified, the current color buffer will be cleared. &nbsp;If the
-GL_STENCIL_BUFFER_BIT bit is specified, the stencil buffer will be
-cleared.<br>
-<br>
-The current color buffer is specified with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glDrawBuffer</span>(GLenum<span
- style="font-style: italic;"> buffer</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">buffer</span> may be either GL_FRONT,
-GL_BACK or GL_NONE. &nbsp;GL_FRONT indicates that the front color buffer
-will be modified by <span style="font-weight: bold;">glClear</span> and
-any drawing command. &nbsp;GL_BACK indicates that the back color buffer
-will be modified by <span style="font-weight: bold;">glClear</span> and
-any drawing command. &nbsp;GL_NONE indicates that neither color buffer
-will be modified by <span style="font-weight: bold;">glClear</span> or
-any drawing command. &nbsp;GL_BACK is only valid for double-buffered
-frame buffers.<br>
-<br>
-The current scissor rectangle, set by the <span
- style="font-weight: bold;">glScissor</span> command, effects <span
- style="font-weight: bold;">glClear</span><span
- style="font-style: italic;">,</span><span style="font-style: italic;"> </span>limiting
-the clear to the scissor rectangle, if it's enabled. &nbsp;Furthermore, <span
- style="font-weight: bold;"></span>only the color channels enabled by <span
- style="font-weight: bold;">glColorMask</span> will be effected by <span
- style="font-weight: bold;">glClear</span>(GL_COLOR_BUFFER_BIT).
-&nbsp;Likewise, only the stencil bits enabled by <span
- style="font-weight: bold;">glStencilMask</span> will be effected by <span
- style="font-weight: bold;">glClear</span>(GL_STENCIL_BUFFER_BIT).<br>
-<br>
-The current clear color is set with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glClearColor</span>(GLclampf<span
- style="font-style: italic;">red</span>, GLclampf <span
- style="font-style: italic;">green</span>, GLclampf <span
- style="font-style: italic;">blue</span>, GLclampf <span
- style="font-style: italic;">alpha</span>)<br>
-</div>
-<br>
-Subsequent calls to <span style="font-weight: bold;">glClear</span>
-will use the color (<span style="font-style: italic;">red, green, blue,
-alpha</span>) to clear the front or back color buffers.<br>
-<span style="font-style: italic;"></span><br>
-The current stencil clear value is set with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glClearStencil</span>(GLint<span
- style="font-style: italic;">clearValue</span>)<br>
-</div>
-<br>
-If the stencil buffer is N bits deep, the least significant N bits of <span
- style="font-style: italic;">clearValue</span> will be used to clear the
-stencil buffer.<br>
-<br>
-<br>
-<h1>8. Other Features</h1>
-<h2>8.1 Frame Buffer Readback</h2>
-A rectangular region of pixels can be read from the frame buffer and
-placed in client memory with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glReadPixels</span>(GLint<span
- style="font-style: italic;">x</span>, GLint <span
- style="font-style: italic;">y</span>, GLsizei <span
- style="font-style: italic;">width</span>, GLsizei <span
- style="font-style: italic;">height</span>, GLenum <span
- style="font-style: italic;">format</span>, GLenum <span
- style="font-style: italic;">type</span>, GLvoid *<span
- style="font-style: italic;">data</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">x</span> and <span
- style="font-style: italic;">y</span> specify the coordinate of the
-lower-left corner of the region to read and <span
- style="font-style: italic;">width</span> and <span
- style="font-style: italic;">height</span> specify the size of the
-rectangular region to read. &nbsp;<span style="font-style: italic;">format</span>
-specifies the format of image data and must be either GL_RGB or
-GL_RGBA.&nbsp; <span style="font-style: italic;">type</span> specify the
-data type of the image data and must be either GL_UNSIGNED_BYTE or
-GL_FLOAT. &nbsp;Other values for <span style="font-style: italic;">format</span>
-or <span style="font-style: italic;">type</span> will cause the error
-GL_INVALID_ENUM to be raised.<br>
-<br>
-The framebuffer may contain 3-component colors (red, green, blue) or
-4-component colors (red, green, blue, alpha). &nbsp;If an alpha channel
-is not present, alpha values default to 1.0.<br>
-<br>
-The frame buffer color components (red, green, blue, alpha) are either
-converted to 8-bit unsigned integers in the range[0, 255] if <span
- style="font-style: italic;">type </span>is GL_UNSIGNED_BYTE or
-converted to floating point values in the range [0, 1] if <span
- style="font-style: italic;">type</span> is GL_FLOAT. &nbsp;The (red,
-green, blue, alpha) tuples are then stored as GL_RGB triplets (by
-dropping the alpha component) or GL_RGBA quadruples in client memory.<br>
-<br>
-Image data is <span style="font-style: italic;">packed</span> into
-client memory according to the pixel packing parameters which are set by
-the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glPixelStorei</span>(GLenum<span
- style="font-style: italic;"> pname</span>, GLint <span
- style="font-style: italic;">value</span>)<br>
-</div>
-<br>
-<span style="font-style: italic;">pname</span> must be
-GL_PACK_ROW_LENGTH. &nbsp;<span style="font-style: italic;">value</span>
-indicates the stride (in pixels) between subsequent rows in the
-destination image. &nbsp;If GL_PACK_ROW_LENGTH is zero (the default)
-then the <span style="font-style: italic;">width</span> parameter to <span
- style="font-weight: bold;">glReadPixels</span> indicates the row stride.<br>
-<br>
-Pixel readback takes place as follows:<br>
-<br>
-<div style="margin-left: 40px;">if (GL_PACK_ROW_LENGTH == 0)<br>
-&nbsp;&nbsp;&nbsp; rowLength = <span style="font-style: italic;">width</span>;<br>
-else<br>
-&nbsp;&nbsp;&nbsp; rowLength = GL_PACK_ROW_LENGTH<br>
-<br>
-if (<span style="font-style: italic;">format</span> == GL_RGB) {<br>
-&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">height</span>;
-i++) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (j = 0; j &lt; <span
- style="font-style: italic;">width</span>; j++) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; k = (i *
-rowLength + j) * 3;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+0] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).red;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+1] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).green;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+2] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).blue;<span
- style="font-style: italic;"></span><br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp; }<br>
-}<br>
-else {<br>
-&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">height</span>;
-i++) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (j = 0; j &lt; <span
- style="font-style: italic;">width</span>; j++) {<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; k = (i *
-rowLength + j) * 4;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+0] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).red;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+1] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).green;<br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+2] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).blue;<span
- style="font-style: italic;"></span><br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span
- style="font-style: italic;">data</span>[k+3] = FrameBuffer(<span
- style="font-style: italic;">x</span> + j, <span
- style="font-style: italic;">y</span> + i).alpha;<span
- style="font-style: italic;"></span><br>
-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
-&nbsp;&nbsp;&nbsp; }<br>
-}<br>
-</div>
-<br>
-The function FrameBuffer(<span style="font-style: italic;">c, r</span>)
-returns the pixel in the frame buffer at column <span
- style="font-style: italic;">c</span> of row <span
- style="font-style: italic;">r. &nbsp;</span><span
- style="font-style: italic;">data</span> is considered to be either a
-GLubyte pointer or a GLfloat pointer, depending on the <span
- style="font-style: italic;">type</span> parameter. &nbsp;Similarly, the
-FrameBuffer function returns either GLubyte values in the range [0, 255]
-or GLfloat values in the range [0,1], depending on the <span
- style="font-style: italic;">type</span> parameter.<br>
-<br>
-Pixels may be read from either the front or back color buffer.
-&nbsp;The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glReadBuffer</span>(GLenum<span
- style="font-style: italic;">buffer</span>)<br>
-</div>
-<br>
-specifies the source for reading images with <span
- style="font-weight: bold;">glReadPixels</span>. &nbsp;If <span
- style="font-style: italic;">buffer</span> is GL_FRONT then front color
-buffer is the source. &nbsp;If <span style="font-style: italic;">buffer</span>
-is GL_BACK then the back color buffer is the source. &nbsp;It is illegal
-to specify GL_BACK when the color buffer is not double buffered.
-&nbsp;Any invalid value for <span style="font-style: italic;">buffer</span>
-will raise the error GL_INVALID_ENUM.<br>
-<br>
-The default read source is GL_BACK if the frame buffer is double
-buffered. &nbsp;Otherwise, the default read source is GL_FRONT.<br>
-<br>
-<h2>8.2 Selection Mode</h2>
-Selection mode is typically used to implement <span
- style="font-style: italic;">picking</span>: determining which
-primitive(s) are present at particular window positions. &nbsp;The
-command<br>
-<br>
-<div style="margin-left: 40px;">GLint <span style="font-weight: bold;">glRenderMode</span>(GLenum<span
- style="font-style: italic;">mode</span>)<br>
-</div>
-<br>
-is used to enable selection mode. &nbsp;If <span
- style="font-style: italic;">mode</span> is GL_SELECTION the graphics
-library is put into selection mode. &nbsp;If <span
- style="font-style: italic;">mode</span> is GL_RENDER the graphic
-library is put into normal rendering mode. &nbsp;Any other value for <span
- style="font-style: italic;">mode</span> will raise the error
-GL_INVALID_ENUM.<br>
-<br>
-When in selection mode rendering commands will not effect the
-framebuffer. &nbsp;Instead, a record of the primitives that would have
-been drawn is placed in the <span style="font-style: italic;">selection</span> <span
- style="font-style: italic;">buffer</span>. &nbsp;The selection buffer
-is specified with the command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glSelectionBuffer</span>(GLsizei<span
- style="font-style: italic;">n</span>, GLuint *<span
- style="font-style: italic;">buffer</span>)<br>
-</div>
-<span style="font-style: italic;"></span><span
- style="font-style: italic;"><br>
-buffer</span> is an array of <span style="font-style: italic;">n</span>
-unsigned integers. &nbsp;No more than <span style="font-style: italic;">n</span>
-values will be placed in the buffer.<br>
-<br>
-The <span style="font-style: italic;">name stack</span> is a stack
-(LIFO) of unsigned integer names. &nbsp;The following commands
-manipulate the name stack:<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glInitNames</span>(void)<br>
-void <span style="font-weight: bold;">glPushName</span>(GLuint <span
- style="font-style: italic;">name</span>)<br>
-void <span style="font-weight: bold;">glPopName</span>(void)<br>
-void <span style="font-weight: bold;">glLoadName</span>(GLuint <span
- style="font-style: italic;">name</span>)<br>
-</div>
-<br>
-<span style="font-weight: bold;">glInitNames</span> resets the name
-stack to an empty state. &nbsp;<span style="font-weight: bold;">glPushName<span
- style="font-style: italic;"> </span></span>pushes the given <span
- style="font-style: italic;">name</span> value onto the stack. &nbsp;<span
- style="font-weight: bold;">glPopName</span> pops the top name from the
-stack. &nbsp;<span style="font-weight: bold;">glLoadName<span
- style="font-style: italic;"> </span></span>replaces the top value on
-the stack with the specified <span style="font-style: italic;">name</span>.
-&nbsp;Stack underflow and overflow conditions cause the errors
-GL_STACK_OVERFLOW and GL_STACK_UNDERFLOW to be raised.<br>
-<br>
-While in selection mode, primitives (points, lines, polygons) are
-transformed and clip-tested normally. &nbsp;Primitives which aren't
-discarded by clipping cause the <span style="font-style: italic;">hit</span> <span
- style="font-style: italic;">data</span> to be updated. &nbsp;The hit
-data consists of three pieces of information: a hit flag, a minimum Z
-value and a maximum Z value. &nbsp;First, the hit flag is set.
-&nbsp;Then, for each of the primitive's vertices, the vertex Z value is
-compared to the minimum and maximum Z values. &nbsp;The minimum Z value
-is updated if the vertex's Z value is less than the minimum Z value.
-&nbsp;The maximum Z value is updated if the vertex's Z value is greater
-than the maximum Z value.<br>
-<br>
-When any of <span style="font-weight: bold;">glInitNames</span><span
- style="font-style: italic;"><span style="font-style: italic;">, </span></span><span
- style="font-weight: bold;">glPushName</span>, <span
- style="font-weight: bold;">glPopName</span>, <span
- style="font-weight: bold;">glLoadName</span> or <span
- style="font-weight: bold;">glRenderMode</span> are called and the hit
-flag is set, a <span style="font-style: italic;">hit record</span> is
-written to the selection buffer.<br>
-<br>
-A hit record consists of a sequence of unsigned integers. &nbsp;The
-first value is the size of the name stack. &nbsp;The second value is the
-minimum Z value multiplied by 2<sup>32</sup>-1. &nbsp;The third value is
-the maximum Z value multiplied by 2<sup>32</sup>-1. &nbsp;The remaining
-values are the values in the name stack, in bottom to top order.
-&nbsp;The hit flag is cleared after a hit record is written to the
-selection buffer. &nbsp;Hit records are places sequentially into the
-selection buffer until it is full or selection mode is terminated.<br>
-<br>
-Selection mode is terminated by calling <span
- style="font-weight: bold;">glRenderMode</span>(GL_RENDER). &nbsp; The
-return value of <span style="font-weight: bold;">glRenderMode</span>
-will be -1 if the selection buffer overflowed. &nbsp;Otherwise, the
-return value will indicate the number of values written into the
-selection buffer.<br>
-<br>
-<h2>8.3 Synchronization</h2>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glFlush</span>(void)<br>
-</div>
-<br>
-makes the graphics library to flush all pending graphics commands.
-&nbsp;The command<br>
-<div style="margin-left: 40px;"><br>
-void <span style="font-weight: bold;">glFinish</span>(void)<br>
-</div>
-<br>
-makes the graphics library flush the command queue and wait until those
-commands are completed. &nbsp;<span style="font-weight: bold;">glFlush</span>
-will not return until all previous graphics commands have been fully
-completed.<br>
-<br>
-These commands are typically used to force completion of rendering to
-the front color buffer. &nbsp;Otherwise, rendering to the front color
-buffer may not appear. &nbsp;The <span style="font-style: italic;">swapbuffers</span>
-command (part of the window system binding library) does an implicit
-flush before swapping the front and back color buffers. &nbsp;The <span
- style="font-weight: bold;">glReadPixels</span> command also does an
-implicit flush before reading pixel data from the frame buffer.<br>
-<br>
-<h1>9. State Queries</h1>
-The current value of nearly all library state variables can be queried.
-&nbsp;This chapter describes the commands used for querying the value of
-state variables.<br>
-<br>
-<h2>9.1 General State Queries</h2>
-The command<br>
-<br>
-<div style="margin-left: 40px;">void <span style="font-weight: bold;">glGetFloatv</span>(GLenum<span
- style="font-style: italic;">pname</span>, GLfloat *<span
- style="font-style: italic;">values</span>)<br>
-</div>
-<br>
-returns the value(s) of the state variable specified by <span
- style="font-style: italic;">pname</span>. &nbsp;The following table
-lists all accepted values for <span style="font-style: italic;">pname</span>
-and a description of the value(s). &nbsp;Specifying any other value for <span
- style="font-style: italic;">pname</span> causes the error
-GL_INVALID_ENUM to be raised.<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Variable (<span
- style="font-style: italic;">pname)</span><br>
-      </td>
-      <td style="vertical-align: top;">Number of values<br>
-      </td>
-      <td style="vertical-align: top;">Value(s) Description<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALPHA_BITS<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Number of bits per alpha value
-in the frame buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALPHA_TEST<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if the alpha test is
-disabled.<br>
-One if the alpha test is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALPHA_TEST_FUNC<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">The alpha test function.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_BLEND<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if blending is disabled.<br>
-One if blending is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_BLEND_DST<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Blend destination function/term.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_BLEND_SRC<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Blend source function/term.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_BLUE_BITS<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Number of bits per blue value in
-the frame buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_COLOR_CLEAR_VALUE<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Clear color (red, green, blue,
-alpha).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_COLOR_WRITE_MASK<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Color buffer writemask (red,
-green, blue, alpha).<br>
-Zero if writing is disabled.<br>
-One if writing is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CULL_FACE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if polygon culling is
-disabled.<br>
-One if polygon culling is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CULL_FACE_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Polygon cull mode: GL_FRONT,
-GL_BACK or GL_FRONT_AND_BACK.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current color (red, green, blue,
-alpha).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_RASTER_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current raster position color
-(red, green, blue, alpha).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_RASTER_TEXTURE_COORDS<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current raster position texture
-coordinates (s, t, r, q).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_RASTER_POSITION<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current raster position (x, y,
-z, w).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_POSITION_VALID<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if current raster position
-is invalid.<br>
-One if current raster position is valid.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_CURRENT_TEXTURE_COORDS<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current texture coordinates (s,
-t, r, q)<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DOUBLEBUFFER<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if color buffer is
-single-buffered.<br>
-One if color buffer is double-buffered.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_DRAW_BUFFER<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current color draw buffer:
-GL_FRONT or GL_BACK.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_FRONT_FACE</td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Polygon front-face winding:
-GL_CW or GL_CCW.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_GREEN_BITS<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Number of bits per green value
-in the frame buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_SMOOTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if line smoothing is
-disabled.<br>
-One if line smoothing is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_STIPPLE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if line stippling is
-disabled.<br>
-One if line stippling is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_STIPPLE_PATTERN<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Line stipple pattern.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_STIPPLE_REPEAT<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Line stipple repeat factor.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_WIDTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Line width in pixels.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_WIDTH_GRANULARITY<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Aliased line width granularity.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LINE_WIDTH_RANGE<br>
-      </td>
-      <td style="vertical-align: top;">2<br>
-      </td>
-      <td style="vertical-align: top;">Minimum and maximum aliased line
-widths.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_ALIASED_LINE_WIDTH_RANGE<br>
-      </td>
-      <td style="vertical-align: top;">2<br>
-      </td>
-      <td style="vertical-align: top;">Minimum and maximum antialiased
-line widths.</td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_COLOR_LOGIC_OP<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if logicop is disabled.<br>
-One if logicop is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_LOGIC_OP_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Logicop function.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MATRIX_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Matrix mode: GL_MODELVIEW or
-GL_PROJECTION.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MAX_MODELVIEW_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Maximum size of the modelview
-matrix stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MAX_NAME_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Maximum size of the selection
-name stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MAX_PROJECTION_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Maximum size of the projection
-matrix stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MAX_TEXTURE_SIZE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Maximum 2D texture image width
-and height.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MAX_VIEWPORT_DIMS<br>
-      </td>
-      <td style="vertical-align: top;">2</td>
-      <td style="vertical-align: top;">Maximum viewport width and
-height in pixels.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MODELVIEW_MATRIX<br>
-      </td>
-      <td style="vertical-align: top;">16<br>
-      </td>
-      <td style="vertical-align: top;">Current/top modelview matrix
-values.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_MODELVIEW_MATRIX_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current size of the modelview
-matrix stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NAME_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current size of the selection
-name stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_PACK_ROW_LENGTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Pixel packing row length.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_POLYGON_SMOOTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if polygon smoothing is
-disabled.<br>
-One if polygon smoothing is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_PROJECTION_MATRIX<br>
-      </td>
-      <td style="vertical-align: top;">16<br>
-      </td>
-      <td style="vertical-align: top;">Current/top projection matrix
-values.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_PROJECTION_STACK_DEPTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current size of projection
-matrix stack.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_READ_BUFFER<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current read buffer: GL_FRONT or
-GL_BACK.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RED_BITS<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Number of bits per red value in
-the frame buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RENDER_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Current rendering mode:
-GL_RENDER or GL_SELECTION.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RGBA_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Always one.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SCISSOR_BOX<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Scissor box (x, y, width,
-height).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SCISSOR_TEST<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if scissor test is disabled.<br>
-One if scissor test is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SELECTION_BUFFER_SIZE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Size of selection buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_SHADE_MODEL<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Shade model: GL_FLAT or
-GL_SMOOTH.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_BITS<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Number of bits per stencil value
-in the frame buffer.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_CLEAR_VALUE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil buffer clear value.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_FAIL<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil fail operation.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_FUNC<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil function.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_REF<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil reference value.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_TEST<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if stencil test is disabled.<br>
-One if stencil test is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_VALUE_MASK<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil mask value.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STENCIL_WRITE_MASK<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Stencil buffer write mask.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_TEXTURE_2D<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if 2D texture mapping is
-disabled.<br>
-One if 2D texture mapping is enabled.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_TEXTURE_BINDING_2D</td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Name of currently bound 2D
-texture object.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_TEXTURE_ENV_COLOR<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Texture environment color (red,
-green, blue, alpha).<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_TEXTURE_ENV_MODE<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Texture environment mode.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_UNPACK_ROW_LENGTH<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Pixel unpacking row length.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_UNPACK_LSB_FIRST<br>
-      </td>
-      <td style="vertical-align: top;">1<br>
-      </td>
-      <td style="vertical-align: top;">Zero if most significant bit is
-unpacked first for bitmaps.<br>
-One if least significant bit is unpacked first for bitmaps.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_VIEWPORT<br>
-      </td>
-      <td style="vertical-align: top;">4<br>
-      </td>
-      <td style="vertical-align: top;">Current viewport (x, y, width,
-height).<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<br>
-<h2>9.2 String Queries</h2>
-The command<br>
-<br>
-<div style="margin-left: 40px;">const GLubyte *<span
- style="font-weight: bold;">glGetString</span>(GLenum <span
- style="font-style: italic;">name</span>)<br>
-</div>
-<br>
-is used to query string-valued values. &nbsp;The legal values for <span
- style="font-style: italic;">name</span> are described in the following
-table:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 80%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><span style="font-style: italic;">name</span><br>
-      </td>
-      <td style="vertical-align: top;">Return value<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_VERSION<br>
-      </td>
-      <td style="vertical-align: top;">The library version, such as
-"1.2".<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_RENDERER<br>
-      </td>
-      <td style="vertical-align: top;">The renderer, such as "Mesa DRI
-Radeon".<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_VENDOR<br>
-      </td>
-      <td style="vertical-align: top;">The vendor of this
-implementation, such as "Tungsten Graphics, Inc."<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_EXTENSIONS<br>
-      </td>
-      <td style="vertical-align: top;">A white-space separated list of
-the supported extensions. </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<h2>9.3 Error Queries</h2>
-The command<br>
-<br>
-<div style="margin-left: 40px;">GLenum <span style="font-weight: bold;">glGetError</span>(void)<br>
-</div>
-<br>
-returns the current error code. &nbsp;The current error code will be
-set by a GL command when an error condition has been detected. &nbsp;If
-the current error code is already set, subsequent errors will not be
-recorded. &nbsp;The error code is reset/cleared to GL_NO_ERROR when <span
- style="font-weight: bold;">glGetError</span> returns. &nbsp;The
-following error codes are possible:<br>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 80%; margin-left: auto; margin-right: auto;">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;">Error code<br>
-      </td>
-      <td style="vertical-align: top;">Meaning<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_NO_ERROR<br>
-      </td>
-      <td style="vertical-align: top;">No error has been recorded.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INVALID_ENUM<br>
-      </td>
-      <td style="vertical-align: top;">An enum parameter had an invalid
-value.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INVALID_VALUE<br>
-      </td>
-      <td style="vertical-align: top;">A numeric parameter had an
-invalid value.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_INVALID_OPERATION<br>
-      </td>
-      <td style="vertical-align: top;">A function was called when not
-legal to do so.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STACK_OVERFLOW<br>
-      </td>
-      <td style="vertical-align: top;">The current transformation
-matrix stack is full.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_STACK_UNDERFLOW<br>
-      </td>
-      <td style="vertical-align: top;">The current transformation
-matrix stack is empty.<br>
-      </td>
-    </tr>
-    <tr>
-      <td style="vertical-align: top;">GL_OUT_OF_MEMORY<br>
-      </td>
-      <td style="vertical-align: top;">The system ran out of dynamic
-memory.<br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<br>
-<br>
-<h1>10. Unsupported Features</h1>
-This section lists other features and functions which are not supported
-and not previously discussed.<br>
-<br>
-<h2>10.1 Feedback Mode</h2>
-Feedback mode and the following related functions are not supported.<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glFeedbackBuffer</span><br>
-<span style="font-weight: bold;">glPassThrough</span><br>
-</div>
-<br>
-<h2>10.2 1D and 3D Textures<br>
-</h2>
-Only 2D texture images are supported. &nbsp;The following functions
-used to specify 1D and 3D texture images are not supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glTexImage1D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexImage3D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexSubImage1D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glTexSubImage3D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glCopyTexImage1D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glCopyTexSubImage1D</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glCopyTexSubImage3D</span><br>
-</div>
-<br>
-<h2>10.3 Alternate Texture Image Commands<br>
-</h2>
-Texture images may only be specified with <span
- style="font-weight: bold;">glTexImage2D</span>. &nbsp;The following
-alternate texture image commands are not supported:<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;">glTexSubImage2D<br>
-glCopyTexImage2D<br>
-glCopyTexSubImage2D<br>
-</div>
-<br>
-<h2>10.4 Proxy Textures</h2>
-Proxy textures are not supported and the GL_PROXY_TEXTURE_2D token is
-not supported by any function.<br>
-<br>
-<br>
-<h2>10.5 Other Texture Commands</h2>
-The following commands related to texture mapping are not supported by
-the subset:<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;"> glPrioritizeTextures<br>
-glAreTexturesResident<br>
-glIsTexture<br>
-glTexEnviv<br>
-glTexEnvf<br>
-glTexParameterf<br>
-glTexParameteriv<br>
-glTexParameterfv<br>
-</div>
-<br>
-<br>
-<h2>10.6 Copy and Draw Pixels<br>
-</h2>
-The following commands are not supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glDrawPixels<br>
-glCopyPixels<br>
-glPixelZoom<br>
-<br>
-</span></div>
-<h2>10.7 Color Index Mode<br>
-</h2>
-Color index mode and the following related commands are not supported:<br>
-<br>
-<span style="font-weight: bold;"></span>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glIndexub<br>
-</span><span style="font-weight: bold;">glIndexi</span><br>
-<span style="font-weight: bold;">glIndexs<br>
-glIndexf<br>
-glIndexd<br>
-</span><span style="font-weight: bold;">glIndexubv<br>
-</span><span style="font-weight: bold;">glIndexiv</span><br>
-<span style="font-weight: bold;">glIndexsv<br>
-glIndexfv<br>
-glIndexdv</span><span style="font-weight: bold;"><br>
-glIndexMask<br>
-</span><span style="font-weight: bold;">glClearIndex<br>
-glIndexPointer</span><br style="font-weight: bold;">
-<br>
-</div>
-<h2>10.8 Pixel Transfer Operations</h2>
-The pixel transfer operations (scale, bias, look-up table, etc) are not
-supported and the following commands are omitted:<br>
-<br style="font-weight: bold;">
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glPixelTransferf</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glPixelTransferi</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glPixelMapfv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glPixelMapuiv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glPixelMapusv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetPixelMapfv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetPixelMapuiv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetPixelMapusv</span><br>
-</div>
-<br>
-<h2>10.9 Hints</h2>
-Hints and the following related command is not supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glHint<br>
-</span><br>
-</div>
-<h2>10.10 State Query Commands<br>
-</h2>
-The following state query commands are not supported:<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;">glGetBooleanv<br>
-glGetIntegerv<br>
-glGetDoublev<br>
-glGetPointerv<br>
-glGetTexEnvi<br>
-glGetTexEnvf<br>
-glGetTexParameteriv<br>
-glGetTexParameterfv<br>
-glGetTexLevelParameteriv<br>
-glGetTexLevelParameterfv<br>
-glGetTexImage<br>
-glGetClipPlane<br>
-</div>
-<br>
-<h2>10.11 Attribute Stacks</h2>
-State attribute stacks and the following related commands are not
-supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glPushAttrib</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glPopAtttrib</span><br>
-<br style="font-weight: bold;">
-</div>
-<h2>10.12 Double-Valued Functions</h2>
-All functions which take double-precision floating point values, but
-for which there is an equivalent single-precision valued function, are
-omitted. &nbsp;This includes, but is not limited to:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glVertex2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glVertex2dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glVertex3d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glVertex3dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glVertex4d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glVertex4dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glColor3d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glColor3d</span><span
- style="font-weight: bold;">v</span><br style="font-weight: bold;">
-<span style="font-weight: bold;">glColor4d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glColor4dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexCoord1d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexCoord1d</span><span
- style="font-weight: bold;">v</span><br style="font-weight: bold;">
-<span style="font-weight: bold;">glTexCoord2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glTexCoord2dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexCoord3d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glTexCoord3dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTexCoord4d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glTexCoord4dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glRasterPos2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glRasterPos2dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glRasterPos3d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glRasterPos3dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glRasterPos4d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;"> glRasterPos4dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glLoadMatrixd</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMultMatrixd</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glScaled</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glRotated</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glTranslated<br>
-glRectd<br>
-glRectdv<br>
-</span> <span style="font-weight: bold;"><br>
-</span> </div>
-<h2>10.13 Evaluators</h2>
-Evaluators and the following related commands are not supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glMap1f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMap2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMap2f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetMapdv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetMapfv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glGetMapiv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord1d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord1f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord1dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord1fv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord2f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord2dv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalCoord2fv</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMapGrid1d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMapGrid1f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMapGrid2d</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glMapGrid2f</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalPoint1</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalPoint2</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalMesh1</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glEvalMesh2</span><br
- style="font-weight: bold;">
-</div>
-<br>
-<h2>10.14 Display Lists</h2>
-Display lists and the following related commands are not supported:<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;">glIsList<br>
-glDeleteLists<br>
-glGenLists<br>
-glNewList<br>
-glEndList<br>
-glCallList<br>
-glCallLists<br>
-glListBase<br>
-</div>
-<br>
-<h2>10.15 Accumulation Buffer</h2>
-The accumulation buffer and the following related commands are not
-supported:<br>
-<br style="font-weight: bold;">
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glAccum</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glClearAccum</span><br>
-</div>
-<br>
-<h2>10.16 Fog</h2>
-Fog and the following related commands are not supported:<br>
-<br>
-<div style="margin-left: 40px; font-weight: bold;"> glFogi<br>
-glFogf<br>
-glFogiv<br>
-glFogfv<br>
-</div>
-<br>
-<h2>10.17 Depth Test</h2>
-Depth testing and the following related commands are not supported:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-weight: bold;">glDepthFunc</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glDepthMask</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glDepthRange</span><br
- style="font-weight: bold;">
-<span style="font-weight: bold;">glClearDepth</span><br>
-</div>
-<br>
-<h2>10.18 Imaging Subset</h2>
-The OpenGL imaging subset (which implements features such as
-convolution, histogram, min/max recording, color matrix and color
-tables) is not supported.<br>
-<br>
-<br>
-<h1>Appendix A: Issues</h1>
-This appendix lists documentation and subset issues with their current
-status. &nbsp;For items which are still open, the documentation (above)
-follows the recommended solution.<br>
-<br>
-<h2>A.1 Vertex Arrays</h2>
-Should vertex arrays be supported? &nbsp;Is there a performance
-advantage?<br>
-<br>
-RESOLUTION: No, there isn't enough of a performance advantage to
-justify them.<br>
-<br>
-<h2>A.2 Polygon Antialiasing and Edge Flags</h2>
-Should edge flags be supported for antialiasing?<br>
-<br>
-Edge flags don't effect antialiasing, at least not normally. &nbsp;A
-number of approaches to antialiasing have been summarized in email.<br>
-<br>
-RECOMMENDATION: don't support edge flags. &nbsp;They don't effect
-polygon antialiasing.<br>
-<br>
-RESOLUTION: closed, as of 26 Feb 2003.<br>
-<br>
-<h2>A.3 glRasterPos vs. glWindowPos</h2>
-Should glRasterPos and/or glWindowPos commands be supported?<br>
-<br>
-RESOLUTION: Closed: implement glRasterPos commands, but not glWindowPos
-commands.<br>
-<br>
-<h2>A.4 GL_IBM_rasterpos_clip extension</h2>
-Should the GL_IBM_rasterpos_clip extension be implemented?<br>
-<br>
-RESOLUTION: &nbsp;No. &nbsp;It's not required.<br>
-<br>
-<h2>A.5 Image Formats and Types</h2>
-Which image formats and types should be supported for <span
- style="font-weight: bold;">glTexImage2D</span> and <span
- style="font-weight: bold;">glReadPixels</span>?<br>
-<br>
-OpenGL specifies a <span style="font-weight: bold;">large</span>
-variety of image formats and data types. &nbsp;Only a few are commonly
-used.<br>
-<br>
-RECOMMENDATION: &nbsp;we propose a subset:<br>
-<br>
-For <span style="font-weight: bold;">glTexImage2D</span> only allow <span
- style="font-style: italic;">type</span>=GL_UNSIGNED_BYTE and <span
- style="font-style: italic;">format</span>=GL_RGBA, GL_RGB,
-GL_INTENSITY. &nbsp; Only allow <span style="font-style: italic;">internalFormat</span>
-to be GL_RGBA, GL_RGB or GL_INTENSITY as well.&nbsp; Basically, only
-support image formats/types that are directly supported by the Radeon
-hardware. &nbsp;This will allow <span style="font-weight: bold;">glTexImage2D</span>
-to basically just use <span style="font-weight: bold;">memcpy</span> to
-copy texture images.<br>
-<br>
-For <span style="font-weight: bold;">glReadPixels</span>, only allow <span
- style="font-style: italic;">type</span> = GL_UNSIGNED_BYTE or GL_FLOAT.
-&nbsp;Only allow <span style="font-style: italic;">format</span> =
-GL_RGB or GL_RGBA. &nbsp;This is just enough to support the OpenGL
-conformance tests.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.6 Texture Environment Modes</h2>
-Which texture environment modes should be supported? &nbsp;OpenGL 1.2
-has GL_REPLACE, GL_MODULATE, GL_DECAL and GL_BLEND. &nbsp;GL_DECAL isn't
-defined for all base internal texture formats. &nbsp;GL_ADD is another
-useful mode. &nbsp;Perhaps drop GL_DECAL mode and add GL_ADD mode.<br>
-<br>
-RECOMMENDATION: implement the standard modes GL_REPLACE, GL_MODULATE,
-GL_DECAL and GL_BLEND.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.7 Truncated Mipmaps and LOD Control</h2>
-Should we support the GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL,
-GL_TEXTURE_MIN_LOD and GL_TEXTURE_MAX_LOD texture parameters?<br>
-<br>
-RECOMMENDATION: &nbsp;We propose omitting these features at this time,
-in the interest of simplifying the driver.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.8 Texture Priorities and Residency</h2>
-Should the subset support texture priorities via <span
- style="font-weight: bold;">glPrioritizeTextures</span> and the <span
- style="font-weight: bold;">glAreTexturesResident</span> command?<br>
-<br>
-RECOMMENDATION: &nbsp;Few applications use these features and
-functions. &nbsp;We propose omitting them to simplify the driver.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.9 Pixel Pack/Unpack Alignment Control</h2>
-Should we support the GL_PACK_ALIGNMENT and GL_UNPACK_ALIGNMENT options?<br>
-<br>
-These are used to align pixel data addresses to 1, 2 and 4-byte
-multiples for <span style="font-weight: bold;">glBitmap, glTexImage2D</span>
-and <span style="font-weight: bold;">glReadPixels</span>. &nbsp;These
-aren't strictly needed since the user can provide a 1, 2 or 4-byte
-aligned address and appropriate GL_PACK_ROW_LENGTH or
-GL_UNPACK_ROW_LENGTH values instead.<br>
-<br>
-RECOMMENDATION: &nbsp;We recommend omitting them to simplify the driver.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.10 Pixel Pack/Unpack Skip Rows/Pixels Control</h2>
-Should we support the GL_UNPACK_SKIP_PIXELS, GL_UNPACK_SKIP_ROWS,
-GL_PACK_SKIP_PIXELS and GL_PACK_SKIP_ROWS options for pixel
-unpacking/packing?<br>
-<br>
-These options aren't really needed since the user can adjust the start
-address and GL_PACK/UNPACK_ROW_LENGTH parameters to achieve the same
-effect.<br>
-<br>
-RECOMMENDATION: &nbsp;omit these parameters.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.11 Texture State Queries</h2>
-Should we support the command <span style="font-weight: bold;">glGetTexEnvi/fv,
-glGetTexParameteri/fv</span> and <span style="font-weight: bold;">glGetTexLevelParameteri/fv</span>?<br>
-<br>
-RECOMMENDATION: &nbsp;No.&nbsp;They're seldom needed and their
-implementation is several hundred lines of code in length.<br>
-<br>
-RESOLUTION: &nbsp;open<br>
-<br>
-<h2>A.12 glGetIntegerv, glGetBooleanv and glGetDoublev</h2>
-Should we support the commands <span style="font-weight: bold;">glGetIntegerv,
-glGetBooleanv </span>and <span style="font-weight: bold;">glGetDoublev</span>
-in addition to <span style="font-weight: bold;">glGetFloatv</span>?<br>
-<br>
-RECOMMENDATION: &nbsp;Omit the boolean, integer and double-valued
-functions. All state values which can be queried by these commands can
-be expressed as floating point values and queried with <span
- style="font-weight: bold;">glGetFloatv</span>. &nbsp;The
-implementation of the other three commands involves many lines of code.<br>
-<br>
-RESOLUTION: &nbsp;open<br>
-<br>
-<h2>A.13 glBitmap and Per-Fragment Operations</h2>
-Should bitmaps rendered with <span style="font-weight: bold;">glBitmap</span>
-be subjected to the per-fragment operations?<br>
-<br>
-If bitmaps are implemented with points it will be easy to implement the
-per-fragment operations. &nbsp;Otherwise, it could be difficult.<br>
-<br>
-RECOMMENDATION: &nbsp;Implement glBitmap by drawing points/pixels with
-the hardware. &nbsp;This will make supporting the per-fragments
-trivially easy. &nbsp;Also, it makes portrait-mode display relatively
-easy.<br>
-<br>
-RESOLUTION: &nbsp;open<br>
-<br>
-<h2>A.14 Reduced gl.h Header File</h2>
-Should we produce a reduced gl.h header file which only defines the
-tokens and functions which are implemented by the subset?<br>
-<br>
-RECOMMENDATION: yes. &nbsp;It would be a useful reference to
-programmers to quickly determine which functions and tokens are
-supported.<br>
-<br>
-RESOLUTION: open<br>
-<br>
-<h2>A.15 glPolygonMode</h2>
-Is <span style="font-weight: bold;">glPolygonMode</span> needed?<br>
-<br>
-RECOMMENDATION: No. &nbsp;Omit it.<br>
-<br>
-RESOLUTION: closed, as of 26 Feb 2003<br>
-<br>
-<br>
-<p> </p>
-</body>
-</html>
diff --git a/docs/subset.html b/docs/subset.html
deleted file mode 100644
index 4ac2ead..0000000
--- a/docs/subset.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Subset Driver</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Mesa Subset Driver</H1>
-
-<p>
-In 2002/2003 Tungsten Graphics was contracted to develop a subset Mesa/Radeon
-driver for an embedded environment.  The result is a reduced-size DRI driver
-for the ATI R200 chip, for use with
-<a href="fbdev-dri.html">fbdev/DRI environment</a>.
-</p>
-
-<p>
-The specification for this subset can be found
-<a href="subset-A.html">here</a>.
-</p>
-
-</BODY>
-</HTML>
diff --git a/docs/systems.html b/docs/systems.html
deleted file mode 100644
index 5137b07..0000000
--- a/docs/systems.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<HTML>
-
-<TITLE>Supported Systems and Drivers</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Supported Systems and Drivers</H1>
-
-<p>
-Mesa was originally designed for Unix/X11 systems and is still best
-supported on those systems. All you need is an ANSI C compiler and the
-X development environment to use Mesa.
-</p>
-
-<p>
-The DRI hardware drivers for the X.org server and XFree86 provide
-hardware accelerated rendering for chips from ATI, Intel, Matrox, 3dfx
-and others on Linux and FreeBSD.
-</p>
-
-<p>
-Drivers for other assorted platforms include:
-the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
-9x/NT, and Direct3D.
-</p>
-
-<p>
-Details about particular drivers follows:
-</p>
-
-<UL>
-<li><a href="http://dri.freedesktop.org/" target="_parent"> DRI hardware
-drivers</a> for the X Window System
-<LI><a href="xlibdriver.html">Xlib software driver</a> for the X Window System
-and Unix-like operating systems
-<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
-<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
-</UL>
-
-
-<h2>Deprecated Systems</h2>
-
-<p>
-These drivers have not been maintained and are being deprecated.
-They can be saved if someone steps up to help.
-</p>
-
-<UL>
-<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
-<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
-<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
-<LI>BeOS <A HREF="README.BEOS">(README.BEOS)</A>
-<LI>Direct3D driver <A HREF="README.D3D">(README.D3D)</A>
-<LI>DJGPP <A HREF="README.DJ">(README.DJ)</A>
-<LI>LynxOS <A HREF="README.LYNXOS">(README.LYNXOS)</A>
-<LI>Mingw32 <A HREF="README.MINGW32">(README.MINGW32)</A>
-<LI>NeXT <A HREF="README.NeXT">(README.NeXT)</A>
-<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
-<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
-<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
-</UL>
-
-And for historical reference:
-<UL>
-<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
-</UL>
-
-</body>
-</html>
diff --git a/docs/thanks.html b/docs/thanks.html
deleted file mode 100644
index 2031788f..0000000
--- a/docs/thanks.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<HTML>
-
-<HEAD>
-<TITLE>Acknowledgements</TITLE>
-</HEAD>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Acknowledgments</H1>
-
-
-The following individuals and groups are to be acknowledged for their
-contributions to Mesa over the years.
-This list is far from complete and somewhat dated, unfortunately.
-
-
-<ul>
-<li>Early Mesa development was done while Brian was part of the
-<A HREF="http://www.ssec.wisc.edu/~billh/vis.html"
-target="_parent">SSEC Visualization Project</A> at the University of
-Wisconsin. He'd like to thank Bill Hibbard for letting him work on
-Mesa as part of that project.
-<br>
-<br>
-<li>John Carmack of id Software, Inc. funded Keith Whitwell in 1999 in
-order to optimize Mesa's vertex transformation module. This is a very
-substantial piece of work.
-<br>
-<br>
-<li>Precision Insight, Inc., VA Linux Systems, Inc., and most recently,
-Tungsten Graphics, Inc. have supported the ongoing development of Mesa.
-<br>
-<br>
-<li>The
-<A HREF="http://sourceforge.net/projects/mesa3d" target="_parent">Mesa</A>
-website is hosted by
-<A HREF="http://sourceforge.net" target="_parent">
-<IMG SRC="http://sourceforge.net/sflogo.php?group_id=3&type=1"
-WIDTH="88" HEIGHT="31" ALIGN="BOTTOM" ALT="Sourceforge.net" BORDER="0"></A>
-<br>
-<br>
-
-<li>The Mesa git repository is hosted by
-<a href="http://freedesktop.org/" target="_parent">freedesktop.org</a>.
-<br>
-<br>
-
-
-<li><a href="http://www.altsoftware.com/"
-target="_parent">alt.software</a> contributed the Direct3D driver.
-
-<li><b>Bernd Barsuhn</b> wrote the evaluator code for (splines,
-patches) in Mesa.
-
-<li><b>Bernhard Tschirren</b> wrote the Allegro DJGPP driver.
-
-<li><b>Bogdan Sikorski</b> wrote the GLU NURBS and polygon tessellator
-in Mesa.
-
-<li><b>Charlie Wallace</b> wrote the MS-DOS driver.
-
-<li><b>CJ Beyer</b> was the www.mesa3d.org webmaster.
-
-<li><b>Darren Abbott</b> provided the OS/2 driver.
-
-<li><b>David Bucciarelli</b> wrote and maintained the 3Dfx Glide
-driver. Thousands of Linux/Quake players thank David!
-
-<li><b>Gareth Hughes</b> wrote new GLU 1.2 Polygon Tessellation code
-(now superceded by SGI SI GLU).
-
-<li><b>Holger Waechtler</b> contributed AMD 3DNow! assembly code which
-accelerates vertex transformation in Mesa 3.1. Holger also implemented
-the GL_EXT_texture_env_combine extension.
-
-<li><b>Jeroen van der Zijp</b> and <b>Thorsten Ohl</b> contributed the
-Xt/Motif widget code.
-
-<li><b>John Stone</b> provided the multi-threading support in Mesa 3.0.
-
-<li><b>John Watson</b> assisted with web page design.
-
-<li><b>Josh Vanderhoof</b> contributed Intel x86 assembly code which
-accelerates vertex transformation in Mesa 3.x.
-
-<li><b>Jouk Jansen</b> contributed and continues to maintain the VMS
-support.
-
-<li><b>Karl Schultz</b> has been maintaining the Windows driver.
-
-<li><b>Keith Whitwell</b> has made extension contributions to Mesa
-since 1999.
-
-<li><b>Kendall Bennett</b> wrote the SciTech MGL driver.
-
-<li><b>Klaus Niederkrueger</b> contributed many improvements to Mesa's
-software rasterizer.
-
-<li><b>Mark Kilgard</b> contributed antialiased line improvements and
-several extensions.
-
-<li><b>Michael Pichler</b> contributed <em>many</em> bug fixes
-
-<li><b>Miklos Fazekas</b> wrote and maintains the Macintosh driver.
-
-<li><b>Pascal Thibaudeau</b> wrote the NeXT driver.
-
-<li><b>Pedro Vazquez</b> setup and maintains the Mesa Mailing list.
-
-<li><b>Randy Frank</b> contributed <em>many</em> bug fixes.
-
-<li><b>Stefan Zivkovic</b> wrote the Amiga driver.
-
-<li><b>Stephane Rehel</b> provided the Cygnus Win32 support
-
-<li><b>Ted Jump</b> maintained the
-makefiles and project files for Windows 95/98/NT compilation for some time.
-
-<li><b>Uwe Maurer</b> wrote the LibGGI driver for Mesa-3.0.
-
-<li><b>Victor Ng-Thow-Hing</b> wrote the Amiwin driver for the Amiga.
-
-</ul>
-
-<p>
-Apologies to anyone who's been omitted.
-Please send corrections and additions to Brian.
-</p>
-
-
-</BODY>
-</HTML>
diff --git a/docs/utilities.html b/docs/utilities.html
deleted file mode 100644
index 4693639..0000000
--- a/docs/utilities.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<HTML>
-
-<TITLE>Development Utilities</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Development Utilities</H1>
-
-<ul>
-
-<li>The Mesa distribution includes several utility routines in the
-progs/util/ directory
-
-<li>Allen Akin's <a href="http://glean.sourceforge.net/"
-target="_parent">glean</a> is a framework for OpenGL testing.
-
-<li><a href="http://developer.kde.org/~sewardj/"
-target="_parent">Valgrind</a> is a very useful tool for tracking down
-memory-related problems in your code.
-
-</ul>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/docs/utility.html b/docs/utility.html
deleted file mode 100644
index c7cad01..0000000
--- a/docs/utility.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<HTML>
-
-<TITLE>Utilities</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Utilities</H1>
-
-<ul>
-<li><a href="http://fsv.sourceforge.net/"
-	target="_parent">fsv</a> - 3D file system visualizer
-
-<li><a href="http://www.dgp.utoronto.ca/%7Emac/projects/glbiff.html"
-	target="_parent">glbiff</a> - GL version of xbiff
-
-<li><a href="http://glload.netpedia.net/" target="_parent">glload</a>
-	- CPU load meter
-
-<li><a href="http://www.scitechsoft.com/gldirect.html"
-	target="_parent">SciTech GLDirect</a> - Driver to run OpenGL
-	apps using Direct3D under Windows
-
-<li><a href="http://threedsia.sourceforge.net/"
-	target="_parent">3Dsia</a> - 3D user interface
-
-<li><a href="http://mesa3d.sourceforge.net/notfound.html">VRML Site
-Map</a> - 3D GUI
-
-<li><a href="http://www.vros.com/" target="_parent">VR/OS</a> - VR
-user interface
-
-<li><a href="http://wauug.erols.com/%7Ebagleyd/"
-target="_parent">xlockmore</a> - an X screen saver
-
-<li><a href="http://www.jwz.org/xscreensaver"
-target="_parent">xscreensaver</a> - X screen saver
-
-</ul>
-
-
-</body>
-</html>
diff --git a/docs/versions.html b/docs/versions.html
deleted file mode 100644
index 84b40fd..0000000
--- a/docs/versions.html
+++ /dev/null
@@ -1,1656 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Version History</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<body bgcolor="#eeeeee">
-
-<B>
-NOTE: Changes for Mesa 6.4 and later are documented in the corresponding
-<a href="relnotes.html">release notes</a> file.
-</B>
-
-
-<H1>Mesa Version History</H1>
-
-
-<H2>1.0 beta   February 1995</H2>
-<ul>
-<li>Initial release
-</ul>
-
-<H2>1.1 beta   March 4, 1995</H2>
-Changes:
-<ul>
-<li>faster point and line drawing (2x faster)
-<li>more systems supported, better Makefiles
-<li>Renamed lib*.a files to avoid collisions
-<li>many small bug fixes
-</ul>
-New:
-<ul>
-<li>pseudo-GLX functions added
-<li>new implementation of evaluators (eval2.c)
-<li>GLUT support
-</ul>
-
-<H2>1.1.1 beta   March 7, 1995</H2>
-Changes:
-<ul>
-<li>Reverted from eval2.c to eval.c due to FPE on Linux
-<li>more speed improvements
-<li>more Makefile changes
-</ul>
-
-<H2>1.1.2 beta   March 14, 1995</H2>
-New:
-<ul>
-<li>implementation of SGI's blending extensions
-<li>glXUseXFont implemented
-<li>added MESA_DEBUG environment variable support
-</ul>
-Changes:
-<ul>
-<li>Using eval2.c again
-<li>more FPE-prevention checks (0-length normals are OK)
-<li>a few small bug fixes
-<li>much faster pixel logic ops!
-<li>faster transformation arithmetic
-</ul>
-
-<H2>1.1.3 beta   March 31, 1995</H2>
-New:
-<ul>
-<li>gluScaleImage() and gluBuild2DMipMaps() implemented
-<li>Mesa widgets for Xt/Motif
-<li>blendEXT demos
-<li>added environment variables for selecting visuals
-</ul>
-Changes:
-<ul>
-<li>almost all GLUT demos work correctly now
-<li>faster X device driver functions
-<li>more bug fixes
-</ul>
-
-<H2>1.1.4 beta   April 20, 1995</H2>
-Bug fixes:
-<ul>
-<li>missing #define SEEK_SET in src-tk/image.c
-<li>compile glShadeModel into display lists
-<li>fixed pow() domain error in src/light.c
-<li>fixed "flickering bitmaps" in double buffer mode
-<li>fixed tk.h and aux.h for C++
-<li>state of LIGHT_MODEL_LOCAL_VIEWER was inverted
-</ul>
-New features:
-<ul>
-<li>MUCH, MUCH nicer dithering in 8-bit RGB mode
-<li>updated widgets and widget demos
-<li>Implemented GLXPixmap functions
-<li>Added GLU 1.1 and GLX 1.1 functions
-<li>Changed the X/Mesa interface API, more versatile
-<li>Implemented gluPartialDisk()
-</ul>
-
-<H2>1.2   May 22, 1995</H2>
-Bug fixes:
-<ul>
-<li>IRIX 4.x makefile problem
-<li>modified tk to share root colormap as needed
-<li>gluLookAt normalization problem
-<li>suppress Expose, NoExpose events in swapbuffers
-<li>glBitmap() and glDrawPixels() clipping
-</ul>
-New features:
-<ul>
-<li>GL_BLEND, GL_MODULATE, GL_DECAL, and GL_REPLACE_EXT texture
-	    modes implemented
-<li>texture maps stored more efficiently
-<li>texture maps can be compiled into display lists
-<li>Bogdan Sikorski's GLU polygon tesselation code
-<li>Linas Vepstas's sweep and extrusion library
-<li>glXCreateContext()'s shareList parameter works as it's supposed to.
-	XMesaCreateContext() updated to accept a shareList parameter too.
-<li>Mesa can be compiled with real OpenGL .h files
-<li>MESA_BACK_BUFFER environment variable
-<li>better GLX error checking
-</ul>
-
-<h2>1.2.1   June 22, 1995</h2>
-Bug fixes:
-<ul>
-<li>X/Mesa double buffer window resize crash
-<li>widgets now pass PointerMotion events
-<li>X/Mesa incorrect default clear color and drawing color
-<li>more robust X MIT-SHM support in X/Mesa
-<li>glTexImage( format=GL_LUMINANCE ) didn't work
-<li>GL_LINE mode polygons with line width > 1.0 could cause a crash
-<li>numerous feedback bugs
-<li>glReadPixels() from depth buffer was wrong
-<li>error prone depth and stencil buffer allocation
-New features:
-<li>Preliminary Microsoft Windows driver
-<li>Implemented a number of missing functions: glEvalCoord[12][df]v(),
-	glGet...(), etc.
-<li>Added a few missing symbols to gl.h and glu.h
-<li>Faster rendering of smooth-shaded, RGBA, depth-buffered polygons.
-<li>Faster rendering of lines when width=2.0
-<li>Stencil-related functions now work in display lists
-</ul>
-Changes:
-<ul>
-<li>renamed aux.h as glaux.h (MS-DOS names can't start with aux)
-<li>most filenames are in 8.3 format to accomodate MS-DOS
-<li>use GLubytes to store arrays of colors instead of GLints
-</ul>
-
-<h2>1.2.2   August 2, 1995</h2>
-New features:
-<ul>
-<li>texture mapped points and lines
-<li>NURBS! (but not 100% complete)
-<li>viewports may safely extend beyond window boundaries
-<li>MESA_PRIVATE_CMAP environment variable
-<li>Grayscale X display support
-<li>two new demos:  demos/gears.c and demos/shadow.c
-<li>MachTen for Macintosh configuration
-</ul>
-Bug fixes:
-<ul>
-<li>glGet*(GL_DEPTH_BITS) returned bytes, not bits
-<li>point, line, and bitmap rasterization suffered from roundoff errors
-<li>fixed a division by zero error in line clippping
-<li>occasional wrong default background color really fixed!
-<li>glDepthFunc(GL_ALWAYS) with glDepthMask(GL_FALSE) didn't work
-<li>gluBuild2DMipmaps malloc problem fixed
-<li>view volume clipping of smooth shaded lines resulted in bad colors
-</ul>
-Changes:
-<ul>
-<li>new visual selection method in glXChooseVisual()
-<li>improved GLU quadric functions
-<li>call XSync for glFinish and XFlush for glFlush
-<li>glVertex() calls now use a function pointer to avoid conditionals
-<li>removed contrib directory from Mesa tar file (available on ftp site)
-<li>AIX shared library support
-<li>Removed GLUenum type as it's not in OpenGL
-</ul>
-
-<h2>1.2.3   September 26, 1995</h2>
-New features:
-<ul>
-<li>Mesa header files now equivalent to SGI OpenGL headers
-<li>Support for HP's Color Recovery dithering displays
-<li>Faster vertex transformation
-<li>Faster raster operations into X windows under certain conditions
-<li>New configurations:  HP w/ shared libs, Ultrix w/ GCC, Data General
-<li>4-bit visuals now supported
-</ul>
-Bug fixes:
-<ul>
-<li>glScissor bug fixed
-<li>round-off errors in clipping lines against clip planes fixed
-<li>byte swapping between hosts and display servers implemented
-<li>glGetError() can be called without a current rendering context
-<li>problem with accidentally culled polygons is fixed
-<li>fixed some widget compilation problems
-</ul>
-
-<h2>1.2.4   November 17, 1995</h2>
-New features:
-<ul>
-<li>More speed improvements (lighting, fogging, polygon drawing)
-<li>Window system and OS-independent off-screen rendering
-<li>Preliminary Fortran bindings
-<li>glPolygonOffsetEXT implemented
-<li>glColorMask and glIndexMask now fully implemented
-<li>glPixelZoom implemented
-<li>display lists fully implemented
-<li>gamma correction
-<li>dithering in 8-bit TrueColor/DirectColor visuals
-</ul>
-Changes:
-<ul>
-<li>Improved device driver interface
-<li>tk.h renamed to gltk.h to avoid conflicts with Tcl's Tk
-<li>Dithering support moved from core into device driver
-</ul>
-Bug fixes:
-<ul>
-<li>glEnable/Disable( GL_LIGHTING ) didn't always take effect
-<li>glReadPixels byte swapping was broken
-<li>glMaterial with pname==GL_AMBIENT_AND_DIFFUSE was broken
-<li>duplicate glColor4b() prototype in GL/gl.h removed
-<li>stripes in wave -ci demo fixed
-<li>GL_LINEAR_MIPMAP_NEAREST had wrong value
-<li>bugs in HP Color Recovery support fixed
-<li>fixed bug when blending lines, points, bitmaps outside of window
-</ul>
-
-<h2>1.2.5   November 30, 1995</h2>
-New Features:
-<ul>
-<li>updated MS Windows driver
-<li>new implementation of StaticGray/GrayScale visual support
-</ul>
-Bug fixes:
-<ul>
-<li>pixelzooming with gamma correction or blending didn't work
-<li>HP color recovery visual wasn't being picked by glXChooseVisual
-<li>glClear didn't always observe glColorMask changes
-<li>olympic and offset demos didn't compile on some Suns
-<li>texcoord clamping wasn't correct
-<li>a polygon optimization introduced an occasional sampling problem
-</ul>
-
-<h2>1.2.6   January 26, 1996</h2>
-New Features:
-<ul>
-<li>faster line and polygon rendering under certain conditions.  See
-	  Performance Tips 9 and 10 in README
-<li>profiling
-<li>lighting is a bit faster
-<li>better perspective corrected texture mapping
-<li>Amiga AmiWin (X11) support
-<li>preliminary Linux SVGA driver
-Changes:
-<li>now using a 16-bit depth buffer, faster, smaller
-<li>GL_NORMALIZE is disabled by default
-</ul>
-Bug fixes:
-<ul>
-<li>projective texture mapping
-<li>fixed a memory leak in the context destroy function
-<li>GL_POLYGON with less than 3 vertices caused a crash
-<li>glGet*() returned wrong result for GL_INDEX_MODE
-<li>reading pixels from an unmapped X window caused a BadMatch error
-</ul>
-
-<h2>1.2.7   March 5, 1996</h2>
-New:
-<ul>
-<li>faster lighting
-<li>faster 16-bit TrueColor rendering on Linux
-<li>faster 32-bit TrueColor rendering on Linux, HP, IBM
-<li>non-depth-buffered XImage polygons are faster
-<li>vertex array extension
-<li>software alpha planes
-<li>updated Macintosh driver
-<li>new NeXT driver
-<li>GLU quadric functions generate texture coordinates
-<li>reflect.c demo - reflective, textured surface demo
-</ul>
-Changes:
-<ul>
-<li>gamma correction code moved into the X driver for better performance
-</ul>
-Bug fixes:
-<ul>
-<li>multiple glClipPlane()'s didn't work reliably
-<li>glPolygonMode() didn't always work
-<li>glCullFace( GL_FRONT_AND_BACK ) didn't work
-<li>texture mapping with gamma correction was buggy
-<li>floating point exceptions in texture coordinate interpolation
-<li>XImage byte swapping didn't always work
-<li>polygon edge flags weren't always used correctly
-</ul>
-
-<h2>1.2.8   May 22, 1996</h2>
-New:
-<ul>
-<li>overlay planes on X servers with the SERVER_OVERLAY_VISUALS property
-<li>better monochrome output
-<li>more IRIX 6.x configurations
-<li>more robust RGB mode color allocation
-<li>added MESA_XSYNC environment variable
-<li>GLX_MESA_pixmap_colormap and GLX_EXT_visual_info extensions
-<li>GL_MESA_window_pos extension
-<li>faster glReadPixels/glDrawPixels for GL_DEPTH and GL_UNSIGNED_SHORT
-	and GL_UNSIGNED_INT
-<li>driver for prototype Cirrus Mondello 3-D board
-<li>updated AmigaDOS driver
-<li>a few small speed optimizations in polygon rendering
-</ul>
-Changes:
-<ul>
-<li>internal device driver interface modified to simplify device
-	  driver implementations and to support hardware Z buffers
-<li>several changes to the X/Mesa interface (xmesa.h)
-</ul>
-Bug fixes:
-<ul>
-<li>fixed pow(0,0) domain error triggered on some systems
-<li>glStencilClear() in a display list caused an infinite loop
-<li>glRasterPos*() was sometimes off by +/-0.5 in X and Y
-<li>color masking and blending were performed in wrong order
-<li>auxSolidCylinder() sometimes drew a wire-frame cylinder
-<li>fixed file writing bug in osdemo.c
-<li>pixel mapping didn't always work
-<li>the GL_GEQUAL stencil func didn't work
-<li>the GL_INVERT stencil op didn't work
-<li>the stencil write mask didn't work
-<li>glPush/PopAttrib() didn't do enough error checking
-<li>glIsList() didn't always work correctly
-</ul>
-
-<h2>2.0  October 10, 1996</h2>
-New:
-<ul>
-<li>Implements OpenGL 1.1 API functions
-<li>all texture filtering modes supported (mipmapping)
-<li>faster texture mapping, see Performance Tip 11 in README
-<li>antialiased RGB points
-<li>X support for line and polygon stippling
-<li>glDrawBuffer( GL_FRONT_AND_BACK ) works
-<li>util/ directory of useful stuff
-<li>demos/texobj demo of texture objects
-</ul>
-Changes:
-<ul>
-<li>major internal changes for thread-safeness
-<li>new device driver interface
-<li>MESA_ALPHA env variable removed
-<li>triangle rasterizer replaces polygon rasterizer
-</ul>
-Bug fixes:
-<ul>
-<li>glPopAttrib() bug
-<li>glDrawBuffer(GL_NONE) works now
-</ul>
-
-<h2>2.1  December 14, 1996</h2>
-New:
-<ul>
-<li>VMS support
-<li>MS-DOS driver
-<li>OpenStep support
-<li>updated, combined Windows 95/NT driver
-<li>implemented glGetLighti() and glGetTexGen*()
-<li>GLX does garbage collection of ancillary buffers
-</ul>
-Bug fixes:
-<ul>
-<li>removed unused _EXT constants from gl.h
-<li>fixed polygon offset bugs
-<li>Z coordinates of clipped lines were incorrect
-<li>glEdgeFlag() in display lists didn't always work
-<li>glLight*() in display lists didn't work
-<li>fixed X line stipple bugs (Michael Pichler)
-<li>glXUseXfonts XFreeFont/XFreeFontInfo bug fixed
-<li>fixed a feedback bug
-<li>glTexGen*() now transforms GL_EYE_PLANE by inverse modelview matrix
-<li>polygons were sometimes culled instead of clipped
-<li>triangle rasterizer suffered from float/int overflow exceptions
-<li>fixed FP underflow exception in lighting (specular exponent)
-<li>glEnable/glDisable of GL_EXT_vertex_array enums didn't work
-<li>fixed free(NULL) in GLU tesselator code
-<li>using 24-bit color on some X servers resulted in garbage rendering
-<li>32-bit per pixel mode for XFree86 now works
-<li>glRotate(a,0,0,0) gave unpredictable results
-<li>GL_LINE_STRIP with > 480 vertices had occasional clipping problems
-<li>8-bit TrueColor GLXPixmap rendering incorrectly required a colormap
-<li>glMaterial() wasn't ignored when GL_COLOR_MATERIAL was enabled
-<li>glEnable(GL_COLOR_MATERIAL) followed by glColor() didn't work right
-<li>accumulation buffer was limited to positive values
-<li>projective textures didn't work
-<li>selection buffer overflows weren't handled correctly
-</ul>
-Changes:
-<ul>
-<li>restored the GL_EXT_polygon_offset extension
-<li>slightly faster RGB dithering
-<li>the SVGA driver works again
-<li>Amiga driver now distributed separately
-<li>NeXT driver updated for Mesa 2.x
-</ul>
-
-<h2>2.2  March 14, 1997</h2>
-New:
-<ul>
-<li>better color selection when dithering
-<li>added GL_EXT_texture_object extension
-<li>updated MS-DOS driver for DJGPP
-<li>added openbsd make configuration
-<li>faster dithered flat-shaded triangles
-<li>various compilation problems with Motif widgets fixed
-<li>gl.h, glx.h and glu.h name mangling option
-<li>BeOS driver
-<li>3D texture mapping extension
-<li>GL_MESA_resize_buffers extension
-<li>morph3d, stex3d and spectex demos
-<li>3Dfx support
-</ul>
-Bug fixes:
-<ul>
-<li>glColorMaterial should finally work right in all respects
-<li>linear interpolation of mipmap levels was incorrectly weighted
-<li>readpix.c didn't compile on Macintosh
-<li>GL_INVERT and related logic ops didn't work right
-<li>glTexImage[12]D() didn't check its parameters consistantly
-<li>fixed a memory leak in glTexImage[12]D()
-<li>kludged around a SunOS 5.x/GCC compiler bug in the feedback code
-<li>glReadPixels aborted instead of normally catching some errors
-<li>a few 1.1 constants were missing or misnamed in gl.h
-<li>glBegin(p); glBegin(q); didn't generate an error
-<li>fixed a memory leak in GLX code
-<li>clipping of concave polygons could cause a core dump
-<li>1-component alpha texture maps didn't work
-<li>fixed a GLU polygon tesselator bug
-<li>polygons with colinear vertices were sometimes culled
-<li>feedback triangle colors were wrong when using smooth shading
-<li>textures with borders didn't work correctly
-<li>colors returned in feedback mode were wrong when using lighting
-<li>spotlights didn't effect ambient lighting correctly
-<li>gluPartialDisk() had a few bugs
-</ul>
-Changes:
-<ul>
-<li>device driver interface expanded to support texture mapping
-<li>faster matrix inversion subroutine
-<li>commented out #include "wmesa_extend.h" from src/wmesa.c
-<li>fixed many compiler warnings in the demo programs
-</ul>
-
-<h2>2.3  June 30, 1997</h2>
-New:
-<ul>
-<li>Mesa distribution divided into two pieces:  library code and demos
-<li>faster vertex transformation, clip testing, lighting
-<li>faster line drawing
-<li>TrueColor visuals how have dithering (for depths < 24 bits)
-<li>added MESA_NO_DITHER environment variable
-<li>new device driver function: NearFar(), RenderVB(), RasterSetup()
-<li>added LynxOS configuration
-<li>added cygnus Win32 configuration
-<li>added texcyl.c GLUT demo
-<li>added XMesaDitherColor() to X/Mesa interface
-<li>new NURBS code from Bogdan Sikorski
-<li>added demos/shape.c (non-rectangular X window!)
-</ul>
-Bug fixes:
-<ul>
-<li>glEnable/DisableClientState() were missing from GL/gl.h
-<li>GL_SPHERE_MAP texcoord generation didn't work correctly
-<li>glXGetConfig() returned wrong number of depth, stencil, accum bits
-<li>glDrawPixels feedback/selection didn't examine RasterPos valid bit
-<li>black and white were reversed on some monochrome displays
-<li>fixed potential image memory leak (wasn't setting reference counter)
-<li>glDrawPixels sometimes didn't recognize some GL state changes
-<li>gluProject/UnProject() didn't check for divide by zero
-<li>stex3d demo called random() and srandom(), not portable
-<li>fixed memory leaks in context.c and drawpix.c
-<li>fixed NULL dereferencing problem in gl_update_texture_state()
-<li>glReadPixels between glBegin/glEnd didn't generate an error.
-<li>fixed memory leak in polygon tesselator (Randy Frank)
-<li>fixed seg fault bug drawing flat-shaded, depth-tested lines
-<li>clipped GL_TRIANGLE_STRIPs sometimes had wrong color when flat-shaded
-<li>glBindTexture sometimes didn't work
-<li>fixed a bug deep in glXReleaseBuffersMESA()
-<li>fog was mistakenly applied to alpha
-<li>glPopMatrix didn't set "dirty matrix" flag
-<li>glPolygonStipple pattern was sometimes wrong
-<li>glClear wasn't disabled during feedback and selection
-<li>fixed memory leak in glTexSubImage[123]D
-</ul>
-Changes:
-<ul>
-<li>many library source files reorganized
-<li>faster X color allocation, colors also freed when finished with them
-<li>new texture sampling function pointer in texture objects
-<li>incorporated 3Dfx VooDoo driver v0.16 into main source tree
-<li>many 3Dfx driver updates
-<li>cygnus Makefiles now included
-<li>updated DOS driver
-<li>made a few changes to dosmesa.c and wmesa.c (VB->Unclipped)
-<li>internally, colors now stored in GLubytes, not GLfixed
-<li>optimized changing of GL_SHININESS parameter
-</ul>
-
-<h2>2.4  September 18, 1997</h2>
-New:
-<ul>
-<li>updated 3Dfx Glide driver
-<li>hacks for 3Dfx rendering into an X window or fullscreen
-<li>added depth buffer access functions to X/Mesa and OS/Mesa interfaces
-</ul>
-Bug fixes:
-<ul>
-<li>pixel buffer could overflow with long, wide lines
-<li>fixed FP underflow problems in lighting
-<li>glTexSubImage1D() had an unitialized variable
-<li>incomplete texture objects could cause a segfault
-<li>glDrawPixels with GL_COMPILE_AND_EXECUTE caused infinite loop
-<li>flat-shaded quads in a strip were miscolored if clipped
-<li>mipmapped triangle lod computation now works correctly
-<li>fixed a few under/overflow bugs in triangle rasterizer
-<li>glArrayElement() assigned bad normal if normal array disabled
-<li>changed argument to glXReleaseBuffersMESA()
-<li>fixed small triangle underflow bugs in tritemp.h (hopefully)
-<li>glBindTexture(target, 0) caused a crash
-<li>glTexImage[123]D() with NULL image pointer caused crash
-<li>glPixelStore parameters are now ignored during display list execution
-<li>fixed a two-sided lighting w/ clipping bug (black vertices)
-<li>textures with width!=height were sometimes mis-rendered
-<li>"weird" projection matrices could cause div by 0, other fp errors
-</ul>
-Changes:
-<ul>
-<li>changed precompiled header symbol from PCH to PC_HEADER
-<li>split api.c into api1.c and api2.c
-<li>added hash.c source file (but not used yet)
-<li>a few Sun and HP configuration file changes
-<li>MESA_GLX_FX env var replaces MESA_FX_WINDOW and MESA_FX_FULLSCREEN
-<li>fixed a few cygnus build problems (src/Makefile.cygnus, src/wmesa.c)
-</ul>
-
-<h2>2.5  November 20, 1997</h2>
-New:
-<ul>
-<li>updated 3Dfx driver (v20) for GLQuake
-<li>added GL_EXT_paletted_texture extension
-<li>added GL_EXT_shared_texture_palette extension
-<li>added GL_EXT_point_parameters extension
-<li>now including Mark Kilgard's GLUT library v3.6
-<li>new GLUT-based demos in gdemos/
-<li>added a few more Unix config targets
-<li>added Intel X86 assembly language vertex transformation code
-<li>3Dfx/Glide driver for Mesa now recognizes SST_SCREENREFRESH env var
-<li>Windows 95 S3 Virge driver
-</ul>
-Bug fixes:
-<ul>
-<li>glCopyTexImage?D would crash due to uninitialized variable
-<li>glColor w/ glColorMaterial in a display list caused a bug
-<li>fixed several glDrawPixels() and ReadPixels() bugs in 3Dfx driver
-<li>glVertex4*() vertices weren't always projected correctly
-<li>trying to use mipmapped textured points or lines caused crash
-<li>glColor[34][fd]() values now clamped to [0,1] before int conversion
-</ul>
-Changes:
-<ul>
-<li>new device driver functions for texture mapping
-<li>hash tables used for display list and texture object lookup
-<li>fixed GLX visual handling code to avoid saving redundant visuals
-<li>3Dfx Glide libraries automatically linked to libMesaGL.so
-<li>dropped the Cirrus Logic Mondello code since it's obsolete
-<li>updated Cygnus Makefiles (Stephane Rehel)
-<li>updated Windows MSVC++ Makefiles (Oleg Letsinsky)
-<li>procedure for making library files has changed: scripts now take
-	a major and minor version arguments.  Make-config changed a lot.
-<li>new implementation of glTexSubImage2D()
-<li>updated widgets-mesa directory to create libMesaGLwM.a (Motif widget)
-<li>separate linux-glide and linux-386-glide configurations
-</ul>
-
-<h2>2.6  February 12, 1998</h2>
-New:
-<ul>
-<li>Windows WGL functions
-<li>updated VMS, DOS, Windows, Cygnus, BeOS, Amiga compilation support
-<li>v0.22 of 3Dfx Glide driver
-<li>more X86 assembly language optimizations
-<li>faster blending for some modes
-<li>XMesaSetFXmode() to switch between 3Dfx window and full-screen mode 
-<li>added preliminary thread support
-<li>added GLX_MESA_copy_sub_buffer extension
-<li>some clipping optimizations
-</ul>
-Bug fixes:
-<ul>
-<li>fixed shading/material bug when drawing long primitive strips
-<li>fixed clipping problem in long primitive strips
-<li>fixed clipping bug when using 3Dfx driver
-<li>fixed a problem when trying to use X fonts w/ 3Dfx driver
-<li>fixed a texture filter bug in 3Dfx/Glide driver
-<li>fixed bug in 3Dfx/Glide driver involving depth mask & clearing
-<li>glLoadMatrix to set projection matrix confused the 3Dfx driver
-<li>non-identity texture matrices didn't work with linux-386 configs
-<li>glGenTextures() didn't reserve the returned texture IDs
-<li>NULL proxy image sent to glTexImageXD() caused crash
-<li>added texture state validation optimization (Henk Kok)
-<li>fixed colormap reuse problem when using both RGB and CI windows
-<li>32bpp True/DirectColor X visuals weren't recognized
-<li>fixed potential problem in evaluators memory allocation
-<li>fixed assorted demo compilation bugs
-</ul>
-Changes:
-<ul>
-<li>replaced old Mesa/windows/ directory with Mesa/WIN32/ directory
-<li>converted a few old glaux/gltk demos to GLUT
-<li>renamed directories:  demos -> xdemos,  gdemos -> demos
-</ul>
-
-
-<h2>3.0  September 17, 1998</h2>
-New:
-<ul>
-<li>OpenGL 1.2 API
-<li>GL_EXT_abgr pixel format extension
-<li>GL_SGIS_texture_edge_clamp extension
-<li>GL_SGIS_multitexture extension (to be replaced by GL_ARB_multitex)
-<li>GL_EXT_multitexture extension (to be replaced by GL_ARB_multitex)
-<li>GL_EXT_rescale_normal extension and renormal.c demo
-<li>GLX_SGI_video_sync extension (a no-op)
-<li>antialiased lines
-<li>glGetTexImage() now implemented
-<li>glDraw/Copy/ReadPixels() optimizations
-<li>optimized textured triangle code (Marten Stromberg)
-<li>more optimization of dithered TrueColor triangles in X driver
-<li>Linux GGI driver
-<li>updated MGL driver
-</ul>
-Bug fixes:
-<ul>
-<li>lots of assorted compilation fixes
-<li>glInitNames didn't write initial hit record
-<li>glBitmap didn't always check for invalid raster position
-<li>switching between GLX and OSMesa contexts caused a crash
-<li>fixed uninitialized variable in Mesa widget code
-<li>fixed typo in texture code which caused book/texgen to crash
-<li>fixed texture sampling bug when filter=GL_LINEAR and wrap=GL_CLAMP
-<li>gluDisk() in POINT or LINE mode sometimes failed
-<li>fixed texture + fog bug
-<li>GL_COMPILE_AND_EXECUTE mode didn't work reliably
-<li>glMultMatrix in projection matrix mode w/ 3Dfx driver could fail
-<li>glDrawPixels(color index pixels) weren't converted to RGBA
-<li>fixed possible getenv() buffer overflow security bug
-<li>glBitmap in feedback mode was offset by xOrig, yOrig params
-<li>device driver's DrawPixels hook was never used
-<li>glDrawPixels with zoomY!=1 and top/bottom clipping didn't work
-<li>glDrawPixels optimized for GL_LUMINANCE, GL_LUMINANCE_ALPHA, GLubyte
-<li>fixed MakeCurrent bug in GLwRedrawObjects() in MesaWorkstation.c
-<li>glCopyTexSubImage2D() didn't work with 3Dfx driver
-<li>lines with width = 2 could cause crash
-<li>glClear with scissor rect sometimes cleared whole buffer
-<li>glTexSubImage2D( .. GL_COLOR_INDEX .. ) didn't work
-<li>glTexImageXD( .. GL_ABGR_EXT .. ) didn't work
-<li>computation of inverse modelview matrix sometimes failed
-<li>fixed GL_CLAMP mode texture sampling bug
-<li>textured line interpolation was somewhat broken
-<li>textured triangle interpolation was also somewhat broken
-<li>glGet(MODELVIEW/PROJECTION/TEXTURE_MATRIX_STACK_DEPTH) off by one
-<li>evaluator state wasn't fully initialized
-<li>texture coordinate clipping was buggy
-<li>evaluator surfaces could be mis-colored
-<li>glAccum(GL_RETURN, s) didn't obey glColorMask() settings
-<li>zero area polygons shouldn't be culled if polygon mode is point/line
-<li>clipped width and height of glReadPixels was sometimes off by one
-<li>blending with alpha = 0 or 1.0 wasn't always exact
-<li>reading of pixels from clipped region was buggy
-<li>minor tweaking of X visual management in GLX emulator
-<li>glPolygonStipple now obeys pixel unpacking parameters
-<li>glGetPolygonStipple now obeys pixel packing parameters
-<li>interleaved vertex array texture coordinates were broken
-<li>query of proxy texture internal format was broken
-<li>alpha channel wasn't reliably cleared
-<li>fixed divide by zero error in gluScaleImage if dest size = 1 x 1
-</ul>
-Conformance bug fixes:
-<ul>
-<li>GL_SELECTION_BUFFER_POINTER and GL_SELECTION_BUFFER_SIZE were missing
-<li>GL_TEXTURE_INTERNAL_FORMAT was missing
-<li>glGet*(GL_POLYGON_STIPPLE) was broken
-<li>glPush/PopAttrib() didn't save/restore all texture state
-<li>glBitmap in feedback mode didn't work
-<li>feedback of texture coords didn't always work
-<li>glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLbyte was broke
-<li>glDrawPixels w/ format=GL_DEPTH_COMPONENT, type=GLubyte was broke
-<li>glDrawPixels w/ format=GL_STENCIL_INDEX, type=GL_BITMAP was broke
-</ul>
-Changes:
-<ul>
-<li>upgraded GLUT to version 3.7
-<li>only GL and GLU library code included in MesaLib.tar.gz
-<li>GLUT and all demos now in MesaDemos.tar.gz
-<li>glaux and gltk libraries removed
-<li>IRIX -n32 and -64 libs go in lib32/ and lib64/ directories
-</ul>
-
-
-<h2>3.1 beta 1  November 19, 1998</h2>
-New:
-<ul>
-<li>GL_EXT_stencil_wrap extension
-<li>GL_INGR_blend_func_separate extension
-<li>GL_ARB_multitexture extension
-<li>GL_NV_texgen_reflection extension
-<li>newly optimized vertex transformation code
-<li>updated GLUT 3.7 code
-<li>better precision when using 32-bit Z buffer
-<li>Allegro DJGPP driver
-</ul>
-Bug fixes:
-<ul>
-<li>glCopyPixels between front/back buffers didn't copy alpha correctly
-<li>fixed out-of-bounds memory access in optimized 2-D texture code
-<li>glPixelStorei didn't accept GL_PACK/UNPACK_IMAGE_HEIGHT parameter
-<li>glGet*() didn't accept GL_MAX_3D_TEXTURE_SIZE parameter
-<li>clipping of texture coordinates sometimes had bad R,Q values
-<li>GL_CLAMP_TO_EDGE texture sampling was off by 0.5 texels
-<li>glEdgeFlagPointer() now takes a GLvoid * instead of GLboolean *
-<li>texture was sometimes applied twice with 3Dfx driver
-<li>glPush/PopAttrib() fouled up texture object reference counts
-<li>glDeleteLists(0, n) caused assertion failure
-<li>bilinear texture sampling wasn't accurate enough
-<li>glClear w/ glDepthMask(GL_FALSE) didn't work right on 3Dfx
-<li>color components were reversed on big endian 32 bpp X visuals
-</ul>
-Changes:
-<ul>
-<li>removed GL_EXT_multitexture extension
-</ul>
-
-
-<h2>3.1 beta 2  May 24, 1999</h2>
-New:
-<ul>
-<li>multi-textured points and lines (mjk@nvidia.com)
-<li>optimized 24bpp X rendering (bernd.paysan@gmx.de)
-<li>added allegro support (bernie-t@geocities.com)
-<li>cleaned-up Windows-related stuff (Ted Jump)
-<li>minor stereo changes (KendallB@scitechsoft.com)
-<li>new BeOS driver which implements BGLView class
-<li>new Direct3D driver (see src/D3D)
-<li>more efficient filled gluCylinder() function
-<li>utilities:  util/showbuffer.[ch] and util/glstate.[ch]
-<li>fixed some IRIX compiler warnings
-<li>added support for building Mesa in XFree86 with
-	SGI's GLX (kevin@precisioninsight.com)
-</ul>
-Bug fixes:
-<ul>
-<li>a variety of Windows/Mesa bug fixes (mjk@nvidia.com)
-<li>packed pixel images weren't unpacked correctly
-<li>patches some win32 files in GLUT (mjk@nvidia.com)
-<li>glTexImage[123]D() didn't accept internalFormat == GL_COLOR_INDEX
-<li>fixed lighting bug in Keith's new shading code
-<li>fixed texture segfault seen in Lament screensaver
-<li>fixed miscellaneous low-memory bugs
-<li>glClear(GL_COLOR_BUFFER_BIT) with RGBA or CI masking was broken
-<li>GL_LINEAR sampling of 3D textures was broken
-<li>fixed SVR4 'cc' compiler macro problem (dawes@xfree86.org)
-<li>added GL_TEXTURE_PRIORITY fix (keithh@netcomuk.co.uk)
-<li>fixed wide point and wide line conformance bugs (brianp)
-</ul>
-Changes:
-<ul>
-<li>some device driver changes (see src/dd.h)
-<li>new copyright on core Mesa code
-</ul>
-
-
-<h2>3.1 beta 3  September 17, 1999</h2>
-New:
-<ul>
-<li>optimized glAccum function
-<li>optimized 24bpp rendering in XMesa driver
-<li>GLU 1.2 polygon tessellator
-</ul>
-Bug Fixes:
-<ul>
-<li>glGetTexLevelParameter wasn't fully implemented
-<li>glXUseXFont now handles multi-byte fonts
-<li>glIsEnabled(GL_TEXTURE_2D / 3D) returned wrong result
-<li>alpha channel of blending points, lines was sometimes incorrect
-</ul>
-Changes:
-<ul>
-<li>New library names:  "libGL" instead of "libMesaGL"
-<li>New library numbering: libGL.so.1.2.310
-<li>New subdirectories:  docs/ and bin/
-<li>New Makefile-system (autoconf,automake,libtool)
-</ul>
-
-
-<h2>3.1 final  December 14, 1999</h2>
-New:
-<ul>
-<li>added demos/gloss.c
-<li>added xdemos/glxdpyinfo.c
-<li>added GLX_ARB_get_proc_address extension
-<li>rewritten glTexImage code paths (faster, less memory, bug fixes)
-</ul>
-Bug Fixes:
-<ul>
-<li>several vertex array bug fixes
-<li>overlapping glCopyPixels with pixel zooming now works
-<li>glXUseXFont() bitmaps were vertically shifted by one pixel
-<li>glCopyPixels with pixel zooming now works
-</ul>
-
-
-<h2>3.2 final  April 24, 2000</h2>
-Bug fixes:
-<ul>
-<li>fixed memcpy bugs in span.c
-<li>fixed missing glEnd problem in demos/tessdemo.c
-<li>fixed bug when clearing 24bpp Ximages
-<li>fixed clipping problem found in Unreal Tournament
-<li>fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
-<li>fixed Loki's 3dfx RGB vs BGR bug
-<li>fixed Loki's 3dfx smooth/flat shading bug in SoF
-</ul>
-Changes:
-<ul>
-<li>updated docs/README file
-<li>use bcopy() optimizations on FreeBSD
-<li>re-enabled the optimized persp_textured_triangle() function
-</ul>
-
-
-<h2>3.2.1  July 19, 2000</h2>
-Bug fixes:
-<ul>
-<li>gluBuild2DMipmaps() didn't accept GL_BGRA
-<li>Fixed compile/makefile problems on IRIX
-<li>fixed segfault in 3dfx driver when using GL selection/feedback
-<li>no longer cull very, very tiny triangles
-<li>blending w/ drawbuffer==GL_FRONT_BACK caused segfault (sw rendering)
-<li>fixed Motif detection code in widgets-mesa/configure.in
-<li>glColorMaterial and glMaterial updates to emissive and ambient
-	  didn't always work right
-<li>Specular highlights weren't always in the right place
-<li>clipped GL_LINE mode polygons had interior lines appear
-<li>blend term GL_ONE_MINUS_CONSTANT_ALPHA was broken
-<li>GL_NICEST fog didn't always work with flat shading
-<li>glRect commands in display lists were sometimes miscolored
-<li>Line Z offset didn't always work
-<li>fixed texgen normal vector problem (gloss's teapot)
-<li>numerous GL conformance bugs fixed
-</ul>
-Changes:
-<ul>
-<li>glColorMask(false, false, false, false) handled better/faster
-<li>reverted to old GLU polygon tessellator, GLU 1.1
-<li>updated Win32 build files
-</ul>
-
-
-<h2>3.3  July 21, 2000</h2>
-New:
-<ul>
-<li>antialiased triangles now implemented
-<li>GL_EXT_texture_env_add texture mode extension
-<li>GLX 1.3 API
-<li>support for separate draw/read buffers (ie GL_SGI_make_current_read)
-<li>thread-safe API dispath
-<li>improved glxinfo program
-<li>demos/texdown program to measure texture download performance
-<li>glext.h header file
-<li>demos/geartrain program
-<li>GL_EXT_texture_lod_bias extension
-<li>demos/lodbias program
-<li>further optimized glRead/DrawPixels for 16-bit TrueColor X visuals
-<li>GLX_EXT_visual_rating extension (a no-op, however)
-<li>GL_HP_occlusion_test extension (for X and OS/Mesa drivers)
-<li>demos/occlude program
-<li>GL_SGIS_pixel_texture and GL_SGIX_pixel_texture extensions
-<li>demos/pixeltex program
-<li>GL_SGI_color_matrix extension
-<li>GL_SGI_color_table extension
-<li>GL_EXT_histogram extension
-<li>GL_ARB_texture_cube_map extension
-<li>added xdemos/glxheads and xdemos/manywin
-<li>demos/texenv.c demo
-<li>GL_EXT_texture_env_combine extension (by Holger Waechtler)
-<li>Xlib driver is now thread-safe (see xdemos/glthreads)
-<ul>
-Bug Fixes:
-</ul>
-<li>various GL conformance failures fixed since 3.2.1
-</ul>
-Changes:
-<ul>
-<li>gl.h now uses #defines instead of C enums for all tokens
-<li>glu.h now uses #defines instead of C enums for all tokens
-<li>moved programs from 3Dfx/demos/ into demos/ directory
-</ul>
-
-
-<h2>3.4  November 3, 2000</h2>
-New:
-<ul>
-<li>optimized glDrawPixels for glPixelZoom(1,-1)
-Bug Fixes:
-<li>widgets-mesa/src/*.c files were missing from 3.3 distro
-<li>include/GL/mesa_wgl.h file was missing from 3.3 distro
-<li>fixed some Win32 compile problems
-<li>texture object priorities weren't getting initialized to 1.0
-<li>glAreTexturesResident return value was wrong when using hardware
-<li>glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
-<li>glReadPixels with GLushort packed types was broken
-<li>fixed a few bugs in the GL_EXT_texture_env_combine texture code
-<li>glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
-<li>fixed some typos/bugs in the VB code
-<li>glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
-<li>optimized glDrawPixels paths weren't being used
-<li>per-fragment fog calculation didn't work without a Z buffer
-<li>improved blending accuracy, fixes Glean blendFunc test failures
-<li>glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
-<li>glXGetProcAddressARB() didn't always return the right address
-<li>gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
-<li>texture matrix changes weren't always detected (GLUT projtex demo)
-<li>fixed random color problem in vertex fog code
-<li>fixed Glide-related bug that let Quake get a 24-bit Z buffer
-<ul>
-Changes:
-</ul>
-<li>finished internal support for compressed textures for DRI
-</ul>
-
-
-<h2>3.4.1  February 14, 2001</h2>
-New:
-<ul>
-<li>fixed some Linux build problems
-<li>fixed some Windows build problems
-<li>GL_EXT_texture_env_dot3 extension (Gareth Hughes)
-</ul>
-Bug fixes:
-<ul>
-<li>added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
-<li>various state-update code changes needed for DRI bugs
-<li>disabled pixel transfer ops in glColorTable commands, not needed
-<li>fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
-<li>updated sources and fixed compile problems in widgets-mesa/
-<li>GLX_PBUFFER enum value was wrong in glx.h
-<li>fixed a glColorMaterial lighting bug
-<li>fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
-<li>glXCopySubBufferMESA() Y position was off by one
-<li>Error checking of glTexSubImage3D() was broken (bug 128775)
-<li>glPopAttrib() didn't restore all derived Mesa state correctly
-<li>Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
-	  conformance problems at 16bpp.
-<li>clearing depth buffer with scissoring was broken, would segfault
-<li>OSMesaGetDepthBuffer() returned bad bytesPerValue value
-<li>fixed a line clipping bug (reported by Craig McDaniel)
-<li>fixed RGB color over/underflow bug for very tiny triangles
-</ul>
-Known problems:
-<ul>
-<li>NURBS or evaluator surfaces inside display lists don't always work
-</ul>
-
-
-<h2>3.4.2  May 17, 2001</h2>
-Bug fixes:
-<ul>
-<li>deleting the currently bound texture could cause bad problems
-<li>using fog could result in random vertex alpha values
-<li>AA triangle rendering could touch pixels outside right window bound
-<li>fixed byteswapping problem in clear_32bit_ximage() function
-<li>fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
-<li>fixed memory leak in glXUseXFont()
-<li>fragment sampling in AA triangle function was off by 1/2 pixel
-<li>Windows: reading pixels from framebuffer didn't always work
-<li>glConvolutionFilter2D could segfault or cause FP exception
-<li>fixed segfaults in FX and X drivers when using tex unit 1 but not 0
-<li>GL_NAND logicop didn't work right in RGBA mode
-<li>fixed a memory corruption bug in vertex buffer reset code
-<li>clearing the softwara alpha buffer with scissoring was broken
-<li>fixed a few color index mode fog bugs
-<li>fixed some bad assertions in color index mode
-<li>fixed FX line 'stipple' bug #420091
-<li>fixed stencil buffer clear width/height typo
-<li>fixed GL error glitches in gl[Client]ActiveTextureARB()
-<li>fixed Windows compilation problem in texutil.c
-<li>fixed 1/8-pixel AA triangle sampling error
-</ul>
-Changes:
-<ul>
-<li>optimized writing mono-colored pixel spans to X pixmaps
-<li>increased max viewport size to 2048 x 2048
-</ul>
-
-
-<h2>3.5  June 21, 2001</h2>
-New:
-<ul>
-<li>internals of Mesa divided into modular pieces (Keith Whitwell)
-<li>100% OpenGL 1.2 conformance (passes all conformance tests)
-<li>new AA line algorithm
-<li>GL_EXT_convolution extension
-<li>GL_ARB_imaging subset
-<li>OSMesaCreateContextExt() function
-<li>GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-<li>GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
-<li>GL_EXT_fog_coord extension (Keith Whitwell)
-<li>GL_EXT_secondary_color extension (Keith Whitwell)
-<li>GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
-<li>GL_SGIX_depth_texture extension
-<li>GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
-<li>demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
-<li>GL_ARB_texture_env_combine extension
-<li>GL_ARB_texture_env_dot3 extension
-<li>GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
-<li>OSMesaCreateContextExt() function
-<li>libOSMesa.so library, contains the OSMesa driver interface
-<li>GL/glxext.h header file for GLX extensions
-<li>somewhat faster software texturing, fogging, depth testing
-<li>all color-index conformance tests now pass (only 8bpp tested)
-<li>SPARC assembly language TCL optimizations (David Miller)
-<li>GL_SGIS_generate_mipmap extension
-</ul>
-Bug Fixes:
-<ul>
-<li>fbiRev and tmuRev were unitialized when using Glide3
-<li>fixed a few color index mode conformance failures; all pass now
-<li>now appling antialiasing coverage to alpha after texturing
-<li>colors weren't getting clamped to [0,1] before color table lookup
-<li>fixed RISC alignment errors caused by COPY_4UBV macro
-<li>drawing wide, flat-shaded lines could cause a segfault
-<li>vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
-</ul>
-Changes:
-<ul>
-<li>SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
-<li>new libOSMesa.so library, contains the OSMesa driver interface
-</ul>
-
-
-<h2>4.0  October 22, 2001</h2>
-New:
-<ul>
-<li>Mesa 4.0 implements the OpenGL 1.3 specification
-<li>GL_IBM_rasterpos_clip extension
-<li>GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
-<li>GL_ARB_texture_mirrored_repeat extension
-<li>WindML UGL driver (Stephane Raimbault)
-<li>added OSMESA_MAX_WIDTH/HEIGHT queries
-<li>attempted compiliation fixes for Solaris 5, 7 and 8
-<li>updated glext.h and glxext.h files
-<li>updated Windows driver (Karl Schultz)
-</ul>
-Bug fixes:
-<ul>
-<li>added some missing GLX 1.3 tokens to include/GL/glx.h
-<li>GL_COLOR_MATRIX changes weren't recognized by teximage functions
-<li>glCopyPixels with scale and bias was broken
-<li>glRasterPos with lighting could segfault
-<li>glDeleteTextures could leave a dangling pointer
-<li>Proxy textures for cube maps didn't work
-<li>fixed a number of 16-bit color channel bugs
-<li>fixed a few minor memory leaks
-<li>GLX context sharing was broken in 3.5
-<li>fixed state-update bugs in glPopClientAttrib()
-<li>fixed glDrawRangeElements() bug
-<li>fixed a glPush/PopAttrib() bug related to texture binding
-<li>flat-shaded, textured lines were broken
-<li>fixed a dangling pointer problem in the XMesa code (Chris Burghart)
-<li>lighting didn't always produce the correct alpha value
-<li>fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
-</ul>
-
-
-<h2>4.0.1 December 17, 2001</h2>
-New:
-<ul>
-<li>better sub-pixel sample positions for AA triangles (Ray Tice)
-<li>slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
-</ul>
-Bug fixes:
-<ul>
-<li>added missing break statements in glGet*() for multisample cases
-<li>fixed uninitialized hash table mutex bug (display lists / texobjs)
-<li>fixed bad teximage error check conditional (bug 476846)
-<li>fixed demos readtex.c compilation problem on Windows (Karl Schultz)
-<li>added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
-<li>silence some compiler warnings (gcc 2.96)
-<li>enable the #define GL_VERSION_1_3 in GL/gl.h
-<li>added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
-<li>fixed glu.h typedef problem found with MSDev 6.0
-<li>build libGL.so with -Bsymbolic (fixes bug found with Chromium)
-<li>added missing 'const' to glXGetContextIDEXT() in glxext.h
-<li>fixed a few glXGetProcAddress() errors (texture compression, etc)
-<li>fixed start index bug in compiled vertex arrays (Keith)
-<li>fixed compilation problems in src/SPARC/glapi_sparc.S
-<li>fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
-<li>use glXGetProcAddressARB in GLUT to avoid extension linking problems
-<li>provoking vertex of flat-shaded, color-index triangles was wrong
-<li>fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
-<li>glTexParameter didn't flush the vertex buffer (Ray Tice)
-<li>feedback attributes for glDraw/CopyPixels and glBitmap were wrong
-<li>fixed bug in normal length caching (ParaView lighting bug)
-<li>fixed separate_specular color bug found in Chimera (18 Dec 2001)
-</ul>
-
-
-<h2>4.0.2  April 2, 2002</h2>
-New:
-<ul>
-<li>New DOS (DJGPP) driver written by Daniel Borca
-<li>New driver interface functions for TCL drivers (such as Radeon DRI)
-<li>GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
-	  if using deep color channels
-<li>latest GL/glext.h and GL/glxext.h headers from SGI
-</ul>
-Bug fixes:
-<ul>
-<li>GL_BLEND with non-black texture env color wasn't always correct
-<li>GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
-<li>glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
-<li>glReadPixels was sometimes mistakenly clipped by the scissor box
-<li>glDraw/ReadPixels didn't catch all the errors that they should have
-<li>Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
-<li>16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
-<li>Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
-<li>glColorMask as sometimes effecting glXSwapBuffers()
-<li>fixed a potential bug in XMesaGarbageCollect()
-<li>N threads rendering into one window didn't work reliably
-<li>glCopyPixels didn't work for deep color channels
-<li>improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
-<li>glPopAttrib() didn't correctly restore user clip planes
-<li>user clip planes failed for some perspective projections (Chromium)
-</ul>
-Known bugs:
-<ul>
-<li>mipmap LOD computation
-</ul>
-
-
-<h2>4.0.3  June 25, 2002</h2>
-New:
-<ul>
-<li>updated GL/glext.h file (version 15)
-<li>corrected MMX blend code (Jose Fonseca)
-<li>support for software-based alpha planes in Windows driver
-<li>updated GGI driver (Filip Spacek)
-</ul>
-Bug fixes:
-<ul>
-<li>glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
-<li>OSMesaMakeCurrent() didn't recognize buffer size changes
-<li>assorted conformance fixes for 16-bit/channel rendering
-<li>texcombine alpha subtraction mode was broken
-<li>fixed lighting bug with non-uniform scaling and display lists
-<li>fixed bug when deleting shared display lists
-<li>disabled SPARC cliptest assembly code (Mesa bug 544665)
-<li>fixed a couple Solaris compilation/link problems
-<li>blending clipped glDrawPixels didn't always work
-<li>glGetTexImage() didn't accept packed pixel types
-<li>glPixelMapu[is]v() could explode given too large of pixelmap
-<li>glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
-<li>glXCopyContext() could lead to segfaults
-<li>glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
-</ul>
-Changes:
-<ul>
-<li>lots of C++ (g++) code clean-ups
-<li>lots of T&L updates for the Radeon DRI driver
-</ul>
-Known bugs:
-<ul>
-<li>mipmap LOD computation (fixed for Mesa 4.1)
-</ul>
-
-
-<h2>4.0.4  October 3, 2002</h2>
-New:
-<ul>
-<li>GL_NV_texture_rectangle extension
-<li>updated glext.h header (version 17)
-<li>updated DOS driver (Daniel Borca)
-<li>updated BeOS R5 driver (Philippe Houdoin)
-<li>added GL_IBM_texture_mirror_repeat
-<li>glxinfo now takes -l option to print interesting OpenGL limits info
-<li>GL_MESA_ycbcr_texture extension
-<li>GL_APPLE_client_storage extension (for some DRI drivers only)
-<li>GL_MESA_pack_invert extension
-</ul>
-Bug fixes:
-<ul>
-<li>fixed GL_LINEAR fog bug by adding clamping
-<li>fixed FP exceptions found using Alpha CPU
-<li>3dfx MESA_GLX_FX=window (render to window) didn't work
-<li>fixed memory leak in wglCreateContest (Karl Schultz)
-<li>define GLAPIENTRY and GLAPI if undefined in glu.h
-<li>wglGetProcAddress didn't handle all API functions
-<li>when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
-<li>removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
-<li>error checking in compressed tex image functions had some glitches
-<li>fixed AIX compile problem in src/config.c
-<li>glGetTexImage was using pixel unpacking instead of packing params
-<li>auto-mipmap generation for cube maps was incorrect
-</ul>
-Changes:
-<ul>
-<li>max texture units reduced to six to accomodate texture rectangles
-<li>removed unfinished GL_MESA_sprite_point extension code
-</ul>
-
-
-<h2>4.1  October 29, 2002</h2>
-New:
-<ul>
-<li>GL_NV_vertex_program extension
-<li>GL_NV_vertex_program1_1 extension
-<li>GL_ARB_window_pos extension
-<li>GL_ARB_depth_texture extension
-<li>GL_ARB_shadow extension
-<li>GL_ARB_shadow_ambient extension
-<li>GL_EXT_shadow_funcs extension
-<li>GL_ARB_point_parameters extension
-<li>GL_ARB_texture_env_crossbar
-<li>GL_NV_point_sprite extension
-<li>GL_NV_texture_rectangle extension
-<li>GL_EXT_multi_draw_arrays extension
-<li>GL_EXT_stencil_two_side extension
-<li>GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
-<li>GL_ATI_texture_mirror_once extension (Ian Romanick)
-<li>massive overhaul/simplification of software rasterizer module,
-	  many contributions from Klaus Niederkrueger
-<li>faster software texturing in some cases (i.e. trilinear filtering)
-<li>new OSMesaGetProcAddress() function
-<li>more blend modes implemented with MMX code (Jose Fonseca)
-<li>added glutGetProcAddress() to GLUT
-<li>added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
-<li>pbinfo and pbdemo PBuffer programs
-<li>glxinfo -v prints transprent pixel info (Gerd Sussner)
-</ul>
-Bug fixes:
-<ul>
-<li>better mipmap LOD computation (prevents excessive blurriness)
-<li>OSMesaMakeCurrent() didn't recognize buffer size changes
-<li>assorted conformance fixes for 16-bit/channel rendering
-<li>texcombine alpha subtraction mode was broken
-<li>fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
-<li>clamp colors to [0,inf] in OSMesa if GLchan==GLfloat (Gerk Huisma)
-<li>fixed divide by zero error in NURBS tessellator (Jon Perry)
-<li>fixed GL_LINEAR fog bug by adding clamping
-<li>fixed FP exceptions found using Alpha CPU
-<li>3dfx/glide driver render-to-window feature was broken
-<li>added missing GLX_TRANSPARENT_RGB token to glx.h
-<li>fixed error checking related to paletted textures
-<li>fixed reference count error in glDeleteTextures (Randy Fayan)
-</ul>
-Changes:
-<ul>
-<li>New spec file and Python code to generate some GL dispatch files
-<li>Glide driver defaults to "no" with autoconf/automake
-<li>updated demos/stex3d with new options
-</ul>
-
-
-<h2>5.0  November 13, 2002</h2>
-New:
-<ul>
-<li>OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
-<li>removed some overlooked debugging code
-<li>glxinfo updated to support GLX_ARB_multisample
-<li>GLUT now support GLX_ARB_multisample
-<li>updated DOS driver (Daniel Borca)
-</ul>
-Bug fixes:
-<ul>
-<li>GL_POINT and GL_LINE-mode polygons didn't obey cull state
-<li>fixed potential bug in _mesa_align_malloc/calloc()
-<li>fixed missing triangle bug when running vertex programs
-<li>fixed a few HPUX compilation problems
-<li>FX (Glide) driver didn't compile
-<li>setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
-<li>a few EXT functions, like glGenTexturesEXT, were no-ops
-<li>a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
-	  glMultiDrawArrays and glMultiDrawElements were missing
-<li>glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
-<li>Pentium 4 Mobile was mistakenly identified as having 3DNow!
-<li>fixed one-bit error in point/line fragment Z calculation
-<li>fixed potential segfault in fakeglx code
-<li>fixed color overflow problem in DOT3 texture env mode
-</ul>
-
-
-<h2>5.0.1  March 30, 2003</h2>
-New:
-<ul>
-<li>DOS driver updates from Daniel Borca
-<li>updated GL/gl_mangle.h file (Bill Hoffman)
-Bug fixes:
-<li>auto mipmap generation for cube maps was broken (bug 641363)
-<li>writing/clearing software alpha channels was unreliable
-<li>minor compilation fixes for OS/2 (Evgeny Kotsuba)
-<li>fixed some bad assertions found with shadowtex demo
-<li>fixed error checking bug in glCopyTexSubImage2D (bug 659020)
-<li>glRotate(angle, -x, 0, 0) was incorrect (bug 659677)
-<li>fixed potential segfault in texture object validation (bug 659012)
-<li>fixed some bogus code in _mesa_test_os_sse_exception_support (Linus)
-<li>fix fog stride bug in tnl code for h/w drivers (Michel Danzer)
-<li>fixed glActiveTexture / glMatrixMode(GL_TEXTURE) bug (#669080)
-<li>glGet(GL_CURRENT_SECONDARY_COLOR) should return 4 values, not 3
-<li>fixed compilation problem on Solaris7/x86 (bug 536406)
-<li>fixed prefetch bug in 3DNow! code (Felix Kuhling)
-<li>fixed NeXT build problem (FABSF macro)
-<li>glDrawPixels Z values when glPixelZoom!=1 were invalid (bug 687811)
-<li>zoomed glDraw/CopyPixels with clipping sometimes failed (bug 689964)
-<li>AA line and triangle Z values are now rounded, not truncated
-<li>fixed color interpolation bug when GLchan==GLfloat (bug 694461)
-<li>glArePrograms/TexturesResident() wasn't 100% correct (Jose Fonseca)
-<li>fixed a minor GL_COLOR_MATERIAL bug
-<li>NV vertex program EXP instruction was broken
-<li>glColorMask misbehaved with X window / pixmap rendering
-<li>fix autoconf/libtool GLU C++ linker problem on Linux (a total hack)
-<li>attempt to fix GGI compilation problem when MesaDemos not present
-<li>NV vertex program ARL-relative fetches didn't work
-</ul>
-Changes:
-<ul>
-<li>use glPolygonOffset in gloss demo to avoid z-fighting artifacts
-<li>updated winpos and pointblast demos to use ARB extensions
-<li>disable SPARC normal transformation code (bug 673938)
-<li>GLU fixes for OS/2 (Evgeny Kotsuba)
-</ul>
-
-
-<h2>5.0.2  September 5, 2003</h2>
-Bug fixes:
-<ul>
-<li>fixed texgen problem causing texcoord's Q to be zero (stex3d)
-<li>default GL_TEXTURE_COMPARE_MODE_ARB was wrong
-<li>GL_CURRENT_MATRIX_NV query was wrong
-<li>GL_CURRENT_MATRIX_STACK_DEPTH_NV query was off by one
-<li>GL_LIST_MODE query wasn't correct
-<li>GL_FOG_COORDINATE_SOURCE_EXT query wasn't supported
-<li>GL_SECONDARY_COLOR_ARRAY_SIZE_EXT query returned wrong value
-<li>blended, wide lines didn't always work correctly (bug 711595)
-<li>glVertexAttrib4svNV w component was always 1
-<li>fixed bug in GL_IBM_rasterpos_clip (missing return)
-<li>GL_DEPTH_TEXTURE_MODE = GL_ALPHA didn't work correctly
-<li>a few Solaris compilation fixes
-<li>fixed glClear() problem for DRI drivers (non-existant stencil, etc)
-<li>fixed int/REAL mixup in GLU NURBS curve evaluator (Eric Cazeaux)
-<li>fixed delete [] bug in SI GLU (bug 721765) (Diego Santa Cruz)
-<li>glFog() didn't clamp fog colors
-<li>fixed bad float/int conversion for GL_TEXTURE_PRIORITY in the
-	  gl[Get]TexParameteri[v] functions
-<li>fixed invalid memory references in glTexGen functions (bug 781602)
-<li>integer-valued color arrays weren't handled correctly
-<li>glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work
-<li>GL_EXT_texture_lod_bias is part of 1.4, overlooked in 5.0.1
-</ul>
-Changes:
-<ul>
-<li>build GLUT with -fexceptions so C++ apps propogate exceptions
-</ul>
-
-
-<h2>5.1  December 17, 2003</h2>
-New:
-<ul>
-<li>reorganized directory tree
-<li>GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
-<li>GL_ATI_texture_env_combine3 extension (Ian Romanick)
-<li>GL_SGI_texture_color_table extension (Eric Plante)
-<li>GL_NV_fragment_program extension
-<li>GL_NV_light_max_exponent extension
-<li>GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle)
-<li>GL_ARB_occlusion_query extension
-<li>GL_ARB_point_sprite extension
-<li>GL_ARB_texture_non_power_of_two extension
-<li>GL_IBM_multimode_draw_arrays extension
-<li>GL_EXT_texture_mirror_clamp extension (Ian Romanick)
-<li>GL_ARB_vertex_buffer_object extension
-<li>new X86 feature detection code (Petr Sebor)
-<li>less memory used for display lists and vertex buffers
-<li>demo of per-pixel lighting with a fragment program (demos/fplight.c)
-<li>new version (18) of glext.h header
-<li>new spriteblast.c demo of GL_ARB_point_sprite
-<li>faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
-<li>faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
-</ul>
-Bug fixes:
-<ul>
-<li>really enable OpenGL 1.4 features in DOS driver.
-<li>fixed issues in glDrawPixels and glCopyPixels for very wide images
-<li>glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint
-<li>fixed some texgen bugs reported by Daniel Borca
-<li>fixed wglMakeCurrent(NULL, NULL) bug (#835861)
-<li>fixed glTexSubImage3D z-offset bug (Cedric Gautier)
-<li>fixed RGBA blend enable bug (Ville Syrjala)
-<li>glAccum is supposed to be a no-op in selection/feedback mode
-<li>fixed texgen bug #597589 (John Popplewell)
-</ul>
-Changes:
-<ul>
-<li>dropped API trace feature (src/Trace/)
-<li>documentation overhaul.  merged with website content.  more html.
-<li>glxgears.c demo updated to use GLX swap rate extensions
-<li>glTexImage1/2/3D now allows width/height/depth = 0
-<li>disable SPARC asm code on Linux (bug 852204)
-</ul>
-
-
-<h2>6.0  January 16, 2004</h2>
-New:
-<ul>
-<li>full OpenGL 1.5 support
-<li>updated GL/glext.h file to version 21
-Changes:
-<li>changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h)
-Bug fixes:
-<li>fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color
-	  clamping issue
-<li>updated suno5-gcc configs
-<li>glColor3 functions sometimes resulted in undefined alpha values
-<li>fixed FP divide by zero error seen on VMS with xlockmore, others
-<li>fixed vertex/fragment program debug problem (bug 873011)
-<li>building on AIX with gcc works now
-<li>glDeleteProgramsARB failed for ARB fragment programs (bug 876160)
-<li>glDrawRangeElements tried to modify potentially read-only storage
-<li>updated files for building on Windows
-</ul>
-
-
-<h2><a name="6.0.1">6.0.1  April 2, 2004</h2>
-New:
-<ul>
-<li>upgraded glext.h to version 22
-<li>new build targets (Dan Schikore)
-<li>new linux-x86-opteron build target (Heath Feather)
-</ul>
-Bug fixes:
-<ul>
-<li>glBindProgramARB didn't update all necessary state
-<li>fixed build problems on OpenBSD
-<li>omit CVS directories from tarballs
-<li>glGetTexImage(GL_COLOR_INDEX) was broken
-<li>fixed an infinite loop in t&l module
-<li>silenced some valgrind warnings about using unitialized memory
-<li>fixed some compilation/link glitches on IRIX (Mike Stephens)
-<li>glBindProgram wasn't getting compiled into display lists
-<li>GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079)
-<li>two-sided lighting and vertex program didn't work (bug 887330)
-<li>stores to program parameter registers in vertex state programs
-	  didn't work.
-<li>fixed glOrtho bug found with gcc 3.2.2 (RH9)
-<li>glXCreateWindow() wasn't fully implemented (bug 890894)
-<li>generic vertex attribute arrays didn't work in display lists
-<li>vertex buffer objects' default usage and access fields were wrong
-<li>glDrawArrays with start!=0 was broken
-<li>fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken
-<li>linux-osmesa16-static config didn't work
-<li>fixed a few color index rendering problems (bug 910687)
-<li>glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE
-<li>OSMesa RGB and BGR modes were broken
-<li>glProgramStringARB mistakenly required a null-terminated string
-<li>fragment program XPD instruction was incorrect
-<li>glGetMaterial() didn't work reliably
-<li>ARB_fragment_program KIL instruction was incorrect
-</ul>
-
-
-<h2><a name="6.1">6.1  August 18, 2004</h2>
-New:
-<ul>
-<li>Revamped Makefile system
-<li>glXUseRotatedXFont() utility (see xdemos/xuserotfont.c)
-<li>internal driver interface changes related to texture object
-	  allocation, vertex/fragment programs, BlendEquationSeparate, etc.
-<li>option to walk triangle edges with double-precision floats
-	  (Justin Novosad of Discreet) (see config.h file)
-<li>support for AUX buffers in software GLX driver
-<li>updated glext.h to version 24 and glxext.h to version 6
-<li>new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars
-<li>updated BeOS support (Philippe Houdoin)
-</ul>
-Changes:
-<ul>
-<li>fragment fog interpolation is perspective corrected now
-<li>new glTexImage code, much cleaner, may be a bit faster
-</ul>
-Bug fixes:
-<ul>
-<li>glArrayElement in display lists didn't handle generic vertex attribs
-<li>glFogCoord didn't always work properly
-<li>ARB_fragment_program fog options didn't work
-<li>frag prog TEX instruction no longer incorrectly divides s,t,r by q
-<li>ARB frag prog TEX and TEXP instructions now use LOD=0
-<li>glTexEnviv in display lists didn't work
-<li>glRasterPos didn't do texgen or apply texture matrix
-<li>GL_DOUBLE-valued vertex arrays were broken in some cases
-<li>fixed texture rectangle edge/border sampling bugs
-<li>sampling an incomplete texture in a fragment program would segfault
-<li>glTexImage was missing a few error checks
-<li>fixed some minor glGetTexParameter glitches
-<li>GL_INTENSITY was mistakenly accepted as a <format> to glTexImage
-<li>fragment program writes to RC/HC register were broken
-<li>fixed a few glitches in GL_HP_occlusion_test extension
-<li>glBeginQueryARB and glEndQueryARB didn't work inside display lists
-<li>vertex program state references were broken
-<li>fixed triangle color interpolation bug on AIX (Shane Blackett)
-<li>fixed a number of minor memory leaks (bug #1002030)
-</ul>
-
-
-<h2><a name="6.2">6.2  October 2, 2004</h2>
-New:
-<ul>
-<li>enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-<li>updated Doxygen support (Jose Fonseca)
-</ul>
-Changes:
-<ul>
-<li>some GGI driver updates (Christoph Egger, bug 1025977)
-</ul>
-Bug fixes:
-<ul>
-<li>Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-<li>fixed a few compilation issues on IRIX
-<li>fixed a matrix classification bug (reported by Wes Bethel)
-<li>we weren't reseting the vertex/fragment program error state
-	  before parsing (Dave Reveman)
-<li>adjust texcoords for sampling texture rectangles (Dave Reveman)
-<li>glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-<li>repeated calls to glDeleteTexture(t) could lead to a crash
-<li>fixed potential ref count bugs in VBOs and vertex/fragment programs
-<li>spriteblast demo didn't handle window size changes correctly
-<li>glTexSubImage didn't handle pixels=NULL correctly for PBOs
-<li>fixed color index mode glDrawPixels bug (Karl Schultz)
-</ul>
-
-
-<h2><a name="6.2.1">6.2.1  December 9, 2004</h2>
-Bug fixes:
-<ul>
-<li>don't apply regular fog or color sum when using a fragment program
-<li>glProgramEnvParameter4fARB always generated an error on
-	  GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-<li>glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-<li>fixed width/height mix-up in glSeparableFilter2D()
-<li>fixed regression in glCopyPixels + convolution
-<li>glReadPixels from a clipped front color buffer didn't always work
-<li>glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-<li>Attempting queries/accesses of VBO 0 weren't detected as errors
-<li>paletted textures failed if the palette had fewer than 256 entries
-</ul>
-Changes:
-<ul>
-<li>fixed a bunch of compiler warnings found with gcc 3.4
-<li>bug reports should to go bugzilla.freedesktop.org
-</ul>
-
-
-<h2><a name="6.3">6.3  July 20, 2005</h2>
-New:
-<ul>
-<li>GL_EXT_framebuffer_object extension
-<li>GL_ARB_draw_buffers extension
-<li>GL_ARB_pixel_buffer_object extension
-<li>GL_OES_read_format extension (Ian Romanick)
-<li>DirectFB driver (Claudio Ciccani)
-<li>x86_64 vertex transformation code (Mikko T.)
-<li>Updated GL/glext.h to version 29
-</ul>
-Changes:
-<ul>
-<li>added -stereo option for glxgears demo (Jacek Rosik)
-<li>updated the PBuffer demo code in xdemos/ directory
-<li>glDeleteTextures/Programs/Buffers() now makes the object ID
-	available for immediate re-use
-<li>assorted 64-bit clean-ups fixes (x86_64 and Win64)
-<li>lots of internal changes for GL_EXT_framebuffer_object
-</ul>
-Bug fixes:
-<ul>
-<li>some functions didn't support PBO functionality
-<li>glGetTexImage didn't convert color index images to RGBA as required
-<li>fragment program texcoords were sometimes wrong for points and lines
-<li>fixed problem with negative dot product in arbfplight, fplight demos
-<li>fixed bug in perspective correction of antialiased, textured lines
-<li>querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
-<li>fixed a couple per-pixel fog bugs (Soju Matsumoto)
-<li>glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
-<li>fixed float parsing bug in ARB frag/vert programs (bug 2520)
-<li>XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
-<li>GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
-<li>glXChooseFBConfig() crashed if attribList pointer was NULL
-<li>program state.light[n].spot.direction.w was wrong value (bug 3083)
-<li>fragment program fog option required glEnable(GL_FOG) - wrong.
-<li>glColorTable() could produce a Mesa implementation error (bug 3135)
-<li>RasterPos could get corrupted by color index rendering path
-<li>Removed bad XTranslateCoordinates call when rendering to Pixmaps
-<li>glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
-<li>fixed a few Darwin compilation problems
-</ul>
-
-
-<h2><a name="6.3.1">6.3.1</h2>
-<p>
-This was an intermediate release for X.org which wasn't otherwise released.)
-</p>
-
-
-<h2><a name="6.3.2">6.3.2  August 19, 2005</h2>
-New:
-<ul>
-<li>The distribution now includes the DRI drivers and GLX code
-</ul>
-Changes:
-<ul>
-<li>Made the DRI "new" driver interface standard, remove old code
-</ul>
-Bug fixes:
-<ul>
-<li>GL_ARB_vertex/fragment_shader were mistakenly listed in the
-	  extensions string
-<li>negative relative addressing in vertex programs was broken
-<li>update/fix SPARC assembly code for vertex transformation
-<li>fixed memory leak when freeing GLX drawables/renderbuffers
-<li>fixed display list memory leak
-<li>the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
-<li>wglGetProcAddress() didn't handle wgl-functions
-<li>fixed glxext.h cross-compile issue (Colin Harrison)
-<li>assorted DRI driver fixes
-</ul>
-
-
-<B>
-NOTE: Changes for Mesa 6.4 and later are documented in the corresponding
-<a href="relnotes.html">release notes</a> file.
-</B>
-
-
-</body>
-</html>
diff --git a/docs/webmaster.html b/docs/webmaster.html
deleted file mode 100644
index 16f4dc8..0000000
--- a/docs/webmaster.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<HTML>
-
-<TITLE>Mesa Introduction</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Webmaster</font></H1>
-
-<p>
-If you have problems, edits or additions for this website send them
-to Brian
-(<em>b</em><em>r</em><em>i</em><em>a</em><em>n</em><em>.</em><em>e</em><em>.</em><em>p</em><em>a</em><em>u</em><em>l</em><em> </em><em>g</em><em>m</em><em>a</em><em>i</em><em>l</em><em>.</em><em>c</em><em>o</em><em>m</em>)</a>.
-</p>
-
-<p>
-Mark Manning made the frame-based layout for the website.
-Brian's modified it a lot since then.
-</p>
-
-
-</body>
-</html>
diff --git a/docs/xlibdriver.html b/docs/xlibdriver.html
deleted file mode 100644
index d95f4d5..0000000
--- a/docs/xlibdriver.html
+++ /dev/null
@@ -1,275 +0,0 @@
-<HTML>
-
-<TITLE>Xlib Software Driver</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Xlib Software Driver</H1>
-
-<p>
-Mesa's Xlib driver provides an emulation of the GLX interface so that
-OpenGL programs which use the GLX API can render to any X display, even
-those that don't support the GLX extension.
-Effectively, the Xlib driver converts all OpenGL rendering into Xlib calls.
-</p>
-
-<p>
-The Xlib driver is the oldest Mesa driver and the most mature of Mesa's
-software-only drivers.
-</p>
-
-<p>
-Since the Xlib driver <em>emulates</em> the GLX extension, it's not
-totally conformant with a true GLX implementation.
-The differences are fairly obscure, however.
-</p>
-
-<p>
-The unique features of the Xlib driver follows.
-</p>
-
-
-<H2>X Visual Selection</H2>
-<p>
-Mesa supports RGB(A) rendering into almost any X visual type and depth.
-</p>
-<p>
-The glXChooseVisual function tries to choose the best X visual
-for the given attribute list.  However, if this doesn't suit your needs
-you can force Mesa to use any X visual you want (any supported by your
-X server that is) by setting the <b>MESA_RGB_VISUAL</b> and
-<b>MESA_CI_VISUAL</b>
-environment variables.
-When an RGB visual is requested, glXChooseVisual
-will first look if the MESA_RGB_VISUAL variable is defined.
-If so, it will try to use the specified visual.
-Similarly, when a color index visual is requested, glXChooseVisual will
-look for the MESA_CI_VISUAL variable.
-</p>
-
-<p>
-The format of accepted values is:  <code>visual-class depth</code>
-</p>
-<p>
-Here are some examples:
-</p>
-<pre>
-   using csh:
-	% setenv MESA_RGB_VISUAL "TrueColor 8"		// 8-bit TrueColor
-	% setenv MESA_CI_VISUAL "PseudoColor 12"	// 12-bit PseudoColor
-	% setenv MESA_RGB_VISUAL "PseudoColor 8"	// 8-bit PseudoColor
-
-   using bash:
-	$ export MESA_RGB_VISUAL="TrueColor 8"
-	$ export MESA_CI_VISUAL="PseudoColor 12"
-	$ export MESA_RGB_VISUAL="PseudoColor 8"
-</pre>
-
-
-<H2>Double Buffering</H2>
-<p>
-Mesa can use either an X Pixmap or XImage as the back color buffer when in
-double-buffer mode.
-The default is to use an XImage.
-The <b>MESA_BACK_BUFFER</b> environment variable can override this.
-The valid values for <b>MESA_BACK_BUFFER</b> are:  <b>Pixmap</b> and
-<b>XImage</b> (only the first letter is checked, case doesn't matter).
-</p>
-
-<p>
-Using XImage is almost always faster than a Pixmap since it resides in
-the application's address space.
-When glXSwapBuffers() is called, XPutImage() or XShmPutImage() is used
-to transfer the XImage to the on-screen window.
-</p>
-<p>
-A Pixmap may be faster when doing remote rendering of a simple scene.
-Some OpenGL features will be very slow with a Pixmap (for example, blending
-will require a round-trip message for pixel readback.)
-</p>
-<p>
-Experiment with the MESA_BACK_BUFFER variable to see which is faster
-for your application.
-</p>
-
-
-<H2>Colormaps</H2>
-<p>
-When using Mesa directly or with GLX, it's up to the application
-writer to create a window with an appropriate colormap.  The GLUT
-toolkit tris to minimize colormap <em>flashing</em> by sharing
-colormaps when possible.  Specifically, if the visual and depth of the
-window matches that of the root window, the root window's colormap
-will be shared by the Mesa window.  Otherwise, a new, private colormap
-will be allocated.
-</p>
-
-<p>
-When sharing the root colormap, Mesa may be unable to allocate the colors
-it needs, resulting in poor color quality.  This can happen when a
-large number of colorcells in the root colormap are already allocated.
-To prevent colormap sharing in GLUT, set the 
-<b>MESA_PRIVATE_CMAP</b> environment variable.  The value isn't
-significant.
-</p>
-
-
-<H2>Gamma Correction</H2>
-<p>
-To compensate for the nonlinear relationship between pixel values
-and displayed intensities, there is a gamma correction feature in
-Mesa.  Some systems, such as Silicon Graphics, support gamma
-correction in hardware (man gamma) so you won't need to use Mesa's
-gamma facility.  Other systems, however, may need gamma adjustment
-to produce images which look correct.  If you believe that 
-Mesa's images are too dim, read on.
-</p>
-
-<p>
-Gamma correction is controlled with the <b>MESA_GAMMA</b> environment
-variable.  Its value is of the form <b>Gr Gg Gb</b> or just <b>G</b> where
-Gr is the red gamma value, Gg is the green gamma value, Gb is the
-blue gamma value and G is one gamma value to use for all three
-channels.  Each value is a positive real number typically in the
-range 1.0 to 2.5.
-The defaults are all 1.0, effectively disabling gamma correction.
-Examples:
-</p>
-<pre>
-	% export MESA_GAMMA="2.3 2.2 2.4"	// separate R,G,B values
-	% export MESA_GAMMA="2.0"		// same gamma for R,G,B
-</pre>
-<p>
-The progs/demos/gamma.c program may help you to determine reasonable gamma
-value for your display.  With correct gamma values, the color intensities
-displayed in the top row (drawn by dithering) should nearly match those
-in the bottom row (drawn as grays).
-</p>
-
-<p>
-Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well
-on HP displays using the HP-ColorRecovery technology.
-</p>
-
-<p>
-Mesa implements gamma correction with a lookup table which translates
-a "linear" pixel value to a gamma-corrected pixel value.  There is a
-small performance penalty.  Gamma correction only works in RGB mode.
-Also be aware that pixel values read back from the frame buffer will
-not be "un-corrected" so glReadPixels may not return the same data
-drawn with glDrawPixels.
-</p>
-
-<p>
-For more information about gamma correction see:
-<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html"
-the Gamma FAQ</a>
-</p>
-
-
-<H2>Overlay Planes</H2>
-<p>
-Hardware overlay planes are supported by the Xlib driver.  To
-determine if your X server has overlay support you can test for the
-SERVER_OVERLAY_VISUALS property:
-</p>
-<pre>
-	xprop -root | grep SERVER_OVERLAY_VISUALS
-</pre>
-
-
-<H2>HPCR Dithering</H2>
-<p>
-If you set the <b>MESA_HPCR_CLEAR</b> environment variable then dithering
-will be used when clearing the color buffer.  This is only applicable
-to HP systems with the HPCR (Color Recovery) feature.
-This incurs a small performance penalty.
-</p>
-
-
-<H2>Extensions</H2>
-<p>
-The following MESA-specific extensions are implemented in the Xlib driver.
-</p>
-
-<h3>GLX_MESA_pixmap_colormap</h3>
-
-<p>
-This extension adds the GLX function:
-</p>
-<pre>
-    GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
-                                      Pixmap pixmap, Colormap cmap )
-</pre>
-<p>
-It is an alternative to the standard glXCreateGLXPixmap() function.
-Since Mesa supports RGB rendering into any X visual, not just True-
-Color or DirectColor, Mesa needs colormap information to convert RGB
-values into pixel values.  An X window carries this information but a
-pixmap does not.  This function associates a colormap to a GLX pixmap.
-See the xdemos/glxpixmap.c file for an example of how to use this
-extension.
-</p>
-<p>
-<a href="MESA_pixmap_colormap.spec">GLX_MESA_pixmap_colormap specification</a>
-</p>
-
-
-<h3>GLX_MESA_release_buffers</h3>
-<p>
-Mesa associates a set of ancillary (depth, accumulation, stencil and
-alpha) buffers with each X window it draws into.  These ancillary
-buffers are allocated for each X window the first time the X window
-is passed to glXMakeCurrent().  Mesa, however, can't detect when an
-X window has been destroyed in order to free the ancillary buffers.
-</p>
-<p>
-The best it can do is to check for recently destroyed windows whenever
-the client calls the glXCreateContext() or glXDestroyContext()
-functions.  This may not be sufficient in all situations though.
-</p>
-<p>
-The GLX_MESA_release_buffers extension allows a client to explicitly
-deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
-just before an X window is destroyed.  For example:
-</p>
-<pre>
-         #ifdef GLX_MESA_release_buffers
-            glXReleaseBuffersMESA( dpy, window );
-         #endif
-         XDestroyWindow( dpy, window );
-</pre>
-<p>
-<a href="MESA_release_buffers.spec">GLX_MESA_release_buffers specification</a>
-</p>
-<p>
-This extension was added in Mesa 2.0.
-</p>
-
-<H3>GLX_MESA_copy_sub_buffer</H3>
-<p>
-This extension adds the glXCopySubBufferMESA() function.  It works
-like glXSwapBuffers() but only copies a sub-region of the window
-instead of the whole window.
-</p>
-<p>
-<a href="MESA_copy_sub_buffer.spec">GLX_MESA_copy_sub_buffer specification</a>
-</p>
-<p>
-This extension was added in Mesa 2.6
-</p>
-
-<h2>Summary of X-related environment variables</H2>
-<pre>
-   MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
-   MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
-   MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
-   MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
-   MESA_GAMMA - gamma correction coefficients (X only)
-</pre>
-
-
-</body>
-</html>
diff --git a/include/GLES2/gl2.h b/include/GLES2/gl2.h
deleted file mode 100644
index e1d3b87..0000000
--- a/include/GLES2/gl2.h
+++ /dev/null
@@ -1,621 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-#include <GLES2/gl2platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-typedef void             GLvoid;
-typedef char             GLchar;
-typedef unsigned int     GLenum;
-typedef unsigned char    GLboolean;
-typedef unsigned int     GLbitfield;
-typedef khronos_int8_t   GLbyte;
-typedef short            GLshort;
-typedef int              GLint;
-typedef int              GLsizei;
-typedef khronos_uint8_t  GLubyte;
-typedef unsigned short   GLushort;
-typedef unsigned int     GLuint;
-typedef khronos_float_t  GLfloat;
-typedef khronos_float_t  GLclampf;
-typedef khronos_int32_t  GLfixed;
-
-/* GL types for handling large vertex buffer objects */
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t  GLsizeiptr;
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0                 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT               0x00000100
-#define GL_STENCIL_BUFFER_BIT             0x00000400
-#define GL_COLOR_BUFFER_BIT               0x00004000
-
-/* Boolean */
-#define GL_FALSE                          0
-#define GL_TRUE                           1
-
-/* BeginMode */
-#define GL_POINTS                         0x0000
-#define GL_LINES                          0x0001
-#define GL_LINE_LOOP                      0x0002
-#define GL_LINE_STRIP                     0x0003
-#define GL_TRIANGLES                      0x0004
-#define GL_TRIANGLE_STRIP                 0x0005
-#define GL_TRIANGLE_FAN                   0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* BlendingFactorDest */
-#define GL_ZERO                           0
-#define GL_ONE                            1
-#define GL_SRC_COLOR                      0x0300
-#define GL_ONE_MINUS_SRC_COLOR            0x0301
-#define GL_SRC_ALPHA                      0x0302
-#define GL_ONE_MINUS_SRC_ALPHA            0x0303
-#define GL_DST_ALPHA                      0x0304
-#define GL_ONE_MINUS_DST_ALPHA            0x0305
-
-/* BlendingFactorSrc */
-/*      GL_ZERO */
-/*      GL_ONE */
-#define GL_DST_COLOR                      0x0306
-#define GL_ONE_MINUS_DST_COLOR            0x0307
-#define GL_SRC_ALPHA_SATURATE             0x0308
-/*      GL_SRC_ALPHA */
-/*      GL_ONE_MINUS_SRC_ALPHA */
-/*      GL_DST_ALPHA */
-/*      GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD                       0x8006
-#define GL_BLEND_EQUATION                 0x8009
-#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA           0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT                  0x800A
-#define GL_FUNC_REVERSE_SUBTRACT          0x800B
-
-/* Separate Blend Functions */
-#define GL_BLEND_DST_RGB                  0x80C8
-#define GL_BLEND_SRC_RGB                  0x80C9
-#define GL_BLEND_DST_ALPHA                0x80CA
-#define GL_BLEND_SRC_ALPHA                0x80CB
-#define GL_CONSTANT_COLOR                 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
-#define GL_CONSTANT_ALPHA                 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
-#define GL_BLEND_COLOR                    0x8005
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER                   0x8892
-#define GL_ELEMENT_ARRAY_BUFFER           0x8893
-#define GL_ARRAY_BUFFER_BINDING           0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
-
-#define GL_STREAM_DRAW                    0x88E0
-#define GL_STATIC_DRAW                    0x88E4
-#define GL_DYNAMIC_DRAW                   0x88E8
-
-#define GL_BUFFER_SIZE                    0x8764
-#define GL_BUFFER_USAGE                   0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB          0x8626
-
-/* CullFaceMode */
-#define GL_FRONT                          0x0404
-#define GL_BACK                           0x0405
-#define GL_FRONT_AND_BACK                 0x0408
-
-/* DepthFunction */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D                     0x0DE1
-#define GL_CULL_FACE                      0x0B44
-#define GL_BLEND                          0x0BE2
-#define GL_DITHER                         0x0BD0
-#define GL_STENCIL_TEST                   0x0B90
-#define GL_DEPTH_TEST                     0x0B71
-#define GL_SCISSOR_TEST                   0x0C11
-#define GL_POLYGON_OFFSET_FILL            0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
-#define GL_SAMPLE_COVERAGE                0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR                       0
-#define GL_INVALID_ENUM                   0x0500
-#define GL_INVALID_VALUE                  0x0501
-#define GL_INVALID_OPERATION              0x0502
-#define GL_OUT_OF_MEMORY                  0x0505
-
-/* FrontFaceDirection */
-#define GL_CW                             0x0900
-#define GL_CCW                            0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH                     0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
-#define GL_CULL_FACE_MODE                 0x0B45
-#define GL_FRONT_FACE                     0x0B46
-#define GL_DEPTH_RANGE                    0x0B70
-#define GL_DEPTH_WRITEMASK                0x0B72
-#define GL_DEPTH_CLEAR_VALUE              0x0B73
-#define GL_DEPTH_FUNC                     0x0B74
-#define GL_STENCIL_CLEAR_VALUE            0x0B91
-#define GL_STENCIL_FUNC                   0x0B92
-#define GL_STENCIL_FAIL                   0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
-#define GL_STENCIL_REF                    0x0B97
-#define GL_STENCIL_VALUE_MASK             0x0B93
-#define GL_STENCIL_WRITEMASK              0x0B98
-#define GL_STENCIL_BACK_FUNC              0x8800
-#define GL_STENCIL_BACK_FAIL              0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
-#define GL_STENCIL_BACK_REF               0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
-#define GL_VIEWPORT                       0x0BA2
-#define GL_SCISSOR_BOX                    0x0C10
-/*      GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE              0x0C22
-#define GL_COLOR_WRITEMASK                0x0C23
-#define GL_UNPACK_ALIGNMENT               0x0CF5
-#define GL_PACK_ALIGNMENT                 0x0D05
-#define GL_MAX_TEXTURE_SIZE               0x0D33
-#define GL_MAX_VIEWPORT_DIMS              0x0D3A
-#define GL_SUBPIXEL_BITS                  0x0D50
-#define GL_RED_BITS                       0x0D52
-#define GL_GREEN_BITS                     0x0D53
-#define GL_BLUE_BITS                      0x0D54
-#define GL_ALPHA_BITS                     0x0D55
-#define GL_DEPTH_BITS                     0x0D56
-#define GL_STENCIL_BITS                   0x0D57
-#define GL_POLYGON_OFFSET_UNITS           0x2A00
-/*      GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR          0x8038
-#define GL_TEXTURE_BINDING_2D             0x8069
-#define GL_SAMPLE_BUFFERS                 0x80A8
-#define GL_SAMPLES                        0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
-
-/* GetTextureParameter */
-/*      GL_TEXTURE_MAG_FILTER */
-/*      GL_TEXTURE_MIN_FILTER */
-/*      GL_TEXTURE_WRAP_S */
-/*      GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE                      0x1100
-#define GL_FASTEST                        0x1101
-#define GL_NICEST                         0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT            0x8192
-
-/* DataType */
-#define GL_BYTE                           0x1400
-#define GL_UNSIGNED_BYTE                  0x1401
-#define GL_SHORT                          0x1402
-#define GL_UNSIGNED_SHORT                 0x1403
-#define GL_INT                            0x1404
-#define GL_UNSIGNED_INT                   0x1405
-#define GL_FLOAT                          0x1406
-#define GL_FIXED                          0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT                0x1902
-#define GL_ALPHA                          0x1906
-#define GL_RGB                            0x1907
-#define GL_RGBA                           0x1908
-#define GL_LUMINANCE                      0x1909
-#define GL_LUMINANCE_ALPHA                0x190A
-
-/* PixelType */
-/*      GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
-#define GL_UNSIGNED_SHORT_5_6_5           0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER                  0x8B30
-#define GL_VERTEX_SHADER                    0x8B31
-#define GL_MAX_VERTEX_ATTRIBS               0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
-#define GL_MAX_VARYING_VECTORS              0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
-#define GL_SHADER_TYPE                      0x8B4F
-#define GL_DELETE_STATUS                    0x8B80
-#define GL_LINK_STATUS                      0x8B82
-#define GL_VALIDATE_STATUS                  0x8B83
-#define GL_ATTACHED_SHADERS                 0x8B85
-#define GL_ACTIVE_UNIFORMS                  0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
-#define GL_ACTIVE_ATTRIBUTES                0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
-#define GL_CURRENT_PROGRAM                  0x8B8D
-
-/* StencilFunction */
-#define GL_NEVER                          0x0200
-#define GL_LESS                           0x0201
-#define GL_EQUAL                          0x0202
-#define GL_LEQUAL                         0x0203
-#define GL_GREATER                        0x0204
-#define GL_NOTEQUAL                       0x0205
-#define GL_GEQUAL                         0x0206
-#define GL_ALWAYS                         0x0207
-
-/* StencilOp */
-/*      GL_ZERO */
-#define GL_KEEP                           0x1E00
-#define GL_REPLACE                        0x1E01
-#define GL_INCR                           0x1E02
-#define GL_DECR                           0x1E03
-#define GL_INVERT                         0x150A
-#define GL_INCR_WRAP                      0x8507
-#define GL_DECR_WRAP                      0x8508
-
-/* StringName */
-#define GL_VENDOR                         0x1F00
-#define GL_RENDERER                       0x1F01
-#define GL_VERSION                        0x1F02
-#define GL_EXTENSIONS                     0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST                        0x2600
-#define GL_LINEAR                         0x2601
-
-/* TextureMinFilter */
-/*      GL_NEAREST */
-/*      GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST         0x2700
-#define GL_LINEAR_MIPMAP_NEAREST          0x2701
-#define GL_NEAREST_MIPMAP_LINEAR          0x2702
-#define GL_LINEAR_MIPMAP_LINEAR           0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER             0x2800
-#define GL_TEXTURE_MIN_FILTER             0x2801
-#define GL_TEXTURE_WRAP_S                 0x2802
-#define GL_TEXTURE_WRAP_T                 0x2803
-
-/* TextureTarget */
-/*      GL_TEXTURE_2D */
-#define GL_TEXTURE                        0x1702
-
-#define GL_TEXTURE_CUBE_MAP               0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
-
-/* TextureUnit */
-#define GL_TEXTURE0                       0x84C0
-#define GL_TEXTURE1                       0x84C1
-#define GL_TEXTURE2                       0x84C2
-#define GL_TEXTURE3                       0x84C3
-#define GL_TEXTURE4                       0x84C4
-#define GL_TEXTURE5                       0x84C5
-#define GL_TEXTURE6                       0x84C6
-#define GL_TEXTURE7                       0x84C7
-#define GL_TEXTURE8                       0x84C8
-#define GL_TEXTURE9                       0x84C9
-#define GL_TEXTURE10                      0x84CA
-#define GL_TEXTURE11                      0x84CB
-#define GL_TEXTURE12                      0x84CC
-#define GL_TEXTURE13                      0x84CD
-#define GL_TEXTURE14                      0x84CE
-#define GL_TEXTURE15                      0x84CF
-#define GL_TEXTURE16                      0x84D0
-#define GL_TEXTURE17                      0x84D1
-#define GL_TEXTURE18                      0x84D2
-#define GL_TEXTURE19                      0x84D3
-#define GL_TEXTURE20                      0x84D4
-#define GL_TEXTURE21                      0x84D5
-#define GL_TEXTURE22                      0x84D6
-#define GL_TEXTURE23                      0x84D7
-#define GL_TEXTURE24                      0x84D8
-#define GL_TEXTURE25                      0x84D9
-#define GL_TEXTURE26                      0x84DA
-#define GL_TEXTURE27                      0x84DB
-#define GL_TEXTURE28                      0x84DC
-#define GL_TEXTURE29                      0x84DD
-#define GL_TEXTURE30                      0x84DE
-#define GL_TEXTURE31                      0x84DF
-#define GL_ACTIVE_TEXTURE                 0x84E0
-
-/* TextureWrapMode */
-#define GL_REPEAT                         0x2901
-#define GL_CLAMP_TO_EDGE                  0x812F
-#define GL_MIRRORED_REPEAT                0x8370
-
-/* Uniform Types */
-#define GL_FLOAT_VEC2                     0x8B50
-#define GL_FLOAT_VEC3                     0x8B51
-#define GL_FLOAT_VEC4                     0x8B52
-#define GL_INT_VEC2                       0x8B53
-#define GL_INT_VEC3                       0x8B54
-#define GL_INT_VEC4                       0x8B55
-#define GL_BOOL                           0x8B56
-#define GL_BOOL_VEC2                      0x8B57
-#define GL_BOOL_VEC3                      0x8B58
-#define GL_BOOL_VEC4                      0x8B59
-#define GL_FLOAT_MAT2                     0x8B5A
-#define GL_FLOAT_MAT3                     0x8B5B
-#define GL_FLOAT_MAT4                     0x8B5C
-#define GL_SAMPLER_2D                     0x8B5E
-#define GL_SAMPLER_CUBE                   0x8B60
-
-/* Vertex Arrays */
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS                 0x8B81
-#define GL_INFO_LOG_LENGTH                0x8B84
-#define GL_SHADER_SOURCE_LENGTH           0x8B88
-#define GL_SHADER_COMPILER                0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS          0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT                      0x8DF0
-#define GL_MEDIUM_FLOAT                   0x8DF1
-#define GL_HIGH_FLOAT                     0x8DF2
-#define GL_LOW_INT                        0x8DF3
-#define GL_MEDIUM_INT                     0x8DF4
-#define GL_HIGH_INT                       0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER                    0x8D40
-#define GL_RENDERBUFFER                   0x8D41
-
-#define GL_RGBA4                          0x8056
-#define GL_RGB5_A1                        0x8057
-#define GL_RGB565                         0x8D62
-#define GL_DEPTH_COMPONENT16              0x81A5
-#define GL_STENCIL_INDEX                  0x1901
-#define GL_STENCIL_INDEX8                 0x8D48
-
-#define GL_RENDERBUFFER_WIDTH             0x8D42
-#define GL_RENDERBUFFER_HEIGHT            0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
-#define GL_RENDERBUFFER_RED_SIZE          0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
-#define GL_COLOR_ATTACHMENT0              0x8CE0
-#define GL_DEPTH_ATTACHMENT               0x8D00
-#define GL_STENCIL_ATTACHMENT             0x8D20
-
-#define GL_NONE                           0
-
-#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING            0x8CA6
-#define GL_RENDERBUFFER_BINDING           0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
-
-/*-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------*/
-
-GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
-GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glFinish (void);
-GL_APICALL void         GL_APIENTRY glFlush (void);
-GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum       GL_APIENTRY glGetError (void);
-GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
-GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2_h_ */
diff --git a/include/GLES2/gl2ext.h b/include/GLES2/gl2ext.h
deleted file mode 100644
index 334e9ce..0000000
--- a/include/GLES2/gl2ext.h
+++ /dev/null
@@ -1,803 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-#   define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES                                        0x8D64
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES                                    0x8B90
-#define GL_PALETTE4_RGBA8_OES                                   0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
-#define GL_PALETTE4_RGBA4_OES                                   0x8B93
-#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
-#define GL_PALETTE8_RGB8_OES                                    0x8B95
-#define GL_PALETTE8_RGBA8_OES                                   0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
-#define GL_PALETTE8_RGBA4_OES                                   0x8B98
-#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES                                0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES                                0x81A7
-#endif
-
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT                                         0x1405
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES                                       0x88B9
-#define GL_BUFFER_ACCESS_OES                                    0x88BB
-#define GL_BUFFER_MAPPED_OES                                    0x88BC
-#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES                                    0x84F9
-#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
-#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES                                             0x8051
-#define GL_RGBA8_OES                                            0x8058
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES                                   0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES                                   0x8D47
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_TEXTURE_WRAP_R_OES                                   0x8072
-#define GL_TEXTURE_3D_OES                                       0x806F
-#define GL_TEXTURE_BINDING_3D_OES                               0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
-#define GL_SAMPLER_3D_OES                                       0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
-#endif
-
-/* GL_OES_texture_float */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_HALF_FLOAT_OES                                       0x8D61
-#endif
-
-/* GL_OES_texture_half_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
-#endif
-
-/* GL_OES_vertex_half_float */
-/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
-#define GL_INT_10_10_10_2_OES                                   0x8DF7
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD                                            0x87F9
-#define GL_3DC_XY_AMD                                           0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD                                          0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
-#endif
-
-/* GL_AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_COUNTER_TYPE_AMD                                     0x8BC0
-#define GL_COUNTER_RANGE_AMD                                    0x8BC1
-#define GL_UNSIGNED_INT64_AMD                                   0x8BC2
-#define GL_PERCENTAGE_AMD                                       0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
-#define GL_PERFMON_RESULT_AMD                                   0x8BC6
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD                                      0x8740
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT                                              0x8007
-#define GL_MAX_EXT                                              0x8008
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT                                            0x1800
-#define GL_DEPTH_EXT                                            0x1801
-#define GL_STENCIL_EXT                                          0x1802
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT                                             0x80E1
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_SGX_BINARY_IMG                                       0x8C0A
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
-#define GL_MAX_SAMPLES_IMG                                      0x9135
-#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV                                     0x84F2
-#define GL_FENCE_STATUS_NV                                      0x84F3
-#define GL_FENCE_CONDITION_NV                                   0x84F4
-#endif
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
-#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
-#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
-#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
-#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
-#define GL_STATE_RESTORE                                        0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_depth_texture */
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fragment_precision_high */
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-
-/* GL_OES_texture_float */
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif
-
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
-/* GL_OES_texture_npot */
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/* GL_OES_vertex_half_float */
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/* AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2ext_h_ */
diff --git a/include/GLES2/gl2platform.h b/include/GLES2/gl2platform.h
deleted file mode 100644
index c9fa3c4..0000000
--- a/include/GLES2/gl2platform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl2platform_h_
-#define __gl2platform_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file.  Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_APICALL
-#define GL_APICALL  KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl2platform_h_ */
diff --git a/include/c99/inttypes.h b/include/c99/inttypes.h
deleted file mode 100644
index 4b3828a..0000000
--- a/include/c99/inttypes.h
+++ /dev/null
@@ -1,305 +0,0 @@
-// ISO C9x  compliant inttypes.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
-// 
-//  Copyright (c) 2006 Alexander Chemeris
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-// 
-//   1. Redistributions of source code must retain the above copyright notice,
-//      this list of conditions and the following disclaimer.
-// 
-//   2. Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-// 
-//   3. The name of the author may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// 
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_INTTYPES_H_ // [
-#define _MSC_INTTYPES_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include "stdint.h"
-
-// 7.8 Format conversion of integer types
-
-typedef struct {
-   intmax_t quot;
-   intmax_t rem;
-} imaxdiv_t;
-
-// 7.8.1 Macros for format specifiers
-
-#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [   See footnote 185 at page 198
-
-// The fprintf macros for signed integers are:
-#define PRId8       "d"
-#define PRIi8       "i"
-#define PRIdLEAST8  "d"
-#define PRIiLEAST8  "i"
-#define PRIdFAST8   "d"
-#define PRIiFAST8   "i"
-
-#define PRId16       "hd"
-#define PRIi16       "hi"
-#define PRIdLEAST16  "hd"
-#define PRIiLEAST16  "hi"
-#define PRIdFAST16   "hd"
-#define PRIiFAST16   "hi"
-
-#define PRId32       "I32d"
-#define PRIi32       "I32i"
-#define PRIdLEAST32  "I32d"
-#define PRIiLEAST32  "I32i"
-#define PRIdFAST32   "I32d"
-#define PRIiFAST32   "I32i"
-
-#define PRId64       "I64d"
-#define PRIi64       "I64i"
-#define PRIdLEAST64  "I64d"
-#define PRIiLEAST64  "I64i"
-#define PRIdFAST64   "I64d"
-#define PRIiFAST64   "I64i"
-
-#define PRIdMAX     "I64d"
-#define PRIiMAX     "I64i"
-
-#define PRIdPTR     "Id"
-#define PRIiPTR     "Ii"
-
-// The fprintf macros for unsigned integers are:
-#define PRIo8       "o"
-#define PRIu8       "u"
-#define PRIx8       "x"
-#define PRIX8       "X"
-#define PRIoLEAST8  "o"
-#define PRIuLEAST8  "u"
-#define PRIxLEAST8  "x"
-#define PRIXLEAST8  "X"
-#define PRIoFAST8   "o"
-#define PRIuFAST8   "u"
-#define PRIxFAST8   "x"
-#define PRIXFAST8   "X"
-
-#define PRIo16       "ho"
-#define PRIu16       "hu"
-#define PRIx16       "hx"
-#define PRIX16       "hX"
-#define PRIoLEAST16  "ho"
-#define PRIuLEAST16  "hu"
-#define PRIxLEAST16  "hx"
-#define PRIXLEAST16  "hX"
-#define PRIoFAST16   "ho"
-#define PRIuFAST16   "hu"
-#define PRIxFAST16   "hx"
-#define PRIXFAST16   "hX"
-
-#define PRIo32       "I32o"
-#define PRIu32       "I32u"
-#define PRIx32       "I32x"
-#define PRIX32       "I32X"
-#define PRIoLEAST32  "I32o"
-#define PRIuLEAST32  "I32u"
-#define PRIxLEAST32  "I32x"
-#define PRIXLEAST32  "I32X"
-#define PRIoFAST32   "I32o"
-#define PRIuFAST32   "I32u"
-#define PRIxFAST32   "I32x"
-#define PRIXFAST32   "I32X"
-
-#define PRIo64       "I64o"
-#define PRIu64       "I64u"
-#define PRIx64       "I64x"
-#define PRIX64       "I64X"
-#define PRIoLEAST64  "I64o"
-#define PRIuLEAST64  "I64u"
-#define PRIxLEAST64  "I64x"
-#define PRIXLEAST64  "I64X"
-#define PRIoFAST64   "I64o"
-#define PRIuFAST64   "I64u"
-#define PRIxFAST64   "I64x"
-#define PRIXFAST64   "I64X"
-
-#define PRIoMAX     "I64o"
-#define PRIuMAX     "I64u"
-#define PRIxMAX     "I64x"
-#define PRIXMAX     "I64X"
-
-#define PRIoPTR     "Io"
-#define PRIuPTR     "Iu"
-#define PRIxPTR     "Ix"
-#define PRIXPTR     "IX"
-
-// The fscanf macros for signed integers are:
-#define SCNd8       "d"
-#define SCNi8       "i"
-#define SCNdLEAST8  "d"
-#define SCNiLEAST8  "i"
-#define SCNdFAST8   "d"
-#define SCNiFAST8   "i"
-
-#define SCNd16       "hd"
-#define SCNi16       "hi"
-#define SCNdLEAST16  "hd"
-#define SCNiLEAST16  "hi"
-#define SCNdFAST16   "hd"
-#define SCNiFAST16   "hi"
-
-#define SCNd32       "ld"
-#define SCNi32       "li"
-#define SCNdLEAST32  "ld"
-#define SCNiLEAST32  "li"
-#define SCNdFAST32   "ld"
-#define SCNiFAST32   "li"
-
-#define SCNd64       "I64d"
-#define SCNi64       "I64i"
-#define SCNdLEAST64  "I64d"
-#define SCNiLEAST64  "I64i"
-#define SCNdFAST64   "I64d"
-#define SCNiFAST64   "I64i"
-
-#define SCNdMAX     "I64d"
-#define SCNiMAX     "I64i"
-
-#ifdef _WIN64 // [
-#  define SCNdPTR     "I64d"
-#  define SCNiPTR     "I64i"
-#else  // _WIN64 ][
-#  define SCNdPTR     "ld"
-#  define SCNiPTR     "li"
-#endif  // _WIN64 ]
-
-// The fscanf macros for unsigned integers are:
-#define SCNo8       "o"
-#define SCNu8       "u"
-#define SCNx8       "x"
-#define SCNX8       "X"
-#define SCNoLEAST8  "o"
-#define SCNuLEAST8  "u"
-#define SCNxLEAST8  "x"
-#define SCNXLEAST8  "X"
-#define SCNoFAST8   "o"
-#define SCNuFAST8   "u"
-#define SCNxFAST8   "x"
-#define SCNXFAST8   "X"
-
-#define SCNo16       "ho"
-#define SCNu16       "hu"
-#define SCNx16       "hx"
-#define SCNX16       "hX"
-#define SCNoLEAST16  "ho"
-#define SCNuLEAST16  "hu"
-#define SCNxLEAST16  "hx"
-#define SCNXLEAST16  "hX"
-#define SCNoFAST16   "ho"
-#define SCNuFAST16   "hu"
-#define SCNxFAST16   "hx"
-#define SCNXFAST16   "hX"
-
-#define SCNo32       "lo"
-#define SCNu32       "lu"
-#define SCNx32       "lx"
-#define SCNX32       "lX"
-#define SCNoLEAST32  "lo"
-#define SCNuLEAST32  "lu"
-#define SCNxLEAST32  "lx"
-#define SCNXLEAST32  "lX"
-#define SCNoFAST32   "lo"
-#define SCNuFAST32   "lu"
-#define SCNxFAST32   "lx"
-#define SCNXFAST32   "lX"
-
-#define SCNo64       "I64o"
-#define SCNu64       "I64u"
-#define SCNx64       "I64x"
-#define SCNX64       "I64X"
-#define SCNoLEAST64  "I64o"
-#define SCNuLEAST64  "I64u"
-#define SCNxLEAST64  "I64x"
-#define SCNXLEAST64  "I64X"
-#define SCNoFAST64   "I64o"
-#define SCNuFAST64   "I64u"
-#define SCNxFAST64   "I64x"
-#define SCNXFAST64   "I64X"
-
-#define SCNoMAX     "I64o"
-#define SCNuMAX     "I64u"
-#define SCNxMAX     "I64x"
-#define SCNXMAX     "I64X"
-
-#ifdef _WIN64 // [
-#  define SCNoPTR     "I64o"
-#  define SCNuPTR     "I64u"
-#  define SCNxPTR     "I64x"
-#  define SCNXPTR     "I64X"
-#else  // _WIN64 ][
-#  define SCNoPTR     "lo"
-#  define SCNuPTR     "lu"
-#  define SCNxPTR     "lx"
-#  define SCNXPTR     "lX"
-#endif  // _WIN64 ]
-
-#endif // __STDC_FORMAT_MACROS ]
-
-// 7.8.2 Functions for greatest-width integer types
-
-// 7.8.2.1 The imaxabs function
-#define imaxabs _abs64
-
-// 7.8.2.2 The imaxdiv function
-
-// This is modified version of div() function from Microsoft's div.c found
-// in %MSVC.NET%\crt\src\div.c
-#ifdef STATIC_IMAXDIV // [
-static
-#else // STATIC_IMAXDIV ][
-_inline
-#endif // STATIC_IMAXDIV ]
-imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
-{
-   imaxdiv_t result;
-
-   result.quot = numer / denom;
-   result.rem = numer % denom;
-
-   if (numer < 0 && result.rem > 0) {
-      // did division wrong; must fix up
-      ++result.quot;
-      result.rem -= denom;
-   }
-
-   return result;
-}
-
-// 7.8.2.3 The strtoimax and strtoumax functions
-#define strtoimax _strtoi64
-#define strtoumax _strtoui64
-
-// 7.8.2.4 The wcstoimax and wcstoumax functions
-#define wcstoimax _wcstoi64
-#define wcstoumax _wcstoui64
-
-
-#endif // _MSC_INTTYPES_H_ ]
diff --git a/include/c99/stdbool.h b/include/c99/stdbool.h
deleted file mode 100644
index 99a735d..0000000
--- a/include/c99/stdbool.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2007-2010 VMware, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS 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.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- **************************************************************************/
-
-#ifndef _STDBOOL_H_
-#define _STDBOOL_H_
-
-#ifndef __cplusplus
-
-#define false   0
-#define true    1
-#define bool    _Bool
-
-/* For compilers that don't have the builtin _Bool type. */
-#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3)
-typedef unsigned char _Bool;
-#endif
-
-#endif /* !__cplusplus */
-
-#define __bool_true_false_are_defined   1
-
-#endif /* !_STDBOOL_H_ */
diff --git a/include/c99/stdint.h b/include/c99/stdint.h
deleted file mode 100644
index d02608a..0000000
--- a/include/c99/stdint.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// ISO C9x  compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
-// 
-//  Copyright (c) 2006-2008 Alexander Chemeris
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-// 
-//   1. Redistributions of source code must retain the above copyright notice,
-//      this list of conditions and the following disclaimer.
-// 
-//   2. Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-// 
-//   3. The name of the author may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// 
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include <limits.h>
-
-// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler give many errors like this:
-//   error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#ifdef __cplusplus
-extern "C" {
-#endif
-#  include <wchar.h>
-#ifdef __cplusplus
-}
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-#     define _W64 __w64
-#  else
-#     define _W64
-#  endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-
-// Visual Studio 6 and Embedded Visual C++ 4 doesn't
-// realize that, e.g. char has the same size as __int8
-// so we give up on __intX for them.
-#if (_MSC_VER < 1300)
-   typedef signed char       int8_t;
-   typedef signed short      int16_t;
-   typedef signed int        int32_t;
-   typedef unsigned char     uint8_t;
-   typedef unsigned short    uint16_t;
-   typedef unsigned int      uint32_t;
-#else
-   typedef signed __int8     int8_t;
-   typedef signed __int16    int16_t;
-   typedef signed __int32    int32_t;
-   typedef unsigned __int8   uint8_t;
-   typedef unsigned __int16  uint16_t;
-   typedef unsigned __int32  uint32_t;
-#endif
-typedef signed __int64       int64_t;
-typedef unsigned __int64     uint64_t;
-
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t    int_least8_t;
-typedef int16_t   int_least16_t;
-typedef int32_t   int_least32_t;
-typedef int64_t   int_least64_t;
-typedef uint8_t   uint_least8_t;
-typedef uint16_t  uint_least16_t;
-typedef uint32_t  uint_least32_t;
-typedef uint64_t  uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t    int_fast8_t;
-typedef int16_t   int_fast16_t;
-typedef int32_t   int_fast32_t;
-typedef int64_t   int_fast64_t;
-typedef uint8_t   uint_fast8_t;
-typedef uint16_t  uint_fast16_t;
-typedef uint32_t  uint_fast32_t;
-typedef uint64_t  uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
-   typedef signed __int64    intptr_t;
-   typedef unsigned __int64  uintptr_t;
-#else // _WIN64 ][
-   typedef _W64 signed int   intptr_t;
-   typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t   intmax_t;
-typedef uint64_t  uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN     ((int8_t)_I8_MIN)
-#define INT8_MAX     _I8_MAX
-#define INT16_MIN    ((int16_t)_I16_MIN)
-#define INT16_MAX    _I16_MAX
-#define INT32_MIN    ((int32_t)_I32_MIN)
-#define INT32_MAX    _I32_MAX
-#define INT64_MIN    ((int64_t)_I64_MIN)
-#define INT64_MAX    _I64_MAX
-#define UINT8_MAX    _UI8_MAX
-#define UINT16_MAX   _UI16_MAX
-#define UINT32_MAX   _UI32_MAX
-#define UINT64_MAX   _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN    INT8_MIN
-#define INT_LEAST8_MAX    INT8_MAX
-#define INT_LEAST16_MIN   INT16_MIN
-#define INT_LEAST16_MAX   INT16_MAX
-#define INT_LEAST32_MIN   INT32_MIN
-#define INT_LEAST32_MAX   INT32_MAX
-#define INT_LEAST64_MIN   INT64_MIN
-#define INT_LEAST64_MAX   INT64_MAX
-#define UINT_LEAST8_MAX   UINT8_MAX
-#define UINT_LEAST16_MAX  UINT16_MAX
-#define UINT_LEAST32_MAX  UINT32_MAX
-#define UINT_LEAST64_MAX  UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN    INT8_MIN
-#define INT_FAST8_MAX    INT8_MAX
-#define INT_FAST16_MIN   INT16_MIN
-#define INT_FAST16_MAX   INT16_MAX
-#define INT_FAST32_MIN   INT32_MIN
-#define INT_FAST32_MAX   INT32_MAX
-#define INT_FAST64_MIN   INT64_MIN
-#define INT_FAST64_MAX   INT64_MAX
-#define UINT_FAST8_MAX   UINT8_MAX
-#define UINT_FAST16_MAX  UINT16_MAX
-#define UINT_FAST32_MAX  UINT32_MAX
-#define UINT_FAST64_MAX  UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-#  define INTPTR_MIN   INT64_MIN
-#  define INTPTR_MAX   INT64_MAX
-#  define UINTPTR_MAX  UINT64_MAX
-#else // _WIN64 ][
-#  define INTPTR_MIN   INT32_MIN
-#  define INTPTR_MAX   INT32_MAX
-#  define UINTPTR_MAX  UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN   INT64_MIN
-#define INTMAX_MAX   INT64_MAX
-#define UINTMAX_MAX  UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-#  define PTRDIFF_MIN  _I64_MIN
-#  define PTRDIFF_MAX  _I64_MAX
-#else  // _WIN64 ][
-#  define PTRDIFF_MIN  _I32_MIN
-#  define PTRDIFF_MAX  _I32_MAX
-#endif  // _WIN64 ]
-
-#define SIG_ATOMIC_MIN  INT_MIN
-#define SIG_ATOMIC_MAX  INT_MAX
-
-#ifndef SIZE_MAX // [
-#  ifdef _WIN64 // [
-#     define SIZE_MAX  _UI64_MAX
-#  else // _WIN64 ][
-#     define SIZE_MAX  _UI32_MAX
-#  endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
-#ifndef WCHAR_MIN // [
-#  define WCHAR_MIN  0
-#endif  // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-#  define WCHAR_MAX  _UI16_MAX
-#endif  // WCHAR_MAX ]
-
-#define WINT_MIN  0
-#define WINT_MAX  _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val)  val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val)  val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C   INT64_C
-#define UINTMAX_C  UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/include/pixelflinger2/pixelflinger2_constants.h b/include/pixelflinger2/pixelflinger2_constants.h
deleted file mode 100644
index 14ba589..0000000
--- a/include/pixelflinger2/pixelflinger2_constants.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_CONSTANTS_H_
-#define _PIXELFLINGER2_CONSTANTS_H_
-
-#define GGL_MAXVERTEXATTRIBS 8           
-#define GGL_MAXVERTEXUNIFORMVECTORS 128 
-#define GGL_MAXVARYINGVECTORS 8           
-#define GGL_MAXVERTEXTEXTUREIMAGEUNITS 8  
-#define GGL_MAXCOMBINEDTEXTUREIMAGEUNITS 16 /* samplers used in vertex + fragment */
-#define GGL_MAXTEXTUREIMAGEUNITS 8 /* samplers used in fragment only */      
-#define GGL_MAXFRAGMENTUNIFORMVECTORS 16
-#define GGL_MAXDRAWBUFFERS 2
-
-// these describe the layout of VertexOut when fed to fs, 
-// it must NOT change and match VertexOut in pixelflinger_2.h
-#define GGL_VS_OUTPUT_OFFSET            0
-#define GGL_VS_OUTPUT_POSITION_INDEX    1
-
-#define GGL_FS_INPUT_OFFSET             1 // vector4 index of first fs input in VertexOut
-#define GGL_FS_INPUT_FRAGCOORD_INDEX    0
-#define GGL_FS_INPUT_VARYINGS_INDEX     (GGL_FS_INPUT_FRAGCOORD_INDEX + 1)
-#define GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX (GGL_FS_INPUT_VARYINGS_INDEX + GGL_MAXVARYINGVECTORS)
-
-#define GGL_FS_OUTPUT_OFFSET            (GGL_FS_INPUT_OFFSET + GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX + 1)
-#define GGL_FS_OUTPUT_FRAGCOLOR_INDEX   0
-
-#define GGL_MAX_VIEWPORT_DIMS           4096
-
-#endif // _PIXELFLINGER2_CONSTANTS_H_
diff --git a/include/pixelflinger2/pixelflinger2_format.h b/include/pixelflinger2/pixelflinger2_format.h
deleted file mode 100644
index f95a88d..0000000
--- a/include/pixelflinger2/pixelflinger2_format.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_FORMAT_H_
-#define _PIXELFLINGER2_FORMAT_H_
-
-#include <stdint.h>
-#include <sys/types.h>
-
-enum GGLPixelFormat {
-    // these constants need to match those
-    // in graphics/PixelFormat.java, ui/PixelFormat.h, BlitHardware.h
-    GGL_PIXEL_FORMAT_UNKNOWN    =   0,
-    GGL_PIXEL_FORMAT_NONE       =   0,
-
-    GGL_PIXEL_FORMAT_RGBA_8888   =   1,  // 4x8-bit ARGB
-    GGL_PIXEL_FORMAT_RGBX_8888   =   2,  // 3x8-bit RGB stored in 32-bit chunks
-    GGL_PIXEL_FORMAT_RGB_888     =   3,  // 3x8-bit RGB
-    GGL_PIXEL_FORMAT_RGB_565     =   4,  // 16-bit RGB
-    GGL_PIXEL_FORMAT_BGRA_8888   =   5,  // 4x8-bit BGRA
-    GGL_PIXEL_FORMAT_RGBA_5551   =   6,  // 16-bit RGBA
-    GGL_PIXEL_FORMAT_RGBA_4444   =   7,  // 16-bit RGBA
-
-    GGL_PIXEL_FORMAT_A_8         =   8,  // 8-bit A
-    GGL_PIXEL_FORMAT_L_8         =   9,  // 8-bit L (R=G=B = L)
-    GGL_PIXEL_FORMAT_LA_88       = 0xA,  // 16-bit LA
-    GGL_PIXEL_FORMAT_RGB_332     = 0xB,  // 8-bit RGB (non paletted)
-
-    // reserved range. don't use.
-    GGL_PIXEL_FORMAT_RESERVED_10 = 0x10,
-    GGL_PIXEL_FORMAT_RESERVED_11 = 0x11,
-    GGL_PIXEL_FORMAT_RESERVED_12 = 0x12,
-    GGL_PIXEL_FORMAT_RESERVED_13 = 0x13,
-    GGL_PIXEL_FORMAT_RESERVED_14 = 0x14,
-    GGL_PIXEL_FORMAT_RESERVED_15 = 0x15,
-    GGL_PIXEL_FORMAT_RESERVED_16 = 0x16,
-    GGL_PIXEL_FORMAT_RESERVED_17 = 0x17,
-
-    // reserved/special formats
-    GGL_PIXEL_FORMAT_Z_16       =  0x18,
-    GGL_PIXEL_FORMAT_S_8        =  0x19,
-    GGL_PIXEL_FORMAT_SZ_24      =  0x1A,
-    GGL_PIXEL_FORMAT_SZ_8       =  0x1B,
-
-    GGL_PIXEL_FORMAT_Z_32       = 0x1C,
-    
-    // reserved range. don't use.
-    GGL_PIXEL_FORMAT_RESERVED_20 = 0x20,
-    GGL_PIXEL_FORMAT_RESERVED_21 = 0x21,
-    
-    
-    // must be last
-    GGL_PIXEL_FORMAT_COUNT      = 0xFF
-};
-
-enum GGLFormatComponents {
-        GGL_STENCIL_INDEX               = 0x1901,
-        GGL_DEPTH_COMPONENT             = 0x1902,
-        GGL_ALPHA                       = 0x1906,
-        GGL_RGB                         = 0x1907,
-        GGL_RGBA                        = 0x1908,
-        GGL_LUMINANCE                   = 0x1909,
-        GGL_LUMINANCE_ALPHA             = 0x190A,
-};
-
-enum GGLFormatComponentIndex {
-    GGL_INDEX_ALPHA   = 0,
-    GGL_INDEX_RED     = 1,
-    GGL_INDEX_GREEN   = 2,
-    GGL_INDEX_BLUE    = 3,
-    GGL_INDEX_STENCIL = 0,
-    GGL_INDEX_DEPTH   = 1,
-    GGL_INDEX_Y       = 0,
-    GGL_INDEX_CB      = 1,
-    GGL_INDEX_CR      = 2,
-};
-
-typedef struct {
-#ifdef __cplusplus
-    enum {
-        ALPHA   = GGL_INDEX_ALPHA,
-        RED     = GGL_INDEX_RED,
-        GREEN   = GGL_INDEX_GREEN,
-        BLUE    = GGL_INDEX_BLUE,
-        STENCIL = GGL_INDEX_STENCIL,
-        DEPTH   = GGL_INDEX_DEPTH,
-        LUMA    = GGL_INDEX_Y,
-        CHROMAB = GGL_INDEX_CB,
-        CHROMAR = GGL_INDEX_CR,
-    };
-    inline uint32_t mask(int i) const {
-            return ((1<<(c[i].h-c[i].l))-1)<<c[i].l;
-    }
-    inline uint32_t bits(int i) const {
-            return c[i].h - c[i].l;
-    }
-#endif
-    uint8_t     size;       // bytes per pixel
-    uint8_t     bitsPerPixel;
-    union {
-        struct {
-            uint8_t     ah;             // alpha high bit position + 1
-            uint8_t     al;             // alpha low bit position
-            uint8_t     rh;             // red high bit position + 1
-            uint8_t     rl;             // red low bit position
-            uint8_t     gh;             // green high bit position + 1
-            uint8_t     gl;             // green low bit position
-            uint8_t     bh;             // blue high bit position + 1
-            uint8_t     bl;             // blue low bit position
-        };
-        struct {
-            uint8_t h;
-            uint8_t l;
-        } __attribute__((__packed__)) c[4];
-    } __attribute__((__packed__));
-        uint16_t    components; // GGLFormatComponents
-} GGLFormat;
-
-
-#ifdef __cplusplus
-extern "C" const GGLFormat* gglGetPixelFormatTable(size_t* numEntries = 0);
-#else
-const GGLFormat* gglGetPixelFormatTable(size_t* numEntries);
-#endif
-
-#endif // _PIXELFLINGER2_FORMAT_H_
diff --git a/include/pixelflinger2/pixelflinger2_interface.h b/include/pixelflinger2/pixelflinger2_interface.h
deleted file mode 100644
index f2db05f..0000000
--- a/include/pixelflinger2/pixelflinger2_interface.h
+++ /dev/null
@@ -1,369 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_INTERFACE_H_
-#define _PIXELFLINGER2_INTERFACE_H_
-
-#include "GLES2/gl2.h"
-#include "pixelflinger2/pixelflinger2_format.h"
-#include "pixelflinger2/pixelflinger2_constants.h"
-#include "pixelflinger2/pixelflinger2_vector4.h"
-
-typedef struct gl_shader gl_shader_t;
-typedef struct gl_shader_program gl_shader_program_t;
-
-typedef struct VertexInput {
-   Vector4 attributes[GGL_MAXVERTEXATTRIBS]; // vert input
-}
-#ifndef __arm__
-__attribute__ ((aligned (16))) // LLVM generates movaps on X86, needs 16 bytes align
-#endif
-VertexInput_t;
-
-// the layout must NOT change, and must match the #defines in constants.h
-typedef struct VertexOutput {
-   Vector4 pointSize; // vert output
-   Vector4 position; // vert output and frag input gl_FragCoord
-   Vector4 varyings[GGL_MAXVARYINGVECTORS];
-   Vector4 frontFacingPointCoord; // frag input, gl_FrontFacing gl_PointCoord yzw
-   Vector4 fragColor[GGL_MAXDRAWBUFFERS]; // frag output, gl_FragData
-}
-#ifndef __arm__
-__attribute__ ((aligned (16)))
-#endif
-VertexOutput_t ;
-
-typedef struct GGLSurface {
-   unsigned width, height;
-   enum GGLPixelFormat format;
-   void * data;
-   unsigned stride, version;
-} GGLSurface_t;
-
-typedef struct GGLTexture {
-   unsigned type; // GL_TEXTURE_2D, or GL_TEXTURE_CUBE_MAP
-
-   // currently only support RGBA_8888, RGBX_8888 and RGB_565
-   // storage uses either int or short
-   enum GGLPixelFormat format; // affects vs/fs jit
-
-   unsigned width, height; // base level dimension
-   unsigned levelCount; // mipmapped texture requires power-of-2 width and height
-
-   // data layout is level 0 of first surface (cubemap +x), level 0 of second surface (for cube map, -x),
-   // level 0 of 3rd surface (cubemap +y), cubemap level 0 -y, cubemap level 0 +z,
-   // cubemap level 0 -z, level 1 of first surface,
-   // then level 1 of 1st surface, level 1 of 2nd surface ....
-   void * levels;
-
-   // the following affects vs/fs jit; must fit in byte; size used in GetShaderKey
-   enum GGLTextureWrap {
-      GGL_REPEAT = 0, GGL_CLAMP_TO_EDGE = 1, GGL_MIRRORED_REPEAT = 2
-} wrapS :
-2, wrapT :
-   2;
-
-   enum GGLTextureMinFilter {
-      GGL_NEAREST = 0, GGL_LINEAR, /*GGL_NEAREST_MIPMAP_NEAREST = 2,
-      GGL_LINEAR_MIPMAP_NEAREST, GGL_NEAREST_MIPMAP_LINEAR, GGL_LINEAR_MIPMAP_LINEAR = 5*/
-} minFilter :
-1, magFilter :
-   1; // only GGL_NEAREST and GGL_LINEAR
-} GGLTexture_t;
-
-typedef struct GGLStencilState {
-   unsigned char ref, mask; // ref is masked during StencilFuncSeparate
-
-   // GL_NEVER = 0, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL,
-   // GL_ALWAYS; value = GLenum  & 0x7 (GLenum is 0x200-0x207)
-   unsigned char func; // compare function
-
-   // GL_ZERO = 0, GL_KEEP = 1, GL_REPLACE, GL_INCR, GL_DECR, GL_INVERT, GL_INCR_WRAP,
-   // GL_DECR_WRAP = 7; value = 0 | GLenum - GL_KEEP | GL_INVERT | GLenum - GL_INCR_WRAP
-   unsigned char sFail, dFail, dPass; // operations
-}  GGLStencilState_t;
-
-typedef struct GGLActiveStencil { // do not change layout, used in GenerateScanLine
-   unsigned char face; // FRONT = 0, BACK = 1
-   unsigned char ref, mask;
-} GGLActiveStencil_t;
-
-typedef struct GGLBufferState { // all affect scanline jit
-   enum GGLPixelFormat colorFormat, depthFormat, stencilFormat;
-unsigned stencilTest :
-   1;
-unsigned depthTest :
-   1;
-   // same as sf/bFunc; GL_NEVER = 0, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL,
-   // GL_GEQUAL, GL_ALWAYS = 7; value = GLenum  & 0x7 (GLenum is 0x200-0x207)
-unsigned depthFunc :
-   3;
-} GGLBufferState_t;
-
-typedef struct GGLBlendState { // all values affect scanline jit
-   unsigned char color[4]; // rgba[0,255]
-
-   // value = 0,1 | GLenum - GL_SRC_COLOR + 2 | GLenum - GL_CONSTANT_COLOR + 11
-   enum GGLBlendFactor {
-      GGL_ZERO = 0, GGL_ONE, GGL_SRC_COLOR = 2, GGL_ONE_MINUS_SRC_COLOR, GGL_SRC_ALPHA, GGL_ONE_MINUS_SRC_ALPHA,
-      GGL_DST_ALPHA, GGL_ONE_MINUS_DST_ALPHA, GGL_DST_COLOR, GGL_ONE_MINUS_DST_COLOR,
-      GGL_SRC_ALPHA_SATURATE, GGL_CONSTANT_COLOR = 11, GGL_ONE_MINUS_CONSTANT_COLOR,
-      GGL_CONSTANT_ALPHA, GGL_ONE_MINUS_CONSTANT_ALPHA
-} scf :
-4, saf :
-4, dcf :
-4, daf :
-   4;
-
-   //value = GLenum - GL_FUNC_ADD
-   enum GGLBlendFunc {
-      GGL_FUNC_ADD = 0, GGL_FUNC_SUBTRACT = 4,
-      GGL_FUNC_REVERSE_SUBTRACT = 5
-} ce :
-3, ae :
-   3;
-
-unsigned enable :
-   1;
-} GGLBlendState_t;
-
-typedef struct GGLTextureState {
-   // format affects vs and fs jit
-   GGLTexture_t textures[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS]; // the active samplers
-   // array of pointers to texture surface data synced to textures; used by LLVM generated texture sampler
-   void * textureData[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS];
-   // array of texture dimensions synced to textures; by LLVM generated texture sampler
-   unsigned textureDimensions[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS * 2];
-} GGLTextureState_t;
-
-typedef struct GGLState {
-   GGLStencilState_t frontStencil, backStencil; // all affect scanline jit
-
-   GGLBufferState_t bufferState; // all affect scanline jit
-
-   GGLBlendState_t blendState; // all affect scanline jit
-
-   GGLTextureState_t textureState; // most affect vs/fs jit
-
-} GGLState_t;
-
-// most functions are according to GL ES 2.0 spec and uses GLenum values
-// there is some error checking for invalid GLenum
-typedef struct GGLInterface GGLInterface_t;
-struct GGLInterface {
-   // these 5 should be moved into libAgl2
-   void (* CullFace)(GGLInterface_t * iface, GLenum mode);
-   void (* FrontFace)(GGLInterface_t * iface, GLenum mode);
-   void (* DepthRangef)(GGLInterface_t * iface, GLclampf zNear, GLclampf zFar);
-   void (* Viewport)(GGLInterface_t * iface, GLint x, GLint y, GLsizei width, GLsizei height);
-   void (* ViewportTransform)(const GGLInterface_t * iface, Vector4 * v);
-
-
-   void (* BlendColor)(GGLInterface_t * iface, GLclampf red, GLclampf green,
-                       GLclampf blue, GLclampf alpha);
-   void (* BlendEquationSeparate)(GGLInterface_t * iface, GLenum modeRGB, GLenum modeAlpha);
-   void (* BlendFuncSeparate)(GGLInterface_t * iface, GLenum srcRGB, GLenum dstRGB,
-                              GLenum srcAlpha, GLenum dstAlpha);
-   void (* EnableDisable)(GGLInterface_t * iface, GLenum cap, GLboolean enable);
-
-   void (* DepthFunc)(GGLInterface_t * iface, GLenum func);
-   void (* StencilFuncSeparate)(GGLInterface_t * iface, GLenum face, GLenum func,
-                                GLint ref, GLuint mask);
-   void (* StencilOpSeparate)(GGLInterface_t * iface, GLenum face, GLenum sfail,
-                              GLenum dpfail, GLenum dppass);
-   // select GL_FRONT or GL_BACK stencil state before raster/scanline
-   void (* StencilSelect)(const GGLInterface_t * iface, GLenum face);
-   void (* ClearStencil)(GGLInterface_t * iface, GLint s);
-   void (* ClearColor)(GGLInterface_t * iface, GLclampf r, GLclampf g, GLclampf b, GLclampf a);
-   void (* ClearDepthf)(GGLInterface_t * iface, GLclampf d);
-   void (* Clear)(const GGLInterface_t * iface, GLbitfield buf);
-
-   // shallow copy, surface data pointed to must be valid until texture is set to another texture
-   // libAgl2 needs to check ret of ShaderUniform to detect assigning to sampler unit
-   void (* SetSampler)(GGLInterface_t * iface, const unsigned sampler, GGLTexture_t * texture);
-
-   // shallow copy, surface data must remain valid; use GL_COLOR_BUFFER_BIT,
-   // GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT; format must be RGBA_8888, Z_32 or S_8
-   void (* SetBuffer)(GGLInterface_t * iface, const GLenum type, GGLSurface_t * surface);
-
-
-   // runs active vertex shader using currently set program; no error checking
-   void (* ProcessVertex)(const GGLInterface_t * iface, const VertexInput_t * input,
-                          VertexOutput_t * output);
-   // draws a triangle given 3 unprocessed vertices; should be moved into libAgl2
-   void (* DrawTriangle)(const GGLInterface_t * iface, const VertexInput_t * v0,
-                         const VertexInput_t * v1, const VertexInput_t * v2);
-   // rasters a vertex processed triangle using active program; scizors to frame surface
-   void (* RasterTriangle)(const GGLInterface_t * iface, const VertexOutput_t * v1,
-                           const VertexOutput_t * v2, const VertexOutput_t * v3);
-   // rasters a vertex processed trapezoid using active program; scizors to frame surface
-   void (* RasterTrapezoid)(const GGLInterface_t * iface, const VertexOutput_t * tl,
-                            const VertexOutput_t * tr, const VertexOutput_t * bl,
-                            const VertexOutput_t * br);
-
-   // scan line given left and right processed and scizored vertices
-   void (* ScanLine)(const GGLInterface_t * iface, const VertexOutput_t * v1,
-                     const VertexOutput_t * v2);
-
-   // creates empty shader
-   gl_shader_t * (* ShaderCreate)(const GGLInterface_t * iface, GLenum type);
-
-   void (* ShaderSource)(gl_shader_t * shader, GLsizei count, const char ** string, const int * length);
-
-   // compiles a shader given glsl; returns GL_TRUE on success; glsl only used during call
-   GLboolean (* ShaderCompile)(const GGLInterface_t * iface, gl_shader_t * shader,
-                               const char * glsl, const char ** infoLog);
-
-   void (* ShaderDelete)(const GGLInterface_t * iface, gl_shader_t * shader);
-
-   // creates empty program
-   gl_shader_program_t * (* ShaderProgramCreate)(const GGLInterface_t * iface);
-
-   // attaches a shader to program
-   void (* ShaderAttach)(const GGLInterface_t * iface, gl_shader_program_t * program,
-                         gl_shader_t * shader);
-
-   // detaches a shader from program
-   void (* ShaderDetach)(const GGLInterface_t * iface, gl_shader_program_t * program,
-                         gl_shader_t * shader);
-
-   // duplicates shaders to program, and links varyings / attributes
-   GLboolean (* ShaderProgramLink)(gl_shader_program_t * program, const char ** infoLog);
-   // frees program
-   void (* ShaderProgramDelete)(GGLInterface_t * iface, gl_shader_program_t * program);
-
-   // LLVM JIT and set as active program
-   void (* ShaderUse)(GGLInterface_t * iface, gl_shader_program_t * program);
-
-   void (* ShaderGetiv)(const gl_shader_t * shader, const GLenum pname, GLint * params);
-
-   void (* ShaderGetInfoLog)(const gl_shader_t * shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-
-   void (* ShaderProgramGetiv)(const gl_shader_program_t * program, const GLenum pname, GLint * params);
-
-   void (* ShaderProgramGetInfoLog)(const gl_shader_program_t * program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-
-   // bind attribute location before linking
-   void (* ShaderAttributeBind)(const gl_shader_program_t * program,
-                                GLuint index, const GLchar * name);
-   GLint (* ShaderAttributeLocation)(const gl_shader_program_t * program,
-                                     const char * name);
-   // returns fragment input location and vertex output location for varying of linked program
-   GLint (* ShaderVaryingLocation)(const gl_shader_program_t * program,
-                                   const char * name, GLint * vertexOutputLocation);
-   // gets uniform location for linked program
-   GLint (* ShaderUniformLocation)(const gl_shader_program_t * program,
-                                   const char * name);
-   void (* ShaderUniformGetfv)(gl_shader_program_t * program,
-                               GLint location, GLfloat * params);
-   void (* ShaderUniformGetiv)(gl_shader_program_t * program,
-                               GLint location, GLint * params);
-
-   // retrieves the tmu each sampler is set to, sampler2tmu[sampler] == -1 means not used
-   void (* ShaderUniformGetSamplers)(const gl_shader_program_t * program,
-                                     int sampler2tmu[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS]);
-
-   // updates linked program uniform value by location; return >= 0 indicates sampler assigned
-   GLint (* ShaderUniform)(gl_shader_program_t * program,
-                           GLint location, GLsizei count, const GLvoid *values, GLenum type);
-
-   // updates linked program uniform matrix value by location
-   void (* ShaderUniformMatrix)(gl_shader_program_t * program, GLint cols,
-                                GLint rows, GLint location, GLsizei count,
-                                GLboolean transpose, const GLfloat *values);
-};
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-   GGLInterface_t * CreateGGLInterface();
-
-   void DestroyGGLInterface(GGLInterface_t * interface);
-
-   // creates empty shader
-   gl_shader_t * GGLShaderCreate(GLenum type);
-
-   // compiles a shader given glsl; returns GL_TRUE on success; glsl only used during call; use infoLog to retrieve status
-   GLboolean GGLShaderCompile(gl_shader_t * shader, const char * glsl, const char ** infoLog);
-
-   void GGLShaderDelete(gl_shader_t * shader);
-
-   // creates empty program
-   gl_shader_program_t * GGLShaderProgramCreate();
-
-   // attaches a shader to program
-   unsigned GGLShaderAttach(gl_shader_program_t * program, gl_shader_t * shader);
-
-   // detaches a shader from program
-   unsigned GGLShaderDetach(gl_shader_program_t * program, gl_shader_t * shader);
-
-   // duplicates shaders to program, and links varyings / attributes;
-   GLboolean GGLShaderProgramLink(gl_shader_program_t * program, const char ** infoLog);
-
-   // frees program
-   void GGLShaderProgramDelete(gl_shader_program_t * program);
-
-   // LLVM JIT and set as active program, also call after gglState change to re-JIT
-   void GGLShaderUse(void * llvmCtx, const GGLState_t * gglState, gl_shader_program_t * program);
-
-   void GGLShaderGetiv(const gl_shader_t * shader, const GLenum pname, GLint * params);
-
-   void GGLShaderGetInfoLog(const gl_shader_t * shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-   
-   void GGLShaderProgramGetiv(const gl_shader_program_t * program, const GLenum pname, GLint * params);
-
-   void GGLShaderProgramGetInfoLog(const gl_shader_program_t * program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-
-   // bind attribute location before linking
-   void GGLShaderAttributeBind(const gl_shader_program_t * program,
-                               GLuint index, const GLchar * name);
-   GLint GGLShaderAttributeLocation(const gl_shader_program_t * program,
-                                    const char * name);
-   // returns fragment input location and vertex output location for varying of linked program
-   GLint GGLShaderVaryingLocation(const gl_shader_program_t * program,
-                                  const char * name, GLint * vertexOutputLocation);
-   // gets uniform location for linked program
-   GLint GGLShaderUniformLocation(const gl_shader_program_t * program,
-                                  const char * name);
-
-   void GGLShaderUniformMatrix(gl_shader_program_t * program, GLint cols, GLint rows,
-                            GLint location, GLsizei count, GLboolean transpose, const GLfloat *values);
-
-   // retrieves the tmu each sampler is set to, sampler2tmu[sampler] == -1 means not used
-   void GGLShaderUniformGetSamplers(const gl_shader_program_t * program,
-                                    int sampler2tmu[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS]);
-
-   void GGLProcessVertex(const gl_shader_program_t * program, const VertexInput_t * input,
-                         VertexOutput_t * output, const float (*constants)[4]);
-
-   // scan line given left and right processed and scizored vertices
-   // depth value bitcast float->int, if negative then ^= 0x7fffffff
-   void GGLScanLine(const gl_shader_program_t * program, const enum GGLPixelFormat colorFormat,
-                    void * frameBuffer, int * depthBuffer, unsigned char * stencilBuffer,
-                    unsigned bufferWidth, unsigned bufferHeight, GGLActiveStencil_t * activeStencil,
-                    const VertexOutput_t * start, const VertexOutput_t * end, const float (*constants)[4]);
-
-//   void GGLProcessFragment(const VertexOutput_t * inputs, VertexOutput_t * outputs,
-//                           const float (*constants[4]));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // #ifndef _PIXELFLINGER2_INTERFACE_H_
diff --git a/include/pixelflinger2/pixelflinger2_vector4.h b/include/pixelflinger2/pixelflinger2_vector4.h
deleted file mode 100644
index 4f10663..0000000
--- a/include/pixelflinger2/pixelflinger2_vector4.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/** 
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License"); 
- ** you may not use this file except in compliance with the License. 
- ** You may obtain a copy of the License at 
- **
- **     http://www.apache.org/licenses/LICENSE-2.0 
- **
- ** Unless required by applicable law or agreed to in writing, software 
- ** distributed under the License is distributed on an "AS IS" BASIS, 
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- ** See the License for the specific language governing permissions and 
- ** limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_VECTOR4_H_
-#define _PIXELFLINGER2_VECTOR4_H_
-
-#ifdef __cplusplus
-
-template <typename Type> struct Vec4 {
-    union {
-        struct { Type x, y, z, w; };
-        struct { Type r, g, b, a; };
-        struct { Type S, T, R, Q; };
-#if !USE_FIXED_POINT        
-        float f[4];
-		unsigned u[4];
-        int i[4];
-#endif
-#if defined(__ARM_HAVE_NEON) && USE_NEON
-        float32x4_t f4;
-#endif
-    };
-    
-    //Vec4() : x(0), y(0), z(0), w(0) {}
-    Vec4() {}
-    Vec4(Type X, Type Y, Type Z, Type W) : x(X), y(Y), z(Z), w(W) {}
-    Vec4(Type X) : x(X), y(X), z(X), w(X) {}
-    
-#define VECTOR4_OP_UNARY(op,rhs) { \
-x op rhs.x; \
-y op rhs.y; \
-z op rhs.z; \
-w op rhs.w; }
-    
-#define VECTOR4_OP_UNARY_SCALAR(op,rhs) { \
-x op rhs; \
-y op rhs; \
-z op rhs; \
-w op rhs; }
-    
-    inline void operator += (const Vec4<Type> & rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY(+=,rhs)
-    inline void operator -= (const Vec4<Type> & rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY(-=,rhs)
-    inline void operator *= (const Vec4<Type> & rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY(*=,rhs)
-    inline void operator /= (const Vec4<Type> & rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY(/=,rhs)
-    inline void operator *= (Type rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY_SCALAR(*=,rhs)
-    inline void operator /= (Type rhs) __attribute__((always_inline))
-    VECTOR4_OP_UNARY_SCALAR(/=,rhs)
-    
-    inline Vec4 operator+(const Vec4 & rhs) const
-    { Vec4 res = *this; res += rhs; return res; }
-    
-#undef VECTOR4_OP_UNARY
-#undef VECTOR4_OP_UNARY_SCALAR
-    
-    void CrossProduct3(const Vec4<Type> & lhs, const Vec4<Type> & rhs)
-    {
-        x = lhs.y * rhs.z - lhs.z * rhs.y;
-        y = lhs.z * rhs.x - lhs.x * rhs.z;
-        z = lhs.y * rhs.x - lhs.x * rhs.y;
-        w = 0;
-    }
-    
-    void LShr(const unsigned shift) { u[0] >>= shift; u[1] >>= shift; u[2] >>= shift; u[3] >>= shift; }
-    void AShr(const unsigned shift) { i[0] >>= shift; i[1] >>= shift; i[2] >>= shift; i[3] >>= shift; }
-    
-    bool operator==(const Vec4 & rhs) const { return u[0] == rhs.u[0] && u[1] == rhs.u[1] && u[2] == rhs.u[2] && u[3] == rhs.u[3]; }
-    bool operator!=(const Vec4 & rhs) const { return !(*this == rhs); }
-};
-
-#if defined(__ARM_HAVE_NEON) && USE_NEON
-template <> inline void Vec4<float>::operator += (const Vec4<float> & rhs) __attribute__((always_inline));
-template <> inline void Vec4<float>::operator += (const Vec4<float> & rhs)
-{ f4 = vaddq_f32(f4, rhs.f4); }
-template <> inline void Vec4<float>::operator -= (const Vec4<float> & rhs)  __attribute__((always_inline));
-template <> inline void Vec4<float>::operator -= (const Vec4<float> & rhs)
-{ f4 = vsubq_f32(f4, rhs.f4); }
-template <> inline void Vec4<float>::operator *= (float rhs) __attribute__((always_inline));
-template <> inline void Vec4<float>::operator *= (float rhs)
-{ f4 = vmulq_n_f32(f4, rhs); }
-template <> inline void Vec4<float>::operator /= (float rhs) __attribute__((always_inline));
-template <> inline void Vec4<float>::operator /= (float rhs)
-{ f4 = vmulq_n_f32(f4, 1 / rhs); }
-#endif // #if defined(__ARM_HAVE_NEON) && USE_NEON
-
-#if USE_FIXED_POINT
-deprecated, should be removed
-/*#define FIXED_POINT_ONE 0x10000
-#define FIXED_POINT_SHIFT 16
-struct FixedPoint
-{
-    int val;
-    //FixedPoint() {}
-    //explicit FixedPoint(int v) : val(v << FIXED_POINT_SHIFT) {}
-    //explicit FixedPoint(float v) : val(v * (2 << FIXED_POINT_SHIFT)) {}
-    //explicit FixedPoint(double v) : val(v * (2 << FIXED_POINT_SHIFT)) {}
-    static FixedPoint From(int v) { FixedPoint x; x.val = v << FIXED_POINT_SHIFT; return x; }
-    static FixedPoint From(unsigned v) { FixedPoint x; x.val = v << FIXED_POINT_SHIFT; return x; }
-    static FixedPoint From(float v) { FixedPoint x; x.val = v * (2 << FIXED_POINT_SHIFT); return x; }
-    static FixedPoint One() { FixedPoint x; x.val = FIXED_POINT_ONE; return x; }
-    static FixedPoint Zero() { FixedPoint x; x.val = 0; return x; }
-    FixedPoint operator-() const
-    {
-        FixedPoint res;
-        res.val = -val;
-        return res;
-    }
-    FixedPoint operator+(const FixedPoint & rhs) const
-    {
-        FixedPoint res;
-        res.val = val + rhs.val;
-        return res;
-    }
-    FixedPoint operator-(const FixedPoint & rhs) const
-    {
-        FixedPoint res;
-        res.val = val - rhs.val;
-        return res;
-    }
-    FixedPoint operator*(const FixedPoint & rhs) const
-    {
-        FixedPoint res;
-        res.val = (val >> 8) * (rhs.val >> 8);
-        return res;
-    }
-    FixedPoint operator/(const FixedPoint & rhs) const
-    {
-        FixedPoint res;
-        
-        long long lh = (long long)val << 32, rh = rhs.val | 1;
-        lh /= rh;
-        rh = (lh >> 16) & 0xffffffffL;
-        res.val = rh;
-        return res;
-        
-        //res.val = ((val << 2) / (rhs.val >> 6 | 1)) << 8;
-        //return res;
-    }
-    void operator+=(const FixedPoint & rhs) { val += rhs.val; }
-    void operator-=(const FixedPoint & rhs) { val += rhs.val; }
-    void operator*=(const FixedPoint & rhs) { *this = *this * rhs; }
-    void operator/=(const FixedPoint & rhs) { *this = *this / rhs; }
-    
-    bool operator<(const FixedPoint & rhs) const { return val < rhs.val; }
-    bool operator>(const FixedPoint & rhs) const { return val > rhs.val; }
-    bool operator<=(const FixedPoint & rhs) const { return val <= rhs.val; }
-    bool operator>=(const FixedPoint & rhs) const { return val >= rhs.val; }
-    bool operator==(const FixedPoint & rhs) const { return val == rhs.val; }
-    bool operator!=(const FixedPoint & rhs) const { return val != rhs.val; }
-    
-    operator int() const { return val >> FIXED_POINT_SHIFT; }
-    operator unsigned() const { return val >> FIXED_POINT_SHIFT; }
-    operator float() const { return (float)val / FIXED_POINT_ONE; }
-};
-
-typedef FixedPoint VectorComp_t;
-typedef Vec4<VectorComp_t> Vector4;
-#define Vector4_CTR(x,y,z,w) Vector4(FixedPoint::From(x), FixedPoint::From(y), \
-                                        FixedPoint::From(z), FixedPoint::From(w))
-#define VectorComp_t_CTR(x) FixedPoint::From(x)
-#define VectorComp_t_Zero FixedPoint::Zero()
-#define VectorComp_t_One FixedPoint::One()*/
-
-#else // if USE_FIXED_POINT
-
-typedef float VectorComp_t;
-typedef struct Vec4<VectorComp_t> Vector4;
-#define Vector4_CTR(x,y,z,w) Vector4(x,y,z,w)
-#define VectorComp_t_CTR(x) (float)(x)
-#define VectorComp_t_Zero 0
-#define VectorComp_t_One 1
-
-#endif // if USE_FIXED_POINT
-
-#else // #ifdef __cplusplus
-
-//typedef float Vector4 [4];
-typedef struct { float x, y, z, w; } Vector4;
-
-#define VECTOR4_OP_UNARY(v,op,s) \
-   v.x op s.x; \
-   v.y op s.y; \
-   v.z op s.z; \
-   v.w op s.w;
-   
-#define VECTOR4_OP_UNARY_SCALAR(v,op,s) \
-   v.x op s; \
-   v.y op s; \
-   v.z op s; \
-   v.w op s;
-
-#define VECTOR4_CTR(x,y,z,w) \
-   ((Vector4){x,y,z,w})
-      
-#endif // #ifdef __cplusplus
-
-#endif // #ifndef _PIXELFLINGER2_VECTOR4_H_
\ No newline at end of file
diff --git a/libMesa.project b/libMesa.project
deleted file mode 100644
index bb549dd..0000000
--- a/libMesa.project
+++ /dev/null
@@ -1,294 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CodeLite_Project Name="libMesa" InternalType="Static Library">
-  <Plugins>
-    <Plugin Name="qmake">
-      <![CDATA[00020001N0005Debug0000000000000001N0007Release000000000000]]>
-    </Plugin>
-  </Plugins>
-  <VirtualDirectory Name="include">
-    <VirtualDirectory Name="pixelflinger2">
-      <File Name="include/pixelflinger2/pixelflinger2_constants.h"/>
-      <File Name="include/pixelflinger2/pixelflinger2_vector4.h"/>
-      <File Name="include/pixelflinger2/pixelflinger2_format.h"/>
-      <File Name="include/pixelflinger2/pixelflinger2_interface.h"/>
-    </VirtualDirectory>
-    <VirtualDirectory Name="GLES2">
-      <File Name="include/GLES2/gl2ext.h"/>
-      <File Name="include/GLES2/gl2.h"/>
-      <File Name="include/GLES2/gl2platform.h"/>
-    </VirtualDirectory>
-    <VirtualDirectory Name="c99">
-      <File Name="include/c99/inttypes.h"/>
-      <File Name="include/c99/stdint.h"/>
-      <File Name="include/c99/stdbool.h"/>
-    </VirtualDirectory>
-  </VirtualDirectory>
-  <VirtualDirectory Name="src">
-    <VirtualDirectory Name="mesa">
-      <VirtualDirectory Name="math">
-        <File Name="src/mesa/math/m_xform.h"/>
-        <File Name="src/mesa/math/m_clip_tmp.h"/>
-        <File Name="src/mesa/math/m_dotprod_tmp.h"/>
-        <File Name="src/mesa/math/m_copy_tmp.h"/>
-        <File Name="src/mesa/math/m_xform_tmp.h"/>
-        <File Name="src/mesa/math/m_norm_tmp.h"/>
-        <File Name="src/mesa/math/m_matrix.h"/>
-        <File Name="src/mesa/math/m_vector.h"/>
-        <File Name="src/mesa/math/m_debug_util.h"/>
-        <File Name="src/mesa/math/m_eval.h"/>
-        <File Name="src/mesa/math/m_debug.h"/>
-        <File Name="src/mesa/math/m_translate.h"/>
-        <File Name="src/mesa/math/m_trans_tmp.h"/>
-      </VirtualDirectory>
-      <VirtualDirectory Name="main">
-        <File Name="src/mesa/main/config.h"/>
-        <File Name="src/mesa/main/get.h"/>
-        <File Name="src/mesa/main/hash.h"/>
-        <File Name="src/mesa/main/imports.h"/>
-        <File Name="src/mesa/main/mfeatures.h"/>
-        <File Name="src/mesa/main/version.h"/>
-        <File Name="src/mesa/main/debug.h"/>
-        <File Name="src/mesa/main/core.h"/>
-        <File Name="src/mesa/main/shaderobj.h"/>
-        <File Name="src/mesa/main/macros.h"/>
-        <File Name="src/mesa/main/glheader.h"/>
-        <File Name="src/mesa/main/compiler.h"/>
-        <File Name="src/mesa/main/simple_list.h"/>
-        <File Name="src/mesa/main/mtypes.h"/>
-        <File Name="src/mesa/main/shaderobj.c"/>
-      </VirtualDirectory>
-      <VirtualDirectory Name="program">
-        <File Name="src/mesa/program/prog_parameter.cpp"/>
-        <File Name="src/mesa/program/symbol_table.h"/>
-        <File Name="src/mesa/program/prog_uniform.h"/>
-        <File Name="src/mesa/program/hash_table.c"/>
-        <File Name="src/mesa/program/prog_statevars.h"/>
-        <File Name="src/mesa/program/hash_table.h"/>
-        <File Name="src/mesa/program/symbol_table.c"/>
-        <File Name="src/mesa/program/ir_to_mesa.h"/>
-        <File Name="src/mesa/program/prog_parameter.h"/>
-      </VirtualDirectory>
-    </VirtualDirectory>
-    <VirtualDirectory Name="glsl">
-      <VirtualDirectory Name="glcpp">
-        <File Name="src/glsl/glcpp/glcpp.h"/>
-        <File Name="src/glsl/glcpp/pp.c"/>
-        <File Name="src/glsl/glcpp/glcpp-lex.c"/>
-        <File Name="src/glsl/glcpp/glcpp-parse.c"/>
-        <File Name="src/glsl/glcpp/glcpp-parse.h"/>
-      </VirtualDirectory>
-      <File Name="src/glsl/opt_swizzle_swizzle.cpp"/>
-      <File Name="src/glsl/list.h"/>
-      <File Name="src/glsl/opt_dead_code.cpp"/>
-      <File Name="src/glsl/image_file.h"/>
-      <File Name="src/glsl/opt_copy_propagation.cpp"/>
-      <File Name="src/glsl/strtod.h"/>
-      <File Name="src/glsl/loop_analysis.cpp"/>
-      <File Name="src/glsl/loop_unroll.cpp"/>
-      <File Name="src/glsl/ir_if_return.cpp"/>
-      <File Name="src/glsl/linker.cpp"/>
-      <File Name="src/glsl/ir_basic_block.h"/>
-      <File Name="src/glsl/opt_algebraic.cpp"/>
-      <File Name="src/glsl/link_functions.cpp"/>
-      <File Name="src/glsl/glsl_parser_extras.h"/>
-      <File Name="src/glsl/opt_discard_simplification.cpp"/>
-      <File Name="src/glsl/glsl_parser.h"/>
-      <File Name="src/glsl/ir_expression_flattening.cpp"/>
-      <File Name="src/glsl/builtin_variables.h"/>
-      <File Name="src/glsl/ir_print_visitor.h"/>
-      <File Name="src/glsl/ir_function_can_inline.cpp"/>
-      <File Name="src/glsl/s_expression.cpp"/>
-      <File Name="src/glsl/lower_discard.cpp"/>
-      <File Name="src/glsl/ir_to_llvm.cpp"/>
-      <File Name="src/glsl/opt_redundant_jumps.cpp"/>
-      <File Name="src/glsl/ir_div_to_mul_rcp.cpp"/>
-      <File Name="src/glsl/ir_mod_to_fract.cpp"/>
-      <File Name="src/glsl/glsl_types.h"/>
-      <File Name="src/glsl/glsl_symbol_table.cpp"/>
-      <File Name="src/glsl/ir_set_program_inouts.cpp"/>
-      <File Name="src/glsl/lower_variable_index_to_cond_assign.cpp"/>
-      <File Name="src/glsl/glsl_symbol_table.h"/>
-      <File Name="src/glsl/builtin_function.cpp"/>
-      <File Name="src/glsl/lower_noise.cpp"/>
-      <File Name="src/glsl/ir_reader.cpp"/>
-      <File Name="src/glsl/strtod.c"/>
-      <File Name="src/glsl/opt_constant_variable.cpp"/>
-      <File Name="src/glsl/ir_variable_refcount.cpp"/>
-      <File Name="src/glsl/ir_hierarchical_visitor.cpp"/>
-      <File Name="src/glsl/program.h"/>
-      <File Name="src/glsl/ast_type.cpp"/>
-      <File Name="src/glsl/hir_field_selection.cpp"/>
-      <File Name="src/glsl/glsl_parser_extras.cpp"/>
-      <File Name="src/glsl/opt_constant_propagation.cpp"/>
-      <File Name="src/glsl/ir_clone.cpp"/>
-      <File Name="src/glsl/main.cpp"/>
-      <File Name="src/glsl/ir_reader.h"/>
-      <File Name="src/glsl/ir_variable.cpp"/>
-      <File Name="src/glsl/loop_analysis.h"/>
-      <File Name="src/glsl/glsl_types.cpp"/>
-      <File Name="src/glsl/glsl_parser.cpp"/>
-      <File Name="src/glsl/lower_instructions.cpp"/>
-      <File Name="src/glsl/ir_optimization.h"/>
-      <File Name="src/glsl/ir_constant_expression.cpp"/>
-      <File Name="src/glsl/ir_import_prototypes.cpp"/>
-      <File Name="src/glsl/opt_constant_folding.cpp"/>
-      <File Name="src/glsl/ast_function.cpp"/>
-      <File Name="src/glsl/lower_jumps.cpp"/>
-      <File Name="src/glsl/ast_expr.cpp"/>
-      <File Name="src/glsl/ir_print_visitor.cpp"/>
-      <File Name="src/glsl/opt_noop_swizzle.cpp"/>
-      <File Name="src/glsl/ir.h"/>
-      <File Name="src/glsl/ir_validate.cpp"/>
-      <File Name="src/glsl/ir_visitor.h"/>
-      <File Name="src/glsl/ir_function.cpp"/>
-      <File Name="src/glsl/opt_function_inlining.cpp"/>
-      <File Name="src/glsl/opt_dead_code_local.cpp"/>
-      <File Name="src/glsl/lower_vec_index_to_cond_assign.cpp"/>
-      <File Name="src/glsl/lower_vector.cpp"/>
-      <File Name="src/glsl/ir_expression_flattening.h"/>
-      <File Name="src/glsl/opt_dead_functions.cpp"/>
-      <File Name="src/glsl/ir_hierarchical_visitor.h"/>
-      <File Name="src/glsl/lower_vec_index_to_swizzle.cpp"/>
-      <File Name="src/glsl/ir_variable_refcount.h"/>
-      <File Name="src/glsl/ir_to_llvm.h"/>
-      <File Name="src/glsl/opt_tree_grafting.cpp"/>
-      <File Name="src/glsl/ir_rvalue_visitor.cpp"/>
-      <File Name="src/glsl/ir_rvalue_visitor.h"/>
-      <File Name="src/glsl/lower_texture_projection.cpp"/>
-      <File Name="src/glsl/ir.cpp"/>
-      <File Name="src/glsl/linker.h"/>
-      <File Name="src/glsl/ir_basic_block.cpp"/>
-      <File Name="src/glsl/builtin_types.h"/>
-      <File Name="src/glsl/opt_structure_splitting.cpp"/>
-      <File Name="src/glsl/ast_to_hir.cpp"/>
-      <File Name="src/glsl/ir_function_inlining.h"/>
-      <File Name="src/glsl/ir_hv_accept.cpp"/>
-      <File Name="src/glsl/opt_if_simplification.cpp"/>
-      <File Name="src/glsl/glsl_lexer.cpp"/>
-      <File Name="src/glsl/s_expression.h"/>
-      <File Name="src/glsl/loop_controls.cpp"/>
-      <File Name="src/glsl/lower_if_to_cond_assign.cpp"/>
-      <File Name="src/glsl/lower_mat_op_to_vec.cpp"/>
-      <File Name="src/glsl/ast.h"/>
-      <File Name="src/glsl/glsl_compiler.cpp"/>
-    </VirtualDirectory>
-    <VirtualDirectory Name="talloc">
-      <File Name="src/talloc/hieralloc.c"/>
-      <File Name="src/talloc/hieralloc.h"/>
-    </VirtualDirectory>
-    <VirtualDirectory Name="pixelflinger2">
-      <File Name="src/pixelflinger2/texture.cpp"/>
-      <File Name="src/pixelflinger2/pixelflinger2.h"/>
-      <File Name="src/pixelflinger2/pixelflinger2.cpp"/>
-      <File Name="src/pixelflinger2/texture.h"/>
-      <File Name="src/pixelflinger2/format.cpp"/>
-      <File Name="src/pixelflinger2/raster.cpp"/>
-      <File Name="src/pixelflinger2/shader.cpp"/>
-      <File Name="src/pixelflinger2/llvm_scanline.cpp"/>
-      <File Name="src/pixelflinger2/buffer.cpp"/>
-      <File Name="src/pixelflinger2/llvm_helper.h"/>
-      <File Name="src/pixelflinger2/scanline.cpp"/>
-      <File Name="src/pixelflinger2/llvm_texture.cpp"/>
-    </VirtualDirectory>
-  </VirtualDirectory>
-  <Description/>
-  <Dependencies/>
-  <Dependencies Name="Release"/>
-  <Settings Type="Static Library">
-    <Configuration Name="Debug" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Static Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
-      <Compiler Options="-D__STDC_LIMIT_MACROS;-D__STDC_CONSTANT_MACROS;-m32 -march=i686;-DDEBUG;-UNDEBUG;-O0;-g" Required="yes" PreCompiledHeader="">
-        <IncludePath Value="src/mesa/"/>
-        <IncludePath Value="include/"/>
-        <IncludePath Value="src/talloc/"/>
-        <IncludePath Value="src/mapi/"/>
-        <IncludePath Value="../../external/llvm/include"/>
-        <IncludePath Value="../../external/llvm/host/include"/>
-        <IncludePath Value="../../frameworks/compile/libbcc/include"/>
-        <IncludePath Value="../../frameworks/base/opengl/include"/>
-      </Compiler>
-      <Linker Options="-m32 -lstdc++ -ldl -lpthread" Required="yes">
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMX86CodeGen_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMX86Info_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMBitReader_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSelectionDAG_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMJIT_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMCodeGen_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMTarget_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMMC_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMScalarOpts_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipo_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMTransformUtils_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMCore_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSystem_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMAnalysis_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMInstCombine_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipa_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMExecutionEngine_intermediates"/>
-        <LibraryPath Value="/home/davidxli/Desktop/android/master/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMMCParser_intermediates"/>
-        <Library Value="libbcc"/>
-      </Linker>
-      <ResourceCompiler Options="" Required="no"/>
-      <General OutputFile="./Debug/$(ProjectName).a" IntermediateDirectory="./Debug/obj" Command="./$(ProjectName)" CommandArguments="--dump-hir --glsl-es stress_fs.frag" WorkingDirectory="./Debug" PauseExecWhenProcTerminates="yes"/>
-      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
-        <PostConnectCommands/>
-        <StartupCommands/>
-      </Debugger>
-      <PreBuild/>
-      <PostBuild/>
-      <CustomBuild Enabled="no">
-        <RebuildCommand/>
-        <CleanCommand/>
-        <BuildCommand/>
-        <PreprocessFileCommand/>
-        <SingleFileCommand/>
-        <MakefileGenerationCommand/>
-        <ThirdPartyToolName>None</ThirdPartyToolName>
-        <WorkingDirectory/>
-      </CustomBuild>
-      <AdditionalRules>
-        <CustomPostBuild/>
-        <CustomPreBuild/>
-      </AdditionalRules>
-    </Configuration>
-    <Configuration Name="Release" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
-      <Compiler Options="" Required="yes" PreCompiledHeader="">
-        <IncludePath Value="."/>
-      </Compiler>
-      <Linker Options="-O2" Required="yes"/>
-      <ResourceCompiler Options="" Required="no"/>
-      <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
-      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
-        <PostConnectCommands/>
-        <StartupCommands/>
-      </Debugger>
-      <PreBuild/>
-      <PostBuild/>
-      <CustomBuild Enabled="no">
-        <RebuildCommand/>
-        <CleanCommand/>
-        <BuildCommand/>
-        <PreprocessFileCommand/>
-        <SingleFileCommand/>
-        <MakefileGenerationCommand/>
-        <ThirdPartyToolName>None</ThirdPartyToolName>
-        <WorkingDirectory/>
-      </CustomBuild>
-      <AdditionalRules>
-        <CustomPostBuild/>
-        <CustomPreBuild/>
-      </AdditionalRules>
-    </Configuration>
-    <GlobalSettings>
-      <Compiler Options="">
-        <IncludePath Value="."/>
-      </Compiler>
-      <Linker Options="">
-        <LibraryPath Value="."/>
-      </Linker>
-      <ResourceCompiler Options=""/>
-    </GlobalSettings>
-  </Settings>
-  <Dependencies Name="Debug"/>
-</CodeLite_Project>
diff --git a/src/glsl/README b/src/glsl/README
deleted file mode 100644
index dd80a53..0000000
--- a/src/glsl/README
+++ /dev/null
@@ -1,229 +0,0 @@
-Welcome to Mesa's GLSL compiler.  A brief overview of how things flow:
-
-1) lex and yacc-based preprocessor takes the incoming shader string
-and produces a new string containing the preprocessed shader.  This
-takes care of things like #if, #ifdef, #define, and preprocessor macro
-invocations.  Note that #version, #extension, and some others are
-passed straight through.  See glcpp/*
-
-2) lex and yacc-based parser takes the preprocessed string and
-generates the AST (abstract syntax tree).  Almost no checking is
-performed in this stage.  See glsl_lexer.lpp and glsl_parser.ypp.
-
-3) The AST is converted to "HIR".  This is the intermediate
-representation of the compiler.  Constructors are generated, function
-calls are resolved to particular function signatures, and all the
-semantic checking is performed.  See ast_*.cpp for the conversion, and
-ir.h for the IR structures.
-
-4) The driver (Mesa, or main.cpp for the standalone binary) performs
-optimizations.  These include copy propagation, dead code elimination,
-constant folding, and others.  Generally the driver will call
-optimizations in a loop, as each may open up opportunities for other
-optimizations to do additional work.  See most files called ir_*.cpp
-
-5) linking is performed.  This does checking to ensure that the
-outputs of the vertex shader match the inputs of the fragment shader,
-and assigns locations to uniforms, attributes, and varyings.  See
-linker.cpp.
-
-6) The driver may perform additional optimization at this point, as
-for example dead code elimination previously couldn't remove functions
-or global variable usage when we didn't know what other code would be
-linked in.
-
-7) The driver performs code generation out of the IR, taking a linked
-shader program and producing a compiled program for each stage.  See
-ir_to_mesa.cpp for Mesa IR code generation.
-
-FAQ:
-
-Q: What is HIR versus IR versus LIR?
-
-A: The idea behind the naming was that ast_to_hir would produce a
-high-level IR ("HIR"), with things like matrix operations, structure
-assignments, etc., present.  A series of lowering passes would occur
-that do things like break matrix multiplication into a series of dot
-products/MADs, make structure assignment be a series of assignment of
-components, flatten if statements into conditional moves, and such,
-producing a low level IR ("LIR").
-
-However, it now appears that each driver will have different
-requirements from a LIR.  A 915-generation chipset wants all functions
-inlined, all loops unrolled, all ifs flattened, no variable array
-accesses, and matrix multiplication broken down.  The Mesa IR backend
-for swrast would like matrices and structure assignment broken down,
-but it can support function calls and dynamic branching.  A 965 vertex
-shader IR backend could potentially even handle some matrix operations
-without breaking them down, but the 965 fragment shader IR backend
-would want to break to have (almost) all operations down channel-wise
-and perform optimization on that.  As a result, there's no single
-low-level IR that will make everyone happy.  So that usage has fallen
-out of favor, and each driver will perform a series of lowering passes
-to take the HIR down to whatever restrictions it wants to impose
-before doing codegen.
-
-Q: How is the IR structured?
-
-A: The best way to get started seeing it would be to run the
-standalone compiler against a shader:
-
-./glsl_compiler --dump-lir \
-	~/src/piglit/tests/shaders/glsl-orangebook-ch06-bump.frag
-
-So for example one of the ir_instructions in main() contains:
-
-(assign (constant bool (1)) (var_ref litColor)  (expression vec3 * (var_ref Surf
-aceColor) (var_ref __retval) ) )
-
-Or more visually:
-                     (assign)
-                 /       |        \
-        (var_ref)  (expression *)  (constant bool 1)
-         /          /           \
-(litColor)      (var_ref)    (var_ref)
-                  /                  \
-           (SurfaceColor)          (__retval)
-
-which came from:
-
-litColor = SurfaceColor * max(dot(normDelta, LightDir), 0.0);
-
-(the max call is not represented in this expression tree, as it was a
-function call that got inlined but not brought into this expression
-tree)
-
-Each of those nodes is a subclass of ir_instruction.  A particular
-ir_instruction instance may only appear once in the whole IR tree with
-the exception of ir_variables, which appear once as variable
-declarations:
-
-(declare () vec3 normDelta)
-
-and multiple times as the targets of variable dereferences:
-...
-(assign (constant bool (1)) (var_ref __retval) (expression float dot
- (var_ref normDelta) (var_ref LightDir) ) )
-...
-(assign (constant bool (1)) (var_ref __retval) (expression vec3 -
- (var_ref LightDir) (expression vec3 * (constant float (2.000000))
- (expression vec3 * (expression float dot (var_ref normDelta) (var_ref
- LightDir) ) (var_ref normDelta) ) ) ) )
-...
-
-Each node has a type.  Expressions may involve several different types:
-(declare (uniform ) mat4 gl_ModelViewMatrix)
-((assign (constant bool (1)) (var_ref constructor_tmp) (expression
- vec4 * (var_ref gl_ModelViewMatrix) (var_ref gl_Vertex) ) )
-
-An expression tree can be arbitrarily deep, and the compiler tries to
-keep them structured like that so that things like algebraic
-optimizations ((color * 1.0 == color) and ((mat1 * mat2) * vec == mat1
-* (mat2 * vec))) or recognizing operation patterns for code generation
-(vec1 * vec2 + vec3 == mad(vec1, vec2, vec3)) are easier.  This comes
-at the expense of additional trickery in implementing some
-optimizations like CSE where one must navigate an expression tree.
-
-Q: Why no SSA representation?
-
-A: Converting an IR tree to SSA form makes dead code elmimination,
-common subexpression elimination, and many other optimizations much
-easier.  However, in our primarily vector-based language, there's some
-major questions as to how it would work.  Do we do SSA on the scalar
-or vector level?  If we do it at the vector level, we're going to end
-up with many different versions of the variable when encountering code
-like:
-
-(assign (constant bool (1)) (swiz x (var_ref __retval) ) (var_ref a) ) 
-(assign (constant bool (1)) (swiz y (var_ref __retval) ) (var_ref b) ) 
-(assign (constant bool (1)) (swiz z (var_ref __retval) ) (var_ref c) ) 
-
-If every masked update of a component relies on the previous value of
-the variable, then we're probably going to be quite limited in our
-dead code elimination wins, and recognizing common expressions may
-just not happen.  On the other hand, if we operate channel-wise, then
-we'll be prone to optimizing the operation on one of the channels at
-the expense of making its instruction flow different from the other
-channels, and a vector-based GPU would end up with worse code than if
-we didn't optimize operations on that channel!
-
-Once again, it appears that our optimization requirements are driven
-significantly by the target architecture.  For now, targeting the Mesa
-IR backend, SSA does not appear to be that important to producing
-excellent code, but we do expect to do some SSA-based optimizations
-for the 965 fragment shader backend when that is developed.
-
-Q: How should I expand instructions that take multiple backend instructions?
-
-Sometimes you'll have to do the expansion in your code generation --
-see, for example, ir_to_mesa.cpp's handling of ir_unop_sqrt.  However,
-in many cases you'll want to do a pass over the IR to convert
-non-native instructions to a series of native instructions.  For
-example, for the Mesa backend we have ir_div_to_mul_rcp.cpp because
-Mesa IR (and many hardware backends) only have a reciprocal
-instruction, not a divide.  Implementing non-native instructions this
-way gives the chance for constant folding to occur, so (a / 2.0)
-becomes (a * 0.5) after codegen instead of (a * (1.0 / 2.0))
-
-Q: How shoud I handle my special hardware instructions with respect to IR?
-
-Our current theory is that if multiple targets have an instruction for
-some operation, then we should probably be able to represent that in
-the IR.  Generally this is in the form of an ir_{bin,un}op expression
-type.  For example, we initially implemented fract() using (a -
-floor(a)), but both 945 and 965 have instructions to give that result,
-and it would also simplify the implementation of mod(), so
-ir_unop_fract was added.  The following areas need updating to add a
-new expression type:
-
-ir.h (new enum)
-ir.cpp:get_num_operands() (used for ir_reader)
-ir.cpp:operator_strs (used for ir_reader)
-ir_constant_expression.cpp (you probably want to be able to constant fold)
-ir_validate.cpp (check users have the right types)
-
-You may also need to update the backends if they will see the new expr type:
-
-../mesa/shaders/ir_to_mesa.cpp
-
-You can then use the new expression from builtins (if all backends
-would rather see it), or scan the IR and convert to use your new
-expression type (see ir_mod_to_fract, for example).
-
-Q: How is memory management handled in the compiler?
-
-The hierarchical memory allocator "talloc" developed for the Samba
-project is used, so that things like optimization passes don't have to
-worry about their garbage collection so much.  It has a few nice
-features, including low performance overhead and good debugging
-support that's trivially available.
-
-Generally, each stage of the compile creates a talloc context and
-allocates its memory out of that or children of it.  At the end of the
-stage, the pieces still live are stolen to a new context and the old
-one freed, or the whole context is kept for use by the next stage.
-
-For IR transformations, a temporary context is used, then at the end
-of all transformations, reparent_ir reparents all live nodes under the
-shader's IR list, and the old context full of dead nodes is freed.
-When developing a single IR transformation pass, this means that you
-want to allocate instruction nodes out of the temporary context, so if
-it becomes dead it doesn't live on as the child of a live node.  At
-the moment, optimization passes aren't passed that temporary context,
-so they find it by calling talloc_parent() on a nearby IR node.  The
-talloc_parent() call is expensive, so many passes will cache the
-result of the first talloc_parent().  Cleaning up all the optimization
-passes to take a context argument and not call talloc_parent() is left
-as an exercise.
-
-Q: What is the file naming convention in this directory?
-
-Initially, there really wasn't one.  We have since adopted one:
-
- - Files that implement code lowering passes should be named lower_*
-   (e.g., lower_noise.cpp).
- - Files that implement optimization passes should be named opt_*.
- - Files that implement a class that is used throught the code should
-   take the name of that class (e.g., ir_hierarchical_visitor.cpp).
- - Files that contain code not fitting in one of the previous
-   categories should have a sensible name (e.g., glsl_parser.ypp).
diff --git a/src/glsl/TODO b/src/glsl/TODO
deleted file mode 100644
index a376238..0000000
--- a/src/glsl/TODO
+++ /dev/null
@@ -1,38 +0,0 @@
-- Detect code paths in non-void functions that don't reach a return statement
-
-- Improve handling of constants and their initializers.  Constant initializers
-  should never generate any code.  This is trival for scalar constants.  It is
-  also trivial for arrays, matrices, and vectors that are accessed with
-  constant index values.  For others it is more complicated.  Perhaps these
-  cases should be silently converted to uniforms?
-
-- Implement support for ir_binop_dot in ir_algebraic.cpp.  Perform
-  transformations such as "dot(v, vec3(0.0, 1.0, 0.0))" -> v.y.
-
-1.30 features:
-
-- Implement AST-to-HIR conversion of bit-shift operators.
-
-- Implement AST-to-HIR conversion of bit-wise {&,|,^,!} operators.
-
-- Implement AST-to-HIR conversion of switch-statements
-  - switch
-  - case
-  - Update break to correcly handle mixed nexting of switch-statements
-    and loops.
-
-- Handle currently unsupported constant expression types
-  - ir_unop_bit_not
-  - ir_binop_mod
-  - ir_binop_lshift
-  - ir_binop_rshift
-  - ir_binop_bit_and
-  - ir_binop_bit_xor
-  - ir_binop_bit_or
-
-- Implement support for 1.30 style shadow compares which only return a float
-  instead of a vec4.
-
-- Implement support for gl_ClipDistance.  This is non-trivial because
-  gl_ClipDistance is exposed as a float[8], but all hardware actually
-  implements it as vec4[2].
\ No newline at end of file
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
deleted file mode 100644
index 5769c0e..0000000
--- a/src/glsl/ast.h
+++ /dev/null
@@ -1,721 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef AST_H
-#define AST_H
-
-#include "list.h"
-#include "glsl_parser_extras.h"
-
-struct _mesa_glsl_parse_state;
-
-struct YYLTYPE;
-
-/**
- * \defgroup AST Abstract syntax tree node definitions
- *
- * An abstract syntax tree is generated by the parser.  This is a fairly
- * direct representation of the gramma derivation for the source program.
- * No symantic checking is done during the generation of the AST.  Only
- * syntactic checking is done.  Symantic checking is performed by a later
- * stage that converts the AST to a more generic intermediate representation.
- *
- *@{
- */
-/**
- * Base class of all abstract syntax tree nodes
- */
-class ast_node {
-public:
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *node;
-
-      node = hieralloc_zero_size(ctx, size);
-      assert(node != NULL);
-
-      return node;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. */
-   static void operator delete(void *table)
-   {
-      hieralloc_free(table);
-   }
-
-   /**
-    * Print an AST node in something approximating the original GLSL code
-    */
-   virtual void print(void) const;
-
-   /**
-    * Convert the AST node to the high-level intermediate representation
-    */
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   /**
-    * Retrieve the source location of an AST node
-    *
-    * This function is primarily used to get the source position of an AST node
-    * into a form that can be passed to \c _mesa_glsl_error.
-    *
-    * \sa _mesa_glsl_error, ast_node::set_location
-    */
-   struct YYLTYPE get_location(void) const
-   {
-      struct YYLTYPE locp;
-
-      locp.source = this->location.source;
-      locp.first_line = this->location.line;
-      locp.first_column = this->location.column;
-      locp.last_line = locp.first_line;
-      locp.last_column = locp.first_column;
-
-      return locp;
-   }
-
-   /**
-    * Set the source location of an AST node from a parser location
-    *
-    * \sa ast_node::get_location
-    */
-   void set_location(const struct YYLTYPE &locp)
-   {
-      this->location.source = locp.source;
-      this->location.line = locp.first_line;
-      this->location.column = locp.first_column;
-   }
-
-   /**
-    * Source location of the AST node.
-    */
-   struct {
-      unsigned source;    /**< GLSL source number. */
-      unsigned line;      /**< Line number within the source string. */
-      unsigned column;    /**< Column in the line. */
-   } location;
-
-   exec_node link;
-	virtual ~ast_node(){};
-protected:
-   /**
-    * The only constructor is protected so that only derived class objects can
-    * be created.
-    */
-   ast_node(void);
-};
-
-
-/**
- * Operators for AST expression nodes.
- */
-enum ast_operators {
-   ast_assign,
-   ast_plus,        /**< Unary + operator. */
-   ast_neg,
-   ast_add,
-   ast_sub,
-   ast_mul,
-   ast_div,
-   ast_mod,
-   ast_lshift,
-   ast_rshift,
-   ast_less,
-   ast_greater,
-   ast_lequal,
-   ast_gequal,
-   ast_equal,
-   ast_nequal,
-   ast_bit_and,
-   ast_bit_xor,
-   ast_bit_or,
-   ast_bit_not,
-   ast_logic_and,
-   ast_logic_xor,
-   ast_logic_or,
-   ast_logic_not,
-
-   ast_mul_assign,
-   ast_div_assign,
-   ast_mod_assign,
-   ast_add_assign,
-   ast_sub_assign,
-   ast_ls_assign,
-   ast_rs_assign,
-   ast_and_assign,
-   ast_xor_assign,
-   ast_or_assign,
-
-   ast_conditional,
-
-   ast_pre_inc,
-   ast_pre_dec,
-   ast_post_inc,
-   ast_post_dec,
-   ast_field_selection,
-   ast_array_index,
-
-   ast_function_call,
-
-   ast_identifier,
-   ast_int_constant,
-   ast_uint_constant,
-   ast_float_constant,
-   ast_bool_constant,
-
-   ast_sequence
-};
-
-/**
- * Representation of any sort of expression.
- */
-class ast_expression : public ast_node {
-public:
-   ast_expression(int oper, ast_expression *,
-		  ast_expression *, ast_expression *);
-
-   ast_expression(const char *identifier) :
-      oper(ast_identifier)
-   {
-      subexpressions[0] = NULL;
-      subexpressions[1] = NULL;
-      subexpressions[2] = NULL;
-      primary_expression.identifier = (char *) identifier;
-   }
-
-   static const char *operator_string(enum ast_operators op);
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   virtual void print(void) const;
-
-   enum ast_operators oper;
-
-   ast_expression *subexpressions[3];
-
-   union {
-      char *identifier;
-      int int_constant;
-      float float_constant;
-      unsigned uint_constant;
-      int bool_constant;
-   } primary_expression;
-
-
-   /**
-    * List of expressions for an \c ast_sequence or parameters for an
-    * \c ast_function_call
-    */
-   exec_list expressions;
-};
-
-class ast_expression_bin : public ast_expression {
-public:
-   ast_expression_bin(int oper, ast_expression *, ast_expression *);
-
-   virtual void print(void) const;
-};
-
-/**
- * Subclass of expressions for function calls
- */
-class ast_function_expression : public ast_expression {
-public:
-   ast_function_expression(ast_expression *callee)
-      : ast_expression(ast_function_call, callee,
-		       NULL, NULL),
-	cons(false)
-   {
-      /* empty */
-   }
-
-   ast_function_expression(class ast_type_specifier *type)
-      : ast_expression(ast_function_call, (ast_expression *) type,
-		       NULL, NULL),
-	cons(true)
-   {
-      /* empty */
-   }
-
-   bool is_constructor() const
-   {
-      return cons;
-   }
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-private:
-   /**
-    * Is this function call actually a constructor?
-    */
-   bool cons;
-};
-
-
-/**
- * Number of possible operators for an ast_expression
- *
- * This is done as a define instead of as an additional value in the enum so
- * that the compiler won't generate spurious messages like "warning:
- * enumeration value ‘ast_num_operators’ not handled in switch"
- */
-#define AST_NUM_OPERATORS (ast_sequence + 1)
-
-
-class ast_compound_statement : public ast_node {
-public:
-   ast_compound_statement(int new_scope, ast_node *statements);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   int new_scope;
-   exec_list statements;
-};
-
-class ast_declaration : public ast_node {
-public:
-   ast_declaration(char *identifier, int is_array, ast_expression *array_size,
-		   ast_expression *initializer);
-   virtual void print(void) const;
-
-   char *identifier;
-   
-   int is_array;
-   ast_expression *array_size;
-
-   ast_expression *initializer;
-};
-
-
-enum {
-   ast_precision_high = 0, /**< Default precision. */
-   ast_precision_medium,
-   ast_precision_low
-};
-
-struct ast_type_qualifier {
-   union {
-      struct {
-	 unsigned invariant:1;
-	 unsigned constant:1;
-	 unsigned attribute:1;
-	 unsigned varying:1;
-	 unsigned in:1;
-	 unsigned out:1;
-	 unsigned centroid:1;
-	 unsigned uniform:1;
-	 unsigned smooth:1;
-	 unsigned flat:1;
-	 unsigned noperspective:1;
-
-	 /** \name Layout qualifiers for GL_ARB_fragment_coord_conventions */
-	 /*@{*/
-	 unsigned origin_upper_left:1;
-	 unsigned pixel_center_integer:1;
-	 /*@}*/
-
-	 /**
-	  * Flag set if GL_ARB_explicit_attrib_location "location" layout
-	  * qualifier is used.
-	  */
-	 unsigned explicit_location:1;
-      } q;
-      unsigned i;
-   } flags;
-
-   /**
-    * Location specified via GL_ARB_explicit_attrib_location layout
-    *
-    * \note
-    * This field is only valid if \c explicit_location is set.
-    */
-   unsigned location;
-};
-
-class ast_struct_specifier : public ast_node {
-public:
-   ast_struct_specifier(char *identifier, ast_node *declarator_list);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   char *name;
-   exec_list declarations;
-};
-
-
-enum ast_types {
-   ast_void,
-   ast_float,
-   ast_int,
-   ast_uint,
-   ast_bool,
-   ast_vec2,
-   ast_vec3,
-   ast_vec4,
-   ast_bvec2,
-   ast_bvec3,
-   ast_bvec4,
-   ast_ivec2,
-   ast_ivec3,
-   ast_ivec4,
-   ast_uvec2,
-   ast_uvec3,
-   ast_uvec4,
-   ast_mat2,
-   ast_mat2x3,
-   ast_mat2x4,
-   ast_mat3x2,
-   ast_mat3,
-   ast_mat3x4,
-   ast_mat4x2,
-   ast_mat4x3,
-   ast_mat4,
-   ast_sampler1d,
-   ast_sampler2d,
-   ast_sampler2drect,
-   ast_sampler3d,
-   ast_samplercube,
-   ast_sampler1dshadow,
-   ast_sampler2dshadow,
-   ast_sampler2drectshadow,
-   ast_samplercubeshadow,
-   ast_sampler1darray,
-   ast_sampler2darray,
-   ast_sampler1darrayshadow,
-   ast_sampler2darrayshadow,
-   ast_isampler1d,
-   ast_isampler2d,
-   ast_isampler3d,
-   ast_isamplercube,
-   ast_isampler1darray,
-   ast_isampler2darray,
-   ast_usampler1d,
-   ast_usampler2d,
-   ast_usampler3d,
-   ast_usamplercube,
-   ast_usampler1darray,
-   ast_usampler2darray,
-
-   ast_struct,
-   ast_type_name
-};
-
-
-class ast_type_specifier : public ast_node {
-public:
-   ast_type_specifier(int specifier);
-
-   /** Construct a type specifier from a type name */
-   ast_type_specifier(const char *name) 
-      : type_specifier(ast_type_name), type_name(name), structure(NULL),
-	is_array(false), array_size(NULL), precision(ast_precision_high)
-   {
-      /* empty */
-   }
-
-   /** Construct a type specifier from a structure definition */
-   ast_type_specifier(ast_struct_specifier *s)
-      : type_specifier(ast_struct), type_name(s->name), structure(s),
-	is_array(false), array_size(NULL), precision(ast_precision_high)
-   {
-      /* empty */
-   }
-
-   const struct glsl_type *glsl_type(const char **name,
-				     struct _mesa_glsl_parse_state *state)
-      const;
-
-   virtual void print(void) const;
-
-   ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *);
-
-   enum ast_types type_specifier;
-
-   const char *type_name;
-   ast_struct_specifier *structure;
-
-   int is_array;
-   ast_expression *array_size;
-
-   unsigned precision:2;
-};
-
-
-class ast_fully_specified_type : public ast_node {
-public:
-   virtual void print(void) const;
-   bool has_qualifiers() const;
-
-   ast_type_qualifier qualifier;
-   ast_type_specifier *specifier;
-};
-
-
-class ast_declarator_list : public ast_node {
-public:
-   ast_declarator_list(ast_fully_specified_type *);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_fully_specified_type *type;
-   exec_list declarations;
-
-   /**
-    * Special flag for vertex shader "invariant" declarations.
-    *
-    * Vertex shaders can contain "invariant" variable redeclarations that do
-    * not include a type.  For example, "invariant gl_Position;".  This flag
-    * is used to note these cases when no type is specified.
-    */
-   int invariant;
-};
-
-
-class ast_parameter_declarator : public ast_node {
-public:
-   ast_parameter_declarator()
-   {
-      this->identifier = NULL;
-      this->is_array = false;
-      this->array_size = 0;
-   }
-
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_fully_specified_type *type;
-   char *identifier;
-   int is_array;
-   ast_expression *array_size;
-
-   static void parameters_to_hir(exec_list *ast_parameters,
-				 bool formal, exec_list *ir_parameters,
-				 struct _mesa_glsl_parse_state *state);
-
-private:
-   /** Is this parameter declaration part of a formal parameter list? */
-   bool formal_parameter;
-
-   /**
-    * Is this parameter 'void' type?
-    *
-    * This field is set by \c ::hir.
-    */
-   bool is_void;
-};
-
-
-class ast_function : public ast_node {
-public:
-   ast_function(void);
-
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_fully_specified_type *return_type;
-   char *identifier;
-
-   exec_list parameters;
-
-private:
-   /**
-    * Is this prototype part of the function definition?
-    *
-    * Used by ast_function_definition::hir to process the parameters, etc.
-    * of the function.
-    *
-    * \sa ::hir
-    */
-   bool is_definition;
-
-   /**
-    * Function signature corresponding to this function prototype instance
-    *
-    * Used by ast_function_definition::hir to process the parameters, etc.
-    * of the function.
-    *
-    * \sa ::hir
-    */
-   class ir_function_signature *signature;
-
-   friend class ast_function_definition;
-};
-
-
-class ast_declaration_statement : public ast_node {
-public:
-   ast_declaration_statement(void);
-
-   enum {
-      ast_function,
-      ast_declaration,
-      ast_precision
-   } mode;
-
-   union {
-      class ast_function *function;
-      ast_declarator_list *declarator;
-      ast_type_specifier *type;
-      ast_node *node;
-   } declaration;
-};
-
-
-class ast_expression_statement : public ast_node {
-public:
-   ast_expression_statement(ast_expression *);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_expression *expression;
-};
-
-
-class ast_case_label : public ast_node {
-public:
-
-   /**
-    * An expression of NULL means 'default'.
-    */
-   ast_expression *expression;
-};
-
-class ast_selection_statement : public ast_node {
-public:
-   ast_selection_statement(ast_expression *condition,
-			   ast_node *then_statement,
-			   ast_node *else_statement);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_expression *condition;
-   ast_node *then_statement;
-   ast_node *else_statement;
-};
-
-
-class ast_switch_statement : public ast_node {
-public:
-   ast_expression *expression;
-   exec_list statements;
-};
-
-class ast_iteration_statement : public ast_node {
-public:
-   ast_iteration_statement(int mode, ast_node *init, ast_node *condition,
-			   ast_expression *rest_expression, ast_node *body);
-
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *);
-
-   enum ast_iteration_modes {
-      ast_for,
-      ast_while,
-      ast_do_while
-   } mode;
-   
-
-   ast_node *init_statement;
-   ast_node *condition;
-   ast_expression *rest_expression;
-
-   ast_node *body;
-
-private:
-   /**
-    * Generate IR from the condition of a loop
-    *
-    * This is factored out of ::hir because some loops have the condition
-    * test at the top (for and while), and others have it at the end (do-while).
-    */
-   void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *);
-};
-
-
-class ast_jump_statement : public ast_node {
-public:
-   ast_jump_statement(int mode, ast_expression *return_value);
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   enum ast_jump_modes {
-      ast_continue,
-      ast_break,
-      ast_return,
-      ast_discard
-   } mode;
-
-   ast_expression *opt_return_value;
-};
-
-
-class ast_function_definition : public ast_node {
-public:
-   virtual void print(void) const;
-
-   virtual ir_rvalue *hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state);
-
-   ast_function *prototype;
-   ast_compound_statement *body;
-};
-/*@}*/
-
-extern void
-_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state);
-
-extern ir_rvalue *
-_mesa_ast_field_selection_to_hir(const ast_expression *expr,
-				 exec_list *instructions,
-				 struct _mesa_glsl_parse_state *state);
-
-void
-emit_function(_mesa_glsl_parse_state *state, exec_list *instructions,
-	      ir_function *f);
-
-#endif /* AST_H */
diff --git a/src/glsl/ast_expr.cpp b/src/glsl/ast_expr.cpp
deleted file mode 100644
index 4e83dec..0000000
--- a/src/glsl/ast_expr.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <cstdio>
-#include <cassert>
-#include "ast.h"
-
-const char *
-ast_expression::operator_string(enum ast_operators op)
-{
-   static const char *const operators[] = {
-      "=",
-      "+",
-      "-",
-      "+",
-      "-",
-      "*",
-      "/",
-      "%",
-      "<<",
-      ">>",
-      "<",
-      ">",
-      "<=",
-      ">=",
-      "==",
-      "!=",
-      "&",
-      "^",
-      "|",
-      "~",
-      "&&",
-      "^^",
-      "||",
-      "!",
-
-      "*=",
-      "/=",
-      "%=",
-      "+=",
-      "-=",
-      "<<=",
-      ">>=",
-      "&=",
-      "^=",
-      "|=",
-
-      "?:",
-
-      "++",
-      "--",
-      "++",
-      "--",
-      ".",
-   };
-
-   assert((unsigned int)op < sizeof(operators) / sizeof(operators[0]));
-
-   return operators[op];
-}
-
-
-ast_expression_bin::ast_expression_bin(int oper, ast_expression *ex0,
-				       ast_expression *ex1) :
-   ast_expression(oper, ex0, ex1, NULL)
-{
-   assert((oper >= ast_plus) && (oper <= ast_logic_not));
-}
-
-
-void
-ast_expression_bin::print(void) const
-{
-   subexpressions[0]->print();
-   printf("%s ", operator_string(oper));
-   subexpressions[1]->print();
-}
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
deleted file mode 100644
index 7123a0b..0000000
--- a/src/glsl/ast_function.cpp
+++ /dev/null
@@ -1,1254 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "glsl_symbol_table.h"
-#include "ast.h"
-#include "glsl_types.h"
-#include "ir.h"
-#include "main/core.h" /* for MIN2 */
-
-static ir_rvalue *
-convert_component(ir_rvalue *src, const glsl_type *desired_type);
-
-bool
-apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from,
-                          struct _mesa_glsl_parse_state *state);
-
-static unsigned
-process_parameters(exec_list *instructions, exec_list *actual_parameters,
-		   exec_list *parameters,
-		   struct _mesa_glsl_parse_state *state)
-{
-   unsigned count = 0;
-
-   foreach_list (n, parameters) {
-      ast_node *const ast = exec_node_data(ast_node, n, link);
-      ir_rvalue *result = ast->hir(instructions, state);
-
-      ir_constant *const constant = result->constant_expression_value();
-      if (constant != NULL)
-	 result = constant;
-
-      actual_parameters->push_tail(result);
-      count++;
-   }
-
-   return count;
-}
-
-
-/**
- * Generate a source prototype for a function signature
- *
- * \param return_type Return type of the function.  May be \c NULL.
- * \param name        Name of the function.
- * \param parameters  Parameter list for the function.  This may be either a
- *                    formal or actual parameter list.  Only the type is used.
- *
- * \return
- * A hieralloced string representing the prototype of the function.
- */
-char *
-prototype_string(const glsl_type *return_type, const char *name,
-		 exec_list *parameters)
-{
-   char *str = NULL;
-
-   if (return_type != NULL)
-      str = hieralloc_asprintf(str, "%s ", return_type->name);
-
-   str = hieralloc_asprintf_append(str, "%s(", name);
-
-   const char *comma = "";
-   foreach_list(node, parameters) {
-      const ir_instruction *const param = (ir_instruction *) node;
-
-      str = hieralloc_asprintf_append(str, "%s%s", comma, param->type->name);
-      comma = ", ";
-   }
-
-   str = hieralloc_strdup_append(str, ")");
-   return str;
-}
-
-
-static ir_rvalue *
-match_function_by_name(exec_list *instructions, const char *name,
-		       YYLTYPE *loc, exec_list *actual_parameters,
-		       struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   ir_function *f = state->symbols->get_function(name);
-   ir_function_signature *sig;
-
-   sig = f ? f->matching_signature(actual_parameters) : NULL;
-
-   /* FINISHME: This doesn't handle the case where shader X contains a
-    * FINISHME: matching signature but shader X + N contains an _exact_
-    * FINISHME: matching signature.
-    */
-   if (sig == NULL && (f == NULL || state->es_shader || !f->has_user_signature()) && state->symbols->get_type(name) == NULL && (state->language_version == 110 || state->symbols->get_variable(name) == NULL)) {
-      /* The current shader doesn't contain a matching function or signature.
-       * Before giving up, look for the prototype in the built-in functions.
-       */
-      for (unsigned i = 0; i < state->num_builtins_to_link; i++) {
-	 ir_function *builtin;
-	 builtin = state->builtins_to_link[i]->symbols->get_function(name);
-	 sig = builtin ? builtin->matching_signature(actual_parameters) : NULL;
-	 if (sig != NULL) {
-	    if (f == NULL) {
-	       f = new(ctx) ir_function(name);
-	       state->symbols->add_global_function(f);
-	       emit_function(state, instructions, f);
-	    }
-
-	    f->add_signature(sig->clone_prototype(f, NULL));
-	    break;
-	 }
-      }
-   }
-
-   if (sig != NULL) {
-      /* Verify that 'out' and 'inout' actual parameters are lvalues.  This
-       * isn't done in ir_function::matching_signature because that function
-       * cannot generate the necessary diagnostics.
-       */
-      exec_list_iterator actual_iter = actual_parameters->iterator();
-      exec_list_iterator formal_iter = sig->parameters.iterator();
-
-      while (actual_iter.has_next()) {
-	 ir_rvalue *actual = (ir_rvalue *) actual_iter.get();
-	 ir_variable *formal = (ir_variable *) formal_iter.get();
-
-	 assert(actual != NULL);
-	 assert(formal != NULL);
-
-	 if ((formal->mode == ir_var_out)
-	     || (formal->mode == ir_var_inout)) {
-	    if (! actual->is_lvalue()) {
-	       /* FINISHME: Log a better diagnostic here.  There is no way
-		* FINISHME: to tell the user which parameter is invalid.
-		*/
-	       _mesa_glsl_error(loc, state, "`%s' parameter is not lvalue",
-				(formal->mode == ir_var_out) ? "out" : "inout");
-	    }
-	 }
-
-	 if (formal->type->is_numeric() || formal->type->is_boolean()) {
-	    ir_rvalue *converted = convert_component(actual, formal->type);
-	    actual->replace_with(converted);
-	 }
-
-	 actual_iter.next();
-	 formal_iter.next();
-      }
-
-      /* Always insert the call in the instruction stream, and return a deref
-       * of its return val if it returns a value, since we don't know if
-       * the rvalue is going to be assigned to anything or not.
-       */
-      ir_call *call = new(ctx) ir_call(sig, actual_parameters);
-      if (!sig->return_type->is_void()) {
-	 ir_variable *var;
-	 ir_dereference_variable *deref;
-
-	 var = new(ctx) ir_variable(sig->return_type,
-				    hieralloc_asprintf(ctx, "%s_retval",
-						    sig->function_name()),
-				    ir_var_temporary);
-	 instructions->push_tail(var);
-
-	 deref = new(ctx) ir_dereference_variable(var);
-	 ir_assignment *assign = new(ctx) ir_assignment(deref, call, NULL);
-	 instructions->push_tail(assign);
-	 if (state->language_version >= 120)
-	    var->constant_value = call->constant_expression_value();
-
-	 deref = new(ctx) ir_dereference_variable(var);
-	 return deref;
-      } else {
-	 instructions->push_tail(call);
-	 return NULL;
-      }
-   } else {
-      char *str = prototype_string(NULL, name, actual_parameters);
-
-      _mesa_glsl_error(loc, state, "no matching function for call to `%s'",
-		       str);
-      hieralloc_free(str);
-
-      const char *prefix = "candidates are: ";
-
-      for (int i = -1; i < state->num_builtins_to_link; i++) {
-	 glsl_symbol_table *syms = i >= 0 ? state->builtins_to_link[i]->symbols
-					  : state->symbols;
-	 f = syms->get_function(name);
-	 if (f == NULL)
-	    continue;
-
-	 foreach_list (node, &f->signatures) {
-	    ir_function_signature *sig = (ir_function_signature *) node;
-
-	    str = prototype_string(sig->return_type, f->name, &sig->parameters);
-	    _mesa_glsl_error(loc, state, "%s%s\n", prefix, str);
-	    hieralloc_free(str);
-
-	    prefix = "                ";
-	 }
-
-      }
-
-      return ir_call::get_error_instruction(ctx);
-   }
-}
-
-
-/**
- * Perform automatic type conversion of constructor parameters
- *
- * This implements the rules in the "Conversion and Scalar Constructors"
- * section (GLSL 1.10 section 5.4.1), not the "Implicit Conversions" rules.
- */
-static ir_rvalue *
-convert_component(ir_rvalue *src, const glsl_type *desired_type)
-{
-   void *ctx = hieralloc_parent(src);
-   const unsigned a = desired_type->base_type;
-   const unsigned b = src->type->base_type;
-   ir_expression *result = NULL;
-
-   if (src->type->is_error())
-      return src;
-
-   assert(a <= GLSL_TYPE_BOOL);
-   assert(b <= GLSL_TYPE_BOOL);
-
-   if ((a == b) || (src->type->is_integer() && desired_type->is_integer()))
-      return src;
-
-   switch (a) {
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-      if (b == GLSL_TYPE_FLOAT)
-	 result = new(ctx) ir_expression(ir_unop_f2i, desired_type, src, NULL);
-      else {
-	 assert(b == GLSL_TYPE_BOOL);
-	 result = new(ctx) ir_expression(ir_unop_b2i, desired_type, src, NULL);
-      }
-      break;
-   case GLSL_TYPE_FLOAT:
-      switch (b) {
-      case GLSL_TYPE_UINT:
-	 result = new(ctx) ir_expression(ir_unop_u2f, desired_type, src, NULL);
-	 break;
-      case GLSL_TYPE_INT:
-	 result = new(ctx) ir_expression(ir_unop_i2f, desired_type, src, NULL);
-	 break;
-      case GLSL_TYPE_BOOL:
-	 result = new(ctx) ir_expression(ir_unop_b2f, desired_type, src, NULL);
-	 break;
-      }
-      break;
-   case GLSL_TYPE_BOOL:
-      switch (b) {
-      case GLSL_TYPE_UINT:
-      case GLSL_TYPE_INT:
-	 result = new(ctx) ir_expression(ir_unop_i2b, desired_type, src, NULL);
-	 break;
-      case GLSL_TYPE_FLOAT:
-	 result = new(ctx) ir_expression(ir_unop_f2b, desired_type, src, NULL);
-	 break;
-      }
-      break;
-   }
-
-   assert(result != NULL);
-
-   /* Try constant folding; it may fold in the conversion we just added. */
-   ir_constant *const constant = result->constant_expression_value();
-   return (constant != NULL) ? (ir_rvalue *) constant : (ir_rvalue *) result;
-}
-
-/**
- * Dereference a specific component from a scalar, vector, or matrix
- */
-static ir_rvalue *
-dereference_component(ir_rvalue *src, unsigned component)
-{
-   void *ctx = hieralloc_parent(src);
-   assert(component < src->type->components());
-
-   /* If the source is a constant, just create a new constant instead of a
-    * dereference of the existing constant.
-    */
-   ir_constant *constant = src->as_constant();
-   if (constant)
-      return new(ctx) ir_constant(constant, component);
-
-   if (src->type->is_scalar()) {
-      return src;
-   } else if (src->type->is_vector()) {
-      return new(ctx) ir_swizzle(src, component, 0, 0, 0, 1);
-   } else {
-      assert(src->type->is_matrix());
-
-      /* Dereference a row of the matrix, then call this function again to get
-       * a specific element from that row.
-       */
-      const int c = component / src->type->column_type()->vector_elements;
-      const int r = component % src->type->column_type()->vector_elements;
-      ir_constant *const col_index = new(ctx) ir_constant(c);
-      ir_dereference *const col = new(ctx) ir_dereference_array(src, col_index);
-
-      col->type = src->type->column_type();
-
-      return dereference_component(col, r);
-   }
-
-   assert(!"Should not get here.");
-   return NULL;
-}
-
-
-static ir_rvalue *
-process_array_constructor(exec_list *instructions,
-			  const glsl_type *constructor_type,
-			  YYLTYPE *loc, exec_list *parameters,
-			  struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   /* Array constructors come in two forms: sized and unsized.  Sized array
-    * constructors look like 'vec4[2](a, b)', where 'a' and 'b' are vec4
-    * variables.  In this case the number of parameters must exactly match the
-    * specified size of the array.
-    *
-    * Unsized array constructors look like 'vec4[](a, b)', where 'a' and 'b'
-    * are vec4 variables.  In this case the size of the array being constructed
-    * is determined by the number of parameters.
-    *
-    * From page 52 (page 58 of the PDF) of the GLSL 1.50 spec:
-    *
-    *    "There must be exactly the same number of arguments as the size of
-    *    the array being constructed. If no size is present in the
-    *    constructor, then the array is explicitly sized to the number of
-    *    arguments provided. The arguments are assigned in order, starting at
-    *    element 0, to the elements of the constructed array. Each argument
-    *    must be the same type as the element type of the array, or be a type
-    *    that can be converted to the element type of the array according to
-    *    Section 4.1.10 "Implicit Conversions.""
-    */
-   exec_list actual_parameters;
-   const unsigned parameter_count =
-      process_parameters(instructions, &actual_parameters, parameters, state);
-
-   if ((parameter_count == 0)
-       || ((constructor_type->length != 0)
-	   && (constructor_type->length != parameter_count))) {
-      const unsigned min_param = (constructor_type->length == 0)
-	 ? 1 : constructor_type->length;
-
-      _mesa_glsl_error(loc, state, "array constructor must have %s %u "
-		       "parameter%s",
-		       (constructor_type->length != 0) ? "at least" : "exactly",
-		       min_param, (min_param <= 1) ? "" : "s");
-      return ir_call::get_error_instruction(ctx);
-   }
-
-   if (constructor_type->length == 0) {
-      constructor_type =
-	 glsl_type::get_array_instance(constructor_type->element_type(),
-				       parameter_count);
-      assert(constructor_type != NULL);
-      assert(constructor_type->length == parameter_count);
-   }
-
-   bool all_parameters_are_constant = true;
-
-   /* Type cast each parameter and, if possible, fold constants. */
-   foreach_list_safe(n, &actual_parameters) {
-      ir_rvalue *ir = (ir_rvalue *) n;
-      ir_rvalue *result = ir;
-
-      /* Apply implicit conversions (not the scalar constructor rules!) */
-      if (constructor_type->element_type()->is_float()) {
-	 const glsl_type *desired_type =
-	    glsl_type::get_instance(GLSL_TYPE_FLOAT,
-				    ir->type->vector_elements,
-				    ir->type->matrix_columns);
-	 result = convert_component(ir, desired_type);
-      }
-
-      if (result->type != constructor_type->element_type()) {
-	 _mesa_glsl_error(loc, state, "type error in array constructor: "
-			  "expected: %s, found %s",
-			  constructor_type->element_type()->name,
-			  result->type->name);
-      }
-
-      /* Attempt to convert the parameter to a constant valued expression.
-       * After doing so, track whether or not all the parameters to the
-       * constructor are trivially constant valued expressions.
-       */
-      ir_rvalue *const constant = result->constant_expression_value();
-
-      if (constant != NULL)
-         result = constant;
-      else
-         all_parameters_are_constant = false;
-
-      ir->replace_with(result);
-   }
-
-   if (all_parameters_are_constant)
-      return new(ctx) ir_constant(constructor_type, &actual_parameters);
-
-   ir_variable *var = new(ctx) ir_variable(constructor_type, "array_ctor",
-					   ir_var_temporary);
-   instructions->push_tail(var);
-
-   int i = 0;
-   foreach_list(node, &actual_parameters) {
-      ir_rvalue *rhs = (ir_rvalue *) node;
-      ir_rvalue *lhs = new(ctx) ir_dereference_array(var,
-						     new(ctx) ir_constant(i));
-
-      ir_instruction *assignment = new(ctx) ir_assignment(lhs, rhs, NULL);
-      instructions->push_tail(assignment);
-
-      i++;
-   }
-
-   return new(ctx) ir_dereference_variable(var);
-}
-
-
-/**
- * Try to convert a record constructor to a constant expression
- */
-static ir_constant *
-constant_record_constructor(const glsl_type *constructor_type,
-			    exec_list *parameters, void *mem_ctx)
-{
-   foreach_list(node, parameters) {
-      ir_constant *constant = ((ir_instruction *) node)->as_constant();
-      if (constant == NULL)
-	 return NULL;
-      node->replace_with(constant);
-   }
-
-   return new(mem_ctx) ir_constant(constructor_type, parameters);
-}
-
-
-/**
- * Determine if a list consists of a single scalar r-value
- */
-bool
-single_scalar_parameter(exec_list *parameters)
-{
-   const ir_rvalue *const p = (ir_rvalue *) parameters->head;
-   assert(((ir_rvalue *)p)->as_rvalue() != NULL);
-
-   return (p->type->is_scalar() && p->next->is_tail_sentinel());
-}
-
-
-/**
- * Generate inline code for a vector constructor
- *
- * The generated constructor code will consist of a temporary variable
- * declaration of the same type as the constructor.  A sequence of assignments
- * from constructor parameters to the temporary will follow.
- *
- * \return
- * An \c ir_dereference_variable of the temprorary generated in the constructor
- * body.
- */
-ir_rvalue *
-emit_inline_vector_constructor(const glsl_type *type,
-			       exec_list *instructions,
-			       exec_list *parameters,
-			       void *ctx)
-{
-   assert(!parameters->is_empty());
-
-   ir_variable *var = new(ctx) ir_variable(type, "vec_ctor", ir_var_temporary);
-   instructions->push_tail(var);
-
-   /* There are two kinds of vector constructors.
-    *
-    *  - Construct a vector from a single scalar by replicating that scalar to
-    *    all components of the vector.
-    *
-    *  - Construct a vector from an arbirary combination of vectors and
-    *    scalars.  The components of the constructor parameters are assigned
-    *    to the vector in order until the vector is full.
-    */
-   const unsigned lhs_components = type->components();
-   if (single_scalar_parameter(parameters)) {
-      ir_rvalue *first_param = (ir_rvalue *)parameters->head;
-      ir_rvalue *rhs = new(ctx) ir_swizzle(first_param, 0, 0, 0, 0,
-					   lhs_components);
-      ir_dereference_variable *lhs = new(ctx) ir_dereference_variable(var);
-      const unsigned mask = (1U << lhs_components) - 1;
-
-      assert(rhs->type == lhs->type);
-
-      ir_instruction *inst = new(ctx) ir_assignment(lhs, rhs, NULL, mask);
-      instructions->push_tail(inst);
-   } else {
-      unsigned base_component = 0;
-      unsigned base_lhs_component = 0;
-      ir_constant_data data;
-      unsigned constant_mask = 0, constant_components = 0;
-
-      memset(&data, 0, sizeof(data));
-
-      foreach_list(node, parameters) {
-	 ir_rvalue *param = (ir_rvalue *) node;
-	 unsigned rhs_components = param->type->components();
-
-	 /* Do not try to assign more components to the vector than it has!
-	  */
-	 if ((rhs_components + base_lhs_component) > lhs_components) {
-	    rhs_components = lhs_components - base_lhs_component;
-	 }
-
-	 const ir_constant *const c = param->as_constant();
-	 if (c != NULL) {
-	    for (unsigned i = 0; i < rhs_components; i++) {
-	       switch (c->type->base_type) {
-	       case GLSL_TYPE_UINT:
-		  data.u[i + base_component] = c->get_uint_component(i);
-		  break;
-	       case GLSL_TYPE_INT:
-		  data.i[i + base_component] = c->get_int_component(i);
-		  break;
-	       case GLSL_TYPE_FLOAT:
-		  data.f[i + base_component] = c->get_float_component(i);
-		  break;
-	       case GLSL_TYPE_BOOL:
-		  data.b[i + base_component] = c->get_bool_component(i);
-		  break;
-	       default:
-		  assert(!"Should not get here.");
-		  break;
-	       }
-	    }
-
-	    /* Mask of fields to be written in the assignment.
-	     */
-	    constant_mask |= ((1U << rhs_components) - 1) << base_lhs_component;
-	    constant_components += rhs_components;
-
-	    base_component += rhs_components;
-	 }
-	 /* Advance the component index by the number of components
-	  * that were just assigned.
-	  */
-	 base_lhs_component += rhs_components;
-      }
-
-      if (constant_mask != 0) {
-	 ir_dereference *lhs = new(ctx) ir_dereference_variable(var);
-	 const glsl_type *rhs_type = glsl_type::get_instance(var->type->base_type,
-							     constant_components,
-							     1);
-	 ir_rvalue *rhs = new(ctx) ir_constant(rhs_type, &data);
-
-	 ir_instruction *inst =
-	    new(ctx) ir_assignment(lhs, rhs, NULL, constant_mask);
-	 instructions->push_tail(inst);
-      }
-
-      base_component = 0;
-      foreach_list(node, parameters) {
-	 ir_rvalue *param = (ir_rvalue *) node;
-	 unsigned rhs_components = param->type->components();
-
-	 /* Do not try to assign more components to the vector than it has!
-	  */
-	 if ((rhs_components + base_component) > lhs_components) {
-	    rhs_components = lhs_components - base_component;
-	 }
-
-	 const ir_constant *const c = param->as_constant();
-	 if (c == NULL) {
-	    /* Mask of fields to be written in the assignment.
-	     */
-	    const unsigned write_mask = ((1U << rhs_components) - 1)
-	       << base_component;
-
-	    ir_dereference *lhs = new(ctx) ir_dereference_variable(var);
-
-	    /* Generate a swizzle so that LHS and RHS sizes match.
-	     */
-	    ir_rvalue *rhs =
-	       new(ctx) ir_swizzle(param, 0, 1, 2, 3, rhs_components);
-
-	    ir_instruction *inst =
-	       new(ctx) ir_assignment(lhs, rhs, NULL, write_mask);
-	    instructions->push_tail(inst);
-	 }
-
-	 /* Advance the component index by the number of components that were
-	  * just assigned.
-	  */
-	 base_component += rhs_components;
-      }
-   }
-   return new(ctx) ir_dereference_variable(var);
-}
-
-
-/**
- * Generate assignment of a portion of a vector to a portion of a matrix column
- *
- * \param src_base  First component of the source to be used in assignment
- * \param column    Column of destination to be assiged
- * \param row_base  First component of the destination column to be assigned
- * \param count     Number of components to be assigned
- *
- * \note
- * \c src_base + \c count must be less than or equal to the number of components
- * in the source vector.
- */
-ir_instruction *
-assign_to_matrix_column(ir_variable *var, unsigned column, unsigned row_base,
-			ir_rvalue *src, unsigned src_base, unsigned count,
-			void *mem_ctx)
-{
-   ir_constant *col_idx = new(mem_ctx) ir_constant(column);
-   ir_dereference *column_ref = new(mem_ctx) ir_dereference_array(var, col_idx);
-
-   assert(column_ref->type->components() >= (row_base + count));
-   assert(src->type->components() >= (src_base + count));
-
-   /* Generate a swizzle that extracts the number of components from the source
-    * that are to be assigned to the column of the matrix.
-    */
-   if (count < src->type->vector_elements) {
-      src = new(mem_ctx) ir_swizzle(src,
-				    src_base + 0, src_base + 1,
-				    src_base + 2, src_base + 3,
-				    count);
-   }
-
-   /* Mask of fields to be written in the assignment.
-    */
-   const unsigned write_mask = ((1U << count) - 1) << row_base;
-
-   return new(mem_ctx) ir_assignment(column_ref, src, NULL, write_mask);
-}
-
-
-/**
- * Generate inline code for a matrix constructor
- *
- * The generated constructor code will consist of a temporary variable
- * declaration of the same type as the constructor.  A sequence of assignments
- * from constructor parameters to the temporary will follow.
- *
- * \return
- * An \c ir_dereference_variable of the temprorary generated in the constructor
- * body.
- */
-ir_rvalue *
-emit_inline_matrix_constructor(const glsl_type *type,
-			       exec_list *instructions,
-			       exec_list *parameters,
-			       void *ctx)
-{
-   assert(!parameters->is_empty());
-
-   ir_variable *var = new(ctx) ir_variable(type, "mat_ctor", ir_var_temporary);
-   instructions->push_tail(var);
-
-   /* There are three kinds of matrix constructors.
-    *
-    *  - Construct a matrix from a single scalar by replicating that scalar to
-    *    along the diagonal of the matrix and setting all other components to
-    *    zero.
-    *
-    *  - Construct a matrix from an arbirary combination of vectors and
-    *    scalars.  The components of the constructor parameters are assigned
-    *    to the matrix in colum-major order until the matrix is full.
-    *
-    *  - Construct a matrix from a single matrix.  The source matrix is copied
-    *    to the upper left portion of the constructed matrix, and the remaining
-    *    elements take values from the identity matrix.
-    */
-   ir_rvalue *const first_param = (ir_rvalue *) parameters->head;
-   if (single_scalar_parameter(parameters)) {
-      /* Assign the scalar to the X component of a vec4, and fill the remaining
-       * components with zero.
-       */
-      ir_variable *rhs_var =
-	 new(ctx) ir_variable(glsl_type::vec4_type, "mat_ctor_vec",
-			      ir_var_temporary);
-      instructions->push_tail(rhs_var);
-
-      ir_constant_data zero;
-      zero.f[0] = 0.0;
-      zero.f[1] = 0.0;
-      zero.f[2] = 0.0;
-      zero.f[3] = 0.0;
-
-      ir_instruction *inst =
-	 new(ctx) ir_assignment(new(ctx) ir_dereference_variable(rhs_var),
-				new(ctx) ir_constant(rhs_var->type, &zero),
-				NULL);
-      instructions->push_tail(inst);
-
-      ir_dereference *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var);
-
-      inst = new(ctx) ir_assignment(rhs_ref, first_param, NULL, 0x01);
-      instructions->push_tail(inst);
-
-      /* Assign the temporary vector to each column of the destination matrix
-       * with a swizzle that puts the X component on the diagonal of the
-       * matrix.  In some cases this may mean that the X component does not
-       * get assigned into the column at all (i.e., when the matrix has more
-       * columns than rows).
-       */
-      static const unsigned rhs_swiz[4][4] = {
-	 { 0, 1, 1, 1 },
-	 { 1, 0, 1, 1 },
-	 { 1, 1, 0, 1 },
-	 { 1, 1, 1, 0 }
-      };
-
-      const unsigned cols_to_init = MIN2(type->matrix_columns,
-					 type->vector_elements);
-      for (unsigned i = 0; i < cols_to_init; i++) {
-	 ir_constant *const col_idx = new(ctx) ir_constant(i);
-	 ir_rvalue *const col_ref = new(ctx) ir_dereference_array(var, col_idx);
-
-	 ir_rvalue *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var);
-	 ir_rvalue *const rhs = new(ctx) ir_swizzle(rhs_ref, rhs_swiz[i],
-						    type->vector_elements);
-
-	 inst = new(ctx) ir_assignment(col_ref, rhs, NULL);
-	 instructions->push_tail(inst);
-      }
-
-      for (unsigned i = cols_to_init; i < type->matrix_columns; i++) {
-	 ir_constant *const col_idx = new(ctx) ir_constant(i);
-	 ir_rvalue *const col_ref = new(ctx) ir_dereference_array(var, col_idx);
-
-	 ir_rvalue *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var);
-	 ir_rvalue *const rhs = new(ctx) ir_swizzle(rhs_ref, 1, 1, 1, 1,
-						    type->vector_elements);
-
-	 inst = new(ctx) ir_assignment(col_ref, rhs, NULL);
-	 instructions->push_tail(inst);
-      }
-   } else if (first_param->type->is_matrix()) {
-      /* From page 50 (56 of the PDF) of the GLSL 1.50 spec:
-       *
-       *     "If a matrix is constructed from a matrix, then each component
-       *     (column i, row j) in the result that has a corresponding
-       *     component (column i, row j) in the argument will be initialized
-       *     from there. All other components will be initialized to the
-       *     identity matrix. If a matrix argument is given to a matrix
-       *     constructor, it is an error to have any other arguments."
-       */
-      assert(first_param->next->is_tail_sentinel());
-      ir_rvalue *const src_matrix = first_param;
-
-      /* If the source matrix is smaller, pre-initialize the relavent parts of
-       * the destination matrix to the identity matrix.
-       */
-      if ((src_matrix->type->matrix_columns < var->type->matrix_columns)
-	  || (src_matrix->type->vector_elements < var->type->vector_elements)) {
-
-	 /* If the source matrix has fewer rows, every column of the destination
-	  * must be initialized.  Otherwise only the columns in the destination
-	  * that do not exist in the source must be initialized.
-	  */
-	 unsigned col =
-	    (src_matrix->type->vector_elements < var->type->vector_elements)
-	    ? 0 : src_matrix->type->matrix_columns;
-
-	 const glsl_type *const col_type = var->type->column_type();
-	 for (/* empty */; col < var->type->matrix_columns; col++) {
-	    ir_constant_data ident;
-
-	    ident.f[0] = 0.0;
-	    ident.f[1] = 0.0;
-	    ident.f[2] = 0.0;
-	    ident.f[3] = 0.0;
-
-	    ident.f[col] = 1.0;
-
-	    ir_rvalue *const rhs = new(ctx) ir_constant(col_type, &ident);
-
-	    ir_rvalue *const lhs =
-	       new(ctx) ir_dereference_array(var, new(ctx) ir_constant(col));
-
-	    ir_instruction *inst = new(ctx) ir_assignment(lhs, rhs, NULL);
-	    instructions->push_tail(inst);
-	 }
-      }
-
-      /* Assign columns from the source matrix to the destination matrix.
-       *
-       * Since the parameter will be used in the RHS of multiple assignments,
-       * generate a temporary and copy the paramter there.
-       */
-      ir_variable *const rhs_var =
-	 new(ctx) ir_variable(first_param->type, "mat_ctor_mat",
-			      ir_var_temporary);
-      instructions->push_tail(rhs_var);
-
-      ir_dereference *const rhs_var_ref =
-	 new(ctx) ir_dereference_variable(rhs_var);
-      ir_instruction *const inst =
-	 new(ctx) ir_assignment(rhs_var_ref, first_param, NULL);
-      instructions->push_tail(inst);
-
-      const unsigned last_row = MIN2(src_matrix->type->vector_elements,
-				     var->type->vector_elements);
-      const unsigned last_col = MIN2(src_matrix->type->matrix_columns,
-				     var->type->matrix_columns);
-
-      unsigned swiz[4] = { 0, 0, 0, 0 };
-      for (unsigned i = 1; i < last_row; i++)
-	 swiz[i] = i;
-
-      const unsigned write_mask = (1U << last_row) - 1;
-
-      for (unsigned i = 0; i < last_col; i++) {
-	 ir_dereference *const lhs =
-	    new(ctx) ir_dereference_array(var, new(ctx) ir_constant(i));
-	 ir_rvalue *const rhs_col =
-	    new(ctx) ir_dereference_array(rhs_var, new(ctx) ir_constant(i));
-
-	 /* If one matrix has columns that are smaller than the columns of the
-	  * other matrix, wrap the column access of the larger with a swizzle
-	  * so that the LHS and RHS of the assignment have the same size (and
-	  * therefore have the same type).
-	  *
-	  * It would be perfectly valid to unconditionally generate the
-	  * swizzles, this this will typically result in a more compact IR tree.
-	  */
-	 ir_rvalue *rhs;
-	 if (lhs->type->vector_elements != rhs_col->type->vector_elements) {
-	    rhs = new(ctx) ir_swizzle(rhs_col, swiz, last_row);
-	 } else {
-	    rhs = rhs_col;
-	 }
-
-	 ir_instruction *inst =
-	    new(ctx) ir_assignment(lhs, rhs, NULL, write_mask);
-	 instructions->push_tail(inst);
-      }
-   } else {
-      const unsigned cols = type->matrix_columns;
-      const unsigned rows = type->vector_elements;
-      unsigned col_idx = 0;
-      unsigned row_idx = 0;
-
-      foreach_list (node, parameters) {
-	 ir_rvalue *const rhs = (ir_rvalue *) node;
-	 const unsigned components_remaining_this_column = rows - row_idx;
-	 unsigned rhs_components = rhs->type->components();
-	 unsigned rhs_base = 0;
-
-	 /* Since the parameter might be used in the RHS of two assignments,
-	  * generate a temporary and copy the paramter there.
-	  */
-	 ir_variable *rhs_var =
-	    new(ctx) ir_variable(rhs->type, "mat_ctor_vec", ir_var_temporary);
-	 instructions->push_tail(rhs_var);
-
-	 ir_dereference *rhs_var_ref =
-	    new(ctx) ir_dereference_variable(rhs_var);
-	 ir_instruction *inst = new(ctx) ir_assignment(rhs_var_ref, rhs, NULL);
-	 instructions->push_tail(inst);
-
-	 /* Assign the current parameter to as many components of the matrix
-	  * as it will fill.
-	  *
-	  * NOTE: A single vector parameter can span two matrix columns.  A
-	  * single vec4, for example, can completely fill a mat2.
-	  */
-	 if (rhs_components >= components_remaining_this_column) {
-	    const unsigned count = MIN2(rhs_components,
-					components_remaining_this_column);
-
-	    rhs_var_ref = new(ctx) ir_dereference_variable(rhs_var);
-
-	    ir_instruction *inst = assign_to_matrix_column(var, col_idx,
-							   row_idx,
-							   rhs_var_ref, 0,
-							   count, ctx);
-	    instructions->push_tail(inst);
-
-	    rhs_base = count;
-
-	    col_idx++;
-	    row_idx = 0;
-	 }
-
-	 /* If there is data left in the parameter and components left to be
-	  * set in the destination, emit another assignment.  It is possible
-	  * that the assignment could be of a vec4 to the last element of the
-	  * matrix.  In this case col_idx==cols, but there is still data
-	  * left in the source parameter.  Obviously, don't emit an assignment
-	  * to data outside the destination matrix.
-	  */
-	 if ((col_idx < cols) && (rhs_base < rhs_components)) {
-	    const unsigned count = rhs_components - rhs_base;
-
-	    rhs_var_ref = new(ctx) ir_dereference_variable(rhs_var);
-
-	    ir_instruction *inst = assign_to_matrix_column(var, col_idx,
-							   row_idx,
-							   rhs_var_ref,
-							   rhs_base,
-							   count, ctx);
-	    instructions->push_tail(inst);
-
-	    row_idx += count;
-	 }
-      }
-   }
-
-   return new(ctx) ir_dereference_variable(var);
-}
-
-
-ir_rvalue *
-emit_inline_record_constructor(const glsl_type *type,
-			       exec_list *instructions,
-			       exec_list *parameters,
-			       void *mem_ctx)
-{
-   ir_variable *const var =
-      new(mem_ctx) ir_variable(type, "record_ctor", ir_var_temporary);
-   ir_dereference_variable *const d = new(mem_ctx) ir_dereference_variable(var);
-
-   instructions->push_tail(var);
-
-   exec_node *node = parameters->head;
-   for (unsigned i = 0; i < type->length; i++) {
-      assert(!node->is_tail_sentinel());
-
-      ir_dereference *const lhs =
-	 new(mem_ctx) ir_dereference_record(d->clone(mem_ctx, NULL),
-					    type->fields.structure[i].name);
-
-      ir_rvalue *const rhs = ((ir_instruction *) node)->as_rvalue();
-      assert(rhs != NULL);
-
-      ir_instruction *const assign = new(mem_ctx) ir_assignment(lhs, rhs, NULL);
-
-      instructions->push_tail(assign);
-      node = node->next;
-   }
-
-   return d;
-}
-
-
-ir_rvalue *
-ast_function_expression::hir(exec_list *instructions,
-			     struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   /* There are three sorts of function calls.
-    *
-    * 1. constructors - The first subexpression is an ast_type_specifier.
-    * 2. methods - Only the .length() method of array types.
-    * 3. functions - Calls to regular old functions.
-    *
-    * Method calls are actually detected when the ast_field_selection
-    * expression is handled.
-    */
-   if (is_constructor()) {
-      const ast_type_specifier *type = (ast_type_specifier *) subexpressions[0];
-      YYLTYPE loc = type->get_location();
-      const char *name;
-
-      const glsl_type *const constructor_type = type->glsl_type(& name, state);
-
-
-      /* Constructors for samplers are illegal.
-       */
-      if (constructor_type->is_sampler()) {
-	 _mesa_glsl_error(& loc, state, "cannot construct sampler type `%s'",
-			  constructor_type->name);
-	 return ir_call::get_error_instruction(ctx);
-      }
-
-      if (constructor_type->is_array()) {
-	 if (state->language_version <= 110) {
-	    _mesa_glsl_error(& loc, state,
-			     "array constructors forbidden in GLSL 1.10");
-	    return ir_call::get_error_instruction(ctx);
-	 }
-
-	 return process_array_constructor(instructions, constructor_type,
-					  & loc, &this->expressions, state);
-      }
-
-
-      /* There are two kinds of constructor call.  Constructors for built-in
-       * language types, such as mat4 and vec2, are free form.  The only
-       * requirement is that the parameters must provide enough values of the
-       * correct scalar type.  Constructors for arrays and structures must
-       * have the exact number of parameters with matching types in the
-       * correct order.  These constructors follow essentially the same type
-       * matching rules as functions.
-       */
-      if (!constructor_type->is_numeric() && !constructor_type->is_boolean())
-	 return ir_call::get_error_instruction(ctx);
-
-      /* Total number of components of the type being constructed. */
-      const unsigned type_components = constructor_type->components();
-
-      /* Number of components from parameters that have actually been
-       * consumed.  This is used to perform several kinds of error checking.
-       */
-      unsigned components_used = 0;
-
-      unsigned matrix_parameters = 0;
-      unsigned nonmatrix_parameters = 0;
-      exec_list actual_parameters;
-
-      foreach_list (n, &this->expressions) {
-	 ast_node *ast = exec_node_data(ast_node, n, link);
-	 ir_rvalue *result = ast->hir(instructions, state)->as_rvalue();
-
-	 /* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec:
-	  *
-	  *    "It is an error to provide extra arguments beyond this
-	  *    last used argument."
-	  */
-	 if (components_used >= type_components) {
-	    _mesa_glsl_error(& loc, state, "too many parameters to `%s' "
-			     "constructor",
-			     constructor_type->name);
-	    return ir_call::get_error_instruction(ctx);
-	 }
-
-	 if (!result->type->is_numeric() && !result->type->is_boolean()) {
-	    _mesa_glsl_error(& loc, state, "cannot construct `%s' from a "
-			     "non-numeric data type",
-			     constructor_type->name);
-	    return ir_call::get_error_instruction(ctx);
-	 }
-
-	 /* Count the number of matrix and nonmatrix parameters.  This
-	  * is used below to enforce some of the constructor rules.
-	  */
-	 if (result->type->is_matrix())
-	    matrix_parameters++;
-	 else
-	    nonmatrix_parameters++;
-
-	 actual_parameters.push_tail(result);
-	 components_used += result->type->components();
-      }
-
-      /* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec:
-       *
-       *    "It is an error to construct matrices from other matrices. This
-       *    is reserved for future use."
-       */
-      if (state->language_version == 110 && matrix_parameters > 0
-	  && constructor_type->is_matrix()) {
-	 _mesa_glsl_error(& loc, state, "cannot construct `%s' from a "
-			  "matrix in GLSL 1.10",
-			  constructor_type->name);
-	 return ir_call::get_error_instruction(ctx);
-      }
-
-      /* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec:
-       *
-       *    "If a matrix argument is given to a matrix constructor, it is
-       *    an error to have any other arguments."
-       */
-      if ((matrix_parameters > 0)
-	  && ((matrix_parameters + nonmatrix_parameters) > 1)
-	  && constructor_type->is_matrix()) {
-	 _mesa_glsl_error(& loc, state, "for matrix `%s' constructor, "
-			  "matrix must be only parameter",
-			  constructor_type->name);
-	 return ir_call::get_error_instruction(ctx);
-      }
-
-      /* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec:
-       *
-       *    "In these cases, there must be enough components provided in the
-       *    arguments to provide an initializer for every component in the
-       *    constructed value."
-       */
-      if (components_used < type_components && components_used != 1
-	  && matrix_parameters == 0) {
-	 _mesa_glsl_error(& loc, state, "too few components to construct "
-			  "`%s'",
-			  constructor_type->name);
-	 return ir_call::get_error_instruction(ctx);
-      }
-
-      /* Later, we cast each parameter to the same base type as the
-       * constructor.  Since there are no non-floating point matrices, we
-       * need to break them up into a series of column vectors.
-       */
-      if (constructor_type->base_type != GLSL_TYPE_FLOAT) {
-	 foreach_list_safe(n, &actual_parameters) {
-	    ir_rvalue *matrix = (ir_rvalue *) n;
-
-	    if (!matrix->type->is_matrix())
-	       continue;
-
-	    /* Create a temporary containing the matrix. */
-	    ir_variable *var = new(ctx) ir_variable(matrix->type, "matrix_tmp",
-						    ir_var_temporary);
-	    instructions->push_tail(var);
-	    instructions->push_tail(new(ctx) ir_assignment(new(ctx)
-	       ir_dereference_variable(var), matrix, NULL));
-	    var->constant_value = matrix->constant_expression_value();
-
-	    /* Replace the matrix with dereferences of its columns. */
-	    for (int i = 0; i < matrix->type->matrix_columns; i++) {
-	       matrix->insert_before(new (ctx) ir_dereference_array(var,
-		  new(ctx) ir_constant(i)));
-	    }
-	    matrix->remove();
-	 }
-      }
-
-      bool all_parameters_are_constant = true;
-
-      /* Type cast each parameter and, if possible, fold constants.*/
-      foreach_list_safe(n, &actual_parameters) {
-	 ir_rvalue *ir = (ir_rvalue *) n;
-
-	 const glsl_type *desired_type =
-	    glsl_type::get_instance(constructor_type->base_type,
-				    ir->type->vector_elements,
-				    ir->type->matrix_columns);
-	 ir_rvalue *result = convert_component(ir, desired_type);
-
-	 /* Attempt to convert the parameter to a constant valued expression.
-	  * After doing so, track whether or not all the parameters to the
-	  * constructor are trivially constant valued expressions.
-	  */
-	 ir_rvalue *const constant = result->constant_expression_value();
-
-	 if (constant != NULL)
-	    result = constant;
-	 else
-	    all_parameters_are_constant = false;
-
-	 if (result != ir) {
-	    ir->replace_with(result);
-	 }
-      }
-
-      /* If all of the parameters are trivially constant, create a
-       * constant representing the complete collection of parameters.
-       */
-      if (all_parameters_are_constant) {
-	 return new(ctx) ir_constant(constructor_type, &actual_parameters);
-      } else if (constructor_type->is_scalar()) {
-	 return dereference_component((ir_rvalue *) actual_parameters.head,
-				      0);
-      } else if (constructor_type->is_vector()) {
-	 return emit_inline_vector_constructor(constructor_type,
-					       instructions,
-					       &actual_parameters,
-					       ctx);
-      } else {
-	 assert(constructor_type->is_matrix());
-	 return emit_inline_matrix_constructor(constructor_type,
-					       instructions,
-					       &actual_parameters,
-					       ctx);
-      }
-   } else {
-      const ast_expression *id = subexpressions[0];
-      YYLTYPE loc = id->get_location();
-      exec_list actual_parameters;
-
-      process_parameters(instructions, &actual_parameters, &this->expressions,
-			 state);
-
-      const glsl_type *const type =
-	 state->symbols->get_type(id->primary_expression.identifier);
-
-      if ((type != NULL) && type->is_record()) {
-	 exec_node *node = actual_parameters.head;
-	 for (unsigned i = 0; i < type->length; i++) {
-	    ir_rvalue *ir = (ir_rvalue *) node;
-
-	    if (node->is_tail_sentinel()) {
-	       _mesa_glsl_error(&loc, state,
-				"insufficient parameters to constructor "
-				"for `%s'",
-				type->name);
-	       return ir_call::get_error_instruction(ctx);
-	    }
-
-	    if (apply_implicit_conversion(type->fields.structure[i].type, ir,
-					  state)) {
-	       node->replace_with(ir);
-	    } else {
-	       _mesa_glsl_error(&loc, state,
-				"parameter type mismatch in constructor "
-				"for `%s.%s' (%s vs %s)",
-				type->name,
-				type->fields.structure[i].name,
-				ir->type->name,
-				type->fields.structure[i].type->name);
-	       return ir_call::get_error_instruction(ctx);;
-	    }
-
-	    node = node->next;
-	 }
-
-	 if (!node->is_tail_sentinel()) {
-	    _mesa_glsl_error(&loc, state, "too many parameters in constructor "
-			     "for `%s'", type->name);
-	    return ir_call::get_error_instruction(ctx);
-	 }
-
-	 ir_rvalue *const constant =
-	    constant_record_constructor(type, &actual_parameters, state);
-
-	 return (constant != NULL)
-	    ? constant
-	    : emit_inline_record_constructor(type, instructions,
-					     &actual_parameters, state);
-      }
-
-      return match_function_by_name(instructions, 
-				    id->primary_expression.identifier, & loc,
-				    &actual_parameters, state);
-   }
-
-   return ir_call::get_error_instruction(ctx);
-}
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
deleted file mode 100644
index e56c5cf..0000000
--- a/src/glsl/ast_to_hir.cpp
+++ /dev/null
@@ -1,3110 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ast_to_hir.c
- * Convert abstract syntax to to high-level intermediate reprensentation (HIR).
- *
- * During the conversion to HIR, the majority of the symantic checking is
- * preformed on the program.  This includes:
- *
- *    * Symbol table management
- *    * Type checking
- *    * Function binding
- *
- * The majority of this work could be done during parsing, and the parser could
- * probably generate HIR directly.  However, this results in frequent changes
- * to the parser code.  Since we do not assume that every system this complier
- * is built on will have Flex and Bison installed, we have to store the code
- * generated by these tools in our version control system.  In other parts of
- * the system we've seen problems where a parser was changed but the generated
- * code was not committed, merge conflicts where created because two developers
- * had slightly different versions of Bison installed, etc.
- *
- * I have also noticed that running Bison generated parsers in GDB is very
- * irritating.  When you get a segfault on '$$ = $1->foo', you can't very
- * well 'print $1' in GDB.
- *
- * As a result, my preference is to put as little C code as possible in the
- * parser (and lexer) sources.
- */
-
-#include "main/core.h" /* for struct gl_extensions */
-#include "glsl_symbol_table.h"
-#include "glsl_parser_extras.h"
-#include "ast.h"
-#include "glsl_types.h"
-#include "ir.h"
-
-void
-_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
-{
-   _mesa_glsl_initialize_variables(instructions, state);
-   _mesa_glsl_initialize_functions(instructions, state);
-
-   state->symbols->language_version = state->language_version;
-
-   state->current_function = NULL;
-
-   /* Section 4.2 of the GLSL 1.20 specification states:
-    * "The built-in functions are scoped in a scope outside the global scope
-    *  users declare global variables in.  That is, a shader's global scope,
-    *  available for user-defined functions and global variables, is nested
-    *  inside the scope containing the built-in functions."
-    *
-    * Since built-in functions like ftransform() access built-in variables,
-    * it follows that those must be in the outer scope as well.
-    *
-    * We push scope here to create this nesting effect...but don't pop.
-    * This way, a shader's globals are still in the symbol table for use
-    * by the linker.
-    */
-   state->symbols->push_scope();
-
-   foreach_list_typed (ast_node, ast, link, & state->translation_unit)
-      ast->hir(instructions, state);
-}
-
-
-/**
- * If a conversion is available, convert one operand to a different type
- *
- * The \c from \c ir_rvalue is converted "in place".
- *
- * \param to     Type that the operand it to be converted to
- * \param from   Operand that is being converted
- * \param state  GLSL compiler state
- *
- * \return
- * If a conversion is possible (or unnecessary), \c true is returned.
- * Otherwise \c false is returned.
- */
-bool
-apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from,
-			  struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   if (to->base_type == from->type->base_type)
-      return true;
-
-   /* This conversion was added in GLSL 1.20.  If the compilation mode is
-    * GLSL 1.10, the conversion is skipped.
-    */
-   if (state->language_version < 120)
-      return false;
-
-   /* From page 27 (page 33 of the PDF) of the GLSL 1.50 spec:
-    *
-    *    "There are no implicit array or structure conversions. For
-    *    example, an array of int cannot be implicitly converted to an
-    *    array of float. There are no implicit conversions between
-    *    signed and unsigned integers."
-    */
-   /* FINISHME: The above comment is partially a lie.  There is int/uint
-    * FINISHME: conversion for immediate constants.
-    */
-   if (!to->is_float() || !from->type->is_numeric())
-      return false;
-
-   /* Convert to a floating point type with the same number of components
-    * as the original type - i.e. int to float, not int to vec4.
-    */
-   to = glsl_type::get_instance(GLSL_TYPE_FLOAT, from->type->vector_elements,
-			        from->type->matrix_columns);
-
-   switch (from->type->base_type) {
-   case GLSL_TYPE_INT:
-      from = new(ctx) ir_expression(ir_unop_i2f, to, from, NULL);
-      break;
-   case GLSL_TYPE_UINT:
-      from = new(ctx) ir_expression(ir_unop_u2f, to, from, NULL);
-      break;
-   case GLSL_TYPE_BOOL:
-      from = new(ctx) ir_expression(ir_unop_b2f, to, from, NULL);
-      break;
-   default:
-      assert(0);
-   }
-
-   return true;
-}
-
-
-static const struct glsl_type *
-arithmetic_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b,
-		       bool multiply,
-		       struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-   const glsl_type *type_a = value_a->type;
-   const glsl_type *type_b = value_b->type;
-
-   /* From GLSL 1.50 spec, page 56:
-    *
-    *    "The arithmetic binary operators add (+), subtract (-),
-    *    multiply (*), and divide (/) operate on integer and
-    *    floating-point scalars, vectors, and matrices."
-    */
-   if (!type_a->is_numeric() || !type_b->is_numeric()) {
-      _mesa_glsl_error(loc, state,
-		       "Operands to arithmetic operators must be numeric");
-      return glsl_type::error_type;
-   }
-
-
-   /*    "If one operand is floating-point based and the other is
-    *    not, then the conversions from Section 4.1.10 "Implicit
-    *    Conversions" are applied to the non-floating-point-based operand."
-    */
-   if (!apply_implicit_conversion(type_a, value_b, state)
-       && !apply_implicit_conversion(type_b, value_a, state)) {
-      _mesa_glsl_error(loc, state,
-		       "Could not implicitly convert operands to "
-		       "arithmetic operator");
-      return glsl_type::error_type;
-   }
-   type_a = value_a->type;
-   type_b = value_b->type;
-
-   /*    "If the operands are integer types, they must both be signed or
-    *    both be unsigned."
-    *
-    * From this rule and the preceeding conversion it can be inferred that
-    * both types must be GLSL_TYPE_FLOAT, or GLSL_TYPE_UINT, or GLSL_TYPE_INT.
-    * The is_numeric check above already filtered out the case where either
-    * type is not one of these, so now the base types need only be tested for
-    * equality.
-    */
-   if (type_a->base_type != type_b->base_type) {
-      _mesa_glsl_error(loc, state,
-		       "base type mismatch for arithmetic operator");
-      return glsl_type::error_type;
-   }
-
-   /*    "All arithmetic binary operators result in the same fundamental type
-    *    (signed integer, unsigned integer, or floating-point) as the
-    *    operands they operate on, after operand type conversion. After
-    *    conversion, the following cases are valid
-    *
-    *    * The two operands are scalars. In this case the operation is
-    *      applied, resulting in a scalar."
-    */
-   if (type_a->is_scalar() && type_b->is_scalar())
-      return type_a;
-
-   /*   "* One operand is a scalar, and the other is a vector or matrix.
-    *      In this case, the scalar operation is applied independently to each
-    *      component of the vector or matrix, resulting in the same size
-    *      vector or matrix."
-    */
-   if (type_a->is_scalar()) {
-      if (!type_b->is_scalar())
-	 return type_b;
-   } else if (type_b->is_scalar()) {
-      return type_a;
-   }
-
-   /* All of the combinations of <scalar, scalar>, <vector, scalar>,
-    * <scalar, vector>, <scalar, matrix>, and <matrix, scalar> have been
-    * handled.
-    */
-   assert(!type_a->is_scalar());
-   assert(!type_b->is_scalar());
-
-   /*   "* The two operands are vectors of the same size. In this case, the
-    *      operation is done component-wise resulting in the same size
-    *      vector."
-    */
-   if (type_a->is_vector() && type_b->is_vector()) {
-      if (type_a == type_b) {
-	 return type_a;
-      } else {
-	 _mesa_glsl_error(loc, state,
-			  "vector size mismatch for arithmetic operator");
-	 return glsl_type::error_type;
-      }
-   }
-
-   /* All of the combinations of <scalar, scalar>, <vector, scalar>,
-    * <scalar, vector>, <scalar, matrix>, <matrix, scalar>, and
-    * <vector, vector> have been handled.  At least one of the operands must
-    * be matrix.  Further, since there are no integer matrix types, the base
-    * type of both operands must be float.
-    */
-   assert(type_a->is_matrix() || type_b->is_matrix());
-   assert(type_a->base_type == GLSL_TYPE_FLOAT);
-   assert(type_b->base_type == GLSL_TYPE_FLOAT);
-
-   /*   "* The operator is add (+), subtract (-), or divide (/), and the
-    *      operands are matrices with the same number of rows and the same
-    *      number of columns. In this case, the operation is done component-
-    *      wise resulting in the same size matrix."
-    *    * The operator is multiply (*), where both operands are matrices or
-    *      one operand is a vector and the other a matrix. A right vector
-    *      operand is treated as a column vector and a left vector operand as a
-    *      row vector. In all these cases, it is required that the number of
-    *      columns of the left operand is equal to the number of rows of the
-    *      right operand. Then, the multiply (*) operation does a linear
-    *      algebraic multiply, yielding an object that has the same number of
-    *      rows as the left operand and the same number of columns as the right
-    *      operand. Section 5.10 "Vector and Matrix Operations" explains in
-    *      more detail how vectors and matrices are operated on."
-    */
-   if (! multiply) {
-      if (type_a == type_b)
-	 return type_a;
-   } else {
-      if (type_a->is_matrix() && type_b->is_matrix()) {
-	 /* Matrix multiply.  The columns of A must match the rows of B.  Given
-	  * the other previously tested constraints, this means the vector type
-	  * of a row from A must be the same as the vector type of a column from
-	  * B.
-	  */
-	 if (type_a->row_type() == type_b->column_type()) {
-	    /* The resulting matrix has the number of columns of matrix B and
-	     * the number of rows of matrix A.  We get the row count of A by
-	     * looking at the size of a vector that makes up a column.  The
-	     * transpose (size of a row) is done for B.
-	     */
-	    const glsl_type *const type =
-	       glsl_type::get_instance(type_a->base_type,
-				       type_a->column_type()->vector_elements,
-				       type_b->row_type()->vector_elements);
-	    assert(type != glsl_type::error_type);
-
-	    return type;
-	 }
-      } else if (type_a->is_matrix()) {
-	 /* A is a matrix and B is a column vector.  Columns of A must match
-	  * rows of B.  Given the other previously tested constraints, this
-	  * means the vector type of a row from A must be the same as the
-	  * vector the type of B.
-	  */
-	 if (type_a->row_type() == type_b) {
-	    /* The resulting vector has a number of elements equal to
-	     * the number of rows of matrix A. */
-	    const glsl_type *const type =
-	       glsl_type::get_instance(type_a->base_type,
-				       type_a->column_type()->vector_elements,
-				       1);
-	    assert(type != glsl_type::error_type);
-
-	    return type;
-	 }
-      } else {
-	 assert(type_b->is_matrix());
-
-	 /* A is a row vector and B is a matrix.  Columns of A must match rows
-	  * of B.  Given the other previously tested constraints, this means
-	  * the type of A must be the same as the vector type of a column from
-	  * B.
-	  */
-	 if (type_a == type_b->column_type()) {
-	    /* The resulting vector has a number of elements equal to
-	     * the number of columns of matrix B. */
-	    const glsl_type *const type =
-	       glsl_type::get_instance(type_a->base_type,
-				       type_b->row_type()->vector_elements,
-				       1);
-	    assert(type != glsl_type::error_type);
-
-	    return type;
-	 }
-      }
-
-      _mesa_glsl_error(loc, state, "size mismatch for matrix multiplication");
-      return glsl_type::error_type;
-   }
-
-
-   /*    "All other cases are illegal."
-    */
-   _mesa_glsl_error(loc, state, "type mismatch");
-   return glsl_type::error_type;
-}
-
-
-static const struct glsl_type *
-unary_arithmetic_result_type(const struct glsl_type *type,
-			     struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-   /* From GLSL 1.50 spec, page 57:
-    *
-    *    "The arithmetic unary operators negate (-), post- and pre-increment
-    *     and decrement (-- and ++) operate on integer or floating-point
-    *     values (including vectors and matrices). All unary operators work
-    *     component-wise on their operands. These result with the same type
-    *     they operated on."
-    */
-   if (!type->is_numeric()) {
-      _mesa_glsl_error(loc, state,
-		       "Operands to arithmetic operators must be numeric");
-      return glsl_type::error_type;
-   }
-
-   return type;
-}
-
-/**
- * \brief Return the result type of a bit-logic operation.
- *
- * If the given types to the bit-logic operator are invalid, return
- * glsl_type::error_type.
- *
- * \param type_a Type of LHS of bit-logic op
- * \param type_b Type of RHS of bit-logic op
- */
-static const struct glsl_type *
-bit_logic_result_type(const struct glsl_type *type_a,
-                      const struct glsl_type *type_b,
-                      ast_operators op,
-                      struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-    if (state->language_version < 130) {
-       _mesa_glsl_error(loc, state, "bit operations require GLSL 1.30");
-       return glsl_type::error_type;
-    }
-
-    /* From page 50 (page 56 of PDF) of GLSL 1.30 spec:
-     *
-     *     "The bitwise operators and (&), exclusive-or (^), and inclusive-or
-     *     (|). The operands must be of type signed or unsigned integers or
-     *     integer vectors."
-     */
-    if (!type_a->is_integer()) {
-       _mesa_glsl_error(loc, state, "LHS of `%s' must be an integer",
-                         ast_expression::operator_string(op));
-       return glsl_type::error_type;
-    }
-    if (!type_b->is_integer()) {
-       _mesa_glsl_error(loc, state, "RHS of `%s' must be an integer",
-                        ast_expression::operator_string(op));
-       return glsl_type::error_type;
-    }
-
-    /*     "The fundamental types of the operands (signed or unsigned) must
-     *     match,"
-     */
-    if (type_a->base_type != type_b->base_type) {
-       _mesa_glsl_error(loc, state, "operands of `%s' must have the same "
-                        "base type", ast_expression::operator_string(op));
-       return glsl_type::error_type;
-    }
-
-    /*     "The operands cannot be vectors of differing size." */
-    if (type_a->is_vector() &&
-        type_b->is_vector() &&
-        type_a->vector_elements != type_b->vector_elements) {
-       _mesa_glsl_error(loc, state, "operands of `%s' cannot be vectors of "
-                        "different sizes", ast_expression::operator_string(op));
-       return glsl_type::error_type;
-    }
-
-    /*     "If one operand is a scalar and the other a vector, the scalar is
-     *     applied component-wise to the vector, resulting in the same type as
-     *     the vector. The fundamental types of the operands [...] will be the
-     *     resulting fundamental type."
-     */
-    if (type_a->is_scalar())
-        return type_b;
-    else
-        return type_a;
-}
-
-static const struct glsl_type *
-modulus_result_type(const struct glsl_type *type_a,
-		    const struct glsl_type *type_b,
-		    struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-   /* From GLSL 1.50 spec, page 56:
-    *    "The operator modulus (%) operates on signed or unsigned integers or
-    *    integer vectors. The operand types must both be signed or both be
-    *    unsigned."
-    */
-   if (!type_a->is_integer() || !type_b->is_integer()
-       || (type_a->base_type != type_b->base_type)) {
-      _mesa_glsl_error(loc, state, "type mismatch");
-      return glsl_type::error_type;
-   }
-
-   /*    "The operands cannot be vectors of differing size. If one operand is
-    *    a scalar and the other vector, then the scalar is applied component-
-    *    wise to the vector, resulting in the same type as the vector. If both
-    *    are vectors of the same size, the result is computed component-wise."
-    */
-   if (type_a->is_vector()) {
-      if (!type_b->is_vector()
-	  || (type_a->vector_elements == type_b->vector_elements))
-	 return type_a;
-   } else
-      return type_b;
-
-   /*    "The operator modulus (%) is not defined for any other data types
-    *    (non-integer types)."
-    */
-   _mesa_glsl_error(loc, state, "type mismatch");
-   return glsl_type::error_type;
-}
-
-
-static const struct glsl_type *
-relational_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b,
-		       struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-   const glsl_type *type_a = value_a->type;
-   const glsl_type *type_b = value_b->type;
-
-   /* From GLSL 1.50 spec, page 56:
-    *    "The relational operators greater than (>), less than (<), greater
-    *    than or equal (>=), and less than or equal (<=) operate only on
-    *    scalar integer and scalar floating-point expressions."
-    */
-   if (!type_a->is_numeric()
-       || !type_b->is_numeric()
-       || !type_a->is_scalar()
-       || !type_b->is_scalar()) {
-      _mesa_glsl_error(loc, state,
-		       "Operands to relational operators must be scalar and "
-		       "numeric");
-      return glsl_type::error_type;
-   }
-
-   /*    "Either the operands' types must match, or the conversions from
-    *    Section 4.1.10 "Implicit Conversions" will be applied to the integer
-    *    operand, after which the types must match."
-    */
-   if (!apply_implicit_conversion(type_a, value_b, state)
-       && !apply_implicit_conversion(type_b, value_a, state)) {
-      _mesa_glsl_error(loc, state,
-		       "Could not implicitly convert operands to "
-		       "relational operator");
-      return glsl_type::error_type;
-   }
-   type_a = value_a->type;
-   type_b = value_b->type;
-
-   if (type_a->base_type != type_b->base_type) {
-      _mesa_glsl_error(loc, state, "base type mismatch");
-      return glsl_type::error_type;
-   }
-
-   /*    "The result is scalar Boolean."
-    */
-   return glsl_type::bool_type;
-}
-
-/**
- * \brief Return the result type of a bit-shift operation.
- *
- * If the given types to the bit-shift operator are invalid, return
- * glsl_type::error_type.
- *
- * \param type_a Type of LHS of bit-shift op
- * \param type_b Type of RHS of bit-shift op
- */
-static const struct glsl_type *
-shift_result_type(const struct glsl_type *type_a,
-                  const struct glsl_type *type_b,
-                  ast_operators op,
-                  struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
-{
-   if (state->language_version < 130) {
-      _mesa_glsl_error(loc, state, "bit operations require GLSL 1.30");
-      return glsl_type::error_type;
-   }
-
-   /* From page 50 (page 56 of the PDF) of the GLSL 1.30 spec:
-    *
-    *     "The shift operators (<<) and (>>). For both operators, the operands
-    *     must be signed or unsigned integers or integer vectors. One operand
-    *     can be signed while the other is unsigned."
-    */
-   if (!type_a->is_integer()) {
-      _mesa_glsl_error(loc, state, "LHS of operator %s must be an integer or "
-              "integer vector", ast_expression::operator_string(op));
-     return glsl_type::error_type;
-
-   }
-   if (!type_b->is_integer()) {
-      _mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or "
-              "integer vector", ast_expression::operator_string(op));
-     return glsl_type::error_type;
-   }
-
-   /*     "If the first operand is a scalar, the second operand has to be
-    *     a scalar as well."
-    */
-   if (type_a->is_scalar() && !type_b->is_scalar()) {
-      _mesa_glsl_error(loc, state, "If the first operand of %s is scalar, the "
-              "second must be scalar as well",
-              ast_expression::operator_string(op));
-     return glsl_type::error_type;
-   }
-
-   /* If both operands are vectors, check that they have same number of
-    * elements.
-    */
-   if (type_a->is_vector() &&
-      type_b->is_vector() &&
-      type_a->vector_elements != type_b->vector_elements) {
-      _mesa_glsl_error(loc, state, "Vector operands to operator %s must "
-              "have same number of elements",
-              ast_expression::operator_string(op));
-     return glsl_type::error_type;
-   }
-
-   /*     "In all cases, the resulting type will be the same type as the left
-    *     operand."
-    */
-   return type_a;
-}
-
-/**
- * Validates that a value can be assigned to a location with a specified type
- *
- * Validates that \c rhs can be assigned to some location.  If the types are
- * not an exact match but an automatic conversion is possible, \c rhs will be
- * converted.
- *
- * \return
- * \c NULL if \c rhs cannot be assigned to a location with type \c lhs_type.
- * Otherwise the actual RHS to be assigned will be returned.  This may be
- * \c rhs, or it may be \c rhs after some type conversion.
- *
- * \note
- * In addition to being used for assignments, this function is used to
- * type-check return values.
- */
-ir_rvalue *
-validate_assignment(struct _mesa_glsl_parse_state *state,
-		    const glsl_type *lhs_type, ir_rvalue *rhs)
-{
-   const glsl_type *rhs_type = rhs->type;
-
-   /* If there is already some error in the RHS, just return it.  Anything
-    * else will lead to an avalanche of error message back to the user.
-    */
-   if (rhs_type->is_error())
-      return rhs;
-
-   /* If the types are identical, the assignment can trivially proceed.
-    */
-   if (rhs_type == lhs_type)
-      return rhs;
-
-   /* If the array element types are the same and the size of the LHS is zero,
-    * the assignment is okay.
-    *
-    * Note: Whole-array assignments are not permitted in GLSL 1.10, but this
-    * is handled by ir_dereference::is_lvalue.
-    */
-   if (lhs_type->is_array() && rhs->type->is_array()
-       && (lhs_type->element_type() == rhs->type->element_type())
-       && (lhs_type->array_size() == 0)) {
-      return rhs;
-   }
-
-   /* Check for implicit conversion in GLSL 1.20 */
-   if (apply_implicit_conversion(lhs_type, rhs, state)) {
-      rhs_type = rhs->type;
-      if (rhs_type == lhs_type)
-	 return rhs;
-   }
-
-   return NULL;
-}
-
-ir_rvalue *
-do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
-	      ir_rvalue *lhs, ir_rvalue *rhs,
-	      YYLTYPE lhs_loc)
-{
-   void *ctx = state;
-   bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
-
-   if (!error_emitted) {
-      if (!lhs->is_lvalue()) {
-	 _mesa_glsl_error(& lhs_loc, state, "non-lvalue in assignment");
-	 error_emitted = true;
-      }
-
-      if (state->es_shader && lhs->type->is_array()) {
-	 _mesa_glsl_error(&lhs_loc, state, "whole array assignment is not "
-			  "allowed in GLSL ES 1.00.");
-	 error_emitted = true;
-      }
-   }
-
-   ir_rvalue *new_rhs = validate_assignment(state, lhs->type, rhs);
-   if (new_rhs == NULL) {
-      _mesa_glsl_error(& lhs_loc, state, "type mismatch");
-   } else {
-      rhs = new_rhs;
-
-      /* If the LHS array was not declared with a size, it takes it size from
-       * the RHS.  If the LHS is an l-value and a whole array, it must be a
-       * dereference of a variable.  Any other case would require that the LHS
-       * is either not an l-value or not a whole array.
-       */
-      if (lhs->type->array_size() == 0) {
-	 ir_dereference *const d = lhs->as_dereference();
-
-	 assert(d != NULL);
-
-	 ir_variable *const var = d->variable_referenced();
-
-	 assert(var != NULL);
-
-	 if (var->max_array_access >= unsigned(rhs->type->array_size())) {
-	    /* FINISHME: This should actually log the location of the RHS. */
-	    _mesa_glsl_error(& lhs_loc, state, "array size must be > %u due to "
-			     "previous access",
-			     var->max_array_access);
-	 }
-
-	 var->type = glsl_type::get_array_instance(lhs->type->element_type(),
-						   rhs->type->array_size());
-	 d->type = var->type;
-      }
-   }
-
-   /* Most callers of do_assignment (assign, add_assign, pre_inc/dec,
-    * but not post_inc) need the converted assigned value as an rvalue
-    * to handle things like:
-    *
-    * i = j += 1;
-    *
-    * So we always just store the computed value being assigned to a
-    * temporary and return a deref of that temporary.  If the rvalue
-    * ends up not being used, the temp will get copy-propagated out.
-    */
-   ir_variable *var = new(ctx) ir_variable(rhs->type, "assignment_tmp",
-					   ir_var_temporary);
-   ir_dereference_variable *deref_var = new(ctx) ir_dereference_variable(var);
-   instructions->push_tail(var);
-   instructions->push_tail(new(ctx) ir_assignment(deref_var,
-						  rhs,
-						  NULL));
-   deref_var = new(ctx) ir_dereference_variable(var);
-
-   if (!error_emitted)
-      instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL));
-
-   return new(ctx) ir_dereference_variable(var);
-}
-
-static ir_rvalue *
-get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue)
-{
-   void *ctx = hieralloc_parent(lvalue);
-   ir_variable *var;
-
-   var = new(ctx) ir_variable(lvalue->type, "_post_incdec_tmp",
-			      ir_var_temporary);
-   instructions->push_tail(var);
-   var->mode = ir_var_auto;
-
-   instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var),
-						  lvalue, NULL));
-
-   /* Once we've created this temporary, mark it read only so it's no
-    * longer considered an lvalue.
-    */
-   var->read_only = true;
-
-   return new(ctx) ir_dereference_variable(var);
-}
-
-
-ir_rvalue *
-ast_node::hir(exec_list *instructions,
-	      struct _mesa_glsl_parse_state *state)
-{
-   (void) instructions;
-   (void) state;
-
-   return NULL;
-}
-
-static void
-mark_whole_array_access(ir_rvalue *access)
-{
-   ir_dereference_variable *deref = access->as_dereference_variable();
-
-   if (deref) {
-      deref->var->max_array_access = deref->type->length - 1;
-   }
-}
-
-static ir_rvalue *
-do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
-{
-   int join_op;
-   ir_rvalue *cmp = NULL;
-
-   if (operation == ir_binop_all_equal)
-      join_op = ir_binop_logic_and;
-   else
-      join_op = ir_binop_logic_or;
-
-   switch (op0->type->base_type) {
-   case GLSL_TYPE_FLOAT:
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-   case GLSL_TYPE_BOOL:
-      return new(mem_ctx) ir_expression(operation, op0, op1);
-
-   case GLSL_TYPE_ARRAY: {
-      for (unsigned int i = 0; i < op0->type->length; i++) {
-	 ir_rvalue *e0, *e1, *result;
-
-	 e0 = new(mem_ctx) ir_dereference_array(op0->clone(mem_ctx, NULL),
-						new(mem_ctx) ir_constant(i));
-	 e1 = new(mem_ctx) ir_dereference_array(op1->clone(mem_ctx, NULL),
-						new(mem_ctx) ir_constant(i));
-	 result = do_comparison(mem_ctx, operation, e0, e1);
-
-	 if (cmp) {
-	    cmp = new(mem_ctx) ir_expression(join_op, cmp, result);
-	 } else {
-	    cmp = result;
-	 }
-      }
-
-      mark_whole_array_access(op0);
-      mark_whole_array_access(op1);
-      break;
-   }
-
-   case GLSL_TYPE_STRUCT: {
-      for (unsigned int i = 0; i < op0->type->length; i++) {
-	 ir_rvalue *e0, *e1, *result;
-	 const char *field_name = op0->type->fields.structure[i].name;
-
-	 e0 = new(mem_ctx) ir_dereference_record(op0->clone(mem_ctx, NULL),
-						 field_name);
-	 e1 = new(mem_ctx) ir_dereference_record(op1->clone(mem_ctx, NULL),
-						 field_name);
-	 result = do_comparison(mem_ctx, operation, e0, e1);
-
-	 if (cmp) {
-	    cmp = new(mem_ctx) ir_expression(join_op, cmp, result);
-	 } else {
-	    cmp = result;
-	 }
-      }
-      break;
-   }
-
-   case GLSL_TYPE_ERROR:
-   case GLSL_TYPE_VOID:
-   case GLSL_TYPE_SAMPLER:
-      /* I assume a comparison of a struct containing a sampler just
-       * ignores the sampler present in the type.
-       */
-      break;
-
-   default:
-      assert(!"Should not get here.");
-      break;
-   }
-
-   if (cmp == NULL)
-      cmp = new(mem_ctx) ir_constant(true);
-
-   return cmp;
-}
-
-ir_rvalue *
-ast_expression::hir(exec_list *instructions,
-		    struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   static const int operations[AST_NUM_OPERATORS] = {
-      -1,               /* ast_assign doesn't convert to ir_expression. */
-      -1,               /* ast_plus doesn't convert to ir_expression. */
-      ir_unop_neg,
-      ir_binop_add,
-      ir_binop_sub,
-      ir_binop_mul,
-      ir_binop_div,
-      ir_binop_mod,
-      ir_binop_lshift,
-      ir_binop_rshift,
-      ir_binop_less,
-      ir_binop_greater,
-      ir_binop_lequal,
-      ir_binop_gequal,
-      ir_binop_all_equal,
-      ir_binop_any_nequal,
-      ir_binop_bit_and,
-      ir_binop_bit_xor,
-      ir_binop_bit_or,
-      ir_unop_bit_not,
-      ir_binop_logic_and,
-      ir_binop_logic_xor,
-      ir_binop_logic_or,
-      ir_unop_logic_not,
-
-      /* Note: The following block of expression types actually convert
-       * to multiple IR instructions.
-       */
-      ir_binop_mul,     /* ast_mul_assign */
-      ir_binop_div,     /* ast_div_assign */
-      ir_binop_mod,     /* ast_mod_assign */
-      ir_binop_add,     /* ast_add_assign */
-      ir_binop_sub,     /* ast_sub_assign */
-      ir_binop_lshift,  /* ast_ls_assign */
-      ir_binop_rshift,  /* ast_rs_assign */
-      ir_binop_bit_and, /* ast_and_assign */
-      ir_binop_bit_xor, /* ast_xor_assign */
-      ir_binop_bit_or,  /* ast_or_assign */
-
-      -1,               /* ast_conditional doesn't convert to ir_expression. */
-      ir_binop_add,     /* ast_pre_inc. */
-      ir_binop_sub,     /* ast_pre_dec. */
-      ir_binop_add,     /* ast_post_inc. */
-      ir_binop_sub,     /* ast_post_dec. */
-      -1,               /* ast_field_selection doesn't conv to ir_expression. */
-      -1,               /* ast_array_index doesn't convert to ir_expression. */
-      -1,               /* ast_function_call doesn't conv to ir_expression. */
-      -1,               /* ast_identifier doesn't convert to ir_expression. */
-      -1,               /* ast_int_constant doesn't convert to ir_expression. */
-      -1,               /* ast_uint_constant doesn't conv to ir_expression. */
-      -1,               /* ast_float_constant doesn't conv to ir_expression. */
-      -1,               /* ast_bool_constant doesn't conv to ir_expression. */
-      -1,               /* ast_sequence doesn't convert to ir_expression. */
-   };
-   ir_rvalue *result = NULL;
-   ir_rvalue *op[3];
-   const struct glsl_type *type = glsl_type::error_type;
-   bool error_emitted = false;
-   YYLTYPE loc;
-
-   loc = this->get_location();
-
-   switch (this->oper) {
-   case ast_assign: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      result = do_assignment(instructions, state, op[0], op[1],
-			     this->subexpressions[0]->get_location());
-      error_emitted = result->type->is_error();
-      type = result->type;
-      break;
-   }
-
-   case ast_plus:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      type = unary_arithmetic_result_type(op[0]->type, state, & loc);
-
-      error_emitted = type->is_error();
-
-      result = op[0];
-      break;
-
-   case ast_neg:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      type = unary_arithmetic_result_type(op[0]->type, state, & loc);
-
-      error_emitted = type->is_error();
-
-      result = new(ctx) ir_expression(operations[this->oper], type,
-				      op[0], NULL);
-      break;
-
-   case ast_add:
-   case ast_sub:
-   case ast_mul:
-   case ast_div:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      type = arithmetic_result_type(op[0], op[1],
-				    (this->oper == ast_mul),
-				    state, & loc);
-      error_emitted = type->is_error();
-
-      result = new(ctx) ir_expression(operations[this->oper], type,
-				      op[0], op[1]);
-      break;
-
-   case ast_mod:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      type = modulus_result_type(op[0]->type, op[1]->type, state, & loc);
-
-      assert(operations[this->oper] == ir_binop_mod);
-
-      result = new(ctx) ir_expression(operations[this->oper], type,
-				      op[0], op[1]);
-      error_emitted = type->is_error();
-      break;
-
-   case ast_lshift:
-   case ast_rshift:
-       if (state->language_version < 130) {
-          _mesa_glsl_error(&loc, state, "operator %s requires GLSL 1.30",
-              operator_string(this->oper));
-          error_emitted = true;
-       }
-
-       op[0] = this->subexpressions[0]->hir(instructions, state);
-       op[1] = this->subexpressions[1]->hir(instructions, state);
-       type = shift_result_type(op[0]->type, op[1]->type, this->oper, state,
-                                &loc);
-       result = new(ctx) ir_expression(operations[this->oper], type,
-                                       op[0], op[1]);
-       error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-       break;
-
-   case ast_less:
-   case ast_greater:
-   case ast_lequal:
-   case ast_gequal:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      type = relational_result_type(op[0], op[1], state, & loc);
-
-      /* The relational operators must either generate an error or result
-       * in a scalar boolean.  See page 57 of the GLSL 1.50 spec.
-       */
-      assert(type->is_error()
-	     || ((type->base_type == GLSL_TYPE_BOOL)
-		 && type->is_scalar()));
-
-      result = new(ctx) ir_expression(operations[this->oper], type,
-				      op[0], op[1]);
-      error_emitted = type->is_error();
-      break;
-
-   case ast_nequal:
-   case ast_equal:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      /* From page 58 (page 64 of the PDF) of the GLSL 1.50 spec:
-       *
-       *    "The equality operators equal (==), and not equal (!=)
-       *    operate on all types. They result in a scalar Boolean. If
-       *    the operand types do not match, then there must be a
-       *    conversion from Section 4.1.10 "Implicit Conversions"
-       *    applied to one operand that can make them match, in which
-       *    case this conversion is done."
-       */
-      if ((!apply_implicit_conversion(op[0]->type, op[1], state)
-	   && !apply_implicit_conversion(op[1]->type, op[0], state))
-	  || (op[0]->type != op[1]->type)) {
-	 _mesa_glsl_error(& loc, state, "operands of `%s' must have the same "
-			  "type", (this->oper == ast_equal) ? "==" : "!=");
-	 error_emitted = true;
-      } else if ((state->language_version <= 110)
-		 && (op[0]->type->is_array() || op[1]->type->is_array())) {
-	 _mesa_glsl_error(& loc, state, "array comparisons forbidden in "
-			  "GLSL 1.10");
-	 error_emitted = true;
-      }
-
-      result = do_comparison(ctx, operations[this->oper], op[0], op[1]);
-      type = glsl_type::bool_type;
-
-      assert(error_emitted || (result->type == glsl_type::bool_type));
-      break;
-
-   case ast_bit_and:
-   case ast_bit_xor:
-   case ast_bit_or:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-      type = bit_logic_result_type(op[0]->type, op[1]->type, this->oper,
-                                   state, &loc);
-      result = new(ctx) ir_expression(operations[this->oper], type,
-				      op[0], op[1]);
-      error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-      break;
-
-   case ast_bit_not:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      if (state->language_version < 130) {
-	 _mesa_glsl_error(&loc, state, "bit-wise operations require GLSL 1.30");
-	 error_emitted = true;
-      }
-
-      if (!op[0]->type->is_integer()) {
-	 _mesa_glsl_error(&loc, state, "operand of `~' must be an integer");
-	 error_emitted = true;
-      }
-
-      type = op[0]->type;
-      result = new(ctx) ir_expression(ir_unop_bit_not, type, op[0], NULL);
-      break;
-
-   case ast_logic_and: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      if (!op[0]->type->is_boolean() || !op[0]->type->is_scalar()) {
-	 YYLTYPE loc = this->subexpressions[0]->get_location();
-
-	 _mesa_glsl_error(& loc, state, "LHS of `%s' must be scalar boolean",
-			  operator_string(this->oper));
-	 error_emitted = true;
-      }
-
-      ir_constant *op0_const = op[0]->constant_expression_value();
-      if (op0_const) {
-	 if (op0_const->value.b[0]) {
-	    op[1] = this->subexpressions[1]->hir(instructions, state);
-
-	    if (!op[1]->type->is_boolean() || !op[1]->type->is_scalar()) {
-	       YYLTYPE loc = this->subexpressions[1]->get_location();
-
-	       _mesa_glsl_error(& loc, state,
-				"RHS of `%s' must be scalar boolean",
-				operator_string(this->oper));
-	       error_emitted = true;
-	    }
-	    result = op[1];
-	 } else {
-	    result = op0_const;
-	 }
-	 type = glsl_type::bool_type;
-      } else {
-	 ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
-						       "and_tmp",
-						       ir_var_temporary);
-	 instructions->push_tail(tmp);
-
-	 ir_if *const stmt = new(ctx) ir_if(op[0]);
-	 instructions->push_tail(stmt);
-
-	 op[1] = this->subexpressions[1]->hir(&stmt->then_instructions, state);
-
-	 if (!op[1]->type->is_boolean() || !op[1]->type->is_scalar()) {
-	    YYLTYPE loc = this->subexpressions[1]->get_location();
-
-	    _mesa_glsl_error(& loc, state,
-			     "RHS of `%s' must be scalar boolean",
-			     operator_string(this->oper));
-	    error_emitted = true;
-	 }
-
-	 ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const then_assign =
-	    new(ctx) ir_assignment(then_deref, op[1], NULL);
-	 stmt->then_instructions.push_tail(then_assign);
-
-	 ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const else_assign =
-	    new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false), NULL);
-	 stmt->else_instructions.push_tail(else_assign);
-
-	 result = new(ctx) ir_dereference_variable(tmp);
-	 type = tmp->type;
-      }
-      break;
-   }
-
-   case ast_logic_or: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      if (!op[0]->type->is_boolean() || !op[0]->type->is_scalar()) {
-	 YYLTYPE loc = this->subexpressions[0]->get_location();
-
-	 _mesa_glsl_error(& loc, state, "LHS of `%s' must be scalar boolean",
-			  operator_string(this->oper));
-	 error_emitted = true;
-      }
-
-      ir_constant *op0_const = op[0]->constant_expression_value();
-      if (op0_const) {
-	 if (op0_const->value.b[0]) {
-	    result = op0_const;
-	 } else {
-	    op[1] = this->subexpressions[1]->hir(instructions, state);
-
-	    if (!op[1]->type->is_boolean() || !op[1]->type->is_scalar()) {
-	       YYLTYPE loc = this->subexpressions[1]->get_location();
-
-	       _mesa_glsl_error(& loc, state,
-				"RHS of `%s' must be scalar boolean",
-				operator_string(this->oper));
-	       error_emitted = true;
-	    }
-	    result = op[1];
-	 }
-	 type = glsl_type::bool_type;
-      } else {
-	 ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
-						       "or_tmp",
-						       ir_var_temporary);
-	 instructions->push_tail(tmp);
-
-	 ir_if *const stmt = new(ctx) ir_if(op[0]);
-	 instructions->push_tail(stmt);
-
-	 op[1] = this->subexpressions[1]->hir(&stmt->else_instructions, state);
-
-	 if (!op[1]->type->is_boolean() || !op[1]->type->is_scalar()) {
-	    YYLTYPE loc = this->subexpressions[1]->get_location();
-
-	    _mesa_glsl_error(& loc, state, "RHS of `%s' must be scalar boolean",
-			     operator_string(this->oper));
-	    error_emitted = true;
-	 }
-
-	 ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const then_assign =
-	    new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true), NULL);
-	 stmt->then_instructions.push_tail(then_assign);
-
-	 ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const else_assign =
-	    new(ctx) ir_assignment(else_deref, op[1], NULL);
-	 stmt->else_instructions.push_tail(else_assign);
-
-	 result = new(ctx) ir_dereference_variable(tmp);
-	 type = tmp->type;
-      }
-      break;
-   }
-
-   case ast_logic_xor:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-
-      result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type,
-				      op[0], op[1]);
-      type = glsl_type::bool_type;
-      break;
-
-   case ast_logic_not:
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      if (!op[0]->type->is_boolean() || !op[0]->type->is_scalar()) {
-	 YYLTYPE loc = this->subexpressions[0]->get_location();
-
-	 _mesa_glsl_error(& loc, state,
-			  "operand of `!' must be scalar boolean");
-	 error_emitted = true;
-      }
-
-      result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type,
-				      op[0], NULL);
-      type = glsl_type::bool_type;
-      break;
-
-   case ast_mul_assign:
-   case ast_div_assign:
-   case ast_add_assign:
-   case ast_sub_assign: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      type = arithmetic_result_type(op[0], op[1],
-				    (this->oper == ast_mul_assign),
-				    state, & loc);
-
-      ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
-						   op[0], op[1]);
-
-      result = do_assignment(instructions, state,
-			     op[0]->clone(ctx, NULL), temp_rhs,
-			     this->subexpressions[0]->get_location());
-      type = result->type;
-      error_emitted = (op[0]->type->is_error());
-
-      /* GLSL 1.10 does not allow array assignment.  However, we don't have to
-       * explicitly test for this because none of the binary expression
-       * operators allow array operands either.
-       */
-
-      break;
-   }
-
-   case ast_mod_assign: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-
-      type = modulus_result_type(op[0]->type, op[1]->type, state, & loc);
-
-      assert(operations[this->oper] == ir_binop_mod);
-
-      ir_rvalue *temp_rhs;
-      temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
-					op[0], op[1]);
-
-      result = do_assignment(instructions, state,
-			     op[0]->clone(ctx, NULL), temp_rhs,
-			     this->subexpressions[0]->get_location());
-      type = result->type;
-      error_emitted = type->is_error();
-      break;
-   }
-
-   case ast_ls_assign:
-   case ast_rs_assign: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-      type = shift_result_type(op[0]->type, op[1]->type, this->oper, state,
-                               &loc);
-      ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
-                                                   type, op[0], op[1]);
-      result = do_assignment(instructions, state, op[0]->clone(ctx, NULL),
-                             temp_rhs,
-                             this->subexpressions[0]->get_location());
-      error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-      break;
-   }
-
-   case ast_and_assign:
-   case ast_xor_assign:
-   case ast_or_assign: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      op[1] = this->subexpressions[1]->hir(instructions, state);
-      type = bit_logic_result_type(op[0]->type, op[1]->type, this->oper,
-                                   state, &loc);
-      ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
-                                                   type, op[0], op[1]);
-      result = do_assignment(instructions, state, op[0]->clone(ctx, NULL),
-                             temp_rhs,
-                             this->subexpressions[0]->get_location());
-      error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-      break;
-   }
-
-   case ast_conditional: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-
-      /* From page 59 (page 65 of the PDF) of the GLSL 1.50 spec:
-       *
-       *    "The ternary selection operator (?:). It operates on three
-       *    expressions (exp1 ? exp2 : exp3). This operator evaluates the
-       *    first expression, which must result in a scalar Boolean."
-       */
-      if (!op[0]->type->is_boolean() || !op[0]->type->is_scalar()) {
-	 YYLTYPE loc = this->subexpressions[0]->get_location();
-
-	 _mesa_glsl_error(& loc, state, "?: condition must be scalar boolean");
-	 error_emitted = true;
-      }
-
-      /* The :? operator is implemented by generating an anonymous temporary
-       * followed by an if-statement.  The last instruction in each branch of
-       * the if-statement assigns a value to the anonymous temporary.  This
-       * temporary is the r-value of the expression.
-       */
-      exec_list then_instructions;
-      exec_list else_instructions;
-
-      op[1] = this->subexpressions[1]->hir(&then_instructions, state);
-      op[2] = this->subexpressions[2]->hir(&else_instructions, state);
-
-      /* From page 59 (page 65 of the PDF) of the GLSL 1.50 spec:
-       *
-       *     "The second and third expressions can be any type, as
-       *     long their types match, or there is a conversion in
-       *     Section 4.1.10 "Implicit Conversions" that can be applied
-       *     to one of the expressions to make their types match. This
-       *     resulting matching type is the type of the entire
-       *     expression."
-       */
-      if ((!apply_implicit_conversion(op[1]->type, op[2], state)
-	   && !apply_implicit_conversion(op[2]->type, op[1], state))
-	  || (op[1]->type != op[2]->type)) {
-	 YYLTYPE loc = this->subexpressions[1]->get_location();
-
-	 _mesa_glsl_error(& loc, state, "Second and third operands of ?: "
-			  "operator must have matching types.");
-	 error_emitted = true;
-	 type = glsl_type::error_type;
-      } else {
-	 type = op[1]->type;
-      }
-
-      /* From page 33 (page 39 of the PDF) of the GLSL 1.10 spec:
-       *
-       *    "The second and third expressions must be the same type, but can
-       *    be of any type other than an array."
-       */
-      if ((state->language_version <= 110) && type->is_array()) {
-	 _mesa_glsl_error(& loc, state, "Second and third operands of ?: "
-			  "operator must not be arrays.");
-	 error_emitted = true;
-      }
-
-      ir_constant *cond_val = op[0]->constant_expression_value();
-      ir_constant *then_val = op[1]->constant_expression_value();
-      ir_constant *else_val = op[2]->constant_expression_value();
-
-      if (then_instructions.is_empty()
-	  && else_instructions.is_empty()
-	  && (cond_val != NULL) && (then_val != NULL) && (else_val != NULL)) {
-	 result = (cond_val->value.b[0]) ? then_val : else_val;
-      } else {
-	 ir_variable *const tmp =
-	    new(ctx) ir_variable(type, "conditional_tmp", ir_var_temporary);
-	 instructions->push_tail(tmp);
-
-	 ir_if *const stmt = new(ctx) ir_if(op[0]);
-	 instructions->push_tail(stmt);
-
-	 then_instructions.move_nodes_to(& stmt->then_instructions);
-	 ir_dereference *const then_deref =
-	    new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const then_assign =
-	    new(ctx) ir_assignment(then_deref, op[1], NULL);
-	 stmt->then_instructions.push_tail(then_assign);
-
-	 else_instructions.move_nodes_to(& stmt->else_instructions);
-	 ir_dereference *const else_deref =
-	    new(ctx) ir_dereference_variable(tmp);
-	 ir_assignment *const else_assign =
-	    new(ctx) ir_assignment(else_deref, op[2], NULL);
-	 stmt->else_instructions.push_tail(else_assign);
-
-	 result = new(ctx) ir_dereference_variable(tmp);
-      }
-      break;
-   }
-
-   case ast_pre_inc:
-   case ast_pre_dec: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      if (op[0]->type->base_type == GLSL_TYPE_FLOAT)
-	 op[1] = new(ctx) ir_constant(1.0f);
-      else
-	 op[1] = new(ctx) ir_constant(1);
-
-      type = arithmetic_result_type(op[0], op[1], false, state, & loc);
-
-      ir_rvalue *temp_rhs;
-      temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
-					op[0], op[1]);
-
-      result = do_assignment(instructions, state,
-			     op[0]->clone(ctx, NULL), temp_rhs,
-			     this->subexpressions[0]->get_location());
-      type = result->type;
-      error_emitted = op[0]->type->is_error();
-      break;
-   }
-
-   case ast_post_inc:
-   case ast_post_dec: {
-      op[0] = this->subexpressions[0]->hir(instructions, state);
-      if (op[0]->type->base_type == GLSL_TYPE_FLOAT)
-	 op[1] = new(ctx) ir_constant(1.0f);
-      else
-	 op[1] = new(ctx) ir_constant(1);
-
-      error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-
-      type = arithmetic_result_type(op[0], op[1], false, state, & loc);
-
-      ir_rvalue *temp_rhs;
-      temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
-					op[0], op[1]);
-
-      /* Get a temporary of a copy of the lvalue before it's modified.
-       * This may get thrown away later.
-       */
-      result = get_lvalue_copy(instructions, op[0]->clone(ctx, NULL));
-
-      (void)do_assignment(instructions, state,
-			  op[0]->clone(ctx, NULL), temp_rhs,
-			  this->subexpressions[0]->get_location());
-
-      type = result->type;
-      error_emitted = op[0]->type->is_error();
-      break;
-   }
-
-   case ast_field_selection:
-      result = _mesa_ast_field_selection_to_hir(this, instructions, state);
-      type = result->type;
-      break;
-
-   case ast_array_index: {
-      YYLTYPE index_loc = subexpressions[1]->get_location();
-
-      op[0] = subexpressions[0]->hir(instructions, state);
-      op[1] = subexpressions[1]->hir(instructions, state);
-
-      error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-
-      ir_rvalue *const array = op[0];
-
-      result = new(ctx) ir_dereference_array(op[0], op[1]);
-
-      /* Do not use op[0] after this point.  Use array.
-       */
-      op[0] = NULL;
-
-
-      if (error_emitted)
-	 break;
-
-      if (!array->type->is_array()
-	  && !array->type->is_matrix()
-	  && !array->type->is_vector()) {
-	 _mesa_glsl_error(& index_loc, state,
-			  "cannot dereference non-array / non-matrix / "
-			  "non-vector");
-	 error_emitted = true;
-      }
-
-      if (!op[1]->type->is_integer()) {
-	 _mesa_glsl_error(& index_loc, state,
-			  "array index must be integer type");
-	 error_emitted = true;
-      } else if (!op[1]->type->is_scalar()) {
-	 _mesa_glsl_error(& index_loc, state,
-			  "array index must be scalar");
-	 error_emitted = true;
-      }
-
-      /* If the array index is a constant expression and the array has a
-       * declared size, ensure that the access is in-bounds.  If the array
-       * index is not a constant expression, ensure that the array has a
-       * declared size.
-       */
-      ir_constant *const const_index = op[1]->constant_expression_value();
-      if (const_index != NULL) {
-	 const int idx = const_index->value.i[0];
-	 const char *type_name;
-	 unsigned bound = 0;
-
-	 if (array->type->is_matrix()) {
-	    type_name = "matrix";
-	 } else if (array->type->is_vector()) {
-	    type_name = "vector";
-	 } else {
-	    type_name = "array";
-	 }
-
-	 /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec:
-	  *
-	  *    "It is illegal to declare an array with a size, and then
-	  *    later (in the same shader) index the same array with an
-	  *    integral constant expression greater than or equal to the
-	  *    declared size. It is also illegal to index an array with a
-	  *    negative constant expression."
-	  */
-	 if (array->type->is_matrix()) {
-	    if (array->type->row_type()->vector_elements <= idx) {
-	       bound = array->type->row_type()->vector_elements;
-	    }
-	 } else if (array->type->is_vector()) {
-	    if (array->type->vector_elements <= idx) {
-	       bound = array->type->vector_elements;
-	    }
-	 } else {
-	    if ((array->type->array_size() > 0)
-		&& (array->type->array_size() <= idx)) {
-	       bound = array->type->array_size();
-	    }
-	 }
-
-	 if (bound > 0) {
-	    _mesa_glsl_error(& loc, state, "%s index must be < %u",
-			     type_name, bound);
-	    error_emitted = true;
-	 } else if (idx < 0) {
-	    _mesa_glsl_error(& loc, state, "%s index must be >= 0",
-			     type_name);
-	    error_emitted = true;
-	 }
-
-	 if (array->type->is_array()) {
-	    /* If the array is a variable dereference, it dereferences the
-	     * whole array, by definition.  Use this to get the variable.
-	     *
-	     * FINISHME: Should some methods for getting / setting / testing
-	     * FINISHME: array access limits be added to ir_dereference?
-	     */
-	    ir_variable *const v = array->whole_variable_referenced();
-	    if ((v != NULL) && (unsigned(idx) > v->max_array_access))
-	       v->max_array_access = idx;
-	 }
-      } else if (array->type->array_size() == 0) {
-	 _mesa_glsl_error(&loc, state, "unsized array index must be constant");
-      } else {
-	 if (array->type->is_array()) {
-	    /* whole_variable_referenced can return NULL if the array is a
-	     * member of a structure.  In this case it is safe to not update
-	     * the max_array_access field because it is never used for fields
-	     * of structures.
-	     */
-	    ir_variable *v = array->whole_variable_referenced();
-	    if (v != NULL)
-	       v->max_array_access = array->type->array_size();
-          // TODO: should this be array->type->array_size() - 1
-	 }
-      }
-
-      /* From page 23 (29 of the PDF) of the GLSL 1.30 spec:
-       *
-       *    "Samplers aggregated into arrays within a shader (using square
-       *    brackets [ ]) can only be indexed with integral constant
-       *    expressions [...]."
-       *
-       * This restriction was added in GLSL 1.30.  Shaders using earlier version
-       * of the language should not be rejected by the compiler front-end for
-       * using this construct.  This allows useful things such as using a loop
-       * counter as the index to an array of samplers.  If the loop in unrolled,
-       * the code should compile correctly.  Instead, emit a warning.
-       */
-      if (array->type->is_array() &&
-          array->type->element_type()->is_sampler() &&
-          const_index == NULL) {
-
-	 if (state->language_version == 100) {
-	    _mesa_glsl_warning(&loc, state,
-			       "sampler arrays indexed with non-constant "
-			       "expressions is optional in GLSL ES 1.00");
-	 } else if (state->language_version < 130) {
-	    _mesa_glsl_warning(&loc, state,
-			       "sampler arrays indexed with non-constant "
-			       "expressions is forbidden in GLSL 1.30 and "
-			       "later");
-	 } else {
-	    _mesa_glsl_error(&loc, state,
-			     "sampler arrays indexed with non-constant "
-			     "expressions is forbidden in GLSL 1.30 and "
-			     "later");
-	    error_emitted = true;
-	 }
-      }
-
-      if (error_emitted)
-	 result->type = glsl_type::error_type;
-
-      type = result->type;
-      break;
-   }
-
-   case ast_function_call:
-      /* Should *NEVER* get here.  ast_function_call should always be handled
-       * by ast_function_expression::hir.
-       */
-      assert(0);
-      break;
-
-   case ast_identifier: {
-      /* ast_identifier can appear several places in a full abstract syntax
-       * tree.  This particular use must be at location specified in the grammar
-       * as 'variable_identifier'.
-       */
-      ir_variable *var = 
-	 state->symbols->get_variable(this->primary_expression.identifier);
-
-      result = new(ctx) ir_dereference_variable(var);
-
-      if (var != NULL) {
-	 type = result->type;
-      } else {
-	 _mesa_glsl_error(& loc, state, "`%s' undeclared",
-			  this->primary_expression.identifier);
-
-	 error_emitted = true;
-      }
-      break;
-   }
-
-   case ast_int_constant:
-      type = glsl_type::int_type;
-      result = new(ctx) ir_constant(this->primary_expression.int_constant);
-      break;
-
-   case ast_uint_constant:
-      type = glsl_type::uint_type;
-      result = new(ctx) ir_constant(this->primary_expression.uint_constant);
-      break;
-
-   case ast_float_constant:
-      type = glsl_type::float_type;
-      result = new(ctx) ir_constant(this->primary_expression.float_constant);
-      break;
-
-   case ast_bool_constant:
-      type = glsl_type::bool_type;
-      result = new(ctx) ir_constant(bool(this->primary_expression.bool_constant));
-      break;
-
-   case ast_sequence: {
-      /* It should not be possible to generate a sequence in the AST without
-       * any expressions in it.
-       */
-      assert(!this->expressions.is_empty());
-
-      /* The r-value of a sequence is the last expression in the sequence.  If
-       * the other expressions in the sequence do not have side-effects (and
-       * therefore add instructions to the instruction list), they get dropped
-       * on the floor.
-       */
-      foreach_list_typed (ast_node, ast, link, &this->expressions)
-	 result = ast->hir(instructions, state);
-
-      type = result->type;
-
-      /* Any errors should have already been emitted in the loop above.
-       */
-      error_emitted = true;
-      break;
-   }
-   }
-
-   if (type->is_error() && !error_emitted)
-      _mesa_glsl_error(& loc, state, "type mismatch");
-
-   return result;
-}
-
-
-ir_rvalue *
-ast_expression_statement::hir(exec_list *instructions,
-			      struct _mesa_glsl_parse_state *state)
-{
-   /* It is possible to have expression statements that don't have an
-    * expression.  This is the solitary semicolon:
-    *
-    * for (i = 0; i < 5; i++)
-    *     ;
-    *
-    * In this case the expression will be NULL.  Test for NULL and don't do
-    * anything in that case.
-    */
-   if (expression != NULL)
-      expression->hir(instructions, state);
-
-   /* Statements do not have r-values.
-    */
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_compound_statement::hir(exec_list *instructions,
-			    struct _mesa_glsl_parse_state *state)
-{
-   if (new_scope)
-      state->symbols->push_scope();
-
-   foreach_list_typed (ast_node, ast, link, &this->statements)
-      ast->hir(instructions, state);
-
-   if (new_scope)
-      state->symbols->pop_scope();
-
-   /* Compound statements do not have r-values.
-    */
-   return NULL;
-}
-
-
-static const glsl_type *
-process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
-		   struct _mesa_glsl_parse_state *state)
-{
-   unsigned length = 0;
-
-   /* FINISHME: Reject delcarations of multidimensional arrays. */
-
-   if (array_size != NULL) {
-      exec_list dummy_instructions;
-      ir_rvalue *const ir = array_size->hir(& dummy_instructions, state);
-      YYLTYPE loc = array_size->get_location();
-
-      /* FINISHME: Verify that the grammar forbids side-effects in array
-       * FINISHME: sizes.   i.e., 'vec4 [x = 12] data'
-       */
-      assert(dummy_instructions.is_empty());
-
-      if (ir != NULL) {
-	 if (!ir->type->is_integer()) {
-	    _mesa_glsl_error(& loc, state, "array size must be integer type");
-	 } else if (!ir->type->is_scalar()) {
-	    _mesa_glsl_error(& loc, state, "array size must be scalar type");
-	 } else {
-	    ir_constant *const size = ir->constant_expression_value();
-
-	    if (size == NULL) {
-	       _mesa_glsl_error(& loc, state, "array size must be a "
-				"constant valued expression");
-	    } else if (size->value.i[0] <= 0) {
-	       _mesa_glsl_error(& loc, state, "array size must be > 0");
-	    } else {
-	       assert(size->type == ir->type);
-	       length = size->value.u[0];
-	    }
-	 }
-      }
-   } else if (state->es_shader) {
-      /* Section 10.17 of the GLSL ES 1.00 specification states that unsized
-       * array declarations have been removed from the language.
-       */
-      _mesa_glsl_error(loc, state, "unsized array declarations are not "
-		       "allowed in GLSL ES 1.00.");
-   }
-
-   return glsl_type::get_array_instance(base, length);
-}
-
-
-const glsl_type *
-ast_type_specifier::glsl_type(const char **name,
-			      struct _mesa_glsl_parse_state *state) const
-{
-   const struct glsl_type *type;
-
-   type = state->symbols->get_type(this->type_name);
-   *name = this->type_name;
-
-   if (this->is_array) {
-      YYLTYPE loc = this->get_location();
-      type = process_array_type(&loc, type, this->array_size, state);
-   }
-
-   return type;
-}
-
-
-static void
-apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
-				 ir_variable *var,
-				 struct _mesa_glsl_parse_state *state,
-				 YYLTYPE *loc)
-{
-   if (qual->flags.q.invariant)
-      var->invariant = 1;
-
-   /* FINISHME: Mark 'in' variables at global scope as read-only. */
-   if (qual->flags.q.constant || qual->flags.q.attribute
-       || qual->flags.q.uniform
-       || (qual->flags.q.varying && (state->target == fragment_shader)))
-      var->read_only = 1;
-
-   if (qual->flags.q.centroid)
-      var->centroid = 1;
-
-   if (qual->flags.q.attribute && state->target != vertex_shader) {
-      var->type = glsl_type::error_type;
-      _mesa_glsl_error(loc, state,
-		       "`attribute' variables may not be declared in the "
-		       "%s shader",
-		       _mesa_glsl_shader_target_name(state->target));
-   }
-
-   /* From page 25 (page 31 of the PDF) of the GLSL 1.10 spec:
-    *
-    *     "The varying qualifier can be used only with the data types
-    *     float, vec2, vec3, vec4, mat2, mat3, and mat4, or arrays of
-    *     these."
-    */
-   if (qual->flags.q.varying) {
-      const glsl_type *non_array_type;
-
-      if (var->type && var->type->is_array())
-	 non_array_type = var->type->fields.array;
-      else
-	 non_array_type = var->type;
-
-      if (non_array_type && non_array_type->base_type != GLSL_TYPE_FLOAT) {
-	 var->type = glsl_type::error_type;
-	 _mesa_glsl_error(loc, state,
-			  "varying variables must be of base type float");
-      }
-   }
-
-   /* If there is no qualifier that changes the mode of the variable, leave
-    * the setting alone.
-    */
-   if (qual->flags.q.in && qual->flags.q.out)
-      var->mode = ir_var_inout;
-   else if (qual->flags.q.attribute || qual->flags.q.in
-	    || (qual->flags.q.varying && (state->target == fragment_shader)))
-      var->mode = ir_var_in;
-   else if (qual->flags.q.out
-	    || (qual->flags.q.varying && (state->target == vertex_shader)))
-      var->mode = ir_var_out;
-   else if (qual->flags.q.uniform)
-      var->mode = ir_var_uniform;
-
-   if (qual->flags.q.flat)
-      var->interpolation = ir_var_flat;
-   else if (qual->flags.q.noperspective)
-      var->interpolation = ir_var_noperspective;
-   else
-      var->interpolation = ir_var_smooth;
-
-   var->pixel_center_integer = qual->flags.q.pixel_center_integer;
-   var->origin_upper_left = qual->flags.q.origin_upper_left;
-   if ((qual->flags.q.origin_upper_left || qual->flags.q.pixel_center_integer)
-       && (strcmp(var->name, "gl_FragCoord") != 0)) {
-      const char *const qual_string = (qual->flags.q.origin_upper_left)
-	 ? "origin_upper_left" : "pixel_center_integer";
-
-      _mesa_glsl_error(loc, state,
-		       "layout qualifier `%s' can only be applied to "
-		       "fragment shader input `gl_FragCoord'",
-		       qual_string);
-   }
-
-   if (qual->flags.q.explicit_location) {
-      const bool global_scope = (state->current_function == NULL);
-      bool fail = false;
-      const char *string = "";
-
-      /* In the vertex shader only shader inputs can be given explicit
-       * locations.
-       *
-       * In the fragment shader only shader outputs can be given explicit
-       * locations.
-       */
-      switch (state->target) {
-      case vertex_shader:
-	 if (!global_scope || (var->mode != ir_var_in)) {
-	    fail = true;
-	    string = "input";
-	 }
-	 break;
-
-      case geometry_shader:
-	 _mesa_glsl_error(loc, state,
-			  "geometry shader variables cannot be given "
-			  "explicit locations\n");
-	 break;
-
-      case fragment_shader:
-	 if (!global_scope || (var->mode != ir_var_in)) {
-	    fail = true;
-	    string = "output";
-	 }
-	 break;
-      };
-
-      if (fail) {
-	 _mesa_glsl_error(loc, state,
-			  "only %s shader %s variables can be given an "
-			  "explicit location\n",
-			  _mesa_glsl_shader_target_name(state->target),
-			  string);
-      } else {
-	 var->explicit_location = true;
-
-	 /* This bit of silliness is needed because invalid explicit locations
-	  * are supposed to be flagged during linking.  Small negative values
-	  * biased by VERT_ATTRIB_GENERIC0 or FRAG_RESULT_DATA0 could alias
-	  * built-in values (e.g., -16+VERT_ATTRIB_GENERIC0 = VERT_ATTRIB_POS).
-	  * The linker needs to be able to differentiate these cases.  This
-	  * ensures that negative values stay negative.
-	  */
-	 if (qual->location >= 0) {
-	    var->location = (state->target == vertex_shader)
-	       ? (qual->location + VERT_ATTRIB_GENERIC0)
-	       : (qual->location + FRAG_RESULT_DATA0);
-	 } else {
-	    var->location = qual->location;
-	 }
-      }
-   }
-
-   if (var->type->is_array() && state->language_version != 110) {
-      var->array_lvalue = true;
-   }
-}
-
-
-ir_rvalue *
-ast_declarator_list::hir(exec_list *instructions,
-			 struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   const struct glsl_type *decl_type;
-   const char *type_name = NULL;
-   ir_rvalue *result = NULL;
-   YYLTYPE loc = this->get_location();
-
-   /* From page 46 (page 52 of the PDF) of the GLSL 1.50 spec:
-    *
-    *     "To ensure that a particular output variable is invariant, it is
-    *     necessary to use the invariant qualifier. It can either be used to
-    *     qualify a previously declared variable as being invariant
-    *
-    *         invariant gl_Position; // make existing gl_Position be invariant"
-    *
-    * In these cases the parser will set the 'invariant' flag in the declarator
-    * list, and the type will be NULL.
-    */
-   if (this->invariant) {
-      assert(this->type == NULL);
-
-      if (state->current_function != NULL) {
-	 _mesa_glsl_error(& loc, state,
-			  "All uses of `invariant' keyword must be at global "
-			  "scope\n");
-      }
-
-      foreach_list_typed (ast_declaration, decl, link, &this->declarations) {
-	 assert(!decl->is_array);
-	 assert(decl->array_size == NULL);
-	 assert(decl->initializer == NULL);
-
-	 ir_variable *const earlier =
-	    state->symbols->get_variable(decl->identifier);
-	 if (earlier == NULL) {
-	    _mesa_glsl_error(& loc, state,
-			     "Undeclared variable `%s' cannot be marked "
-			     "invariant\n", decl->identifier);
-	 } else if ((state->target == vertex_shader)
-	       && (earlier->mode != ir_var_out)) {
-	    _mesa_glsl_error(& loc, state,
-			     "`%s' cannot be marked invariant, vertex shader "
-			     "outputs only\n", decl->identifier);
-	 } else if ((state->target == fragment_shader)
-	       && (earlier->mode != ir_var_in)) {
-	    _mesa_glsl_error(& loc, state,
-			     "`%s' cannot be marked invariant, fragment shader "
-			     "inputs only\n", decl->identifier);
-	 } else {
-	    earlier->invariant = true;
-	 }
-      }
-
-      /* Invariant redeclarations do not have r-values.
-       */
-      return NULL;
-   }
-
-   assert(this->type != NULL);
-   assert(!this->invariant);
-
-   /* The type specifier may contain a structure definition.  Process that
-    * before any of the variable declarations.
-    */
-   (void) this->type->specifier->hir(instructions, state);
-
-   decl_type = this->type->specifier->glsl_type(& type_name, state);
-   if (this->declarations.is_empty()) {
-      /* The only valid case where the declaration list can be empty is when
-       * the declaration is setting the default precision of a built-in type
-       * (e.g., 'precision highp vec4;').
-       */
-
-      if (decl_type != NULL) {
-      } else {
-	    _mesa_glsl_error(& loc, state, "incomplete declaration");
-      }
-   }
-
-   foreach_list_typed (ast_declaration, decl, link, &this->declarations) {
-      const struct glsl_type *var_type;
-      ir_variable *var;
-
-      /* FINISHME: Emit a warning if a variable declaration shadows a
-       * FINISHME: declaration at a higher scope.
-       */
-
-      if ((decl_type == NULL) || decl_type->is_void()) {
-	 if (type_name != NULL) {
-	    _mesa_glsl_error(& loc, state,
-			     "invalid type `%s' in declaration of `%s'",
-			     type_name, decl->identifier);
-	 } else {
-	    _mesa_glsl_error(& loc, state,
-			     "invalid type in declaration of `%s'",
-			     decl->identifier);
-	 }
-	 continue;
-      }
-
-      if (decl->is_array) {
-	 var_type = process_array_type(&loc, decl_type, decl->array_size,
-				       state);
-      } else {
-	 var_type = decl_type;
-      }
-
-      var = new(ctx) ir_variable(var_type, decl->identifier, ir_var_auto);
-
-      /* From page 22 (page 28 of the PDF) of the GLSL 1.10 specification;
-       *
-       *     "Global variables can only use the qualifiers const,
-       *     attribute, uni form, or varying. Only one may be
-       *     specified.
-       *
-       *     Local variables can only use the qualifier const."
-       *
-       * This is relaxed in GLSL 1.30.
-       */
-      if (state->language_version < 120) {
-	 if (this->type->qualifier.flags.q.out) {
-	    _mesa_glsl_error(& loc, state,
-			     "`out' qualifier in declaration of `%s' "
-			     "only valid for function parameters in GLSL 1.10.",
-			     decl->identifier);
-	 }
-	 if (this->type->qualifier.flags.q.in) {
-	    _mesa_glsl_error(& loc, state,
-			     "`in' qualifier in declaration of `%s' "
-			     "only valid for function parameters in GLSL 1.10.",
-			     decl->identifier);
-	 }
-	 /* FINISHME: Test for other invalid qualifiers. */
-      }
-
-      apply_type_qualifier_to_variable(& this->type->qualifier, var, state,
-				       & loc);
-
-      if (this->type->qualifier.flags.q.invariant) {
-	 if ((state->target == vertex_shader) && !(var->mode == ir_var_out ||
-						   var->mode == ir_var_inout)) {
-	    /* FINISHME: Note that this doesn't work for invariant on
-	     * a function signature outval
-	     */
-	    _mesa_glsl_error(& loc, state,
-			     "`%s' cannot be marked invariant, vertex shader "
-			     "outputs only\n", var->name);
-	 } else if ((state->target == fragment_shader) &&
-		    !(var->mode == ir_var_in || var->mode == ir_var_inout)) {
-	    /* FINISHME: Note that this doesn't work for invariant on
-	     * a function signature inval
-	     */
-	    _mesa_glsl_error(& loc, state,
-			     "`%s' cannot be marked invariant, fragment shader "
-			     "inputs only\n", var->name);
-	 }
-      }
-
-      if (state->current_function != NULL) {
-	 const char *mode = NULL;
-	 const char *extra = "";
-
-	 /* There is no need to check for 'inout' here because the parser will
-	  * only allow that in function parameter lists.
-	  */
-	 if (this->type->qualifier.flags.q.attribute) {
-	    mode = "attribute";
-	 } else if (this->type->qualifier.flags.q.uniform) {
-	    mode = "uniform";
-	 } else if (this->type->qualifier.flags.q.varying) {
-	    mode = "varying";
-	 } else if (this->type->qualifier.flags.q.in) {
-	    mode = "in";
-	    extra = " or in function parameter list";
-	 } else if (this->type->qualifier.flags.q.out) {
-	    mode = "out";
-	    extra = " or in function parameter list";
-	 }
-
-	 if (mode) {
-	    _mesa_glsl_error(& loc, state,
-			     "%s variable `%s' must be declared at "
-			     "global scope%s",
-			     mode, var->name, extra);
-	 }
-      } else if (var->mode == ir_var_in) {
-	 if (state->target == vertex_shader) {
-	    bool error_emitted = false;
-
-	    /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec:
-	     *
-	     *    "Vertex shader inputs can only be float, floating-point
-	     *    vectors, matrices, signed and unsigned integers and integer
-	     *    vectors. Vertex shader inputs can also form arrays of these
-	     *    types, but not structures."
-	     *
-	     * From page 31 (page 27 of the PDF) of the GLSL 1.30 spec:
-	     *
-	     *    "Vertex shader inputs can only be float, floating-point
-	     *    vectors, matrices, signed and unsigned integers and integer
-	     *    vectors. They cannot be arrays or structures."
-	     *
-	     * From page 23 (page 29 of the PDF) of the GLSL 1.20 spec:
-	     *
-	     *    "The attribute qualifier can be used only with float,
-	     *    floating-point vectors, and matrices. Attribute variables
-	     *    cannot be declared as arrays or structures."
-	     */
-	    const glsl_type *check_type = var->type->is_array()
-	       ? var->type->fields.array : var->type;
-
-	    switch (check_type->base_type) {
-	    case GLSL_TYPE_FLOAT:
-	       break;
-	    case GLSL_TYPE_UINT:
-	    case GLSL_TYPE_INT:
-	       if (state->language_version > 120)
-		  break;
-	       /* FALLTHROUGH */
-	    default:
-	       _mesa_glsl_error(& loc, state,
-				"vertex shader input / attribute cannot have "
-				"type %s`%s'",
-				var->type->is_array() ? "array of " : "",
-				check_type->name);
-	       error_emitted = true;
-	    }
-
-	    if (!error_emitted && (state->language_version <= 130)
-		&& var->type->is_array()) {
-	       _mesa_glsl_error(& loc, state,
-				"vertex shader input / attribute cannot have "
-				"array type");
-	       error_emitted = true;
-	    }
-	 }
-      }
-
-      /* Process the initializer and add its instructions to a temporary
-       * list.  This list will be added to the instruction stream (below) after
-       * the declaration is added.  This is done because in some cases (such as
-       * redeclarations) the declaration may not actually be added to the
-       * instruction stream.
-       */
-      exec_list initializer_instructions;
-      if (decl->initializer != NULL) {
-	 YYLTYPE initializer_loc = decl->initializer->get_location();
-
-	 /* From page 24 (page 30 of the PDF) of the GLSL 1.10 spec:
-	  *
-	  *    "All uniform variables are read-only and are initialized either
-	  *    directly by an application via API commands, or indirectly by
-	  *    OpenGL."
-	  */
-	 if ((state->language_version <= 110)
-	     && (var->mode == ir_var_uniform)) {
-	    _mesa_glsl_error(& initializer_loc, state,
-			     "cannot initialize uniforms in GLSL 1.10");
-	 }
-
-	 if (var->type->is_sampler()) {
-	    _mesa_glsl_error(& initializer_loc, state,
-			     "cannot initialize samplers");
-	 }
-
-	 if ((var->mode == ir_var_in) && (state->current_function == NULL)) {
-	    _mesa_glsl_error(& initializer_loc, state,
-			     "cannot initialize %s shader input / %s",
-			     _mesa_glsl_shader_target_name(state->target),
-			     (state->target == vertex_shader)
-			     ? "attribute" : "varying");
-	 }
-
-	 ir_dereference *const lhs = new(ctx) ir_dereference_variable(var);
-	 ir_rvalue *rhs = decl->initializer->hir(&initializer_instructions,
-						 state);
-
-	 /* Calculate the constant value if this is a const or uniform
-	  * declaration.
-	  */
-	 if (this->type->qualifier.flags.q.constant
-	     || this->type->qualifier.flags.q.uniform) {
-	    ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs);
-	    if (new_rhs != NULL) {
-	       rhs = new_rhs;
-
-	       ir_constant *constant_value = rhs->constant_expression_value();
-	       if (!constant_value) {
-		  _mesa_glsl_error(& initializer_loc, state,
-				   "initializer of %s variable `%s' must be a "
-				   "constant expression",
-				   (this->type->qualifier.flags.q.constant)
-				   ? "const" : "uniform",
-				   decl->identifier);
-		  if (var->type->is_numeric()) {
-		     /* Reduce cascading errors. */
-		     var->constant_value = ir_constant::zero(ctx, var->type);
-		  }
-	       } else {
-		  rhs = constant_value;
-		  var->constant_value = constant_value;
-	       }
-	    } else {
-	       _mesa_glsl_error(&initializer_loc, state,
-			        "initializer of type %s cannot be assigned to "
-				"variable of type %s",
-				rhs->type->name, var->type->name);
-	       if (var->type->is_numeric()) {
-		  /* Reduce cascading errors. */
-		  var->constant_value = ir_constant::zero(ctx, var->type);
-	       }
-	    }
-	 }
-
-	 if (rhs && !rhs->type->is_error()) {
-	    bool temp = var->read_only;
-	    if (this->type->qualifier.flags.q.constant)
-	       var->read_only = false;
-
-	    /* Never emit code to initialize a uniform.
-	     */
-	    const glsl_type *initializer_type;
-	    if (!this->type->qualifier.flags.q.uniform) {
-	       result = do_assignment(&initializer_instructions, state,
-				      lhs, rhs,
-				      this->get_location());
-	       initializer_type = result->type;
-	    } else
-	       initializer_type = rhs->type;
-
-	    /* If the declared variable is an unsized array, it must inherrit
-	     * its full type from the initializer.  A declaration such as
-	     *
-	     *     uniform float a[] = float[](1.0, 2.0, 3.0, 3.0);
-	     *
-	     * becomes
-	     *
-	     *     uniform float a[4] = float[](1.0, 2.0, 3.0, 3.0);
-	     *
-	     * The assignment generated in the if-statement (below) will also
-	     * automatically handle this case for non-uniforms.
-	     *
-	     * If the declared variable is not an array, the types must
-	     * already match exactly.  As a result, the type assignment
-	     * here can be done unconditionally.  For non-uniforms the call
-	     * to do_assignment can change the type of the initializer (via
-	     * the implicit conversion rules).  For uniforms the initializer
-	     * must be a constant expression, and the type of that expression
-	     * was validated above.
-	     */
-	    var->type = initializer_type;
-
-	    var->read_only = temp;
-	 }
-      }
-
-      /* From page 23 (page 29 of the PDF) of the GLSL 1.10 spec:
-       *
-       *     "It is an error to write to a const variable outside of
-       *      its declaration, so they must be initialized when
-       *      declared."
-       */
-      if (this->type->qualifier.flags.q.constant && decl->initializer == NULL) {
-	 _mesa_glsl_error(& loc, state,
-			  "const declaration of `%s' must be initialized");
-      }
-
-      /* Check if this declaration is actually a re-declaration, either to
-       * resize an array or add qualifiers to an existing variable.
-       *
-       * This is allowed for variables in the current scope, or when at
-       * global scope (for built-ins in the implicit outer scope).
-       */
-      ir_variable *earlier = state->symbols->get_variable(decl->identifier);
-      if (earlier != NULL && (state->current_function == NULL ||
-	  state->symbols->name_declared_this_scope(decl->identifier))) {
-
-	 /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec,
-	  *
-	  * "It is legal to declare an array without a size and then
-	  *  later re-declare the same name as an array of the same
-	  *  type and specify a size."
-	  */
-	 if ((earlier->type->array_size() == 0)
-	     && var->type->is_array()
-	     && (var->type->element_type() == earlier->type->element_type())) {
-	    /* FINISHME: This doesn't match the qualifiers on the two
-	     * FINISHME: declarations.  It's not 100% clear whether this is
-	     * FINISHME: required or not.
-	     */
-
-	    /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
-	     *
-	     *     "The size [of gl_TexCoord] can be at most
-	     *     gl_MaxTextureCoords."
-	     */
-	    const unsigned size = unsigned(var->type->array_size());
-	    if ((strcmp("gl_TexCoord", var->name) == 0)
-		&& (size > state->Const.MaxTextureCoords)) {
-	       YYLTYPE loc = this->get_location();
-
-	       _mesa_glsl_error(& loc, state, "`gl_TexCoord' array size cannot "
-				"be larger than gl_MaxTextureCoords (%u)\n",
-				state->Const.MaxTextureCoords);
-	    } else if ((size > 0) && (size <= earlier->max_array_access)) {
-	       YYLTYPE loc = this->get_location();
-
-	       _mesa_glsl_error(& loc, state, "array size must be > %u due to "
-				"previous access",
-				earlier->max_array_access);
-	    }
-
-	    earlier->type = var->type;
-	    delete var;
-	    var = NULL;
-	 } else if (state->ARB_fragment_coord_conventions_enable
-		    && strcmp(var->name, "gl_FragCoord") == 0
-		    && earlier->type == var->type
-		    && earlier->mode == var->mode) {
-	    /* Allow redeclaration of gl_FragCoord for ARB_fcc layout
-	     * qualifiers.
-	     */
-	    earlier->origin_upper_left = var->origin_upper_left;
-	    earlier->pixel_center_integer = var->pixel_center_integer;
-	 } else {
-	    YYLTYPE loc = this->get_location();
-	    _mesa_glsl_error(&loc, state, "`%s' redeclared", decl->identifier);
-	 }
-
-	 continue;
-      }
-
-      /* By now, we know it's a new variable declaration (we didn't hit the
-       * above "continue").
-       *
-       * From page 15 (page 21 of the PDF) of the GLSL 1.10 spec,
-       *
-       *   "Identifiers starting with "gl_" are reserved for use by
-       *   OpenGL, and may not be declared in a shader as either a
-       *   variable or a function."
-       */
-      if (strncmp(decl->identifier, "gl_", 3) == 0)
-	 _mesa_glsl_error(& loc, state,
-			  "identifier `%s' uses reserved `gl_' prefix",
-			  decl->identifier);
-
-      /* Add the variable to the symbol table.  Note that the initializer's
-       * IR was already processed earlier (though it hasn't been emitted yet),
-       * without the variable in scope.
-       *
-       * This differs from most C-like languages, but it follows the GLSL
-       * specification.  From page 28 (page 34 of the PDF) of the GLSL 1.50
-       * spec:
-       *
-       *     "Within a declaration, the scope of a name starts immediately
-       *     after the initializer if present or immediately after the name
-       *     being declared if not."
-       */
-      if (!state->symbols->add_variable(var)) {
-	 YYLTYPE loc = this->get_location();
-	 _mesa_glsl_error(&loc, state, "name `%s' already taken in the "
-			  "current scope", decl->identifier);
-	 continue;
-      }
-
-      /* Push the variable declaration to the top.  It means that all
-       * the variable declarations will appear in a funny
-       * last-to-first order, but otherwise we run into trouble if a
-       * function is prototyped, a global var is decled, then the
-       * function is defined with usage of the global var.  See
-       * glslparsertest's CorrectModule.frag.
-       */
-      instructions->push_head(var);
-      instructions->append_list(&initializer_instructions);
-   }
-
-
-   /* Generally, variable declarations do not have r-values.  However,
-    * one is used for the declaration in
-    *
-    * while (bool b = some_condition()) {
-    *   ...
-    * }
-    *
-    * so we return the rvalue from the last seen declaration here.
-    */
-   return result;
-}
-
-
-ir_rvalue *
-ast_parameter_declarator::hir(exec_list *instructions,
-			      struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   const struct glsl_type *type;
-   const char *name = NULL;
-   YYLTYPE loc = this->get_location();
-
-   type = this->type->specifier->glsl_type(& name, state);
-
-   if (type == NULL) {
-      if (name != NULL) {
-	 _mesa_glsl_error(& loc, state,
-			  "invalid type `%s' in declaration of `%s'",
-			  name, this->identifier);
-      } else {
-	 _mesa_glsl_error(& loc, state,
-			  "invalid type in declaration of `%s'",
-			  this->identifier);
-      }
-
-      type = glsl_type::error_type;
-   }
-
-   /* From page 62 (page 68 of the PDF) of the GLSL 1.50 spec:
-    *
-    *    "Functions that accept no input arguments need not use void in the
-    *    argument list because prototypes (or definitions) are required and
-    *    therefore there is no ambiguity when an empty argument list "( )" is
-    *    declared. The idiom "(void)" as a parameter list is provided for
-    *    convenience."
-    *
-    * Placing this check here prevents a void parameter being set up
-    * for a function, which avoids tripping up checks for main taking
-    * parameters and lookups of an unnamed symbol.
-    */
-   if (type->is_void()) {
-      if (this->identifier != NULL)
-	 _mesa_glsl_error(& loc, state,
-			  "named parameter cannot have type `void'");
-
-      is_void = true;
-      return NULL;
-   }
-
-   if (formal_parameter && (this->identifier == NULL)) {
-      _mesa_glsl_error(& loc, state, "formal parameter lacks a name");
-      return NULL;
-   }
-
-   /* This only handles "vec4 foo[..]".  The earlier specifier->glsl_type(...)
-    * call already handled the "vec4[..] foo" case.
-    */
-   if (this->is_array) {
-      type = process_array_type(&loc, type, this->array_size, state);
-   }
-
-   if (type->array_size() == 0) {
-      _mesa_glsl_error(&loc, state, "arrays passed as parameters must have "
-		       "a declared size.");
-      type = glsl_type::error_type;
-   }
-
-   is_void = false;
-   ir_variable *var = new(ctx) ir_variable(type, this->identifier, ir_var_in);
-
-   /* Apply any specified qualifiers to the parameter declaration.  Note that
-    * for function parameters the default mode is 'in'.
-    */
-   apply_type_qualifier_to_variable(& this->type->qualifier, var, state, & loc);
-
-   instructions->push_tail(var);
-
-   /* Parameter declarations do not have r-values.
-    */
-   return NULL;
-}
-
-
-void
-ast_parameter_declarator::parameters_to_hir(exec_list *ast_parameters,
-					    bool formal,
-					    exec_list *ir_parameters,
-					    _mesa_glsl_parse_state *state)
-{
-   ast_parameter_declarator *void_param = NULL;
-   unsigned count = 0;
-
-   foreach_list_typed (ast_parameter_declarator, param, link, ast_parameters) {
-      param->formal_parameter = formal;
-      param->hir(ir_parameters, state);
-
-      if (param->is_void)
-	 void_param = param;
-
-      count++;
-   }
-
-   if ((void_param != NULL) && (count > 1)) {
-      YYLTYPE loc = void_param->get_location();
-
-      _mesa_glsl_error(& loc, state,
-		       "`void' parameter must be only parameter");
-   }
-}
-
-
-void
-emit_function(_mesa_glsl_parse_state *state, exec_list *instructions,
-	      ir_function *f)
-{
-   /* Emit the new function header */
-   if (state->current_function == NULL) {
-      instructions->push_tail(f);
-   } else {
-      /* IR invariants disallow function declarations or definitions nested
-       * within other function definitions.  Insert the new ir_function
-       * block in the instruction sequence before the ir_function block
-       * containing the current ir_function_signature.
-       */
-      ir_function *const curr =
-	 const_cast<ir_function *>(state->current_function->function());
-
-      curr->insert_before(f);
-   }
-}
-
-
-ir_rvalue *
-ast_function::hir(exec_list *instructions,
-		  struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   ir_function *f = NULL;
-   ir_function_signature *sig = NULL;
-   exec_list hir_parameters;
-
-   const char *const name = identifier;
-
-   /* From page 21 (page 27 of the PDF) of the GLSL 1.20 spec,
-    *
-    *   "Function declarations (prototypes) cannot occur inside of functions;
-    *   they must be at global scope, or for the built-in functions, outside
-    *   the global scope."
-    *
-    * From page 27 (page 33 of the PDF) of the GLSL ES 1.00.16 spec,
-    *
-    *   "User defined functions may only be defined within the global scope."
-    *
-    * Note that this language does not appear in GLSL 1.10.
-    */
-   if ((state->current_function != NULL) && (state->language_version != 110)) {
-      YYLTYPE loc = this->get_location();
-      _mesa_glsl_error(&loc, state,
-		       "declaration of function `%s' not allowed within "
-		       "function body", name);
-   }
-
-   /* From page 15 (page 21 of the PDF) of the GLSL 1.10 spec,
-    *
-    *   "Identifiers starting with "gl_" are reserved for use by
-    *   OpenGL, and may not be declared in a shader as either a
-    *   variable or a function."
-    */
-   if (strncmp(name, "gl_", 3) == 0) {
-      YYLTYPE loc = this->get_location();
-      _mesa_glsl_error(&loc, state,
-		       "identifier `%s' uses reserved `gl_' prefix", name);
-   }
-
-   /* Convert the list of function parameters to HIR now so that they can be
-    * used below to compare this function's signature with previously seen
-    * signatures for functions with the same name.
-    */
-   ast_parameter_declarator::parameters_to_hir(& this->parameters,
-					       is_definition,
-					       & hir_parameters, state);
-
-   const char *return_type_name;
-   const glsl_type *return_type =
-      this->return_type->specifier->glsl_type(& return_type_name, state);
-
-   if (!return_type) {
-      YYLTYPE loc = this->get_location();
-      _mesa_glsl_error(&loc, state,
-		       "function `%s' has undeclared return type `%s'",
-		       name, return_type_name);
-      return_type = glsl_type::error_type;
-   }
-
-   /* From page 56 (page 62 of the PDF) of the GLSL 1.30 spec:
-    * "No qualifier is allowed on the return type of a function."
-    */
-   if (this->return_type->has_qualifiers()) {
-      YYLTYPE loc = this->get_location();
-      _mesa_glsl_error(& loc, state,
-		       "function `%s' return type has qualifiers", name);
-   }
-
-   /* Verify that this function's signature either doesn't match a previously
-    * seen signature for a function with the same name, or, if a match is found,
-    * that the previously seen signature does not have an associated definition.
-    */
-   f = state->symbols->get_function(name);
-   if (f != NULL && (state->es_shader || f->has_user_signature())) {
-      sig = f->exact_matching_signature(&hir_parameters);
-      if (sig != NULL) {
-	 const char *badvar = sig->qualifiers_match(&hir_parameters);
-	 if (badvar != NULL) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(&loc, state, "function `%s' parameter `%s' "
-			     "qualifiers don't match prototype", name, badvar);
-	 }
-
-	 if (sig->return_type != return_type) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(&loc, state, "function `%s' return type doesn't "
-			     "match prototype", name);
-	 }
-
-	 if (is_definition && sig->is_defined) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(& loc, state, "function `%s' redefined", name);
-	 }
-      }
-   } else {
-      f = new(ctx) ir_function(name);
-      if (!state->symbols->add_function(f)) {
-	 /* This function name shadows a non-function use of the same name. */
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(&loc, state, "function name `%s' conflicts with "
-			  "non-function", name);
-	 return NULL;
-      }
-
-      emit_function(state, instructions, f);
-   }
-
-   /* Verify the return type of main() */
-   if (strcmp(name, "main") == 0) {
-      if (! return_type->is_void()) {
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(& loc, state, "main() must return void");
-      }
-
-      if (!hir_parameters.is_empty()) {
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(& loc, state, "main() must not take any parameters");
-      }
-   }
-
-   /* Finish storing the information about this new function in its signature.
-    */
-   if (sig == NULL) {
-      sig = new(ctx) ir_function_signature(return_type);
-      f->add_signature(sig);
-   }
-
-   sig->replace_parameters(&hir_parameters);
-   signature = sig;
-
-   /* Function declarations (prototypes) do not have r-values.
-    */
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_function_definition::hir(exec_list *instructions,
-			     struct _mesa_glsl_parse_state *state)
-{
-   prototype->is_definition = true;
-   prototype->hir(instructions, state);
-
-   ir_function_signature *signature = prototype->signature;
-   if (signature == NULL)
-      return NULL;
-
-   assert(state->current_function == NULL);
-   state->current_function = signature;
-   state->found_return = false;
-
-   /* Duplicate parameters declared in the prototype as concrete variables.
-    * Add these to the symbol table.
-    */
-   state->symbols->push_scope();
-   foreach_iter(exec_list_iterator, iter, signature->parameters) {
-      ir_variable *const var = ((ir_instruction *) iter.get())->as_variable();
-
-      assert(var != NULL);
-
-      /* The only way a parameter would "exist" is if two parameters have
-       * the same name.
-       */
-      if (state->symbols->name_declared_this_scope(var->name)) {
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(& loc, state, "parameter `%s' redeclared", var->name);
-      } else {
-	 state->symbols->add_variable(var);
-      }
-   }
-
-   /* Convert the body of the function to HIR. */
-   this->body->hir(&signature->body, state);
-   signature->is_defined = true;
-
-   state->symbols->pop_scope();
-
-   assert(state->current_function == signature);
-   state->current_function = NULL;
-
-   if (!signature->return_type->is_void() && !state->found_return) {
-      YYLTYPE loc = this->get_location();
-      _mesa_glsl_error(& loc, state, "function `%s' has non-void return type "
-		       "%s, but no return statement",
-		       signature->function_name(),
-		       signature->return_type->name);
-   }
-
-   /* Function definitions do not have r-values.
-    */
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_jump_statement::hir(exec_list *instructions,
-			struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-
-   switch (mode) {
-   case ast_return: {
-      ir_return *inst;
-      assert(state->current_function);
-
-      if (opt_return_value) {
-	 if (state->current_function->return_type->base_type ==
-	     GLSL_TYPE_VOID) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(& loc, state,
-			     "`return` with a value, in function `%s' "
-			     "returning void",
-			     state->current_function->function_name());
-	 }
-
-	 ir_rvalue *const ret = opt_return_value->hir(instructions, state);
-	 assert(ret != NULL);
-
-	 /* Implicit conversions are not allowed for return values. */
-	 if (state->current_function->return_type != ret->type) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(& loc, state,
-			     "`return' with wrong type %s, in function `%s' "
-			     "returning %s",
-			     ret->type->name,
-			     state->current_function->function_name(),
-			     state->current_function->return_type->name);
-	 }
-
-	 inst = new(ctx) ir_return(ret);
-      } else {
-	 if (state->current_function->return_type->base_type !=
-	     GLSL_TYPE_VOID) {
-	    YYLTYPE loc = this->get_location();
-
-	    _mesa_glsl_error(& loc, state,
-			     "`return' with no value, in function %s returning "
-			     "non-void",
-			     state->current_function->function_name());
-	 }
-	 inst = new(ctx) ir_return;
-      }
-
-      state->found_return = true;
-      instructions->push_tail(inst);
-      break;
-   }
-
-   case ast_discard:
-      if (state->target != fragment_shader) {
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(& loc, state,
-			  "`discard' may only appear in a fragment shader");
-      }
-      instructions->push_tail(new(ctx) ir_discard);
-      break;
-
-   case ast_break:
-   case ast_continue:
-      /* FINISHME: Handle switch-statements.  They cannot contain 'continue',
-       * FINISHME: and they use a different IR instruction for 'break'.
-       */
-      /* FINISHME: Correctly handle the nesting.  If a switch-statement is
-       * FINISHME: inside a loop, a 'continue' is valid and will bind to the
-       * FINISHME: loop.
-       */
-      if (state->loop_or_switch_nesting == NULL) {
-	 YYLTYPE loc = this->get_location();
-
-	 _mesa_glsl_error(& loc, state,
-			  "`%s' may only appear in a loop",
-			  (mode == ast_break) ? "break" : "continue");
-      } else {
-	 ir_loop *const loop = state->loop_or_switch_nesting->as_loop();
-
-	 /* Inline the for loop expression again, since we don't know
-	  * where near the end of the loop body the normal copy of it
-	  * is going to be placed.
-	  */
-	 if (mode == ast_continue &&
-	     state->loop_or_switch_nesting_ast->rest_expression) {
-	    state->loop_or_switch_nesting_ast->rest_expression->hir(instructions,
-								    state);
-	 }
-
-	 if (loop != NULL) {
-	    ir_loop_jump *const jump =
-	       new(ctx) ir_loop_jump((mode == ast_break)
-				     ? ir_loop_jump::jump_break
-				     : ir_loop_jump::jump_continue);
-	    instructions->push_tail(jump);
-	 }
-      }
-
-      break;
-   }
-
-   /* Jump instructions do not have r-values.
-    */
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_selection_statement::hir(exec_list *instructions,
-			     struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-
-   ir_rvalue *const condition = this->condition->hir(instructions, state);
-
-   /* From page 66 (page 72 of the PDF) of the GLSL 1.50 spec:
-    *
-    *    "Any expression whose type evaluates to a Boolean can be used as the
-    *    conditional expression bool-expression. Vector types are not accepted
-    *    as the expression to if."
-    *
-    * The checks are separated so that higher quality diagnostics can be
-    * generated for cases where both rules are violated.
-    */
-   if (!condition->type->is_boolean() || !condition->type->is_scalar()) {
-      YYLTYPE loc = this->condition->get_location();
-
-      _mesa_glsl_error(& loc, state, "if-statement condition must be scalar "
-		       "boolean");
-   }
-
-   ir_if *const stmt = new(ctx) ir_if(condition);
-
-   if (then_statement != NULL) {
-      state->symbols->push_scope();
-      then_statement->hir(& stmt->then_instructions, state);
-      state->symbols->pop_scope();
-   }
-
-   if (else_statement != NULL) {
-      state->symbols->push_scope();
-      else_statement->hir(& stmt->else_instructions, state);
-      state->symbols->pop_scope();
-   }
-
-   instructions->push_tail(stmt);
-
-   /* if-statements do not have r-values.
-    */
-   return NULL;
-}
-
-
-void
-ast_iteration_statement::condition_to_hir(ir_loop *stmt,
-					  struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-
-   if (condition != NULL) {
-      ir_rvalue *const cond =
-	 condition->hir(& stmt->body_instructions, state);
-
-      if ((cond == NULL)
-	  || !cond->type->is_boolean() || !cond->type->is_scalar()) {
-	 YYLTYPE loc = condition->get_location();
-
-	 _mesa_glsl_error(& loc, state,
-			  "loop condition must be scalar boolean");
-      } else {
-	 /* As the first code in the loop body, generate a block that looks
-	  * like 'if (!condition) break;' as the loop termination condition.
-	  */
-	 ir_rvalue *const not_cond =
-	    new(ctx) ir_expression(ir_unop_logic_not, glsl_type::bool_type, cond,
-				   NULL);
-
-	 ir_if *const if_stmt = new(ctx) ir_if(not_cond);
-
-	 ir_jump *const break_stmt =
-	    new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
-
-	 if_stmt->then_instructions.push_tail(break_stmt);
-	 stmt->body_instructions.push_tail(if_stmt);
-      }
-   }
-}
-
-
-ir_rvalue *
-ast_iteration_statement::hir(exec_list *instructions,
-			     struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-
-   /* For-loops and while-loops start a new scope, but do-while loops do not.
-    */
-   if (mode != ast_do_while)
-      state->symbols->push_scope();
-
-   if (init_statement != NULL)
-      init_statement->hir(instructions, state);
-
-   ir_loop *const stmt = new(ctx) ir_loop();
-   instructions->push_tail(stmt);
-
-   /* Track the current loop and / or switch-statement nesting.
-    */
-   ir_instruction *const nesting = state->loop_or_switch_nesting;
-   ast_iteration_statement *nesting_ast = state->loop_or_switch_nesting_ast;
-
-   state->loop_or_switch_nesting = stmt;
-   state->loop_or_switch_nesting_ast = this;
-
-   if (mode != ast_do_while)
-      condition_to_hir(stmt, state);
-
-   if (body != NULL)
-      body->hir(& stmt->body_instructions, state);
-
-   if (rest_expression != NULL)
-      rest_expression->hir(& stmt->body_instructions, state);
-
-   if (mode == ast_do_while)
-      condition_to_hir(stmt, state);
-
-   if (mode != ast_do_while)
-      state->symbols->pop_scope();
-
-   /* Restore previous nesting before returning.
-    */
-   state->loop_or_switch_nesting = nesting;
-   state->loop_or_switch_nesting_ast = nesting_ast;
-
-   /* Loops do not have r-values.
-    */
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_type_specifier::hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   if (this->structure != NULL)
-      return this->structure->hir(instructions, state);
-
-   return NULL;
-}
-
-
-ir_rvalue *
-ast_struct_specifier::hir(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   unsigned decl_count = 0;
-
-   /* Make an initial pass over the list of structure fields to determine how
-    * many there are.  Each element in this list is an ast_declarator_list.
-    * This means that we actually need to count the number of elements in the
-    * 'declarations' list in each of the elements.
-    */
-   foreach_list_typed (ast_declarator_list, decl_list, link,
-		       &this->declarations) {
-      foreach_list_const (decl_ptr, & decl_list->declarations) {
-	 decl_count++;
-      }
-   }
-
-   /* Allocate storage for the structure fields and process the field
-    * declarations.  As the declarations are processed, try to also convert
-    * the types to HIR.  This ensures that structure definitions embedded in
-    * other structure definitions are processed.
-    */
-   glsl_struct_field *const fields = hieralloc_array(state, glsl_struct_field,
-						  decl_count);
-
-   unsigned i = 0;
-   foreach_list_typed (ast_declarator_list, decl_list, link,
-		       &this->declarations) {
-      const char *type_name;
-
-      decl_list->type->specifier->hir(instructions, state);
-
-      /* Section 10.9 of the GLSL ES 1.00 specification states that
-       * embedded structure definitions have been removed from the language.
-       */
-      if (state->es_shader && decl_list->type->specifier->structure != NULL) {
-	 YYLTYPE loc = this->get_location();
-	 _mesa_glsl_error(&loc, state, "Embedded structure definitions are "
-			  "not allowed in GLSL ES 1.00.");
-      }
-
-      const glsl_type *decl_type =
-	 decl_list->type->specifier->glsl_type(& type_name, state);
-
-      foreach_list_typed (ast_declaration, decl, link,
-			  &decl_list->declarations) {
-	 const struct glsl_type *field_type = decl_type;
-	 if (decl->is_array) {
-	    YYLTYPE loc = decl->get_location();
-	    field_type = process_array_type(&loc, decl_type, decl->array_size,
-					    state);
-	 }
-	 fields[i].type = (field_type != NULL)
-	    ? field_type : glsl_type::error_type;
-	 fields[i].name = decl->identifier;
-	 i++;
-      }
-   }
-
-   assert(i == decl_count);
-
-   const glsl_type *t =
-      glsl_type::get_record_instance(fields, decl_count, this->name);
-
-   YYLTYPE loc = this->get_location();
-   if (!state->symbols->add_type(name, t)) {
-      _mesa_glsl_error(& loc, state, "struct `%s' previously defined", name);
-   } else {
-
-      const glsl_type **s = (const glsl_type **)
-	 realloc(state->user_structures,
-		 sizeof(state->user_structures[0]) *
-		 (state->num_user_structures + 1));
-      if (s != NULL) {
-	 s[state->num_user_structures] = t;
-	 state->user_structures = s;
-	 state->num_user_structures++;
-      }
-   }
-
-   /* Structure type definitions do not have r-values.
-    */
-   return NULL;
-}
diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp
deleted file mode 100644
index b7488cf..0000000
--- a/src/glsl/ast_type.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <cstdio>
-#include "ast.h"
-extern "C" {
-#include "program/symbol_table.h"
-}
-
-void
-ast_type_specifier::print(void) const
-{
-   if (type_specifier == ast_struct) {
-      structure->print();
-   } else {
-      printf("%s ", type_name);
-   }
-
-   if (is_array) {
-      printf("[ ");
-
-      if (array_size) {
-	 array_size->print();
-      }
-
-      printf("] ");
-   }
-}
-
-ast_type_specifier::ast_type_specifier(int specifier)
-      : type_specifier(ast_types(specifier)), type_name(NULL), structure(NULL),
-	is_array(false), array_size(NULL), precision(ast_precision_high)
-{
-   static const char *const names[] = {
-      "void",
-      "float",
-      "int",
-      "uint",
-      "bool",
-      "vec2",
-      "vec3",
-      "vec4",
-      "bvec2",
-      "bvec3",
-      "bvec4",
-      "ivec2",
-      "ivec3",
-      "ivec4",
-      "uvec2",
-      "uvec3",
-      "uvec4",
-      "mat2",
-      "mat2x3",
-      "mat2x4",
-      "mat3x2",
-      "mat3",
-      "mat3x4",
-      "mat4x2",
-      "mat4x3",
-      "mat4",
-      "sampler1D",
-      "sampler2D",
-      "sampler2DRect",
-      "sampler3D",
-      "samplerCube",
-      "sampler1DShadow",
-      "sampler2DShadow",
-      "sampler2DRectShadow",
-      "samplerCubeShadow",
-      "sampler1DArray",
-      "sampler2DArray",
-      "sampler1DArrayShadow",
-      "sampler2DArrayShadow",
-      "isampler1D",
-      "isampler2D",
-      "isampler3D",
-      "isamplerCube",
-      "isampler1DArray",
-      "isampler2DArray",
-      "usampler1D",
-      "usampler2D",
-      "usampler3D",
-      "usamplerCube",
-      "usampler1DArray",
-      "usampler2DArray",
-
-      NULL, /* ast_struct */
-      NULL  /* ast_type_name */
-   };
-
-   type_name = names[specifier];
-}
-
-bool
-ast_fully_specified_type::has_qualifiers() const
-{
-   return this->qualifier.flags.i != 0;
-}
diff --git a/src/glsl/autogen.sh b/src/glsl/autogen.sh
deleted file mode 100755
index 904cd67..0000000
--- a/src/glsl/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
deleted file mode 100644
index 353bfaa..0000000
--- a/src/glsl/builtin_function.cpp
+++ /dev/null
@@ -1,13681 +0,0 @@
-/* DO NOT MODIFY - automatically generated by generate_builtins.py */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include "main/shaderobj.h" /* for struct gl_shader */
-#include "glsl_parser_extras.h"
-#include "ir_reader.h"
-#include "program.h"
-#include "ast.h"
-
-gl_shader *
-read_builtins(void * mem_ctx, GLenum target, const char *protos, const char **functions, unsigned count)
-{
-   struct gl_context fakeCtx;
-   fakeCtx.API = API_OPENGL;
-   gl_shader *sh = _mesa_new_shader(mem_ctx, 0, target);
-   struct _mesa_glsl_parse_state *st =
-      new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
-
-   st->language_version = 130;
-   st->symbols->language_version = 130;
-   st->ARB_texture_rectangle_enable = true;
-   st->EXT_texture_array_enable = true;
-   _mesa_glsl_initialize_types(st);
-
-   sh->ir = new(sh) exec_list;
-   sh->symbols = st->symbols;
-
-   /* Read the IR containing the prototypes */
-   _mesa_glsl_read_ir(st, sh->ir, protos, true);
-
-   /* Read ALL the function bodies, telling the IR reader not to scan for
-    * prototypes (we've already created them).  The IR reader will skip any
-    * signature that does not already exist as a prototype.
-    */
-   for (unsigned i = 0; i < count; i++) {
-      _mesa_glsl_read_ir(st, sh->ir, functions[i], false);
-
-      if (st->error) {
-         printf("error reading builtin: %.35s ...\n", functions[i]);
-         printf("Info log:\n%s\n", st->info_log);
-         _mesa_delete_shader(NULL, sh);
-         return NULL;
-      }
-   }
-
-   reparent_ir(sh->ir, sh);
-   delete st;
-
-   return sh;
-}
-
-static const char builtin_abs[] =
-   "((function abs\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float abs (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 abs (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 abs (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 abs (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_acos[] =
-   "((function acos\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float - (constant float (1.5707963))\n"
-   "                                  (call asin ((var_ref x)))))))\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 - (constant float (1.5707963))\n"
-   "                                 (call asin ((var_ref x)))))))\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 - (constant float (1.5707963))\n"
-   "                                 (call asin ((var_ref x)))))))\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 - (constant float (1.5707963))\n"
-   "                                 (call asin ((var_ref x)))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_acosh[] =
-   "((function acosh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float - (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 - (expression vec2 * (var_ref x) (var_ref x)) (constant vec2 (1)))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 - (expression vec3 * (var_ref x) (var_ref x)) (constant vec3 (1)))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 - (expression vec4 * (var_ref x) (var_ref x)) (constant vec4 (1)))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_all[] =
-   "((function all\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec2 arg0))\n"
-   "     ((return (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))\n"
-   "\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec3 arg0))\n"
-   "     ((return (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))\n"
-   "\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec4 arg0))\n"
-   "     ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_any[] =
-   "((function any\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec2 arg0))\n"
-   "     ((return (expression bool any (var_ref arg0)))))\n"
-   "\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec3 arg0))\n"
-   "     ((return (expression bool any (var_ref arg0)))))\n"
-   "\n"
-   "   (signature bool\n"
-   "     (parameters\n"
-   "       (declare (in) bvec4 arg0))\n"
-   "     ((return (expression bool any (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_asin[] =
-   "((function asin\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float *\n"
-   "	       (expression float sign (var_ref x))\n"
-   "	       (expression float -\n"
-   "		(expression float *\n"
-   "		 (constant float (3.1415926))\n"
-   "		 (constant float (0.5)))\n"
-   "		(expression float *\n"
-   "		 (expression float sqrt\n"
-   "		  (expression float -\n"
-   "		   (constant float (1.0))\n"
-   "		   (expression float abs (var_ref x))))\n"
-   "		 (expression float +\n"
-   "		  (constant float (1.5707288))\n"
-   "		  (expression float *\n"
-   "		   (expression float abs (var_ref x))\n"
-   "		   (expression float +\n"
-   "		    (constant float (-0.2121144))\n"
-   "		    (expression float *\n"
-   "		     (constant float (0.0742610))\n"
-   "		     (expression float abs (var_ref x))))))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 *\n"
-   "	       (expression vec2 sign (var_ref x))\n"
-   "	       (expression vec2 -\n"
-   "		(expression float *\n"
-   "		 (constant float (3.1415926))\n"
-   "		 (constant float (0.5)))\n"
-   "		(expression vec2 *\n"
-   "		 (expression vec2 sqrt\n"
-   "		  (expression vec2 -\n"
-   "		   (constant float (1.0))\n"
-   "		   (expression vec2 abs (var_ref x))))\n"
-   "		 (expression vec2 +\n"
-   "		  (constant float (1.5707288))\n"
-   "		  (expression vec2 *\n"
-   "		   (expression vec2 abs (var_ref x))\n"
-   "		   (expression vec2 +\n"
-   "		    (constant float (-0.2121144))\n"
-   "		    (expression vec2 *\n"
-   "		     (constant float (0.0742610))\n"
-   "		     (expression vec2 abs (var_ref x))))))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 *\n"
-   "	       (expression vec3 sign (var_ref x))\n"
-   "	       (expression vec3 -\n"
-   "		(expression float *\n"
-   "		 (constant float (3.1415926))\n"
-   "		 (constant float (0.5)))\n"
-   "		(expression vec3 *\n"
-   "		 (expression vec3 sqrt\n"
-   "		  (expression vec3 -\n"
-   "		   (constant float (1.0))\n"
-   "		   (expression vec3 abs (var_ref x))))\n"
-   "		 (expression vec3 +\n"
-   "		  (constant float (1.5707288))\n"
-   "		  (expression vec3 *\n"
-   "		   (expression vec3 abs (var_ref x))\n"
-   "		   (expression vec3 +\n"
-   "		    (constant float (-0.2121144))\n"
-   "		    (expression vec3 *\n"
-   "		     (constant float (0.0742610))\n"
-   "		     (expression vec3 abs (var_ref x))))))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 *\n"
-   "	       (expression vec4 sign (var_ref x))\n"
-   "	       (expression vec4 -\n"
-   "		(expression float *\n"
-   "		 (constant float (3.1415926))\n"
-   "		 (constant float (0.5)))\n"
-   "		(expression vec4 *\n"
-   "		 (expression vec4 sqrt\n"
-   "		  (expression vec4 -\n"
-   "		   (constant float (1.0))\n"
-   "		   (expression vec4 abs (var_ref x))))\n"
-   "		 (expression vec4 +\n"
-   "		  (constant float (1.5707288))\n"
-   "		  (expression vec4 *\n"
-   "		   (expression vec4 abs (var_ref x))\n"
-   "		   (expression vec4 +\n"
-   "		    (constant float (-0.2121144))\n"
-   "		    (expression vec4 *\n"
-   "		     (constant float (0.0742610))\n"
-   "		     (expression vec4 abs (var_ref x))))))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_asinh[] =
-   "((function asinh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float + (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 + (expression vec2 * (var_ref x) (var_ref x)) (constant vec2 (1)))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 + (expression vec3 * (var_ref x) (var_ref x)) (constant vec3 (1)))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 + (expression vec4 * (var_ref x) (var_ref x)) (constant vec4 (1)))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_atan[] =
-   "((function atan\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float y_over_x))\n"
-   "     ((return (call asin ((expression float *\n"
-   "			   (var_ref y_over_x)\n"
-   "			   (expression float rsq\n"
-   "			    (expression float +\n"
-   "			     (expression float *\n"
-   "			      (var_ref y_over_x)\n"
-   "			      (var_ref y_over_x))\n"
-   "			     (constant float (1.0))))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 y_over_x))\n"
-   "     ((return (call asin ((expression vec2 *\n"
-   "			   (var_ref y_over_x)\n"
-   "			   (expression vec2 rsq\n"
-   "			    (expression vec2 +\n"
-   "			     (expression vec2 *\n"
-   "			      (var_ref y_over_x)\n"
-   "			      (var_ref y_over_x))\n"
-   "			     (constant float (1.0))))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 y_over_x))\n"
-   "     ((return (call asin ((expression vec3 *\n"
-   "			   (var_ref y_over_x)\n"
-   "			   (expression vec3 rsq\n"
-   "			    (expression vec3 +\n"
-   "			     (expression vec3 *\n"
-   "			      (var_ref y_over_x)\n"
-   "			      (var_ref y_over_x))\n"
-   "			     (constant float (1.0))))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 y_over_x))\n"
-   "     ((return (call asin ((expression vec4 *\n"
-   "			   (var_ref y_over_x)\n"
-   "			   (expression vec4 rsq\n"
-   "			    (expression vec4 +\n"
-   "			     (expression vec4 *\n"
-   "			      (var_ref y_over_x)\n"
-   "			      (var_ref y_over_x))\n"
-   "			     (constant float (1.0))))))))))\n"
-   "\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in ) float y)\n"
-   "      (declare (in ) float x)\n"
-   "    )\n"
-   "    (\n"
-   "      (declare () float r)\n"
-   "      (if (expression bool > (expression float abs (var_ref x)) (constant float (0.000100))) (\n"
-   "        (assign (constant bool (1)) (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))\n"
-   "        (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n"
-   "          (if (expression bool >= (var_ref y) (constant float (0.000000)) )\n"
-   "              ((assign (constant bool (1)) (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))\n"
-   "              ((assign (constant bool (1)) (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))\n"
-   "        )\n"
-   "        (\n"
-   "        ))\n"
-   "      )\n"
-   "      (\n"
-   "        (declare () float sgn)\n"
-   "        (assign (constant bool (1)) (x) (var_ref sgn) (expression float sign (var_ref y)))\n"
-   "        (assign (constant bool (1)) (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))\n"
-   "      ))\n"
-   "\n"
-   "      (return (var_ref r) )\n"
-   "    ))\n"
-   "\n"
-   "\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 y)\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((declare () vec2 r)\n"
-   "      (assign (constant bool (1)) (x) (var_ref r)\n"
-   "	      (call atan ((swiz x (var_ref y))\n"
-   "			  (swiz x (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref r)\n"
-   "	      (call atan ((swiz y (var_ref y))\n"
-   "			  (swiz y (var_ref x)))))\n"
-   "      (return (var_ref r))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 y)\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((declare () vec3 r)\n"
-   "      (assign (constant bool (1)) (x) (var_ref r)\n"
-   "	      (call atan ((swiz x (var_ref y))\n"
-   "			  (swiz x (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref r)\n"
-   "	      (call atan ((swiz y (var_ref y))\n"
-   "			  (swiz y (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref r)\n"
-   "	      (call atan ((swiz z (var_ref y))\n"
-   "			  (swiz z (var_ref x)))))\n"
-   "      (return (var_ref r))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 y)\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((declare () vec4 r)\n"
-   "      (assign (constant bool (1)) (x) (var_ref r)\n"
-   "	      (call atan ((swiz x (var_ref y))\n"
-   "			  (swiz x (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref r)\n"
-   "	      (call atan ((swiz y (var_ref y))\n"
-   "			  (swiz y (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref r)\n"
-   "	      (call atan ((swiz z (var_ref y))\n"
-   "			  (swiz z (var_ref x)))))\n"
-   "      (assign (constant bool (1)) (w) (var_ref r)\n"
-   "	      (call atan ((swiz w (var_ref y))\n"
-   "			  (swiz w (var_ref x)))))\n"
-   "      (return (var_ref r)))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_atanh[] =
-   "((function atanh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float * (constant float (0.5))\n"
-   "                (expression float log\n"
-   "		  (expression float /\n"
-   "                    (expression float + (constant float (1)) (var_ref x))\n"
-   "                    (expression float - (constant float (1)) (var_ref x))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 * (constant vec2 (0.5))\n"
-   "                (expression vec2 log\n"
-   "		  (expression vec2 /\n"
-   "                    (expression vec2 + (constant vec2 (1)) (var_ref x))\n"
-   "                    (expression vec2 - (constant vec2 (1)) (var_ref x))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 * (constant vec3 (0.5))\n"
-   "                (expression vec3 log\n"
-   "		  (expression vec3 /\n"
-   "                    (expression vec3 + (constant vec3 (1)) (var_ref x))\n"
-   "                    (expression vec3 - (constant vec3 (1)) (var_ref x))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 * (constant vec4 (0.5))\n"
-   "                (expression vec4 log\n"
-   "		  (expression vec4 /\n"
-   "                    (expression vec4 + (constant vec4 (1)) (var_ref x))\n"
-   "                    (expression vec4 - (constant vec4 (1)) (var_ref x))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_ceil[] =
-   "((function ceil\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float ceil (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 ceil (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 ceil (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 ceil (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_clamp[] =
-   "((function clamp\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1)\n"
-   "       (declare (in) vec2 arg2))\n"
-   "     ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1)\n"
-   "       (declare (in) vec3 arg2))\n"
-   "     ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1)\n"
-   "       (declare (in) vec4 arg2))\n"
-   "     ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2  arg0)\n"
-   "       (declare (in) float arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3  arg0)\n"
-   "       (declare (in) float arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4  arg0)\n"
-   "       (declare (in) float arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature int\n"
-   "     (parameters\n"
-   "       (declare (in) int arg0)\n"
-   "       (declare (in) int arg1)\n"
-   "       (declare (in) int arg2))\n"
-   "     ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1)\n"
-   "       (declare (in) ivec2 arg2))\n"
-   "     ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1)\n"
-   "       (declare (in) ivec3 arg2))\n"
-   "     ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1)\n"
-   "       (declare (in) ivec4 arg2))\n"
-   "     ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) int arg1)\n"
-   "       (declare (in) int arg2))\n"
-   "     ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) int arg1)\n"
-   "       (declare (in) int arg2))\n"
-   "     ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) int arg1)\n"
-   "       (declare (in) int arg2))\n"
-   "     ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uint\n"
-   "     (parameters\n"
-   "       (declare (in) uint arg0)\n"
-   "       (declare (in) uint arg1)\n"
-   "       (declare (in) uint arg2))\n"
-   "     ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1)\n"
-   "       (declare (in) uvec2 arg2))\n"
-   "     ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1)\n"
-   "       (declare (in) uvec3 arg2))\n"
-   "     ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1)\n"
-   "       (declare (in) uvec4 arg2))\n"
-   "     ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uint arg1)\n"
-   "       (declare (in) uint arg2))\n"
-   "     ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uint arg1)\n"
-   "       (declare (in) uint arg2))\n"
-   "     ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uint arg1)\n"
-   "       (declare (in) uint arg2))\n"
-   "     ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_cos[] =
-   "((function cos\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float angle))\n"
-   "     ((return (expression float cos (var_ref angle)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 angle))\n"
-   "     ((return (expression vec2 cos (var_ref angle)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 angle))\n"
-   "     ((return (expression vec3 cos (var_ref angle)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 angle))\n"
-   "     ((return (expression vec4 cos (var_ref angle)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_cosh[] =
-   "((function cosh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float * (constant float (0.5))\n"
-   "                (expression float +\n"
-   "		  (expression float exp (var_ref x))\n"
-   "		  (expression float exp (expression float neg (var_ref x))))))))\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 * (constant vec2 (0.5))\n"
-   "                (expression vec2 +\n"
-   "		  (expression vec2 exp (var_ref x))\n"
-   "		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 * (constant vec3 (0.5))\n"
-   "                (expression vec3 +\n"
-   "		  (expression vec3 exp (var_ref x))\n"
-   "		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 * (constant vec4 (0.5))\n"
-   "                (expression vec4 +\n"
-   "		  (expression vec4 exp (var_ref x))\n"
-   "		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_cross[] =
-   "((function cross\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 a)\n"
-   "       (declare (in) vec3 b))\n"
-   "     ((return (expression vec3 -\n"
-   "        (expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))\n"
-   "        (expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_dFdx[] =
-   "((function dFdx\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float p))\n"
-   "     ((return (expression float dFdx (var_ref p)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 p))\n"
-   "     ((return (expression vec2 dFdx (var_ref p)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 p))\n"
-   "     ((return (expression vec3 dFdx (var_ref p)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 p))\n"
-   "     ((return (expression vec4 dFdx (var_ref p)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_dFdy[] =
-   "((function dFdy\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float p))\n"
-   "     ((return (expression float dFdy (var_ref p)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 p))\n"
-   "     ((return (expression vec2 dFdy (var_ref p)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 p))\n"
-   "     ((return (expression vec3 dFdy (var_ref p)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 p))\n"
-   "     ((return (expression vec4 dFdy (var_ref p)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_degrees[] =
-   "((function degrees\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float * (var_ref arg0) (constant float (57.295780))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_distance[] =
-   "((function distance\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float p0)\n"
-   "       (declare (in) float p1))\n"
-   "     ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 p0)\n"
-   "       (declare (in) vec2 p1))\n"
-   "     ((declare () vec2 p)\n"
-   "      (assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n"
-   "      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 p0)\n"
-   "       (declare (in) vec3 p1))\n"
-   "     ((declare () vec3 p)\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n"
-   "      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 p0)\n"
-   "       (declare (in) vec4 p1))\n"
-   "     ((declare () vec4 p)\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n"
-   "      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_dot[] =
-   "((function dot\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression float * (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_equal[] =
-   "((function equal\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) bvec2 arg0)\n"
-   "       (declare (in) bvec2 arg1))\n"
-   "     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) bvec3 arg0)\n"
-   "       (declare (in) bvec3 arg1))\n"
-   "     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) bvec4 arg0)\n"
-   "       (declare (in) bvec4 arg1))\n"
-   "     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_exp[] =
-   "((function exp\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float exp (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 exp (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 exp (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 exp (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_exp2[] =
-   "((function exp2\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float exp2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 exp2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 exp2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 exp2 (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_faceforward[] =
-   "((function faceforward\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float N)\n"
-   "       (declare (in) float I)\n"
-   "       (declare (in) float Nref))\n"
-   "     ((if (expression bool < (expression float * (var_ref Nref) (var_ref I)) (constant float (0)))\n"
-   "          ((return (var_ref N)))\n"
-   "	  ((return (expression float neg (var_ref N)))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 N)\n"
-   "       (declare (in) vec2 I)\n"
-   "       (declare (in) vec2 Nref))\n"
-   "     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
-   "          ((return (var_ref N)))\n"
-   "	  ((return (expression vec2 neg (var_ref N)))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 N)\n"
-   "       (declare (in) vec3 I)\n"
-   "       (declare (in) vec3 Nref))\n"
-   "     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
-   "          ((return (var_ref N)))\n"
-   "	  ((return (expression vec3 neg (var_ref N)))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 N)\n"
-   "       (declare (in) vec4 I)\n"
-   "       (declare (in) vec4 Nref))\n"
-   "     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n"
-   "          ((return (var_ref N)))\n"
-   "	  ((return (expression vec4 neg (var_ref N)))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_floor[] =
-   "((function floor\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float floor (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 floor (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 floor (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 floor (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_fract[] =
-   "((function fract\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float fract (var_ref x)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 fract (var_ref x)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 fract (var_ref x)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 fract (var_ref x)))))\n"
-   "))\n"
-   "\n"
-   ""
-;
-static const char builtin_ftransform[] =
-   "((declare (uniform) mat4 gl_ModelViewProjectionMatrix)\n"
-   " (declare (in) vec4 gl_Vertex)\n"
-   " (function ftransform\n"
-   "   (signature vec4\n"
-   "     (parameters)\n"
-   "    ((return (expression vec4 *\n"
-   "	      (var_ref gl_ModelViewProjectionMatrix)\n"
-   "	      (var_ref gl_Vertex)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_fwidth[] =
-   "((function fwidth\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float p))\n"
-   "     ((return (expression float +\n"
-   "                (expression float abs (expression float dFdx (var_ref p)))\n"
-   "                (expression float abs (expression float dFdy (var_ref p)))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 p))\n"
-   "     ((return (expression vec2 +\n"
-   "                (expression vec2 abs (expression vec2 dFdx (var_ref p)))\n"
-   "                (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 p))\n"
-   "     ((return (expression vec3 +\n"
-   "                (expression vec3 abs (expression vec3 dFdx (var_ref p)))\n"
-   "                (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 p))\n"
-   "     ((return (expression vec4 +\n"
-   "                (expression vec4 abs (expression vec4 dFdx (var_ref p)))\n"
-   "                (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_greaterThan[] =
-   "((function greaterThan\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_greaterThanEqual[] =
-   "((function greaterThanEqual\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_inversesqrt[] =
-   "((function inversesqrt\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float rsq (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 rsq (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 rsq (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 rsq (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_length[] =
-   "((function length\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float abs (var_ref arg0)))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_lessThan[] =
-   "((function lessThan\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_lessThanEqual[] =
-   "((function lessThanEqual\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_log[] =
-   "((function log\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float log (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 log (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 log (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 log (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_log2[] =
-   "((function log2\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float log2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 log2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 log2 (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 log2 (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_matrixCompMult[] =
-   "((function matrixCompMult\n"
-   "   (signature mat2\n"
-   "     (parameters\n"
-   "       (declare (in) mat2 x)\n"
-   "       (declare (in) mat2 y))\n"
-   "     ((declare () mat2 z)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat3\n"
-   "     (parameters\n"
-   "       (declare (in) mat3 x)\n"
-   "       (declare (in) mat3 y))\n"
-   "     ((declare () mat3 z)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat4\n"
-   "     (parameters\n"
-   "       (declare (in) mat4 x)\n"
-   "       (declare (in) mat4 y))\n"
-   "     ((declare () mat4 z)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (3)))  (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat2x3\n"
-   "     (parameters\n"
-   "       (declare (in) mat2x3 x)\n"
-   "       (declare (in) mat2x3 y))\n"
-   "     ((declare () mat2x3 z)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat3x2\n"
-   "     (parameters\n"
-   "       (declare (in) mat3x2 x)\n"
-   "       (declare (in) mat3x2 y))\n"
-   "     ((declare () mat3x2 z)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat2x4\n"
-   "     (parameters\n"
-   "       (declare (in) mat2x4 x)\n"
-   "       (declare (in) mat2x4 y))\n"
-   "     ((declare () mat2x4 z)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat4x2\n"
-   "     (parameters\n"
-   "       (declare (in) mat4x2 x)\n"
-   "       (declare (in) mat4x2 y))\n"
-   "     ((declare () mat4x2 z)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (3)))  (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat3x4\n"
-   "     (parameters\n"
-   "       (declare (in) mat3x4 x)\n"
-   "       (declare (in) mat3x4 y))\n"
-   "     ((declare () mat3x4 z)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "(return (var_ref z))))\n"
-   "\n"
-   "   (signature mat4x3\n"
-   "     (parameters\n"
-   "       (declare (in) mat4x3 x)\n"
-   "       (declare (in) mat4x3 y))\n"
-   "     ((declare () mat4x3 z)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (3)))  (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
-   "(return (var_ref z))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_max[] =
-   "((function max\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression float max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature int\n"
-   "     (parameters\n"
-   "       (declare (in) int arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression int max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uint\n"
-   "     (parameters\n"
-   "       (declare (in) uint arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uint max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_min[] =
-   "((function min\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression float min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature int\n"
-   "     (parameters\n"
-   "       (declare (in) int arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression int min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4  arg0)\n"
-   "       (declare (in) int arg1))\n"
-   "     ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uint\n"
-   "     (parameters\n"
-   "       (declare (in) uint arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uint min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4  arg0)\n"
-   "       (declare (in) uint arg1))\n"
-   "     ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_mix[] =
-   "((function mix\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1)\n"
-   "       (declare (in) vec2 arg2))\n"
-   "     ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1)\n"
-   "       (declare (in) vec3 arg2))\n"
-   "     ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1)\n"
-   "       (declare (in) vec4 arg2))\n"
-   "     ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1)\n"
-   "       (declare (in) float arg2))\n"
-   "     ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n"
-   "\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float v1)\n"
-   "       (declare (in) float v2)\n"
-   "       (declare (in) bool  a))\n"
-   "     ((assign (var_ref a) (var_ref v1) (var_ref v2))\n"
-   "      (return (var_ref v1))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 v1)\n"
-   "       (declare (in) vec2 v2)\n"
-   "       (declare (in) bvec2 a))\n"
-   "     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n"
-   "      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n"
-   "      (return (var_ref v1))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 v1)\n"
-   "       (declare (in) vec3 v2)\n"
-   "       (declare (in) bvec3 a))\n"
-   "     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n"
-   "      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n"
-   "      (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))\n"
-   "      (return (var_ref v1))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 v1)\n"
-   "       (declare (in) vec4 v2)\n"
-   "       (declare (in) bvec4 a))\n"
-   "     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n"
-   "      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n"
-   "      (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))\n"
-   "      (assign (swiz w (var_ref a)) (w) (var_ref v1) (swiz w (var_ref v2)))\n"
-   "      (return (var_ref v1))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_mod[] =
-   "((function mod\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression float % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4  arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_modf[] =
-   "((function modf\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in)  float x)\n"
-   "       (declare (out) float i))\n"
-   "     ((declare () float t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t)\n"
-   "                                      (expression float trunc (var_ref x)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref i) (var_ref t))\n"
-   "      (return (expression float - (var_ref x) (var_ref t)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in)  vec2 x)\n"
-   "       (declare (out) vec2 i))\n"
-   "     ((declare () vec2 t)\n"
-   "      (assign (constant bool (1)) (xy) (var_ref t)\n"
-   "                                       (expression vec2 trunc (var_ref x)))\n"
-   "      (assign (constant bool (1)) (xy) (var_ref i) (var_ref t))\n"
-   "      (return (expression vec2 - (var_ref x) (var_ref t)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in)  vec3 x)\n"
-   "       (declare (out) vec3 i))\n"
-   "     ((declare () vec3 t)\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref t)\n"
-   "                                        (expression vec3 trunc (var_ref x)))\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t))\n"
-   "      (return (expression vec3 - (var_ref x) (var_ref t)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in)  vec4 x)\n"
-   "       (declare (out) vec4 i))\n"
-   "     ((declare () vec4 t)\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref t)\n"
-   "                                         (expression vec4 trunc (var_ref x)))\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t))\n"
-   "      (return (expression vec4 - (var_ref x) (var_ref t)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_noise1[] =
-   "((function noise1\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float noise (var_ref x)))))\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression float noise (var_ref x)))))\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression float noise (var_ref x)))))\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression float noise (var_ref x)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_noise2[] =
-   "((function noise2\n"
-   "  (signature vec2\n"
-   "    (parameters (declare (in) vec4 p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () vec2 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec2\n"
-   "    (parameters (declare (in) vec3 p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () vec2 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in ) vec2 p)\n"
-   "    )\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () vec2 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in ) float p)\n"
-   "    )\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () vec2 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "))\n"
-   ""
-;
-static const char builtin_noise3[] =
-   "((function noise3\n"
-   "  (signature vec3\n"
-   "    (parameters (declare (in) vec4 p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () float c)\n"
-   "      (declare () vec3 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec3\n"
-   "    (parameters (declare (in) vec3 p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () float c)\n"
-   "      (declare () vec3 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec3\n"
-   "    (parameters (declare (in) vec2 p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () float c)\n"
-   "      (declare () vec3 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec3\n"
-   "    (parameters (declare (in) float p))\n"
-   "    (\n"
-   "      (declare () float a)\n"
-   "      (declare () float b)\n"
-   "      (declare () float c)\n"
-   "      (declare () vec3 t)\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
-   "      (return (var_ref t))\n"
-   "    ))\n"
-   "))\n"
-   ""
-;
-static const char builtin_noise4[] =
-   "((function noise4\n"
-   "  (signature vec4\n"
-   "    (parameters (declare (in) vec4 p))\n"
-   "    (\n"
-   "      (declare () float _x)\n"
-   "      (declare () float _y)\n"
-   "      (declare () float _z)\n"
-   "      (declare () float _w)\n"
-   "      (declare () vec4 _r)\n"
-   "\n"
-   "      (declare () vec4 _p)\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
-   "      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
-   "      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
-   "      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
-   "      (return (var_ref _r))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec4\n"
-   "    (parameters (declare (in) vec3 p))\n"
-   "    (\n"
-   "      (declare () float _x)\n"
-   "      (declare () float _y)\n"
-   "      (declare () float _z)\n"
-   "      (declare () float _w)\n"
-   "      (declare () vec4 _r)\n"
-   "\n"
-   "      (declare () vec3 _p)\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
-   "      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
-   "      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
-   "      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
-   "      (return (var_ref _r))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec4\n"
-   "    (parameters (declare (in) vec2 p))\n"
-   "    (\n"
-   "      (declare () float _x)\n"
-   "      (declare () float _y)\n"
-   "      (declare () float _z)\n"
-   "      (declare () float _w)\n"
-   "      (declare () vec4 _r)\n"
-   "\n"
-   "      (declare () vec2 _p)\n"
-   "      (assign (constant bool (1)) (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
-   "      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
-   "      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
-   "      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
-   "      (return (var_ref _r))\n"
-   "    ))\n"
-   "\n"
-   "  (signature vec4\n"
-   "    (parameters (declare (in) float p))\n"
-   "    (\n"
-   "      (declare () float _x)\n"
-   "      (declare () float _y)\n"
-   "      (declare () float _z)\n"
-   "      (declare () float _w)\n"
-   "      (declare () vec4 _r)\n"
-   "\n"
-   "      (declare () float _p)\n"
-   "      (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
-   "      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))\n"
-   "\n"
-   "      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
-   "      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
-   "      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
-   "      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
-   "      (return (var_ref _r))\n"
-   "    ))\n"
-   "))\n"
-   ""
-;
-static const char builtin_normalize[] =
-   "((function normalize\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float sign (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_not[] =
-   "((function not\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) bvec2 arg0))\n"
-   "     ((return (expression bvec2 ! (var_ref arg0)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) bvec3 arg0))\n"
-   "     ((return (expression bvec3 ! (var_ref arg0)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) bvec4 arg0))\n"
-   "     ((return (expression bvec4 ! (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_notEqual[] =
-   "((function notEqual\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0)\n"
-   "       (declare (in) vec2 arg1))\n"
-   "     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0)\n"
-   "       (declare (in) vec3 arg1))\n"
-   "     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0)\n"
-   "       (declare (in) vec4 arg1))\n"
-   "     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) bvec2 arg0)\n"
-   "       (declare (in) bvec2 arg1))\n"
-   "     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) bvec3 arg0)\n"
-   "       (declare (in) bvec3 arg1))\n"
-   "     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) bvec4 arg0)\n"
-   "       (declare (in) bvec4 arg1))\n"
-   "     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 arg0)\n"
-   "       (declare (in) ivec2 arg1))\n"
-   "     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 arg0)\n"
-   "       (declare (in) ivec3 arg1))\n"
-   "     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 arg0)\n"
-   "       (declare (in) ivec4 arg1))\n"
-   "     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec2\n"
-   "     (parameters\n"
-   "       (declare (in) uvec2 arg0)\n"
-   "       (declare (in) uvec2 arg1))\n"
-   "     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec3\n"
-   "     (parameters\n"
-   "       (declare (in) uvec3 arg0)\n"
-   "       (declare (in) uvec3 arg1))\n"
-   "     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature bvec4\n"
-   "     (parameters\n"
-   "       (declare (in) uvec4 arg0)\n"
-   "       (declare (in) uvec4 arg1))\n"
-   "     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_outerProduct[] =
-   "((function outerProduct\n"
-   "   (signature mat2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 u)\n"
-   "       (declare (in) vec2 v))\n"
-   "     ((declare () mat2 m)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat2x3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 u)\n"
-   "       (declare (in) vec2 v))\n"
-   "     ((declare () mat2x3 m)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat2x4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 u)\n"
-   "       (declare (in) vec2 v))\n"
-   "     ((declare () mat2x4 m)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat3x2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 u)\n"
-   "       (declare (in) vec3 v))\n"
-   "     ((declare () mat3x2 m)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (return (var_ref m))\n"
-   " ))\n"
-   "\n"
-   "   (signature mat3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 u)\n"
-   "       (declare (in) vec3 v))\n"
-   "     ((declare () mat3 m)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat3x4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 u)\n"
-   "       (declare (in) vec3 v))\n"
-   "     ((declare () mat3x4 m)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat4x2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 u)\n"
-   "       (declare (in) vec4 v))\n"
-   "     ((declare () mat4x2 m)\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat4x3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 u)\n"
-   "       (declare (in) vec4 v))\n"
-   "     ((declare () mat4x3 m)\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "\n"
-   "   (signature mat4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 u)\n"
-   "       (declare (in) vec4 v))\n"
-   "     ((declare () mat4 m)\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
-   "      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n"
-   "      (return (var_ref m))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_pow[] =
-   "((function pow\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0)\n"
-   "       (declare (in) float arg1))\n"
-   "     ((return (expression float pow (var_ref arg0) (var_ref arg1)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 b)\n"
-   "       (declare (in) vec2 e))\n"
-   "      	(\n"
-   "			(declare () vec2 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 b)\n"
-   "       (declare (in) vec3 e))\n"
-   "      	(\n"
-   "			(declare () vec3 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (z) (var_ref ret) (call pow ((swiz z (var_ref b)) (swiz z (var_ref e)) )))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "\n"
-   "	(signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 b)\n"
-   "       (declare (in) vec4 e))\n"
-   "      	(\n"
-   "			(declare () vec4 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (z) (var_ref ret) (call pow ((swiz z (var_ref b)) (swiz z (var_ref e)) )))\n"
-   "			(assign (constant bool (1)) (w) (var_ref ret) (call pow ((swiz w (var_ref b)) (swiz w (var_ref e)) )))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "))\n"
-   ""
-;
-static const char builtin_radians[] =
-   "((function radians\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float * (var_ref arg0) (constant float (0.017453))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 * (var_ref arg0) (constant float (0.017453))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 * (var_ref arg0) (constant float (0.017453))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 * (var_ref arg0) (constant float (0.017453))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_reflect[] =
-   "((function reflect\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float i)\n"
-   "       (declare (in) float n))\n"
-   "     ((return (expression float -\n"
-   "	       (var_ref i)\n"
-   "	       (expression float *\n"
-   "		(constant float (2.0))\n"
-   "		(expression float *\n"
-   "		 (expression float *\n"
-   "		  (var_ref n)\n"
-   "		  (var_ref i))\n"
-   "		 (var_ref n)))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 i)\n"
-   "       (declare (in) vec2 n))\n"
-   "     ((return (expression vec2 -\n"
-   "	       (var_ref i)\n"
-   "	       (expression vec2 *\n"
-   "		(constant float (2.0))\n"
-   "		(expression vec2 *\n"
-   "		 (expression float dot\n"
-   "		  (var_ref n)\n"
-   "		  (var_ref i))\n"
-   "		 (var_ref n)))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 i)\n"
-   "       (declare (in) vec3 n))\n"
-   "     ((return (expression vec3 -\n"
-   "	       (var_ref i)\n"
-   "	       (expression vec3 *\n"
-   "		(constant float (2.0))\n"
-   "		(expression vec3 *\n"
-   "		 (expression float dot\n"
-   "		  (var_ref n)\n"
-   "		  (var_ref i))\n"
-   "		 (var_ref n)))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 i)\n"
-   "       (declare (in) vec4 n))\n"
-   "     ((return (expression vec4 -\n"
-   "	       (var_ref i)\n"
-   "	       (expression vec4 *\n"
-   "		(constant float (2.0))\n"
-   "		(expression vec4 *\n"
-   "		 (expression float dot\n"
-   "		  (var_ref n)\n"
-   "		  (var_ref i))\n"
-   "		 (var_ref n)))))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_refract[] =
-   "((function refract\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float i)\n"
-   "       (declare (in) float n)\n"
-   "       (declare (in) float eta))\n"
-   "     ((declare () float k)\n"
-   "      (assign (constant bool (1)) (x) (var_ref k)\n"
-   "              (expression float - (constant float (1.0))\n"
-   "	        (expression float * (var_ref eta)\n"
-   "	          (expression float * (var_ref eta)\n"
-   "		    (expression float - (constant float (1.0))\n"
-   "		      (expression float * \n"
-   "		        (expression float * (var_ref n) (var_ref i))\n"
-   "		        (expression float * (var_ref n) (var_ref i))))))))\n"
-   "      (if (expression bool < (var_ref k) (constant float (0.0)))\n"
-   "          ((return (constant float (0.0))))\n"
-   "	  ((return (expression float -\n"
-   "	             (expression float * (var_ref eta) (var_ref i))\n"
-   "		     (expression float *\n"
-   "		       (expression float +\n"
-   "		         (expression float * (var_ref eta)\n"
-   "			   (expression float * (var_ref n) (var_ref i)))\n"
-   "		         (expression float sqrt (var_ref k)))\n"
-   "		       (var_ref n))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 i)\n"
-   "       (declare (in) vec2 n)\n"
-   "       (declare (in) float eta))\n"
-   "     ((declare () float k)\n"
-   "      (assign (constant bool (1)) (x) (var_ref k)\n"
-   "              (expression float - (constant float (1.0))\n"
-   "	        (expression float * (var_ref eta)\n"
-   "	          (expression float * (var_ref eta)\n"
-   "		    (expression float - (constant float (1.0))\n"
-   "		      (expression float * \n"
-   "		        (expression float dot (var_ref n) (var_ref i))\n"
-   "		        (expression float dot (var_ref n) (var_ref i))))))))\n"
-   "      (if (expression bool < (var_ref k) (constant float (0.0)))\n"
-   "          ((return (constant vec2 (0.0 0.0))))\n"
-   "	  ((return (expression vec2 -\n"
-   "	             (expression vec2 * (var_ref eta) (var_ref i))\n"
-   "		     (expression vec2 *\n"
-   "		       (expression float +\n"
-   "		         (expression float * (var_ref eta)\n"
-   "			   (expression float dot (var_ref n) (var_ref i)))\n"
-   "		         (expression float sqrt (var_ref k)))\n"
-   "		       (var_ref n))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 i)\n"
-   "       (declare (in) vec3 n)\n"
-   "       (declare (in) float eta))\n"
-   "     ((declare () float k)\n"
-   "      (assign (constant bool (1)) (x) (var_ref k)\n"
-   "              (expression float - (constant float (1.0))\n"
-   "	        (expression float * (var_ref eta)\n"
-   "	          (expression float * (var_ref eta)\n"
-   "		    (expression float - (constant float (1.0))\n"
-   "		      (expression float * \n"
-   "		        (expression float dot (var_ref n) (var_ref i))\n"
-   "		        (expression float dot (var_ref n) (var_ref i))))))))\n"
-   "      (if (expression bool < (var_ref k) (constant float (0.0)))\n"
-   "          ((return (constant vec3 (0.0 0.0 0.0))))\n"
-   "	  ((return (expression vec3 -\n"
-   "	             (expression vec3 * (var_ref eta) (var_ref i))\n"
-   "		     (expression vec3 *\n"
-   "		       (expression float +\n"
-   "		         (expression float * (var_ref eta)\n"
-   "			   (expression float dot (var_ref n) (var_ref i)))\n"
-   "		         (expression float sqrt (var_ref k)))\n"
-   "		       (var_ref n))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 i)\n"
-   "       (declare (in) vec4 n)\n"
-   "       (declare (in) float eta))\n"
-   "     ((declare () float k)\n"
-   "      (assign (constant bool (1)) (x) (var_ref k)\n"
-   "              (expression float - (constant float (1.0))\n"
-   "	        (expression float * (var_ref eta)\n"
-   "	          (expression float * (var_ref eta)\n"
-   "		    (expression float - (constant float (1.0))\n"
-   "		      (expression float * \n"
-   "		        (expression float dot (var_ref n) (var_ref i))\n"
-   "		        (expression float dot (var_ref n) (var_ref i))))))))\n"
-   "      (if (expression bool < (var_ref k) (constant float (0.0)))\n"
-   "          ((return (constant vec4 (0.0 0.0 0.0 0.0))))\n"
-   "	  ((return (expression vec4 -\n"
-   "	             (expression vec4 * (var_ref eta) (var_ref i))\n"
-   "		     (expression vec4 *\n"
-   "		       (expression float +\n"
-   "		         (expression float * (var_ref eta)\n"
-   "			   (expression float dot (var_ref n) (var_ref i)))\n"
-   "		         (expression float sqrt (var_ref k)))\n"
-   "		       (var_ref n))))))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_round[] =
-   "((function round\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 round_even (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_roundEven[] =
-   "((function roundEven\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 round_even (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 round_even (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1D[] =
-   "((function shadow1D\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1DArray[] =
-   "((function shadow1DArray\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArrayShadow sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArrayShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1DArrayLod[] =
-   "((function shadow1DArrayLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArrayShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1DLod[] =
-   "((function shadow1DLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1DProj[] =
-   "((function shadow1DProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow1DProjLod[] =
-   "((function shadow1DProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DShadow sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2D[] =
-   "((function shadow2D\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DArray[] =
-   "((function shadow2DArray\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArrayShadow sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) 1 (swiz w (var_ref P)) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DLod[] =
-   "((function shadow2DLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DProj[] =
-   "((function shadow2DProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DProjLod[] =
-   "((function shadow2DProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DShadow sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DRect[] =
-   "((function shadow2DRect\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DRectShadow sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_shadow2DRectProj[] =
-   "((function shadow2DRectProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DRectShadow sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_sign[] =
-   "((function sign\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float sign (var_ref x)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 sign (var_ref x)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 sign (var_ref x)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 sign (var_ref x)))))\n"
-   "\n"
-   "   (signature int\n"
-   "     (parameters\n"
-   "       (declare (in) int x))\n"
-   "     ((return (expression int sign (var_ref x)))))\n"
-   "\n"
-   "   (signature ivec2\n"
-   "     (parameters\n"
-   "       (declare (in) ivec2 x))\n"
-   "     ((return (expression ivec2 sign (var_ref x)))))\n"
-   "\n"
-   "   (signature ivec3\n"
-   "     (parameters\n"
-   "       (declare (in) ivec3 x))\n"
-   "     ((return (expression ivec3 sign (var_ref x)))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) ivec4 x))\n"
-   "     ((return (expression ivec4 sign (var_ref x)))))\n"
-   "))\n"
-   "\n"
-   ""
-;
-static const char builtin_sin[] =
-   "((function sin\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float angle))\n"
-   "		(\n"
-   "			(return (expression float sin (var_ref angle)))\n"
-   "		)\n"
-   "	)\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 angle))\n"
-   "      	(\n"
-   "			(declare () vec2 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 angle))\n"
-   "		(\n"
-   "			(declare () vec3 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (z) (var_ref ret) (call sin ((swiz z (var_ref angle)))))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "\n"
-   "	(signature vec4\n"
-   "		(parameters \n"
-   "			(declare (in) vec4 angle))\n"
-   "		(\n"
-   "			(declare () vec4 ret)\n"
-   "			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (z) (var_ref ret) (call sin ((swiz z (var_ref angle)))))\n"
-   "			(assign (constant bool (1)) (w) (var_ref ret) (call sin ((swiz w (var_ref angle)))))\n"
-   "			(return (var_ref ret))\n"
-   "		)\n"
-   "	)\n"
-   "))\n"
-   ""
-;
-static const char builtin_sinh[] =
-   "((function sinh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float * (constant float (0.5))\n"
-   "                (expression float -\n"
-   "		  (expression float exp (var_ref x))\n"
-   "		  (expression float exp (expression float neg (var_ref x))))))))\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 * (constant vec2 (0.5))\n"
-   "                (expression vec2 -\n"
-   "		  (expression vec2 exp (var_ref x))\n"
-   "		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 * (constant vec3 (0.5))\n"
-   "                (expression vec3 -\n"
-   "		  (expression vec3 exp (var_ref x))\n"
-   "		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 * (constant vec4 (0.5))\n"
-   "                (expression vec4 -\n"
-   "		  (expression vec4 exp (var_ref x))\n"
-   "		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_smoothstep[] =
-   "((function smoothstep\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float edge0)\n"
-   "       (declare (in) float edge1)\n"
-   "       (declare (in) float x))\n"
-   "     ((declare () float t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t)\n"
-   "              (expression float max\n"
-   "	                  (expression float min\n"
-   "	                              (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
-   "	                              (constant float (1.0)))\n"
-   "	                  (constant float (0.0))))\n"
-   "      (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) float edge0)\n"
-   "       (declare (in) float edge1)\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((declare () vec2 t)\n"
-   "      (assign (constant bool (1)) (xy) (var_ref t)\n"
-   "              (expression vec2 max\n"
-   "	                  (expression vec2 min\n"
-   "	                              (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
-   "	                              (constant float (1.0)))\n"
-   "	                  (constant float (0.0))))\n"
-   "      (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) float edge0)\n"
-   "       (declare (in) float edge1)\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((declare () vec3 t)\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref t)\n"
-   "              (expression vec3 max\n"
-   "	                  (expression vec3 min\n"
-   "	                              (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
-   "	                              (constant float (1.0)))\n"
-   "	                  (constant float (0.0))))\n"
-   "      (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n"
-   "\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) float edge0)\n"
-   "       (declare (in) float edge1)\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((declare () vec4 t)\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref t)\n"
-   "              (expression vec4 max\n"
-   "	                  (expression vec4 min\n"
-   "	                              (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
-   "	                              (constant float (1.0)))\n"
-   "	                  (constant float (0.0))))\n"
-   "      (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 edge0)\n"
-   "       (declare (in) vec2 edge1)\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((declare () vec2 t)\n"
-   "      (assign (constant bool (1)) (xy) (var_ref t)\n"
-   "              (expression vec2 max\n"
-   "                          (expression vec2 min\n"
-   "                                      (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))\n"
-   "                                      (constant float (1.0)))\n"
-   "                          (constant float (0.0))))\n"
-   "      (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 edge0)\n"
-   "       (declare (in) vec3 edge1)\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((declare () vec3 t)\n"
-   "      (assign (constant bool (1)) (xyz) (var_ref t)\n"
-   "              (expression vec3 max\n"
-   "                          (expression vec3 min\n"
-   "                                      (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))\n"
-   "                                      (constant float (1.0)))\n"
-   "                          (constant float (0.0))))\n"
-   "      (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 edge0)\n"
-   "       (declare (in) vec4 edge1)\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((declare () vec4 t)\n"
-   "      (assign (constant bool (1)) (xyzw) (var_ref t)\n"
-   "              (expression vec4 max\n"
-   "                          (expression vec4 min\n"
-   "                                      (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))\n"
-   "                                      (constant float (1.0)))\n"
-   "                          (constant float (0.0))))\n"
-   "      (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n"
-   "))\n"
-   "\n"
-   ""
-;
-static const char builtin_sqrt[] =
-   "((function sqrt\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float sqrt (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 sqrt (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 sqrt (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 sqrt (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_step[] =
-   "((function step\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float edge)\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) float edge)\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((declare () vec2 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
-   "      (return (var_ref t))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) float edge)\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((declare () vec3 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
-   "      (return (var_ref t))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) float edge)\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((declare () vec4 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
-   "      (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n"
-   "      (return (var_ref t))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 edge)\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((declare () vec2 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
-   "      (return (var_ref t))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 edge)\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((declare () vec3 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
-   "      (return (var_ref t))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 edge)\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((declare () vec4 t)\n"
-   "      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
-   "      (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n"
-   "      (return (var_ref t))))\n"
-   "))\n"
-   "\n"
-   ""
-;
-static const char builtin_tan[] =
-   "((function tan\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float angle))\n"
-   "     ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 angle))\n"
-   "     ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 angle))\n"
-   "     ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 angle))\n"
-   "     ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_tanh[] =
-   "((function tanh\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float x))\n"
-   "     ((return (expression float /\n"
-   "                (expression float -\n"
-   "		  (expression float exp (var_ref x))\n"
-   "		  (expression float exp (expression float neg (var_ref x))))\n"
-   "                (expression float +\n"
-   "		  (expression float exp (var_ref x))\n"
-   "		  (expression float exp (expression float neg (var_ref x))))))))\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 x))\n"
-   "     ((return (expression vec2 /\n"
-   "                (expression vec2 -\n"
-   "		  (expression vec2 exp (var_ref x))\n"
-   "		  (expression vec2 exp (expression vec2 neg (var_ref x))))\n"
-   "                (expression vec2 +\n"
-   "		  (expression vec2 exp (var_ref x))\n"
-   "		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 x))\n"
-   "     ((return (expression vec3 /\n"
-   "                (expression vec3 -\n"
-   "		  (expression vec3 exp (var_ref x))\n"
-   "		  (expression vec3 exp (expression vec3 neg (var_ref x))))\n"
-   "                (expression vec3 +\n"
-   "		  (expression vec3 exp (var_ref x))\n"
-   "		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 x))\n"
-   "     ((return (expression vec4 /\n"
-   "                (expression vec4 -\n"
-   "		  (expression vec4 exp (var_ref x))\n"
-   "		  (expression vec4 exp (expression vec4 neg (var_ref x))))\n"
-   "                (expression vec4 +\n"
-   "		  (expression vec4 exp (var_ref x))\n"
-   "		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n"
-   "))\n"
-   ""
-;
-static const char builtin_texelFetch[] =
-   "((function texelFetch\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) int P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) int P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) int P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1DArray sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1DArray sampler)\n"
-   "       (declare (in) ivec2 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2DArray sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2DArray sampler)\n"
-   "       (declare (in) ivec3 P) \n"
-   "       (declare (in) int lod) )\n"
-   "     ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture[] =
-   "((function texture\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) float P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) float P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isamplerCube sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usamplerCube sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1D[] =
-   "((function texture1D\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1DArray[] =
-   "((function texture1DArray\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1DArrayLod[] =
-   "((function texture1DArrayLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1DLod[] =
-   "((function texture1DLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1DProj[] =
-   "((function texture1DProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture1DProjLod[] =
-   "((function texture1DProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2D[] =
-   "((function texture2D\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DArray[] =
-   "((function texture2DArray\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DArrayLod[] =
-   "((function texture2DArrayLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DLod[] =
-   "((function texture2DLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DProj[] =
-   "((function texture2DProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DProjLod[] =
-   "((function texture2DProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DRect[] =
-   "((function texture2DRect\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DRect sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture2DRectProj[] =
-   "((function texture2DRectProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DRect sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DRect sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture3D[] =
-   "((function texture3D\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture3DLod[] =
-   "((function texture3DLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture3DProj[] =
-   "((function texture3DProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_texture3DProjLod[] =
-   "((function texture3DProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureCube[] =
-   "((function textureCube\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureCubeLod[] =
-   "((function textureCubeLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureGrad[] =
-   "((function textureGrad\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureLod[] =
-   "((function textureLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) float P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) samplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usamplerCube sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1DArray sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2DArray sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureProj[] =
-   "((function textureProj\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec2 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec3 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec4 P) )\n"
-   "     ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float bias) )\n"
-   "     ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureProjGrad[] =
-   "((function textureProjGrad\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float dPdx) \n"
-   "       (declare (in) float dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec2 dPdx) \n"
-   "       (declare (in) vec2 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) vec3 dPdx) \n"
-   "       (declare (in) vec3 dPdy) )\n"
-   "     ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_textureProjLod[] =
-   "((function textureProjLod\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec2 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler1D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec3 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler2D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) sampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature ivec4\n"
-   "     (parameters\n"
-   "       (declare (in) isampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "   (signature uvec4\n"
-   "     (parameters\n"
-   "       (declare (in) usampler3D sampler)\n"
-   "       (declare (in) vec4 P) \n"
-   "       (declare (in) float lod) )\n"
-   "     ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
-   "\n"
-   "))\n"
-   ""
-;
-static const char builtin_transpose[] =
-   "((function transpose\n"
-   "   (signature mat2\n"
-   "     (parameters\n"
-   "       (declare (in) mat2 m))\n"
-   "     ((declare () mat2 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat3x2\n"
-   "     (parameters\n"
-   "       (declare (in) mat2x3 m))\n"
-   "     ((declare () mat3x2 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat4x2\n"
-   "     (parameters\n"
-   "       (declare (in) mat2x4 m))\n"
-   "     ((declare () mat4x2 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat2x3\n"
-   "     (parameters\n"
-   "       (declare (in) mat3x2 m))\n"
-   "     ((declare () mat2x3 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat3\n"
-   "     (parameters\n"
-   "       (declare (in) mat3 m))\n"
-   "     ((declare () mat3 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat4x3\n"
-   "     (parameters\n"
-   "       (declare (in) mat3x4 m))\n"
-   "     ((declare () mat4x3 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat2x4\n"
-   "     (parameters\n"
-   "       (declare (in) mat4x2 m))\n"
-   "     ((declare () mat2x4 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat3x4\n"
-   "     (parameters\n"
-   "       (declare (in) mat4x3 m))\n"
-   "     ((declare () mat3x4 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
-   "(return (var_ref t))))\n"
-   "\n"
-   "   (signature mat4\n"
-   "     (parameters\n"
-   "       (declare (in) mat4 m))\n"
-   "     ((declare () mat4 t)\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
-   "      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))\n"
-   "(return (var_ref t))))\n"
-   ")\n"
-   "\n"
-   ")\n"
-   "\n"
-   ""
-;
-static const char builtin_trunc[] =
-   "((function trunc\n"
-   "   (signature float\n"
-   "     (parameters\n"
-   "       (declare (in) float arg0))\n"
-   "     ((return (expression float trunc (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec2\n"
-   "     (parameters\n"
-   "       (declare (in) vec2 arg0))\n"
-   "     ((return (expression vec2 trunc (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec3\n"
-   "     (parameters\n"
-   "       (declare (in) vec3 arg0))\n"
-   "     ((return (expression vec3 trunc (var_ref arg0)))))\n"
-   "\n"
-   "   (signature vec4\n"
-   "     (parameters\n"
-   "       (declare (in) vec4 arg0))\n"
-   "     ((return (expression vec4 trunc (var_ref arg0)))))\n"
-   "))\n"
-   ""
-;
-static const char prototypes_for_100_frag[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())))"
-;
-static const char *functions_for_100_frag [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture2D,
-   builtin_texture2DProj,
-   builtin_textureCube,
-};
-static const char prototypes_for_100_vert[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture2DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function textureCubeLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())))"
-;
-static const char *functions_for_100_vert [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture2D,
-   builtin_texture2DLod,
-   builtin_texture2DProj,
-   builtin_texture2DProjLod,
-   builtin_textureCube,
-   builtin_textureCubeLod,
-};
-static const char prototypes_for_110_frag[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture3D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture3DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function dFdx\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function dFdy\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function fwidth\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function noise1\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise2\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise3\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise4\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())))"
-;
-static const char *functions_for_110_frag [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_dFdx,
-   builtin_dFdy,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_fwidth,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_shadow1D,
-   builtin_shadow1DProj,
-   builtin_shadow2D,
-   builtin_shadow2DProj,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture1D,
-   builtin_texture1DProj,
-   builtin_texture2D,
-   builtin_texture2DProj,
-   builtin_texture3D,
-   builtin_texture3DProj,
-   builtin_textureCube,
-};
-static const char prototypes_for_110_vert[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ftransform\n"
-   "  (signature vec4\n"
-   "    (parameters)\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord))\n"
-   "    ()))\n"
-   "(function texture1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture1DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture1DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture2DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture3D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function texture3DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture3DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture3DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function textureCubeLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow1DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow2DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow1DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow2DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function noise1\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise2\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise3\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise4\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())))"
-;
-static const char *functions_for_110_vert [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_ftransform,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_shadow1D,
-   builtin_shadow1DLod,
-   builtin_shadow1DProj,
-   builtin_shadow1DProjLod,
-   builtin_shadow2D,
-   builtin_shadow2DLod,
-   builtin_shadow2DProj,
-   builtin_shadow2DProjLod,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture1D,
-   builtin_texture1DLod,
-   builtin_texture1DProj,
-   builtin_texture1DProjLod,
-   builtin_texture2D,
-   builtin_texture2DLod,
-   builtin_texture2DProj,
-   builtin_texture2DProjLod,
-   builtin_texture3D,
-   builtin_texture3DLod,
-   builtin_texture3DProj,
-   builtin_texture3DProjLod,
-   builtin_textureCube,
-   builtin_textureCubeLod,
-};
-static const char prototypes_for_120_frag[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x3 x)\n"
-   "      (declare (in) mat2x3 y))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x4 x)\n"
-   "      (declare (in) mat2x4 y))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x2 x)\n"
-   "      (declare (in) mat3x2 y))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x4 x)\n"
-   "      (declare (in) mat3x4 y))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x2 x)\n"
-   "      (declare (in) mat4x2 y))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x3 x)\n"
-   "      (declare (in) mat4x3 y))\n"
-   "    ()))\n"
-   "(function outerProduct\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ()))\n"
-   "(function transpose\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 m))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 m))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 m))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x2 m))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x3 m))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x2 m))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x4 m))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x3 m))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x4 m))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture3D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture3DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function dFdx\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function dFdy\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function fwidth\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p))\n"
-   "    ()))\n"
-   "(function noise1\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise2\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise3\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise4\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())))"
-;
-static const char *functions_for_120_frag [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_dFdx,
-   builtin_dFdy,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_fwidth,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_outerProduct,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_shadow1D,
-   builtin_shadow1DProj,
-   builtin_shadow2D,
-   builtin_shadow2DProj,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture1D,
-   builtin_texture1DProj,
-   builtin_texture2D,
-   builtin_texture2DProj,
-   builtin_texture3D,
-   builtin_texture3DProj,
-   builtin_textureCube,
-   builtin_transpose,
-};
-static const char prototypes_for_120_vert[] =
-   "(\n"
-   "(function radians\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float degrees))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 degrees))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 degrees))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 degrees))\n"
-   "    ()))\n"
-   "(function degrees\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float radians))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 radians))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 radians))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 radians))\n"
-   "    ()))\n"
-   "(function sin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function cos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function tan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function asin\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function acos\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float angle))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 angle))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 angle))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 angle))\n"
-   "    ()))\n"
-   "(function atan\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float y_over_x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 y_over_x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 y_over_x))\n"
-   "    ()))\n"
-   "(function pow\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function exp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function exp2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function log2\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function inversesqrt\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function abs\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function sign\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function floor\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ceil\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function fract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function mod\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function min\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function max\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float y))\n"
-   "    ()))\n"
-   "(function clamp\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 minVal)\n"
-   "      (declare (in) vec2 maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 minVal)\n"
-   "      (declare (in) vec3 maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 minVal)\n"
-   "      (declare (in) vec4 maxVal))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) float minVal)\n"
-   "      (declare (in) float maxVal))\n"
-   "    ()))\n"
-   "(function mix\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) vec2 a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) vec3 a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) vec4 a))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y)\n"
-   "      (declare (in) float a))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y)\n"
-   "      (declare (in) float a))\n"
-   "    ()))\n"
-   "(function step\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function smoothstep\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 edge0)\n"
-   "      (declare (in) vec2 edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 edge0)\n"
-   "      (declare (in) vec3 edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 edge0)\n"
-   "      (declare (in) vec4 edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float edge0)\n"
-   "      (declare (in) float edge1)\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function length\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function distance\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float p0)\n"
-   "      (declare (in) float p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 p0)\n"
-   "      (declare (in) vec2 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 p0)\n"
-   "      (declare (in) vec3 p1))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 p0)\n"
-   "      (declare (in) vec4 p1))\n"
-   "    ()))\n"
-   "(function dot\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x)\n"
-   "      (declare (in) float y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ()))\n"
-   "(function cross\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ()))\n"
-   "(function normalize\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function ftransform\n"
-   "  (signature vec4\n"
-   "    (parameters)\n"
-   "    ()))\n"
-   "(function faceforward\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float Nref))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 Nref))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 Nref))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 Nref))\n"
-   "    ()))\n"
-   "(function reflect\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N))\n"
-   "    ()))\n"
-   "(function refract\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float I)\n"
-   "      (declare (in) float N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 I)\n"
-   "      (declare (in) vec2 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 I)\n"
-   "      (declare (in) vec3 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 I)\n"
-   "      (declare (in) vec4 N)\n"
-   "      (declare (in) float eta))\n"
-   "    ()))\n"
-   "(function matrixCompMult\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 x)\n"
-   "      (declare (in) mat2 y))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 x)\n"
-   "      (declare (in) mat3 y))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 x)\n"
-   "      (declare (in) mat4 y))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x3 x)\n"
-   "      (declare (in) mat2x3 y))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x4 x)\n"
-   "      (declare (in) mat2x4 y))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x2 x)\n"
-   "      (declare (in) mat3x2 y))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x4 x)\n"
-   "      (declare (in) mat3x4 y))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x2 x)\n"
-   "      (declare (in) mat4x2 y))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x3 x)\n"
-   "      (declare (in) mat4x3 y))\n"
-   "    ()))\n"
-   "(function outerProduct\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec2 r))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 c)\n"
-   "      (declare (in) vec3 r))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 c)\n"
-   "      (declare (in) vec4 r))\n"
-   "    ()))\n"
-   "(function transpose\n"
-   "  (signature mat2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2 m))\n"
-   "    ())\n"
-   "  (signature mat3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3 m))\n"
-   "    ())\n"
-   "  (signature mat4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4 m))\n"
-   "    ())\n"
-   "  (signature mat2x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x2 m))\n"
-   "    ())\n"
-   "  (signature mat3x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x3 m))\n"
-   "    ())\n"
-   "  (signature mat2x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x2 m))\n"
-   "    ())\n"
-   "  (signature mat4x2\n"
-   "    (parameters\n"
-   "      (declare (in) mat2x4 m))\n"
-   "    ())\n"
-   "  (signature mat3x4\n"
-   "    (parameters\n"
-   "      (declare (in) mat4x3 m))\n"
-   "    ())\n"
-   "  (signature mat4x3\n"
-   "    (parameters\n"
-   "      (declare (in) mat3x4 m))\n"
-   "    ()))\n"
-   "(function lessThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function lessThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThan\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function greaterThanEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ()))\n"
-   "(function equal\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function notEqual\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x)\n"
-   "      (declare (in) vec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x)\n"
-   "      (declare (in) vec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x)\n"
-   "      (declare (in) vec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) ivec2 x)\n"
-   "      (declare (in) ivec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) ivec3 x)\n"
-   "      (declare (in) ivec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) ivec4 x)\n"
-   "      (declare (in) ivec4 y))\n"
-   "    ())\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x)\n"
-   "      (declare (in) bvec2 y))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x)\n"
-   "      (declare (in) bvec3 y))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x)\n"
-   "      (declare (in) bvec4 y))\n"
-   "    ()))\n"
-   "(function any\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function all\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bool\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function not\n"
-   "  (signature bvec2\n"
-   "    (parameters\n"
-   "      (declare (in) bvec2 x))\n"
-   "    ())\n"
-   "  (signature bvec3\n"
-   "    (parameters\n"
-   "      (declare (in) bvec3 x))\n"
-   "    ())\n"
-   "  (signature bvec4\n"
-   "    (parameters\n"
-   "      (declare (in) bvec4 x))\n"
-   "    ()))\n"
-   "(function texture1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord))\n"
-   "    ()))\n"
-   "(function texture1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture1DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) float coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture1DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture2DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture3D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function texture3DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function texture3DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture3DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler3D sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function textureCube\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function textureCubeLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) samplerCube sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow1D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow2D\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow1DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow2DProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow1DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow2DLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow1DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow2DProjLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DShadow sampler)\n"
-   "      (declare (in) vec4 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function noise1\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature float\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise2\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec2\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise3\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec3\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ()))\n"
-   "(function noise4\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) float x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec2 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec3 x))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) vec4 x))\n"
-   "    ())))"
-;
-static const char *functions_for_120_vert [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_atan,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cross,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_ftransform,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_outerProduct,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_shadow1D,
-   builtin_shadow1DLod,
-   builtin_shadow1DProj,
-   builtin_shadow1DProjLod,
-   builtin_shadow2D,
-   builtin_shadow2DLod,
-   builtin_shadow2DProj,
-   builtin_shadow2DProjLod,
-   builtin_sign,
-   builtin_sin,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_texture1D,
-   builtin_texture1DLod,
-   builtin_texture1DProj,
-   builtin_texture1DProjLod,
-   builtin_texture2D,
-   builtin_texture2DLod,
-   builtin_texture2DProj,
-   builtin_texture2DProjLod,
-   builtin_texture3D,
-   builtin_texture3DLod,
-   builtin_texture3DProj,
-   builtin_texture3DProjLod,
-   builtin_textureCube,
-   builtin_textureCubeLod,
-   builtin_transpose,
-};
-static const char prototypes_for_130_frag[] =
-{'(',
-'(','f','u','n','c','t','i','o','n',' ','r','a','d','i','a','n','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','e','g','r','e','e','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','p','o','w',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','x','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','o','g',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','x','p','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','o','g','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','i','n','v','e','r','s','e','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','b','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','g','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','l','o','o','r',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','r','u','n','c',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d','E','v','e','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','e','i','l',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','o','d','f',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','f','l','o','a','t',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','2',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','3',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','4',' ','i',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','a','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','l','a','m','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','i','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','m','o','o','t','h','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','n','g','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','i','s','t','a','n','c','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','1',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','r','o','s','s',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','r','m','a','l','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','a','c','e','f','o','r','w','a','r','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N','r','e','f',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','e','f','l','e','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','e','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','a','t','r','i','x','C','o','m','p','M','u','l','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','o','u','t','e','r','P','r','o','d','u','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','r','a','n','s','p','o','s','e',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','m',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','t','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','n','y',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','F','d','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','F','d','y',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','w','i','d','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','1',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','2',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','3',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','4',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',')'} ;
-static const char *functions_for_130_frag [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_acosh,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_asinh,
-   builtin_atan,
-   builtin_atanh,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cosh,
-   builtin_cross,
-   builtin_dFdx,
-   builtin_dFdy,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_fwidth,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_modf,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_outerProduct,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_round,
-   builtin_roundEven,
-   builtin_shadow1D,
-   builtin_shadow1DLod,
-   builtin_shadow1DProj,
-   builtin_shadow1DProjLod,
-   builtin_shadow2D,
-   builtin_shadow2DLod,
-   builtin_shadow2DProj,
-   builtin_shadow2DProjLod,
-   builtin_sign,
-   builtin_sin,
-   builtin_sinh,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_tanh,
-   builtin_texelFetch,
-   builtin_texture,
-   builtin_texture1D,
-   builtin_texture1DLod,
-   builtin_texture1DProj,
-   builtin_texture1DProjLod,
-   builtin_texture2D,
-   builtin_texture2DLod,
-   builtin_texture2DProj,
-   builtin_texture2DProjLod,
-   builtin_texture3D,
-   builtin_texture3DLod,
-   builtin_texture3DProj,
-   builtin_texture3DProjLod,
-   builtin_textureCube,
-   builtin_textureCubeLod,
-   builtin_textureGrad,
-   builtin_textureLod,
-   builtin_textureProj,
-   builtin_textureProjGrad,
-   builtin_textureProjLod,
-   builtin_transpose,
-   builtin_trunc,
-};
-static const char prototypes_for_130_vert[] =
-{'(',
-'(','f','u','n','c','t','i','o','n',' ','r','a','d','i','a','n','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','e','g','r','e','e','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','p','o','w',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','x','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','o','g',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','x','p','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','o','g','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','i','n','v','e','r','s','e','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','b','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','i','g','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','l','o','o','r',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','r','u','n','c',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d','E','v','e','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','e','i','l',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','o','d','f',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','f','l','o','a','t',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','2',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','3',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','4',' ','i',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','a','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','l','a','m','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','i','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','m','o','o','t','h','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','n','g','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','i','s','t','a','n','c','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','1',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','d','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','c','r','o','s','s',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','r','m','a','l','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','t','r','a','n','s','f','o','r','m',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','f','a','c','e','f','o','r','w','a','r','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N','r','e','f',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','e','f','l','e','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','r','e','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','m','a','t','r','i','x','C','o','m','p','M','u','l','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','o','u','t','e','r','P','r','o','d','u','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','r','a','n','s','p','o','s','e',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','m',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','e','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','t','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','n','y',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','1',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','2',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','3',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','4',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',')'} ;
-static const char *functions_for_130_vert [] = {
-   builtin_abs,
-   builtin_acos,
-   builtin_acosh,
-   builtin_all,
-   builtin_any,
-   builtin_asin,
-   builtin_asinh,
-   builtin_atan,
-   builtin_atanh,
-   builtin_ceil,
-   builtin_clamp,
-   builtin_cos,
-   builtin_cosh,
-   builtin_cross,
-   builtin_degrees,
-   builtin_distance,
-   builtin_dot,
-   builtin_equal,
-   builtin_exp,
-   builtin_exp2,
-   builtin_faceforward,
-   builtin_floor,
-   builtin_fract,
-   builtin_ftransform,
-   builtin_greaterThan,
-   builtin_greaterThanEqual,
-   builtin_inversesqrt,
-   builtin_length,
-   builtin_lessThan,
-   builtin_lessThanEqual,
-   builtin_log,
-   builtin_log2,
-   builtin_matrixCompMult,
-   builtin_max,
-   builtin_min,
-   builtin_mix,
-   builtin_mod,
-   builtin_modf,
-   builtin_noise1,
-   builtin_noise2,
-   builtin_noise3,
-   builtin_noise4,
-   builtin_normalize,
-   builtin_not,
-   builtin_notEqual,
-   builtin_outerProduct,
-   builtin_pow,
-   builtin_radians,
-   builtin_reflect,
-   builtin_refract,
-   builtin_round,
-   builtin_roundEven,
-   builtin_shadow1D,
-   builtin_shadow1DLod,
-   builtin_shadow1DProj,
-   builtin_shadow1DProjLod,
-   builtin_shadow2D,
-   builtin_shadow2DLod,
-   builtin_shadow2DProj,
-   builtin_shadow2DProjLod,
-   builtin_sign,
-   builtin_sin,
-   builtin_sinh,
-   builtin_smoothstep,
-   builtin_sqrt,
-   builtin_step,
-   builtin_tan,
-   builtin_tanh,
-   builtin_texelFetch,
-   builtin_texture,
-   builtin_texture1D,
-   builtin_texture1DLod,
-   builtin_texture1DProj,
-   builtin_texture1DProjLod,
-   builtin_texture2D,
-   builtin_texture2DLod,
-   builtin_texture2DProj,
-   builtin_texture2DProjLod,
-   builtin_texture3D,
-   builtin_texture3DLod,
-   builtin_texture3DProj,
-   builtin_texture3DProjLod,
-   builtin_textureCube,
-   builtin_textureCubeLod,
-   builtin_textureGrad,
-   builtin_textureLod,
-   builtin_textureProj,
-   builtin_textureProjGrad,
-   builtin_textureProjLod,
-   builtin_transpose,
-   builtin_trunc,
-};
-static const char prototypes_for_ARB_texture_rectangle_frag[] =
-   "(\n"
-   "(function texture2DRect\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture2DRectProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow2DRect\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRectShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow2DRectProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRectShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())))"
-;
-static const char *functions_for_ARB_texture_rectangle_frag [] = {
-   builtin_shadow2DRect,
-   builtin_shadow2DRectProj,
-   builtin_texture2DRect,
-   builtin_texture2DRectProj,
-};
-static const char prototypes_for_ARB_texture_rectangle_vert[] =
-   "(\n"
-   "(function texture2DRect\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture2DRectProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRect sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ()))\n"
-   "(function shadow2DRect\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRectShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow2DRectProj\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DRectShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())))"
-;
-static const char *functions_for_ARB_texture_rectangle_vert [] = {
-   builtin_shadow2DRect,
-   builtin_shadow2DRectProj,
-   builtin_texture2DRect,
-   builtin_texture2DRectProj,
-};
-static const char prototypes_for_EXT_texture_array_frag[] =
-   "(\n"
-   "(function texture1DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArray sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArray sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function texture2DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArray sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArray sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow1DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArrayShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ())\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArrayShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float bias))\n"
-   "    ()))\n"
-   "(function shadow2DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArrayShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())))"
-;
-static const char *functions_for_EXT_texture_array_frag [] = {
-   builtin_shadow1DArray,
-   builtin_shadow2DArray,
-   builtin_texture1DArray,
-   builtin_texture2DArray,
-};
-static const char prototypes_for_EXT_texture_array_vert[] =
-   "(\n"
-   "(function texture1DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArray sampler)\n"
-   "      (declare (in) vec2 coord))\n"
-   "    ()))\n"
-   "(function texture1DArrayLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArray sampler)\n"
-   "      (declare (in) vec2 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function texture2DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArray sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function texture2DArrayLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArray sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow1DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArrayShadow sampler)\n"
-   "      (declare (in) vec3 coord))\n"
-   "    ()))\n"
-   "(function shadow1DArrayLod\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler1DArrayShadow sampler)\n"
-   "      (declare (in) vec3 coord)\n"
-   "      (declare (in) float lod))\n"
-   "    ()))\n"
-   "(function shadow2DArray\n"
-   "  (signature vec4\n"
-   "    (parameters\n"
-   "      (declare (in) sampler2DArrayShadow sampler)\n"
-   "      (declare (in) vec4 coord))\n"
-   "    ())))"
-;
-static const char *functions_for_EXT_texture_array_vert [] = {
-   builtin_shadow1DArray,
-   builtin_shadow1DArrayLod,
-   builtin_shadow2DArray,
-   builtin_texture1DArray,
-   builtin_texture1DArrayLod,
-   builtin_texture2DArray,
-   builtin_texture2DArrayLod,
-};
-static gl_shader *builtin_profiles[12];
-
-void *builtin_mem_ctx = NULL;
-
-void
-_mesa_glsl_release_functions(void)
-{
-   hieralloc_free(builtin_mem_ctx);
-   builtin_mem_ctx = NULL;
-   memset(builtin_profiles, 0, sizeof(builtin_profiles));
-}
-
-static void
-_mesa_read_profile(struct _mesa_glsl_parse_state *state,
-		   exec_list *instructions,
-                   int profile_index,
-		   const char *prototypes,
-		   const char **functions,
-                   int count)
-{
-   gl_shader *sh = builtin_profiles[profile_index];
-
-   if (sh == NULL) {
-      sh = read_builtins(state, GL_VERTEX_SHADER, prototypes, functions, count);
-      hieralloc_steal(builtin_mem_ctx, sh);
-      builtin_profiles[profile_index] = sh;
-   }
-
-   state->builtins_to_link[state->num_builtins_to_link] = sh;
-   state->num_builtins_to_link++;
-}
-
-void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-                                struct _mesa_glsl_parse_state *state)
-{
-   if (builtin_mem_ctx == NULL) {
-      builtin_mem_ctx = hieralloc_init("GLSL built-in functions");
-      memset(&builtin_profiles, 0, sizeof(builtin_profiles));
-   }
-
-   state->num_builtins_to_link = 0;
-
-   if (state->target == fragment_shader && state->language_version == 100) {
-      _mesa_read_profile(state, instructions, 0,
-                         prototypes_for_100_frag,
-                         functions_for_100_frag,
-                         Elements(functions_for_100_frag));
-   }
-
-   if (state->target == vertex_shader && state->language_version == 100) {
-      _mesa_read_profile(state, instructions, 1,
-                         prototypes_for_100_vert,
-                         functions_for_100_vert,
-                         Elements(functions_for_100_vert));
-   }
-
-   if (state->target == fragment_shader && state->language_version == 110) {
-      _mesa_read_profile(state, instructions, 2,
-                         prototypes_for_110_frag,
-                         functions_for_110_frag,
-                         Elements(functions_for_110_frag));
-   }
-
-   if (state->target == vertex_shader && state->language_version == 110) {
-      _mesa_read_profile(state, instructions, 3,
-                         prototypes_for_110_vert,
-                         functions_for_110_vert,
-                         Elements(functions_for_110_vert));
-   }
-
-   if (state->target == fragment_shader && state->language_version == 120) {
-      _mesa_read_profile(state, instructions, 4,
-                         prototypes_for_120_frag,
-                         functions_for_120_frag,
-                         Elements(functions_for_120_frag));
-   }
-
-   if (state->target == vertex_shader && state->language_version == 120) {
-      _mesa_read_profile(state, instructions, 5,
-                         prototypes_for_120_vert,
-                         functions_for_120_vert,
-                         Elements(functions_for_120_vert));
-   }
-
-   if (state->target == fragment_shader && state->language_version == 130) {
-      _mesa_read_profile(state, instructions, 6,
-                         prototypes_for_130_frag,
-                         functions_for_130_frag,
-                         Elements(functions_for_130_frag));
-   }
-
-   if (state->target == vertex_shader && state->language_version == 130) {
-      _mesa_read_profile(state, instructions, 7,
-                         prototypes_for_130_vert,
-                         functions_for_130_vert,
-                         Elements(functions_for_130_vert));
-   }
-
-   if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
-      _mesa_read_profile(state, instructions, 8,
-                         prototypes_for_ARB_texture_rectangle_frag,
-                         functions_for_ARB_texture_rectangle_frag,
-                         Elements(functions_for_ARB_texture_rectangle_frag));
-   }
-
-   if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
-      _mesa_read_profile(state, instructions, 9,
-                         prototypes_for_ARB_texture_rectangle_vert,
-                         functions_for_ARB_texture_rectangle_vert,
-                         Elements(functions_for_ARB_texture_rectangle_vert));
-   }
-
-   if (state->target == fragment_shader && state->EXT_texture_array_enable) {
-      _mesa_read_profile(state, instructions, 10,
-                         prototypes_for_EXT_texture_array_frag,
-                         functions_for_EXT_texture_array_frag,
-                         Elements(functions_for_EXT_texture_array_frag));
-   }
-
-   if (state->target == vertex_shader && state->EXT_texture_array_enable) {
-      _mesa_read_profile(state, instructions, 11,
-                         prototypes_for_EXT_texture_array_vert,
-                         functions_for_EXT_texture_array_vert,
-                         Elements(functions_for_EXT_texture_array_vert));
-   }
-
-}
diff --git a/src/glsl/builtin_types.h b/src/glsl/builtin_types.h
deleted file mode 100644
index 443ae16..0000000
--- a/src/glsl/builtin_types.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-const glsl_type glsl_type::_error_type =
-   glsl_type(GL_INVALID_ENUM, GLSL_TYPE_ERROR, 0, 0, "");
-
-const glsl_type glsl_type::void_type =
-   glsl_type(GL_INVALID_ENUM, GLSL_TYPE_VOID, 0, 0, "void");
-
-const glsl_type *const glsl_type::error_type = & glsl_type::_error_type;
-
-/** \name Core built-in types
- *
- * These types exist in all versions of GLSL.
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_core_types[] = {
-   glsl_type(GL_BOOL,         GLSL_TYPE_BOOL, 1, 1, "bool"),
-   glsl_type(GL_BOOL_VEC2,    GLSL_TYPE_BOOL, 2, 1, "bvec2"),
-   glsl_type(GL_BOOL_VEC3,    GLSL_TYPE_BOOL, 3, 1, "bvec3"),
-   glsl_type(GL_BOOL_VEC4,    GLSL_TYPE_BOOL, 4, 1, "bvec4"),
-   glsl_type(GL_INT,          GLSL_TYPE_INT, 1, 1, "int"),
-   glsl_type(GL_INT_VEC2,     GLSL_TYPE_INT, 2, 1, "ivec2"),
-   glsl_type(GL_INT_VEC3,     GLSL_TYPE_INT, 3, 1, "ivec3"),
-   glsl_type(GL_INT_VEC4,     GLSL_TYPE_INT, 4, 1, "ivec4"),
-   glsl_type(GL_FLOAT,        GLSL_TYPE_FLOAT, 1, 1, "float"),
-   glsl_type(GL_FLOAT_VEC2,   GLSL_TYPE_FLOAT, 2, 1, "vec2"),
-   glsl_type(GL_FLOAT_VEC3,   GLSL_TYPE_FLOAT, 3, 1, "vec3"),
-   glsl_type(GL_FLOAT_VEC4,   GLSL_TYPE_FLOAT, 4, 1, "vec4"),
-   glsl_type(GL_FLOAT_MAT2,   GLSL_TYPE_FLOAT, 2, 2, "mat2"),
-   glsl_type(GL_FLOAT_MAT3,   GLSL_TYPE_FLOAT, 3, 3, "mat3"),
-   glsl_type(GL_FLOAT_MAT4,   GLSL_TYPE_FLOAT, 4, 4, "mat4"),
-   glsl_type(GL_SAMPLER_2D,   GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_FLOAT,
-	     "sampler2D"),
-   glsl_type(GL_SAMPLER_CUBE, GLSL_SAMPLER_DIM_CUBE, 0, 0, GLSL_TYPE_FLOAT,
-	     "samplerCube"),
-};
-
-const glsl_type *const glsl_type::bool_type  = & builtin_core_types[0];
-const glsl_type *const glsl_type::int_type   = & builtin_core_types[4];
-const glsl_type *const glsl_type::ivec4_type = & builtin_core_types[7];
-const glsl_type *const glsl_type::float_type = & builtin_core_types[8];
-const glsl_type *const glsl_type::vec2_type = & builtin_core_types[9];
-const glsl_type *const glsl_type::vec3_type = & builtin_core_types[10];
-const glsl_type *const glsl_type::vec4_type = & builtin_core_types[11];
-const glsl_type *const glsl_type::mat2_type = & builtin_core_types[12];
-const glsl_type *const glsl_type::mat3_type = & builtin_core_types[13];
-const glsl_type *const glsl_type::mat4_type = & builtin_core_types[14];
-/*@}*/
-
-/** \name GLSL structures that have not been deprecated.
- */
-/*@{*/
-
-static const struct glsl_struct_field gl_DepthRangeParameters_fields[] = {
-   { glsl_type::float_type, "near" },
-   { glsl_type::float_type, "far" },
-   { glsl_type::float_type, "diff" },
-};
-
-const glsl_type glsl_type::builtin_structure_types[] = {
-   glsl_type(gl_DepthRangeParameters_fields,
-             Elements(gl_DepthRangeParameters_fields),
-             "gl_DepthRangeParameters"),
-};
-/*@}*/
-
-/** \name GLSL 1.00 / 1.10 structures that are deprecated in GLSL 1.30
- */
-/*@{*/
-
-static const struct glsl_struct_field gl_PointParameters_fields[] = {
-   { glsl_type::float_type, "size" },
-   { glsl_type::float_type, "sizeMin" },
-   { glsl_type::float_type, "sizeMax" },
-   { glsl_type::float_type, "fadeThresholdSize" },
-   { glsl_type::float_type, "distanceConstantAttenuation" },
-   { glsl_type::float_type, "distanceLinearAttenuation" },
-   { glsl_type::float_type, "distanceQuadraticAttenuation" },
-};
-
-static const struct glsl_struct_field gl_MaterialParameters_fields[] = {
-   { glsl_type::vec4_type, "emission" },
-   { glsl_type::vec4_type, "ambient" },
-   { glsl_type::vec4_type, "diffuse" },
-   { glsl_type::vec4_type, "specular" },
-   { glsl_type::float_type, "shininess" },
-};
-
-static const struct glsl_struct_field gl_LightSourceParameters_fields[] = {
-   { glsl_type::vec4_type, "ambient" },
-   { glsl_type::vec4_type, "diffuse" },
-   { glsl_type::vec4_type, "specular" },
-   { glsl_type::vec4_type, "position" },
-   { glsl_type::vec4_type, "halfVector" },
-   { glsl_type::vec3_type, "spotDirection" },
-   { glsl_type::float_type, "spotExponent" },
-   { glsl_type::float_type, "spotCutoff" },
-   { glsl_type::float_type, "spotCosCutoff" },
-   { glsl_type::float_type, "constantAttenuation" },
-   { glsl_type::float_type, "linearAttenuation" },
-   { glsl_type::float_type, "quadraticAttenuation" },
-};
-
-static const struct glsl_struct_field gl_LightModelParameters_fields[] = {
-   { glsl_type::vec4_type, "ambient" },
-};
-
-static const struct glsl_struct_field gl_LightModelProducts_fields[] = {
-   { glsl_type::vec4_type, "sceneColor" },
-};
-
-static const struct glsl_struct_field gl_LightProducts_fields[] = {
-   { glsl_type::vec4_type, "ambient" },
-   { glsl_type::vec4_type, "diffuse" },
-   { glsl_type::vec4_type, "specular" },
-};
-
-static const struct glsl_struct_field gl_FogParameters_fields[] = {
-   { glsl_type::vec4_type, "color" },
-   { glsl_type::float_type, "density" },
-   { glsl_type::float_type, "start" },
-   { glsl_type::float_type, "end" },
-   { glsl_type::float_type, "scale" },
-};
-
-const glsl_type glsl_type::builtin_110_deprecated_structure_types[] = {
-   glsl_type(gl_PointParameters_fields,
-             Elements(gl_PointParameters_fields),
-             "gl_PointParameters"),
-   glsl_type(gl_MaterialParameters_fields,
-             Elements(gl_MaterialParameters_fields),
-             "gl_MaterialParameters"),
-   glsl_type(gl_LightSourceParameters_fields,
-             Elements(gl_LightSourceParameters_fields),
-             "gl_LightSourceParameters"),
-   glsl_type(gl_LightModelParameters_fields,
-             Elements(gl_LightModelParameters_fields),
-             "gl_LightModelParameters"),
-   glsl_type(gl_LightModelProducts_fields,
-             Elements(gl_LightModelProducts_fields),
-             "gl_LightModelProducts"),
-   glsl_type(gl_LightProducts_fields,
-             Elements(gl_LightProducts_fields),
-             "gl_LightProducts"),
-   glsl_type(gl_FogParameters_fields,
-             Elements(gl_FogParameters_fields),
-             "gl_FogParameters"),
-};
-/*@}*/
-
-/** \name Types in GLSL 1.10 (but not GLSL ES 1.00)
- */
-/*@{*/
-const glsl_type glsl_type::builtin_110_types[] = {
-   glsl_type(GL_SAMPLER_1D,   GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_FLOAT,
-	     "sampler1D"),
-   glsl_type(GL_SAMPLER_1D_SHADOW, GLSL_SAMPLER_DIM_1D, 1, 0, GLSL_TYPE_FLOAT,
-	     "sampler1DShadow"),
-   glsl_type(GL_SAMPLER_2D_SHADOW, GLSL_SAMPLER_DIM_2D, 1, 0, GLSL_TYPE_FLOAT,
-	     "sampler2DShadow"),
-   glsl_type(GL_SAMPLER_3D,   GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
-	     "sampler3D"),
-};
-/*@}*/
-
-/** \name Types added in GLSL 1.20
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_120_types[] = {
-   glsl_type(GL_FLOAT_MAT2x3, GLSL_TYPE_FLOAT, 3, 2, "mat2x3"),
-   glsl_type(GL_FLOAT_MAT2x4, GLSL_TYPE_FLOAT, 4, 2, "mat2x4"),
-   glsl_type(GL_FLOAT_MAT3x2, GLSL_TYPE_FLOAT, 2, 3, "mat3x2"),
-   glsl_type(GL_FLOAT_MAT3x4, GLSL_TYPE_FLOAT, 4, 3, "mat3x4"),
-   glsl_type(GL_FLOAT_MAT4x2, GLSL_TYPE_FLOAT, 2, 4, "mat4x2"),
-   glsl_type(GL_FLOAT_MAT4x3, GLSL_TYPE_FLOAT, 3, 4, "mat4x3"),
-};
-const glsl_type *const glsl_type::mat2x3_type = & builtin_120_types[0];
-const glsl_type *const glsl_type::mat2x4_type = & builtin_120_types[1];
-const glsl_type *const glsl_type::mat3x2_type = & builtin_120_types[2];
-const glsl_type *const glsl_type::mat3x4_type = & builtin_120_types[3];
-const glsl_type *const glsl_type::mat4x2_type = & builtin_120_types[4];
-const glsl_type *const glsl_type::mat4x3_type = & builtin_120_types[5];
-/*@}*/
-
-/** \name Types added in GLSL 1.30
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_130_types[] = {
-   glsl_type(GL_UNSIGNED_INT,      GLSL_TYPE_UINT, 1, 1, "uint"),
-   glsl_type(GL_UNSIGNED_INT_VEC2, GLSL_TYPE_UINT, 2, 1, "uvec2"),
-   glsl_type(GL_UNSIGNED_INT_VEC3, GLSL_TYPE_UINT, 3, 1, "uvec3"),
-   glsl_type(GL_UNSIGNED_INT_VEC4, GLSL_TYPE_UINT, 4, 1, "uvec4"),
-
-   /* 1D and 2D texture arrays - several of these are included only in
-    * builtin_EXT_texture_array_types.
-    */
-   glsl_type(GL_INT_SAMPLER_1D_ARRAY,
-	     GLSL_SAMPLER_DIM_1D, 0, 1,   GLSL_TYPE_INT, "isampler1DArray"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_1D_ARRAY,
-	     GLSL_SAMPLER_DIM_1D, 0, 1,  GLSL_TYPE_UINT, "usampler1DArray"),
-   glsl_type(GL_INT_SAMPLER_2D_ARRAY,
-	     GLSL_SAMPLER_DIM_2D, 0, 1,   GLSL_TYPE_INT, "isampler2DArray"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_2D_ARRAY,
-	     GLSL_SAMPLER_DIM_2D, 0, 1,  GLSL_TYPE_UINT, "usampler2DArray"),
-
-   /* cube shadow samplers */
-   glsl_type(GL_SAMPLER_CUBE_SHADOW,
-	     GLSL_SAMPLER_DIM_CUBE, 1, 0, GLSL_TYPE_FLOAT, "samplerCubeShadow"),
-
-   /* signed and unsigned integer samplers */
-   glsl_type(GL_INT_SAMPLER_1D,
-	     GLSL_SAMPLER_DIM_1D, 0, 0,   GLSL_TYPE_INT, "isampler1D"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_1D,
-	     GLSL_SAMPLER_DIM_1D, 0, 0,  GLSL_TYPE_UINT, "usampler1D"),
-   glsl_type(GL_INT_SAMPLER_2D,
-	     GLSL_SAMPLER_DIM_2D, 0, 0,   GLSL_TYPE_INT, "isampler2D"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_2D,
-	     GLSL_SAMPLER_DIM_2D, 0, 0,  GLSL_TYPE_UINT, "usampler2D"),
-   glsl_type(GL_INT_SAMPLER_3D,
-	     GLSL_SAMPLER_DIM_3D, 0, 0,   GLSL_TYPE_INT, "isampler3D"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_3D,
-	     GLSL_SAMPLER_DIM_3D, 0, 0,  GLSL_TYPE_UINT, "usampler3D"),
-   glsl_type(GL_INT_SAMPLER_CUBE,
-	     GLSL_SAMPLER_DIM_CUBE, 0, 0,   GLSL_TYPE_INT, "isamplerCube"),
-   glsl_type(GL_INT_SAMPLER_CUBE,
-	     GLSL_SAMPLER_DIM_CUBE, 0, 0,  GLSL_TYPE_UINT, "usamplerCube"),
-};
-
-const glsl_type *const glsl_type::uint_type = & builtin_130_types[0];
-const glsl_type *const glsl_type::uvec2_type = & builtin_130_types[1];
-const glsl_type *const glsl_type::uvec3_type = & builtin_130_types[2];
-const glsl_type *const glsl_type::uvec4_type = & builtin_130_types[3];
-/*@}*/
-
-/** \name Sampler types added by GL_ARB_texture_rectangle
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_ARB_texture_rectangle_types[] = {
-   glsl_type(GL_SAMPLER_2D_RECT,
-	     GLSL_SAMPLER_DIM_RECT, 0, 0, GLSL_TYPE_FLOAT, "sampler2DRect"),
-   glsl_type(GL_SAMPLER_2D_RECT_SHADOW,
-	     GLSL_SAMPLER_DIM_RECT, 1, 0, GLSL_TYPE_FLOAT, "sampler2DRectShadow"),
-};
-/*@}*/
-
-/** \name Sampler types added by GL_EXT_texture_array
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_EXT_texture_array_types[] = {
-   glsl_type(GL_SAMPLER_1D_ARRAY,
-	     GLSL_SAMPLER_DIM_1D, 0, 1, GLSL_TYPE_FLOAT, "sampler1DArray"),
-   glsl_type(GL_SAMPLER_2D_ARRAY,
-	     GLSL_SAMPLER_DIM_2D, 0, 1, GLSL_TYPE_FLOAT, "sampler2DArray"),
-   glsl_type(GL_SAMPLER_1D_ARRAY_SHADOW,
-	     GLSL_SAMPLER_DIM_1D, 1, 1, GLSL_TYPE_FLOAT, "sampler1DArrayShadow"),
-   glsl_type(GL_SAMPLER_2D_ARRAY_SHADOW,
-	     GLSL_SAMPLER_DIM_2D, 1, 1, GLSL_TYPE_FLOAT, "sampler2DArrayShadow"),
-};
-/*@}*/
-
-/** \name Sampler types added by GL_EXT_texture_buffer_object
- */
-/*@{*/
-
-const glsl_type glsl_type::builtin_EXT_texture_buffer_object_types[] = {
-   glsl_type(GL_SAMPLER_BUFFER,
-	     GLSL_SAMPLER_DIM_BUF, 0, 0, GLSL_TYPE_FLOAT, "samplerBuffer"),
-   glsl_type(GL_INT_SAMPLER_BUFFER,
-	     GLSL_SAMPLER_DIM_BUF, 0, 0,   GLSL_TYPE_INT, "isamplerBuffer"),
-   glsl_type(GL_UNSIGNED_INT_SAMPLER_BUFFER,
-	     GLSL_SAMPLER_DIM_BUF, 0, 0,  GLSL_TYPE_UINT, "usamplerBuffer"),
-};
-/*@}*/
diff --git a/src/glsl/builtin_variables.h b/src/glsl/builtin_variables.h
deleted file mode 100644
index a34c67e..0000000
--- a/src/glsl/builtin_variables.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "main/core.h" /* for slot numbers */
-
-struct builtin_variable {
-   enum ir_variable_mode mode;
-   int slot;
-   const char *type;
-   const char *name;
-};
-
-static const builtin_variable builtin_core_vs_variables[] = {
-   { ir_var_out, VERT_RESULT_HPOS, "vec4",  "gl_Position" },
-   { ir_var_out, VERT_RESULT_PSIZ, "float", "gl_PointSize" },
-};
-
-static const builtin_variable builtin_core_fs_variables[] = {
-   { ir_var_in,  FRAG_ATTRIB_WPOS,  "vec4",  "gl_FragCoord" },
-   { ir_var_in,  FRAG_ATTRIB_FACE,  "bool",  "gl_FrontFacing" },
-   { ir_var_out, FRAG_RESULT_COLOR, "vec4",  "gl_FragColor" },
-};
-
-static const builtin_variable builtin_100ES_fs_variables[] = {
-   { ir_var_in,  FRAG_ATTRIB_PNTC,   "vec2",   "gl_PointCoord" },
-};
-
-static const builtin_variable builtin_110_fs_variables[] = {
-   { ir_var_out, FRAG_RESULT_DEPTH, "float", "gl_FragDepth" },
-};
-
-static const builtin_variable builtin_110_deprecated_fs_variables[] = {
-   { ir_var_in,  FRAG_ATTRIB_COL0,  "vec4",  "gl_Color" },
-   { ir_var_in,  FRAG_ATTRIB_COL1,  "vec4",  "gl_SecondaryColor" },
-   { ir_var_in,  FRAG_ATTRIB_FOGC,  "float", "gl_FogFragCoord" },
-};
-
-static const builtin_variable builtin_110_deprecated_vs_variables[] = {
-   { ir_var_in,  VERT_ATTRIB_POS,    "vec4",  "gl_Vertex" },
-   { ir_var_in,  VERT_ATTRIB_NORMAL, "vec3",  "gl_Normal" },
-   { ir_var_in,  VERT_ATTRIB_COLOR0, "vec4",  "gl_Color" },
-   { ir_var_in,  VERT_ATTRIB_COLOR1, "vec4",  "gl_SecondaryColor" },
-   { ir_var_in,  VERT_ATTRIB_TEX0,   "vec4",  "gl_MultiTexCoord0" },
-   { ir_var_in,  VERT_ATTRIB_TEX1,   "vec4",  "gl_MultiTexCoord1" },
-   { ir_var_in,  VERT_ATTRIB_TEX2,   "vec4",  "gl_MultiTexCoord2" },
-   { ir_var_in,  VERT_ATTRIB_TEX3,   "vec4",  "gl_MultiTexCoord3" },
-   { ir_var_in,  VERT_ATTRIB_TEX4,   "vec4",  "gl_MultiTexCoord4" },
-   { ir_var_in,  VERT_ATTRIB_TEX5,   "vec4",  "gl_MultiTexCoord5" },
-   { ir_var_in,  VERT_ATTRIB_TEX6,   "vec4",  "gl_MultiTexCoord6" },
-   { ir_var_in,  VERT_ATTRIB_TEX7,   "vec4",  "gl_MultiTexCoord7" },
-   { ir_var_in,  VERT_ATTRIB_FOG,    "float", "gl_FogCoord" },
-   { ir_var_out, VERT_RESULT_HPOS,   "vec4",  "gl_ClipVertex" },
-   { ir_var_out, VERT_RESULT_COL0,   "vec4",  "gl_FrontColor" },
-   { ir_var_out, VERT_RESULT_BFC0,   "vec4",  "gl_BackColor" },
-   { ir_var_out, VERT_RESULT_COL1,   "vec4",  "gl_FrontSecondaryColor" },
-   { ir_var_out, VERT_RESULT_BFC1,   "vec4",  "gl_BackSecondaryColor" },
-   { ir_var_out, VERT_RESULT_FOGC,   "float", "gl_FogFragCoord" },
-};
-
-static const builtin_variable builtin_120_fs_variables[] = {
-   { ir_var_in,  FRAG_ATTRIB_PNTC,   "vec2",   "gl_PointCoord" },
-};
-
-static const builtin_variable builtin_130_vs_variables[] = {
-   { ir_var_in,  -1,                 "int",   "gl_VertexID" },
-};
-
-static const builtin_variable builtin_110_deprecated_uniforms[] = {
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrix" },
-   { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrix" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrix" },
-   { ir_var_uniform, -1, "mat3", "gl_NormalMatrix" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixInverse" },
-   { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixInverse" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixInverse" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixTranspose" },
-   { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixTranspose" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixTranspose" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixInverseTranspose" },
-   { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixInverseTranspose" },
-   { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixInverseTranspose" },
-   { ir_var_uniform, -1, "float", "gl_NormalScale" },
-   { ir_var_uniform, -1, "gl_LightModelParameters", "gl_LightModel"},
-};
-
diff --git a/src/glsl/builtins/ir/abs b/src/glsl/builtins/ir/abs
deleted file mode 100644
index 9048453..0000000
--- a/src/glsl/builtins/ir/abs
+++ /dev/null
@@ -1,21 +0,0 @@
-((function abs
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float abs (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 abs (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 abs (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 abs (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/acos b/src/glsl/builtins/ir/acos
deleted file mode 100644
index d1cfebe..0000000
--- a/src/glsl/builtins/ir/acos
+++ /dev/null
@@ -1,22 +0,0 @@
-((function acos
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float - (constant float (1.5707963))
-                                  (call asin ((var_ref x)))))))
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 - (constant float (1.5707963))
-                                 (call asin ((var_ref x)))))))
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 - (constant float (1.5707963))
-                                 (call asin ((var_ref x)))))))
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 - (constant float (1.5707963))
-                                 (call asin ((var_ref x)))))))
-))
diff --git a/src/glsl/builtins/ir/acosh b/src/glsl/builtins/ir/acosh
deleted file mode 100644
index 5518e75..0000000
--- a/src/glsl/builtins/ir/acosh
+++ /dev/null
@@ -1,21 +0,0 @@
-((function acosh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float - (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 - (expression vec2 * (var_ref x) (var_ref x)) (constant vec2 (1)))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 - (expression vec3 * (var_ref x) (var_ref x)) (constant vec3 (1)))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 - (expression vec4 * (var_ref x) (var_ref x)) (constant vec4 (1)))))))))
-))
diff --git a/src/glsl/builtins/ir/all b/src/glsl/builtins/ir/all
deleted file mode 100644
index 2cac0df..0000000
--- a/src/glsl/builtins/ir/all
+++ /dev/null
@@ -1,16 +0,0 @@
-((function all
-   (signature bool
-     (parameters
-       (declare (in) bvec2 arg0))
-     ((return (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))
-
-   (signature bool
-     (parameters
-       (declare (in) bvec3 arg0))
-     ((return (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))
-
-   (signature bool
-     (parameters
-       (declare (in) bvec4 arg0))
-     ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))
-))
diff --git a/src/glsl/builtins/ir/any b/src/glsl/builtins/ir/any
deleted file mode 100644
index cc6038a..0000000
--- a/src/glsl/builtins/ir/any
+++ /dev/null
@@ -1,16 +0,0 @@
-((function any
-   (signature bool
-     (parameters
-       (declare (in) bvec2 arg0))
-     ((return (expression bool any (var_ref arg0)))))
-
-   (signature bool
-     (parameters
-       (declare (in) bvec3 arg0))
-     ((return (expression bool any (var_ref arg0)))))
-
-   (signature bool
-     (parameters
-       (declare (in) bvec4 arg0))
-     ((return (expression bool any (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/asin b/src/glsl/builtins/ir/asin
deleted file mode 100644
index e230ad6..0000000
--- a/src/glsl/builtins/ir/asin
+++ /dev/null
@@ -1,97 +0,0 @@
-((function asin
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float *
-	       (expression float sign (var_ref x))
-	       (expression float -
-		(expression float *
-		 (constant float (3.1415926))
-		 (constant float (0.5)))
-		(expression float *
-		 (expression float sqrt
-		  (expression float -
-		   (constant float (1.0))
-		   (expression float abs (var_ref x))))
-		 (expression float +
-		  (constant float (1.5707288))
-		  (expression float *
-		   (expression float abs (var_ref x))
-		   (expression float +
-		    (constant float (-0.2121144))
-		    (expression float *
-		     (constant float (0.0742610))
-		     (expression float abs (var_ref x))))))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 *
-	       (expression vec2 sign (var_ref x))
-	       (expression vec2 -
-		(expression float *
-		 (constant float (3.1415926))
-		 (constant float (0.5)))
-		(expression vec2 *
-		 (expression vec2 sqrt
-		  (expression vec2 -
-		   (constant float (1.0))
-		   (expression vec2 abs (var_ref x))))
-		 (expression vec2 +
-		  (constant float (1.5707288))
-		  (expression vec2 *
-		   (expression vec2 abs (var_ref x))
-		   (expression vec2 +
-		    (constant float (-0.2121144))
-		    (expression vec2 *
-		     (constant float (0.0742610))
-		     (expression vec2 abs (var_ref x))))))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 *
-	       (expression vec3 sign (var_ref x))
-	       (expression vec3 -
-		(expression float *
-		 (constant float (3.1415926))
-		 (constant float (0.5)))
-		(expression vec3 *
-		 (expression vec3 sqrt
-		  (expression vec3 -
-		   (constant float (1.0))
-		   (expression vec3 abs (var_ref x))))
-		 (expression vec3 +
-		  (constant float (1.5707288))
-		  (expression vec3 *
-		   (expression vec3 abs (var_ref x))
-		   (expression vec3 +
-		    (constant float (-0.2121144))
-		    (expression vec3 *
-		     (constant float (0.0742610))
-		     (expression vec3 abs (var_ref x))))))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 *
-	       (expression vec4 sign (var_ref x))
-	       (expression vec4 -
-		(expression float *
-		 (constant float (3.1415926))
-		 (constant float (0.5)))
-		(expression vec4 *
-		 (expression vec4 sqrt
-		  (expression vec4 -
-		   (constant float (1.0))
-		   (expression vec4 abs (var_ref x))))
-		 (expression vec4 +
-		  (constant float (1.5707288))
-		  (expression vec4 *
-		   (expression vec4 abs (var_ref x))
-		   (expression vec4 +
-		    (constant float (-0.2121144))
-		    (expression vec4 *
-		     (constant float (0.0742610))
-		     (expression vec4 abs (var_ref x))))))))))))
-))
diff --git a/src/glsl/builtins/ir/asinh b/src/glsl/builtins/ir/asinh
deleted file mode 100644
index cdc2c20..0000000
--- a/src/glsl/builtins/ir/asinh
+++ /dev/null
@@ -1,21 +0,0 @@
-((function asinh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float + (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 + (expression vec2 * (var_ref x) (var_ref x)) (constant vec2 (1)))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 + (expression vec3 * (var_ref x) (var_ref x)) (constant vec3 (1)))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 + (expression vec4 * (var_ref x) (var_ref x)) (constant vec4 (1)))))))))
-))
diff --git a/src/glsl/builtins/ir/atan b/src/glsl/builtins/ir/atan
deleted file mode 100644
index 3f97e0d..0000000
--- a/src/glsl/builtins/ir/atan
+++ /dev/null
@@ -1,126 +0,0 @@
-((function atan
-   (signature float
-     (parameters
-       (declare (in) float y_over_x))
-     ((return (call asin ((expression float *
-			   (var_ref y_over_x)
-			   (expression float rsq
-			    (expression float +
-			     (expression float *
-			      (var_ref y_over_x)
-			      (var_ref y_over_x))
-			     (constant float (1.0))))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 y_over_x))
-     ((return (call asin ((expression vec2 *
-			   (var_ref y_over_x)
-			   (expression vec2 rsq
-			    (expression vec2 +
-			     (expression vec2 *
-			      (var_ref y_over_x)
-			      (var_ref y_over_x))
-			     (constant float (1.0))))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 y_over_x))
-     ((return (call asin ((expression vec3 *
-			   (var_ref y_over_x)
-			   (expression vec3 rsq
-			    (expression vec3 +
-			     (expression vec3 *
-			      (var_ref y_over_x)
-			      (var_ref y_over_x))
-			     (constant float (1.0))))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 y_over_x))
-     ((return (call asin ((expression vec4 *
-			   (var_ref y_over_x)
-			   (expression vec4 rsq
-			    (expression vec4 +
-			     (expression vec4 *
-			      (var_ref y_over_x)
-			      (var_ref y_over_x))
-			     (constant float (1.0))))))))))
-
-  (signature float
-    (parameters
-      (declare (in ) float y)
-      (declare (in ) float x)
-    )
-    (
-      (declare () float r)
-      (if (expression bool > (expression float abs (var_ref x)) (constant float (0.000100))) (
-        (assign (constant bool (1)) (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
-        (if (expression bool < (var_ref x) (constant float (0.000000)) ) (
-          (if (expression bool >= (var_ref y) (constant float (0.000000)) )
-              ((assign (constant bool (1)) (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
-              ((assign (constant bool (1)) (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
-        )
-        (
-        ))
-      )
-      (
-        (declare () float sgn)
-        (assign (constant bool (1)) (x) (var_ref sgn) (expression float sign (var_ref y)))
-        (assign (constant bool (1)) (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
-      ))
-
-      (return (var_ref r) )
-    ))
-
-
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 y)
-       (declare (in) vec2 x))
-     ((declare () vec2 r)
-      (assign (constant bool (1)) (x) (var_ref r)
-	      (call atan ((swiz x (var_ref y))
-			  (swiz x (var_ref x)))))
-      (assign (constant bool (1)) (y) (var_ref r)
-	      (call atan ((swiz y (var_ref y))
-			  (swiz y (var_ref x)))))
-      (return (var_ref r))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 y)
-       (declare (in) vec3 x))
-     ((declare () vec3 r)
-      (assign (constant bool (1)) (x) (var_ref r)
-	      (call atan ((swiz x (var_ref y))
-			  (swiz x (var_ref x)))))
-      (assign (constant bool (1)) (y) (var_ref r)
-	      (call atan ((swiz y (var_ref y))
-			  (swiz y (var_ref x)))))
-      (assign (constant bool (1)) (z) (var_ref r)
-	      (call atan ((swiz z (var_ref y))
-			  (swiz z (var_ref x)))))
-      (return (var_ref r))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 y)
-       (declare (in) vec4 x))
-     ((declare () vec4 r)
-      (assign (constant bool (1)) (x) (var_ref r)
-	      (call atan ((swiz x (var_ref y))
-			  (swiz x (var_ref x)))))
-      (assign (constant bool (1)) (y) (var_ref r)
-	      (call atan ((swiz y (var_ref y))
-			  (swiz y (var_ref x)))))
-      (assign (constant bool (1)) (z) (var_ref r)
-	      (call atan ((swiz z (var_ref y))
-			  (swiz z (var_ref x)))))
-      (assign (constant bool (1)) (w) (var_ref r)
-	      (call atan ((swiz w (var_ref y))
-			  (swiz w (var_ref x)))))
-      (return (var_ref r)))))
-
-))
diff --git a/src/glsl/builtins/ir/atanh b/src/glsl/builtins/ir/atanh
deleted file mode 100644
index 5559e97..0000000
--- a/src/glsl/builtins/ir/atanh
+++ /dev/null
@@ -1,37 +0,0 @@
-((function atanh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float * (constant float (0.5))
-                (expression float log
-		  (expression float /
-                    (expression float + (constant float (1)) (var_ref x))
-                    (expression float - (constant float (1)) (var_ref x))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 * (constant vec2 (0.5))
-                (expression vec2 log
-		  (expression vec2 /
-                    (expression vec2 + (constant vec2 (1)) (var_ref x))
-                    (expression vec2 - (constant vec2 (1)) (var_ref x))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 * (constant vec3 (0.5))
-                (expression vec3 log
-		  (expression vec3 /
-                    (expression vec3 + (constant vec3 (1)) (var_ref x))
-                    (expression vec3 - (constant vec3 (1)) (var_ref x))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 * (constant vec4 (0.5))
-                (expression vec4 log
-		  (expression vec4 /
-                    (expression vec4 + (constant vec4 (1)) (var_ref x))
-                    (expression vec4 - (constant vec4 (1)) (var_ref x))))))))
-))
diff --git a/src/glsl/builtins/ir/ceil b/src/glsl/builtins/ir/ceil
deleted file mode 100644
index a26a775..0000000
--- a/src/glsl/builtins/ir/ceil
+++ /dev/null
@@ -1,21 +0,0 @@
-((function ceil
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float ceil (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 ceil (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 ceil (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 ceil (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/clamp b/src/glsl/builtins/ir/clamp
deleted file mode 100644
index 2bdc466..0000000
--- a/src/glsl/builtins/ir/clamp
+++ /dev/null
@@ -1,148 +0,0 @@
-((function clamp
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1)
-       (declare (in) float arg2))
-     ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1)
-       (declare (in) vec2 arg2))
-     ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1)
-       (declare (in) vec3 arg2))
-     ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1)
-       (declare (in) vec4 arg2))
-     ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2  arg0)
-       (declare (in) float arg1)
-       (declare (in) float arg2))
-     ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3  arg0)
-       (declare (in) float arg1)
-       (declare (in) float arg2))
-     ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4  arg0)
-       (declare (in) float arg1)
-       (declare (in) float arg2))
-     ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature int
-     (parameters
-       (declare (in) int arg0)
-       (declare (in) int arg1)
-       (declare (in) int arg2))
-     ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1)
-       (declare (in) ivec2 arg2))
-     ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1)
-       (declare (in) ivec3 arg2))
-     ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1)
-       (declare (in) ivec4 arg2))
-     ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) int arg1)
-       (declare (in) int arg2))
-     ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) int arg1)
-       (declare (in) int arg2))
-     ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) int arg1)
-       (declare (in) int arg2))
-     ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uint
-     (parameters
-       (declare (in) uint arg0)
-       (declare (in) uint arg1)
-       (declare (in) uint arg2))
-     ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1)
-       (declare (in) uvec2 arg2))
-     ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1)
-       (declare (in) uvec3 arg2))
-     ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1)
-       (declare (in) uvec4 arg2))
-     ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uint arg1)
-       (declare (in) uint arg2))
-     ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uint arg1)
-       (declare (in) uint arg2))
-     ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uint arg1)
-       (declare (in) uint arg2))
-     ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/cos b/src/glsl/builtins/ir/cos
deleted file mode 100644
index 88f266e..0000000
--- a/src/glsl/builtins/ir/cos
+++ /dev/null
@@ -1,21 +0,0 @@
-((function cos
-   (signature float
-     (parameters
-       (declare (in) float angle))
-     ((return (expression float cos (var_ref angle)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 angle))
-     ((return (expression vec2 cos (var_ref angle)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 angle))
-     ((return (expression vec3 cos (var_ref angle)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 angle))
-     ((return (expression vec4 cos (var_ref angle)))))
-))
diff --git a/src/glsl/builtins/ir/cosh b/src/glsl/builtins/ir/cosh
deleted file mode 100644
index 45e0ae4..0000000
--- a/src/glsl/builtins/ir/cosh
+++ /dev/null
@@ -1,30 +0,0 @@
-((function cosh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float * (constant float (0.5))
-                (expression float +
-		  (expression float exp (var_ref x))
-		  (expression float exp (expression float neg (var_ref x))))))))
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 * (constant vec2 (0.5))
-                (expression vec2 +
-		  (expression vec2 exp (var_ref x))
-		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 * (constant vec3 (0.5))
-                (expression vec3 +
-		  (expression vec3 exp (var_ref x))
-		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 * (constant vec4 (0.5))
-                (expression vec4 +
-		  (expression vec4 exp (var_ref x))
-		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
diff --git a/src/glsl/builtins/ir/cross b/src/glsl/builtins/ir/cross
deleted file mode 100644
index 02991fe..0000000
--- a/src/glsl/builtins/ir/cross
+++ /dev/null
@@ -1,9 +0,0 @@
-((function cross
-   (signature vec3
-     (parameters
-       (declare (in) vec3 a)
-       (declare (in) vec3 b))
-     ((return (expression vec3 -
-        (expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))
-        (expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))
-))
diff --git a/src/glsl/builtins/ir/dFdx b/src/glsl/builtins/ir/dFdx
deleted file mode 100644
index 30594d3..0000000
--- a/src/glsl/builtins/ir/dFdx
+++ /dev/null
@@ -1,21 +0,0 @@
-((function dFdx
-   (signature float
-     (parameters
-       (declare (in) float p))
-     ((return (expression float dFdx (var_ref p)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 p))
-     ((return (expression vec2 dFdx (var_ref p)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 p))
-     ((return (expression vec3 dFdx (var_ref p)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 p))
-     ((return (expression vec4 dFdx (var_ref p)))))
-))
diff --git a/src/glsl/builtins/ir/dFdy b/src/glsl/builtins/ir/dFdy
deleted file mode 100644
index fb5798d..0000000
--- a/src/glsl/builtins/ir/dFdy
+++ /dev/null
@@ -1,21 +0,0 @@
-((function dFdy
-   (signature float
-     (parameters
-       (declare (in) float p))
-     ((return (expression float dFdy (var_ref p)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 p))
-     ((return (expression vec2 dFdy (var_ref p)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 p))
-     ((return (expression vec3 dFdy (var_ref p)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 p))
-     ((return (expression vec4 dFdy (var_ref p)))))
-))
diff --git a/src/glsl/builtins/ir/degrees b/src/glsl/builtins/ir/degrees
deleted file mode 100644
index dc0d7b9..0000000
--- a/src/glsl/builtins/ir/degrees
+++ /dev/null
@@ -1,21 +0,0 @@
-((function degrees
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float * (var_ref arg0) (constant float (57.295780))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))
-))
diff --git a/src/glsl/builtins/ir/distance b/src/glsl/builtins/ir/distance
deleted file mode 100644
index 7789ca6..0000000
--- a/src/glsl/builtins/ir/distance
+++ /dev/null
@@ -1,31 +0,0 @@
-((function distance
-   (signature float
-     (parameters
-       (declare (in) float p0)
-       (declare (in) float p1))
-     ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))
-
-   (signature float
-     (parameters
-       (declare (in) vec2 p0)
-       (declare (in) vec2 p1))
-     ((declare () vec2 p)
-      (assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
-      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-
-   (signature float
-     (parameters
-       (declare (in) vec3 p0)
-       (declare (in) vec3 p1))
-     ((declare () vec3 p)
-      (assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
-      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-
-   (signature float
-     (parameters
-       (declare (in) vec4 p0)
-       (declare (in) vec4 p1))
-     ((declare () vec4 p)
-      (assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
-      (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-))
diff --git a/src/glsl/builtins/ir/dot b/src/glsl/builtins/ir/dot
deleted file mode 100644
index 1f27f32..0000000
--- a/src/glsl/builtins/ir/dot
+++ /dev/null
@@ -1,25 +0,0 @@
-((function dot
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1))
-     ((return (expression float * (var_ref arg0) (var_ref arg1)))))
-
-   (signature float
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-
-   (signature float
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-
-   (signature float
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/equal b/src/glsl/builtins/ir/equal
deleted file mode 100644
index a414b3e..0000000
--- a/src/glsl/builtins/ir/equal
+++ /dev/null
@@ -1,73 +0,0 @@
-((function equal
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) bvec2 arg0)
-       (declare (in) bvec2 arg1))
-     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) bvec3 arg0)
-       (declare (in) bvec3 arg1))
-     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) bvec4 arg0)
-       (declare (in) bvec4 arg1))
-     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/exp b/src/glsl/builtins/ir/exp
deleted file mode 100644
index a73bd6a..0000000
--- a/src/glsl/builtins/ir/exp
+++ /dev/null
@@ -1,21 +0,0 @@
-((function exp
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float exp (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 exp (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 exp (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 exp (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/exp2 b/src/glsl/builtins/ir/exp2
deleted file mode 100644
index a842d3f..0000000
--- a/src/glsl/builtins/ir/exp2
+++ /dev/null
@@ -1,21 +0,0 @@
-((function exp2
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float exp2 (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 exp2 (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 exp2 (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 exp2 (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/faceforward b/src/glsl/builtins/ir/faceforward
deleted file mode 100644
index 35b7957..0000000
--- a/src/glsl/builtins/ir/faceforward
+++ /dev/null
@@ -1,37 +0,0 @@
-((function faceforward
-   (signature float
-     (parameters
-       (declare (in) float N)
-       (declare (in) float I)
-       (declare (in) float Nref))
-     ((if (expression bool < (expression float * (var_ref Nref) (var_ref I)) (constant float (0)))
-          ((return (var_ref N)))
-	  ((return (expression float neg (var_ref N)))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 N)
-       (declare (in) vec2 I)
-       (declare (in) vec2 Nref))
-     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
-          ((return (var_ref N)))
-	  ((return (expression vec2 neg (var_ref N)))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 N)
-       (declare (in) vec3 I)
-       (declare (in) vec3 Nref))
-     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
-          ((return (var_ref N)))
-	  ((return (expression vec3 neg (var_ref N)))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 N)
-       (declare (in) vec4 I)
-       (declare (in) vec4 Nref))
-     ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
-          ((return (var_ref N)))
-	  ((return (expression vec4 neg (var_ref N)))))))
-))
diff --git a/src/glsl/builtins/ir/floor b/src/glsl/builtins/ir/floor
deleted file mode 100644
index 8dd8052..0000000
--- a/src/glsl/builtins/ir/floor
+++ /dev/null
@@ -1,21 +0,0 @@
-((function floor
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float floor (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 floor (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 floor (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 floor (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/fract b/src/glsl/builtins/ir/fract
deleted file mode 100644
index 3f0763d..0000000
--- a/src/glsl/builtins/ir/fract
+++ /dev/null
@@ -1,22 +0,0 @@
-((function fract
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float fract (var_ref x)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 fract (var_ref x)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 fract (var_ref x)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 fract (var_ref x)))))
-))
-
diff --git a/src/glsl/builtins/ir/ftransform b/src/glsl/builtins/ir/ftransform
deleted file mode 100644
index 9ca63dc..0000000
--- a/src/glsl/builtins/ir/ftransform
+++ /dev/null
@@ -1,9 +0,0 @@
-((declare (uniform) mat4 gl_ModelViewProjectionMatrix)
- (declare (in) vec4 gl_Vertex)
- (function ftransform
-   (signature vec4
-     (parameters)
-    ((return (expression vec4 *
-	      (var_ref gl_ModelViewProjectionMatrix)
-	      (var_ref gl_Vertex)))))
-))
diff --git a/src/glsl/builtins/ir/fwidth b/src/glsl/builtins/ir/fwidth
deleted file mode 100644
index 385e05d..0000000
--- a/src/glsl/builtins/ir/fwidth
+++ /dev/null
@@ -1,29 +0,0 @@
-((function fwidth
-   (signature float
-     (parameters
-       (declare (in) float p))
-     ((return (expression float +
-                (expression float abs (expression float dFdx (var_ref p)))
-                (expression float abs (expression float dFdy (var_ref p)))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 p))
-     ((return (expression vec2 +
-                (expression vec2 abs (expression vec2 dFdx (var_ref p)))
-                (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 p))
-     ((return (expression vec3 +
-                (expression vec3 abs (expression vec3 dFdx (var_ref p)))
-                (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 p))
-     ((return (expression vec4 +
-                (expression vec4 abs (expression vec4 dFdx (var_ref p)))
-                (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))
-))
diff --git a/src/glsl/builtins/ir/greaterThan b/src/glsl/builtins/ir/greaterThan
deleted file mode 100644
index 18af865..0000000
--- a/src/glsl/builtins/ir/greaterThan
+++ /dev/null
@@ -1,55 +0,0 @@
-((function greaterThan
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/greaterThanEqual b/src/glsl/builtins/ir/greaterThanEqual
deleted file mode 100644
index 6d3bc89..0000000
--- a/src/glsl/builtins/ir/greaterThanEqual
+++ /dev/null
@@ -1,55 +0,0 @@
-((function greaterThanEqual
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/inversesqrt b/src/glsl/builtins/ir/inversesqrt
deleted file mode 100644
index 5b66d2b..0000000
--- a/src/glsl/builtins/ir/inversesqrt
+++ /dev/null
@@ -1,21 +0,0 @@
-((function inversesqrt
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float rsq (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 rsq (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 rsq (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 rsq (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/length b/src/glsl/builtins/ir/length
deleted file mode 100644
index b72334e..0000000
--- a/src/glsl/builtins/ir/length
+++ /dev/null
@@ -1,21 +0,0 @@
-((function length
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float abs (var_ref arg0)))))
-
-   (signature float
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-
-   (signature float
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-
-   (signature float
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-))
diff --git a/src/glsl/builtins/ir/lessThan b/src/glsl/builtins/ir/lessThan
deleted file mode 100644
index 8401fe9..0000000
--- a/src/glsl/builtins/ir/lessThan
+++ /dev/null
@@ -1,55 +0,0 @@
-((function lessThan
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/lessThanEqual b/src/glsl/builtins/ir/lessThanEqual
deleted file mode 100644
index c1cdd3f..0000000
--- a/src/glsl/builtins/ir/lessThanEqual
+++ /dev/null
@@ -1,55 +0,0 @@
-((function lessThanEqual
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/log b/src/glsl/builtins/ir/log
deleted file mode 100644
index d168abb..0000000
--- a/src/glsl/builtins/ir/log
+++ /dev/null
@@ -1,21 +0,0 @@
-((function log
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float log (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 log (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 log (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 log (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/log2 b/src/glsl/builtins/ir/log2
deleted file mode 100644
index b96c627..0000000
--- a/src/glsl/builtins/ir/log2
+++ /dev/null
@@ -1,21 +0,0 @@
-((function log2
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float log2 (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 log2 (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 log2 (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 log2 (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/matrixCompMult b/src/glsl/builtins/ir/matrixCompMult
deleted file mode 100644
index 4be9b03..0000000
--- a/src/glsl/builtins/ir/matrixCompMult
+++ /dev/null
@@ -1,91 +0,0 @@
-((function matrixCompMult
-   (signature mat2
-     (parameters
-       (declare (in) mat2 x)
-       (declare (in) mat2 y))
-     ((declare () mat2 z)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
-   (signature mat3
-     (parameters
-       (declare (in) mat3 x)
-       (declare (in) mat3 y))
-     ((declare () mat3 z)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
-   (signature mat4
-     (parameters
-       (declare (in) mat4 x)
-       (declare (in) mat4 y))
-     ((declare () mat4 z)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (3)))  (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-
-   (signature mat2x3
-     (parameters
-       (declare (in) mat2x3 x)
-       (declare (in) mat2x3 y))
-     ((declare () mat2x3 z)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
-   (signature mat3x2
-     (parameters
-       (declare (in) mat3x2 x)
-       (declare (in) mat3x2 y))
-     ((declare () mat3x2 z)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
-   (signature mat2x4
-     (parameters
-       (declare (in) mat2x4 x)
-       (declare (in) mat2x4 y))
-     ((declare () mat2x4 z)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
-   (signature mat4x2
-     (parameters
-       (declare (in) mat4x2 x)
-       (declare (in) mat4x2 y))
-     ((declare () mat4x2 z)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (3)))  (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-
-   (signature mat3x4
-     (parameters
-       (declare (in) mat3x4 x)
-       (declare (in) mat3x4 y))
-     ((declare () mat3x4 z)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
-   (signature mat4x3
-     (parameters
-       (declare (in) mat4x3 x)
-       (declare (in) mat4x3 y))
-     ((declare () mat4x3 z)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (3)))  (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-))
diff --git a/src/glsl/builtins/ir/max b/src/glsl/builtins/ir/max
deleted file mode 100644
index 2b5a028..0000000
--- a/src/glsl/builtins/ir/max
+++ /dev/null
@@ -1,127 +0,0 @@
-((function max
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1))
-     ((return (expression float max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature int
-     (parameters
-       (declare (in) int arg0)
-       (declare (in) int arg1))
-     ((return (expression int max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uint
-     (parameters
-       (declare (in) uint arg0)
-       (declare (in) uint arg1))
-     ((return (expression uint max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/min b/src/glsl/builtins/ir/min
deleted file mode 100644
index 2deef11..0000000
--- a/src/glsl/builtins/ir/min
+++ /dev/null
@@ -1,127 +0,0 @@
-((function min
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1))
-     ((return (expression float min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature int
-     (parameters
-       (declare (in) int arg0)
-       (declare (in) int arg1))
-     ((return (expression int min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4  arg0)
-       (declare (in) int arg1))
-     ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uint
-     (parameters
-       (declare (in) uint arg0)
-       (declare (in) uint arg1))
-     ((return (expression uint min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec2
-     (parameters
-       (declare (in) uvec2  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec3
-     (parameters
-       (declare (in) uvec3  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
-
-   (signature uvec4
-     (parameters
-       (declare (in) uvec4  arg0)
-       (declare (in) uint arg1))
-     ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/mix b/src/glsl/builtins/ir/mix
deleted file mode 100644
index a31f0fa..0000000
--- a/src/glsl/builtins/ir/mix
+++ /dev/null
@@ -1,88 +0,0 @@
-((function mix
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1)
-       (declare (in) float arg2))
-     ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1)
-       (declare (in) vec2 arg2))
-     ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1)
-       (declare (in) vec3 arg2))
-     ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1)
-       (declare (in) vec4 arg2))
-     ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1)
-       (declare (in) float arg2))
-     ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1)
-       (declare (in) float arg2))
-     ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1)
-       (declare (in) float arg2))
-     ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
-
-   (signature float
-     (parameters
-       (declare (in) float v1)
-       (declare (in) float v2)
-       (declare (in) bool  a))
-     ((assign (var_ref a) (var_ref v1) (var_ref v2))
-      (return (var_ref v1))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 v1)
-       (declare (in) vec2 v2)
-       (declare (in) bvec2 a))
-     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
-      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
-      (return (var_ref v1))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 v1)
-       (declare (in) vec3 v2)
-       (declare (in) bvec3 a))
-     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
-      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
-      (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
-      (return (var_ref v1))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 v1)
-       (declare (in) vec4 v2)
-       (declare (in) bvec4 a))
-     ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
-      (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
-      (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
-      (assign (swiz w (var_ref a)) (w) (var_ref v1) (swiz w (var_ref v2)))
-      (return (var_ref v1))))
-))
diff --git a/src/glsl/builtins/ir/mod b/src/glsl/builtins/ir/mod
deleted file mode 100644
index aeaea24..0000000
--- a/src/glsl/builtins/ir/mod
+++ /dev/null
@@ -1,43 +0,0 @@
-((function mod
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1))
-     ((return (expression float % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4  arg0)
-       (declare (in) float arg1))
-     ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/modf b/src/glsl/builtins/ir/modf
deleted file mode 100644
index 2b935a9..0000000
--- a/src/glsl/builtins/ir/modf
+++ /dev/null
@@ -1,41 +0,0 @@
-((function modf
-   (signature float
-     (parameters
-       (declare (in)  float x)
-       (declare (out) float i))
-     ((declare () float t)
-      (assign (constant bool (1)) (x) (var_ref t)
-                                      (expression float trunc (var_ref x)))
-      (assign (constant bool (1)) (x) (var_ref i) (var_ref t))
-      (return (expression float - (var_ref x) (var_ref t)))))
-
-   (signature vec2
-     (parameters
-       (declare (in)  vec2 x)
-       (declare (out) vec2 i))
-     ((declare () vec2 t)
-      (assign (constant bool (1)) (xy) (var_ref t)
-                                       (expression vec2 trunc (var_ref x)))
-      (assign (constant bool (1)) (xy) (var_ref i) (var_ref t))
-      (return (expression vec2 - (var_ref x) (var_ref t)))))
-
-   (signature vec3
-     (parameters
-       (declare (in)  vec3 x)
-       (declare (out) vec3 i))
-     ((declare () vec3 t)
-      (assign (constant bool (1)) (xyz) (var_ref t)
-                                        (expression vec3 trunc (var_ref x)))
-      (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t))
-      (return (expression vec3 - (var_ref x) (var_ref t)))))
-
-   (signature vec4
-     (parameters
-       (declare (in)  vec4 x)
-       (declare (out) vec4 i))
-     ((declare () vec4 t)
-      (assign (constant bool (1)) (xyzw) (var_ref t)
-                                         (expression vec4 trunc (var_ref x)))
-      (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t))
-      (return (expression vec4 - (var_ref x) (var_ref t)))))
-))
diff --git a/src/glsl/builtins/ir/noise1 b/src/glsl/builtins/ir/noise1
deleted file mode 100644
index 1155056..0000000
--- a/src/glsl/builtins/ir/noise1
+++ /dev/null
@@ -1,18 +0,0 @@
-((function noise1
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float noise (var_ref x)))))
-   (signature float
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression float noise (var_ref x)))))
-   (signature float
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression float noise (var_ref x)))))
-   (signature float
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression float noise (var_ref x)))))
-))
diff --git a/src/glsl/builtins/ir/noise2 b/src/glsl/builtins/ir/noise2
deleted file mode 100644
index 383fccf..0000000
--- a/src/glsl/builtins/ir/noise2
+++ /dev/null
@@ -1,61 +0,0 @@
-((function noise2
-  (signature vec2
-    (parameters (declare (in) vec4 p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () vec2 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (return (var_ref t))
-    ))
-
-  (signature vec2
-    (parameters (declare (in) vec3 p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () vec2 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (return (var_ref t))
-    ))
-
-  (signature vec2
-    (parameters
-      (declare (in ) vec2 p)
-    )
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () vec2 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (return (var_ref t))
-    ))
-
-  (signature vec2
-    (parameters
-      (declare (in ) float p)
-    )
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () vec2 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (return (var_ref t))
-    ))
-))
diff --git a/src/glsl/builtins/ir/noise3 b/src/glsl/builtins/ir/noise3
deleted file mode 100644
index ed7ad51..0000000
--- a/src/glsl/builtins/ir/noise3
+++ /dev/null
@@ -1,73 +0,0 @@
-((function noise3
-  (signature vec3
-    (parameters (declare (in) vec4 p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () float c)
-      (declare () vec3 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
-      (return (var_ref t))
-    ))
-
-  (signature vec3
-    (parameters (declare (in) vec3 p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () float c)
-      (declare () vec3 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
-      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
-      (return (var_ref t))
-    ))
-
-  (signature vec3
-    (parameters (declare (in) vec2 p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () float c)
-      (declare () vec3 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
-      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
-      (return (var_ref t))
-    ))
-
-  (signature vec3
-    (parameters (declare (in) float p))
-    (
-      (declare () float a)
-      (declare () float b)
-      (declare () float c)
-      (declare () vec3 t)
-
-      (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
-      (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
-      (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
-      (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
-      (return (var_ref t))
-    ))
-))
diff --git a/src/glsl/builtins/ir/noise4 b/src/glsl/builtins/ir/noise4
deleted file mode 100644
index 77a2529..0000000
--- a/src/glsl/builtins/ir/noise4
+++ /dev/null
@@ -1,97 +0,0 @@
-((function noise4
-  (signature vec4
-    (parameters (declare (in) vec4 p))
-    (
-      (declare () float _x)
-      (declare () float _y)
-      (declare () float _z)
-      (declare () float _w)
-      (declare () vec4 _r)
-
-      (declare () vec4 _p)
-      (assign (constant bool (1)) (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
-
-      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
-      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
-      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
-      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
-      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
-      (return (var_ref _r))
-    ))
-
-  (signature vec4
-    (parameters (declare (in) vec3 p))
-    (
-      (declare () float _x)
-      (declare () float _y)
-      (declare () float _z)
-      (declare () float _w)
-      (declare () vec4 _r)
-
-      (declare () vec3 _p)
-      (assign (constant bool (1)) (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
-
-      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
-      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
-      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
-      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
-      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
-      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
-      (return (var_ref _r))
-    ))
-
-  (signature vec4
-    (parameters (declare (in) vec2 p))
-    (
-      (declare () float _x)
-      (declare () float _y)
-      (declare () float _z)
-      (declare () float _w)
-      (declare () vec4 _r)
-
-      (declare () vec2 _p)
-      (assign (constant bool (1)) (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
-
-      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
-      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
-      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
-      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
-      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
-      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
-      (return (var_ref _r))
-    ))
-
-  (signature vec4
-    (parameters (declare (in) float p))
-    (
-      (declare () float _x)
-      (declare () float _y)
-      (declare () float _z)
-      (declare () float _w)
-      (declare () vec4 _r)
-
-      (declare () float _p)
-      (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
-
-      (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
-      (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))
-      (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
-      (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))
-
-      (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
-      (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
-      (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
-      (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
-      (return (var_ref _r))
-    ))
-))
diff --git a/src/glsl/builtins/ir/normalize b/src/glsl/builtins/ir/normalize
deleted file mode 100644
index 0de0db0..0000000
--- a/src/glsl/builtins/ir/normalize
+++ /dev/null
@@ -1,21 +0,0 @@
-((function normalize
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float sign (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-))
diff --git a/src/glsl/builtins/ir/not b/src/glsl/builtins/ir/not
deleted file mode 100644
index b696b06..0000000
--- a/src/glsl/builtins/ir/not
+++ /dev/null
@@ -1,16 +0,0 @@
-((function not
-   (signature bvec2
-     (parameters
-       (declare (in) bvec2 arg0))
-     ((return (expression bvec2 ! (var_ref arg0)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) bvec3 arg0))
-     ((return (expression bvec3 ! (var_ref arg0)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) bvec4 arg0))
-     ((return (expression bvec4 ! (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/notEqual b/src/glsl/builtins/ir/notEqual
deleted file mode 100644
index abaf191..0000000
--- a/src/glsl/builtins/ir/notEqual
+++ /dev/null
@@ -1,73 +0,0 @@
-((function notEqual
-   (signature bvec2
-     (parameters
-       (declare (in) vec2 arg0)
-       (declare (in) vec2 arg1))
-     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) vec3 arg0)
-       (declare (in) vec3 arg1))
-     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) vec4 arg0)
-       (declare (in) vec4 arg1))
-     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) bvec2 arg0)
-       (declare (in) bvec2 arg1))
-     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) bvec3 arg0)
-       (declare (in) bvec3 arg1))
-     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) bvec4 arg0)
-       (declare (in) bvec4 arg1))
-     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) ivec2 arg0)
-       (declare (in) ivec2 arg1))
-     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) ivec3 arg0)
-       (declare (in) ivec3 arg1))
-     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) ivec4 arg0)
-       (declare (in) ivec4 arg1))
-     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec2
-     (parameters
-       (declare (in) uvec2 arg0)
-       (declare (in) uvec2 arg1))
-     ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec3
-     (parameters
-       (declare (in) uvec3 arg0)
-       (declare (in) uvec3 arg1))
-     ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
-   (signature bvec4
-     (parameters
-       (declare (in) uvec4 arg0)
-       (declare (in) uvec4 arg1))
-     ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/src/glsl/builtins/ir/outerProduct b/src/glsl/builtins/ir/outerProduct
deleted file mode 100644
index 61d4626..0000000
--- a/src/glsl/builtins/ir/outerProduct
+++ /dev/null
@@ -1,92 +0,0 @@
-((function outerProduct
-   (signature mat2
-     (parameters
-       (declare (in) vec2 u)
-       (declare (in) vec2 v))
-     ((declare () mat2 m)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat2x3
-     (parameters
-       (declare (in) vec3 u)
-       (declare (in) vec2 v))
-     ((declare () mat2x3 m)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat2x4
-     (parameters
-       (declare (in) vec4 u)
-       (declare (in) vec2 v))
-     ((declare () mat2x4 m)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat3x2
-     (parameters
-       (declare (in) vec2 u)
-       (declare (in) vec3 v))
-     ((declare () mat3x2 m)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
-      (return (var_ref m))
- ))
-
-   (signature mat3
-     (parameters
-       (declare (in) vec3 u)
-       (declare (in) vec3 v))
-     ((declare () mat3 m)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat3x4
-     (parameters
-       (declare (in) vec4 u)
-       (declare (in) vec3 v))
-     ((declare () mat3x4 m)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat4x2
-     (parameters
-       (declare (in) vec2 u)
-       (declare (in) vec4 v))
-     ((declare () mat4x2 m)
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
-      (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat4x3
-     (parameters
-       (declare (in) vec3 u)
-       (declare (in) vec4 v))
-     ((declare () mat4x3 m)
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
-      (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
-      (return (var_ref m))))
-
-   (signature mat4
-     (parameters
-       (declare (in) vec4 u)
-       (declare (in) vec4 v))
-     ((declare () mat4 m)
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
-      (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
-      (return (var_ref m))))
-))
diff --git a/src/glsl/builtins/ir/pow b/src/glsl/builtins/ir/pow
deleted file mode 100644
index 08dfc67..0000000
--- a/src/glsl/builtins/ir/pow
+++ /dev/null
@@ -1,46 +0,0 @@
-((function pow
-   (signature float
-     (parameters
-       (declare (in) float arg0)
-       (declare (in) float arg1))
-     ((return (expression float pow (var_ref arg0) (var_ref arg1)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 b)
-       (declare (in) vec2 e))
-      	(
-			(declare () vec2 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))
-			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))
-			(return (var_ref ret))
-		)
-	)
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 b)
-       (declare (in) vec3 e))
-      	(
-			(declare () vec3 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))
-			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))
-			(assign (constant bool (1)) (z) (var_ref ret) (call pow ((swiz z (var_ref b)) (swiz z (var_ref e)) )))
-			(return (var_ref ret))
-		)
-	)
-
-	(signature vec4
-     (parameters
-       (declare (in) vec4 b)
-       (declare (in) vec4 e))
-      	(
-			(declare () vec4 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call pow ((swiz x (var_ref b)) (swiz x (var_ref e)) )))
-			(assign (constant bool (1)) (y) (var_ref ret) (call pow ((swiz y (var_ref b)) (swiz y (var_ref e)) )))
-			(assign (constant bool (1)) (z) (var_ref ret) (call pow ((swiz z (var_ref b)) (swiz z (var_ref e)) )))
-			(assign (constant bool (1)) (w) (var_ref ret) (call pow ((swiz w (var_ref b)) (swiz w (var_ref e)) )))
-			(return (var_ref ret))
-		)
-	)
-))
diff --git a/src/glsl/builtins/ir/radians b/src/glsl/builtins/ir/radians
deleted file mode 100644
index 6a0f5d2..0000000
--- a/src/glsl/builtins/ir/radians
+++ /dev/null
@@ -1,21 +0,0 @@
-((function radians
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float * (var_ref arg0) (constant float (0.017453))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 * (var_ref arg0) (constant float (0.017453))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 * (var_ref arg0) (constant float (0.017453))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 * (var_ref arg0) (constant float (0.017453))))))
-))
diff --git a/src/glsl/builtins/ir/reflect b/src/glsl/builtins/ir/reflect
deleted file mode 100644
index 1fa394e..0000000
--- a/src/glsl/builtins/ir/reflect
+++ /dev/null
@@ -1,58 +0,0 @@
-((function reflect
-   (signature float
-     (parameters
-       (declare (in) float i)
-       (declare (in) float n))
-     ((return (expression float -
-	       (var_ref i)
-	       (expression float *
-		(constant float (2.0))
-		(expression float *
-		 (expression float *
-		  (var_ref n)
-		  (var_ref i))
-		 (var_ref n)))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 i)
-       (declare (in) vec2 n))
-     ((return (expression vec2 -
-	       (var_ref i)
-	       (expression vec2 *
-		(constant float (2.0))
-		(expression vec2 *
-		 (expression float dot
-		  (var_ref n)
-		  (var_ref i))
-		 (var_ref n)))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 i)
-       (declare (in) vec3 n))
-     ((return (expression vec3 -
-	       (var_ref i)
-	       (expression vec3 *
-		(constant float (2.0))
-		(expression vec3 *
-		 (expression float dot
-		  (var_ref n)
-		  (var_ref i))
-		 (var_ref n)))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 i)
-       (declare (in) vec4 n))
-     ((return (expression vec4 -
-	       (var_ref i)
-	       (expression vec4 *
-		(constant float (2.0))
-		(expression vec4 *
-		 (expression float dot
-		  (var_ref n)
-		  (var_ref i))
-		 (var_ref n)))))))
-
-))
diff --git a/src/glsl/builtins/ir/refract b/src/glsl/builtins/ir/refract
deleted file mode 100644
index f6319b0..0000000
--- a/src/glsl/builtins/ir/refract
+++ /dev/null
@@ -1,102 +0,0 @@
-((function refract
-   (signature float
-     (parameters
-       (declare (in) float i)
-       (declare (in) float n)
-       (declare (in) float eta))
-     ((declare () float k)
-      (assign (constant bool (1)) (x) (var_ref k)
-              (expression float - (constant float (1.0))
-	        (expression float * (var_ref eta)
-	          (expression float * (var_ref eta)
-		    (expression float - (constant float (1.0))
-		      (expression float * 
-		        (expression float * (var_ref n) (var_ref i))
-		        (expression float * (var_ref n) (var_ref i))))))))
-      (if (expression bool < (var_ref k) (constant float (0.0)))
-          ((return (constant float (0.0))))
-	  ((return (expression float -
-	             (expression float * (var_ref eta) (var_ref i))
-		     (expression float *
-		       (expression float +
-		         (expression float * (var_ref eta)
-			   (expression float * (var_ref n) (var_ref i)))
-		         (expression float sqrt (var_ref k)))
-		       (var_ref n))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 i)
-       (declare (in) vec2 n)
-       (declare (in) float eta))
-     ((declare () float k)
-      (assign (constant bool (1)) (x) (var_ref k)
-              (expression float - (constant float (1.0))
-	        (expression float * (var_ref eta)
-	          (expression float * (var_ref eta)
-		    (expression float - (constant float (1.0))
-		      (expression float * 
-		        (expression float dot (var_ref n) (var_ref i))
-		        (expression float dot (var_ref n) (var_ref i))))))))
-      (if (expression bool < (var_ref k) (constant float (0.0)))
-          ((return (constant vec2 (0.0 0.0))))
-	  ((return (expression vec2 -
-	             (expression vec2 * (var_ref eta) (var_ref i))
-		     (expression vec2 *
-		       (expression float +
-		         (expression float * (var_ref eta)
-			   (expression float dot (var_ref n) (var_ref i)))
-		         (expression float sqrt (var_ref k)))
-		       (var_ref n))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 i)
-       (declare (in) vec3 n)
-       (declare (in) float eta))
-     ((declare () float k)
-      (assign (constant bool (1)) (x) (var_ref k)
-              (expression float - (constant float (1.0))
-	        (expression float * (var_ref eta)
-	          (expression float * (var_ref eta)
-		    (expression float - (constant float (1.0))
-		      (expression float * 
-		        (expression float dot (var_ref n) (var_ref i))
-		        (expression float dot (var_ref n) (var_ref i))))))))
-      (if (expression bool < (var_ref k) (constant float (0.0)))
-          ((return (constant vec3 (0.0 0.0 0.0))))
-	  ((return (expression vec3 -
-	             (expression vec3 * (var_ref eta) (var_ref i))
-		     (expression vec3 *
-		       (expression float +
-		         (expression float * (var_ref eta)
-			   (expression float dot (var_ref n) (var_ref i)))
-		         (expression float sqrt (var_ref k)))
-		       (var_ref n))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 i)
-       (declare (in) vec4 n)
-       (declare (in) float eta))
-     ((declare () float k)
-      (assign (constant bool (1)) (x) (var_ref k)
-              (expression float - (constant float (1.0))
-	        (expression float * (var_ref eta)
-	          (expression float * (var_ref eta)
-		    (expression float - (constant float (1.0))
-		      (expression float * 
-		        (expression float dot (var_ref n) (var_ref i))
-		        (expression float dot (var_ref n) (var_ref i))))))))
-      (if (expression bool < (var_ref k) (constant float (0.0)))
-          ((return (constant vec4 (0.0 0.0 0.0 0.0))))
-	  ((return (expression vec4 -
-	             (expression vec4 * (var_ref eta) (var_ref i))
-		     (expression vec4 *
-		       (expression float +
-		         (expression float * (var_ref eta)
-			   (expression float dot (var_ref n) (var_ref i)))
-		         (expression float sqrt (var_ref k)))
-		       (var_ref n))))))))
-
-))
diff --git a/src/glsl/builtins/ir/round b/src/glsl/builtins/ir/round
deleted file mode 100644
index d0d425b..0000000
--- a/src/glsl/builtins/ir/round
+++ /dev/null
@@ -1,21 +0,0 @@
-((function round
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float round_even (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 round_even (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 round_even (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 round_even (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/roundEven b/src/glsl/builtins/ir/roundEven
deleted file mode 100644
index a9c99b6..0000000
--- a/src/glsl/builtins/ir/roundEven
+++ /dev/null
@@ -1,21 +0,0 @@
-((function roundEven
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float round_even (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 round_even (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 round_even (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 round_even (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/sign b/src/glsl/builtins/ir/sign
deleted file mode 100644
index 1f51718..0000000
--- a/src/glsl/builtins/ir/sign
+++ /dev/null
@@ -1,42 +0,0 @@
-((function sign
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float sign (var_ref x)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 sign (var_ref x)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 sign (var_ref x)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 sign (var_ref x)))))
-
-   (signature int
-     (parameters
-       (declare (in) int x))
-     ((return (expression int sign (var_ref x)))))
-
-   (signature ivec2
-     (parameters
-       (declare (in) ivec2 x))
-     ((return (expression ivec2 sign (var_ref x)))))
-
-   (signature ivec3
-     (parameters
-       (declare (in) ivec3 x))
-     ((return (expression ivec3 sign (var_ref x)))))
-
-   (signature ivec4
-     (parameters
-       (declare (in) ivec4 x))
-     ((return (expression ivec4 sign (var_ref x)))))
-))
-
diff --git a/src/glsl/builtins/ir/sin b/src/glsl/builtins/ir/sin
deleted file mode 100644
index 6ceda6a..0000000
--- a/src/glsl/builtins/ir/sin
+++ /dev/null
@@ -1,45 +0,0 @@
-((function sin
-   (signature float
-     (parameters
-       (declare (in) float angle))
-		(
-			(return (expression float sin (var_ref angle)))
-		)
-	)
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 angle))
-      	(
-			(declare () vec2 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))
-			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))
-			(return (var_ref ret))
-		)
-	)
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 angle))
-		(
-			(declare () vec3 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))
-			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))
-			(assign (constant bool (1)) (z) (var_ref ret) (call sin ((swiz z (var_ref angle)))))
-			(return (var_ref ret))
-		)
-	)
-
-	(signature vec4
-		(parameters 
-			(declare (in) vec4 angle))
-		(
-			(declare () vec4 ret)
-			(assign (constant bool (1)) (x) (var_ref ret) (call sin ((swiz x (var_ref angle)))))
-			(assign (constant bool (1)) (y) (var_ref ret) (call sin ((swiz y (var_ref angle)))))
-			(assign (constant bool (1)) (z) (var_ref ret) (call sin ((swiz z (var_ref angle)))))
-			(assign (constant bool (1)) (w) (var_ref ret) (call sin ((swiz w (var_ref angle)))))
-			(return (var_ref ret))
-		)
-	)
-))
diff --git a/src/glsl/builtins/ir/sinh b/src/glsl/builtins/ir/sinh
deleted file mode 100644
index 7ad4f58..0000000
--- a/src/glsl/builtins/ir/sinh
+++ /dev/null
@@ -1,30 +0,0 @@
-((function sinh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float * (constant float (0.5))
-                (expression float -
-		  (expression float exp (var_ref x))
-		  (expression float exp (expression float neg (var_ref x))))))))
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 * (constant vec2 (0.5))
-                (expression vec2 -
-		  (expression vec2 exp (var_ref x))
-		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 * (constant vec3 (0.5))
-                (expression vec3 -
-		  (expression vec3 exp (var_ref x))
-		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 * (constant vec4 (0.5))
-                (expression vec4 -
-		  (expression vec4 exp (var_ref x))
-		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
diff --git a/src/glsl/builtins/ir/smoothstep b/src/glsl/builtins/ir/smoothstep
deleted file mode 100644
index b283f73..0000000
--- a/src/glsl/builtins/ir/smoothstep
+++ /dev/null
@@ -1,100 +0,0 @@
-((function smoothstep
-   (signature float
-     (parameters
-       (declare (in) float edge0)
-       (declare (in) float edge1)
-       (declare (in) float x))
-     ((declare () float t)
-      (assign (constant bool (1)) (x) (var_ref t)
-              (expression float max
-	                  (expression float min
-	                              (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
-	                              (constant float (1.0)))
-	                  (constant float (0.0))))
-      (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))
-   (signature vec2
-     (parameters
-       (declare (in) float edge0)
-       (declare (in) float edge1)
-       (declare (in) vec2 x))
-     ((declare () vec2 t)
-      (assign (constant bool (1)) (xy) (var_ref t)
-              (expression vec2 max
-	                  (expression vec2 min
-	                              (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
-	                              (constant float (1.0)))
-	                  (constant float (0.0))))
-      (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) float edge0)
-       (declare (in) float edge1)
-       (declare (in) vec3 x))
-     ((declare () vec3 t)
-      (assign (constant bool (1)) (xyz) (var_ref t)
-              (expression vec3 max
-	                  (expression vec3 min
-	                              (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
-	                              (constant float (1.0)))
-	                  (constant float (0.0))))
-      (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
-
-
-   (signature vec4
-     (parameters
-       (declare (in) float edge0)
-       (declare (in) float edge1)
-       (declare (in) vec4 x))
-     ((declare () vec4 t)
-      (assign (constant bool (1)) (xyzw) (var_ref t)
-              (expression vec4 max
-	                  (expression vec4 min
-	                              (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
-	                              (constant float (1.0)))
-	                  (constant float (0.0))))
-      (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 edge0)
-       (declare (in) vec2 edge1)
-       (declare (in) vec2 x))
-     ((declare () vec2 t)
-      (assign (constant bool (1)) (xy) (var_ref t)
-              (expression vec2 max
-                          (expression vec2 min
-                                      (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))
-                                      (constant float (1.0)))
-                          (constant float (0.0))))
-      (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 edge0)
-       (declare (in) vec3 edge1)
-       (declare (in) vec3 x))
-     ((declare () vec3 t)
-      (assign (constant bool (1)) (xyz) (var_ref t)
-              (expression vec3 max
-                          (expression vec3 min
-                                      (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))
-                                      (constant float (1.0)))
-                          (constant float (0.0))))
-      (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 edge0)
-       (declare (in) vec4 edge1)
-       (declare (in) vec4 x))
-     ((declare () vec4 t)
-      (assign (constant bool (1)) (xyzw) (var_ref t)
-              (expression vec4 max
-                          (expression vec4 min
-                                      (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))
-                                      (constant float (1.0)))
-                          (constant float (0.0))))
-      (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
-))
-
diff --git a/src/glsl/builtins/ir/sqrt b/src/glsl/builtins/ir/sqrt
deleted file mode 100644
index 0302d16..0000000
--- a/src/glsl/builtins/ir/sqrt
+++ /dev/null
@@ -1,21 +0,0 @@
-((function sqrt
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float sqrt (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 sqrt (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 sqrt (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 sqrt (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/ir/step b/src/glsl/builtins/ir/step
deleted file mode 100644
index 7aec9d7..0000000
--- a/src/glsl/builtins/ir/step
+++ /dev/null
@@ -1,68 +0,0 @@
-((function step
-   (signature float
-     (parameters
-       (declare (in) float edge)
-       (declare (in) float x))
-     ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) float edge)
-       (declare (in) vec2 x))
-     ((declare () vec2 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
-      (return (var_ref t))))
-
-   (signature vec3
-     (parameters
-       (declare (in) float edge)
-       (declare (in) vec3 x))
-     ((declare () vec3 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
-      (return (var_ref t))))
-
-   (signature vec4
-     (parameters
-       (declare (in) float edge)
-       (declare (in) vec4 x))
-     ((declare () vec4 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
-      (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
-      (return (var_ref t))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 edge)
-       (declare (in) vec2 x))
-     ((declare () vec2 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
-      (return (var_ref t))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 edge)
-       (declare (in) vec3 x))
-     ((declare () vec3 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
-      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
-      (return (var_ref t))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 edge)
-       (declare (in) vec4 x))
-     ((declare () vec4 t)
-      (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
-      (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
-      (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
-      (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
-      (return (var_ref t))))
-))
-
diff --git a/src/glsl/builtins/ir/tan b/src/glsl/builtins/ir/tan
deleted file mode 100644
index 9979863..0000000
--- a/src/glsl/builtins/ir/tan
+++ /dev/null
@@ -1,21 +0,0 @@
-((function tan
-   (signature float
-     (parameters
-       (declare (in) float angle))
-     ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 angle))
-     ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 angle))
-     ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 angle))
-     ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))
-))
diff --git a/src/glsl/builtins/ir/tanh b/src/glsl/builtins/ir/tanh
deleted file mode 100644
index 3b7271b..0000000
--- a/src/glsl/builtins/ir/tanh
+++ /dev/null
@@ -1,42 +0,0 @@
-((function tanh
-   (signature float
-     (parameters
-       (declare (in) float x))
-     ((return (expression float /
-                (expression float -
-		  (expression float exp (var_ref x))
-		  (expression float exp (expression float neg (var_ref x))))
-                (expression float +
-		  (expression float exp (var_ref x))
-		  (expression float exp (expression float neg (var_ref x))))))))
-   (signature vec2
-     (parameters
-       (declare (in) vec2 x))
-     ((return (expression vec2 /
-                (expression vec2 -
-		  (expression vec2 exp (var_ref x))
-		  (expression vec2 exp (expression vec2 neg (var_ref x))))
-                (expression vec2 +
-		  (expression vec2 exp (var_ref x))
-		  (expression vec2 exp (expression vec2 neg (var_ref x))))))))
-   (signature vec3
-     (parameters
-       (declare (in) vec3 x))
-     ((return (expression vec3 /
-                (expression vec3 -
-		  (expression vec3 exp (var_ref x))
-		  (expression vec3 exp (expression vec3 neg (var_ref x))))
-                (expression vec3 +
-		  (expression vec3 exp (var_ref x))
-		  (expression vec3 exp (expression vec3 neg (var_ref x))))))))
-   (signature vec4
-     (parameters
-       (declare (in) vec4 x))
-     ((return (expression vec4 /
-                (expression vec4 -
-		  (expression vec4 exp (var_ref x))
-		  (expression vec4 exp (expression vec4 neg (var_ref x))))
-                (expression vec4 +
-		  (expression vec4 exp (var_ref x))
-		  (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
diff --git a/src/glsl/builtins/ir/transpose b/src/glsl/builtins/ir/transpose
deleted file mode 100644
index 4bed448..0000000
--- a/src/glsl/builtins/ir/transpose
+++ /dev/null
@@ -1,139 +0,0 @@
-((function transpose
-   (signature mat2
-     (parameters
-       (declare (in) mat2 m))
-     ((declare () mat2 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
-   (signature mat3x2
-     (parameters
-       (declare (in) mat2x3 m))
-     ((declare () mat3x2 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
-   (signature mat4x2
-     (parameters
-       (declare (in) mat2x4 m))
-     ((declare () mat4x2 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
-   (signature mat2x3
-     (parameters
-       (declare (in) mat3x2 m))
-     ((declare () mat2x3 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
-   (signature mat3
-     (parameters
-       (declare (in) mat3 m))
-     ((declare () mat3 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
-   (signature mat4x3
-     (parameters
-       (declare (in) mat3x4 m))
-     ((declare () mat4x3 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
-   (signature mat2x4
-     (parameters
-       (declare (in) mat4x2 m))
-     ((declare () mat2x4 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-
-   (signature mat3x4
-     (parameters
-       (declare (in) mat4x3 m))
-     ((declare () mat3x4 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-
-   (signature mat4
-     (parameters
-       (declare (in) mat4 m))
-     ((declare () mat4 t)
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
-      (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-)
-
-)
-
diff --git a/src/glsl/builtins/ir/trunc b/src/glsl/builtins/ir/trunc
deleted file mode 100644
index d320a2a..0000000
--- a/src/glsl/builtins/ir/trunc
+++ /dev/null
@@ -1,21 +0,0 @@
-((function trunc
-   (signature float
-     (parameters
-       (declare (in) float arg0))
-     ((return (expression float trunc (var_ref arg0)))))
-
-   (signature vec2
-     (parameters
-       (declare (in) vec2 arg0))
-     ((return (expression vec2 trunc (var_ref arg0)))))
-
-   (signature vec3
-     (parameters
-       (declare (in) vec3 arg0))
-     ((return (expression vec3 trunc (var_ref arg0)))))
-
-   (signature vec4
-     (parameters
-       (declare (in) vec4 arg0))
-     ((return (expression vec4 trunc (var_ref arg0)))))
-))
diff --git a/src/glsl/builtins/profiles/100.frag b/src/glsl/builtins/profiles/100.frag
deleted file mode 100644
index df4c7f0..0000000
--- a/src/glsl/builtins/profiles/100.frag
+++ /dev/null
@@ -1,300 +0,0 @@
-#version 100
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2 matrixCompMult(mat2 x, mat2 y);
-mat3 matrixCompMult(mat3 x, mat3 y);
-mat4 matrixCompMult(mat4 x, mat4 y);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2D       (sampler2D sampler, vec2 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord, float bias);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCube     (samplerCube sampler, vec3 coord, float bias);
diff --git a/src/glsl/builtins/profiles/100.vert b/src/glsl/builtins/profiles/100.vert
deleted file mode 100644
index e5d96f1..0000000
--- a/src/glsl/builtins/profiles/100.vert
+++ /dev/null
@@ -1,300 +0,0 @@
-#version 100
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2 matrixCompMult(mat2 x, mat2 y);
-mat3 matrixCompMult(mat3 x, mat3 y);
-mat4 matrixCompMult(mat4 x, mat4 y);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
diff --git a/src/glsl/builtins/profiles/110.frag b/src/glsl/builtins/profiles/110.frag
deleted file mode 100644
index 25bc62c..0000000
--- a/src/glsl/builtins/profiles/110.frag
+++ /dev/null
@@ -1,364 +0,0 @@
-#version 110
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2 matrixCompMult(mat2 x, mat2 y);
-mat3 matrixCompMult(mat3 x, mat3 y);
-mat4 matrixCompMult(mat4 x, mat4 y);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1D       (sampler1D sampler, float coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord, float bias);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2D       (sampler2D sampler, vec2 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord, float bias);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3D       (sampler3D sampler, vec3 coord, float bias);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord, float bias);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCube     (samplerCube sampler, vec3 coord, float bias);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord, float bias);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord, float bias);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord, float bias);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord, float bias);
-
-
-/*
- * 8.8 - Fragment Processing Functions
- */
-float dFdx(float p);
-vec2  dFdx(vec2  p);
-vec3  dFdx(vec3  p);
-vec4  dFdx(vec4  p);
-
-float dFdy(float p);
-vec2  dFdy(vec2  p);
-vec3  dFdy(vec3  p);
-vec4  dFdy(vec4  p);
-
-float fwidth(float p);
-vec2  fwidth(vec2  p);
-vec3  fwidth(vec3  p);
-vec4  fwidth(vec4  p);
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/110.vert b/src/glsl/builtins/profiles/110.vert
deleted file mode 100644
index 545e59c..0000000
--- a/src/glsl/builtins/profiles/110.vert
+++ /dev/null
@@ -1,351 +0,0 @@
-#version 110
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-vec4 ftransform();
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2 matrixCompMult(mat2 x, mat2 y);
-mat3 matrixCompMult(mat3 x, mat3 y);
-mat4 matrixCompMult(mat4 x, mat4 y);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1DLod    (sampler1D sampler, float coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec2  coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec4  coord, float lod);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3DLod    (sampler3D sampler, vec3 coord, float lod);
-vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1DLod    (sampler1DShadow sampler, vec3 coord, float lod);
-vec4 shadow2DLod    (sampler2DShadow sampler, vec3 coord, float lod);
-vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
-vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
-
-/*
- * 8.8 - Fragment Processing Functions (none in vertex shader)
- */
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/120.frag b/src/glsl/builtins/profiles/120.frag
deleted file mode 100644
index a207435..0000000
--- a/src/glsl/builtins/profiles/120.frag
+++ /dev/null
@@ -1,396 +0,0 @@
-#version 120
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2   matrixCompMult(mat2   x, mat2   y);
-mat3   matrixCompMult(mat3   x, mat3   y);
-mat4   matrixCompMult(mat4   x, mat4   y);
-mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
-mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
-mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
-mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
-mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
-mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
-
-mat2   outerProduct(vec2 c, vec2 r);
-mat3   outerProduct(vec3 c, vec3 r);
-mat4   outerProduct(vec4 c, vec4 r);
-
-mat2x3 outerProduct(vec3 c, vec2 r);
-mat3x2 outerProduct(vec2 c, vec3 r);
-
-mat2x4 outerProduct(vec4 c, vec2 r);
-mat4x2 outerProduct(vec2 c, vec4 r);
-
-mat3x4 outerProduct(vec4 c, vec3 r);
-mat4x3 outerProduct(vec3 c, vec4 r);
-
-mat2   transpose(mat2 m);
-mat3   transpose(mat3 m);
-mat4   transpose(mat4 m);
-
-mat2x3 transpose(mat3x2 m);
-mat3x2 transpose(mat2x3 m);
-
-mat2x4 transpose(mat4x2 m);
-mat4x2 transpose(mat2x4 m);
-
-mat3x4 transpose(mat4x3 m);
-mat4x3 transpose(mat3x4 m);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1D       (sampler1D sampler, float coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord, float bias);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2D       (sampler2D sampler, vec2 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord, float bias);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3D       (sampler3D sampler, vec3 coord, float bias);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord, float bias);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCube     (samplerCube sampler, vec3 coord, float bias);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord, float bias);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord, float bias);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord, float bias);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord, float bias);
-
-
-/*
- * 8.8 - Fragment Processing Functions
- */
-float dFdx(float p);
-vec2  dFdx(vec2  p);
-vec3  dFdx(vec3  p);
-vec4  dFdx(vec4  p);
-
-float dFdy(float p);
-vec2  dFdy(vec2  p);
-vec3  dFdy(vec3  p);
-vec4  dFdy(vec4  p);
-
-float fwidth(float p);
-vec2  fwidth(vec2  p);
-vec3  fwidth(vec3  p);
-vec4  fwidth(vec4  p);
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/120.vert b/src/glsl/builtins/profiles/120.vert
deleted file mode 100644
index e14c931..0000000
--- a/src/glsl/builtins/profiles/120.vert
+++ /dev/null
@@ -1,383 +0,0 @@
-#version 120
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-vec4 ftransform();
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2   matrixCompMult(mat2   x, mat2   y);
-mat3   matrixCompMult(mat3   x, mat3   y);
-mat4   matrixCompMult(mat4   x, mat4   y);
-mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
-mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
-mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
-mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
-mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
-mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
-
-mat2   outerProduct(vec2 c, vec2 r);
-mat3   outerProduct(vec3 c, vec3 r);
-mat4   outerProduct(vec4 c, vec4 r);
-
-mat2x3 outerProduct(vec3 c, vec2 r);
-mat3x2 outerProduct(vec2 c, vec3 r);
-
-mat2x4 outerProduct(vec4 c, vec2 r);
-mat4x2 outerProduct(vec2 c, vec4 r);
-
-mat3x4 outerProduct(vec4 c, vec3 r);
-mat4x3 outerProduct(vec3 c, vec4 r);
-
-mat2   transpose(mat2 m);
-mat3   transpose(mat3 m);
-mat4   transpose(mat4 m);
-
-mat2x3 transpose(mat3x2 m);
-mat3x2 transpose(mat2x3 m);
-
-mat2x4 transpose(mat4x2 m);
-mat4x2 transpose(mat2x4 m);
-
-mat3x4 transpose(mat4x3 m);
-mat4x3 transpose(mat3x4 m);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1DLod    (sampler1D sampler, float coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec2  coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec4  coord, float lod);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3DLod    (sampler3D sampler, vec3 coord, float lod);
-vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1DLod    (sampler1DShadow sampler, vec3 coord, float lod);
-vec4 shadow2DLod    (sampler2DShadow sampler, vec3 coord, float lod);
-vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
-vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
-
-/*
- * 8.8 - Fragment Processing Functions (none in vertex shader)
- */
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/130.frag b/src/glsl/builtins/profiles/130.frag
deleted file mode 100644
index 329116f..0000000
--- a/src/glsl/builtins/profiles/130.frag
+++ /dev/null
@@ -1,1049 +0,0 @@
-#version 130
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-float sinh(float x);
-vec2  sinh(vec2  x);
-vec3  sinh(vec3  x);
-vec4  sinh(vec4  x);
-
-float cosh(float x);
-vec2  cosh(vec2  x);
-vec3  cosh(vec3  x);
-vec4  cosh(vec4  x);
-
-float tanh(float x);
-vec2  tanh(vec2  x);
-vec3  tanh(vec3  x);
-vec4  tanh(vec4  x);
-
-float asinh(float x);
-vec2  asinh(vec2  x);
-vec3  asinh(vec3  x);
-vec4  asinh(vec4  x);
-
-float acosh(float x);
-vec2  acosh(vec2  x);
-vec3  acosh(vec3  x);
-vec4  acosh(vec4  x);
-
-float atanh(float x);
-vec2  atanh(vec2  x);
-vec3  atanh(vec3  x);
-vec4  atanh(vec4  x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-int   abs(int   x);
-ivec2 abs(ivec2 x);
-ivec3 abs(ivec3 x);
-ivec4 abs(ivec4 x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-int   sign(int   x);
-ivec2 sign(ivec2 x);
-ivec3 sign(ivec3 x);
-ivec4 sign(ivec4 x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float trunc(float x);
-vec2  trunc(vec2  x);
-vec3  trunc(vec3  x);
-vec4  trunc(vec4  x);
-
-float round(float x);
-vec2  round(vec2  x);
-vec3  round(vec3  x);
-vec4  round(vec4  x);
-
-float roundEven(float x);
-vec2  roundEven(vec2  x);
-vec3  roundEven(vec3  x);
-vec4  roundEven(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float modf(float x, out float i);
-vec2  modf(vec2  x, out vec2  i);
-vec3  modf(vec3  x, out vec3  i);
-vec4  modf(vec4  x, out vec4  i);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-int   min(int   x, int   y);
-ivec2 min(ivec2 x, ivec2 y);
-ivec3 min(ivec3 x, ivec3 y);
-ivec4 min(ivec4 x, ivec4 y);
-
-ivec2 min(ivec2 x, int   y);
-ivec3 min(ivec3 x, int   y);
-ivec4 min(ivec4 x, int   y);
-
-uint  min(uint  x, uint  y);
-uvec2 min(uvec2 x, uvec2 y);
-uvec3 min(uvec3 x, uvec3 y);
-uvec4 min(uvec4 x, uvec4 y);
-
-uvec2 min(uvec2 x, uint  y);
-uvec3 min(uvec3 x, uint  y);
-uvec4 min(uvec4 x, uint  y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-int   max(int   x, int   y);
-ivec2 max(ivec2 x, ivec2 y);
-ivec3 max(ivec3 x, ivec3 y);
-ivec4 max(ivec4 x, ivec4 y);
-
-ivec2 max(ivec2 x, int   y);
-ivec3 max(ivec3 x, int   y);
-ivec4 max(ivec4 x, int   y);
-
-uint  max(uint  x, uint  y);
-uvec2 max(uvec2 x, uvec2 y);
-uvec3 max(uvec3 x, uvec3 y);
-uvec4 max(uvec4 x, uvec4 y);
-
-uvec2 max(uvec2 x, uint  y);
-uvec3 max(uvec3 x, uint  y);
-uvec4 max(uvec4 x, uint  y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-int   clamp(int   x, int   minVal, int   maxVal);
-ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
-ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
-ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
-
-ivec2 clamp(ivec2 x, int   minVal, int   maxVal);
-ivec3 clamp(ivec3 x, int   minVal, int   maxVal);
-ivec4 clamp(ivec4 x, int   minVal, int   maxVal);
-
-uint  clamp(uint  x, uint  minVal, uint  maxVal);
-uvec2 clamp(uvec2 x, uvec2 minVal, uvec2 maxVal);
-uvec3 clamp(uvec3 x, uvec3 minVal, uvec3 maxVal);
-uvec4 clamp(uvec4 x, uvec4 minVal, uvec4 maxVal);
-
-uvec2 clamp(uvec2 x, uint  minVal, uint  maxVal);
-uvec3 clamp(uvec3 x, uint  minVal, uint  maxVal);
-uvec4 clamp(uvec4 x, uint  minVal, uint  maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-#if 0
-bool  isnan(float x);
-bvec2 isnan(vec2  x);
-bvec3 isnan(vec3  x);
-bvec4 isnan(vec4  x);
-
-bool  isinf(float x);
-bvec2 isinf(vec2  x);
-bvec3 isinf(vec3  x);
-bvec4 isinf(vec4  x);
-#endif
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2   matrixCompMult(mat2   x, mat2   y);
-mat3   matrixCompMult(mat3   x, mat3   y);
-mat4   matrixCompMult(mat4   x, mat4   y);
-mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
-mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
-mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
-mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
-mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
-mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
-
-mat2   outerProduct(vec2 c, vec2 r);
-mat3   outerProduct(vec3 c, vec3 r);
-mat4   outerProduct(vec4 c, vec4 r);
-
-mat2x3 outerProduct(vec3 c, vec2 r);
-mat3x2 outerProduct(vec2 c, vec3 r);
-
-mat2x4 outerProduct(vec4 c, vec2 r);
-mat4x2 outerProduct(vec2 c, vec4 r);
-
-mat3x4 outerProduct(vec4 c, vec3 r);
-mat4x3 outerProduct(vec3 c, vec4 r);
-
-mat2   transpose(mat2 m);
-mat3   transpose(mat3 m);
-mat4   transpose(mat4 m);
-
-mat2x3 transpose(mat3x2 m);
-mat3x2 transpose(mat2x3 m);
-
-mat2x4 transpose(mat4x2 m);
-mat4x2 transpose(mat2x4 m);
-
-mat3x4 transpose(mat4x3 m);
-mat4x3 transpose(mat3x4 m);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-bvec2 lessThan(uvec2 x, uvec2 y);
-bvec3 lessThan(uvec3 x, uvec3 y);
-bvec4 lessThan(uvec4 x, uvec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-bvec2 lessThanEqual(uvec2 x, uvec2 y);
-bvec3 lessThanEqual(uvec3 x, uvec3 y);
-bvec4 lessThanEqual(uvec4 x, uvec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-bvec2 greaterThan(uvec2 x, uvec2 y);
-bvec3 greaterThan(uvec3 x, uvec3 y);
-bvec4 greaterThan(uvec4 x, uvec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-bvec2 greaterThanEqual(uvec2 x, uvec2 y);
-bvec3 greaterThanEqual(uvec3 x, uvec3 y);
-bvec4 greaterThanEqual(uvec4 x, uvec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(uvec2 x, uvec2 y);
-bvec3 equal(uvec3 x, uvec3 y);
-bvec4 equal(uvec4 x, uvec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(uvec2 x, uvec2 y);
-bvec3 notEqual(uvec3 x, uvec3 y);
-bvec4 notEqual(uvec4 x, uvec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-
-#if 0
-/* textureSize */
-int   textureSize( sampler1D sampler, int lod);
-int   textureSize(isampler1D sampler, int lod);
-int   textureSize(usampler1D sampler, int lod);
-
-ivec2 textureSize( sampler2D sampler, int lod);
-ivec2 textureSize(isampler2D sampler, int lod);
-ivec2 textureSize(usampler2D sampler, int lod);
-
-ivec3 textureSize( sampler3D sampler, int lod);
-ivec3 textureSize(isampler3D sampler, int lod);
-ivec3 textureSize(usampler3D sampler, int lod);
-
-ivec2 textureSize( samplerCube sampler, int lod);
-ivec2 textureSize(isamplerCube sampler, int lod);
-ivec2 textureSize(usamplerCube sampler, int lod);
-
-int   textureSize(sampler1DShadow   sampler, int lod);
-ivec2 textureSize(sampler2DShadow   sampler, int lod);
-ivec2 textureSize(samplerCubeShadow sampler, int lod);
-
-ivec2 textureSize( sampler1DArray sampler, int lod);
-ivec2 textureSize(isampler1DArray sampler, int lod);
-ivec2 textureSize(usampler1DArray sampler, int lod);
-ivec3 textureSize( sampler2DArray sampler, int lod);
-ivec2 textureSize(isampler2DArray sampler, int lod);
-ivec2 textureSize(usampler2DArray sampler, int lod);
-
-ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
-ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
-#endif
-
-/* texture - no bias */
- vec4 texture( sampler1D sampler, float P);
-ivec4 texture(isampler1D sampler, float P);
-uvec4 texture(usampler1D sampler, float P);
-
- vec4 texture( sampler2D sampler, vec2 P);
-ivec4 texture(isampler2D sampler, vec2 P);
-uvec4 texture(usampler2D sampler, vec2 P);
-
- vec4 texture( sampler3D sampler, vec3 P);
-ivec4 texture(isampler3D sampler, vec3 P);
-uvec4 texture(usampler3D sampler, vec3 P);
-
- vec4 texture( samplerCube sampler, vec3 P);
-ivec4 texture(isamplerCube sampler, vec3 P);
-uvec4 texture(usamplerCube sampler, vec3 P);
-
-float texture(sampler1DShadow   sampler, vec3 P);
-float texture(sampler2DShadow   sampler, vec3 P);
-float texture(samplerCubeShadow sampler, vec4 P);
-
- vec4 texture( sampler1DArray sampler, vec2 P);
-ivec4 texture(isampler1DArray sampler, vec2 P);
-uvec4 texture(usampler1DArray sampler, vec2 P);
-
- vec4 texture( sampler2DArray sampler, vec3 P);
-ivec4 texture(isampler2DArray sampler, vec3 P);
-uvec4 texture(usampler2DArray sampler, vec3 P);
-
-float texture(sampler1DArrayShadow sampler, vec3 P);
-float texture(sampler2DArrayShadow sampler, vec4 P);
-
-/* texture - bias variants */
- vec4 texture( sampler1D sampler, float P, float bias);
-ivec4 texture(isampler1D sampler, float P, float bias);
-uvec4 texture(usampler1D sampler, float P, float bias);
-
- vec4 texture( sampler2D sampler, vec2 P, float bias);
-ivec4 texture(isampler2D sampler, vec2 P, float bias);
-uvec4 texture(usampler2D sampler, vec2 P, float bias);
-
- vec4 texture( sampler3D sampler, vec3 P, float bias);
-ivec4 texture(isampler3D sampler, vec3 P, float bias);
-uvec4 texture(usampler3D sampler, vec3 P, float bias);
-
- vec4 texture( samplerCube sampler, vec3 P, float bias);
-ivec4 texture(isamplerCube sampler, vec3 P, float bias);
-uvec4 texture(usamplerCube sampler, vec3 P, float bias);
-
-float texture(sampler1DShadow   sampler, vec3 P, float bias);
-float texture(sampler2DShadow   sampler, vec3 P, float bias);
-float texture(samplerCubeShadow sampler, vec4 P, float bias);
-
- vec4 texture( sampler1DArray sampler, vec2 P, float bias);
-ivec4 texture(isampler1DArray sampler, vec2 P, float bias);
-uvec4 texture(usampler1DArray sampler, vec2 P, float bias);
-
- vec4 texture( sampler2DArray sampler, vec3 P, float bias);
-ivec4 texture(isampler2DArray sampler, vec3 P, float bias);
-uvec4 texture(usampler2DArray sampler, vec3 P, float bias);
-
-float texture(sampler1DArrayShadow sampler, vec3 P, float bias);
-
-/* textureProj - no bias */
- vec4 textureProj( sampler1D sampler, vec2 P);
-ivec4 textureProj(isampler1D sampler, vec2 P);
-uvec4 textureProj(usampler1D sampler, vec2 P);
- vec4 textureProj( sampler1D sampler, vec4 P);
-ivec4 textureProj(isampler1D sampler, vec4 P);
-uvec4 textureProj(usampler1D sampler, vec4 P);
-
- vec4 textureProj( sampler2D sampler, vec3 P);
-ivec4 textureProj(isampler2D sampler, vec3 P);
-uvec4 textureProj(usampler2D sampler, vec3 P);
- vec4 textureProj( sampler2D sampler, vec4 P);
-ivec4 textureProj(isampler2D sampler, vec4 P);
-uvec4 textureProj(usampler2D sampler, vec4 P);
-
- vec4 textureProj( sampler3D sampler, vec4 P);
-ivec4 textureProj(isampler3D sampler, vec4 P);
-uvec4 textureProj(usampler3D sampler, vec4 P);
-
-float textureProj(sampler1DShadow sampler, vec4 P);
-float textureProj(sampler2DShadow sampler, vec4 P);
-
-/* textureProj - bias variants */
- vec4 textureProj( sampler1D sampler, vec2 P, float bias);
-ivec4 textureProj(isampler1D sampler, vec2 P, float bias);
-uvec4 textureProj(usampler1D sampler, vec2 P, float bias);
- vec4 textureProj( sampler1D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler1D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler1D sampler, vec4 P, float bias);
-
- vec4 textureProj( sampler2D sampler, vec3 P, float bias);
-ivec4 textureProj(isampler2D sampler, vec3 P, float bias);
-uvec4 textureProj(usampler2D sampler, vec3 P, float bias);
- vec4 textureProj( sampler2D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler2D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler2D sampler, vec4 P, float bias);
-
- vec4 textureProj( sampler3D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler3D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler3D sampler, vec4 P, float bias);
-
-float textureProj(sampler1DShadow sampler, vec4 P, float bias);
-float textureProj(sampler2DShadow sampler, vec4 P, float bias);
-
-/* textureLod */
- vec4 textureLod( sampler1D sampler, float P, float lod);
-ivec4 textureLod(isampler1D sampler, float P, float lod);
-uvec4 textureLod(usampler1D sampler, float P, float lod);
-
- vec4 textureLod( sampler2D sampler, vec2 P, float lod);
-ivec4 textureLod(isampler2D sampler, vec2 P, float lod);
-uvec4 textureLod(usampler2D sampler, vec2 P, float lod);
-
- vec4 textureLod( sampler3D sampler, vec3 P, float lod);
-ivec4 textureLod(isampler3D sampler, vec3 P, float lod);
-uvec4 textureLod(usampler3D sampler, vec3 P, float lod);
-
- vec4 textureLod( samplerCube sampler, vec3 P, float lod);
-ivec4 textureLod(isamplerCube sampler, vec3 P, float lod);
-uvec4 textureLod(usamplerCube sampler, vec3 P, float lod);
-
-float textureLod(sampler1DShadow sampler, vec3 P, float lod);
-float textureLod(sampler2DShadow sampler, vec3 P, float lod);
-
- vec4 textureLod( sampler1DArray sampler, vec2 P, float lod);
-ivec4 textureLod(isampler1DArray sampler, vec2 P, float lod);
-uvec4 textureLod(usampler1DArray sampler, vec2 P, float lod);
-
- vec4 textureLod( sampler2DArray sampler, vec3 P, float lod);
-ivec4 textureLod(isampler2DArray sampler, vec3 P, float lod);
-uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
-
-float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-
-#if 0
-/* textureOffset - no bias */
- vec4 textureOffset( sampler1D sampler, float P, int offset);
-ivec4 textureOffset(isampler1D sampler, float P, int offset);
-uvec4 textureOffset(usampler1D sampler, float P, int offset);
-
- vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset);
-ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset);
-uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset);
-
- vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset);
-ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset);
-uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset);
-
-float textureOffset(sampler1DShadow sampler, vec3 P, int offset);
-float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset);
-
- vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset);
-ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset);
-uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset);
-
- vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset);
-ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset);
-uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset);
-
-float textureOffset(sampler1DArrayShadow sampler, vec3 P, int offset);
-
-/* textureOffset - bias variants */
- vec4 textureOffset( sampler1D sampler, float P, int offset, float bias);
-ivec4 textureOffset(isampler1D sampler, float P, int offset, float bias);
-uvec4 textureOffset(usampler1D sampler, float P, int offset, float bias);
-
- vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset, float bias);
-ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset, float bias);
-uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset, float bias);
-
- vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset, float bias);
-ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset, float bias);
-uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset, float bias);
-
-float textureOffset(sampler1DShadow sampler, vec3 P, int offset, float bias);
-float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset, float bias);
-
- vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset, float bias);
-ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset, float bias);
-uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset, float bias);
-
- vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-
-float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
-
-/* texelFetch */
- vec4 texelFetch( sampler1D sampler, int P, int lod);
-ivec4 texelFetch(isampler1D sampler, int P, int lod);
-uvec4 texelFetch(usampler1D sampler, int P, int lod);
-
- vec4 texelFetch( sampler2D sampler, ivec2 P, int lod);
-ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod);
-uvec4 texelFetch(usampler2D sampler, ivec2 P, int lod);
-
- vec4 texelFetch( sampler3D sampler, ivec3 P, int lod);
-ivec4 texelFetch(isampler3D sampler, ivec3 P, int lod);
-uvec4 texelFetch(usampler3D sampler, ivec3 P, int lod);
-
- vec4 texelFetch( sampler1DArray sampler, ivec2 P, int lod);
-ivec4 texelFetch(isampler1DArray sampler, ivec2 P, int lod);
-uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
-
- vec4 texelFetch( sampler2DArray sampler, ivec3 P, int lod);
-ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
-uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-
-#if 0
-/* texelFetchOffset */
- vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
-ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
-uvec4 texelFetchOffset(usampler1D sampler, int P, int lod, int offset);
-
- vec4 texelFetchOffset( sampler2D sampler, ivec2 P, int lod, ivec2 offset);
-ivec4 texelFetchOffset(isampler2D sampler, ivec2 P, int lod, ivec2 offset);
-uvec4 texelFetchOffset(usampler2D sampler, ivec2 P, int lod, ivec2 offset);
-
- vec4 texelFetchOffset( sampler3D sampler, ivec3 P, int lod, ivec3 offset);
-ivec4 texelFetchOffset(isampler3D sampler, ivec3 P, int lod, ivec3 offset);
-uvec4 texelFetchOffset(usampler3D sampler, ivec3 P, int lod, ivec3 offset);
-
- vec4 texelFetchOffset( sampler1DArray sampler, ivec2 P, int lod, int offset);
-ivec4 texelFetchOffset(isampler1DArray sampler, ivec2 P, int lod, int offset);
-uvec4 texelFetchOffset(usampler1DArray sampler, ivec2 P, int lod, int offset);
-
- vec4 texelFetchOffset( sampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-ivec4 texelFetchOffset(isampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-uvec4 texelFetchOffset(usampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-
-/* textureProjOffset - no bias */
- vec4 textureProj( sampler1D sampler, vec2 P, int offset);
-ivec4 textureProj(isampler1D sampler, vec2 P, int offset);
-uvec4 textureProj(usampler1D sampler, vec2 P, int offset);
- vec4 textureProj( sampler1D sampler, vec4 P, int offset);
-ivec4 textureProj(isampler1D sampler, vec4 P, int offset);
-uvec4 textureProj(usampler1D sampler, vec4 P, int offset);
-
- vec4 textureProj( sampler2D sampler, vec3 P, ivec2 offset);
-ivec4 textureProj(isampler2D sampler, vec3 P, ivec2 offset);
-uvec4 textureProj(usampler2D sampler, vec3 P, ivec2 offset);
- vec4 textureProj( sampler2D sampler, vec4 P, ivec2 offset);
-ivec4 textureProj(isampler2D sampler, vec4 P, ivec2 offset);
-uvec4 textureProj(usampler2D sampler, vec4 P, ivec2 offset);
-
- vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset);
-ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset);
-uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset);
-
-float textureProj(sampler1DShadow sampler, vec4 P, int offset);
-float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset);
-
-/* textureProjOffset - bias variants */
- vec4 textureProj( sampler1D sampler, vec2 P, int offset, float bias);
-ivec4 textureProj(isampler1D sampler, vec2 P, int offset, float bias);
-uvec4 textureProj(usampler1D sampler, vec2 P, int offset, float bias);
- vec4 textureProj( sampler1D sampler, vec4 P, int offset, float bias);
-ivec4 textureProj(isampler1D sampler, vec4 P, int offset, float bias);
-uvec4 textureProj(usampler1D sampler, vec4 P, int offset, float bias);
-
- vec4 textureProj( sampler2D sampler, vec3 P, ivec2 offset, float bias);
-ivec4 textureProj(isampler2D sampler, vec3 P, ivec2 offset, float bias);
-uvec4 textureProj(usampler2D sampler, vec3 P, ivec2 offset, float bias);
- vec4 textureProj( sampler2D sampler, vec4 P, ivec2 offset, float bias);
-ivec4 textureProj(isampler2D sampler, vec4 P, ivec2 offset, float bias);
-uvec4 textureProj(usampler2D sampler, vec4 P, ivec2 offset, float bias);
-
- vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset, float bias);
-ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset, float bias);
-uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset, float bias);
-
-float textureProj(sampler1DShadow sampler, vec4 P, int offset, float bias);
-float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset, float bias);
-
-/* textureLodOffset */
- vec4 textureLodOffset( sampler1D sampler, float P, float lod, int offset);
-ivec4 textureLodOffset(isampler1D sampler, float P, float lod, int offset);
-uvec4 textureLodOffset(usampler1D sampler, float P, float lod, int offset);
-
- vec4 textureLodOffset( sampler2D sampler, vec2 P, float lod, ivec2 offset);
-ivec4 textureLodOffset(isampler2D sampler, vec2 P, float lod, ivec2 offset);
-uvec4 textureLodOffset(usampler2D sampler, vec2 P, float lod, ivec2 offset);
-
- vec4 textureLodOffset( sampler3D sampler, vec3 P, float lod, ivec3 offset);
-ivec4 textureLodOffset(isampler3D sampler, vec3 P, float lod, ivec3 offset);
-uvec4 textureLodOffset(usampler3D sampler, vec3 P, float lod, ivec3 offset);
-
-float textureLodOffset(sampler1DShadow samp, vec3 P, float lod, int offset);
-float textureLodOffset(sampler2DShadow samp, vec3 P, float lod, ivec2 offset);
-
- vec4 textureLodOffset( sampler1DArray sampler, vec2 P, float lod, int offset);
-ivec4 textureLodOffset(isampler1DArray sampler, vec2 P, float lod, int offset);
-uvec4 textureLodOffset(usampler1DArray sampler, vec2 P, float lod, int offset);
-
- vec4 textureLodOffset( sampler2DArray samp, vec3 P, float lod, ivec2 offset);
-ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
-uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
-
-float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
-
-/* textureProjLod */
- vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
-ivec4 textureProjLod(isampler1D sampler, vec2 P, float lod);
-uvec4 textureProjLod(usampler1D sampler, vec2 P, float lod);
- vec4 textureProjLod( sampler1D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler1D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler1D sampler, vec4 P, float lod);
-
- vec4 textureProjLod( sampler2D sampler, vec3 P, float lod);
-ivec4 textureProjLod(isampler2D sampler, vec3 P, float lod);
-uvec4 textureProjLod(usampler2D sampler, vec3 P, float lod);
- vec4 textureProjLod( sampler2D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler2D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler2D sampler, vec4 P, float lod);
-
- vec4 textureProjLod( sampler3D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler3D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
-
-float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
-float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-
-#if 0
-/* textureProjLodOffset */
- vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
-ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
-uvec4 textureProjLodOffset(usampler1D sampler, vec2 P, float lod, int offset);
- vec4 textureProjLodOffset( sampler1D sampler, vec4 P, float lod, int offset);
-ivec4 textureProjLodOffset(isampler1D sampler, vec4 P, float lod, int offset);
-uvec4 textureProjLodOffset(usampler1D sampler, vec4 P, float lod, int offset);
-
- vec4 textureProjLodOffset( sampler2D sampler, vec3 P, float lod, ivec2 offset);
-ivec4 textureProjLodOffset(isampler2D sampler, vec3 P, float lod, ivec2 offset);
-uvec4 textureProjLodOffset(usampler2D sampler, vec3 P, float lod, ivec2 offset);
- vec4 textureProjLodOffset( sampler2D sampler, vec4 P, float lod, ivec2 offset);
-ivec4 textureProjLodOffset(isampler2D sampler, vec4 P, float lod, ivec2 offset);
-uvec4 textureProjLodOffset(usampler2D sampler, vec4 P, float lod, ivec2 offset);
-
- vec4 textureProjLodOffset( sampler3D sampler, vec4 P, float lod, ivec3 offset);
-ivec4 textureProjLodOffset(isampler3D sampler, vec4 P, float lod, ivec3 offset);
-uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
-
-float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
-float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
-
-/* textureGrad */
- vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
-ivec4 textureGrad(isampler1D sampler, float P, float dPdx, float dPdy);
-uvec4 textureGrad(usampler1D sampler, float P, float dPdx, float dPdy);
-
- vec4 textureGrad( sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureGrad(isampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureGrad(usampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-
- vec4 textureGrad( sampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureGrad(isampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureGrad(usampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-
- vec4 textureGrad( samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureGrad(isamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureGrad(usamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-
-float textureGrad(sampler1DShadow   sampler, vec3 P, float dPdx, float dPdy);
-float textureGrad(sampler2DShadow   sampler, vec3 P, vec2  dPdx, vec2  dPdy);
-float textureGrad(samplerCubeShadow sampler, vec4 P, vec3  dPdx, vec3  dPdy);
-
- vec4 textureGrad( sampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-ivec4 textureGrad(isampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-uvec4 textureGrad(usampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-
- vec4 textureGrad( sampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureGrad(isampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-
-float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
-float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
-
-#if 0
-/* textureGradOffset */
- vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
-ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
-uvec4 textureGradOffset(usampler1D s, float P, float dx, float dy, int offset);
-
- vec4 textureGradOffset( sampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-ivec4 textureGradOffset(isampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-uvec4 textureGradOffset(usampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-
- vec4 textureGradOffset( sampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-ivec4 textureGradOffset(isampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-uvec4 textureGradOffset(usampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-
- vec4 textureGradOffset( samplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-ivec4 textureGradOffset(isamplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-uvec4 textureGradOffset(usamplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-
-float textureGradOffset(sampler1DShadow s, vec3 P, float dx, float dy, int off);
-float textureGradOffset(sampler2DShadow s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-
- vec4 textureGradOffset( sampler1DArray s, vec2 P, float dx, float dy, int off);
-ivec4 textureGradOffset(isampler1DArray s, vec2 P, float dx, float dy, int off);
-uvec4 textureGradOffset(usampler1DArray s, vec2 P, float dx, float dy, int off);
-
- vec4 textureGradOffset( sampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureGradOffset(isampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-
-float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
-float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
-
-/* textureProjGrad */
- vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
-ivec4 textureProjGrad(isampler1D sampler, vec2 P, float dPdx, float dPdy);
-uvec4 textureProjGrad(usampler1D sampler, vec2 P, float dPdx, float dPdy);
- vec4 textureProjGrad( sampler1D sampler, vec4 P, float dPdx, float dPdy);
-ivec4 textureProjGrad(isampler1D sampler, vec4 P, float dPdx, float dPdy);
-uvec4 textureProjGrad(usampler1D sampler, vec4 P, float dPdx, float dPdy);
-
- vec4 textureProjGrad( sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureProjGrad(isampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureProjGrad(usampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
- vec4 textureProjGrad( sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureProjGrad(isampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureProjGrad(usampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-
- vec4 textureProjGrad( sampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureProjGrad(isampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-
-float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
-float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
-
-#if 0
-/* textureProjGradOffset */
- vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
-ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
-uvec4 textureProjGradOffset(usampler1D s, vec2 P, float dx, float dy, int off);
- vec4 textureProjGradOffset( sampler1D s, vec4 P, float dx, float dy, int off);
-ivec4 textureProjGradOffset(isampler1D s, vec4 P, float dx, float dy, int off);
-uvec4 textureProjGradOffset(usampler1D s, vec4 P, float dx, float dy, int off);
-
- vec4 textureProjGradOffset( sampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureProjGradOffset(isampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureProjGradOffset(usampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
- vec4 textureProjGradOffset( sampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureProjGradOffset(isampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureProjGradOffset(usampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-
- vec4 textureProjGradOffset( sampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-ivec4 textureProjGradOffset(isampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-
-float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
-float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
-
-/*
- * The following texture functions are deprecated:
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1D       (sampler1D sampler, float coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord, float bias);
-vec4 texture1DLod    (sampler1D sampler, float coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec2  coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec4  coord, float lod);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2D       (sampler2D sampler, vec2 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord, float bias);
-vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3D       (sampler3D sampler, vec3 coord, float bias);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord, float bias);
-vec4 texture3DLod    (sampler3D sampler, vec3 coord, float lod);
-vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCube     (samplerCube sampler, vec3 coord, float bias);
-vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord, float bias);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord, float bias);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord, float bias);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord, float bias);
-vec4 shadow1DLod    (sampler1DShadow sampler, vec3 coord, float lod);
-vec4 shadow2DLod    (sampler2DShadow sampler, vec3 coord, float lod);
-vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
-vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
-
-/*
- * 8.8 - Fragment Processing Functions
- */
-float dFdx(float p);
-vec2  dFdx(vec2  p);
-vec3  dFdx(vec3  p);
-vec4  dFdx(vec4  p);
-
-float dFdy(float p);
-vec2  dFdy(vec2  p);
-vec3  dFdy(vec3  p);
-vec4  dFdy(vec4  p);
-
-float fwidth(float p);
-vec2  fwidth(vec2  p);
-vec3  fwidth(vec3  p);
-vec4  fwidth(vec4  p);
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/130.vert b/src/glsl/builtins/profiles/130.vert
deleted file mode 100644
index 1c212eb..0000000
--- a/src/glsl/builtins/profiles/130.vert
+++ /dev/null
@@ -1,1037 +0,0 @@
-#version 130
-/*
- * 8.1 - Angle and Trigonometry Functions
- */
-float radians(float degrees);
-vec2  radians(vec2  degrees);
-vec3  radians(vec3  degrees);
-vec4  radians(vec4  degrees);
-
-float degrees(float radians);
-vec2  degrees(vec2  radians);
-vec3  degrees(vec3  radians);
-vec4  degrees(vec4  radians);
-
-float sin(float angle);
-vec2  sin(vec2  angle);
-vec3  sin(vec3  angle);
-vec4  sin(vec4  angle);
-
-float cos(float angle);
-vec2  cos(vec2  angle);
-vec3  cos(vec3  angle);
-vec4  cos(vec4  angle);
-
-float tan(float angle);
-vec2  tan(vec2  angle);
-vec3  tan(vec3  angle);
-vec4  tan(vec4  angle);
-
-float asin(float angle);
-vec2  asin(vec2  angle);
-vec3  asin(vec3  angle);
-vec4  asin(vec4  angle);
-
-float acos(float angle);
-vec2  acos(vec2  angle);
-vec3  acos(vec3  angle);
-vec4  acos(vec4  angle);
-
-float atan(float y, float x);
-vec2  atan(vec2  y, vec2  x);
-vec3  atan(vec3  y, vec3  x);
-vec4  atan(vec4  y, vec4  x);
-
-float atan(float y_over_x);
-vec2  atan(vec2  y_over_x);
-vec3  atan(vec3  y_over_x);
-vec4  atan(vec4  y_over_x);
-
-float sinh(float x);
-vec2  sinh(vec2  x);
-vec3  sinh(vec3  x);
-vec4  sinh(vec4  x);
-
-float cosh(float x);
-vec2  cosh(vec2  x);
-vec3  cosh(vec3  x);
-vec4  cosh(vec4  x);
-
-float tanh(float x);
-vec2  tanh(vec2  x);
-vec3  tanh(vec3  x);
-vec4  tanh(vec4  x);
-
-float asinh(float x);
-vec2  asinh(vec2  x);
-vec3  asinh(vec3  x);
-vec4  asinh(vec4  x);
-
-float acosh(float x);
-vec2  acosh(vec2  x);
-vec3  acosh(vec3  x);
-vec4  acosh(vec4  x);
-
-float atanh(float x);
-vec2  atanh(vec2  x);
-vec3  atanh(vec3  x);
-vec4  atanh(vec4  x);
-
-/*
- * 8.2 - Exponential Functions
- */
-float pow(float x, float y);
-vec2  pow(vec2  x, vec2  y);
-vec3  pow(vec3  x, vec3  y);
-vec4  pow(vec4  x, vec4  y);
-
-float exp(float x);
-vec2  exp(vec2  x);
-vec3  exp(vec3  x);
-vec4  exp(vec4  x);
-
-float log(float x);
-vec2  log(vec2  x);
-vec3  log(vec3  x);
-vec4  log(vec4  x);
-
-float exp2(float x);
-vec2  exp2(vec2  x);
-vec3  exp2(vec3  x);
-vec4  exp2(vec4  x);
-
-float log2(float x);
-vec2  log2(vec2  x);
-vec3  log2(vec3  x);
-vec4  log2(vec4  x);
-
-float sqrt(float x);
-vec2  sqrt(vec2  x);
-vec3  sqrt(vec3  x);
-vec4  sqrt(vec4  x);
-
-float inversesqrt(float x);
-vec2  inversesqrt(vec2  x);
-vec3  inversesqrt(vec3  x);
-vec4  inversesqrt(vec4  x);
-
-/*
- * 8.3 - Common Functions
- */
-float abs(float x);
-vec2  abs(vec2  x);
-vec3  abs(vec3  x);
-vec4  abs(vec4  x);
-int   abs(int   x);
-ivec2 abs(ivec2 x);
-ivec3 abs(ivec3 x);
-ivec4 abs(ivec4 x);
-
-float sign(float x);
-vec2  sign(vec2  x);
-vec3  sign(vec3  x);
-vec4  sign(vec4  x);
-int   sign(int   x);
-ivec2 sign(ivec2 x);
-ivec3 sign(ivec3 x);
-ivec4 sign(ivec4 x);
-
-float floor(float x);
-vec2  floor(vec2  x);
-vec3  floor(vec3  x);
-vec4  floor(vec4  x);
-
-float trunc(float x);
-vec2  trunc(vec2  x);
-vec3  trunc(vec3  x);
-vec4  trunc(vec4  x);
-
-float round(float x);
-vec2  round(vec2  x);
-vec3  round(vec3  x);
-vec4  round(vec4  x);
-
-float roundEven(float x);
-vec2  roundEven(vec2  x);
-vec3  roundEven(vec3  x);
-vec4  roundEven(vec4  x);
-
-float ceil(float x);
-vec2  ceil(vec2  x);
-vec3  ceil(vec3  x);
-vec4  ceil(vec4  x);
-
-float fract(float x);
-vec2  fract(vec2  x);
-vec3  fract(vec3  x);
-vec4  fract(vec4  x);
-
-float mod(float x, float y);
-vec2  mod(vec2  x, float y);
-vec3  mod(vec3  x, float y);
-vec4  mod(vec4  x, float y);
-
-vec2  mod(vec2  x, vec2  y);
-vec3  mod(vec3  x, vec3  y);
-vec4  mod(vec4  x, vec4  y);
-
-float modf(float x, out float i);
-vec2  modf(vec2  x, out vec2  i);
-vec3  modf(vec3  x, out vec3  i);
-vec4  modf(vec4  x, out vec4  i);
-
-float min(float x, float y);
-vec2  min(vec2  x, vec2  y);
-vec3  min(vec3  x, vec3  y);
-vec4  min(vec4  x, vec4  y);
-
-vec2  min(vec2  x, float y);
-vec3  min(vec3  x, float y);
-vec4  min(vec4  x, float y);
-
-int   min(int   x, int   y);
-ivec2 min(ivec2 x, ivec2 y);
-ivec3 min(ivec3 x, ivec3 y);
-ivec4 min(ivec4 x, ivec4 y);
-
-ivec2 min(ivec2 x, int   y);
-ivec3 min(ivec3 x, int   y);
-ivec4 min(ivec4 x, int   y);
-
-uint  min(uint  x, uint  y);
-uvec2 min(uvec2 x, uvec2 y);
-uvec3 min(uvec3 x, uvec3 y);
-uvec4 min(uvec4 x, uvec4 y);
-
-uvec2 min(uvec2 x, uint  y);
-uvec3 min(uvec3 x, uint  y);
-uvec4 min(uvec4 x, uint  y);
-
-float max(float x, float y);
-vec2  max(vec2  x, vec2  y);
-vec3  max(vec3  x, vec3  y);
-vec4  max(vec4  x, vec4  y);
-
-vec2  max(vec2  x, float y);
-vec3  max(vec3  x, float y);
-vec4  max(vec4  x, float y);
-
-int   max(int   x, int   y);
-ivec2 max(ivec2 x, ivec2 y);
-ivec3 max(ivec3 x, ivec3 y);
-ivec4 max(ivec4 x, ivec4 y);
-
-ivec2 max(ivec2 x, int   y);
-ivec3 max(ivec3 x, int   y);
-ivec4 max(ivec4 x, int   y);
-
-uint  max(uint  x, uint  y);
-uvec2 max(uvec2 x, uvec2 y);
-uvec3 max(uvec3 x, uvec3 y);
-uvec4 max(uvec4 x, uvec4 y);
-
-uvec2 max(uvec2 x, uint  y);
-uvec3 max(uvec3 x, uint  y);
-uvec4 max(uvec4 x, uint  y);
-
-float clamp(float x, float minVal, float maxVal);
-vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
-vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
-vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
-
-vec2  clamp(vec2  x, float minVal, float maxVal);
-vec3  clamp(vec3  x, float minVal, float maxVal);
-vec4  clamp(vec4  x, float minVal, float maxVal);
-
-int   clamp(int   x, int   minVal, int   maxVal);
-ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
-ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
-ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
-
-ivec2 clamp(ivec2 x, int   minVal, int   maxVal);
-ivec3 clamp(ivec3 x, int   minVal, int   maxVal);
-ivec4 clamp(ivec4 x, int   minVal, int   maxVal);
-
-uint  clamp(uint  x, uint  minVal, uint  maxVal);
-uvec2 clamp(uvec2 x, uvec2 minVal, uvec2 maxVal);
-uvec3 clamp(uvec3 x, uvec3 minVal, uvec3 maxVal);
-uvec4 clamp(uvec4 x, uvec4 minVal, uvec4 maxVal);
-
-uvec2 clamp(uvec2 x, uint  minVal, uint  maxVal);
-uvec3 clamp(uvec3 x, uint  minVal, uint  maxVal);
-uvec4 clamp(uvec4 x, uint  minVal, uint  maxVal);
-
-float mix(float x, float y, float a);
-vec2  mix(vec2  x, vec2  y, vec2  a);
-vec3  mix(vec3  x, vec3  y, vec3  a);
-vec4  mix(vec4  x, vec4  y, vec4  a);
-
-vec2  mix(vec2  x, vec2  y, float a);
-vec3  mix(vec3  x, vec3  y, float a);
-vec4  mix(vec4  x, vec4  y, float a);
-
-float step(float edge, float x);
-vec2  step(vec2  edge, vec2  x);
-vec3  step(vec3  edge, vec3  x);
-vec4  step(vec4  edge, vec4  x);
-
-vec2  step(float edge, vec2  x);
-vec3  step(float edge, vec3  x);
-vec4  step(float edge, vec4  x);
-
-float smoothstep(float edge0, float edge1, float x);
-vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
-vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
-vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
-
-vec2  smoothstep(float edge0, float edge1, vec2  x);
-vec3  smoothstep(float edge0, float edge1, vec3  x);
-vec4  smoothstep(float edge0, float edge1, vec4  x);
-
-#if 0
-bool  isnan(float x);
-bvec2 isnan(vec2  x);
-bvec3 isnan(vec3  x);
-bvec4 isnan(vec4  x);
-
-bool  isinf(float x);
-bvec2 isinf(vec2  x);
-bvec3 isinf(vec3  x);
-bvec4 isinf(vec4  x);
-#endif
-
-/*
- * 8.4 - Geometric Functions
- */
-float length(float x);
-float length(vec2  x);
-float length(vec3  x);
-float length(vec4  x);
-
-float distance(float p0, float p1);
-float distance(vec2  p0, vec2  p1);
-float distance(vec3  p0, vec3  p1);
-float distance(vec4  p0, vec4  p1);
-
-float dot(float x, float y);
-float dot(vec2  x, vec2  y);
-float dot(vec3  x, vec3  y);
-float dot(vec4  x, vec4  y);
-
-vec3 cross(vec3 x, vec3 y);
-
-float normalize(float x);
-vec2  normalize(vec2  x);
-vec3  normalize(vec3  x);
-vec4  normalize(vec4  x);
-
-vec4 ftransform();
-
-float faceforward(float N, float I, float Nref);
-vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
-vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
-vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
-
-float reflect(float I, float N);
-vec2  reflect(vec2  I, vec2  N);
-vec3  reflect(vec3  I, vec3  N);
-vec4  reflect(vec4  I, vec4  N);
-
-float refract(float I, float N, float eta);
-vec2  refract(vec2  I, vec2  N, float eta);
-vec3  refract(vec3  I, vec3  N, float eta);
-vec4  refract(vec4  I, vec4  N, float eta);
-
-
-/*
- * 8.5 - Matrix Functions
- */
-mat2   matrixCompMult(mat2   x, mat2   y);
-mat3   matrixCompMult(mat3   x, mat3   y);
-mat4   matrixCompMult(mat4   x, mat4   y);
-mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
-mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
-mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
-mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
-mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
-mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
-
-mat2   outerProduct(vec2 c, vec2 r);
-mat3   outerProduct(vec3 c, vec3 r);
-mat4   outerProduct(vec4 c, vec4 r);
-
-mat2x3 outerProduct(vec3 c, vec2 r);
-mat3x2 outerProduct(vec2 c, vec3 r);
-
-mat2x4 outerProduct(vec4 c, vec2 r);
-mat4x2 outerProduct(vec2 c, vec4 r);
-
-mat3x4 outerProduct(vec4 c, vec3 r);
-mat4x3 outerProduct(vec3 c, vec4 r);
-
-mat2   transpose(mat2 m);
-mat3   transpose(mat3 m);
-mat4   transpose(mat4 m);
-
-mat2x3 transpose(mat3x2 m);
-mat3x2 transpose(mat2x3 m);
-
-mat2x4 transpose(mat4x2 m);
-mat4x2 transpose(mat2x4 m);
-
-mat3x4 transpose(mat4x3 m);
-mat4x3 transpose(mat3x4 m);
-
-/*
- * 8.6 - Vector Relational Functions
- */
-bvec2 lessThan( vec2 x,  vec2 y);
-bvec3 lessThan( vec3 x,  vec3 y);
-bvec4 lessThan( vec4 x,  vec4 y);
-bvec2 lessThan(ivec2 x, ivec2 y);
-bvec3 lessThan(ivec3 x, ivec3 y);
-bvec4 lessThan(ivec4 x, ivec4 y);
-bvec2 lessThan(uvec2 x, uvec2 y);
-bvec3 lessThan(uvec3 x, uvec3 y);
-bvec4 lessThan(uvec4 x, uvec4 y);
-
-bvec2 lessThanEqual( vec2 x,  vec2 y);
-bvec3 lessThanEqual( vec3 x,  vec3 y);
-bvec4 lessThanEqual( vec4 x,  vec4 y);
-bvec2 lessThanEqual(ivec2 x, ivec2 y);
-bvec3 lessThanEqual(ivec3 x, ivec3 y);
-bvec4 lessThanEqual(ivec4 x, ivec4 y);
-bvec2 lessThanEqual(uvec2 x, uvec2 y);
-bvec3 lessThanEqual(uvec3 x, uvec3 y);
-bvec4 lessThanEqual(uvec4 x, uvec4 y);
-
-bvec2 greaterThan( vec2 x,  vec2 y);
-bvec3 greaterThan( vec3 x,  vec3 y);
-bvec4 greaterThan( vec4 x,  vec4 y);
-bvec2 greaterThan(ivec2 x, ivec2 y);
-bvec3 greaterThan(ivec3 x, ivec3 y);
-bvec4 greaterThan(ivec4 x, ivec4 y);
-bvec2 greaterThan(uvec2 x, uvec2 y);
-bvec3 greaterThan(uvec3 x, uvec3 y);
-bvec4 greaterThan(uvec4 x, uvec4 y);
-
-bvec2 greaterThanEqual( vec2 x,  vec2 y);
-bvec3 greaterThanEqual( vec3 x,  vec3 y);
-bvec4 greaterThanEqual( vec4 x,  vec4 y);
-bvec2 greaterThanEqual(ivec2 x, ivec2 y);
-bvec3 greaterThanEqual(ivec3 x, ivec3 y);
-bvec4 greaterThanEqual(ivec4 x, ivec4 y);
-bvec2 greaterThanEqual(uvec2 x, uvec2 y);
-bvec3 greaterThanEqual(uvec3 x, uvec3 y);
-bvec4 greaterThanEqual(uvec4 x, uvec4 y);
-
-bvec2 equal( vec2 x,  vec2 y);
-bvec3 equal( vec3 x,  vec3 y);
-bvec4 equal( vec4 x,  vec4 y);
-bvec2 equal(ivec2 x, ivec2 y);
-bvec3 equal(ivec3 x, ivec3 y);
-bvec4 equal(ivec4 x, ivec4 y);
-bvec2 equal(uvec2 x, uvec2 y);
-bvec3 equal(uvec3 x, uvec3 y);
-bvec4 equal(uvec4 x, uvec4 y);
-bvec2 equal(bvec2 x, bvec2 y);
-bvec3 equal(bvec3 x, bvec3 y);
-bvec4 equal(bvec4 x, bvec4 y);
-
-bvec2 notEqual( vec2 x,  vec2 y);
-bvec3 notEqual( vec3 x,  vec3 y);
-bvec4 notEqual( vec4 x,  vec4 y);
-bvec2 notEqual(ivec2 x, ivec2 y);
-bvec3 notEqual(ivec3 x, ivec3 y);
-bvec4 notEqual(ivec4 x, ivec4 y);
-bvec2 notEqual(uvec2 x, uvec2 y);
-bvec3 notEqual(uvec3 x, uvec3 y);
-bvec4 notEqual(uvec4 x, uvec4 y);
-bvec2 notEqual(bvec2 x, bvec2 y);
-bvec3 notEqual(bvec3 x, bvec3 y);
-bvec4 notEqual(bvec4 x, bvec4 y);
-
-bool any(bvec2 x);
-bool any(bvec3 x);
-bool any(bvec4 x);
-
-bool all(bvec2 x);
-bool all(bvec3 x);
-bool all(bvec4 x);
-
-bvec2 not(bvec2 x);
-bvec3 not(bvec3 x);
-bvec4 not(bvec4 x);
-
-/*
- * 8.7 - Texture Lookup Functions
- */
-
-#if 0
-/* textureSize */
-int   textureSize( sampler1D sampler, int lod);
-int   textureSize(isampler1D sampler, int lod);
-int   textureSize(usampler1D sampler, int lod);
-
-ivec2 textureSize( sampler2D sampler, int lod);
-ivec2 textureSize(isampler2D sampler, int lod);
-ivec2 textureSize(usampler2D sampler, int lod);
-
-ivec3 textureSize( sampler3D sampler, int lod);
-ivec3 textureSize(isampler3D sampler, int lod);
-ivec3 textureSize(usampler3D sampler, int lod);
-
-ivec2 textureSize( samplerCube sampler, int lod);
-ivec2 textureSize(isamplerCube sampler, int lod);
-ivec2 textureSize(usamplerCube sampler, int lod);
-
-int   textureSize(sampler1DShadow   sampler, int lod);
-ivec2 textureSize(sampler2DShadow   sampler, int lod);
-ivec2 textureSize(samplerCubeShadow sampler, int lod);
-
-ivec2 textureSize( sampler1DArray sampler, int lod);
-ivec2 textureSize(isampler1DArray sampler, int lod);
-ivec2 textureSize(usampler1DArray sampler, int lod);
-ivec3 textureSize( sampler2DArray sampler, int lod);
-ivec2 textureSize(isampler2DArray sampler, int lod);
-ivec2 textureSize(usampler2DArray sampler, int lod);
-
-ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
-ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
-#endif
-
-/* texture - no bias */
- vec4 texture( sampler1D sampler, float P);
-ivec4 texture(isampler1D sampler, float P);
-uvec4 texture(usampler1D sampler, float P);
-
- vec4 texture( sampler2D sampler, vec2 P);
-ivec4 texture(isampler2D sampler, vec2 P);
-uvec4 texture(usampler2D sampler, vec2 P);
-
- vec4 texture( sampler3D sampler, vec3 P);
-ivec4 texture(isampler3D sampler, vec3 P);
-uvec4 texture(usampler3D sampler, vec3 P);
-
- vec4 texture( samplerCube sampler, vec3 P);
-ivec4 texture(isamplerCube sampler, vec3 P);
-uvec4 texture(usamplerCube sampler, vec3 P);
-
-float texture(sampler1DShadow   sampler, vec3 P);
-float texture(sampler2DShadow   sampler, vec3 P);
-float texture(samplerCubeShadow sampler, vec4 P);
-
- vec4 texture( sampler1DArray sampler, vec2 P);
-ivec4 texture(isampler1DArray sampler, vec2 P);
-uvec4 texture(usampler1DArray sampler, vec2 P);
-
- vec4 texture( sampler2DArray sampler, vec3 P);
-ivec4 texture(isampler2DArray sampler, vec3 P);
-uvec4 texture(usampler2DArray sampler, vec3 P);
-
-float texture(sampler1DArrayShadow sampler, vec3 P);
-float texture(sampler2DArrayShadow sampler, vec4 P);
-
-/* texture - bias variants */
- vec4 texture( sampler1D sampler, float P, float bias);
-ivec4 texture(isampler1D sampler, float P, float bias);
-uvec4 texture(usampler1D sampler, float P, float bias);
-
- vec4 texture( sampler2D sampler, vec2 P, float bias);
-ivec4 texture(isampler2D sampler, vec2 P, float bias);
-uvec4 texture(usampler2D sampler, vec2 P, float bias);
-
- vec4 texture( sampler3D sampler, vec3 P, float bias);
-ivec4 texture(isampler3D sampler, vec3 P, float bias);
-uvec4 texture(usampler3D sampler, vec3 P, float bias);
-
- vec4 texture( samplerCube sampler, vec3 P, float bias);
-ivec4 texture(isamplerCube sampler, vec3 P, float bias);
-uvec4 texture(usamplerCube sampler, vec3 P, float bias);
-
-float texture(sampler1DShadow   sampler, vec3 P, float bias);
-float texture(sampler2DShadow   sampler, vec3 P, float bias);
-float texture(samplerCubeShadow sampler, vec4 P, float bias);
-
- vec4 texture( sampler1DArray sampler, vec2 P, float bias);
-ivec4 texture(isampler1DArray sampler, vec2 P, float bias);
-uvec4 texture(usampler1DArray sampler, vec2 P, float bias);
-
- vec4 texture( sampler2DArray sampler, vec3 P, float bias);
-ivec4 texture(isampler2DArray sampler, vec3 P, float bias);
-uvec4 texture(usampler2DArray sampler, vec3 P, float bias);
-
-float texture(sampler1DArrayShadow sampler, vec3 P, float bias);
-
-/* textureProj - no bias */
- vec4 textureProj( sampler1D sampler, vec2 P);
-ivec4 textureProj(isampler1D sampler, vec2 P);
-uvec4 textureProj(usampler1D sampler, vec2 P);
- vec4 textureProj( sampler1D sampler, vec4 P);
-ivec4 textureProj(isampler1D sampler, vec4 P);
-uvec4 textureProj(usampler1D sampler, vec4 P);
-
- vec4 textureProj( sampler2D sampler, vec3 P);
-ivec4 textureProj(isampler2D sampler, vec3 P);
-uvec4 textureProj(usampler2D sampler, vec3 P);
- vec4 textureProj( sampler2D sampler, vec4 P);
-ivec4 textureProj(isampler2D sampler, vec4 P);
-uvec4 textureProj(usampler2D sampler, vec4 P);
-
- vec4 textureProj( sampler3D sampler, vec4 P);
-ivec4 textureProj(isampler3D sampler, vec4 P);
-uvec4 textureProj(usampler3D sampler, vec4 P);
-
-float textureProj(sampler1DShadow sampler, vec4 P);
-float textureProj(sampler2DShadow sampler, vec4 P);
-
-/* textureProj - bias variants */
- vec4 textureProj( sampler1D sampler, vec2 P, float bias);
-ivec4 textureProj(isampler1D sampler, vec2 P, float bias);
-uvec4 textureProj(usampler1D sampler, vec2 P, float bias);
- vec4 textureProj( sampler1D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler1D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler1D sampler, vec4 P, float bias);
-
- vec4 textureProj( sampler2D sampler, vec3 P, float bias);
-ivec4 textureProj(isampler2D sampler, vec3 P, float bias);
-uvec4 textureProj(usampler2D sampler, vec3 P, float bias);
- vec4 textureProj( sampler2D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler2D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler2D sampler, vec4 P, float bias);
-
- vec4 textureProj( sampler3D sampler, vec4 P, float bias);
-ivec4 textureProj(isampler3D sampler, vec4 P, float bias);
-uvec4 textureProj(usampler3D sampler, vec4 P, float bias);
-
-float textureProj(sampler1DShadow sampler, vec4 P, float bias);
-float textureProj(sampler2DShadow sampler, vec4 P, float bias);
-
-/* textureLod */
- vec4 textureLod( sampler1D sampler, float P, float lod);
-ivec4 textureLod(isampler1D sampler, float P, float lod);
-uvec4 textureLod(usampler1D sampler, float P, float lod);
-
- vec4 textureLod( sampler2D sampler, vec2 P, float lod);
-ivec4 textureLod(isampler2D sampler, vec2 P, float lod);
-uvec4 textureLod(usampler2D sampler, vec2 P, float lod);
-
- vec4 textureLod( sampler3D sampler, vec3 P, float lod);
-ivec4 textureLod(isampler3D sampler, vec3 P, float lod);
-uvec4 textureLod(usampler3D sampler, vec3 P, float lod);
-
- vec4 textureLod( samplerCube sampler, vec3 P, float lod);
-ivec4 textureLod(isamplerCube sampler, vec3 P, float lod);
-uvec4 textureLod(usamplerCube sampler, vec3 P, float lod);
-
-float textureLod(sampler1DShadow sampler, vec3 P, float lod);
-float textureLod(sampler2DShadow sampler, vec3 P, float lod);
-
- vec4 textureLod( sampler1DArray sampler, vec2 P, float lod);
-ivec4 textureLod(isampler1DArray sampler, vec2 P, float lod);
-uvec4 textureLod(usampler1DArray sampler, vec2 P, float lod);
-
- vec4 textureLod( sampler2DArray sampler, vec3 P, float lod);
-ivec4 textureLod(isampler2DArray sampler, vec3 P, float lod);
-uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
-
-float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-
-#if 0
-/* textureOffset - no bias */
- vec4 textureOffset( sampler1D sampler, float P, int offset);
-ivec4 textureOffset(isampler1D sampler, float P, int offset);
-uvec4 textureOffset(usampler1D sampler, float P, int offset);
-
- vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset);
-ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset);
-uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset);
-
- vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset);
-ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset);
-uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset);
-
-float textureOffset(sampler1DShadow sampler, vec3 P, int offset);
-float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset);
-
- vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset);
-ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset);
-uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset);
-
- vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset);
-ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset);
-uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset);
-
-float textureOffset(sampler1DArrayShadow sampler, vec3 P, int offset);
-
-/* textureOffset - bias variants */
- vec4 textureOffset( sampler1D sampler, float P, int offset, float bias);
-ivec4 textureOffset(isampler1D sampler, float P, int offset, float bias);
-uvec4 textureOffset(usampler1D sampler, float P, int offset, float bias);
-
- vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset, float bias);
-ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset, float bias);
-uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset, float bias);
-
- vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset, float bias);
-ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset, float bias);
-uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset, float bias);
-
-float textureOffset(sampler1DShadow sampler, vec3 P, int offset, float bias);
-float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset, float bias);
-
- vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset, float bias);
-ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset, float bias);
-uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset, float bias);
-
- vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
-
-float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
-
-/* texelFetch */
- vec4 texelFetch( sampler1D sampler, int P, int lod);
-ivec4 texelFetch(isampler1D sampler, int P, int lod);
-uvec4 texelFetch(usampler1D sampler, int P, int lod);
-
- vec4 texelFetch( sampler2D sampler, ivec2 P, int lod);
-ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod);
-uvec4 texelFetch(usampler2D sampler, ivec2 P, int lod);
-
- vec4 texelFetch( sampler3D sampler, ivec3 P, int lod);
-ivec4 texelFetch(isampler3D sampler, ivec3 P, int lod);
-uvec4 texelFetch(usampler3D sampler, ivec3 P, int lod);
-
- vec4 texelFetch( sampler1DArray sampler, ivec2 P, int lod);
-ivec4 texelFetch(isampler1DArray sampler, ivec2 P, int lod);
-uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
-
- vec4 texelFetch( sampler2DArray sampler, ivec3 P, int lod);
-ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
-uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-
-#if 0
-/* texelFetchOffset */
- vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
-ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
-uvec4 texelFetchOffset(usampler1D sampler, int P, int lod, int offset);
-
- vec4 texelFetchOffset( sampler2D sampler, ivec2 P, int lod, ivec2 offset);
-ivec4 texelFetchOffset(isampler2D sampler, ivec2 P, int lod, ivec2 offset);
-uvec4 texelFetchOffset(usampler2D sampler, ivec2 P, int lod, ivec2 offset);
-
- vec4 texelFetchOffset( sampler3D sampler, ivec3 P, int lod, ivec3 offset);
-ivec4 texelFetchOffset(isampler3D sampler, ivec3 P, int lod, ivec3 offset);
-uvec4 texelFetchOffset(usampler3D sampler, ivec3 P, int lod, ivec3 offset);
-
- vec4 texelFetchOffset( sampler1DArray sampler, ivec2 P, int lod, int offset);
-ivec4 texelFetchOffset(isampler1DArray sampler, ivec2 P, int lod, int offset);
-uvec4 texelFetchOffset(usampler1DArray sampler, ivec2 P, int lod, int offset);
-
- vec4 texelFetchOffset( sampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-ivec4 texelFetchOffset(isampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-uvec4 texelFetchOffset(usampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
-
-/* textureProjOffset - no bias */
- vec4 textureProj( sampler1D sampler, vec2 P, int offset);
-ivec4 textureProj(isampler1D sampler, vec2 P, int offset);
-uvec4 textureProj(usampler1D sampler, vec2 P, int offset);
- vec4 textureProj( sampler1D sampler, vec4 P, int offset);
-ivec4 textureProj(isampler1D sampler, vec4 P, int offset);
-uvec4 textureProj(usampler1D sampler, vec4 P, int offset);
-
- vec4 textureProj( sampler2D sampler, vec3 P, ivec2 offset);
-ivec4 textureProj(isampler2D sampler, vec3 P, ivec2 offset);
-uvec4 textureProj(usampler2D sampler, vec3 P, ivec2 offset);
- vec4 textureProj( sampler2D sampler, vec4 P, ivec2 offset);
-ivec4 textureProj(isampler2D sampler, vec4 P, ivec2 offset);
-uvec4 textureProj(usampler2D sampler, vec4 P, ivec2 offset);
-
- vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset);
-ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset);
-uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset);
-
-float textureProj(sampler1DShadow sampler, vec4 P, int offset);
-float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset);
-
-/* textureProjOffset - bias variants */
- vec4 textureProj( sampler1D sampler, vec2 P, int offset, float bias);
-ivec4 textureProj(isampler1D sampler, vec2 P, int offset, float bias);
-uvec4 textureProj(usampler1D sampler, vec2 P, int offset, float bias);
- vec4 textureProj( sampler1D sampler, vec4 P, int offset, float bias);
-ivec4 textureProj(isampler1D sampler, vec4 P, int offset, float bias);
-uvec4 textureProj(usampler1D sampler, vec4 P, int offset, float bias);
-
- vec4 textureProj( sampler2D sampler, vec3 P, ivec2 offset, float bias);
-ivec4 textureProj(isampler2D sampler, vec3 P, ivec2 offset, float bias);
-uvec4 textureProj(usampler2D sampler, vec3 P, ivec2 offset, float bias);
- vec4 textureProj( sampler2D sampler, vec4 P, ivec2 offset, float bias);
-ivec4 textureProj(isampler2D sampler, vec4 P, ivec2 offset, float bias);
-uvec4 textureProj(usampler2D sampler, vec4 P, ivec2 offset, float bias);
-
- vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset, float bias);
-ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset, float bias);
-uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset, float bias);
-
-float textureProj(sampler1DShadow sampler, vec4 P, int offset, float bias);
-float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset, float bias);
-
-/* textureLodOffset */
- vec4 textureLodOffset( sampler1D sampler, float P, float lod, int offset);
-ivec4 textureLodOffset(isampler1D sampler, float P, float lod, int offset);
-uvec4 textureLodOffset(usampler1D sampler, float P, float lod, int offset);
-
- vec4 textureLodOffset( sampler2D sampler, vec2 P, float lod, ivec2 offset);
-ivec4 textureLodOffset(isampler2D sampler, vec2 P, float lod, ivec2 offset);
-uvec4 textureLodOffset(usampler2D sampler, vec2 P, float lod, ivec2 offset);
-
- vec4 textureLodOffset( sampler3D sampler, vec3 P, float lod, ivec3 offset);
-ivec4 textureLodOffset(isampler3D sampler, vec3 P, float lod, ivec3 offset);
-uvec4 textureLodOffset(usampler3D sampler, vec3 P, float lod, ivec3 offset);
-
-float textureLodOffset(sampler1DShadow samp, vec3 P, float lod, int offset);
-float textureLodOffset(sampler2DShadow samp, vec3 P, float lod, ivec2 offset);
-
- vec4 textureLodOffset( sampler1DArray sampler, vec2 P, float lod, int offset);
-ivec4 textureLodOffset(isampler1DArray sampler, vec2 P, float lod, int offset);
-uvec4 textureLodOffset(usampler1DArray sampler, vec2 P, float lod, int offset);
-
- vec4 textureLodOffset( sampler2DArray samp, vec3 P, float lod, ivec2 offset);
-ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
-uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
-
-float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
-
-/* textureProjLod */
- vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
-ivec4 textureProjLod(isampler1D sampler, vec2 P, float lod);
-uvec4 textureProjLod(usampler1D sampler, vec2 P, float lod);
- vec4 textureProjLod( sampler1D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler1D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler1D sampler, vec4 P, float lod);
-
- vec4 textureProjLod( sampler2D sampler, vec3 P, float lod);
-ivec4 textureProjLod(isampler2D sampler, vec3 P, float lod);
-uvec4 textureProjLod(usampler2D sampler, vec3 P, float lod);
- vec4 textureProjLod( sampler2D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler2D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler2D sampler, vec4 P, float lod);
-
- vec4 textureProjLod( sampler3D sampler, vec4 P, float lod);
-ivec4 textureProjLod(isampler3D sampler, vec4 P, float lod);
-uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
-
-float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
-float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-
-#if 0
-/* textureProjLodOffset */
- vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
-ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
-uvec4 textureProjLodOffset(usampler1D sampler, vec2 P, float lod, int offset);
- vec4 textureProjLodOffset( sampler1D sampler, vec4 P, float lod, int offset);
-ivec4 textureProjLodOffset(isampler1D sampler, vec4 P, float lod, int offset);
-uvec4 textureProjLodOffset(usampler1D sampler, vec4 P, float lod, int offset);
-
- vec4 textureProjLodOffset( sampler2D sampler, vec3 P, float lod, ivec2 offset);
-ivec4 textureProjLodOffset(isampler2D sampler, vec3 P, float lod, ivec2 offset);
-uvec4 textureProjLodOffset(usampler2D sampler, vec3 P, float lod, ivec2 offset);
- vec4 textureProjLodOffset( sampler2D sampler, vec4 P, float lod, ivec2 offset);
-ivec4 textureProjLodOffset(isampler2D sampler, vec4 P, float lod, ivec2 offset);
-uvec4 textureProjLodOffset(usampler2D sampler, vec4 P, float lod, ivec2 offset);
-
- vec4 textureProjLodOffset( sampler3D sampler, vec4 P, float lod, ivec3 offset);
-ivec4 textureProjLodOffset(isampler3D sampler, vec4 P, float lod, ivec3 offset);
-uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
-
-float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
-float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
-
-/* textureGrad */
- vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
-ivec4 textureGrad(isampler1D sampler, float P, float dPdx, float dPdy);
-uvec4 textureGrad(usampler1D sampler, float P, float dPdx, float dPdy);
-
- vec4 textureGrad( sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureGrad(isampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureGrad(usampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
-
- vec4 textureGrad( sampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureGrad(isampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureGrad(usampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-
- vec4 textureGrad( samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureGrad(isamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureGrad(usamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
-
-float textureGrad(sampler1DShadow   sampler, vec3 P, float dPdx, float dPdy);
-float textureGrad(sampler2DShadow   sampler, vec3 P, vec2  dPdx, vec2  dPdy);
-float textureGrad(samplerCubeShadow sampler, vec4 P, vec3  dPdx, vec3  dPdy);
-
- vec4 textureGrad( sampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-ivec4 textureGrad(isampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-uvec4 textureGrad(usampler1DArray sampler, vec2 P, float dPdx, float dPdy);
-
- vec4 textureGrad( sampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureGrad(isampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-
-float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
-float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
-
-#if 0
-/* textureGradOffset */
- vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
-ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
-uvec4 textureGradOffset(usampler1D s, float P, float dx, float dy, int offset);
-
- vec4 textureGradOffset( sampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-ivec4 textureGradOffset(isampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-uvec4 textureGradOffset(usampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
-
- vec4 textureGradOffset( sampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-ivec4 textureGradOffset(isampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-uvec4 textureGradOffset(usampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-
- vec4 textureGradOffset( samplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-ivec4 textureGradOffset(isamplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-uvec4 textureGradOffset(usamplerCube s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
-
-float textureGradOffset(sampler1DShadow s, vec3 P, float dx, float dy, int off);
-float textureGradOffset(sampler2DShadow s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-
- vec4 textureGradOffset( sampler1DArray s, vec2 P, float dx, float dy, int off);
-ivec4 textureGradOffset(isampler1DArray s, vec2 P, float dx, float dy, int off);
-uvec4 textureGradOffset(usampler1DArray s, vec2 P, float dx, float dy, int off);
-
- vec4 textureGradOffset( sampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureGradOffset(isampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-
-float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
-float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
-
-/* textureProjGrad */
- vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
-ivec4 textureProjGrad(isampler1D sampler, vec2 P, float dPdx, float dPdy);
-uvec4 textureProjGrad(usampler1D sampler, vec2 P, float dPdx, float dPdy);
- vec4 textureProjGrad( sampler1D sampler, vec4 P, float dPdx, float dPdy);
-ivec4 textureProjGrad(isampler1D sampler, vec4 P, float dPdx, float dPdy);
-uvec4 textureProjGrad(usampler1D sampler, vec4 P, float dPdx, float dPdy);
-
- vec4 textureProjGrad( sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureProjGrad(isampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureProjGrad(usampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
- vec4 textureProjGrad( sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-ivec4 textureProjGrad(isampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-uvec4 textureProjGrad(usampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-
- vec4 textureProjGrad( sampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-ivec4 textureProjGrad(isampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
-
-float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
-float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
-
-#if 0
-/* textureProjGradOffset */
- vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
-ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
-uvec4 textureProjGradOffset(usampler1D s, vec2 P, float dx, float dy, int off);
- vec4 textureProjGradOffset( sampler1D s, vec4 P, float dx, float dy, int off);
-ivec4 textureProjGradOffset(isampler1D s, vec4 P, float dx, float dy, int off);
-uvec4 textureProjGradOffset(usampler1D s, vec4 P, float dx, float dy, int off);
-
- vec4 textureProjGradOffset( sampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureProjGradOffset(isampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureProjGradOffset(usampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
- vec4 textureProjGradOffset( sampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-ivec4 textureProjGradOffset(isampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-uvec4 textureProjGradOffset(usampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
-
- vec4 textureProjGradOffset( sampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-ivec4 textureProjGradOffset(isampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
-
-float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
-float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
-
-/*
- * The following texture functions are deprecated:
- */
-vec4 texture1D       (sampler1D sampler, float coord);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord);
-vec4 texture1D       (sampler1D sampler, float coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec2  coord, float bias);
-vec4 texture1DProj   (sampler1D sampler, vec4  coord, float bias);
-vec4 texture1DLod    (sampler1D sampler, float coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec2  coord, float lod);
-vec4 texture1DProjLod(sampler1D sampler, vec4  coord, float lod);
-
-vec4 texture2D       (sampler2D sampler, vec2 coord);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord);
-vec4 texture2D       (sampler2D sampler, vec2 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec3 coord, float bias);
-vec4 texture2DProj   (sampler2D sampler, vec4 coord, float bias);
-vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
-vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
-
-vec4 texture3D       (sampler3D sampler, vec3 coord);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord);
-vec4 texture3D       (sampler3D sampler, vec3 coord, float bias);
-vec4 texture3DProj   (sampler3D sampler, vec4 coord, float bias);
-vec4 texture3DLod    (sampler3D sampler, vec3 coord, float lod);
-vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
-
-vec4 textureCube     (samplerCube sampler, vec3 coord);
-vec4 textureCube     (samplerCube sampler, vec3 coord, float bias);
-vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
-
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
-vec4 shadow1D       (sampler1DShadow sampler, vec3 coord, float bias);
-vec4 shadow2D       (sampler2DShadow sampler, vec3 coord, float bias);
-vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord, float bias);
-vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord, float bias);
-vec4 shadow1DLod    (sampler1DShadow sampler, vec3 coord, float lod);
-vec4 shadow2DLod    (sampler2DShadow sampler, vec3 coord, float lod);
-vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
-vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
-
-/*
- * 8.8 - Fragment Processing Functions (none in vertex shader)
- */
-
-/*
- * 8.9 - Noise Functions
- */
-float noise1(float x);
-float noise1(vec2  x);
-float noise1(vec3  x);
-float noise1(vec4  x);
-
-vec2  noise2(float x);
-vec2  noise2(vec2  x);
-vec2  noise2(vec3  x);
-vec2  noise2(vec4  x);
-
-vec3  noise3(float x);
-vec3  noise3(vec2  x);
-vec3  noise3(vec3  x);
-vec3  noise3(vec4  x);
-
-vec4  noise4(float x);
-vec4  noise4(vec2  x);
-vec4  noise4(vec3  x);
-vec4  noise4(vec4  x);
diff --git a/src/glsl/builtins/profiles/ARB_texture_rectangle.frag b/src/glsl/builtins/profiles/ARB_texture_rectangle.frag
deleted file mode 100644
index 8938aa3..0000000
--- a/src/glsl/builtins/profiles/ARB_texture_rectangle.frag
+++ /dev/null
@@ -1,7 +0,0 @@
-#extension GL_ARB_texture_rectangle : enable
-vec4 texture2DRect(sampler2DRect sampler, vec2 coord);
-vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);
-vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);
-
-vec4 shadow2DRect(sampler2DRectShadow sampler, vec3 coord);
-vec4 shadow2DRectProj(sampler2DRectShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/ARB_texture_rectangle.vert b/src/glsl/builtins/profiles/ARB_texture_rectangle.vert
deleted file mode 100644
index 8938aa3..0000000
--- a/src/glsl/builtins/profiles/ARB_texture_rectangle.vert
+++ /dev/null
@@ -1,7 +0,0 @@
-#extension GL_ARB_texture_rectangle : enable
-vec4 texture2DRect(sampler2DRect sampler, vec2 coord);
-vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);
-vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);
-
-vec4 shadow2DRect(sampler2DRectShadow sampler, vec3 coord);
-vec4 shadow2DRectProj(sampler2DRectShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/EXT_texture_array.frag b/src/glsl/builtins/profiles/EXT_texture_array.frag
deleted file mode 100644
index d0ce981..0000000
--- a/src/glsl/builtins/profiles/EXT_texture_array.frag
+++ /dev/null
@@ -1,11 +0,0 @@
-#extension GL_EXT_texture_array : enable
-vec4 texture1DArray(sampler1DArray sampler, vec2 coord);
-vec4 texture1DArray(sampler1DArray sampler, vec2 coord, float bias);
-
-vec4 texture2DArray(sampler2DArray sampler, vec3 coord);
-vec4 texture2DArray(sampler2DArray sampler, vec3 coord, float bias);
-
-vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord);
-vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord, float bias);
-
-vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/profiles/EXT_texture_array.vert b/src/glsl/builtins/profiles/EXT_texture_array.vert
deleted file mode 100644
index 6b1b7f2..0000000
--- a/src/glsl/builtins/profiles/EXT_texture_array.vert
+++ /dev/null
@@ -1,11 +0,0 @@
-#extension GL_EXT_texture_array : enable
-vec4 texture1DArray(sampler1DArray sampler, vec2 coord);
-vec4 texture1DArrayLod(sampler1DArray sampler, vec2 coord, float lod);
-
-vec4 texture2DArray(sampler2DArray sampler, vec3 coord);
-vec4 texture2DArrayLod(sampler2DArray sampler, vec3 coord, float lod);
-
-vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord);
-vec4 shadow1DArrayLod(sampler1DArrayShadow sampler, vec3 coord, float lod);
-
-vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord);
diff --git a/src/glsl/builtins/tools/builtin_function.cpp b/src/glsl/builtins/tools/builtin_function.cpp
deleted file mode 100644
index c44804f..0000000
--- a/src/glsl/builtins/tools/builtin_function.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include "glsl_parser_extras.h"
-
-/* A dummy file.  When compiling prototypes, we don't care about builtins.
- * We really don't want to half-compile builtin_functions.cpp and fail, though.
- */
-void
-_mesa_glsl_release_functions(void)
-{
-}
-
-void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-			        struct _mesa_glsl_parse_state *state)
-{
-}
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
deleted file mode 100755
index 0506c42..0000000
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-import re
-from glob import glob
-from os import path
-from subprocess import Popen, PIPE
-
-# Local module: generator for texture lookup builtins
-from texture_builtins import generate_texture_functions
-
-builtins_dir = path.join(path.dirname(path.abspath(__file__)), "..")
-
-# Read the files in builtins/ir/*...add them to the supplied dictionary.
-def read_ir_files(fs):
-    for filename in glob(path.join(path.join(builtins_dir, 'ir'), '*')):
-        with open(filename) as f:
-            fs[path.basename(filename)] = f.read()
-
-# Return a dictionary containing all builtin definitions (even generated)
-def get_builtin_definitions():
-    fs = {}
-    generate_texture_functions(fs)
-    read_ir_files(fs)
-    return fs
-
-def stringify(s):
-    # Work around MSVC's 65535 byte limit by outputting an array of characters
-    # rather than actual string literals.
-    if len(s) >= 65535:
-        #t = "/* Warning: length " + repr(len(s)) + " too large */\n"
-        t = ""
-        for c in re.sub('\s\s+', ' ', s):
-            if c == '\n':
-                t += '\n'
-            else:
-                t += "'" + c + "',"
-        return '{' + t[:-1] + '}'
-
-    t = s.replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n"\n   "')
-    return '   "' + t + '"\n'
-
-def write_function_definitions():
-    fs = get_builtin_definitions()
-    for k, v in sorted(fs.iteritems()):
-        print 'static const char builtin_' + k + '[] ='
-        print stringify(v), ';'
-
-def run_compiler(args):
-    compiler_path = path.join(path.join(builtins_dir, '..'), 'glsl_compiler')
-    command = [compiler_path, '--dump-lir'] + args
-    p = Popen(command, 1, stdout=PIPE, shell=False)
-    output = p.communicate()[0]
-
-    # Clean up output a bit by killing whitespace before a closing paren.
-    kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE);
-    output = kill_paren_whitespace.sub(')', output);
-
-    # Also toss any duplicate newlines
-    output = output.replace('\n\n', '\n')
-
-    return (output, p.returncode)
-
-def write_profile(filename, profile):
-    (proto_ir, returncode) = run_compiler([filename])
-
-    if returncode != 0:
-        print '#error builtins profile', profile, 'failed to compile'
-        return
-
-    # Kill any global variable declarations.  We don't want them.
-    kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE);
-    proto_ir = kill_globals.sub('', proto_ir)
-
-    # Kill pointer addresses.  They're not necessary in prototypes and just
-    # clutter the diff output.
-    proto_ir = re.sub(r'@0x[0-9a-f]+', '', proto_ir);
-
-    print 'static const char prototypes_for_' + profile + '[] ='
-    print stringify(proto_ir), ';'
-
-    # Print a table of all the functions (not signatures) referenced.
-    # This is done so we can avoid bothering with a hash table in the C++ code.
-
-    function_names = set()
-    for func in re.finditer(r'\(function (.+)\n', proto_ir):
-        function_names.add(func.group(1))
-
-    print 'static const char *functions_for_' + profile + ' [] = {'
-    for func in sorted(function_names):
-        print '   builtin_' + func + ','
-    print '};'
-
-def write_profiles():
-    profiles = get_profile_list()
-    for (filename, profile) in profiles:
-        write_profile(filename, profile)
-
-def get_profile_list():
-    profiles = []
-    for pfile in sorted(glob(path.join(path.join(builtins_dir, 'profiles'), '*'))):
-        profiles.append((pfile, path.basename(pfile).replace('.', '_')))
-    return profiles
-
-if __name__ == "__main__":
-    print """/* DO NOT MODIFY - automatically generated by generate_builtins.py */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include "main/shaderobj.h" /* for struct gl_shader */
-#include "glsl_parser_extras.h"
-#include "ir_reader.h"
-#include "program.h"
-#include "ast.h"
-
-gl_shader *
-read_builtins(void * mem_ctx, GLenum target, const char *protos, const char **functions, unsigned count)
-{
-   struct gl_context fakeCtx;
-   fakeCtx.API = API_OPENGL;
-   gl_shader *sh = _mesa_new_shader(mem_ctx, 0, target);
-   struct _mesa_glsl_parse_state *st =
-      new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
-
-   st->language_version = 130;
-   st->symbols->language_version = 130;
-   st->ARB_texture_rectangle_enable = true;
-   st->EXT_texture_array_enable = true;
-   _mesa_glsl_initialize_types(st);
-
-   sh->ir = new(sh) exec_list;
-   sh->symbols = st->symbols;
-
-   /* Read the IR containing the prototypes */
-   _mesa_glsl_read_ir(st, sh->ir, protos, true);
-
-   /* Read ALL the function bodies, telling the IR reader not to scan for
-    * prototypes (we've already created them).  The IR reader will skip any
-    * signature that does not already exist as a prototype.
-    */
-   for (unsigned i = 0; i < count; i++) {
-      _mesa_glsl_read_ir(st, sh->ir, functions[i], false);
-
-      if (st->error) {
-         printf("error reading builtin: %.35s ...\\n", functions[i]);
-         printf("Info log:\\n%s\\n", st->info_log);
-         _mesa_delete_shader(NULL, sh);
-         return NULL;
-      }
-   }
-
-   reparent_ir(sh->ir, sh);
-   delete st;
-
-   return sh;
-}
-"""
-
-    write_function_definitions()
-    write_profiles()
-
-    profiles = get_profile_list()
-
-    print 'static gl_shader *builtin_profiles[%d];' % len(profiles)
-
-    print """
-void *builtin_mem_ctx = NULL;
-
-void
-_mesa_glsl_release_functions(void)
-{
-   hieralloc_free(builtin_mem_ctx);
-   builtin_mem_ctx = NULL;
-   memset(builtin_profiles, 0, sizeof(builtin_profiles));
-}
-
-static void
-_mesa_read_profile(struct _mesa_glsl_parse_state *state,
-		   exec_list *instructions,
-                   int profile_index,
-		   const char *prototypes,
-		   const char **functions,
-                   int count)
-{
-   gl_shader *sh = builtin_profiles[profile_index];
-
-   if (sh == NULL) {
-      sh = read_builtins(state, GL_VERTEX_SHADER, prototypes, functions, count);
-      hieralloc_steal(builtin_mem_ctx, sh);
-      builtin_profiles[profile_index] = sh;
-   }
-
-   state->builtins_to_link[state->num_builtins_to_link] = sh;
-   state->num_builtins_to_link++;
-}
-
-void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-                                struct _mesa_glsl_parse_state *state)
-{
-   if (builtin_mem_ctx == NULL) {
-      builtin_mem_ctx = hieralloc_init("GLSL built-in functions");
-      memset(&builtin_profiles, 0, sizeof(builtin_profiles));
-   }
-
-   state->num_builtins_to_link = 0;
-"""
-
-    i=0
-    for (filename, profile) in profiles:
-        if profile.endswith('_vert'):
-            check = 'state->target == vertex_shader && '
-        elif profile.endswith('_frag'):
-            check = 'state->target == fragment_shader && '
-
-        version = re.sub(r'_(vert|frag)$', '', profile)
-        if version.isdigit():
-            check += 'state->language_version == ' + version
-        else: # an extension name
-            check += 'state->' + version + '_enable'
-
-        print '   if (' + check + ') {'
-        print '      _mesa_read_profile(state, instructions, %d,' % i
-        print '                         prototypes_for_' + profile + ','
-        print '                         functions_for_' + profile + ','
-        print '                         Elements(functions_for_' + profile + '));'
-        print '   }'
-        print
-        i = i + 1
-    print '}'
-
diff --git a/src/glsl/builtins/tools/generate_matrixCompMultGLSL.py b/src/glsl/builtins/tools/generate_matrixCompMultGLSL.py
deleted file mode 100755
index 391ad11..0000000
--- a/src/glsl/builtins/tools/generate_matrixCompMultGLSL.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-def gen_matrix(x, y = 0):
-    if y == 0:
-        y = x
-    type = "mat" + str(x)
-    if x != y:
-        type = type + "x" + str(y)
-    print type + " matrixCompMult(" + type + " x, " + type + " y)\n{"
-    print "    " + type + " z;"
-
-    for i in range(x):
-        print "    z[" + str(i) + "] = x[" + str(i) + "] * y[" + str(i) + "];"
-    print "    return z;\n}"
-
-print "#version 120"
-# 1.10
-gen_matrix(2)
-gen_matrix(3)
-gen_matrix(4)
-
-# 1.20
-gen_matrix(2,3) # mat2x3 means 2 columns, 3 rows
-gen_matrix(3,2)
-gen_matrix(2,4)
-gen_matrix(4,2)
-gen_matrix(3,4)
-gen_matrix(4,3)
diff --git a/src/glsl/builtins/tools/generate_outerProductGLSL.py b/src/glsl/builtins/tools/generate_outerProductGLSL.py
deleted file mode 100755
index c561cc3..0000000
--- a/src/glsl/builtins/tools/generate_outerProductGLSL.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-def gen(x, y):
-    type = "mat" + str(x)
-    if x != y:
-        type = type + "x" + str(y)
-    print type + " outerProduct(vec" + str(y) + " u, vec" + str(x) + " v)\n{"
-    print "    " + type + " m;"
-
-    for i in range(x):
-        print "    m[" + str(i) + "] = u * v[" + str(i) + "];"
-    print "    return m;\n}"
-
-print "#version 120"
-gen(2,2)
-gen(2,3) # mat2x3 means 2 columns, 3 rows
-gen(2,4)
-gen(3,2)
-gen(3,3)
-gen(3,4)
-gen(4,2)
-gen(4,3)
-gen(4,4)
diff --git a/src/glsl/builtins/tools/generate_transposeGLSL.py b/src/glsl/builtins/tools/generate_transposeGLSL.py
deleted file mode 100755
index 8f669ce..0000000
--- a/src/glsl/builtins/tools/generate_transposeGLSL.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-def gen(x, y):
-    origtype = "mat" + str(x)
-    trantype = "mat" + str(y)
-    if x != y:
-        origtype = origtype + "x" + str(y)
-        trantype = trantype + "x" + str(x)
-    print trantype + " transpose(" + origtype + " m)\n{"
-    print "    " + trantype + " t;"
-
-    # The obvious implementation of transpose
-    for i in range(x):
-        for j in range(y):
-            print "    t[" + str(j) + "][" + str(i) + "] =",
-            print "m[" + str(i) + "][" + str(j) + "];"
-    print "    return t;\n}"
-
-print "#version 120"
-gen(2,2)
-gen(2,3) # mat2x3 means 2 columns, 3 rows
-gen(2,4)
-gen(3,2)
-gen(3,3)
-gen(3,4)
-gen(4,2)
-gen(4,3)
-gen(4,4)
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
deleted file mode 100755
index 8bf708b..0000000
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ /dev/null
@@ -1,349 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import StringIO
-
-def vec_type(g, size):
-    if size == 1:
-        if g == "i":
-            return "int"
-        elif g == "u":
-            return "uint"
-        return "float"
-    return g + "vec" + str(size)
-
-# Get the base dimension - i.e. sampler3D gives 3
-# Array samplers also get +1 here since the layer is really an extra coordinate
-def get_coord_dim(sampler_type):
-    if sampler_type[0].isdigit():
-        coord_dim = int(sampler_type[0])
-    elif sampler_type.startswith("Cube"):
-        coord_dim = 3
-    else:
-        assert False ("coord_dim: invalid sampler_type: " + sampler_type)
-
-    if sampler_type.find("Array") != -1:
-        coord_dim += 1
-    return coord_dim
-
-# Get the number of extra vector components (i.e. shadow comparitor)
-def get_extra_dim(sampler_type, use_proj, unused_fields):
-    extra_dim = unused_fields
-    if sampler_type.find("Shadow") != -1:
-        extra_dim += 1
-    if use_proj:
-        extra_dim += 1
-    return extra_dim
-
-def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0):
-    coord_dim = get_coord_dim(sampler_type)
-    extra_dim = get_extra_dim(sampler_type, use_proj, unused_fields)
-
-    # Print parameters
-    print "   (signature " + g + "vec4"
-    print "     (parameters"
-    print "       (declare (in) " + g + "sampler" + sampler_type + " sampler)"
-    print "       (declare (in) " + vec_type("i" if tex_inst == "txf" else "", coord_dim + extra_dim) + " P)",
-    if tex_inst == "txb":
-        print "\n       (declare (in) float bias)",
-    elif tex_inst == "txl":
-        print "\n       (declare (in) float lod)",
-    elif tex_inst == "txf":
-        print "\n       (declare (in) int lod)",
-    elif tex_inst == "txd":
-        grad_type = vec_type("", coord_dim)
-        print "\n       (declare (in) " + grad_type + " dPdx)",
-        print "\n       (declare (in) " + grad_type + " dPdy)",
-
-    print ")\n     ((return (" + tex_inst + " (var_ref sampler)",
-
-    # Coordinate
-    if extra_dim > 0:
-        print "(swiz " + "xyzw"[:coord_dim] + " (var_ref P))",
-    else:
-        print "(var_ref P)",
-
-    # Offset
-    print "(0 0 0)",
-
-    if tex_inst != "txf":
-        # Projective divisor
-        if use_proj:
-            print "(swiz " + "xyzw"[coord_dim + extra_dim-1] + " (var_ref P))",
-        else:
-            print "1",
-
-        # Shadow comparitor
-        if sampler_type == "2DArrayShadow": # a special case:
-            print "(swiz w (var_ref P))",   # ...array layer is z; shadow is w
-        elif sampler_type.endswith("Shadow"):
-            print "(swiz z (var_ref P))",
-        else:
-            print "()",
-
-    # Bias/explicit LOD/gradient:
-    if tex_inst == "txb":
-        print "(var_ref bias)",
-    elif tex_inst == "txl" or tex_inst == "txf":
-        print "(var_ref lod)",
-    elif tex_inst == "txd":
-        print "((var_ref dPdx) (var_ref dPdy))",
-    print "))))\n"
-
-def generate_fiu_sigs(tex_inst, sampler_type, use_proj = False, unused_fields = 0):
-    generate_sigs("",  tex_inst, sampler_type, use_proj, unused_fields)
-    generate_sigs("i", tex_inst, sampler_type, use_proj, unused_fields)
-    generate_sigs("u", tex_inst, sampler_type, use_proj, unused_fields)
-
-def start_function(name):
-    sys.stdout = StringIO.StringIO()
-    print "((function " + name
-
-def end_function(fs, name):
-    print "))"
-    fs[name] = sys.stdout.getvalue();
-    sys.stdout.close()
-
-# Generate all the functions and store them in the supplied dictionary.
-# This is better than writing them to actual files since they should never be
-# edited; it'd also be easy to confuse them with the many hand-generated files.
-#
-# Takes a dictionary as an argument.
-def generate_texture_functions(fs):
-    start_function("texture")
-    generate_fiu_sigs("tex", "1D")
-    generate_fiu_sigs("tex", "2D")
-    generate_fiu_sigs("tex", "3D")
-    generate_fiu_sigs("tex", "Cube")
-    generate_fiu_sigs("tex", "1DArray")
-    generate_fiu_sigs("tex", "2DArray")
-
-    generate_fiu_sigs("txb", "1D")
-    generate_fiu_sigs("txb", "2D")
-    generate_fiu_sigs("txb", "3D")
-    generate_fiu_sigs("txb", "Cube")
-    generate_fiu_sigs("txb", "1DArray")
-    generate_fiu_sigs("txb", "2DArray")
-    end_function(fs, "texture")
-
-    start_function("textureProj")
-    generate_fiu_sigs("tex", "1D", True)
-    generate_fiu_sigs("tex", "1D", True, 2)
-    generate_fiu_sigs("tex", "2D", True)
-    generate_fiu_sigs("tex", "2D", True, 1)
-    generate_fiu_sigs("tex", "3D", True)
-
-    generate_fiu_sigs("txb", "1D", True)
-    generate_fiu_sigs("txb", "1D", True, 2)
-    generate_fiu_sigs("txb", "2D", True)
-    generate_fiu_sigs("txb", "2D", True, 1)
-    generate_fiu_sigs("txb", "3D", True)
-    end_function(fs, "textureProj")
-
-    start_function("textureLod")
-    generate_fiu_sigs("txl", "1D")
-    generate_fiu_sigs("txl", "2D")
-    generate_fiu_sigs("txl", "3D")
-    generate_fiu_sigs("txl", "Cube")
-    generate_fiu_sigs("txl", "1DArray")
-    generate_fiu_sigs("txl", "2DArray")
-    end_function(fs, "textureLod")
-
-    start_function("texelFetch")
-    generate_fiu_sigs("txf", "1D")
-    generate_fiu_sigs("txf", "2D")
-    generate_fiu_sigs("txf", "3D")
-    generate_fiu_sigs("txf", "1DArray")
-    generate_fiu_sigs("txf", "2DArray")
-    end_function(fs, "texelFetch")
-
-    start_function("textureProjLod")
-    generate_fiu_sigs("txl", "1D", True)
-    generate_fiu_sigs("txl", "1D", True, 2)
-    generate_fiu_sigs("txl", "2D", True)
-    generate_fiu_sigs("txl", "2D", True, 1)
-    generate_fiu_sigs("txl", "3D", True)
-    end_function(fs, "textureProjLod")
-
-    start_function("textureGrad")
-    generate_fiu_sigs("txd", "1D")
-    generate_fiu_sigs("txd", "2D")
-    generate_fiu_sigs("txd", "3D")
-    generate_fiu_sigs("txd", "Cube")
-    generate_fiu_sigs("txd", "1DArray")
-    generate_fiu_sigs("txd", "2DArray")
-    end_function(fs, "textureGrad")
-
-    start_function("textureProjGrad")
-    generate_fiu_sigs("txd", "1D", True)
-    generate_fiu_sigs("txd", "1D", True, 2)
-    generate_fiu_sigs("txd", "2D", True)
-    generate_fiu_sigs("txd", "2D", True, 1)
-    generate_fiu_sigs("txd", "3D", True)
-    end_function(fs, "textureProjGrad")
-
-    # ARB_texture_rectangle extension
-    start_function("texture2DRect")
-    generate_sigs("", "tex", "2DRect")
-    end_function(fs, "texture2DRect")
-
-    start_function("texture2DRectProj")
-    generate_sigs("", "tex", "2DRect", True)
-    generate_sigs("", "tex", "2DRect", True, 1)
-    end_function(fs, "texture2DRectProj")
-
-    start_function("shadow2DRect")
-    generate_sigs("", "tex", "2DRectShadow")
-    end_function(fs, "shadow2DRect")
-
-    start_function("shadow2DRectProj")
-    generate_sigs("", "tex", "2DRectShadow", True)
-    end_function(fs, "shadow2DRectProj")
-
-    # EXT_texture_array extension
-    start_function("texture1DArray")
-    generate_sigs("", "tex", "1DArray")
-    generate_sigs("", "txb", "1DArray")
-    end_function(fs, "texture1DArray")
-
-    start_function("texture1DArrayLod")
-    generate_sigs("", "txl", "1DArray")
-    end_function(fs, "texture1DArrayLod")
-
-    start_function("texture2DArray")
-    generate_sigs("", "tex", "2DArray")
-    generate_sigs("", "txb", "2DArray")
-    end_function(fs, "texture2DArray")
-
-    start_function("texture2DArrayLod")
-    generate_sigs("", "txl", "2DArray")
-    end_function(fs, "texture2DArrayLod")
-
-    start_function("shadow1DArray")
-    generate_sigs("", "tex", "1DArrayShadow")
-    generate_sigs("", "txb", "1DArrayShadow")
-    end_function(fs, "shadow1DArray")
-
-    start_function("shadow1DArrayLod")
-    generate_sigs("", "txl", "1DArrayShadow")
-    end_function(fs, "shadow1DArrayLod")
-
-    start_function("shadow2DArray")
-    generate_sigs("", "tex", "2DArrayShadow")
-    end_function(fs, "shadow2DArray")
-
-    # Deprecated (110/120 style) functions with silly names:
-    start_function("texture1D")
-    generate_sigs("", "tex", "1D")
-    generate_sigs("", "txb", "1D")
-    end_function(fs, "texture1D")
-
-    start_function("texture1DLod")
-    generate_sigs("", "txl", "1D")
-    end_function(fs, "texture1DLod")
-
-    start_function("texture1DProj")
-    generate_sigs("", "tex", "1D", True)
-    generate_sigs("", "tex", "1D", True, 2)
-    generate_sigs("", "txb", "1D", True)
-    generate_sigs("", "txb", "1D", True, 2)
-    end_function(fs, "texture1DProj")
-
-    start_function("texture1DProjLod")
-    generate_sigs("", "txl", "1D", True)
-    generate_sigs("", "txl", "1D", True, 2)
-    end_function(fs, "texture1DProjLod")
-
-    start_function("texture2D")
-    generate_sigs("", "tex", "2D")
-    generate_sigs("", "txb", "2D")
-    end_function(fs, "texture2D")
-
-    start_function("texture2DLod")
-    generate_sigs("", "txl", "2D")
-    end_function(fs, "texture2DLod")
-
-    start_function("texture2DProj")
-    generate_sigs("", "tex", "2D", True)
-    generate_sigs("", "tex", "2D", True, 1)
-    generate_sigs("", "txb", "2D", True)
-    generate_sigs("", "txb", "2D", True, 1)
-    end_function(fs, "texture2DProj")
-
-    start_function("texture2DProjLod")
-    generate_sigs("", "txl", "2D", True)
-    generate_sigs("", "txl", "2D", True, 1)
-    end_function(fs, "texture2DProjLod")
-
-    start_function("texture3D")
-    generate_sigs("", "tex", "3D")
-    generate_sigs("", "txb", "3D")
-    end_function(fs, "texture3D")
-
-    start_function("texture3DLod")
-    generate_sigs("", "txl", "3D")
-    end_function(fs, "texture3DLod")
-
-    start_function("texture3DProj")
-    generate_sigs("", "tex", "3D", True)
-    generate_sigs("", "txb", "3D", True)
-    end_function(fs, "texture3DProj")
-
-    start_function("texture3DProjLod")
-    generate_sigs("", "txl", "3D", True)
-    end_function(fs, "texture3DProjLod")
-
-    start_function("textureCube")
-    generate_sigs("", "tex", "Cube")
-    generate_sigs("", "txb", "Cube")
-    end_function(fs, "textureCube")
-
-    start_function("textureCubeLod")
-    generate_sigs("", "txl", "Cube")
-    end_function(fs, "textureCubeLod")
-
-    start_function("shadow1D")
-    generate_sigs("", "tex", "1DShadow", False, 1)
-    generate_sigs("", "txb", "1DShadow", False, 1)
-    end_function(fs, "shadow1D")
-
-    start_function("shadow1DLod")
-    generate_sigs("", "txl", "1DShadow", False, 1)
-    end_function(fs, "shadow1DLod")
-
-    start_function("shadow1DProj")
-    generate_sigs("", "tex", "1DShadow", True, 1)
-    generate_sigs("", "txb", "1DShadow", True, 1)
-    end_function(fs, "shadow1DProj")
-
-    start_function("shadow1DProjLod")
-    generate_sigs("", "txl", "1DShadow", True, 1)
-    end_function(fs, "shadow1DProjLod")
-
-    start_function("shadow2D")
-    generate_sigs("", "tex", "2DShadow")
-    generate_sigs("", "txb", "2DShadow")
-    end_function(fs, "shadow2D")
-
-    start_function("shadow2DLod")
-    generate_sigs("", "txl", "2DShadow")
-    end_function(fs, "shadow2DLod")
-
-    start_function("shadow2DProj")
-    generate_sigs("", "tex", "2DShadow", True)
-    generate_sigs("", "txb", "2DShadow", True)
-    end_function(fs, "shadow2DProj")
-
-    start_function("shadow2DProjLod")
-    generate_sigs("", "txl", "2DShadow", True)
-    end_function(fs, "shadow2DProjLod")
-
-    sys.stdout = sys.__stdout__
-    return fs
-
-# If you actually run this script, it'll print out all the functions.
-if __name__ == "__main__":
-    fs = {}
-    generate_texture_functions(fs);
-    for k, v in fs.iteritems():
-	print v
diff --git a/src/glsl/configure.ac b/src/glsl/configure.ac
deleted file mode 100644
index 73ce67d..0000000
--- a/src/glsl/configure.ac
+++ /dev/null
@@ -1,69 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.61)
-AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
-AC_CONFIG_SRCDIR([Makefile.am])
-AM_CONFIG_HEADER([config.h])
-AC_CONFIG_FILES([glcpp/Makefile])
-
-AM_INIT_AUTOMAKE
-LT_INIT
-
-AM_MAINTAINER_MODE
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC
-AC_PROG_MAKE_SET
-AC_PROG_YACC
-AC_PROG_LEX
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-# Checks for libraries.
-
-# Checks for header files.
-
-# Checks for typedefs, structures, and compiler characteristics.
-
-# Checks for library functions.
-AC_HEADER_STDC
-
-AH_TOP([#ifndef GLSL_CONFIG_H
-#define GLSL_CONFIG_H])
-AH_BOTTOM([#endif /* GLSL_CONFIG_H */])
-
-PKG_CHECK_MODULES([talloc], [talloc >= 2.0])
-
-AC_ARG_ENABLE([debug],
-    [AS_HELP_STRING([--enable-debug],
-        [use debug compiler flags and macros @<:@default=disabled@:>@])],
-    [enable_debug="$enableval"],
-    [enable_debug=no]
-)
-if test "x$enable_debug" = xyes; then
-    DEFINES="$DEFINES -DDEBUG"
-    if test "x$GCC" = xyes; then
-	# Remove any -g or -O flags from the command line
-	CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
-        CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
-    fi
-    if test "x$GXX" = xyes; then
-	# Remove any -g flags from the command line
-	CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
-        CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
-    fi
-fi
-
-if test "x$GXX" = xyes ; then
-	WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
-else
-	WARN=""
-fi
-
-CFLAGS="$CFLAGS $WARN"
-CXXFLAGS="$CXXFLAGS $WARN"
-YFLAGS="-d -v"
-
-AC_OUTPUT([Makefile])
diff --git a/src/glsl/glcpp/.gitignore b/src/glsl/glcpp/.gitignore
deleted file mode 100644
index dbc37e1..0000000
--- a/src/glsl/glcpp/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-glcpp
-glcpp-parse.output
-*.o
-*.lo
-*.la
-.libs
-*~
-tests/*.out
diff --git a/src/glsl/glcpp/Makefile.am b/src/glsl/glcpp/Makefile.am
deleted file mode 100644
index 81147e6..0000000
--- a/src/glsl/glcpp/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright © 2010 Intel Corporation
-# 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
-# AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-# USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-noinst_LTLIBRARIES = libglcpp.la
-libglcpp_la_SOURCES = \
-	glcpp-lex.l \
-	glcpp-parse.y \
-	glcpp.h \
-	pp.c
-
-BUILT_SOURCES = glcpp-parse.h glcpp-parse.c glcpp-lex.c
-CLEANFILES = $(BUILT_SOURCES)
-
-glcpp-parse.h: glcpp-parse.c
-
-bin_PROGRAMS = glcpp
-glcpp_LDADD = libglcpp.la
-glcpp_LDFLAGS = @LDFLAGS@ $(talloc_LIBS)
-glcpp_SOURCES = glcpp.c
-
-.l.c:
-	$(LEXCOMPILE) --outfile="$@" $<
-
-test: glcpp
-	@(cd tests; ./glcpp-test)
diff --git a/src/glsl/glcpp/README b/src/glsl/glcpp/README
deleted file mode 100644
index 0b5ef50..0000000
--- a/src/glsl/glcpp/README
+++ /dev/null
@@ -1,32 +0,0 @@
-glcpp -- GLSL "C" preprocessor
-
-This is a simple preprocessor designed to provide the preprocessing
-needs of the GLSL language. The requirements for this preprocessor are
-specified in the GLSL 1.30 specification availble from:
-
-http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf
-
-This specification is not precise on some semantics, (for example,
-#define and #if), defining these merely "as is standard for C++
-preprocessors". To fill in these details, I've been using a draft of
-the C99 standard as available from:
-
-http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
-
-Any downstream compiler accepting output from glcpp should be prepared
-to encounter and deal with the following preprocessor macros:
-
-	#line
-	#pragma
-	#extension
-
-All other macros will be handles according to the GLSL specification
-and will not appear in the output.
-
-Known limitations
------------------
-The __LINE__ and __FILE__ macros are not yet supported.
-
-A file that ends with a function-like macro name as the last
-non-whitespace token will result in a parse error, (where it should be
-passed through as is).
\ No newline at end of file
diff --git a/src/glsl/glcpp/glcpp-lex.c b/src/glsl/glcpp/glcpp-lex.c
deleted file mode 100644
index c318291..0000000
--- a/src/glsl/glcpp/glcpp-lex.c
+++ /dev/null
@@ -1,2677 +0,0 @@
-#line 2 "glcpp/glcpp-lex.c"
-
-#line 4 "glcpp/glcpp-lex.c"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* An opaque pointer. */
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-/* For convenience, these vars (plus the bison vars far below)
-   are macros in the reentrant scanner. */
-#define yyin yyg->yyin_r
-#define yyout yyg->yyout_r
-#define yyextra yyg->yyextra_r
-#define yyleng yyg->yyleng_r
-#define yytext yyg->yytext_r
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug yyg->yy_flex_debug_r
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yyg->yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yyg->yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE glcpp_restart(yyin ,yyscanner )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    #define YY_LESS_LINENO(n)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = yyg->yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via glcpp_restart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
-                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-
-void glcpp_restart (FILE *input_file ,yyscan_t yyscanner );
-void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE glcpp__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void glcpp__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void glcpp__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void glcpp_pop_buffer_state (yyscan_t yyscanner );
-
-static void glcpp_ensure_buffer_stack (yyscan_t yyscanner );
-static void glcpp__load_buffer_state (yyscan_t yyscanner );
-static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-
-#define YY_FLUSH_BUFFER glcpp__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-
-YY_BUFFER_STATE glcpp__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE glcpp__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner );
-void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner );
-void glcpp_free (void * ,yyscan_t yyscanner );
-
-#define yy_new_buffer glcpp__create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        glcpp_ensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        glcpp_ensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define glcpp_wrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-typedef int yy_state_type;
-
-#define yytext_ptr yytext_r
-
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yyg->yytext_ptr = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
-	yyg->yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yyg->yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 43
-#define YY_END_OF_BUFFER 44
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_acclist[137] =
-    {   0,
-        3,    3,   44,   39,   43,   40,   43,   41,   43,   43,
-       38,   43,   43,   38,   43,   38,   43,   38,   43,   25,
-       39,   43,   24,   39,   43,   38,   43,   38,   43,   38,
-       43,   37,   39,   43,   37,   39,   43,   38,   43,   40,
-       43,   23,   43,   43,    3,   43,    4,   43,    5,   43,
-       42,   43,   39,   18,   40,   32,   35,   33,    2,    1,
-       25,   39,   25,   39,   39,   24,   39,   24,   39,   27,
-       29,   31,   30,   28,   37,   39,   37,   39,   34,   40,
-       23,   23,    3,    4,    5,    6,    5,    7,    1,   26,
-       39,   37,   39,16398,   26,   39,   37,   39,   18,   37,
-
-       39,16399,16400, 8206,   18, 8206,   37,   39, 8207,   18,
-     8208,   18,16401,   19,16396,   22,   36,   37,   39,   21,
-     8209,   18,   19, 8204,   18,16397,16404, 8205,   18,   11,
-       18,    9,    8, 8212,   10,   18
-    } ;
-
-static yyconst flex_int16_t yy_accept[164] =
-    {   0,
-        1,    1,    1,    1,    1,    2,    3,    3,    3,    4,
-        6,    8,   10,   11,   13,   14,   16,   18,   20,   23,
-       26,   28,   30,   32,   35,   38,   40,   42,   44,   45,
-       47,   49,   51,   53,   54,   54,   55,   56,   57,   58,
-       59,   60,   61,   63,   65,   66,   68,   70,   71,   72,
-       73,   74,   75,   77,   79,   80,   81,   82,   83,   83,
-       83,   83,   83,   83,   83,   83,   84,   85,   86,   87,
-       88,   89,   90,   92,   94,   94,   94,   94,   94,   94,
-       95,   95,   95,   95,   95,   97,   99,   99,   99,   99,
-       99,   99,   99,   99,  100,  100,  100,  100,  100,  100,
-
-      100,  102,  102,  103,  104,  104,  104,  104,  104,  106,
-      106,  107,  107,  107,  107,  107,  107,  107,  109,  109,
-      109,  111,  111,  113,  114,  115,  115,  116,  116,  116,
-      116,  117,  117,  120,  121,  121,  123,  124,  124,  124,
-      126,  127,  127,  127,  127,  128,  128,  128,  130,  130,
-      132,  132,  133,  134,  134,  134,  134,  135,  135,  135,
-      137,  137,  137
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        4,    4,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    5,    1,    6,    1,    7,    8,    1,    9,
-        7,   10,    7,    7,    7,    7,   11,   12,   13,   13,
-       13,   13,   13,   13,   13,   14,   14,    1,    7,   15,
-       16,   17,    1,    1,   18,   18,   18,   18,   18,   18,
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-       19,   19,   19,   19,   20,   19,   19,   21,   19,   19,
-        7,    1,    7,    7,   19,    1,   22,   18,   18,   23,
-
-       24,   25,   26,   19,   27,   19,   19,   28,   29,   30,
-       31,   32,   19,   33,   34,   35,   36,   37,   19,   38,
-       19,   19,    7,   39,    7,    7,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[40] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int16_t yy_base[182] =
-    {   0,
-        0,   38,    0,    0,   38,   39,  499,  498,  500,   48,
-       43,  552,  496,   44,   63,  495,   59,   65,   87,  125,
-       58,   67,   68,  164,  203,   40,   75,  241,  552,  494,
-      552,  140,  552,  140,  493,  552,  144,  492,  491,  487,
-      486,  485,  156,  179,  267,    0,  209,  472,  471,  470,
-      469,  468,  446,  124,  466,  153,  462,  458,  154,  198,
-      159,  155,  183,  160,  193,  460,  552,  222,  552,  227,
-      552,  459,  204,  161,  231,  232,  238,  243,  236,  303,
-      245,  180,  247,  249,  281,   56,  257,  271,  248,  259,
-      252,  264,  455,  454,  297,  299,  312,  313,  320,  294,
-
-      407,  295,  427,  426,  321,  296,  324,  425,  552,  424,
-      552,  327,  329,  195,  328,  331,  332,  230,  334,  378,
-      552,  377,  552,  371,  370,  335,  365,  337,  358,  342,
-      360,  344,  326,  255,  340,  552,  260,  338,  246,  552,
-      197,  364,  192,  352,  382,  348,  186,  552,  420,  552,
-      423,  184,  141,  437,  421,  447,   79,  476,  346,  552,
-      453,  552,  515,  517,  519,  521,  523,  525,   71,  527,
-      529,  531,  533,  535,  537,  539,  541,  543,  545,  547,
-      549
-    } ;
-
-static yyconst flex_int16_t yy_def[182] =
-    {   0,
-      162,    1,  163,  163,  164,  164,  165,  165,  162,  166,
-      167,  162,  167,  167,  167,  167,  167,  167,  162,  166,
-      167,  167,  167,  168,  168,  167,  167,  167,  162,  169,
-      162,  170,  162,   20,  167,  162,  167,  167,  167,  167,
-      167,  171,   19,   20,   20,   20,   20,  167,  167,  167,
-      167,  167,   25,   25,  167,  167,   28,   28,  167,  167,
-      167,  167,  167,  167,  167,  169,  162,  170,  162,  170,
-      162,  171,   45,   25,  167,  167,  167,  167,  167,  167,
-      167,  167,  167,  167,   20,   25,  167,  167,  167,  167,
-      167,  167,  172,  173,  167,  167,  167,  167,  167,  167,
-
-       25,  167,  174,  175,  167,  167,  167,  172,  162,  173,
-      162,  167,  167,  167,  167,  167,  167,   25,  167,  174,
-      162,  175,  162,  176,  177,  167,  178,  167,  167,  167,
-      167,  167,   25,  167,  176,  162,  177,  167,  178,  162,
-      179,  167,  180,  167,  162,  167,  179,  162,  167,  162,
-      167,  180,  167,  181,  167,  167,  167,  181,  167,  162,
-      167,    0,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162
-    } ;
-
-static yyconst flex_int16_t yy_nxt[592] =
-    {   0,
-       10,   11,   12,   13,   14,   15,   16,   17,   16,   16,
-       18,   19,   20,   20,   21,   22,   23,   24,   24,   24,
-       24,   24,   25,   24,   24,   24,   24,   24,   24,   24,
-       24,   24,   24,   24,   24,   24,   24,   24,   26,   27,
-       31,   31,   36,   28,   37,   36,   36,   32,   32,   35,
-       36,   35,   35,   35,   35,   35,   35,   35,   35,   38,
-       36,   36,   35,   35,   35,   36,   40,   36,   39,   36,
-       36,   66,   48,   49,   41,   42,   56,   36,   55,   53,
-       57,   36,   50,   51,   52,  101,   35,   34,   35,   36,
-       35,   35,   35,   35,   35,   35,   35,   35,   43,   43,
-
-       34,   35,   35,   35,   34,   34,   44,   45,   34,   34,
-       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
-       34,   34,   44,   34,   45,   35,   35,   36,   35,   35,
-       35,   35,   35,   35,   35,   35,   46,   46,   46,   35,
-       35,   35,   69,   36,   47,   37,   36,   53,   74,   70,
-       71,   34,   34,   34,   56,   36,   36,   36,   57,   34,
-       47,   36,   36,   35,   34,   35,   36,   35,   35,   35,
-       35,   35,   35,   35,   35,   34,   34,   75,   35,   35,
-       35,   81,   36,   80,   53,   36,   36,   86,  148,   83,
-       34,   34,   34,   34,   36,   36,  129,   36,   34,  148,
-
-       36,   98,   35,   34,   35,   36,   35,   35,   35,   35,
-       35,   35,   35,   35,   34,   82,   84,   35,   35,   35,
-       34,   34,   34,   85,   69,   76,   54,   77,   34,   69,
-       78,  162,  162,   36,   36,   79,   70,   71,   36,   85,
-       36,   35,   58,   36,   34,   36,   39,   36,  140,   36,
-       36,   36,  133,   53,   36,   87,  145,   36,   88,   36,
-       90,   36,   36,   59,   60,   89,   36,   61,   62,   99,
-       92,  104,   63,   36,   97,   91,   64,   65,   73,   73,
-       73,  100,  106,  102,   73,  105,   34,  107,   73,   73,
-       73,   73,   34,   34,   34,  103,   36,   36,   36,   36,
-
-       34,   36,   34,   93,   93,   94,   93,   93,   93,   93,
-       93,   93,   93,   93,   36,   36,   34,   93,   93,   93,
-      112,  113,   36,   36,  119,   95,   36,  117,  125,   36,
-       36,   36,   96,   36,   36,  114,   36,   36,  115,   36,
-       36,   93,  136,  116,   36,  124,   36,  159,  160,   53,
-       36,  127,  128,  126,   36,  131,  130,  134,  132,  129,
-       36,  141,   36,  143,  146,  149,  150,  140,  138,  142,
-      142,  142,   36,  136,  144,  151,  151,  151,  155,  123,
-      121,  153,   35,  145,   36,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   35,   35,   35,   35,   35,  154,
-
-      154,  154,  154,  154,  154,  154,  154,  154,  154,  154,
-      154,  154,  154,  154,  154,  154,  154,  154,  154,  154,
-       35,  149,  150,   36,  149,  150,  111,  109,  123,  121,
-      118,  156,  156,  156,  151,  151,  151,   35,   35,   36,
-       35,   35,   35,   35,   35,  157,   35,   35,  159,  160,
-      143,   35,   35,   35,  159,  160,  111,  109,  161,  161,
-      161,   36,   67,   35,  161,  161,  161,   35,   36,   53,
-       36,   36,   36,   36,   36,   35,   35,   35,   36,   35,
-       35,   35,   35,   35,  157,   35,   35,   36,   36,   36,
-       35,   35,   35,   36,   36,   36,   67,   36,   36,  162,
-
-       29,   29,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,   35,   29,   29,   30,   30,   33,
-       33,   34,   34,   35,   35,   53,   53,   68,   68,   72,
-       72,  108,  108,  110,  110,  120,  120,  122,  122,  135,
-      135,  137,  137,  139,  139,  147,  147,  152,  152,  158,
-      158,    9,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162
-
-    } ;
-
-static yyconst flex_int16_t yy_chk[592] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
-        5,    6,   26,    2,   11,   11,   14,    5,    6,   10,
-       10,   10,   10,   10,   10,   10,   10,   10,   10,   14,
-       21,   17,   10,   10,   10,   15,   17,   18,   15,   22,
-       23,  169,   21,   21,   18,   18,   27,   27,   26,   86,
-       27,  157,   22,   23,   23,   86,   10,   19,   19,   19,
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
-       19,   19,   19,   19,   19,   19,   20,   20,   20,   20,
-       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
-       20,   20,   32,  153,   20,   37,   37,   54,   54,   32,
-       32,   34,   34,   34,   56,   56,   59,   62,   56,   34,
-       20,   61,   64,   20,   24,   24,   24,   24,   24,   24,
-       24,   24,   24,   24,   24,   34,   43,   59,   24,   24,
-       24,   62,   82,   61,   74,   63,  152,   74,  147,   64,
-       44,   44,   44,   43,  143,   65,  114,  114,   44,  141,
-
-       60,   82,   24,   25,   25,   25,   25,   25,   25,   25,
-       25,   25,   25,   25,   44,   63,   65,   25,   25,   25,
-       47,   47,   47,   73,   68,   60,   25,   60,   47,   70,
-       60,   68,   68,   75,   76,   60,   70,   70,   79,   73,
-       77,   25,   28,   28,   47,   78,   28,   81,  139,   83,
-       89,   84,  118,  118,   91,   75,  134,  134,   76,   87,
-       77,   90,  137,   28,   28,   76,   92,   28,   28,   83,
-       79,   89,   28,   88,   81,   78,   28,   28,   45,   45,
-       45,   84,   91,   87,   45,   90,   45,   92,   45,   45,
-       45,   45,   85,   85,   85,   88,  100,  102,  106,   95,
-
-       85,   96,   45,   80,   80,   80,   80,   80,   80,   80,
-       80,   80,   80,   80,   97,   98,   85,   80,   80,   80,
-       95,   96,   99,  105,  102,   80,  107,  100,  106,  112,
-      115,  113,   80,  116,  117,   97,  119,  126,   98,  128,
-      138,   80,  135,   99,  130,  105,  132,  159,  159,  133,
-      146,  112,  113,  107,  144,  116,  115,  119,  117,  129,
-      129,  128,  131,  130,  138,  142,  142,  127,  126,  129,
-      129,  129,  125,  124,  132,  142,  142,  142,  146,  122,
-      120,  144,  145,  145,  145,  145,  145,  145,  145,  145,
-      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
-
-      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
-      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
-      145,  149,  149,  155,  151,  151,  110,  108,  104,  103,
-      101,  149,  149,  149,  151,  151,  151,  154,  154,  154,
-      154,  154,  154,  154,  154,  154,  154,  154,  156,  156,
-      155,  154,  154,  154,  161,  161,   94,   93,  156,  156,
-      156,   72,   66,   58,  161,  161,  161,   57,   55,   53,
-       52,   51,   50,   49,   48,  154,  158,  158,  158,  158,
-      158,  158,  158,  158,  158,  158,  158,   42,   41,   40,
-      158,  158,  158,   39,   38,   35,   30,   16,   13,    9,
-
-        8,    7,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,  158,  163,  163,  164,  164,  165,
-      165,  166,  166,  167,  167,  168,  168,  170,  170,  171,
-      171,  172,  172,  173,  173,  174,  174,  175,  175,  176,
-      176,  177,  177,  178,  178,  179,  179,  180,  180,  181,
-      181,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162
-
-    } ;
-
-#define YY_TRAILING_MASK 0x2000
-#define YY_TRAILING_HEAD_MASK 0x4000
-#define REJECT \
-{ \
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
-yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
-yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
-yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
-++yyg->yy_lp; \
-goto find_rule; \
-}
-
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "glcpp/glcpp-lex.l"
-#line 2 "glcpp/glcpp-lex.l"
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "glcpp.h"
-#include "glcpp-parse.h"
-
-/* Flex annoyingly generates some functions without making them
- * static. Let's declare them here. */
-int glcpp_get_column  (yyscan_t yyscanner);
-void glcpp_set_column (int  column_no , yyscan_t yyscanner);
-
-#define YY_NO_INPUT
-
-#define YY_USER_ACTION                                          \
-   do {                                                         \
-      yylloc->first_column = yycolumn + 1;                      \
-      yylloc->first_line = yylineno;                            \
-      yycolumn += yyleng;                                       \
-   } while(0);
-
-#define YY_USER_INIT			\
-	do {				\
-		yylineno = 1;		\
-		yycolumn = 1;		\
-		yylloc->source = 0;	\
-	} while(0)
-
-#line 700 "glcpp/glcpp-lex.c"
-
-#define INITIAL 0
-#define DONE 1
-#define COMMENT 2
-#define UNREACHABLE 3
-
-#define YY_EXTRA_TYPE glcpp_parser_t *
-
-/* Holds the entire state of the reentrant scanner. */
-struct yyguts_t
-    {
-
-    /* User-defined. Not touched by flex. */
-    YY_EXTRA_TYPE yyextra_r;
-
-    /* The rest are the same as the globals declared in the non-reentrant scanner. */
-    FILE *yyin_r, *yyout_r;
-    size_t yy_buffer_stack_top; /**< index of top of stack. */
-    size_t yy_buffer_stack_max; /**< capacity of stack. */
-    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
-    char yy_hold_char;
-    int yy_n_chars;
-    int yyleng_r;
-    char *yy_c_buf_p;
-    int yy_init;
-    int yy_start;
-    int yy_did_buffer_switch_on_eof;
-    int yy_start_stack_ptr;
-    int yy_start_stack_depth;
-    int *yy_start_stack;
-    yy_state_type yy_last_accepting_state;
-    char* yy_last_accepting_cpos;
-
-    int yylineno_r;
-    int yy_flex_debug_r;
-
-    yy_state_type *yy_state_buf;
-    yy_state_type *yy_state_ptr;
-    char *yy_full_match;
-    int yy_lp;
-
-    /* These are only needed for trailing context rules,
-     * but there's no conditional variable for that yet. */
-    int yy_looking_for_trail_begin;
-    int yy_full_lp;
-    int *yy_full_state;
-
-    char *yytext_r;
-    int yy_more_flag;
-    int yy_more_len;
-
-    YYSTYPE * yylval_r;
-
-    YYLTYPE * yylloc_r;
-
-    }; /* end struct yyguts_t */
-
-static int yy_init_globals (yyscan_t yyscanner );
-
-    /* This must go here because YYSTYPE and YYLTYPE are included
-     * from bison output in section 1.*/
-    #    define yylval yyg->yylval_r
-    
-    #    define yylloc yyg->yylloc_r
-    
-int glcpp_lex_init (yyscan_t* scanner);
-
-int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int glcpp_lex_destroy (yyscan_t yyscanner );
-
-int glcpp_get_debug (yyscan_t yyscanner );
-
-void glcpp_set_debug (int debug_flag ,yyscan_t yyscanner );
-
-YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner );
-
-void glcpp_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-
-FILE *glcpp_get_in (yyscan_t yyscanner );
-
-void glcpp_set_in  (FILE * in_str ,yyscan_t yyscanner );
-
-FILE *glcpp_get_out (yyscan_t yyscanner );
-
-void glcpp_set_out  (FILE * out_str ,yyscan_t yyscanner );
-
-int glcpp_get_leng (yyscan_t yyscanner );
-
-char *glcpp_get_text (yyscan_t yyscanner );
-
-int glcpp_get_lineno (yyscan_t yyscanner );
-
-void glcpp_set_lineno (int line_number ,yyscan_t yyscanner );
-
-YYSTYPE * glcpp_get_lval (yyscan_t yyscanner );
-
-void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
-
-       YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner );
-    
-        void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-    
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int glcpp_wrap (yyscan_t yyscanner );
-#else
-extern int glcpp_wrap (yyscan_t yyscanner );
-#endif
-#endif
-
-    static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
-    
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
-#else
-static int input (yyscan_t yyscanner );
-#endif
-
-#endif
-
-    static void yy_push_state (int new_state ,yyscan_t yyscanner);
-    
-    static void yy_pop_state (yyscan_t yyscanner );
-    
-    static int yy_top_state (yyscan_t yyscanner );
-    
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		unsigned n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int glcpp_lex \
-               (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-
-#define YY_DECL int glcpp_lex \
-               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 76 "glcpp/glcpp-lex.l"
-
-
-	/* Single-line comments */
-#line 958 "glcpp/glcpp-lex.c"
-
-    yylval = yylval_param;
-
-    yylloc = yylloc_param;
-
-	if ( !yyg->yy_init )
-		{
-		yyg->yy_init = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-        /* Create the reject buffer large enough to save one state per allowed character. */
-        if ( ! yyg->yy_state_buf )
-            yyg->yy_state_buf = (yy_state_type *)glcpp_alloc(YY_STATE_BUF_SIZE  ,yyscanner);
-            if ( ! yyg->yy_state_buf )
-                YY_FATAL_ERROR( "out of dynamic memory in glcpp_lex()" );
-
-		if ( ! yyg->yy_start )
-			yyg->yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			glcpp_ensure_buffer_stack (yyscanner);
-			YY_CURRENT_BUFFER_LVALUE =
-				glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-		}
-
-		glcpp__load_buffer_state(yyscanner );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yyg->yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yyg->yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yyg->yy_start;
-		yy_current_state += YY_AT_BOL();
-
-		yyg->yy_state_ptr = yyg->yy_state_buf;
-		*yyg->yy_state_ptr++ = yy_current_state;
-
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 163 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			*yyg->yy_state_ptr++ = yy_current_state;
-			++yy_cp;
-			}
-		while ( yy_current_state != 162 );
-
-yy_find_action:
-		yy_current_state = *--yyg->yy_state_ptr;
-		yyg->yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
-		for ( ; ; ) /* until we find what rule we matched */
-			{
-			if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
-				{
-				yy_act = yy_acclist[yyg->yy_lp];
-				if ( yy_act & YY_TRAILING_HEAD_MASK ||
-				     yyg->yy_looking_for_trail_begin )
-					{
-					if ( yy_act == yyg->yy_looking_for_trail_begin )
-						{
-						yyg->yy_looking_for_trail_begin = 0;
-						yy_act &= ~YY_TRAILING_HEAD_MASK;
-						break;
-						}
-					}
-				else if ( yy_act & YY_TRAILING_MASK )
-					{
-					yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
-					yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
-					yyg->yy_full_match = yy_cp;
-					yyg->yy_full_state = yyg->yy_state_ptr;
-					yyg->yy_full_lp = yyg->yy_lp;
-					}
-				else
-					{
-					yyg->yy_full_match = yy_cp;
-					yyg->yy_full_state = yyg->yy_state_ptr;
-					yyg->yy_full_lp = yyg->yy_lp;
-					break;
-					}
-				++yyg->yy_lp;
-				goto find_rule;
-				}
-			--yy_cp;
-			yy_current_state = *--yyg->yy_state_ptr;
-			yyg->yy_lp = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 79 "glcpp/glcpp-lex.l"
-{
-}
-	YY_BREAK
-/* Multi-line comments */
-case 2:
-YY_RULE_SETUP
-#line 83 "glcpp/glcpp-lex.l"
-{ yy_push_state(COMMENT, yyscanner); }
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 84 "glcpp/glcpp-lex.l"
-
-	YY_BREAK
-case 4:
-/* rule 4 can match eol */
-YY_RULE_SETUP
-#line 85 "glcpp/glcpp-lex.l"
-{ yylineno++; yycolumn = 0; return NEWLINE; }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 86 "glcpp/glcpp-lex.l"
-
-	YY_BREAK
-case 6:
-/* rule 6 can match eol */
-YY_RULE_SETUP
-#line 87 "glcpp/glcpp-lex.l"
-{ yylineno++; yycolumn = 0; return NEWLINE; }
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 88 "glcpp/glcpp-lex.l"
-{
-	yy_pop_state(yyscanner);
-	if (yyextra->space_tokens)
-		return SPACE;
-}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 94 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	yyextra->space_tokens = 0;
-	return HASH_VERSION;
-}
-	YY_BREAK
-/* glcpp doesn't handle #extension, #version, or #pragma directives.
-	 * Simply pass them through to the main compiler's lexer/parser. */
-case 9:
-YY_RULE_SETUP
-#line 102 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	yylineno++;
-	yycolumn = 0;
-	return OTHER;
-}
-	YY_BREAK
-case 10:
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 109 "glcpp/glcpp-lex.l"
-{
-	/* Eat characters until the first digit is
-	 * encountered
-	 */
-	char *ptr = yytext;
-	while (!isdigit(*ptr))
-		ptr++;
-
-	/* Subtract one from the line number because
-	 * yylineno is zero-based instead of
-	 * one-based.
-	 */
-	yylineno = strtol(ptr, &ptr, 0) - 1;
-	yylloc->source = strtol(ptr, NULL, 0);
-}
-	YY_BREAK
-case 11:
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 125 "glcpp/glcpp-lex.l"
-{
-	/* Eat characters until the first digit is
-	 * encountered
-	 */
-	char *ptr = yytext;
-	while (!isdigit(*ptr))
-		ptr++;
-
-	/* Subtract one from the line number because
-	 * yylineno is zero-based instead of
-	 * one-based.
-	 */
-	yylineno = strtol(ptr, &ptr, 0) - 1;
-}
-	YY_BREAK
-case 12:
-/* rule 12 can match eol */
-YY_RULE_SETUP
-#line 140 "glcpp/glcpp-lex.l"
-{
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IFDEF;
-}
-	YY_BREAK
-case 13:
-/* rule 13 can match eol */
-YY_RULE_SETUP
-#line 146 "glcpp/glcpp-lex.l"
-{
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IFNDEF;
-}
-	YY_BREAK
-case 14:
-/* rule 14 can match eol */
-YY_RULE_SETUP
-#line 152 "glcpp/glcpp-lex.l"
-{
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IF;
-}
-	YY_BREAK
-case 15:
-/* rule 15 can match eol */
-YY_RULE_SETUP
-#line 158 "glcpp/glcpp-lex.l"
-{
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_ELIF;
-}
-	YY_BREAK
-case 16:
-/* rule 16 can match eol */
-YY_RULE_SETUP
-#line 164 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH_ELSE;
-}
-	YY_BREAK
-case 17:
-/* rule 17 can match eol */
-YY_RULE_SETUP
-#line 169 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH_ENDIF;
-}
-	YY_BREAK
-/* When skipping (due to an #if 0 or similar) consume anything
-	 * up to a newline. We do this with less priority than any
-	 * #if-related directive (#if, #elif, #else, #endif), but with
-	 * more priority than any other directive or token to avoid
-	 * any side-effects from skipped content.
-	 *
-	 * We use the lexing_if flag to avoid skipping any part of an
-	 * if conditional expression. */
-case 18:
-/* rule 18 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 182 "glcpp/glcpp-lex.l"
-{
-	/* Since this rule always matches, YY_USER_ACTION gets called for it,
-	 * wrongly incrementing yycolumn.  We undo that effect here. */
-	yycolumn -= yyleng;
-	if (yyextra->lexing_if ||
-	    yyextra->skip_stack == NULL ||
-	    yyextra->skip_stack->type == SKIP_NO_SKIP)
-	{
-		REJECT;
-	}
-}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 194 "glcpp/glcpp-lex.l"
-{
-	char *p;
-	for (p = yytext; !isalpha(p[0]); p++); /* skip "  #   " */
-	p += 5; /* skip "error" */
-	glcpp_error(yylloc, yyextra, "#error%s", p);
-}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 201 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH_DEFINE_FUNC;
-}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 206 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH_DEFINE_OBJ;
-}
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 211 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH_UNDEF;
-}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 216 "glcpp/glcpp-lex.l"
-{
-	yyextra->space_tokens = 0;
-	return HASH;
-}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 221 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 226 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 231 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 236 "glcpp/glcpp-lex.l"
-{
-	return LEFT_SHIFT;
-}
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 240 "glcpp/glcpp-lex.l"
-{
-	return RIGHT_SHIFT;
-}
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 244 "glcpp/glcpp-lex.l"
-{
-	return LESS_OR_EQUAL;
-}
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 248 "glcpp/glcpp-lex.l"
-{
-	return GREATER_OR_EQUAL;
-}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 252 "glcpp/glcpp-lex.l"
-{
-	return EQUAL;
-}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 256 "glcpp/glcpp-lex.l"
-{
-	return NOT_EQUAL;
-}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 260 "glcpp/glcpp-lex.l"
-{
-	return AND;
-}
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 264 "glcpp/glcpp-lex.l"
-{
-	return OR;
-}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 268 "glcpp/glcpp-lex.l"
-{
-	return PASTE;
-}
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 272 "glcpp/glcpp-lex.l"
-{
-	return DEFINED;
-}
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 276 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	return IDENTIFIER;
-}
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 281 "glcpp/glcpp-lex.l"
-{
-	return yytext[0];
-}
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 285 "glcpp/glcpp-lex.l"
-{
-	yylval->str = hieralloc_strdup (yyextra, yytext);
-	return OTHER;
-}
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 290 "glcpp/glcpp-lex.l"
-{
-	if (yyextra->space_tokens) {
-		return SPACE;
-	}
-}
-	YY_BREAK
-case 41:
-/* rule 41 can match eol */
-YY_RULE_SETUP
-#line 296 "glcpp/glcpp-lex.l"
-{
-	yyextra->lexing_if = 0;
-	yylineno++;
-	yycolumn = 0;
-	return NEWLINE;
-}
-	YY_BREAK
-/* Handle missing newline at EOF. */
-case YY_STATE_EOF(INITIAL):
-#line 304 "glcpp/glcpp-lex.l"
-{
-	BEGIN DONE; /* Don't keep matching this rule forever. */
-	yyextra->lexing_if = 0;
-	return NEWLINE;
-}
-	YY_BREAK
-/* We don't actually use the UNREACHABLE start condition. We
-	only have this action here so that we can pretend to call some
-	generated functions, (to avoid "defined but not used"
-	warnings. */
-case 42:
-YY_RULE_SETUP
-#line 314 "glcpp/glcpp-lex.l"
-{
-	unput('.');
-	yy_top_state(yyextra);
-}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 319 "glcpp/glcpp-lex.l"
-ECHO;
-	YY_BREAK
-#line 1475 "glcpp/glcpp-lex.c"
-			case YY_STATE_EOF(DONE):
-			case YY_STATE_EOF(COMMENT):
-			case YY_STATE_EOF(UNREACHABLE):
-				yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yyg->yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * glcpp_lex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state( yyscanner );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
-
-			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yyg->yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yyg->yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer( yyscanner ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yyg->yy_did_buffer_switch_on_eof = 0;
-
-				if ( glcpp_wrap(yyscanner ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yyg->yy_c_buf_p =
-					yyg->yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yyg->yy_c_buf_p =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-} /* end of glcpp_lex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = yyg->yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			yyg->yy_n_chars, (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	if ( yyg->yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			glcpp_restart(yyin  ,yyscanner);
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) glcpp_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	yyg->yy_n_chars += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	yy_current_state = yyg->yy_start;
-	yy_current_state += YY_AT_BOL();
-
-	yyg->yy_state_ptr = yyg->yy_state_buf;
-	*yyg->yy_state_ptr++ = yy_current_state;
-
-	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 163 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		*yyg->yy_state_ptr++ = yy_current_state;
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
-{
-	register int yy_is_jam;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
-
-	register YY_CHAR yy_c = 1;
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 163 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 162);
-	if ( ! yy_is_jam )
-		*yyg->yy_state_ptr++ = yy_current_state;
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-    static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
-{
-	register char *yy_cp;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-    yy_cp = yyg->yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yyg->yy_hold_char;
-
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yyg->yy_n_chars + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-	yyg->yytext_ptr = yy_bp;
-	yyg->yy_hold_char = *yy_cp;
-	yyg->yy_c_buf_p = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (yyscan_t yyscanner)
-#else
-    static int input  (yyscan_t yyscanner)
-#endif
-
-{
-	int c;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	*yyg->yy_c_buf_p = yyg->yy_hold_char;
-
-	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			/* This was really a NUL. */
-			*yyg->yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
-			++yyg->yy_c_buf_p;
-
-			switch ( yy_get_next_buffer( yyscanner ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					glcpp_restart(yyin ,yyscanner);
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( glcpp_wrap(yyscanner ) )
-						return EOF;
-
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput(yyscanner);
-#else
-					return input(yyscanner);
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
-	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
-	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
-
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * @param yyscanner The scanner object.
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void glcpp_restart  (FILE * input_file , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! YY_CURRENT_BUFFER ){
-        glcpp_ensure_buffer_stack (yyscanner);
-		YY_CURRENT_BUFFER_LVALUE =
-            glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-	}
-
-	glcpp__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
-	glcpp__load_buffer_state(yyscanner );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * @param yyscanner The scanner object.
- */
-    void glcpp__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		glcpp_pop_buffer_state();
-	 *		glcpp_push_buffer_state(new_buffer);
-     */
-	glcpp_ensure_buffer_stack (yyscanner);
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	glcpp__load_buffer_state(yyscanner );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (glcpp_wrap()) processing, but the only time this flag
-	 * is looked at is after glcpp_wrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-static void glcpp__load_buffer_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	yyg->yy_hold_char = *yyg->yy_c_buf_p;
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * @param yyscanner The scanner object.
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE glcpp__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) glcpp_alloc(b->yy_buf_size + 2 ,yyscanner );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	glcpp__init_buffer(b,file ,yyscanner);
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with glcpp__create_buffer()
- * @param yyscanner The scanner object.
- */
-    void glcpp__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		glcpp_free((void *) b->yy_ch_buf ,yyscanner );
-
-	glcpp_free((void *) b ,yyscanner );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a glcpp_restart() or at EOF.
- */
-    static void glcpp__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
-
-{
-	int oerrno = errno;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	glcpp__flush_buffer(b ,yyscanner);
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then glcpp__init_buffer was _probably_
-     * called from glcpp_restart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * @param yyscanner The scanner object.
- */
-    void glcpp__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		glcpp__load_buffer_state(yyscanner );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  @param yyscanner The scanner object.
- */
-void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (new_buffer == NULL)
-		return;
-
-	glcpp_ensure_buffer_stack(yyscanner);
-
-	/* This block is copied from glcpp__switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		yyg->yy_buffer_stack_top++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from glcpp__switch_to_buffer. */
-	glcpp__load_buffer_state(yyscanner );
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  @param yyscanner The scanner object.
- */
-void glcpp_pop_buffer_state (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (!YY_CURRENT_BUFFER)
-		return;
-
-	glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if (yyg->yy_buffer_stack_top > 0)
-		--yyg->yy_buffer_stack_top;
-
-	if (YY_CURRENT_BUFFER) {
-		glcpp__load_buffer_state(yyscanner );
-		yyg->yy_did_buffer_switch_on_eof = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void glcpp_ensure_buffer_stack (yyscan_t yyscanner)
-{
-	int num_to_alloc;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if (!yyg->yy_buffer_stack) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_alloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" );
-								  
-		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		yyg->yy_buffer_stack_max = num_to_alloc;
-		yyg->yy_buffer_stack_top = 0;
-		return;
-	}
-
-	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_realloc
-								(yyg->yy_buffer_stack,
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
-		yyg->yy_buffer_stack_max = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE glcpp__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	glcpp__switch_to_buffer(b ,yyscanner );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to glcpp_lex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       glcpp__scan_bytes() instead.
- */
-YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner)
-{
-    
-	return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner);
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE glcpp__scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) glcpp_alloc(n ,yyscanner );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = glcpp__scan_buffer(buf,n ,yyscanner);
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in glcpp__scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-    static void yy_push_state (int  new_state , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yyg->yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yyg->yy_start_stack_depth * sizeof( int );
-
-		if ( ! yyg->yy_start_stack )
-			yyg->yy_start_stack = (int *) glcpp_alloc(new_size ,yyscanner );
-
-		else
-			yyg->yy_start_stack = (int *) glcpp_realloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
-
-		if ( ! yyg->yy_start_stack )
-			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
-		}
-
-	yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-}
-
-    static void yy_pop_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( --yyg->yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
-}
-
-    static int yy_top_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = yyg->yy_hold_char; \
-		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
-		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
-		*yyg->yy_c_buf_p = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the user-defined data for this scanner.
- * @param yyscanner The scanner object.
- */
-YY_EXTRA_TYPE glcpp_get_extra  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyextra;
-}
-
-/** Get the current line number.
- * @param yyscanner The scanner object.
- */
-int glcpp_get_lineno  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yylineno;
-}
-
-/** Get the current column number.
- * @param yyscanner The scanner object.
- */
-int glcpp_get_column  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yycolumn;
-}
-
-/** Get the input stream.
- * @param yyscanner The scanner object.
- */
-FILE *glcpp_get_in  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyin;
-}
-
-/** Get the output stream.
- * @param yyscanner The scanner object.
- */
-FILE *glcpp_get_out  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyout;
-}
-
-/** Get the length of the current token.
- * @param yyscanner The scanner object.
- */
-int glcpp_get_leng  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyleng;
-}
-
-/** Get the current token.
- * @param yyscanner The scanner object.
- */
-
-char *glcpp_get_text  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yytext;
-}
-
-/** Set the user-defined data. This data is never touched by the scanner.
- * @param user_defined The data to be associated with this scanner.
- * @param yyscanner The scanner object.
- */
-void glcpp_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyextra = user_defined ;
-}
-
-/** Set the current line number.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void glcpp_set_lineno (int  line_number , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* lineno is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); 
-    
-    yylineno = line_number;
-}
-
-/** Set the current column.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void glcpp_set_column (int  column_no , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* column is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); 
-    
-    yycolumn = column_no;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * @param yyscanner The scanner object.
- * @see glcpp__switch_to_buffer
- */
-void glcpp_set_in (FILE *  in_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyin = in_str ;
-}
-
-void glcpp_set_out (FILE *  out_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyout = out_str ;
-}
-
-int glcpp_get_debug  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yy_flex_debug;
-}
-
-void glcpp_set_debug (int  bdebug , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yy_flex_debug = bdebug ;
-}
-
-/* Accessor methods for yylval and yylloc */
-
-YYSTYPE * glcpp_get_lval  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yylval;
-}
-
-void glcpp_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yylval = yylval_param;
-}
-
-YYLTYPE *glcpp_get_lloc  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yylloc;
-}
-    
-void glcpp_set_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yylloc = yylloc_param;
-}
-    
-/* User-visible API */
-
-/* glcpp_lex_init is special because it creates the scanner itself, so it is
- * the ONLY reentrant function that doesn't take the scanner as the last argument.
- * That's why we explicitly handle the declaration, instead of using our macros.
- */
-
-int glcpp_lex_init(yyscan_t* ptr_yy_globals)
-
-{
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-
-    *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), NULL );
-
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-
-    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-/* glcpp_lex_init_extra has the same functionality as glcpp_lex_init, but follows the
- * convention of taking the scanner as the last argument. Note however, that
- * this is a *pointer* to a scanner, as it will be allocated by this call (and
- * is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to glcpp_alloc in
- * the yyextra field.
- */
-
-int glcpp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
-{
-    struct yyguts_t dummy_yyguts;
-
-    glcpp_set_extra (yy_user_defined, &dummy_yyguts);
-
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-	
-    *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-	
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-    
-    /* By setting to 0xAA, we expose bugs in
-    yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-    
-    glcpp_set_extra (yy_user_defined, *ptr_yy_globals);
-    
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-static int yy_init_globals (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from glcpp_lex_destroy(), so don't allocate here.
-     */
-
-    yyg->yy_buffer_stack = 0;
-    yyg->yy_buffer_stack_top = 0;
-    yyg->yy_buffer_stack_max = 0;
-    yyg->yy_c_buf_p = (char *) 0;
-    yyg->yy_init = 0;
-    yyg->yy_start = 0;
-
-    yyg->yy_start_stack_ptr = 0;
-    yyg->yy_start_stack_depth = 0;
-    yyg->yy_start_stack =  NULL;
-
-    yyg->yy_state_buf = 0;
-    yyg->yy_state_ptr = 0;
-    yyg->yy_full_match = 0;
-    yyg->yy_lp = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * glcpp_lex_init()
-     */
-    return 0;
-}
-
-/* glcpp_lex_destroy is for both reentrant and non-reentrant scanners. */
-int glcpp_lex_destroy  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		glcpp_pop_buffer_state(yyscanner);
-	}
-
-	/* Destroy the stack itself. */
-	glcpp_free(yyg->yy_buffer_stack ,yyscanner);
-	yyg->yy_buffer_stack = NULL;
-
-    /* Destroy the start condition stack. */
-        glcpp_free(yyg->yy_start_stack ,yyscanner );
-        yyg->yy_start_stack = NULL;
-
-    glcpp_free ( yyg->yy_state_buf , yyscanner);
-    yyg->yy_state_buf  = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * glcpp_lex() is called, initialization will occur. */
-    yy_init_globals( yyscanner);
-
-    /* Destroy the main struct (reentrant only). */
-    glcpp_free ( yyscanner , yyscanner );
-    yyscanner = NULL;
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
-{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *glcpp_alloc (yy_size_t  size , yyscan_t yyscanner)
-{
-	return (void *) malloc( size );
-}
-
-void *glcpp_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
-{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-}
-
-void glcpp_free (void * ptr , yyscan_t yyscanner)
-{
-	free( (char *) ptr );	/* see glcpp_realloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 319 "glcpp/glcpp-lex.l"
-
-
-
-void
-glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader)
-{
-	glcpp__scan_string(shader,parser->scanner);
-}
-
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
deleted file mode 100644
index e936854..0000000
--- a/src/glsl/glcpp/glcpp-lex.l
+++ /dev/null
@@ -1,325 +0,0 @@
-%{
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "glcpp.h"
-#include "glcpp-parse.h"
-
-/* Flex annoyingly generates some functions without making them
- * static. Let's declare them here. */
-int glcpp_get_column  (yyscan_t yyscanner);
-void glcpp_set_column (int  column_no , yyscan_t yyscanner);
-
-#define YY_NO_INPUT
-
-#define YY_USER_ACTION                                          \
-   do {                                                         \
-      yylloc->first_column = yycolumn + 1;                      \
-      yylloc->first_line = yylineno;                            \
-      yycolumn += yyleng;                                       \
-   } while(0);
-
-#define YY_USER_INIT			\
-	do {				\
-		yylineno = 1;		\
-		yycolumn = 1;		\
-		yylloc->source = 0;	\
-	} while(0)
-%}
-
-%option bison-bridge bison-locations reentrant noyywrap
-%option extra-type="glcpp_parser_t *"
-%option prefix="glcpp_"
-%option stack
-%option never-interactive
-
-%x DONE COMMENT UNREACHABLE
-
-SPACE		[[:space:]]
-NONSPACE	[^[:space:]]
-NEWLINE		[\n]
-HSPACE		[ \t]
-HASH		^{HSPACE}*#{HSPACE}*
-IDENTIFIER	[_a-zA-Z][_a-zA-Z0-9]*
-PUNCTUATION	[][(){}.&*~!/%<>^|;,=+-]
-OTHER		[^][(){}.&*~!/%<>^|;,=#[:space:]+-]+
-
-DIGITS			[0-9][0-9]*
-DECIMAL_INTEGER		[1-9][0-9]*[uU]?
-OCTAL_INTEGER		0[0-7]*[uU]?
-HEXADECIMAL_INTEGER	0[xX][0-9a-fA-F]+[uU]?
-
-%%
-
-	/* Single-line comments */
-"//"[^\n]* {
-}
-
-	/* Multi-line comments */
-"/*"                    { yy_push_state(COMMENT, yyscanner); }
-<COMMENT>[^*\n]*
-<COMMENT>[^*\n]*\n      { yylineno++; yycolumn = 0; return NEWLINE; }
-<COMMENT>"*"+[^*/\n]*
-<COMMENT>"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; }
-<COMMENT>"*"+"/"        {
-	yy_pop_state(yyscanner);
-	if (yyextra->space_tokens)
-		return SPACE;
-}
-
-{HASH}version {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	yyextra->space_tokens = 0;
-	return HASH_VERSION;
-}
-
-	/* glcpp doesn't handle #extension, #version, or #pragma directives.
-	 * Simply pass them through to the main compiler's lexer/parser. */
-{HASH}(extension|pragma)[^\n]+ {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	yylineno++;
-	yycolumn = 0;
-	return OTHER;
-}
-
-{HASH}line{HSPACE}+{DIGITS}{HSPACE}+{DIGITS}{HSPACE}*$ {
-	/* Eat characters until the first digit is
-	 * encountered
-	 */
-	char *ptr = yytext;
-	while (!isdigit(*ptr))
-		ptr++;
-
-	/* Subtract one from the line number because
-	 * yylineno is zero-based instead of
-	 * one-based.
-	 */
-	yylineno = strtol(ptr, &ptr, 0) - 1;
-	yylloc->source = strtol(ptr, NULL, 0);
-}
-
-{HASH}line{HSPACE}+{DIGITS}{HSPACE}*$ {
-	/* Eat characters until the first digit is
-	 * encountered
-	 */
-	char *ptr = yytext;
-	while (!isdigit(*ptr))
-		ptr++;
-
-	/* Subtract one from the line number because
-	 * yylineno is zero-based instead of
-	 * one-based.
-	 */
-	yylineno = strtol(ptr, &ptr, 0) - 1;
-}
-
-{HASH}ifdef/.*\n {
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IFDEF;
-}
-
-{HASH}ifndef/.*\n {
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IFNDEF;
-}
-
-{HASH}if/[^_a-zA-Z0-9].*\n {
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_IF;
-}
-
-{HASH}elif/.*\n {
-	yyextra->lexing_if = 1;
-	yyextra->space_tokens = 0;
-	return HASH_ELIF;
-}
-
-{HASH}else/.*\n {
-	yyextra->space_tokens = 0;
-	return HASH_ELSE;
-}
-
-{HASH}endif/.*\n {
-	yyextra->space_tokens = 0;
-	return HASH_ENDIF;
-}
-
-	/* When skipping (due to an #if 0 or similar) consume anything
-	 * up to a newline. We do this with less priority than any
-	 * #if-related directive (#if, #elif, #else, #endif), but with
-	 * more priority than any other directive or token to avoid
-	 * any side-effects from skipped content.
-	 *
-	 * We use the lexing_if flag to avoid skipping any part of an
-	 * if conditional expression. */
-[^\n]+/\n {
-	/* Since this rule always matches, YY_USER_ACTION gets called for it,
-	 * wrongly incrementing yycolumn.  We undo that effect here. */
-	yycolumn -= yyleng;
-	if (yyextra->lexing_if ||
-	    yyextra->skip_stack == NULL ||
-	    yyextra->skip_stack->type == SKIP_NO_SKIP)
-	{
-		REJECT;
-	}
-}
-
-{HASH}error.* {
-	char *p;
-	for (p = yytext; !isalpha(p[0]); p++); /* skip "  #   " */
-	p += 5; /* skip "error" */
-	glcpp_error(yylloc, yyextra, "#error%s", p);
-}
-
-{HASH}define{HSPACE}+/{IDENTIFIER}"(" {
-	yyextra->space_tokens = 0;
-	return HASH_DEFINE_FUNC;
-}
-
-{HASH}define {
-	yyextra->space_tokens = 0;
-	return HASH_DEFINE_OBJ;
-}
-
-{HASH}undef {
-	yyextra->space_tokens = 0;
-	return HASH_UNDEF;
-}
-
-{HASH} {
-	yyextra->space_tokens = 0;
-	return HASH;
-}
-
-{DECIMAL_INTEGER} {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-
-{OCTAL_INTEGER} {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-
-{HEXADECIMAL_INTEGER} {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	return INTEGER_STRING;
-}
-
-"<<"  {
-	return LEFT_SHIFT;
-}
-
-">>" {
-	return RIGHT_SHIFT;
-}
-
-"<=" {
-	return LESS_OR_EQUAL;
-}
-
-">=" {
-	return GREATER_OR_EQUAL;
-}
-
-"==" {
-	return EQUAL;
-}
-
-"!=" {
-	return NOT_EQUAL;
-}
-
-"&&" {
-	return AND;
-}
-
-"||" {
-	return OR;
-}
-
-"##" {
-	return PASTE;
-}
-
-"defined" {
-	return DEFINED;
-}
-
-{IDENTIFIER} {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	return IDENTIFIER;
-}
-
-{PUNCTUATION} {
-	return yytext[0];
-}
-
-{OTHER}+ {
-	yylval->str = talloc_strdup (yyextra, yytext);
-	return OTHER;
-}
-
-{HSPACE}+ {
-	if (yyextra->space_tokens) {
-		return SPACE;
-	}
-}
-
-\n {
-	yyextra->lexing_if = 0;
-	yylineno++;
-	yycolumn = 0;
-	return NEWLINE;
-}
-
-	/* Handle missing newline at EOF. */
-<INITIAL><<EOF>> {
-	BEGIN DONE; /* Don't keep matching this rule forever. */
-	yyextra->lexing_if = 0;
-	return NEWLINE;
-}
-
-	/* We don't actually use the UNREACHABLE start condition. We
-	only have this action here so that we can pretend to call some
-	generated functions, (to avoid "defined but not used"
-	warnings. */
-<UNREACHABLE>. {
-	unput('.');
-	yy_top_state(yyextra);
-}
-
-%%
-
-void
-glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader)
-{
-	yy_scan_string(shader, parser->scanner);
-}
diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c
deleted file mode 100644
index fe77eca..0000000
--- a/src/glsl/glcpp/glcpp-parse.c
+++ /dev/null
@@ -1,4194 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 1
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Using locations.  */
-#define YYLSP_NEEDED 1
-
-
-
-/* Copy the first part of user declarations.  */
-
-/* Line 189 of yacc.c  */
-#line 1 "glcpp/glcpp-parse.y"
-
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <inttypes.h>
-
-#include "glcpp.h"
-#include "main/core.h" /* for struct gl_extensions */
-#include "main/mtypes.h" /* for gl_api enum */
-
-#define glcpp_print(stream, str) stream = hieralloc_strdup_append(stream, str)
-#define glcpp_printf(stream, fmt, args, ...) \
-	stream = hieralloc_asprintf_append(stream, fmt, args)
-
-static void
-yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error);
-
-static void
-_define_object_macro (glcpp_parser_t *parser,
-		      YYLTYPE *loc,
-		      const char *macro,
-		      token_list_t *replacements);
-
-static void
-_define_function_macro (glcpp_parser_t *parser,
-			YYLTYPE *loc,
-			const char *macro,
-			string_list_t *parameters,
-			token_list_t *replacements);
-
-static string_list_t *
-_string_list_create (void *ctx);
-
-static void
-_string_list_append_item (string_list_t *list, const char *str);
-
-static int
-_string_list_contains (string_list_t *list, const char *member, int *index);
-
-static int
-_string_list_length (string_list_t *list);
-
-static int
-_string_list_equal (string_list_t *a, string_list_t *b);
-
-static argument_list_t *
-_argument_list_create (void *ctx);
-
-static void
-_argument_list_append (argument_list_t *list, token_list_t *argument);
-
-static int
-_argument_list_length (argument_list_t *list);
-
-static token_list_t *
-_argument_list_member_at (argument_list_t *list, int index);
-
-/* Note: This function hieralloc_steal()s the str pointer. */
-static token_t *
-_token_create_str (void *ctx, int type, char *str);
-
-static token_t *
-_token_create_ival (void *ctx, int type, int ival);
-
-static token_list_t *
-_token_list_create (void *ctx);
-
-/* Note: This function adds a hieralloc_reference() to token.
- *
- * You may want to hieralloc_unlink any current reference if you no
- * longer need it. */
-static void
-_token_list_append (token_list_t *list, token_t *token);
-
-static void
-_token_list_append_list (token_list_t *list, token_list_t *tail);
-
-static int
-_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b);
-
-static active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker);
-
-static active_list_t *
-_active_list_pop (active_list_t *list);
-
-int
-_active_list_contains (active_list_t *list, const char *identifier);
-
-static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
-
-static void
-_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
-				 token_list_t *list);
-
-static void
-_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser,
-					 token_list_t *list);
-
-static void
-_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				  int condition);
-
-static void
-_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				    const char *type, int condition);
-
-static void
-_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
-
-#define yylex glcpp_parser_lex
-
-static int
-glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
-
-static void
-glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list);
-
-static void
-add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
-
-
-
-/* Line 189 of yacc.c  */
-#line 223 "glcpp/glcpp-parse.c"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     COMMA_FINAL = 258,
-     DEFINED = 259,
-     ELIF_EXPANDED = 260,
-     HASH = 261,
-     HASH_DEFINE_FUNC = 262,
-     HASH_DEFINE_OBJ = 263,
-     HASH_ELIF = 264,
-     HASH_ELSE = 265,
-     HASH_ENDIF = 266,
-     HASH_IF = 267,
-     HASH_IFDEF = 268,
-     HASH_IFNDEF = 269,
-     HASH_UNDEF = 270,
-     HASH_VERSION = 271,
-     IDENTIFIER = 272,
-     IF_EXPANDED = 273,
-     INTEGER = 274,
-     INTEGER_STRING = 275,
-     NEWLINE = 276,
-     OTHER = 277,
-     PLACEHOLDER = 278,
-     SPACE = 279,
-     PASTE = 280,
-     OR = 281,
-     AND = 282,
-     NOT_EQUAL = 283,
-     EQUAL = 284,
-     GREATER_OR_EQUAL = 285,
-     LESS_OR_EQUAL = 286,
-     RIGHT_SHIFT = 287,
-     LEFT_SHIFT = 288,
-     UNARY = 289
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 264 of yacc.c  */
-#line 311 "glcpp/glcpp-parse.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
-#endif
-{
-  return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-	     && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-	 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
-	     && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-  YYLTYPE yyls_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
-      + 2 * YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  2
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   606
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  57
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  17
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  101
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  162
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   289
-
-#define YYTRANSLATE(YYX)						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    47,     2,     2,     2,    43,    30,     2,
-      45,    46,    41,    39,    49,    40,    54,    42,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,    55,
-      33,    56,    34,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    50,     2,    51,    29,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    52,    28,    53,    48,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    31,    32,    35,    36,    37,    38,    44
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     4,     7,     9,    11,    13,    16,    20,
-      24,    29,    36,    44,    48,    52,    55,    60,    65,    69,
-      72,    75,    78,    82,    85,    87,    89,    91,    95,    99,
-     103,   107,   111,   115,   119,   123,   127,   131,   135,   139,
-     143,   147,   151,   155,   159,   163,   166,   169,   172,   175,
-     179,   181,   185,   187,   190,   193,   194,   196,   197,   199,
-     202,   207,   209,   211,   214,   216,   219,   221,   223,   225,
-     227,   229,   231,   233,   235,   237,   239,   241,   243,   245,
-     247,   249,   251,   253,   255,   257,   259,   261,   263,   265,
-     267,   269,   271,   273,   275,   277,   279,   281,   283,   285,
-     287,   289
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      58,     0,    -1,    -1,    58,    59,    -1,    61,    -1,    65,
-      -1,    60,    -1,     6,    66,    -1,    18,    63,    21,    -1,
-       5,    63,    21,    -1,     8,    17,    67,    21,    -1,     7,
-      17,    45,    46,    67,    21,    -1,     7,    17,    45,    64,
-      46,    67,    21,    -1,    15,    17,    21,    -1,    12,    70,
-      21,    -1,    12,    21,    -1,    13,    17,    68,    21,    -1,
-      14,    17,    68,    21,    -1,     9,    70,    21,    -1,     9,
-      21,    -1,    10,    21,    -1,    11,    21,    -1,    16,    62,
-      21,    -1,     6,    21,    -1,    20,    -1,    19,    -1,    62,
-      -1,    63,    26,    63,    -1,    63,    27,    63,    -1,    63,
-      28,    63,    -1,    63,    29,    63,    -1,    63,    30,    63,
-      -1,    63,    31,    63,    -1,    63,    32,    63,    -1,    63,
-      35,    63,    -1,    63,    36,    63,    -1,    63,    34,    63,
-      -1,    63,    33,    63,    -1,    63,    37,    63,    -1,    63,
-      38,    63,    -1,    63,    40,    63,    -1,    63,    39,    63,
-      -1,    63,    43,    63,    -1,    63,    42,    63,    -1,    63,
-      41,    63,    -1,    47,    63,    -1,    48,    63,    -1,    40,
-      63,    -1,    39,    63,    -1,    45,    63,    46,    -1,    17,
-      -1,    64,    49,    17,    -1,    21,    -1,    71,    21,    -1,
-      71,    21,    -1,    -1,    71,    -1,    -1,    71,    -1,     4,
-      17,    -1,     4,    45,    17,    46,    -1,    72,    -1,    69,
-      -1,    70,    69,    -1,    72,    -1,    71,    72,    -1,    17,
-      -1,    20,    -1,    73,    -1,    22,    -1,    24,    -1,    50,
-      -1,    51,    -1,    45,    -1,    46,    -1,    52,    -1,    53,
-      -1,    54,    -1,    30,    -1,    41,    -1,    39,    -1,    40,
-      -1,    48,    -1,    47,    -1,    42,    -1,    43,    -1,    38,
-      -1,    37,    -1,    33,    -1,    34,    -1,    36,    -1,    35,
-      -1,    32,    -1,    31,    -1,    29,    -1,    28,    -1,    27,
-      -1,    26,    -1,    55,    -1,    49,    -1,    56,    -1,    25,
-      -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint16 yyrline[] =
-{
-       0,   188,   188,   190,   194,   197,   202,   203,   207,   210,
-     216,   219,   222,   225,   233,   252,   262,   267,   272,   291,
-     306,   309,   312,   333,   337,   346,   351,   352,   355,   358,
-     361,   364,   367,   370,   373,   376,   379,   382,   385,   388,
-     391,   394,   397,   400,   403,   406,   409,   412,   415,   418,
-     424,   429,   437,   438,   442,   448,   449,   452,   454,   461,
-     465,   469,   474,   479,   487,   493,   501,   505,   509,   513,
-     517,   524,   525,   526,   527,   528,   529,   530,   531,   532,
-     533,   534,   535,   536,   537,   538,   539,   540,   541,   542,
-     543,   544,   545,   546,   547,   548,   549,   550,   551,   552,
-     553,   554
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "COMMA_FINAL", "DEFINED",
-  "ELIF_EXPANDED", "HASH", "HASH_DEFINE_FUNC", "HASH_DEFINE_OBJ",
-  "HASH_ELIF", "HASH_ELSE", "HASH_ENDIF", "HASH_IF", "HASH_IFDEF",
-  "HASH_IFNDEF", "HASH_UNDEF", "HASH_VERSION", "IDENTIFIER", "IF_EXPANDED",
-  "INTEGER", "INTEGER_STRING", "NEWLINE", "OTHER", "PLACEHOLDER", "SPACE",
-  "PASTE", "OR", "AND", "'|'", "'^'", "'&'", "NOT_EQUAL", "EQUAL", "'<'",
-  "'>'", "GREATER_OR_EQUAL", "LESS_OR_EQUAL", "RIGHT_SHIFT", "LEFT_SHIFT",
-  "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "'('", "')'", "'!'", "'~'",
-  "','", "'['", "']'", "'{'", "'}'", "'.'", "';'", "'='", "$accept",
-  "input", "line", "expanded_line", "control_line", "integer_constant",
-  "expression", "identifier_list", "text_line", "non_directive",
-  "replacement_list", "junk", "conditional_token", "conditional_tokens",
-  "pp_tokens", "preprocessing_token", "operator", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   124,    94,
-      38,   283,   284,    60,    62,   285,   286,   287,   288,    43,
-      45,    42,    47,    37,   289,    40,    41,    33,   126,    44,
-      91,    93,   123,   125,    46,    59,    61
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    57,    58,    58,    59,    59,    59,    59,    60,    60,
-      61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
-      61,    61,    61,    61,    62,    62,    63,    63,    63,    63,
-      63,    63,    63,    63,    63,    63,    63,    63,    63,    63,
-      63,    63,    63,    63,    63,    63,    63,    63,    63,    63,
-      64,    64,    65,    65,    66,    67,    67,    68,    68,    69,
-      69,    69,    70,    70,    71,    71,    72,    72,    72,    72,
-      72,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-      73,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-      73,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-      73,    73
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     0,     2,     1,     1,     1,     2,     3,     3,
-       4,     6,     7,     3,     3,     2,     4,     4,     3,     2,
-       2,     2,     3,     2,     1,     1,     1,     3,     3,     3,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-       3,     3,     3,     3,     3,     2,     2,     2,     2,     3,
-       1,     3,     1,     2,     2,     0,     1,     0,     1,     2,
-       4,     1,     1,     2,     1,     2,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       2,     0,     1,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    66,     0,    67,    52,    69,
-      70,   101,    97,    96,    95,    94,    78,    93,    92,    88,
-      89,    91,    90,    87,    86,    80,    81,    79,    84,    85,
-      73,    74,    83,    82,    99,    71,    72,    75,    76,    77,
-      98,   100,     3,     6,     4,     5,     0,    64,    68,    25,
-      24,     0,     0,     0,     0,     0,    26,     0,    23,     7,
-       0,     0,    55,     0,    19,    62,     0,    61,    20,    21,
-      15,     0,    57,    57,     0,     0,     0,    53,    65,    48,
-      47,     0,    45,    46,     9,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    54,     0,     0,    56,    59,     0,    18,
-      63,    14,     0,    58,     0,    13,    22,     8,    49,    27,
-      28,    29,    30,    31,    32,    33,    37,    36,    34,    35,
-      38,    39,    41,    40,    44,    43,    42,    50,    55,     0,
-      10,     0,    16,    17,     0,    55,     0,    60,    11,     0,
-      51,    12
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,     1,    52,    53,    54,    66,    67,   149,    55,    69,
-     115,   122,    75,    76,   116,    57,    58
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -147
-static const yytype_int16 yypact[] =
-{
-    -147,   112,  -147,    28,   -10,    55,    62,   152,   -15,    59,
-     192,    85,    86,    87,    51,  -147,    28,  -147,  -147,  -147,
-    -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,
-    -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,
-    -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,  -147,
-    -147,  -147,  -147,  -147,  -147,  -147,   312,  -147,  -147,  -147,
-    -147,    28,    28,    28,    28,    28,  -147,   428,  -147,  -147,
-     352,    63,   392,    17,  -147,  -147,   232,  -147,  -147,  -147,
-    -147,   272,   392,   392,    84,    89,   451,  -147,  -147,  -147,
-    -147,   469,  -147,  -147,  -147,    28,    28,    28,    28,    28,
-      28,    28,    28,    28,    28,    28,    28,    28,    28,    28,
-      28,    28,    28,  -147,    60,    90,   392,  -147,    96,  -147,
-    -147,  -147,    93,   392,    94,  -147,  -147,  -147,  -147,   489,
-     505,   520,   534,   547,   558,   558,    18,    18,    18,    18,
-     563,   563,    23,    23,  -147,  -147,  -147,  -147,   392,    32,
-    -147,    61,  -147,  -147,   110,   392,   118,  -147,  -147,   149,
-    -147,  -147
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
-{
-    -147,  -147,  -147,  -147,  -147,   157,   -11,  -147,  -147,  -147,
-    -146,    92,   -68,   200,     0,    -7,  -147
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
-      77,    56,   154,    77,    70,    86,    78,    15,   120,   159,
-      17,    68,    19,   120,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,   117,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    59,    60,    88,
-      89,    90,    91,    92,    93,   106,   107,   108,   109,   110,
-     111,   112,   118,    88,   110,   111,   112,    61,    62,    77,
-      59,    60,    71,    63,    77,    64,    65,   147,   155,    72,
-      79,   156,   123,   123,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,    82,    83,    84,   125,   148,   157,   114,    88,
-     126,   150,     2,   151,   152,   153,    88,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,   158,    17,    18,    19,   160,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    73,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-     161,    85,    17,    74,    19,   124,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    73,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-      81,     0,    17,    80,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    73,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-       0,     0,    17,   119,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    73,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-       0,     0,    17,   121,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,     0,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-       0,     0,    17,    87,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,     0,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-       0,     0,    17,   113,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,     0,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    15,
-       0,     0,    17,     0,    19,     0,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,     0,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    94,
-       0,     0,     0,     0,    95,    96,    97,    98,    99,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   127,     0,     0,     0,     0,    95,    96,    97,
-      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
-     108,   109,   110,   111,   112,    95,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,     0,     0,   128,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,    97,    98,    99,   100,   101,   102,   103,
-     104,   105,   106,   107,   108,   109,   110,   111,   112,    98,
-      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   108,   109,   110,   111,   112
-};
-
-static const yytype_int16 yycheck[] =
-{
-       7,     1,   148,    10,     4,    16,    21,    17,    76,   155,
-      20,    21,    22,    81,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    17,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    19,    20,    56,
-      61,    62,    63,    64,    65,    37,    38,    39,    40,    41,
-      42,    43,    45,    70,    41,    42,    43,    39,    40,    76,
-      19,    20,    17,    45,    81,    47,    48,    17,    46,    17,
-      21,    49,    82,    83,    95,    96,    97,    98,    99,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,    17,    17,    17,    21,    46,    46,    45,   116,
-      21,    21,     0,    17,    21,    21,   123,     5,     6,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    21,    20,    21,    22,    17,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,     4,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      21,    14,    20,    21,    22,    83,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,     4,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      10,    -1,    20,    21,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,     4,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      -1,    -1,    20,    21,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,     4,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      -1,    -1,    20,    21,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    -1,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      -1,    -1,    20,    21,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    -1,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      -1,    -1,    20,    21,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    -1,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    17,
-      -1,    -1,    20,    -1,    22,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    -1,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    21,
-      -1,    -1,    -1,    -1,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    21,    -1,    -1,    -1,    -1,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    -1,    -1,    46,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    39,    40,    41,    42,    43
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,    58,     0,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    20,    21,    22,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    59,    60,    61,    65,    71,    72,    73,    19,
-      20,    39,    40,    45,    47,    48,    62,    63,    21,    66,
-      71,    17,    17,     4,    21,    69,    70,    72,    21,    21,
-      21,    70,    17,    17,    17,    62,    63,    21,    72,    63,
-      63,    63,    63,    63,    21,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    21,    45,    67,    71,    17,    45,    21,
-      69,    21,    68,    71,    68,    21,    21,    21,    46,    63,
-      63,    63,    63,    63,    63,    63,    63,    63,    63,    63,
-      63,    63,    63,    63,    63,    63,    63,    17,    46,    64,
-      21,    17,    21,    21,    67,    46,    49,    46,    21,    67,
-      17,    21
-};
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  However,
-   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
-   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
-   discussed.  */
-
-#define YYFAIL		goto yyerrlab
-#if defined YYFAIL
-  /* This is here to suppress warnings from the GCC cpp's
-     -Wunused-macros.  Normally we don't worry about that warning, but
-     some users do, and we want to make it easy for users to remove
-     YYFAIL uses, which will produce warnings from Bison 2.5.  */
-#endif
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \
-      YYERROR;							\
-    }								\
-while (YYID (0))
-
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, &yylloc, parser)
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
-do {									  \
-  if (yydebug)								  \
-    {									  \
-      YYFPRINTF (stderr, "%s ", Title);					  \
-      yy_symbol_print (stderr,						  \
-		  Type, Value, Location, parser); \
-      YYFPRINTF (stderr, "\n");						  \
-    }									  \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    YYLTYPE const * const yylocationp;
-    glcpp_parser_t *parser;
-#endif
-{
-  if (!yyvaluep)
-    return;
-  YYUSE (yylocationp);
-  YYUSE (parser);
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    YYLTYPE const * const yylocationp;
-    glcpp_parser_t *parser;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  YY_LOCATION_PRINT (yyoutput, *yylocationp);
-  YYFPRINTF (yyoutput, ": ");
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, glcpp_parser_t *parser)
-#else
-static void
-yy_reduce_print (yyvsp, yylsp, yyrule, parser)
-    YYSTYPE *yyvsp;
-    YYLTYPE *yylsp;
-    int yyrule;
-    glcpp_parser_t *parser;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-	     yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       , &(yylsp[(yyi + 1) - (yynrhs)])		       , parser);
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, yylsp, Rule, parser); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-	switch (*++yyp)
-	  {
-	  case '\'':
-	  case ',':
-	    goto do_not_strip_quotes;
-
-	  case '\\':
-	    if (*++yyp != '\\')
-	      goto do_not_strip_quotes;
-	    /* Fall through.  */
-	  default:
-	    if (yyres)
-	      yyres[yyn] = *yyp;
-	    yyn++;
-	    break;
-
-	  case '"':
-	    if (yyres)
-	      yyres[yyn] = '\0';
-	    return yyn;
-	  }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, glcpp_parser_t *parser)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-    YYLTYPE *yylocationp;
-    glcpp_parser_t *parser;
-#endif
-{
-  YYUSE (yyvaluep);
-  YYUSE (yylocationp);
-  YYUSE (parser);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
-}
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (glcpp_parser_t *parser);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (glcpp_parser_t *parser)
-#else
-int
-yyparse (parser)
-    glcpp_parser_t *parser;
-#endif
-#endif
-{
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Location data for the lookahead symbol.  */
-YYLTYPE yylloc;
-
-    /* Number of syntax errors so far.  */
-    int yynerrs;
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-       `yyls': related to locations.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    /* The location stack.  */
-    YYLTYPE yylsa[YYINITDEPTH];
-    YYLTYPE *yyls;
-    YYLTYPE *yylsp;
-
-    /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[3];
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-  YYLTYPE yyloc;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yyls = yylsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-  yylsp = yyls;
-
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-  /* Initialize the default location before parsing starts.  */
-  yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 1;
-#endif
-
-/* User initialization code.  */
-
-/* Line 1251 of yacc.c  */
-#line 155 "glcpp/glcpp-parse.y"
-{
-	yylloc.first_line = 1;
-	yylloc.first_column = 1;
-	yylloc.last_line = 1;
-	yylloc.last_column = 1;
-	yylloc.source = 0;
-}
-
-/* Line 1251 of yacc.c  */
-#line 1625 "glcpp/glcpp-parse.c"
-  yylsp[0] = yylloc;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack.  Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	yytype_int16 *yyss1 = yyss;
-	YYLTYPE *yyls1 = yyls;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow (YY_("memory exhausted"),
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yyls1, yysize * sizeof (*yylsp),
-		    &yystacksize);
-
-	yyls = yyls1;
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	yytype_int16 *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-	YYSTACK_RELOCATE (yyls_alloc, yyls);
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-      yylsp = yyls + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-  *++yylsp = yylloc;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-  /* Default location.  */
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 4:
-
-/* Line 1464 of yacc.c  */
-#line 194 "glcpp/glcpp-parse.y"
-    {
-		glcpp_print(parser->output, "\n");
-	;}
-    break;
-
-  case 5:
-
-/* Line 1464 of yacc.c  */
-#line 197 "glcpp/glcpp-parse.y"
-    {
-		_glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list));
-		glcpp_print(parser->output, "\n");
-		hieralloc_free ((yyvsp[(1) - (1)].token_list));
-	;}
-    break;
-
-  case 8:
-
-/* Line 1464 of yacc.c  */
-#line 207 "glcpp/glcpp-parse.y"
-    {
-		_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival));
-	;}
-    break;
-
-  case 9:
-
-/* Line 1464 of yacc.c  */
-#line 210 "glcpp/glcpp-parse.y"
-    {
-		_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival));
-	;}
-    break;
-
-  case 10:
-
-/* Line 1464 of yacc.c  */
-#line 216 "glcpp/glcpp-parse.y"
-    {
-		_define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list));
-	;}
-    break;
-
-  case 11:
-
-/* Line 1464 of yacc.c  */
-#line 219 "glcpp/glcpp-parse.y"
-    {
-		_define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list));
-	;}
-    break;
-
-  case 12:
-
-/* Line 1464 of yacc.c  */
-#line 222 "glcpp/glcpp-parse.y"
-    {
-		_define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list));
-	;}
-    break;
-
-  case 13:
-
-/* Line 1464 of yacc.c  */
-#line 225 "glcpp/glcpp-parse.y"
-    {
-		macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str));
-		if (macro) {
-			hash_table_remove (parser->defines, (yyvsp[(2) - (3)].str));
-			hieralloc_free (macro);
-		}
-		hieralloc_free ((yyvsp[(2) - (3)].str));
-	;}
-    break;
-
-  case 14:
-
-/* Line 1464 of yacc.c  */
-#line 233 "glcpp/glcpp-parse.y"
-    {
-		/* Be careful to only evaluate the 'if' expression if
-		 * we are not skipping. When we are skipping, we
-		 * simply push a new 0-valued 'if' onto the skip
-		 * stack.
-		 *
-		 * This avoids generating diagnostics for invalid
-		 * expressions that are being skipped. */
-		if (parser->skip_stack == NULL ||
-		    parser->skip_stack->type == SKIP_NO_SKIP)
-		{
-			_glcpp_parser_expand_if (parser, IF_EXPANDED, (yyvsp[(2) - (3)].token_list));
-		}	
-		else
-		{
-			_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), 0);
-			parser->skip_stack->type = SKIP_TO_ENDIF;
-		}
-	;}
-    break;
-
-  case 15:
-
-/* Line 1464 of yacc.c  */
-#line 252 "glcpp/glcpp-parse.y"
-    {
-		/* #if without an expression is only an error if we
-		 *  are not skipping */
-		if (parser->skip_stack == NULL ||
-		    parser->skip_stack->type == SKIP_NO_SKIP)
-		{
-			glcpp_error(& (yylsp[(1) - (2)]), parser, "#if with no expression");
-		}	
-		_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (2)]), 0);
-	;}
-    break;
-
-  case 16:
-
-/* Line 1464 of yacc.c  */
-#line 262 "glcpp/glcpp-parse.y"
-    {
-		macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
-		hieralloc_free ((yyvsp[(2) - (4)].str));
-		_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL);
-	;}
-    break;
-
-  case 17:
-
-/* Line 1464 of yacc.c  */
-#line 267 "glcpp/glcpp-parse.y"
-    {
-		macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
-		hieralloc_free ((yyvsp[(2) - (4)].str));
-		_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL);
-	;}
-    break;
-
-  case 18:
-
-/* Line 1464 of yacc.c  */
-#line 272 "glcpp/glcpp-parse.y"
-    {
-		/* Be careful to only evaluate the 'elif' expression
-		 * if we are not skipping. When we are skipping, we
-		 * simply change to a 0-valued 'elif' on the skip
-		 * stack.
-		 *
-		 * This avoids generating diagnostics for invalid
-		 * expressions that are being skipped. */
-		if (parser->skip_stack &&
-		    parser->skip_stack->type == SKIP_TO_ELSE)
-		{
-			_glcpp_parser_expand_if (parser, ELIF_EXPANDED, (yyvsp[(2) - (3)].token_list));
-		}
-		else
-		{
-			_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]),
-							    "elif", 0);
-		}
-	;}
-    break;
-
-  case 19:
-
-/* Line 1464 of yacc.c  */
-#line 291 "glcpp/glcpp-parse.y"
-    {
-		/* #elif without an expression is an error unless we
-		 * are skipping. */
-		if (parser->skip_stack &&
-		    parser->skip_stack->type == SKIP_TO_ELSE)
-		{
-			glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif with no expression");
-		}
-		else
-		{
-			_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]),
-							    "elif", 0);
-			glcpp_warning(& (yylsp[(1) - (2)]), parser, "ignoring illegal #elif without expression");
-		}
-	;}
-    break;
-
-  case 20:
-
-/* Line 1464 of yacc.c  */
-#line 306 "glcpp/glcpp-parse.y"
-    {
-		_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1);
-	;}
-    break;
-
-  case 21:
-
-/* Line 1464 of yacc.c  */
-#line 309 "glcpp/glcpp-parse.y"
-    {
-		_glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)]));
-	;}
-    break;
-
-  case 22:
-
-/* Line 1464 of yacc.c  */
-#line 312 "glcpp/glcpp-parse.y"
-    {
-		macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
-		if (macro) {
-			hash_table_remove (parser->defines, "__VERSION__");
-			hieralloc_free (macro);
-		}
-		add_builtin_define (parser, "__VERSION__", (yyvsp[(2) - (3)].ival));
-
-		if ((yyvsp[(2) - (3)].ival) == 100)
-			add_builtin_define (parser, "GL_ES", 1);
-
-		/* Currently, all ES2 implementations support highp in the
-		 * fragment shader, so we always define this macro in ES2.
-		 * If we ever get a driver that doesn't support highp, we'll
-		 * need to add a flag to the gl_context and check that here.
-		 */
-		if ((yyvsp[(2) - (3)].ival) >= 130 || (yyvsp[(2) - (3)].ival) == 100)
-			add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
-
-		glcpp_printf(parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival));
-	;}
-    break;
-
-  case 24:
-
-/* Line 1464 of yacc.c  */
-#line 337 "glcpp/glcpp-parse.y"
-    {
-		if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) {
-			(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str) + 2, NULL, 16);
-		} else if ((yyvsp[(1) - (1)].str)[0] == '0') {
-			(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 8);
-		} else {
-			(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 10);
-		}
-	;}
-    break;
-
-  case 25:
-
-/* Line 1464 of yacc.c  */
-#line 346 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (1)].ival);
-	;}
-    break;
-
-  case 27:
-
-/* Line 1464 of yacc.c  */
-#line 352 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 28:
-
-/* Line 1464 of yacc.c  */
-#line 355 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 29:
-
-/* Line 1464 of yacc.c  */
-#line 358 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 30:
-
-/* Line 1464 of yacc.c  */
-#line 361 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 31:
-
-/* Line 1464 of yacc.c  */
-#line 364 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 32:
-
-/* Line 1464 of yacc.c  */
-#line 367 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 33:
-
-/* Line 1464 of yacc.c  */
-#line 370 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 34:
-
-/* Line 1464 of yacc.c  */
-#line 373 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 35:
-
-/* Line 1464 of yacc.c  */
-#line 376 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 36:
-
-/* Line 1464 of yacc.c  */
-#line 379 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 37:
-
-/* Line 1464 of yacc.c  */
-#line 382 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 38:
-
-/* Line 1464 of yacc.c  */
-#line 385 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 39:
-
-/* Line 1464 of yacc.c  */
-#line 388 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 40:
-
-/* Line 1464 of yacc.c  */
-#line 391 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 41:
-
-/* Line 1464 of yacc.c  */
-#line 394 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 42:
-
-/* Line 1464 of yacc.c  */
-#line 397 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 43:
-
-/* Line 1464 of yacc.c  */
-#line 400 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 44:
-
-/* Line 1464 of yacc.c  */
-#line 403 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival);
-	;}
-    break;
-
-  case 45:
-
-/* Line 1464 of yacc.c  */
-#line 406 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = ! (yyvsp[(2) - (2)].ival);
-	;}
-    break;
-
-  case 46:
-
-/* Line 1464 of yacc.c  */
-#line 409 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = ~ (yyvsp[(2) - (2)].ival);
-	;}
-    break;
-
-  case 47:
-
-/* Line 1464 of yacc.c  */
-#line 412 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = - (yyvsp[(2) - (2)].ival);
-	;}
-    break;
-
-  case 48:
-
-/* Line 1464 of yacc.c  */
-#line 415 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = + (yyvsp[(2) - (2)].ival);
-	;}
-    break;
-
-  case 49:
-
-/* Line 1464 of yacc.c  */
-#line 418 "glcpp/glcpp-parse.y"
-    {
-		(yyval.ival) = (yyvsp[(2) - (3)].ival);
-	;}
-    break;
-
-  case 50:
-
-/* Line 1464 of yacc.c  */
-#line 424 "glcpp/glcpp-parse.y"
-    {
-		(yyval.string_list) = _string_list_create (parser);
-		_string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str));
-		hieralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str));
-	;}
-    break;
-
-  case 51:
-
-/* Line 1464 of yacc.c  */
-#line 429 "glcpp/glcpp-parse.y"
-    {
-		(yyval.string_list) = (yyvsp[(1) - (3)].string_list);	
-		_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
-		hieralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
-	;}
-    break;
-
-  case 52:
-
-/* Line 1464 of yacc.c  */
-#line 437 "glcpp/glcpp-parse.y"
-    { (yyval.token_list) = NULL; ;}
-    break;
-
-  case 54:
-
-/* Line 1464 of yacc.c  */
-#line 442 "glcpp/glcpp-parse.y"
-    {
-		yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #");
-	;}
-    break;
-
-  case 55:
-
-/* Line 1464 of yacc.c  */
-#line 448 "glcpp/glcpp-parse.y"
-    { (yyval.token_list) = NULL; ;}
-    break;
-
-  case 58:
-
-/* Line 1464 of yacc.c  */
-#line 454 "glcpp/glcpp-parse.y"
-    {
-		glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive");
-	;}
-    break;
-
-  case 59:
-
-/* Line 1464 of yacc.c  */
-#line 461 "glcpp/glcpp-parse.y"
-    {
-		int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0;
-		(yyval.token) = _token_create_ival (parser, INTEGER, v);
-	;}
-    break;
-
-  case 60:
-
-/* Line 1464 of yacc.c  */
-#line 465 "glcpp/glcpp-parse.y"
-    {
-		int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0;
-		(yyval.token) = _token_create_ival (parser, INTEGER, v);
-	;}
-    break;
-
-  case 62:
-
-/* Line 1464 of yacc.c  */
-#line 474 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token_list) = _token_list_create (parser);
-		_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
-		hieralloc_unlink (parser, (yyvsp[(1) - (1)].token));
-	;}
-    break;
-
-  case 63:
-
-/* Line 1464 of yacc.c  */
-#line 479 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
-		_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
-		hieralloc_unlink (parser, (yyvsp[(2) - (2)].token));
-	;}
-    break;
-
-  case 64:
-
-/* Line 1464 of yacc.c  */
-#line 487 "glcpp/glcpp-parse.y"
-    {
-		parser->space_tokens = 1;
-		(yyval.token_list) = _token_list_create (parser);
-		_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
-		hieralloc_unlink (parser, (yyvsp[(1) - (1)].token));
-	;}
-    break;
-
-  case 65:
-
-/* Line 1464 of yacc.c  */
-#line 493 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
-		_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
-		hieralloc_unlink (parser, (yyvsp[(2) - (2)].token));
-	;}
-    break;
-
-  case 66:
-
-/* Line 1464 of yacc.c  */
-#line 501 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str));
-		(yyval.token)->location = yylloc;
-	;}
-    break;
-
-  case 67:
-
-/* Line 1464 of yacc.c  */
-#line 505 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str));
-		(yyval.token)->location = yylloc;
-	;}
-    break;
-
-  case 68:
-
-/* Line 1464 of yacc.c  */
-#line 509 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival));
-		(yyval.token)->location = yylloc;
-	;}
-    break;
-
-  case 69:
-
-/* Line 1464 of yacc.c  */
-#line 513 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str));
-		(yyval.token)->location = yylloc;
-	;}
-    break;
-
-  case 70:
-
-/* Line 1464 of yacc.c  */
-#line 517 "glcpp/glcpp-parse.y"
-    {
-		(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
-		(yyval.token)->location = yylloc;
-	;}
-    break;
-
-  case 71:
-
-/* Line 1464 of yacc.c  */
-#line 524 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '['; ;}
-    break;
-
-  case 72:
-
-/* Line 1464 of yacc.c  */
-#line 525 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = ']'; ;}
-    break;
-
-  case 73:
-
-/* Line 1464 of yacc.c  */
-#line 526 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '('; ;}
-    break;
-
-  case 74:
-
-/* Line 1464 of yacc.c  */
-#line 527 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = ')'; ;}
-    break;
-
-  case 75:
-
-/* Line 1464 of yacc.c  */
-#line 528 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '{'; ;}
-    break;
-
-  case 76:
-
-/* Line 1464 of yacc.c  */
-#line 529 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '}'; ;}
-    break;
-
-  case 77:
-
-/* Line 1464 of yacc.c  */
-#line 530 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '.'; ;}
-    break;
-
-  case 78:
-
-/* Line 1464 of yacc.c  */
-#line 531 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '&'; ;}
-    break;
-
-  case 79:
-
-/* Line 1464 of yacc.c  */
-#line 532 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '*'; ;}
-    break;
-
-  case 80:
-
-/* Line 1464 of yacc.c  */
-#line 533 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '+'; ;}
-    break;
-
-  case 81:
-
-/* Line 1464 of yacc.c  */
-#line 534 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '-'; ;}
-    break;
-
-  case 82:
-
-/* Line 1464 of yacc.c  */
-#line 535 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '~'; ;}
-    break;
-
-  case 83:
-
-/* Line 1464 of yacc.c  */
-#line 536 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '!'; ;}
-    break;
-
-  case 84:
-
-/* Line 1464 of yacc.c  */
-#line 537 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '/'; ;}
-    break;
-
-  case 85:
-
-/* Line 1464 of yacc.c  */
-#line 538 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '%'; ;}
-    break;
-
-  case 86:
-
-/* Line 1464 of yacc.c  */
-#line 539 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = LEFT_SHIFT; ;}
-    break;
-
-  case 87:
-
-/* Line 1464 of yacc.c  */
-#line 540 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = RIGHT_SHIFT; ;}
-    break;
-
-  case 88:
-
-/* Line 1464 of yacc.c  */
-#line 541 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '<'; ;}
-    break;
-
-  case 89:
-
-/* Line 1464 of yacc.c  */
-#line 542 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '>'; ;}
-    break;
-
-  case 90:
-
-/* Line 1464 of yacc.c  */
-#line 543 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = LESS_OR_EQUAL; ;}
-    break;
-
-  case 91:
-
-/* Line 1464 of yacc.c  */
-#line 544 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = GREATER_OR_EQUAL; ;}
-    break;
-
-  case 92:
-
-/* Line 1464 of yacc.c  */
-#line 545 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = EQUAL; ;}
-    break;
-
-  case 93:
-
-/* Line 1464 of yacc.c  */
-#line 546 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = NOT_EQUAL; ;}
-    break;
-
-  case 94:
-
-/* Line 1464 of yacc.c  */
-#line 547 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '^'; ;}
-    break;
-
-  case 95:
-
-/* Line 1464 of yacc.c  */
-#line 548 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '|'; ;}
-    break;
-
-  case 96:
-
-/* Line 1464 of yacc.c  */
-#line 549 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = AND; ;}
-    break;
-
-  case 97:
-
-/* Line 1464 of yacc.c  */
-#line 550 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = OR; ;}
-    break;
-
-  case 98:
-
-/* Line 1464 of yacc.c  */
-#line 551 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = ';'; ;}
-    break;
-
-  case 99:
-
-/* Line 1464 of yacc.c  */
-#line 552 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = ','; ;}
-    break;
-
-  case 100:
-
-/* Line 1464 of yacc.c  */
-#line 553 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = '='; ;}
-    break;
-
-  case 101:
-
-/* Line 1464 of yacc.c  */
-#line 554 "glcpp/glcpp-parse.y"
-    { (yyval.ival) = PASTE; ;}
-    break;
-
-
-
-/* Line 1464 of yacc.c  */
-#line 2663 "glcpp/glcpp-parse.c"
-      default: break;
-    }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-  *++yylsp = yyloc;
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (&yylloc, parser, YY_("syntax error"));
-#else
-      {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (&yylloc, parser, yymsg);
-	  }
-	else
-	  {
-	    yyerror (&yylloc, parser, YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
-      }
-#endif
-    }
-
-  yyerror_range[1] = yylloc;
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      if (yychar <= YYEOF)
-	{
-	  /* Return failure if at end of input.  */
-	  if (yychar == YYEOF)
-	    YYABORT;
-	}
-      else
-	{
-	  yydestruct ("Error: discarding",
-		      yytoken, &yylval, &yylloc, parser);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  yyerror_range[1] = yylsp[1-yylen];
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      yyerror_range[1] = *yylsp;
-      yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp, yylsp, parser);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  *++yyvsp = yylval;
-
-  yyerror_range[2] = yylloc;
-  /* Using YYLLOC is tempting, but would change the location of
-     the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
-  *++yylsp = yyloc;
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (&yylloc, parser, YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval, &yylloc, parser);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp, yylsp, parser);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-
-/* Line 1684 of yacc.c  */
-#line 557 "glcpp/glcpp-parse.y"
-
-
-string_list_t *
-_string_list_create (void *ctx)
-{
-	string_list_t *list;
-
-	list = hieralloc (ctx, string_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-
-	return list;
-}
-
-void
-_string_list_append_item (string_list_t *list, const char *str)
-{
-	string_node_t *node;
-
-	node = hieralloc (list, string_node_t);
-	node->str = hieralloc_strdup (node, str);
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-}
-
-int
-_string_list_contains (string_list_t *list, const char *member, int *index)
-{
-	string_node_t *node;
-	int i;
-
-	if (list == NULL)
-		return 0;
-
-	for (i = 0, node = list->head; node; i++, node = node->next) {
-		if (strcmp (node->str, member) == 0) {
-			if (index)
-				*index = i;
-			return 1;
-		}
-	}
-
-	return 0;
-}
-
-int
-_string_list_length (string_list_t *list)
-{
-	int length = 0;
-	string_node_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list->head; node; node = node->next)
-		length++;
-
-	return length;
-}
-
-int
-_string_list_equal (string_list_t *a, string_list_t *b)
-{
-	string_node_t *node_a, *node_b;
-
-	if (a == NULL && b == NULL)
-		return 1;
-
-	if (a == NULL || b == NULL)
-		return 0;
-
-	for (node_a = a->head, node_b = b->head;
-	     node_a && node_b;
-	     node_a = node_a->next, node_b = node_b->next)
-	{
-		if (strcmp (node_a->str, node_b->str))
-			return 0;
-	}
-
-	/* Catch the case of lists being different lengths, (which
-	 * would cause the loop above to terminate after the shorter
-	 * list). */
-	return node_a == node_b;
-}
-
-argument_list_t *
-_argument_list_create (void *ctx)
-{
-	argument_list_t *list;
-
-	list = hieralloc (ctx, argument_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-
-	return list;
-}
-
-void
-_argument_list_append (argument_list_t *list, token_list_t *argument)
-{
-	argument_node_t *node;
-
-	node = hieralloc (list, argument_node_t);
-	node->argument = argument;
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-}
-
-int
-_argument_list_length (argument_list_t *list)
-{
-	int length = 0;
-	argument_node_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list->head; node; node = node->next)
-		length++;
-
-	return length;
-}
-
-token_list_t *
-_argument_list_member_at (argument_list_t *list, int index)
-{
-	argument_node_t *node;
-	int i;
-
-	if (list == NULL)
-		return NULL;
-
-	node = list->head;
-	for (i = 0; i < index; i++) {
-		node = node->next;
-		if (node == NULL)
-			break;
-	}
-
-	if (node)
-		return node->argument;
-
-	return NULL;
-}
-
-/* Note: This function hieralloc_steal()s the str pointer. */
-token_t *
-_token_create_str (void *ctx, int type, char *str)
-{
-	token_t *token;
-
-	token = hieralloc (ctx, token_t);
-	token->type = type;
-	token->value.str = hieralloc_steal (token, str);
-
-	return token;
-}
-
-token_t *
-_token_create_ival (void *ctx, int type, int ival)
-{
-	token_t *token;
-
-	token = hieralloc (ctx, token_t);
-	token->type = type;
-	token->value.ival = ival;
-
-	return token;
-}
-
-token_list_t *
-_token_list_create (void *ctx)
-{
-	token_list_t *list;
-
-	list = hieralloc (ctx, token_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-	list->non_space_tail = NULL;
-
-	return list;
-}
-
-void
-_token_list_append (token_list_t *list, token_t *token)
-{
-	token_node_t *node;
-
-	node = hieralloc (list, token_node_t);
-	node->token = hieralloc_reference (list, token);
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-	if (token->type != SPACE)
-		list->non_space_tail = node;
-}
-
-void
-_token_list_append_list (token_list_t *list, token_list_t *tail)
-{
-	if (tail == NULL || tail->head == NULL)
-		return;
-
-	if (list->head == NULL) {
-		list->head = tail->head;
-	} else {
-		list->tail->next = tail->head;
-	}
-
-	list->tail = tail->tail;
-	list->non_space_tail = tail->non_space_tail;
-}
-
-static token_list_t *
-_token_list_copy (void *ctx, token_list_t *other)
-{
-	token_list_t *copy;
-	token_node_t *node;
-
-	if (other == NULL)
-		return NULL;
-
-	copy = _token_list_create (ctx);
-	for (node = other->head; node; node = node->next)
-		_token_list_append (copy, node->token);
-
-	return copy;
-}
-
-static void
-_token_list_trim_trailing_space (token_list_t *list)
-{
-	token_node_t *tail, *next;
-
-	if (list->non_space_tail) {
-		tail = list->non_space_tail->next;
-		list->non_space_tail->next = NULL;
-		list->tail = list->non_space_tail;
-
-		while (tail) {
-			next = tail->next;
-			hieralloc_free (tail);
-			tail = next;
-		}
-	}
-}
-
-int
-_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
-{
-	token_node_t *node_a, *node_b;
-
-	node_a = a->head;
-	node_b = b->head;
-
-	while (1)
-	{
-		if (node_a == NULL && node_b == NULL)
-			break;
-
-		if (node_a == NULL || node_b == NULL)
-			return 0;
-
-		if (node_a->token->type == SPACE) {
-			node_a = node_a->next;
-			continue;
-		}
-
-		if (node_b->token->type == SPACE) {
-			node_b = node_b->next;
-			continue;
-		}
-
-		if (node_a->token->type != node_b->token->type)
-			return 0;
-
-		switch (node_a->token->type) {
-		case INTEGER:
-			if (node_a->token->value.ival != 
-			    node_b->token->value.ival)
-			{
-				return 0;
-			}
-			break;
-		case IDENTIFIER:
-		case INTEGER_STRING:
-		case OTHER:
-			if (strcmp (node_a->token->value.str,
-				    node_b->token->value.str))
-			{
-				return 0;
-			}
-			break;
-		}
-
-		node_a = node_a->next;
-		node_b = node_b->next;
-	}
-
-	return 1;
-}
-
-static void
-_token_print (char **out, token_t *token)
-{
-	if (token->type < 256) {
-		glcpp_printf (*out, "%c", token->type);
-		return;
-	}
-
-	switch (token->type) {
-	case INTEGER:
-		glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
-		break;
-	case IDENTIFIER:
-	case INTEGER_STRING:
-	case OTHER:
-		glcpp_print (*out, token->value.str);
-		break;
-	case SPACE:
-		glcpp_print (*out, " ");
-		break;
-	case LEFT_SHIFT:
-		glcpp_print (*out, "<<");
-		break;
-	case RIGHT_SHIFT:
-		glcpp_print (*out, ">>");
-		break;
-	case LESS_OR_EQUAL:
-		glcpp_print (*out, "<=");
-		break;
-	case GREATER_OR_EQUAL:
-		glcpp_print (*out, ">=");
-		break;
-	case EQUAL:
-		glcpp_print (*out, "==");
-		break;
-	case NOT_EQUAL:
-		glcpp_print (*out, "!=");
-		break;
-	case AND:
-		glcpp_print (*out, "&&");
-		break;
-	case OR:
-		glcpp_print (*out, "||");
-		break;
-	case PASTE:
-		glcpp_print (*out, "##");
-		break;
-	case COMMA_FINAL:
-		glcpp_print (*out, ",");
-		break;
-	case PLACEHOLDER:
-		/* Nothing to print. */
-		break;
-	default:
-		assert(!"Error: Don't know how to print token.");
-		break;
-	}
-}
-
-/* Return a new token (hieralloc()ed off of 'token') formed by pasting
- * 'token' and 'other'. Note that this function may return 'token' or
- * 'other' directly rather than allocating anything new.
- *
- * Caution: Only very cursory error-checking is performed to see if
- * the final result is a valid single token. */
-static token_t *
-_token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
-{
-	token_t *combined = NULL;
-
-	/* Pasting a placeholder onto anything makes no change. */
-	if (other->type == PLACEHOLDER)
-		return token;
-
-	/* When 'token' is a placeholder, just return 'other'. */
-	if (token->type == PLACEHOLDER)
-		return other;
-
-	/* A very few single-character punctuators can be combined
-	 * with another to form a multi-character punctuator. */
-	switch (token->type) {
-	case '<':
-		if (other->type == '<')
-			combined = _token_create_ival (token, LEFT_SHIFT, LEFT_SHIFT);
-		else if (other->type == '=')
-			combined = _token_create_ival (token, LESS_OR_EQUAL, LESS_OR_EQUAL);
-		break;
-	case '>':
-		if (other->type == '>')
-			combined = _token_create_ival (token, RIGHT_SHIFT, RIGHT_SHIFT);
-		else if (other->type == '=')
-			combined = _token_create_ival (token, GREATER_OR_EQUAL, GREATER_OR_EQUAL);
-		break;
-	case '=':
-		if (other->type == '=')
-			combined = _token_create_ival (token, EQUAL, EQUAL);
-		break;
-	case '!':
-		if (other->type == '=')
-			combined = _token_create_ival (token, NOT_EQUAL, NOT_EQUAL);
-		break;
-	case '&':
-		if (other->type == '&')
-			combined = _token_create_ival (token, AND, AND);
-		break;
-	case '|':
-		if (other->type == '|')
-			combined = _token_create_ival (token, OR, OR);
-		break;
-	}
-
-	if (combined != NULL) {
-		/* Inherit the location from the first token */
-		combined->location = token->location;
-		return combined;
-	}
-
-	/* Two string-valued tokens can usually just be mashed
-	 * together.
-	 *
-	 * XXX: This isn't actually legitimate. Several things here
-	 * should result in a diagnostic since the result cannot be a
-	 * valid, single pre-processing token. For example, pasting
-	 * "123" and "abc" is not legal, but we don't catch that
-	 * here. */
-	if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING) &&
-	    (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING))
-	{
-		char *str;
-
-		str = hieralloc_asprintf (token, "%s%s", token->value.str,
-				       other->value.str);
-		combined = _token_create_str (token, token->type, str);
-		combined->location = token->location;
-		return combined;
-	}
-
-	glcpp_error (&token->location, parser, "");
-	glcpp_print (parser->info_log, "Pasting \"");
-	_token_print (&parser->info_log, token);
-	glcpp_print (parser->info_log, "\" and \"");
-	_token_print (&parser->info_log, other);
-	glcpp_print (parser->info_log, "\" does not give a valid preprocessing token.\n");
-
-	return token;
-}
-
-static void
-_token_list_print (glcpp_parser_t *parser, token_list_t *list)
-{
-	token_node_t *node;
-
-	if (list == NULL)
-		return;
-
-	for (node = list->head; node; node = node->next)
-		_token_print (&parser->output, node->token);
-}
-
-void
-yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error)
-{
-	glcpp_error(locp, parser, "%s", error);
-}
-
-static void add_builtin_define(glcpp_parser_t *parser,
-			       const char *name, int value)
-{
-   token_t *tok;
-   token_list_t *list;
-
-   tok = _token_create_ival (parser, INTEGER, value);
-
-   list = _token_list_create(parser);
-   _token_list_append(list, tok);
-   _define_object_macro(parser, NULL, name, list);
-
-   hieralloc_unlink(parser, tok);
-}
-
-glcpp_parser_t *
-glcpp_parser_create (const struct gl_extensions *extensions, int api)
-{
-	glcpp_parser_t *parser;
-	int language_version;
-
-	parser = hieralloc (NULL, glcpp_parser_t);
-
-	glcpp_lex_init_extra (parser, &parser->scanner);
-	parser->defines = hash_table_ctor (32, hash_table_string_hash,
-					   hash_table_string_compare);
-	parser->active = NULL;
-	parser->lexing_if = 0;
-	parser->space_tokens = 1;
-	parser->newline_as_space = 0;
-	parser->in_control_line = 0;
-	parser->paren_count = 0;
-
-	parser->skip_stack = NULL;
-
-	parser->lex_from_list = NULL;
-	parser->lex_from_node = NULL;
-
-	parser->output = hieralloc_strdup(parser, "");
-	parser->info_log = hieralloc_strdup(parser, "");
-	parser->error = 0;
-
-	/* Add pre-defined macros. */
-	add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
-	add_builtin_define(parser, "GL_ARB_texture_rectangle", 1);
-
-	if (api == API_OPENGLES2)
-		add_builtin_define(parser, "GL_ES", 1);
-
-	if (extensions != NULL) {
-	   if (extensions->EXT_texture_array) {
-	      add_builtin_define(parser, "GL_EXT_texture_array", 1);
-	   }
-
-	   if (extensions->ARB_fragment_coord_conventions)
-	      add_builtin_define(parser, "GL_ARB_fragment_coord_conventions",
-				 1);
-
-	   if (extensions->ARB_explicit_attrib_location)
-	      add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
-	}
-
-	language_version = 110;
-	add_builtin_define(parser, "__VERSION__", language_version);
-
-	return parser;
-}
-
-int
-glcpp_parser_parse (glcpp_parser_t *parser)
-{
-	return yyparse (parser);
-}
-
-void
-glcpp_parser_destroy (glcpp_parser_t *parser)
-{
-	glcpp_lex_destroy (parser->scanner);
-	hash_table_dtor (parser->defines);
-	hieralloc_free (parser);
-}
-
-typedef enum function_status
-{
-	FUNCTION_STATUS_SUCCESS,
-	FUNCTION_NOT_A_FUNCTION,
-	FUNCTION_UNBALANCED_PARENTHESES
-} function_status_t;
-
-/* Find a set of function-like macro arguments by looking for a
- * balanced set of parentheses.
- *
- * When called, 'node' should be the opening-parenthesis token, (or
- * perhaps preceeding SPACE tokens). Upon successful return *last will
- * be the last consumed node, (corresponding to the closing right
- * parenthesis).
- *
- * Return values:
- *
- *   FUNCTION_STATUS_SUCCESS:
- *
- *	Successfully parsed a set of function arguments.	
- *
- *   FUNCTION_NOT_A_FUNCTION:
- *
- *	Macro name not followed by a '('. This is not an error, but
- *	simply that the macro name should be treated as a non-macro.
- *
- *   FUNCTION_UNBALANCED_PARENTHESES
- *
- *	Macro name is not followed by a balanced set of parentheses.
- */
-static function_status_t
-_arguments_parse (argument_list_t *arguments,
-		  token_node_t *node,
-		  token_node_t **last)
-{
-	token_list_t *argument;
-	int paren_count;
-
-	node = node->next;
-
-	/* Ignore whitespace before first parenthesis. */
-	while (node && node->token->type == SPACE)
-		node = node->next;
-
-	if (node == NULL || node->token->type != '(')
-		return FUNCTION_NOT_A_FUNCTION;
-
-	node = node->next;
-
-	argument = _token_list_create (arguments);
-	_argument_list_append (arguments, argument);
-
-	for (paren_count = 1; node; node = node->next) {
-		if (node->token->type == '(')
-		{
-			paren_count++;
-		}
-		else if (node->token->type == ')')
-		{
-			paren_count--;
-			if (paren_count == 0)
-				break;
-		}
-
-		if (node->token->type == ',' &&
-			 paren_count == 1)
-		{
-			_token_list_trim_trailing_space (argument);
-			argument = _token_list_create (arguments);
-			_argument_list_append (arguments, argument);
-		}
-		else {
-			if (argument->head == NULL) {
-				/* Don't treat initial whitespace as
-				 * part of the arguement. */
-				if (node->token->type == SPACE)
-					continue;
-			}
-			_token_list_append (argument, node->token);
-		}
-	}
-
-	if (paren_count)
-		return FUNCTION_UNBALANCED_PARENTHESES;
-
-	*last = node;
-
-	return FUNCTION_STATUS_SUCCESS;
-}
-
-static token_list_t *
-_token_list_create_with_one_space (void *ctx)
-{
-	token_list_t *list;
-	token_t *space;
-
-	list = _token_list_create (ctx);
-	space = _token_create_ival (list, SPACE, SPACE);
-	_token_list_append (list, space);
-
-	return list;
-}
-
-static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list)
-{
-	token_list_t *expanded;
-	token_t *token;
-
-	expanded = _token_list_create (parser);
-	token = _token_create_ival (parser, type, type);
-	_token_list_append (expanded, token);
-	_glcpp_parser_expand_token_list (parser, list);
-	_token_list_append_list (expanded, list);
-	glcpp_parser_lex_from (parser, expanded);
-}
-
-/* This is a helper function that's essentially part of the
- * implementation of _glcpp_parser_expand_node. It shouldn't be called
- * except for by that function.
- *
- * Returns NULL if node is a simple token with no expansion, (that is,
- * although 'node' corresponds to an identifier defined as a
- * function-like macro, it is not followed with a parenthesized
- * argument list).
- *
- * Compute the complete expansion of node (which is a function-like
- * macro) and subsequent nodes which are arguments.
- *
- * Returns the token list that results from the expansion and sets
- * *last to the last node in the list that was consumed by the
- * expansion. Specifically, *last will be set as follows: as the
- * token of the closing right parenthesis.
- */
-static token_list_t *
-_glcpp_parser_expand_function (glcpp_parser_t *parser,
-			       token_node_t *node,
-			       token_node_t **last)
-			       
-{
-	macro_t *macro;
-	const char *identifier;
-	argument_list_t *arguments;
-	function_status_t status;
-	token_list_t *substituted;
-	int parameter_index;
-
-	identifier = node->token->value.str;
-
-	macro = hash_table_find (parser->defines, identifier);
-
-	assert (macro->is_function);
-
-	arguments = _argument_list_create (parser);
-	status = _arguments_parse (arguments, node, last);
-
-	switch (status) {
-	case FUNCTION_STATUS_SUCCESS:
-		break;
-	case FUNCTION_NOT_A_FUNCTION:
-		return NULL;
-	case FUNCTION_UNBALANCED_PARENTHESES:
-		glcpp_error (&node->token->location, parser, "Macro %s call has unbalanced parentheses\n", identifier);
-		return NULL;
-	}
-
-	/* Replace a macro defined as empty with a SPACE token. */
-	if (macro->replacements == NULL) {
-		hieralloc_free (arguments);
-		return _token_list_create_with_one_space (parser);
-	}
-
-	if (! ((_argument_list_length (arguments) == 
-		_string_list_length (macro->parameters)) ||
-	       (_string_list_length (macro->parameters) == 0 &&
-		_argument_list_length (arguments) == 1 &&
-		arguments->head->argument->head == NULL)))
-	{
-		glcpp_error (&node->token->location, parser,
-			      "Error: macro %s invoked with %d arguments (expected %d)\n",
-			      identifier,
-			      _argument_list_length (arguments),
-			      _string_list_length (macro->parameters));
-		return NULL;
-	}
-
-	/* Perform argument substitution on the replacement list. */
-	substituted = _token_list_create (arguments);
-
-	for (node = macro->replacements->head; node; node = node->next)
-	{
-		if (node->token->type == IDENTIFIER &&
-		    _string_list_contains (macro->parameters,
-					   node->token->value.str,
-					   &parameter_index))
-		{
-			token_list_t *argument;
-			argument = _argument_list_member_at (arguments,
-							     parameter_index);
-			/* Before substituting, we expand the argument
-			 * tokens, or append a placeholder token for
-			 * an empty argument. */
-			if (argument->head) {
-				token_list_t *expanded_argument;
-				expanded_argument = _token_list_copy (parser,
-								      argument);
-				_glcpp_parser_expand_token_list (parser,
-								 expanded_argument);
-				_token_list_append_list (substituted,
-							 expanded_argument);
-			} else {
-				token_t *new_token;
-
-				new_token = _token_create_ival (substituted,
-								PLACEHOLDER,
-								PLACEHOLDER);
-				_token_list_append (substituted, new_token);
-			}
-		} else {
-			_token_list_append (substituted, node->token);
-		}
-	}
-
-	/* After argument substitution, and before further expansion
-	 * below, implement token pasting. */
-
-	_token_list_trim_trailing_space (substituted);
-
-	node = substituted->head;
-	while (node)
-	{
-		token_node_t *next_non_space;
-
-		/* Look ahead for a PASTE token, skipping space. */
-		next_non_space = node->next;
-		while (next_non_space && next_non_space->token->type == SPACE)
-			next_non_space = next_non_space->next;
-
-		if (next_non_space == NULL)
-			break;
-
-		if (next_non_space->token->type != PASTE) {
-			node = next_non_space;
-			continue;
-		}
-
-		/* Now find the next non-space token after the PASTE. */
-		next_non_space = next_non_space->next;
-		while (next_non_space && next_non_space->token->type == SPACE)
-			next_non_space = next_non_space->next;
-
-		if (next_non_space == NULL) {
-			yyerror (&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n");
-			return NULL;
-		}
-
-		node->token = _token_paste (parser, node->token, next_non_space->token);
-		node->next = next_non_space->next;
-		if (next_non_space == substituted->tail)
-			substituted->tail = node;
-
-		node = node->next;
-	}
-
-	substituted->non_space_tail = substituted->tail;
-
-	return substituted;
-}
-
-/* Compute the complete expansion of node, (and subsequent nodes after
- * 'node' in the case that 'node' is a function-like macro and
- * subsequent nodes are arguments).
- *
- * Returns NULL if node is a simple token with no expansion.
- *
- * Otherwise, returns the token list that results from the expansion
- * and sets *last to the last node in the list that was consumed by
- * the expansion. Specifically, *last will be set as follows:
- *
- *	As 'node' in the case of object-like macro expansion.
- *
- *	As the token of the closing right parenthesis in the case of
- *	function-like macro expansion.
- */
-static token_list_t *
-_glcpp_parser_expand_node (glcpp_parser_t *parser,
-			   token_node_t *node,
-			   token_node_t **last)
-{
-	token_t *token = node->token;
-	const char *identifier;
-	macro_t *macro;
-
-	/* We only expand identifiers */
-	if (token->type != IDENTIFIER) {
-		/* We change any COMMA into a COMMA_FINAL to prevent
-		 * it being mistaken for an argument separator
-		 * later. */
-		if (token->type == ',') {
-			token->type = COMMA_FINAL;
-			token->value.ival = COMMA_FINAL;
-		}
-
-		return NULL;
-	}
-
-	/* Look up this identifier in the hash table. */
-	identifier = token->value.str;
-	macro = hash_table_find (parser->defines, identifier);
-
-	/* Not a macro, so no expansion needed. */
-	if (macro == NULL)
-		return NULL;
-
-	/* Finally, don't expand this macro if we're already actively
-	 * expanding it, (to avoid infinite recursion). */
-	if (_active_list_contains (parser->active, identifier)) {
-		/* We change the token type here from IDENTIFIER to
-		 * OTHER to prevent any future expansion of this
-		 * unexpanded token. */
-		char *str;
-		token_list_t *expansion;
-		token_t *final;
-
-		str = hieralloc_strdup (parser, token->value.str);
-		final = _token_create_str (parser, OTHER, str);
-		expansion = _token_list_create (parser);
-		_token_list_append (expansion, final);
-		*last = node;
-		return expansion;
-	}
-
-	if (! macro->is_function)
-	{
-		*last = node;
-
-		/* Replace a macro defined as empty with a SPACE token. */
-		if (macro->replacements == NULL)
-			return _token_list_create_with_one_space (parser);
-
-		return _token_list_copy (parser, macro->replacements);
-	}
-
-	return _glcpp_parser_expand_function (parser, node, last);
-}
-
-/* Push a new identifier onto the active list, returning the new list.
- *
- * Here, 'marker' is the token node that appears in the list after the
- * expansion of 'identifier'. That is, when the list iterator begins
- * examinging 'marker', then it is time to pop this node from the
- * active stack.
- */
-active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker)
-{
-	active_list_t *node;
-
-	node = hieralloc (list, active_list_t);
-	node->identifier = hieralloc_strdup (node, identifier);
-	node->marker = marker;
-	node->next = list;
-
-	return node;
-}
-
-active_list_t *
-_active_list_pop (active_list_t *list)
-{
-	active_list_t *node = list;
-
-	if (node == NULL)
-		return NULL;
-
-	node = list->next;
-	hieralloc_free (list);
-
-	return node;
-}
-
-int
-_active_list_contains (active_list_t *list, const char *identifier)
-{
-	active_list_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list; node; node = node->next)
-		if (strcmp (node->identifier, identifier) == 0)
-			return 1;
-
-	return 0;
-}
-
-/* Walk over the token list replacing nodes with their expansion.
- * Whenever nodes are expanded the walking will walk over the new
- * nodes, continuing to expand as necessary. The results are placed in
- * 'list' itself;
- */
-static void
-_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
-				 token_list_t *list)
-{
-	token_node_t *node_prev;
-	token_node_t *node, *last = NULL;
-	token_list_t *expansion;
-
-	if (list == NULL)
-		return;
-
-	_token_list_trim_trailing_space (list);
-
-	node_prev = NULL;
-	node = list->head;
-
-	while (node) {
-
-		while (parser->active && parser->active->marker == node)
-			parser->active = _active_list_pop (parser->active);
-
-		/* Find the expansion for node, which will replace all
-		 * nodes from node to last, inclusive. */
-		expansion = _glcpp_parser_expand_node (parser, node, &last);
-		if (expansion) {
-			token_node_t *n;
-
-			for (n = node; n != last->next; n = n->next)
-				while (parser->active &&
-				       parser->active->marker == n)
-				{
-					parser->active = _active_list_pop (parser->active);
-				}
-
-			parser->active = _active_list_push (parser->active,
-							    node->token->value.str,
-							    last->next);
-			
-			/* Splice expansion into list, supporting a
-			 * simple deletion if the expansion is
-			 * empty. */
-			if (expansion->head) {
-				if (node_prev)
-					node_prev->next = expansion->head;
-				else
-					list->head = expansion->head;
-				expansion->tail->next = last->next;
-				if (last == list->tail)
-					list->tail = expansion->tail;
-			} else {
-				if (node_prev)
-					node_prev->next = last->next;
-				else
-					list->head = last->next;
-				if (last == list->tail)
-					list->tail = NULL;
-			}
-		} else {
-			node_prev = node;
-		}
-		node = node_prev ? node_prev->next : list->head;
-	}
-
-	while (parser->active)
-		parser->active = _active_list_pop (parser->active);
-
-	list->non_space_tail = list->tail;
-}
-
-void
-_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser,
-					 token_list_t *list)
-{
-	if (list == NULL)
-		return;
-
-	_glcpp_parser_expand_token_list (parser, list);
-
-	_token_list_trim_trailing_space (list);
-
-	_token_list_print (parser, list);
-}
-
-static void
-_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
-				const char *identifier)
-{
-	/* According to the GLSL specification, macro names starting with "__"
-	 * or "GL_" are reserved for future use.  So, don't allow them.
-	 */
-	if (strncmp(identifier, "__", 2) == 0) {
-		glcpp_error (loc, parser, "Macro names starting with \"__\" are reserved.\n");
-	}
-	if (strncmp(identifier, "GL_", 3) == 0) {
-		glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
-	}
-}
-
-static int
-_macro_equal (macro_t *a, macro_t *b)
-{
-	if (a->is_function != b->is_function)
-		return 0;
-
-	if (a->is_function) {
-		if (! _string_list_equal (a->parameters, b->parameters))
-			return 0;
-	}
-
-	return _token_list_equal_ignoring_space (a->replacements,
-						 b->replacements);
-}
-
-void
-_define_object_macro (glcpp_parser_t *parser,
-		      YYLTYPE *loc,
-		      const char *identifier,
-		      token_list_t *replacements)
-{
-	macro_t *macro, *previous;
-
-	if (loc != NULL)
-		_check_for_reserved_macro_name(parser, loc, identifier);
-
-	macro = hieralloc (parser, macro_t);
-
-	macro->is_function = 0;
-	macro->parameters = NULL;
-	macro->identifier = hieralloc_strdup (macro, identifier);
-	macro->replacements = hieralloc_steal (macro, replacements);
-
-	previous = hash_table_find (parser->defines, identifier);
-	if (previous) {
-		if (_macro_equal (macro, previous)) {
-			hieralloc_free (macro);
-			return;
-		}
-		glcpp_error (loc, parser, "Redefinition of macro %s\n",
-			     identifier);
-	}
-
-	hash_table_insert (parser->defines, macro, identifier);
-}
-
-void
-_define_function_macro (glcpp_parser_t *parser,
-			YYLTYPE *loc,
-			const char *identifier,
-			string_list_t *parameters,
-			token_list_t *replacements)
-{
-	macro_t *macro, *previous;
-
-	_check_for_reserved_macro_name(parser, loc, identifier);
-
-	macro = hieralloc (parser, macro_t);
-
-	macro->is_function = 1;
-	macro->parameters = hieralloc_steal (macro, parameters);
-	macro->identifier = hieralloc_strdup (macro, identifier);
-	macro->replacements = hieralloc_steal (macro, replacements);
-
-	previous = hash_table_find (parser->defines, identifier);
-	if (previous) {
-		if (_macro_equal (macro, previous)) {
-			hieralloc_free (macro);
-			return;
-		}
-		glcpp_error (loc, parser, "Redefinition of macro %s\n",
-			     identifier);
-	}
-
-	hash_table_insert (parser->defines, macro, identifier);
-}
-
-static int
-glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
-{
-	token_node_t *node;
-	int ret;
-
-	if (parser->lex_from_list == NULL) {
-		ret = glcpp_lex (yylval, yylloc, parser->scanner);
-
-		/* XXX: This ugly block of code exists for the sole
-		 * purpose of converting a NEWLINE token into a SPACE
-		 * token, but only in the case where we have seen a
-		 * function-like macro name, but have not yet seen its
-		 * closing parenthesis.
-		 *
-		 * There's perhaps a more compact way to do this with
-		 * mid-rule actions in the grammar.
-		 *
-		 * I'm definitely not pleased with the complexity of
-		 * this code here.
-		 */
-		if (parser->newline_as_space)
-		{
-			if (ret == '(') {
-				parser->paren_count++;
-			} else if (ret == ')') {
-				parser->paren_count--;
-				if (parser->paren_count == 0)
-					parser->newline_as_space = 0;
-			} else if (ret == NEWLINE) {
-				ret = SPACE;
-			} else if (ret != SPACE) {
-				if (parser->paren_count == 0)
-					parser->newline_as_space = 0;
-			}
-		}
-		else if (parser->in_control_line)
-		{
-			if (ret == NEWLINE)
-				parser->in_control_line = 0;
-		}
-		else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC ||
-			   ret == HASH_UNDEF || ret == HASH_IF ||
-			   ret == HASH_IFDEF || ret == HASH_IFNDEF ||
-			   ret == HASH_ELIF || ret == HASH_ELSE ||
-			   ret == HASH_ENDIF || ret == HASH)
-		{
-			parser->in_control_line = 1;
-		}
-		else if (ret == IDENTIFIER)
-		{
-			macro_t *macro;
-			macro = hash_table_find (parser->defines,
-						 yylval->str);
-			if (macro && macro->is_function) {
-				parser->newline_as_space = 1;
-				parser->paren_count = 0;
-			}
-		}
-
-		return ret;
-	}
-
-	node = parser->lex_from_node;
-
-	if (node == NULL) {
-		hieralloc_free (parser->lex_from_list);
-		parser->lex_from_list = NULL;
-		return NEWLINE;
-	}
-
-	*yylval = node->token->value;
-	ret = node->token->type;
-
-	parser->lex_from_node = node->next;
-
-	return ret;
-}
-
-static void
-glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list)
-{
-	token_node_t *node;
-
-	assert (parser->lex_from_list == NULL);
-
-	/* Copy list, eliminating any space tokens. */
-	parser->lex_from_list = _token_list_create (parser);
-
-	for (node = list->head; node; node = node->next) {
-		if (node->token->type == SPACE)
-			continue;
-		_token_list_append (parser->lex_from_list, node->token);
-	}
-
-	hieralloc_free (list);
-
-	parser->lex_from_node = parser->lex_from_list->head;
-
-	/* It's possible the list consisted of nothing but whitespace. */
-	if (parser->lex_from_node == NULL) {
-		hieralloc_free (parser->lex_from_list);
-		parser->lex_from_list = NULL;
-	}
-}
-
-static void
-_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				  int condition)
-{
-	skip_type_t current = SKIP_NO_SKIP;
-	skip_node_t *node;
-
-	if (parser->skip_stack)
-		current = parser->skip_stack->type;
-
-	node = hieralloc (parser, skip_node_t);
-	node->loc = *loc;
-
-	if (current == SKIP_NO_SKIP) {
-		if (condition)
-			node->type = SKIP_NO_SKIP;
-		else
-			node->type = SKIP_TO_ELSE;
-	} else {
-		node->type = SKIP_TO_ENDIF;
-	}
-
-	node->next = parser->skip_stack;
-	parser->skip_stack = node;
-}
-
-static void
-_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				    const char *type, int condition)
-{
-	if (parser->skip_stack == NULL) {
-		glcpp_error (loc, parser, "%s without #if\n", type);
-		return;
-	}
-
-	if (parser->skip_stack->type == SKIP_TO_ELSE) {
-		if (condition)
-			parser->skip_stack->type = SKIP_NO_SKIP;
-	} else {
-		parser->skip_stack->type = SKIP_TO_ENDIF;
-	}
-}
-
-static void
-_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
-{
-	skip_node_t *node;
-
-	if (parser->skip_stack == NULL) {
-		glcpp_error (loc, parser, "#endif without #if\n");
-		return;
-	}
-
-	node = parser->skip_stack;
-	parser->skip_stack = node->next;
-	hieralloc_free (node);
-}
-
diff --git a/src/glsl/glcpp/glcpp-parse.h b/src/glsl/glcpp/glcpp-parse.h
deleted file mode 100644
index 4055685..0000000
--- a/src/glsl/glcpp/glcpp-parse.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     COMMA_FINAL = 258,
-     DEFINED = 259,
-     ELIF_EXPANDED = 260,
-     HASH = 261,
-     HASH_DEFINE_FUNC = 262,
-     HASH_DEFINE_OBJ = 263,
-     HASH_ELIF = 264,
-     HASH_ELSE = 265,
-     HASH_ENDIF = 266,
-     HASH_IF = 267,
-     HASH_IFDEF = 268,
-     HASH_IFNDEF = 269,
-     HASH_UNDEF = 270,
-     HASH_VERSION = 271,
-     IDENTIFIER = 272,
-     IF_EXPANDED = 273,
-     INTEGER = 274,
-     INTEGER_STRING = 275,
-     NEWLINE = 276,
-     OTHER = 277,
-     PLACEHOLDER = 278,
-     SPACE = 279,
-     PASTE = 280,
-     OR = 281,
-     AND = 282,
-     NOT_EQUAL = 283,
-     EQUAL = 284,
-     GREATER_OR_EQUAL = 285,
-     LESS_OR_EQUAL = 286,
-     RIGHT_SHIFT = 287,
-     LEFT_SHIFT = 288,
-     UNARY = 289
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
deleted file mode 100644
index 558ad0a..0000000
--- a/src/glsl/glcpp/glcpp-parse.y
+++ /dev/null
@@ -1,1868 +0,0 @@
-%{
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <inttypes.h>
-
-#include "glcpp.h"
-#include "main/core.h" /* for struct gl_extensions */
-#include "main/mtypes.h" /* for gl_api enum */
-
-#define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str)
-#define glcpp_printf(stream, fmt, args, ...) \
-	stream = talloc_asprintf_append(stream, fmt, args)
-
-static void
-yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error);
-
-static void
-_define_object_macro (glcpp_parser_t *parser,
-		      YYLTYPE *loc,
-		      const char *macro,
-		      token_list_t *replacements);
-
-static void
-_define_function_macro (glcpp_parser_t *parser,
-			YYLTYPE *loc,
-			const char *macro,
-			string_list_t *parameters,
-			token_list_t *replacements);
-
-static string_list_t *
-_string_list_create (void *ctx);
-
-static void
-_string_list_append_item (string_list_t *list, const char *str);
-
-static int
-_string_list_contains (string_list_t *list, const char *member, int *index);
-
-static int
-_string_list_length (string_list_t *list);
-
-static int
-_string_list_equal (string_list_t *a, string_list_t *b);
-
-static argument_list_t *
-_argument_list_create (void *ctx);
-
-static void
-_argument_list_append (argument_list_t *list, token_list_t *argument);
-
-static int
-_argument_list_length (argument_list_t *list);
-
-static token_list_t *
-_argument_list_member_at (argument_list_t *list, int index);
-
-/* Note: This function talloc_steal()s the str pointer. */
-static token_t *
-_token_create_str (void *ctx, int type, char *str);
-
-static token_t *
-_token_create_ival (void *ctx, int type, int ival);
-
-static token_list_t *
-_token_list_create (void *ctx);
-
-/* Note: This function adds a talloc_reference() to token.
- *
- * You may want to talloc_unlink any current reference if you no
- * longer need it. */
-static void
-_token_list_append (token_list_t *list, token_t *token);
-
-static void
-_token_list_append_list (token_list_t *list, token_list_t *tail);
-
-static int
-_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b);
-
-static active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker);
-
-static active_list_t *
-_active_list_pop (active_list_t *list);
-
-int
-_active_list_contains (active_list_t *list, const char *identifier);
-
-static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
-
-static void
-_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
-				 token_list_t *list);
-
-static void
-_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser,
-					 token_list_t *list);
-
-static void
-_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				  int condition);
-
-static void
-_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				    const char *type, int condition);
-
-static void
-_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
-
-#define yylex glcpp_parser_lex
-
-static int
-glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
-
-static void
-glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list);
-
-static void
-add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
-
-%}
-
-%pure-parser
-%error-verbose
-
-%locations
-%initial-action {
-	@$.first_line = 1;
-	@$.first_column = 1;
-	@$.last_line = 1;
-	@$.last_column = 1;
-	@$.source = 0;
-}
-
-%parse-param {glcpp_parser_t *parser}
-%lex-param {glcpp_parser_t *parser}
-
-%expect 0
-%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE_FUNC HASH_DEFINE_OBJ HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING NEWLINE OTHER PLACEHOLDER SPACE
-%token PASTE
-%type <ival> expression INTEGER operator SPACE integer_constant
-%type <str> IDENTIFIER INTEGER_STRING OTHER
-%type <string_list> identifier_list
-%type <token> preprocessing_token conditional_token
-%type <token_list> pp_tokens replacement_list text_line conditional_tokens
-%left OR
-%left AND
-%left '|'
-%left '^'
-%left '&'
-%left EQUAL NOT_EQUAL
-%left '<' '>' LESS_OR_EQUAL GREATER_OR_EQUAL
-%left LEFT_SHIFT RIGHT_SHIFT
-%left '+' '-'
-%left '*' '/' '%'
-%right UNARY
-
-%%
-
-input:
-	/* empty */
-|	input line
-;
-
-line:
-	control_line {
-		glcpp_print(parser->output, "\n");
-	}
-|	text_line {
-		_glcpp_parser_print_expanded_token_list (parser, $1);
-		glcpp_print(parser->output, "\n");
-		talloc_free ($1);
-	}
-|	expanded_line
-|	HASH non_directive
-;
-
-expanded_line:
-	IF_EXPANDED expression NEWLINE {
-		_glcpp_parser_skip_stack_push_if (parser, & @1, $2);
-	}
-|	ELIF_EXPANDED expression NEWLINE {
-		_glcpp_parser_skip_stack_change_if (parser, & @1, "elif", $2);
-	}
-;
-
-control_line:
-	HASH_DEFINE_OBJ	IDENTIFIER replacement_list NEWLINE {
-		_define_object_macro (parser, & @2, $2, $3);
-	}
-|	HASH_DEFINE_FUNC IDENTIFIER '(' ')' replacement_list NEWLINE {
-		_define_function_macro (parser, & @2, $2, NULL, $5);
-	}
-|	HASH_DEFINE_FUNC IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE {
-		_define_function_macro (parser, & @2, $2, $4, $6);
-	}
-|	HASH_UNDEF IDENTIFIER NEWLINE {
-		macro_t *macro = hash_table_find (parser->defines, $2);
-		if (macro) {
-			hash_table_remove (parser->defines, $2);
-			talloc_free (macro);
-		}
-		talloc_free ($2);
-	}
-|	HASH_IF conditional_tokens NEWLINE {
-		/* Be careful to only evaluate the 'if' expression if
-		 * we are not skipping. When we are skipping, we
-		 * simply push a new 0-valued 'if' onto the skip
-		 * stack.
-		 *
-		 * This avoids generating diagnostics for invalid
-		 * expressions that are being skipped. */
-		if (parser->skip_stack == NULL ||
-		    parser->skip_stack->type == SKIP_NO_SKIP)
-		{
-			_glcpp_parser_expand_if (parser, IF_EXPANDED, $2);
-		}	
-		else
-		{
-			_glcpp_parser_skip_stack_push_if (parser, & @1, 0);
-			parser->skip_stack->type = SKIP_TO_ENDIF;
-		}
-	}
-|	HASH_IF NEWLINE {
-		/* #if without an expression is only an error if we
-		 *  are not skipping */
-		if (parser->skip_stack == NULL ||
-		    parser->skip_stack->type == SKIP_NO_SKIP)
-		{
-			glcpp_error(& @1, parser, "#if with no expression");
-		}	
-		_glcpp_parser_skip_stack_push_if (parser, & @1, 0);
-	}
-|	HASH_IFDEF IDENTIFIER junk NEWLINE {
-		macro_t *macro = hash_table_find (parser->defines, $2);
-		talloc_free ($2);
-		_glcpp_parser_skip_stack_push_if (parser, & @1, macro != NULL);
-	}
-|	HASH_IFNDEF IDENTIFIER junk NEWLINE {
-		macro_t *macro = hash_table_find (parser->defines, $2);
-		talloc_free ($2);
-		_glcpp_parser_skip_stack_push_if (parser, & @1, macro == NULL);
-	}
-|	HASH_ELIF conditional_tokens NEWLINE {
-		/* Be careful to only evaluate the 'elif' expression
-		 * if we are not skipping. When we are skipping, we
-		 * simply change to a 0-valued 'elif' on the skip
-		 * stack.
-		 *
-		 * This avoids generating diagnostics for invalid
-		 * expressions that are being skipped. */
-		if (parser->skip_stack &&
-		    parser->skip_stack->type == SKIP_TO_ELSE)
-		{
-			_glcpp_parser_expand_if (parser, ELIF_EXPANDED, $2);
-		}
-		else
-		{
-			_glcpp_parser_skip_stack_change_if (parser, & @1,
-							    "elif", 0);
-		}
-	}
-|	HASH_ELIF NEWLINE {
-		/* #elif without an expression is an error unless we
-		 * are skipping. */
-		if (parser->skip_stack &&
-		    parser->skip_stack->type == SKIP_TO_ELSE)
-		{
-			glcpp_error(& @1, parser, "#elif with no expression");
-		}
-		else
-		{
-			_glcpp_parser_skip_stack_change_if (parser, & @1,
-							    "elif", 0);
-			glcpp_warning(& @1, parser, "ignoring illegal #elif without expression");
-		}
-	}
-|	HASH_ELSE NEWLINE {
-		_glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1);
-	}
-|	HASH_ENDIF NEWLINE {
-		_glcpp_parser_skip_stack_pop (parser, & @1);
-	}
-|	HASH_VERSION integer_constant NEWLINE {
-		macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
-		if (macro) {
-			hash_table_remove (parser->defines, "__VERSION__");
-			talloc_free (macro);
-		}
-		add_builtin_define (parser, "__VERSION__", $2);
-
-		if ($2 == 100)
-			add_builtin_define (parser, "GL_ES", 1);
-
-		/* Currently, all ES2 implementations support highp in the
-		 * fragment shader, so we always define this macro in ES2.
-		 * If we ever get a driver that doesn't support highp, we'll
-		 * need to add a flag to the gl_context and check that here.
-		 */
-		if ($2 >= 130 || $2 == 100)
-			add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
-
-		glcpp_printf(parser->output, "#version %" PRIiMAX, $2);
-	}
-|	HASH NEWLINE
-;
-
-integer_constant:
-	INTEGER_STRING {
-		if (strlen ($1) >= 3 && strncmp ($1, "0x", 2) == 0) {
-			$$ = strtoll ($1 + 2, NULL, 16);
-		} else if ($1[0] == '0') {
-			$$ = strtoll ($1, NULL, 8);
-		} else {
-			$$ = strtoll ($1, NULL, 10);
-		}
-	}
-|	INTEGER {
-		$$ = $1;
-	}
-
-expression:
-	integer_constant
-|	expression OR expression {
-		$$ = $1 || $3;
-	}
-|	expression AND expression {
-		$$ = $1 && $3;
-	}
-|	expression '|' expression {
-		$$ = $1 | $3;
-	}
-|	expression '^' expression {
-		$$ = $1 ^ $3;
-	}
-|	expression '&' expression {
-		$$ = $1 & $3;
-	}
-|	expression NOT_EQUAL expression {
-		$$ = $1 != $3;
-	}
-|	expression EQUAL expression {
-		$$ = $1 == $3;
-	}
-|	expression GREATER_OR_EQUAL expression {
-		$$ = $1 >= $3;
-	}
-|	expression LESS_OR_EQUAL expression {
-		$$ = $1 <= $3;
-	}
-|	expression '>' expression {
-		$$ = $1 > $3;
-	}
-|	expression '<' expression {
-		$$ = $1 < $3;
-	}
-|	expression RIGHT_SHIFT expression {
-		$$ = $1 >> $3;
-	}
-|	expression LEFT_SHIFT expression {
-		$$ = $1 << $3;
-	}
-|	expression '-' expression {
-		$$ = $1 - $3;
-	}
-|	expression '+' expression {
-		$$ = $1 + $3;
-	}
-|	expression '%' expression {
-		$$ = $1 % $3;
-	}
-|	expression '/' expression {
-		$$ = $1 / $3;
-	}
-|	expression '*' expression {
-		$$ = $1 * $3;
-	}
-|	'!' expression %prec UNARY {
-		$$ = ! $2;
-	}
-|	'~' expression %prec UNARY {
-		$$ = ~ $2;
-	}
-|	'-' expression %prec UNARY {
-		$$ = - $2;
-	}
-|	'+' expression %prec UNARY {
-		$$ = + $2;
-	}
-|	'(' expression ')' {
-		$$ = $2;
-	}
-;
-
-identifier_list:
-	IDENTIFIER {
-		$$ = _string_list_create (parser);
-		_string_list_append_item ($$, $1);
-		talloc_steal ($$, $1);
-	}
-|	identifier_list ',' IDENTIFIER {
-		$$ = $1;	
-		_string_list_append_item ($$, $3);
-		talloc_steal ($$, $3);
-	}
-;
-
-text_line:
-	NEWLINE { $$ = NULL; }
-|	pp_tokens NEWLINE
-;
-
-non_directive:
-	pp_tokens NEWLINE {
-		yyerror (& @1, parser, "Invalid tokens after #");
-	}
-;
-
-replacement_list:
-	/* empty */ { $$ = NULL; }
-|	pp_tokens
-;
-
-junk:
-	/* empty */
-|	pp_tokens {
-		glcpp_warning(&@1, parser, "extra tokens at end of directive");
-	}
-;
-
-conditional_token:
-	/* Handle "defined" operator */
-	DEFINED IDENTIFIER {
-		int v = hash_table_find (parser->defines, $2) ? 1 : 0;
-		$$ = _token_create_ival (parser, INTEGER, v);
-	}
-|	DEFINED '(' IDENTIFIER ')' {
-		int v = hash_table_find (parser->defines, $3) ? 1 : 0;
-		$$ = _token_create_ival (parser, INTEGER, v);
-	}
-|	preprocessing_token
-;
-
-conditional_tokens:
-	/* Exactly the same as pp_tokens, but using conditional_token */
-	conditional_token {
-		$$ = _token_list_create (parser);
-		_token_list_append ($$, $1);
-		talloc_unlink (parser, $1);
-	}
-|	conditional_tokens conditional_token {
-		$$ = $1;
-		_token_list_append ($$, $2);
-		talloc_unlink (parser, $2);
-	}
-;
-
-pp_tokens:
-	preprocessing_token {
-		parser->space_tokens = 1;
-		$$ = _token_list_create (parser);
-		_token_list_append ($$, $1);
-		talloc_unlink (parser, $1);
-	}
-|	pp_tokens preprocessing_token {
-		$$ = $1;
-		_token_list_append ($$, $2);
-		talloc_unlink (parser, $2);
-	}
-;
-
-preprocessing_token:
-	IDENTIFIER {
-		$$ = _token_create_str (parser, IDENTIFIER, $1);
-		$$->location = yylloc;
-	}
-|	INTEGER_STRING {
-		$$ = _token_create_str (parser, INTEGER_STRING, $1);
-		$$->location = yylloc;
-	}
-|	operator {
-		$$ = _token_create_ival (parser, $1, $1);
-		$$->location = yylloc;
-	}
-|	OTHER {
-		$$ = _token_create_str (parser, OTHER, $1);
-		$$->location = yylloc;
-	}
-|	SPACE {
-		$$ = _token_create_ival (parser, SPACE, SPACE);
-		$$->location = yylloc;
-	}
-;
-
-operator:
-	'['			{ $$ = '['; }
-|	']'			{ $$ = ']'; }
-|	'('			{ $$ = '('; }
-|	')'			{ $$ = ')'; }
-|	'{'			{ $$ = '{'; }
-|	'}'			{ $$ = '}'; }
-|	'.'			{ $$ = '.'; }
-|	'&'			{ $$ = '&'; }
-|	'*'			{ $$ = '*'; }
-|	'+'			{ $$ = '+'; }
-|	'-'			{ $$ = '-'; }
-|	'~'			{ $$ = '~'; }
-|	'!'			{ $$ = '!'; }
-|	'/'			{ $$ = '/'; }
-|	'%'			{ $$ = '%'; }
-|	LEFT_SHIFT		{ $$ = LEFT_SHIFT; }
-|	RIGHT_SHIFT		{ $$ = RIGHT_SHIFT; }
-|	'<'			{ $$ = '<'; }
-|	'>'			{ $$ = '>'; }
-|	LESS_OR_EQUAL		{ $$ = LESS_OR_EQUAL; }
-|	GREATER_OR_EQUAL	{ $$ = GREATER_OR_EQUAL; }
-|	EQUAL			{ $$ = EQUAL; }
-|	NOT_EQUAL		{ $$ = NOT_EQUAL; }
-|	'^'			{ $$ = '^'; }
-|	'|'			{ $$ = '|'; }
-|	AND			{ $$ = AND; }
-|	OR			{ $$ = OR; }
-|	';'			{ $$ = ';'; }
-|	','			{ $$ = ','; }
-|	'='			{ $$ = '='; }
-|	PASTE			{ $$ = PASTE; }
-;
-
-%%
-
-string_list_t *
-_string_list_create (void *ctx)
-{
-	string_list_t *list;
-
-	list = talloc (ctx, string_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-
-	return list;
-}
-
-void
-_string_list_append_item (string_list_t *list, const char *str)
-{
-	string_node_t *node;
-
-	node = talloc (list, string_node_t);
-	node->str = talloc_strdup (node, str);
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-}
-
-int
-_string_list_contains (string_list_t *list, const char *member, int *index)
-{
-	string_node_t *node;
-	int i;
-
-	if (list == NULL)
-		return 0;
-
-	for (i = 0, node = list->head; node; i++, node = node->next) {
-		if (strcmp (node->str, member) == 0) {
-			if (index)
-				*index = i;
-			return 1;
-		}
-	}
-
-	return 0;
-}
-
-int
-_string_list_length (string_list_t *list)
-{
-	int length = 0;
-	string_node_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list->head; node; node = node->next)
-		length++;
-
-	return length;
-}
-
-int
-_string_list_equal (string_list_t *a, string_list_t *b)
-{
-	string_node_t *node_a, *node_b;
-
-	if (a == NULL && b == NULL)
-		return 1;
-
-	if (a == NULL || b == NULL)
-		return 0;
-
-	for (node_a = a->head, node_b = b->head;
-	     node_a && node_b;
-	     node_a = node_a->next, node_b = node_b->next)
-	{
-		if (strcmp (node_a->str, node_b->str))
-			return 0;
-	}
-
-	/* Catch the case of lists being different lengths, (which
-	 * would cause the loop above to terminate after the shorter
-	 * list). */
-	return node_a == node_b;
-}
-
-argument_list_t *
-_argument_list_create (void *ctx)
-{
-	argument_list_t *list;
-
-	list = talloc (ctx, argument_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-
-	return list;
-}
-
-void
-_argument_list_append (argument_list_t *list, token_list_t *argument)
-{
-	argument_node_t *node;
-
-	node = talloc (list, argument_node_t);
-	node->argument = argument;
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-}
-
-int
-_argument_list_length (argument_list_t *list)
-{
-	int length = 0;
-	argument_node_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list->head; node; node = node->next)
-		length++;
-
-	return length;
-}
-
-token_list_t *
-_argument_list_member_at (argument_list_t *list, int index)
-{
-	argument_node_t *node;
-	int i;
-
-	if (list == NULL)
-		return NULL;
-
-	node = list->head;
-	for (i = 0; i < index; i++) {
-		node = node->next;
-		if (node == NULL)
-			break;
-	}
-
-	if (node)
-		return node->argument;
-
-	return NULL;
-}
-
-/* Note: This function talloc_steal()s the str pointer. */
-token_t *
-_token_create_str (void *ctx, int type, char *str)
-{
-	token_t *token;
-
-	token = talloc (ctx, token_t);
-	token->type = type;
-	token->value.str = talloc_steal (token, str);
-
-	return token;
-}
-
-token_t *
-_token_create_ival (void *ctx, int type, int ival)
-{
-	token_t *token;
-
-	token = talloc (ctx, token_t);
-	token->type = type;
-	token->value.ival = ival;
-
-	return token;
-}
-
-token_list_t *
-_token_list_create (void *ctx)
-{
-	token_list_t *list;
-
-	list = talloc (ctx, token_list_t);
-	list->head = NULL;
-	list->tail = NULL;
-	list->non_space_tail = NULL;
-
-	return list;
-}
-
-void
-_token_list_append (token_list_t *list, token_t *token)
-{
-	token_node_t *node;
-
-	node = talloc (list, token_node_t);
-	node->token = talloc_reference (list, token);
-
-	node->next = NULL;
-
-	if (list->head == NULL) {
-		list->head = node;
-	} else {
-		list->tail->next = node;
-	}
-
-	list->tail = node;
-	if (token->type != SPACE)
-		list->non_space_tail = node;
-}
-
-void
-_token_list_append_list (token_list_t *list, token_list_t *tail)
-{
-	if (tail == NULL || tail->head == NULL)
-		return;
-
-	if (list->head == NULL) {
-		list->head = tail->head;
-	} else {
-		list->tail->next = tail->head;
-	}
-
-	list->tail = tail->tail;
-	list->non_space_tail = tail->non_space_tail;
-}
-
-static token_list_t *
-_token_list_copy (void *ctx, token_list_t *other)
-{
-	token_list_t *copy;
-	token_node_t *node;
-
-	if (other == NULL)
-		return NULL;
-
-	copy = _token_list_create (ctx);
-	for (node = other->head; node; node = node->next)
-		_token_list_append (copy, node->token);
-
-	return copy;
-}
-
-static void
-_token_list_trim_trailing_space (token_list_t *list)
-{
-	token_node_t *tail, *next;
-
-	if (list->non_space_tail) {
-		tail = list->non_space_tail->next;
-		list->non_space_tail->next = NULL;
-		list->tail = list->non_space_tail;
-
-		while (tail) {
-			next = tail->next;
-			talloc_free (tail);
-			tail = next;
-		}
-	}
-}
-
-int
-_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
-{
-	token_node_t *node_a, *node_b;
-
-	node_a = a->head;
-	node_b = b->head;
-
-	while (1)
-	{
-		if (node_a == NULL && node_b == NULL)
-			break;
-
-		if (node_a == NULL || node_b == NULL)
-			return 0;
-
-		if (node_a->token->type == SPACE) {
-			node_a = node_a->next;
-			continue;
-		}
-
-		if (node_b->token->type == SPACE) {
-			node_b = node_b->next;
-			continue;
-		}
-
-		if (node_a->token->type != node_b->token->type)
-			return 0;
-
-		switch (node_a->token->type) {
-		case INTEGER:
-			if (node_a->token->value.ival != 
-			    node_b->token->value.ival)
-			{
-				return 0;
-			}
-			break;
-		case IDENTIFIER:
-		case INTEGER_STRING:
-		case OTHER:
-			if (strcmp (node_a->token->value.str,
-				    node_b->token->value.str))
-			{
-				return 0;
-			}
-			break;
-		}
-
-		node_a = node_a->next;
-		node_b = node_b->next;
-	}
-
-	return 1;
-}
-
-static void
-_token_print (char **out, token_t *token)
-{
-	if (token->type < 256) {
-		glcpp_printf (*out, "%c", token->type);
-		return;
-	}
-
-	switch (token->type) {
-	case INTEGER:
-		glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
-		break;
-	case IDENTIFIER:
-	case INTEGER_STRING:
-	case OTHER:
-		glcpp_print (*out, token->value.str);
-		break;
-	case SPACE:
-		glcpp_print (*out, " ");
-		break;
-	case LEFT_SHIFT:
-		glcpp_print (*out, "<<");
-		break;
-	case RIGHT_SHIFT:
-		glcpp_print (*out, ">>");
-		break;
-	case LESS_OR_EQUAL:
-		glcpp_print (*out, "<=");
-		break;
-	case GREATER_OR_EQUAL:
-		glcpp_print (*out, ">=");
-		break;
-	case EQUAL:
-		glcpp_print (*out, "==");
-		break;
-	case NOT_EQUAL:
-		glcpp_print (*out, "!=");
-		break;
-	case AND:
-		glcpp_print (*out, "&&");
-		break;
-	case OR:
-		glcpp_print (*out, "||");
-		break;
-	case PASTE:
-		glcpp_print (*out, "##");
-		break;
-	case COMMA_FINAL:
-		glcpp_print (*out, ",");
-		break;
-	case PLACEHOLDER:
-		/* Nothing to print. */
-		break;
-	default:
-		assert(!"Error: Don't know how to print token.");
-		break;
-	}
-}
-
-/* Return a new token (talloc()ed off of 'token') formed by pasting
- * 'token' and 'other'. Note that this function may return 'token' or
- * 'other' directly rather than allocating anything new.
- *
- * Caution: Only very cursory error-checking is performed to see if
- * the final result is a valid single token. */
-static token_t *
-_token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
-{
-	token_t *combined = NULL;
-
-	/* Pasting a placeholder onto anything makes no change. */
-	if (other->type == PLACEHOLDER)
-		return token;
-
-	/* When 'token' is a placeholder, just return 'other'. */
-	if (token->type == PLACEHOLDER)
-		return other;
-
-	/* A very few single-character punctuators can be combined
-	 * with another to form a multi-character punctuator. */
-	switch (token->type) {
-	case '<':
-		if (other->type == '<')
-			combined = _token_create_ival (token, LEFT_SHIFT, LEFT_SHIFT);
-		else if (other->type == '=')
-			combined = _token_create_ival (token, LESS_OR_EQUAL, LESS_OR_EQUAL);
-		break;
-	case '>':
-		if (other->type == '>')
-			combined = _token_create_ival (token, RIGHT_SHIFT, RIGHT_SHIFT);
-		else if (other->type == '=')
-			combined = _token_create_ival (token, GREATER_OR_EQUAL, GREATER_OR_EQUAL);
-		break;
-	case '=':
-		if (other->type == '=')
-			combined = _token_create_ival (token, EQUAL, EQUAL);
-		break;
-	case '!':
-		if (other->type == '=')
-			combined = _token_create_ival (token, NOT_EQUAL, NOT_EQUAL);
-		break;
-	case '&':
-		if (other->type == '&')
-			combined = _token_create_ival (token, AND, AND);
-		break;
-	case '|':
-		if (other->type == '|')
-			combined = _token_create_ival (token, OR, OR);
-		break;
-	}
-
-	if (combined != NULL) {
-		/* Inherit the location from the first token */
-		combined->location = token->location;
-		return combined;
-	}
-
-	/* Two string-valued tokens can usually just be mashed
-	 * together.
-	 *
-	 * XXX: This isn't actually legitimate. Several things here
-	 * should result in a diagnostic since the result cannot be a
-	 * valid, single pre-processing token. For example, pasting
-	 * "123" and "abc" is not legal, but we don't catch that
-	 * here. */
-	if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING) &&
-	    (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING))
-	{
-		char *str;
-
-		str = talloc_asprintf (token, "%s%s", token->value.str,
-				       other->value.str);
-		combined = _token_create_str (token, token->type, str);
-		combined->location = token->location;
-		return combined;
-	}
-
-	glcpp_error (&token->location, parser, "");
-	glcpp_print (parser->info_log, "Pasting \"");
-	_token_print (&parser->info_log, token);
-	glcpp_print (parser->info_log, "\" and \"");
-	_token_print (&parser->info_log, other);
-	glcpp_print (parser->info_log, "\" does not give a valid preprocessing token.\n");
-
-	return token;
-}
-
-static void
-_token_list_print (glcpp_parser_t *parser, token_list_t *list)
-{
-	token_node_t *node;
-
-	if (list == NULL)
-		return;
-
-	for (node = list->head; node; node = node->next)
-		_token_print (&parser->output, node->token);
-}
-
-void
-yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error)
-{
-	glcpp_error(locp, parser, "%s", error);
-}
-
-static void add_builtin_define(glcpp_parser_t *parser,
-			       const char *name, int value)
-{
-   token_t *tok;
-   token_list_t *list;
-
-   tok = _token_create_ival (parser, INTEGER, value);
-
-   list = _token_list_create(parser);
-   _token_list_append(list, tok);
-   _define_object_macro(parser, NULL, name, list);
-
-   talloc_unlink(parser, tok);
-}
-
-glcpp_parser_t *
-glcpp_parser_create (const struct gl_extensions *extensions, int api)
-{
-	glcpp_parser_t *parser;
-	int language_version;
-
-	parser = talloc (NULL, glcpp_parser_t);
-
-	glcpp_lex_init_extra (parser, &parser->scanner);
-	parser->defines = hash_table_ctor (32, hash_table_string_hash,
-					   hash_table_string_compare);
-	parser->active = NULL;
-	parser->lexing_if = 0;
-	parser->space_tokens = 1;
-	parser->newline_as_space = 0;
-	parser->in_control_line = 0;
-	parser->paren_count = 0;
-
-	parser->skip_stack = NULL;
-
-	parser->lex_from_list = NULL;
-	parser->lex_from_node = NULL;
-
-	parser->output = talloc_strdup(parser, "");
-	parser->info_log = talloc_strdup(parser, "");
-	parser->error = 0;
-
-	/* Add pre-defined macros. */
-	add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
-	add_builtin_define(parser, "GL_ARB_texture_rectangle", 1);
-
-	if (api == API_OPENGLES2)
-		add_builtin_define(parser, "GL_ES", 1);
-
-	if (extensions != NULL) {
-	   if (extensions->EXT_texture_array) {
-	      add_builtin_define(parser, "GL_EXT_texture_array", 1);
-	   }
-
-	   if (extensions->ARB_fragment_coord_conventions)
-	      add_builtin_define(parser, "GL_ARB_fragment_coord_conventions",
-				 1);
-
-	   if (extensions->ARB_explicit_attrib_location)
-	      add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
-	}
-
-	language_version = 110;
-	add_builtin_define(parser, "__VERSION__", language_version);
-
-	return parser;
-}
-
-int
-glcpp_parser_parse (glcpp_parser_t *parser)
-{
-	return yyparse (parser);
-}
-
-void
-glcpp_parser_destroy (glcpp_parser_t *parser)
-{
-	glcpp_lex_destroy (parser->scanner);
-	hash_table_dtor (parser->defines);
-	talloc_free (parser);
-}
-
-typedef enum function_status
-{
-	FUNCTION_STATUS_SUCCESS,
-	FUNCTION_NOT_A_FUNCTION,
-	FUNCTION_UNBALANCED_PARENTHESES
-} function_status_t;
-
-/* Find a set of function-like macro arguments by looking for a
- * balanced set of parentheses.
- *
- * When called, 'node' should be the opening-parenthesis token, (or
- * perhaps preceeding SPACE tokens). Upon successful return *last will
- * be the last consumed node, (corresponding to the closing right
- * parenthesis).
- *
- * Return values:
- *
- *   FUNCTION_STATUS_SUCCESS:
- *
- *	Successfully parsed a set of function arguments.	
- *
- *   FUNCTION_NOT_A_FUNCTION:
- *
- *	Macro name not followed by a '('. This is not an error, but
- *	simply that the macro name should be treated as a non-macro.
- *
- *   FUNCTION_UNBALANCED_PARENTHESES
- *
- *	Macro name is not followed by a balanced set of parentheses.
- */
-static function_status_t
-_arguments_parse (argument_list_t *arguments,
-		  token_node_t *node,
-		  token_node_t **last)
-{
-	token_list_t *argument;
-	int paren_count;
-
-	node = node->next;
-
-	/* Ignore whitespace before first parenthesis. */
-	while (node && node->token->type == SPACE)
-		node = node->next;
-
-	if (node == NULL || node->token->type != '(')
-		return FUNCTION_NOT_A_FUNCTION;
-
-	node = node->next;
-
-	argument = _token_list_create (arguments);
-	_argument_list_append (arguments, argument);
-
-	for (paren_count = 1; node; node = node->next) {
-		if (node->token->type == '(')
-		{
-			paren_count++;
-		}
-		else if (node->token->type == ')')
-		{
-			paren_count--;
-			if (paren_count == 0)
-				break;
-		}
-
-		if (node->token->type == ',' &&
-			 paren_count == 1)
-		{
-			_token_list_trim_trailing_space (argument);
-			argument = _token_list_create (arguments);
-			_argument_list_append (arguments, argument);
-		}
-		else {
-			if (argument->head == NULL) {
-				/* Don't treat initial whitespace as
-				 * part of the arguement. */
-				if (node->token->type == SPACE)
-					continue;
-			}
-			_token_list_append (argument, node->token);
-		}
-	}
-
-	if (paren_count)
-		return FUNCTION_UNBALANCED_PARENTHESES;
-
-	*last = node;
-
-	return FUNCTION_STATUS_SUCCESS;
-}
-
-static token_list_t *
-_token_list_create_with_one_space (void *ctx)
-{
-	token_list_t *list;
-	token_t *space;
-
-	list = _token_list_create (ctx);
-	space = _token_create_ival (list, SPACE, SPACE);
-	_token_list_append (list, space);
-
-	return list;
-}
-
-static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list)
-{
-	token_list_t *expanded;
-	token_t *token;
-
-	expanded = _token_list_create (parser);
-	token = _token_create_ival (parser, type, type);
-	_token_list_append (expanded, token);
-	_glcpp_parser_expand_token_list (parser, list);
-	_token_list_append_list (expanded, list);
-	glcpp_parser_lex_from (parser, expanded);
-}
-
-/* This is a helper function that's essentially part of the
- * implementation of _glcpp_parser_expand_node. It shouldn't be called
- * except for by that function.
- *
- * Returns NULL if node is a simple token with no expansion, (that is,
- * although 'node' corresponds to an identifier defined as a
- * function-like macro, it is not followed with a parenthesized
- * argument list).
- *
- * Compute the complete expansion of node (which is a function-like
- * macro) and subsequent nodes which are arguments.
- *
- * Returns the token list that results from the expansion and sets
- * *last to the last node in the list that was consumed by the
- * expansion. Specifically, *last will be set as follows: as the
- * token of the closing right parenthesis.
- */
-static token_list_t *
-_glcpp_parser_expand_function (glcpp_parser_t *parser,
-			       token_node_t *node,
-			       token_node_t **last)
-			       
-{
-	macro_t *macro;
-	const char *identifier;
-	argument_list_t *arguments;
-	function_status_t status;
-	token_list_t *substituted;
-	int parameter_index;
-
-	identifier = node->token->value.str;
-
-	macro = hash_table_find (parser->defines, identifier);
-
-	assert (macro->is_function);
-
-	arguments = _argument_list_create (parser);
-	status = _arguments_parse (arguments, node, last);
-
-	switch (status) {
-	case FUNCTION_STATUS_SUCCESS:
-		break;
-	case FUNCTION_NOT_A_FUNCTION:
-		return NULL;
-	case FUNCTION_UNBALANCED_PARENTHESES:
-		glcpp_error (&node->token->location, parser, "Macro %s call has unbalanced parentheses\n", identifier);
-		return NULL;
-	}
-
-	/* Replace a macro defined as empty with a SPACE token. */
-	if (macro->replacements == NULL) {
-		talloc_free (arguments);
-		return _token_list_create_with_one_space (parser);
-	}
-
-	if (! ((_argument_list_length (arguments) == 
-		_string_list_length (macro->parameters)) ||
-	       (_string_list_length (macro->parameters) == 0 &&
-		_argument_list_length (arguments) == 1 &&
-		arguments->head->argument->head == NULL)))
-	{
-		glcpp_error (&node->token->location, parser,
-			      "Error: macro %s invoked with %d arguments (expected %d)\n",
-			      identifier,
-			      _argument_list_length (arguments),
-			      _string_list_length (macro->parameters));
-		return NULL;
-	}
-
-	/* Perform argument substitution on the replacement list. */
-	substituted = _token_list_create (arguments);
-
-	for (node = macro->replacements->head; node; node = node->next)
-	{
-		if (node->token->type == IDENTIFIER &&
-		    _string_list_contains (macro->parameters,
-					   node->token->value.str,
-					   &parameter_index))
-		{
-			token_list_t *argument;
-			argument = _argument_list_member_at (arguments,
-							     parameter_index);
-			/* Before substituting, we expand the argument
-			 * tokens, or append a placeholder token for
-			 * an empty argument. */
-			if (argument->head) {
-				token_list_t *expanded_argument;
-				expanded_argument = _token_list_copy (parser,
-								      argument);
-				_glcpp_parser_expand_token_list (parser,
-								 expanded_argument);
-				_token_list_append_list (substituted,
-							 expanded_argument);
-			} else {
-				token_t *new_token;
-
-				new_token = _token_create_ival (substituted,
-								PLACEHOLDER,
-								PLACEHOLDER);
-				_token_list_append (substituted, new_token);
-			}
-		} else {
-			_token_list_append (substituted, node->token);
-		}
-	}
-
-	/* After argument substitution, and before further expansion
-	 * below, implement token pasting. */
-
-	_token_list_trim_trailing_space (substituted);
-
-	node = substituted->head;
-	while (node)
-	{
-		token_node_t *next_non_space;
-
-		/* Look ahead for a PASTE token, skipping space. */
-		next_non_space = node->next;
-		while (next_non_space && next_non_space->token->type == SPACE)
-			next_non_space = next_non_space->next;
-
-		if (next_non_space == NULL)
-			break;
-
-		if (next_non_space->token->type != PASTE) {
-			node = next_non_space;
-			continue;
-		}
-
-		/* Now find the next non-space token after the PASTE. */
-		next_non_space = next_non_space->next;
-		while (next_non_space && next_non_space->token->type == SPACE)
-			next_non_space = next_non_space->next;
-
-		if (next_non_space == NULL) {
-			yyerror (&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n");
-			return NULL;
-		}
-
-		node->token = _token_paste (parser, node->token, next_non_space->token);
-		node->next = next_non_space->next;
-		if (next_non_space == substituted->tail)
-			substituted->tail = node;
-
-		node = node->next;
-	}
-
-	substituted->non_space_tail = substituted->tail;
-
-	return substituted;
-}
-
-/* Compute the complete expansion of node, (and subsequent nodes after
- * 'node' in the case that 'node' is a function-like macro and
- * subsequent nodes are arguments).
- *
- * Returns NULL if node is a simple token with no expansion.
- *
- * Otherwise, returns the token list that results from the expansion
- * and sets *last to the last node in the list that was consumed by
- * the expansion. Specifically, *last will be set as follows:
- *
- *	As 'node' in the case of object-like macro expansion.
- *
- *	As the token of the closing right parenthesis in the case of
- *	function-like macro expansion.
- */
-static token_list_t *
-_glcpp_parser_expand_node (glcpp_parser_t *parser,
-			   token_node_t *node,
-			   token_node_t **last)
-{
-	token_t *token = node->token;
-	const char *identifier;
-	macro_t *macro;
-
-	/* We only expand identifiers */
-	if (token->type != IDENTIFIER) {
-		/* We change any COMMA into a COMMA_FINAL to prevent
-		 * it being mistaken for an argument separator
-		 * later. */
-		if (token->type == ',') {
-			token->type = COMMA_FINAL;
-			token->value.ival = COMMA_FINAL;
-		}
-
-		return NULL;
-	}
-
-	/* Look up this identifier in the hash table. */
-	identifier = token->value.str;
-	macro = hash_table_find (parser->defines, identifier);
-
-	/* Not a macro, so no expansion needed. */
-	if (macro == NULL)
-		return NULL;
-
-	/* Finally, don't expand this macro if we're already actively
-	 * expanding it, (to avoid infinite recursion). */
-	if (_active_list_contains (parser->active, identifier)) {
-		/* We change the token type here from IDENTIFIER to
-		 * OTHER to prevent any future expansion of this
-		 * unexpanded token. */
-		char *str;
-		token_list_t *expansion;
-		token_t *final;
-
-		str = talloc_strdup (parser, token->value.str);
-		final = _token_create_str (parser, OTHER, str);
-		expansion = _token_list_create (parser);
-		_token_list_append (expansion, final);
-		*last = node;
-		return expansion;
-	}
-
-	if (! macro->is_function)
-	{
-		*last = node;
-
-		/* Replace a macro defined as empty with a SPACE token. */
-		if (macro->replacements == NULL)
-			return _token_list_create_with_one_space (parser);
-
-		return _token_list_copy (parser, macro->replacements);
-	}
-
-	return _glcpp_parser_expand_function (parser, node, last);
-}
-
-/* Push a new identifier onto the active list, returning the new list.
- *
- * Here, 'marker' is the token node that appears in the list after the
- * expansion of 'identifier'. That is, when the list iterator begins
- * examinging 'marker', then it is time to pop this node from the
- * active stack.
- */
-active_list_t *
-_active_list_push (active_list_t *list,
-		   const char *identifier,
-		   token_node_t *marker)
-{
-	active_list_t *node;
-
-	node = talloc (list, active_list_t);
-	node->identifier = talloc_strdup (node, identifier);
-	node->marker = marker;
-	node->next = list;
-
-	return node;
-}
-
-active_list_t *
-_active_list_pop (active_list_t *list)
-{
-	active_list_t *node = list;
-
-	if (node == NULL)
-		return NULL;
-
-	node = list->next;
-	talloc_free (list);
-
-	return node;
-}
-
-int
-_active_list_contains (active_list_t *list, const char *identifier)
-{
-	active_list_t *node;
-
-	if (list == NULL)
-		return 0;
-
-	for (node = list; node; node = node->next)
-		if (strcmp (node->identifier, identifier) == 0)
-			return 1;
-
-	return 0;
-}
-
-/* Walk over the token list replacing nodes with their expansion.
- * Whenever nodes are expanded the walking will walk over the new
- * nodes, continuing to expand as necessary. The results are placed in
- * 'list' itself;
- */
-static void
-_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
-				 token_list_t *list)
-{
-	token_node_t *node_prev;
-	token_node_t *node, *last = NULL;
-	token_list_t *expansion;
-
-	if (list == NULL)
-		return;
-
-	_token_list_trim_trailing_space (list);
-
-	node_prev = NULL;
-	node = list->head;
-
-	while (node) {
-
-		while (parser->active && parser->active->marker == node)
-			parser->active = _active_list_pop (parser->active);
-
-		/* Find the expansion for node, which will replace all
-		 * nodes from node to last, inclusive. */
-		expansion = _glcpp_parser_expand_node (parser, node, &last);
-		if (expansion) {
-			token_node_t *n;
-
-			for (n = node; n != last->next; n = n->next)
-				while (parser->active &&
-				       parser->active->marker == n)
-				{
-					parser->active = _active_list_pop (parser->active);
-				}
-
-			parser->active = _active_list_push (parser->active,
-							    node->token->value.str,
-							    last->next);
-			
-			/* Splice expansion into list, supporting a
-			 * simple deletion if the expansion is
-			 * empty. */
-			if (expansion->head) {
-				if (node_prev)
-					node_prev->next = expansion->head;
-				else
-					list->head = expansion->head;
-				expansion->tail->next = last->next;
-				if (last == list->tail)
-					list->tail = expansion->tail;
-			} else {
-				if (node_prev)
-					node_prev->next = last->next;
-				else
-					list->head = last->next;
-				if (last == list->tail)
-					list->tail = NULL;
-			}
-		} else {
-			node_prev = node;
-		}
-		node = node_prev ? node_prev->next : list->head;
-	}
-
-	while (parser->active)
-		parser->active = _active_list_pop (parser->active);
-
-	list->non_space_tail = list->tail;
-}
-
-void
-_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser,
-					 token_list_t *list)
-{
-	if (list == NULL)
-		return;
-
-	_glcpp_parser_expand_token_list (parser, list);
-
-	_token_list_trim_trailing_space (list);
-
-	_token_list_print (parser, list);
-}
-
-static void
-_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
-				const char *identifier)
-{
-	/* According to the GLSL specification, macro names starting with "__"
-	 * or "GL_" are reserved for future use.  So, don't allow them.
-	 */
-	if (strncmp(identifier, "__", 2) == 0) {
-		glcpp_error (loc, parser, "Macro names starting with \"__\" are reserved.\n");
-	}
-	if (strncmp(identifier, "GL_", 3) == 0) {
-		glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
-	}
-}
-
-static int
-_macro_equal (macro_t *a, macro_t *b)
-{
-	if (a->is_function != b->is_function)
-		return 0;
-
-	if (a->is_function) {
-		if (! _string_list_equal (a->parameters, b->parameters))
-			return 0;
-	}
-
-	return _token_list_equal_ignoring_space (a->replacements,
-						 b->replacements);
-}
-
-void
-_define_object_macro (glcpp_parser_t *parser,
-		      YYLTYPE *loc,
-		      const char *identifier,
-		      token_list_t *replacements)
-{
-	macro_t *macro, *previous;
-
-	if (loc != NULL)
-		_check_for_reserved_macro_name(parser, loc, identifier);
-
-	macro = talloc (parser, macro_t);
-
-	macro->is_function = 0;
-	macro->parameters = NULL;
-	macro->identifier = talloc_strdup (macro, identifier);
-	macro->replacements = talloc_steal (macro, replacements);
-
-	previous = hash_table_find (parser->defines, identifier);
-	if (previous) {
-		if (_macro_equal (macro, previous)) {
-			talloc_free (macro);
-			return;
-		}
-		glcpp_error (loc, parser, "Redefinition of macro %s\n",
-			     identifier);
-	}
-
-	hash_table_insert (parser->defines, macro, identifier);
-}
-
-void
-_define_function_macro (glcpp_parser_t *parser,
-			YYLTYPE *loc,
-			const char *identifier,
-			string_list_t *parameters,
-			token_list_t *replacements)
-{
-	macro_t *macro, *previous;
-
-	_check_for_reserved_macro_name(parser, loc, identifier);
-
-	macro = talloc (parser, macro_t);
-
-	macro->is_function = 1;
-	macro->parameters = talloc_steal (macro, parameters);
-	macro->identifier = talloc_strdup (macro, identifier);
-	macro->replacements = talloc_steal (macro, replacements);
-
-	previous = hash_table_find (parser->defines, identifier);
-	if (previous) {
-		if (_macro_equal (macro, previous)) {
-			talloc_free (macro);
-			return;
-		}
-		glcpp_error (loc, parser, "Redefinition of macro %s\n",
-			     identifier);
-	}
-
-	hash_table_insert (parser->defines, macro, identifier);
-}
-
-static int
-glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
-{
-	token_node_t *node;
-	int ret;
-
-	if (parser->lex_from_list == NULL) {
-		ret = glcpp_lex (yylval, yylloc, parser->scanner);
-
-		/* XXX: This ugly block of code exists for the sole
-		 * purpose of converting a NEWLINE token into a SPACE
-		 * token, but only in the case where we have seen a
-		 * function-like macro name, but have not yet seen its
-		 * closing parenthesis.
-		 *
-		 * There's perhaps a more compact way to do this with
-		 * mid-rule actions in the grammar.
-		 *
-		 * I'm definitely not pleased with the complexity of
-		 * this code here.
-		 */
-		if (parser->newline_as_space)
-		{
-			if (ret == '(') {
-				parser->paren_count++;
-			} else if (ret == ')') {
-				parser->paren_count--;
-				if (parser->paren_count == 0)
-					parser->newline_as_space = 0;
-			} else if (ret == NEWLINE) {
-				ret = SPACE;
-			} else if (ret != SPACE) {
-				if (parser->paren_count == 0)
-					parser->newline_as_space = 0;
-			}
-		}
-		else if (parser->in_control_line)
-		{
-			if (ret == NEWLINE)
-				parser->in_control_line = 0;
-		}
-		else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC ||
-			   ret == HASH_UNDEF || ret == HASH_IF ||
-			   ret == HASH_IFDEF || ret == HASH_IFNDEF ||
-			   ret == HASH_ELIF || ret == HASH_ELSE ||
-			   ret == HASH_ENDIF || ret == HASH)
-		{
-			parser->in_control_line = 1;
-		}
-		else if (ret == IDENTIFIER)
-		{
-			macro_t *macro;
-			macro = hash_table_find (parser->defines,
-						 yylval->str);
-			if (macro && macro->is_function) {
-				parser->newline_as_space = 1;
-				parser->paren_count = 0;
-			}
-		}
-
-		return ret;
-	}
-
-	node = parser->lex_from_node;
-
-	if (node == NULL) {
-		talloc_free (parser->lex_from_list);
-		parser->lex_from_list = NULL;
-		return NEWLINE;
-	}
-
-	*yylval = node->token->value;
-	ret = node->token->type;
-
-	parser->lex_from_node = node->next;
-
-	return ret;
-}
-
-static void
-glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list)
-{
-	token_node_t *node;
-
-	assert (parser->lex_from_list == NULL);
-
-	/* Copy list, eliminating any space tokens. */
-	parser->lex_from_list = _token_list_create (parser);
-
-	for (node = list->head; node; node = node->next) {
-		if (node->token->type == SPACE)
-			continue;
-		_token_list_append (parser->lex_from_list, node->token);
-	}
-
-	talloc_free (list);
-
-	parser->lex_from_node = parser->lex_from_list->head;
-
-	/* It's possible the list consisted of nothing but whitespace. */
-	if (parser->lex_from_node == NULL) {
-		talloc_free (parser->lex_from_list);
-		parser->lex_from_list = NULL;
-	}
-}
-
-static void
-_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				  int condition)
-{
-	skip_type_t current = SKIP_NO_SKIP;
-	skip_node_t *node;
-
-	if (parser->skip_stack)
-		current = parser->skip_stack->type;
-
-	node = talloc (parser, skip_node_t);
-	node->loc = *loc;
-
-	if (current == SKIP_NO_SKIP) {
-		if (condition)
-			node->type = SKIP_NO_SKIP;
-		else
-			node->type = SKIP_TO_ELSE;
-	} else {
-		node->type = SKIP_TO_ENDIF;
-	}
-
-	node->next = parser->skip_stack;
-	parser->skip_stack = node;
-}
-
-static void
-_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
-				    const char *type, int condition)
-{
-	if (parser->skip_stack == NULL) {
-		glcpp_error (loc, parser, "%s without #if\n", type);
-		return;
-	}
-
-	if (parser->skip_stack->type == SKIP_TO_ELSE) {
-		if (condition)
-			parser->skip_stack->type = SKIP_NO_SKIP;
-	} else {
-		parser->skip_stack->type = SKIP_TO_ENDIF;
-	}
-}
-
-static void
-_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
-{
-	skip_node_t *node;
-
-	if (parser->skip_stack == NULL) {
-		glcpp_error (loc, parser, "#endif without #if\n");
-		return;
-	}
-
-	node = parser->skip_stack;
-	parser->skip_stack = node->next;
-	talloc_free (node);
-}
diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c
deleted file mode 100644
index 062eb6b..0000000
--- a/src/glsl/glcpp/glcpp.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include "glcpp.h"
-#include "main/mtypes.h"
-#include "main/shaderobj.h"
-
-extern int yydebug;
-
-void
-_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
-                       struct gl_shader *sh)
-{
-   *ptr = sh;
-}
-
-/* Read from fd until EOF and return a string of everything read.
- */
-static char *
-load_text_fd (void *ctx, int fd)
-{
-#define CHUNK 4096
-	char *text = NULL;
-	ssize_t text_size = 0;
-	ssize_t total_read = 0;
-	ssize_t bytes;
-
-	while (1) {
-		if (total_read + CHUNK + 1 > text_size) {
-			text_size = text_size ? text_size * 2 : CHUNK + 1;
-			text = talloc_realloc_size (ctx, text, text_size);
-			if (text == NULL) {
-				fprintf (stderr, "Out of memory\n");
-				return NULL;
-			}
-		}
-		bytes = read (fd, text + total_read, CHUNK);
-		if (bytes < 0) {
-			fprintf (stderr, "Error while reading: %s\n",
-				 strerror (errno));
-			talloc_free (text);
-			return NULL;
-		}
-
-		if (bytes == 0) {
-			break;
-		}
-
-		total_read += bytes;
-	}
-
-	text[total_read] = '\0';
-
-	return text;
-}
-
-static char *
-load_text_file(void *ctx, const char *filename)
-{
-	char *text;
-	int fd;
-
-	if (filename == NULL || strcmp (filename, "-") == 0)
-		return load_text_fd (ctx, STDIN_FILENO);
-
-	fd = open (filename, O_RDONLY);
-	if (fd < 0) {
-		fprintf (stderr, "Failed to open file %s: %s\n",
-			 filename, strerror (errno));
-		return NULL;
-	}
-
-	text = load_text_fd (ctx, fd);
-
-	close(fd);
-
-	return text;
-}
-
-int
-main (int argc, char *argv[])
-{
-	char *filename = NULL;
-	void *ctx = talloc(NULL, void*);
-	char *info_log = talloc_strdup(ctx, "");
-	const char *shader;
-	int ret;
-
-	if (argc) {
-		filename = argv[1];
-	}
-
-	shader = load_text_file (ctx, filename);
-	if (shader == NULL)
-	   return 1;
-
-	ret = preprocess(ctx, &shader, &info_log, NULL, API_OPENGL);
-
-	printf("%s", shader);
-	fprintf(stderr, "%s", info_log);
-
-	talloc_free(ctx);
-
-	return ret;
-}
diff --git a/src/glsl/glcpp/glcpp.h b/src/glsl/glcpp/glcpp.h
deleted file mode 100644
index af1b53c..0000000
--- a/src/glsl/glcpp/glcpp.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef GLCPP_H
-#define GLCPP_H
-
-#include <stdint.h>
-
-#include <hieralloc.h>
-
-#include "program/hash_table.h"
-
-#define yyscan_t void*
-
-/* Some data types used for parser values. */
-
-typedef struct string_node {
-	const char *str;
-	struct string_node *next;
-} string_node_t;
-
-typedef struct string_list {
-	string_node_t *head;
-	string_node_t *tail;
-} string_list_t;
-
-typedef struct token token_t;
-typedef struct token_list token_list_t;
-
-typedef union YYSTYPE
-{
-	intmax_t ival;
-	char *str;
-	string_list_t *string_list;
-	token_t *token;
-	token_list_t *token_list;
-} YYSTYPE;
-
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-
-typedef struct YYLTYPE {
-   int first_line;
-   int first_column;
-   int last_line;
-   int last_column;
-   unsigned source;
-} YYLTYPE;
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-
-# define YYLLOC_DEFAULT(Current, Rhs, N)			\
-do {								\
-   if (N)							\
-   {								\
-      (Current).first_line   = YYRHSLOC(Rhs, 1).first_line;	\
-      (Current).first_column = YYRHSLOC(Rhs, 1).first_column;	\
-      (Current).last_line    = YYRHSLOC(Rhs, N).last_line;	\
-      (Current).last_column  = YYRHSLOC(Rhs, N).last_column;	\
-   }								\
-   else								\
-   {								\
-      (Current).first_line   = (Current).last_line =		\
-	 YYRHSLOC(Rhs, 0).last_line;				\
-      (Current).first_column = (Current).last_column =		\
-	 YYRHSLOC(Rhs, 0).last_column;				\
-   }								\
-   (Current).source = 0;					\
-} while (0)
-
-struct token {
-	int type;
-	YYSTYPE value;
-	YYLTYPE location;
-};
-
-typedef struct token_node {
-	token_t *token;
-	struct token_node *next;
-} token_node_t;
-
-struct token_list {
-	token_node_t *head;
-	token_node_t *tail;
-	token_node_t *non_space_tail;
-};
-
-typedef struct argument_node {
-	token_list_t *argument;
-	struct argument_node *next;
-} argument_node_t;
-
-typedef struct argument_list {
-	argument_node_t *head;
-	argument_node_t *tail;
-} argument_list_t;
-
-typedef struct glcpp_parser glcpp_parser_t;
-
-typedef enum {
-	TOKEN_CLASS_IDENTIFIER,
-	TOKEN_CLASS_IDENTIFIER_FINALIZED,
-	TOKEN_CLASS_FUNC_MACRO,
-	TOKEN_CLASS_OBJ_MACRO
-} token_class_t;
-
-token_class_t
-glcpp_parser_classify_token (glcpp_parser_t *parser,
-			     const char *identifier,
-			     int *parameter_index);
-
-typedef struct {
-	int is_function;
-	string_list_t *parameters;
-	const char *identifier;
-	token_list_t *replacements;
-} macro_t;
-
-typedef struct expansion_node {
-	macro_t *macro;
-	token_node_t *replacements;
-	struct expansion_node *next;
-} expansion_node_t;
-
-typedef enum skip_type {
-	SKIP_NO_SKIP,
-	SKIP_TO_ELSE,
-	SKIP_TO_ENDIF
-} skip_type_t;
-
-typedef struct skip_node {
-	skip_type_t type;
-	YYLTYPE loc; /* location of the initial #if/#elif/... */
-	struct skip_node *next;
-} skip_node_t;
-
-typedef struct active_list {
-	const char *identifier;
-	token_node_t *marker;
-	struct active_list *next;
-} active_list_t;
-
-struct glcpp_parser {
-	yyscan_t scanner;
-	struct hash_table *defines;
-	active_list_t *active;
-	int lexing_if;
-	int space_tokens;
-	int newline_as_space;
-	int in_control_line;
-	int paren_count;
-	skip_node_t *skip_stack;
-	token_list_t *lex_from_list;
-	token_node_t *lex_from_node;
-	char *output;
-	char *info_log;
-	int error;
-};
-
-struct gl_extensions;
-
-glcpp_parser_t *
-glcpp_parser_create (const struct gl_extensions *extensions, int api);
-
-int
-glcpp_parser_parse (glcpp_parser_t *parser);
-
-void
-glcpp_parser_destroy (glcpp_parser_t *parser);
-
-int
-preprocess(void *talloc_ctx, const char **shader, char **info_log,
-	   const struct gl_extensions *extensions, int api);
-
-/* Functions for writing to the info log */
-
-void
-glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...);
-
-void
-glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...);
-
-/* Generated by glcpp-lex.l to glcpp-lex.c */
-
-int
-glcpp_lex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner);
-
-void
-glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader);
-
-int
-glcpp_lex (YYSTYPE *lvalp, YYLTYPE *llocp, yyscan_t scanner);
-
-int
-glcpp_lex_destroy (yyscan_t scanner);
-
-/* Generated by glcpp-parse.y to glcpp-parse.c */
-
-int
-yyparse (glcpp_parser_t *parser);
-
-#endif
diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c
deleted file mode 100644
index 634a71b..0000000
--- a/src/glsl/glcpp/pp.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include "glcpp.h"
-#include "main/core.h" /* for isblank() on MSVC */
-
-void
-glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
-{
-	va_list ap;
-
-	parser->error = 1;
-	parser->info_log = hieralloc_asprintf_append(parser->info_log,
-						  "%u:%u(%u): "
-						  "preprocessor error: ",
-						  locp->source,
-						  locp->first_line,
-						  locp->first_column);
-	va_start(ap, fmt);
-	parser->info_log = hieralloc_vasprintf_append(parser->info_log, fmt, ap);
-	va_end(ap);
-	parser->info_log = hieralloc_strdup_append(parser->info_log, "\n");
-}
-
-void
-glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
-{
-	va_list ap;
-
-	parser->info_log = hieralloc_asprintf_append(parser->info_log,
-						  "%u:%u(%u): "
-						  "preprocessor warning: ",
-						  locp->source,
-						  locp->first_line,
-						  locp->first_column);
-	va_start(ap, fmt);
-	parser->info_log = hieralloc_vasprintf_append(parser->info_log, fmt, ap);
-	va_end(ap);
-	parser->info_log = hieralloc_strdup_append(parser->info_log, "\n");
-}
-
-/* Searches backwards for '^ *#' from a given starting point. */
-static int
-in_directive(const char *shader, const char *ptr)
-{
-	assert(ptr >= shader);
-
-	/* Search backwards for '#'. If we find a \n first, it doesn't count */
-	for (; ptr >= shader && *ptr != '#'; ptr--) {
-		if (*ptr == '\n')
-			return 0;
-	}
-	if (ptr >= shader) {
-		/* Found '#'...look for spaces preceded by a newline */
-		for (ptr--; ptr >= shader && isblank(*ptr); ptr--);
-		// FIXME: I don't think the '\n' case can happen
-		if (ptr < shader || *ptr == '\n')
-			return 1;
-	}
-	return 0;
-}
-
-/* Remove any line continuation characters in preprocessing directives.
- * However, ignore any in GLSL code, as "There is no line continuation
- * character" (1.30 page 9) in GLSL.
- */
-static char *
-remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
-{
-	int in_continued_line = 0;
-	int extra_newlines = 0;
-	char *clean = hieralloc_strdup(ctx, "");
-	const char *search_start = shader;
-	const char *newline;
-	while ((newline = strchr(search_start, '\n')) != NULL) {
-		const char *backslash = NULL;
-
-		/* # of characters preceding the newline. */
-		int n = newline - shader;
-
-		/* Find the preceding '\', if it exists */
-		if (n >= 1 && newline[-1] == '\\')
-			backslash = newline - 1;
-		else if (n >= 2 && newline[-1] == '\r' && newline[-2] == '\\')
-			backslash = newline - 2;
-
-		/* Double backslashes don't count (the backslash is escaped) */
-		if (backslash != NULL && backslash[-1] == '\\') {
-			backslash = NULL;
-		}
-
-		if (backslash != NULL) {
-			/* We found a line continuation, but do we care? */
-			if (!in_continued_line) {
-				if (in_directive(shader, backslash)) {
-					in_continued_line = 1;
-					extra_newlines = 0;
-				}
-			}
-			if (in_continued_line) {
-				/* Copy everything before the \ */
-				clean = hieralloc_strndup_append(clean, shader, backslash - shader);
-				shader = newline + 1;
-				extra_newlines++;
-			}
-		} else if (in_continued_line) {
-			/* Copy everything up to and including the \n */
-			clean = hieralloc_strndup_append(clean, shader, newline - shader + 1);
-			shader = newline + 1;
-			/* Output extra newlines to make line numbers match */
-			for (; extra_newlines > 0; extra_newlines--)
-				clean = hieralloc_strdup_append(clean, "\n");
-			in_continued_line = 0;
-		}
-		search_start = newline + 1;
-	}
-	clean = hieralloc_strdup_append(clean, shader);
-	return clean;
-}
-
-int
-preprocess(void *hieralloc_ctx, const char **shader, char **info_log,
-	   const struct gl_extensions *extensions, int api)
-{
-	int errors;
-	glcpp_parser_t *parser = glcpp_parser_create (extensions, api);
-	*shader = remove_line_continuations(parser, *shader);
-
-	glcpp_lex_set_source_string (parser, *shader);
-
-	glcpp_parser_parse (parser);
-
-	if (parser->skip_stack)
-		glcpp_error (&parser->skip_stack->loc, parser, "Unterminated #if\n");
-
-	*info_log = hieralloc_strdup_append(*info_log, parser->info_log);
-
-	hieralloc_steal(hieralloc_ctx, parser->output);
-	*shader = parser->output;
-
-	errors = parser->error;
-	glcpp_parser_destroy (parser);
-	return errors;
-}
diff --git a/src/glsl/glcpp/tests/000-content-with-spaces.c b/src/glsl/glcpp/tests/000-content-with-spaces.c
deleted file mode 100644
index 696cb3a..0000000
--- a/src/glsl/glcpp/tests/000-content-with-spaces.c
+++ /dev/null
@@ -1 +0,0 @@
-this is  four 	tokens
diff --git a/src/glsl/glcpp/tests/000-content-with-spaces.c.expected b/src/glsl/glcpp/tests/000-content-with-spaces.c.expected
deleted file mode 100644
index 83f7834..0000000
--- a/src/glsl/glcpp/tests/000-content-with-spaces.c.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-this is four tokens
-
diff --git a/src/glsl/glcpp/tests/001-define.c b/src/glsl/glcpp/tests/001-define.c
deleted file mode 100644
index cbf2fee..0000000
--- a/src/glsl/glcpp/tests/001-define.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo 1
-foo
diff --git a/src/glsl/glcpp/tests/001-define.c.expected b/src/glsl/glcpp/tests/001-define.c.expected
deleted file mode 100644
index 878fd15..0000000
--- a/src/glsl/glcpp/tests/001-define.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1
-
diff --git a/src/glsl/glcpp/tests/002-define-chain.c b/src/glsl/glcpp/tests/002-define-chain.c
deleted file mode 100644
index 87d75c6..0000000
--- a/src/glsl/glcpp/tests/002-define-chain.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define foo 1
-#define bar foo
-bar
diff --git a/src/glsl/glcpp/tests/002-define-chain.c.expected b/src/glsl/glcpp/tests/002-define-chain.c.expected
deleted file mode 100644
index 43d484d..0000000
--- a/src/glsl/glcpp/tests/002-define-chain.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-1
-
diff --git a/src/glsl/glcpp/tests/003-define-chain-reverse.c b/src/glsl/glcpp/tests/003-define-chain-reverse.c
deleted file mode 100644
index a18b724..0000000
--- a/src/glsl/glcpp/tests/003-define-chain-reverse.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define bar foo
-#define foo 1
-bar
diff --git a/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected b/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected
deleted file mode 100644
index 43d484d..0000000
--- a/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-1
-
diff --git a/src/glsl/glcpp/tests/004-define-recursive.c b/src/glsl/glcpp/tests/004-define-recursive.c
deleted file mode 100644
index 2ac56ea..0000000
--- a/src/glsl/glcpp/tests/004-define-recursive.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define foo bar
-#define bar baz
-#define baz foo
-foo
-bar
-baz
diff --git a/src/glsl/glcpp/tests/004-define-recursive.c.expected b/src/glsl/glcpp/tests/004-define-recursive.c.expected
deleted file mode 100644
index 4d2698b..0000000
--- a/src/glsl/glcpp/tests/004-define-recursive.c.expected
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-foo
-bar
-baz
-
diff --git a/src/glsl/glcpp/tests/005-define-composite-chain.c b/src/glsl/glcpp/tests/005-define-composite-chain.c
deleted file mode 100644
index f5521df..0000000
--- a/src/glsl/glcpp/tests/005-define-composite-chain.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define foo 1
-#define bar a foo
-bar
diff --git a/src/glsl/glcpp/tests/005-define-composite-chain.c.expected b/src/glsl/glcpp/tests/005-define-composite-chain.c.expected
deleted file mode 100644
index c67358f..0000000
--- a/src/glsl/glcpp/tests/005-define-composite-chain.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-a 1
-
diff --git a/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c b/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c
deleted file mode 100644
index 4bb91a1..0000000
--- a/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define bar a foo
-#define foo 1
-bar
diff --git a/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected b/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected
deleted file mode 100644
index c67358f..0000000
--- a/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-a 1
-
diff --git a/src/glsl/glcpp/tests/007-define-composite-recursive.c b/src/glsl/glcpp/tests/007-define-composite-recursive.c
deleted file mode 100644
index 5784565..0000000
--- a/src/glsl/glcpp/tests/007-define-composite-recursive.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define foo a bar
-#define bar b baz
-#define baz c foo
-foo
-bar
-baz
diff --git a/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected b/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected
deleted file mode 100644
index 30fe4dc..0000000
--- a/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-a b c foo
-b c a bar
-c a b baz
-
diff --git a/src/glsl/glcpp/tests/008-define-empty.c b/src/glsl/glcpp/tests/008-define-empty.c
deleted file mode 100644
index b1bd17e..0000000
--- a/src/glsl/glcpp/tests/008-define-empty.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo
-foo
diff --git a/src/glsl/glcpp/tests/008-define-empty.c.expected b/src/glsl/glcpp/tests/008-define-empty.c.expected
deleted file mode 100644
index c0f53d7..0000000
--- a/src/glsl/glcpp/tests/008-define-empty.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 
-
diff --git a/src/glsl/glcpp/tests/009-undef.c b/src/glsl/glcpp/tests/009-undef.c
deleted file mode 100644
index 3fc1fb4..0000000
--- a/src/glsl/glcpp/tests/009-undef.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define foo 1
-foo
-#undef foo
-foo
diff --git a/src/glsl/glcpp/tests/009-undef.c.expected b/src/glsl/glcpp/tests/009-undef.c.expected
deleted file mode 100644
index 03a7061..0000000
--- a/src/glsl/glcpp/tests/009-undef.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-1
-
-foo
-
diff --git a/src/glsl/glcpp/tests/010-undef-re-define.c b/src/glsl/glcpp/tests/010-undef-re-define.c
deleted file mode 100644
index 32ff737..0000000
--- a/src/glsl/glcpp/tests/010-undef-re-define.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define foo 1
-foo
-#undef foo
-foo
-#define foo 2
-foo
diff --git a/src/glsl/glcpp/tests/010-undef-re-define.c.expected b/src/glsl/glcpp/tests/010-undef-re-define.c.expected
deleted file mode 100644
index f4f7efd..0000000
--- a/src/glsl/glcpp/tests/010-undef-re-define.c.expected
+++ /dev/null
@@ -1,7 +0,0 @@
-
-1
-
-foo
-
-2
-
diff --git a/src/glsl/glcpp/tests/011-define-func-empty.c b/src/glsl/glcpp/tests/011-define-func-empty.c
deleted file mode 100644
index d9ce13c..0000000
--- a/src/glsl/glcpp/tests/011-define-func-empty.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo()
-foo()
diff --git a/src/glsl/glcpp/tests/011-define-func-empty.c.expected b/src/glsl/glcpp/tests/011-define-func-empty.c.expected
deleted file mode 100644
index c0f53d7..0000000
--- a/src/glsl/glcpp/tests/011-define-func-empty.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
- 
-
diff --git a/src/glsl/glcpp/tests/012-define-func-no-args.c b/src/glsl/glcpp/tests/012-define-func-no-args.c
deleted file mode 100644
index c2bb730..0000000
--- a/src/glsl/glcpp/tests/012-define-func-no-args.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo() bar
-foo()
diff --git a/src/glsl/glcpp/tests/012-define-func-no-args.c.expected b/src/glsl/glcpp/tests/012-define-func-no-args.c.expected
deleted file mode 100644
index 0353767..0000000
--- a/src/glsl/glcpp/tests/012-define-func-no-args.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-bar
-
diff --git a/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c b/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c
deleted file mode 100644
index f78fb8b..0000000
--- a/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x) 1
-foo(bar)
diff --git a/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected b/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected
deleted file mode 100644
index 878fd15..0000000
--- a/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1
-
diff --git a/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c b/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c
deleted file mode 100644
index 11feb26..0000000
--- a/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x,y) 1
-foo(bar,baz)
diff --git a/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected b/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected
deleted file mode 100644
index 878fd15..0000000
--- a/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1
-
diff --git a/src/glsl/glcpp/tests/015-define-object-with-parens.c b/src/glsl/glcpp/tests/015-define-object-with-parens.c
deleted file mode 100644
index 558da9c..0000000
--- a/src/glsl/glcpp/tests/015-define-object-with-parens.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define foo ()1
-foo()
-#define bar ()2
-bar()
diff --git a/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected b/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected
deleted file mode 100644
index d6f8cb9..0000000
--- a/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-()1()
-
-()2()
-
diff --git a/src/glsl/glcpp/tests/016-define-func-1-arg.c b/src/glsl/glcpp/tests/016-define-func-1-arg.c
deleted file mode 100644
index a2e2404..0000000
--- a/src/glsl/glcpp/tests/016-define-func-1-arg.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x) ((x)+1)
-foo(bar)
diff --git a/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected b/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected
deleted file mode 100644
index 7f1828a..0000000
--- a/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-((bar)+1)
-
diff --git a/src/glsl/glcpp/tests/017-define-func-2-args.c b/src/glsl/glcpp/tests/017-define-func-2-args.c
deleted file mode 100644
index c725383..0000000
--- a/src/glsl/glcpp/tests/017-define-func-2-args.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x,y) ((x)*(y))
-foo(bar,baz)
diff --git a/src/glsl/glcpp/tests/017-define-func-2-args.c.expected b/src/glsl/glcpp/tests/017-define-func-2-args.c.expected
deleted file mode 100644
index 9f341da..0000000
--- a/src/glsl/glcpp/tests/017-define-func-2-args.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-((bar)*(baz))
-
diff --git a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c b/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c
deleted file mode 100644
index 668130b..0000000
--- a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define x 0
-#define foo(x) x
-foo(1)
diff --git a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected b/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
deleted file mode 100644
index 43d484d..0000000
--- a/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-1
-
diff --git a/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c b/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c
deleted file mode 100644
index c4e62b2..0000000
--- a/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x) (x)
-foo(this is more than one word)
diff --git a/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected b/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected
deleted file mode 100644
index 4314fc8..0000000
--- a/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-(this is more than one word)
-
diff --git a/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c b/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c
deleted file mode 100644
index 3049ad1..0000000
--- a/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x,y) x,two fish,red fish,y
-foo(one fish, blue fish)
diff --git a/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected b/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected
deleted file mode 100644
index 5648e4f..0000000
--- a/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-one fish,two fish,red fish,blue fish
-
diff --git a/src/glsl/glcpp/tests/021-define-func-compose.c b/src/glsl/glcpp/tests/021-define-func-compose.c
deleted file mode 100644
index 21ddd0e..0000000
--- a/src/glsl/glcpp/tests/021-define-func-compose.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define bar(x) (1+(x))
-#define foo(y) (2*(y))
-foo(bar(3))
diff --git a/src/glsl/glcpp/tests/021-define-func-compose.c.expected b/src/glsl/glcpp/tests/021-define-func-compose.c.expected
deleted file mode 100644
index 1d62105..0000000
--- a/src/glsl/glcpp/tests/021-define-func-compose.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-(2*((1+(3))))
-
diff --git a/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c b/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c
deleted file mode 100644
index c20d73a..0000000
--- a/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x) (x)
-foo(argument(including parens)for the win)
diff --git a/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected b/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected
deleted file mode 100644
index 66c1658..0000000
--- a/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-(argument(including parens)for the win)
-
diff --git a/src/glsl/glcpp/tests/023-define-extra-whitespace.c b/src/glsl/glcpp/tests/023-define-extra-whitespace.c
deleted file mode 100644
index 7ebfed6..0000000
--- a/src/glsl/glcpp/tests/023-define-extra-whitespace.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define noargs() 1 
-# define onearg(foo) foo 
- # define  twoargs( x , y ) x y 
-	#	define	threeargs(	a	,	b	,	c	) a b c 
-noargs ( ) 
-onearg ( 2 ) 
-twoargs ( 3 , 4 ) 
-threeargs ( 5 , 6 , 7 ) 
diff --git a/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected b/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected
deleted file mode 100644
index 573829c..0000000
--- a/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-1
-2
-3 4
-5 6 7
-
diff --git a/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c b/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c
deleted file mode 100644
index e788adc..0000000
--- a/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define  foo foo
-#define  bar foo
-bar
diff --git a/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected b/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected
deleted file mode 100644
index ad955fc..0000000
--- a/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-foo
-
diff --git a/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c b/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c
deleted file mode 100644
index b433671..0000000
--- a/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(bar) bar
-foo bar
diff --git a/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected b/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected
deleted file mode 100644
index 960f445..0000000
--- a/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-foo bar
-
diff --git a/src/glsl/glcpp/tests/026-define-func-extra-newlines.c b/src/glsl/glcpp/tests/026-define-func-extra-newlines.c
deleted file mode 100644
index 0d83740..0000000
--- a/src/glsl/glcpp/tests/026-define-func-extra-newlines.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define foo(a) bar
-
-foo
-(
-1
-)
diff --git a/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected b/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected
deleted file mode 100644
index f0888f2..0000000
--- a/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-bar
-
diff --git a/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c b/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c
deleted file mode 100644
index 5ccb52c..0000000
--- a/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define failure() success
-#define foo failure()
-foo
diff --git a/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected b/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected
deleted file mode 100644
index aef762e..0000000
--- a/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c b/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c
deleted file mode 100644
index 44962a7..0000000
--- a/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define success() failure
-#define foo success
-foo
diff --git a/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected b/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected
deleted file mode 100644
index aef762e..0000000
--- a/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c b/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c
deleted file mode 100644
index 261f7d2..0000000
--- a/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define bar(failure) failure
-#define foo bar(success)
-foo
diff --git a/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected b/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected
deleted file mode 100644
index aef762e..0000000
--- a/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c b/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c
deleted file mode 100644
index e56fbef..0000000
--- a/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define baz(failure) failure
-#define bar(failure) failure
-#define foo bar(baz(success))
-foo
diff --git a/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected b/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected
deleted file mode 100644
index 729bdd1..0000000
--- a/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c b/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c
deleted file mode 100644
index 3f4c874..0000000
--- a/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define baz(failure) failure
-#define bar(failure) failure
-#define foo() bar(baz(success))
-foo()
diff --git a/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected b/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected
deleted file mode 100644
index 729bdd1..0000000
--- a/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/032-define-func-self-recurse.c b/src/glsl/glcpp/tests/032-define-func-self-recurse.c
deleted file mode 100644
index b3ac70f..0000000
--- a/src/glsl/glcpp/tests/032-define-func-self-recurse.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(a) foo(2*(a))
-foo(3)
diff --git a/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected b/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected
deleted file mode 100644
index 541d44d..0000000
--- a/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-foo(2*(3))
-
diff --git a/src/glsl/glcpp/tests/033-define-func-self-compose.c b/src/glsl/glcpp/tests/033-define-func-self-compose.c
deleted file mode 100644
index f65e482..0000000
--- a/src/glsl/glcpp/tests/033-define-func-self-compose.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(a) foo(2*(a))
-foo(foo(3))
diff --git a/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected b/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected
deleted file mode 100644
index 6ea6905..0000000
--- a/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-foo(2*(foo(2*(3))))
-
diff --git a/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c b/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c
deleted file mode 100644
index 209a5f7..0000000
--- a/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(bar) bar
-foo(foo)
diff --git a/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected b/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected
deleted file mode 100644
index 24823b1..0000000
--- a/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-foo
-
diff --git a/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c b/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c
deleted file mode 100644
index c307fbe..0000000
--- a/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(bar) bar
-foo(1+foo)
diff --git a/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected b/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected
deleted file mode 100644
index 137a9ea..0000000
--- a/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1+foo
-
diff --git a/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c b/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c
deleted file mode 100644
index b21ff33..0000000
--- a/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define bar success
-#define foo(x) x
-foo(more bar)
diff --git a/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected b/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected
deleted file mode 100644
index ff6360b..0000000
--- a/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-more success
-
diff --git a/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c b/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c
deleted file mode 100644
index b3a2f37..0000000
--- a/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define expand(x) expand(x once)
-#define foo(x) x
-foo(expand(just))
diff --git a/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected b/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected
deleted file mode 100644
index cbadee8..0000000
--- a/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-expand(just once)
-
diff --git a/src/glsl/glcpp/tests/038-func-arg-with-commas.c b/src/glsl/glcpp/tests/038-func-arg-with-commas.c
deleted file mode 100644
index 1407c7d..0000000
--- a/src/glsl/glcpp/tests/038-func-arg-with-commas.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define foo(x) success
-foo(argument (with,embedded , commas) -- tricky)
diff --git a/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected b/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected
deleted file mode 100644
index 5a28fb3..0000000
--- a/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-success
-
diff --git a/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c b/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c
deleted file mode 100644
index 0f7fe63..0000000
--- a/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define foo(a) (a)
-#define bar two,words
-foo(bar)
diff --git a/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected b/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected
deleted file mode 100644
index b73869d..0000000
--- a/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-(two,words)
-
diff --git a/src/glsl/glcpp/tests/040-token-pasting.c b/src/glsl/glcpp/tests/040-token-pasting.c
deleted file mode 100644
index caab3ba..0000000
--- a/src/glsl/glcpp/tests/040-token-pasting.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define paste(a,b) a ## b
-paste(one , token)
diff --git a/src/glsl/glcpp/tests/040-token-pasting.c.expected b/src/glsl/glcpp/tests/040-token-pasting.c.expected
deleted file mode 100644
index 36f6699..0000000
--- a/src/glsl/glcpp/tests/040-token-pasting.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-onetoken
-
diff --git a/src/glsl/glcpp/tests/041-if-0.c b/src/glsl/glcpp/tests/041-if-0.c
deleted file mode 100644
index 2cab677..0000000
--- a/src/glsl/glcpp/tests/041-if-0.c
+++ /dev/null
@@ -1,5 +0,0 @@
-success_1
-#if 0
-failure
-#endif
-success_2
diff --git a/src/glsl/glcpp/tests/041-if-0.c.expected b/src/glsl/glcpp/tests/041-if-0.c.expected
deleted file mode 100644
index 3800024..0000000
--- a/src/glsl/glcpp/tests/041-if-0.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-success_1
-
-
-
-success_2
-
diff --git a/src/glsl/glcpp/tests/042-if-1.c b/src/glsl/glcpp/tests/042-if-1.c
deleted file mode 100644
index 874a25c..0000000
--- a/src/glsl/glcpp/tests/042-if-1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-success_1
-#if 1
-success_2
-#endif
-success_3
diff --git a/src/glsl/glcpp/tests/042-if-1.c.expected b/src/glsl/glcpp/tests/042-if-1.c.expected
deleted file mode 100644
index e591044..0000000
--- a/src/glsl/glcpp/tests/042-if-1.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-success_1
-
-success_2
-
-success_3
-
diff --git a/src/glsl/glcpp/tests/043-if-0-else.c b/src/glsl/glcpp/tests/043-if-0-else.c
deleted file mode 100644
index 323351f..0000000
--- a/src/glsl/glcpp/tests/043-if-0-else.c
+++ /dev/null
@@ -1,7 +0,0 @@
-success_1
-#if 0
-failure
-#else
-success_2
-#endif
-success_3
diff --git a/src/glsl/glcpp/tests/043-if-0-else.c.expected b/src/glsl/glcpp/tests/043-if-0-else.c.expected
deleted file mode 100644
index ee9e677..0000000
--- a/src/glsl/glcpp/tests/043-if-0-else.c.expected
+++ /dev/null
@@ -1,8 +0,0 @@
-success_1
-
-
-
-success_2
-
-success_3
-
diff --git a/src/glsl/glcpp/tests/044-if-1-else.c b/src/glsl/glcpp/tests/044-if-1-else.c
deleted file mode 100644
index 28dfc25..0000000
--- a/src/glsl/glcpp/tests/044-if-1-else.c
+++ /dev/null
@@ -1,7 +0,0 @@
-success_1
-#if 1
-success_2
-#else
-failure
-#endif
-success_3
diff --git a/src/glsl/glcpp/tests/044-if-1-else.c.expected b/src/glsl/glcpp/tests/044-if-1-else.c.expected
deleted file mode 100644
index 129f5c8..0000000
--- a/src/glsl/glcpp/tests/044-if-1-else.c.expected
+++ /dev/null
@@ -1,8 +0,0 @@
-success_1
-
-success_2
-
-
-
-success_3
-
diff --git a/src/glsl/glcpp/tests/045-if-0-elif.c b/src/glsl/glcpp/tests/045-if-0-elif.c
deleted file mode 100644
index e50f686..0000000
--- a/src/glsl/glcpp/tests/045-if-0-elif.c
+++ /dev/null
@@ -1,11 +0,0 @@
-success_1
-#if 0
-failure_1
-#elif 0
-failure_2
-#elif 1
-success_3
-#elif 1
-failure_3
-#endif
-success_4
diff --git a/src/glsl/glcpp/tests/045-if-0-elif.c.expected b/src/glsl/glcpp/tests/045-if-0-elif.c.expected
deleted file mode 100644
index 97a11b4..0000000
--- a/src/glsl/glcpp/tests/045-if-0-elif.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-success_1
-
-
-
-
-
-success_3
-
-
-
-success_4
-
diff --git a/src/glsl/glcpp/tests/046-if-1-elsif.c b/src/glsl/glcpp/tests/046-if-1-elsif.c
deleted file mode 100644
index 130515a..0000000
--- a/src/glsl/glcpp/tests/046-if-1-elsif.c
+++ /dev/null
@@ -1,11 +0,0 @@
-success_1
-#if 1
-success_2
-#elif 0
-failure_1
-#elif 1
-failure_2
-#elif 0
-failure_3
-#endif
-success_3
diff --git a/src/glsl/glcpp/tests/046-if-1-elsif.c.expected b/src/glsl/glcpp/tests/046-if-1-elsif.c.expected
deleted file mode 100644
index b928b91..0000000
--- a/src/glsl/glcpp/tests/046-if-1-elsif.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-success_1
-
-success_2
-
-
-
-
-
-
-
-success_3
-
diff --git a/src/glsl/glcpp/tests/047-if-elif-else.c b/src/glsl/glcpp/tests/047-if-elif-else.c
deleted file mode 100644
index e8f0838..0000000
--- a/src/glsl/glcpp/tests/047-if-elif-else.c
+++ /dev/null
@@ -1,11 +0,0 @@
-success_1
-#if 0
-failure_1
-#elif 0
-failure_2
-#elif 0
-failure_3
-#else
-success_2
-#endif
-success_3
diff --git a/src/glsl/glcpp/tests/047-if-elif-else.c.expected b/src/glsl/glcpp/tests/047-if-elif-else.c.expected
deleted file mode 100644
index e5b53a3..0000000
--- a/src/glsl/glcpp/tests/047-if-elif-else.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-success_1
-
-
-
-
-
-
-
-success_2
-
-success_3
-
diff --git a/src/glsl/glcpp/tests/048-if-nested.c b/src/glsl/glcpp/tests/048-if-nested.c
deleted file mode 100644
index fc4679c..0000000
--- a/src/glsl/glcpp/tests/048-if-nested.c
+++ /dev/null
@@ -1,11 +0,0 @@
-success_1
-#if 0
-failure_1
-#if 1
-failure_2
-#else
-failure_3
-#endif
-failure_4
-#endif
-success_2
diff --git a/src/glsl/glcpp/tests/048-if-nested.c.expected b/src/glsl/glcpp/tests/048-if-nested.c.expected
deleted file mode 100644
index c61fd0b..0000000
--- a/src/glsl/glcpp/tests/048-if-nested.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-success_1
-
-
-
-
-
-
-
-
-
-success_2
-
diff --git a/src/glsl/glcpp/tests/049-if-expression-precedence.c b/src/glsl/glcpp/tests/049-if-expression-precedence.c
deleted file mode 100644
index 833ea03..0000000
--- a/src/glsl/glcpp/tests/049-if-expression-precedence.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#if 1 + 2 * 3 + - (25 % 17 - + 1)
-failure with operator precedence
-#else
-success
-#endif
diff --git a/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected b/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected
deleted file mode 100644
index 569debb..0000000
--- a/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-success
-
-
diff --git a/src/glsl/glcpp/tests/050-if-defined.c b/src/glsl/glcpp/tests/050-if-defined.c
deleted file mode 100644
index 34f0f95..0000000
--- a/src/glsl/glcpp/tests/050-if-defined.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#if defined foo
-failure_1
-#else
-success_1
-#endif
-#define foo
-#if defined foo
-success_2
-#else
-failure_2
-#endif
-#undef foo
-#if defined foo
-failure_3
-#else
-success_3
-#endif
diff --git a/src/glsl/glcpp/tests/050-if-defined.c.expected b/src/glsl/glcpp/tests/050-if-defined.c.expected
deleted file mode 100644
index 3f01955..0000000
--- a/src/glsl/glcpp/tests/050-if-defined.c.expected
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-success_1
-
-
-
-success_2
-
-
-
-
-
-
-
-success_3
-
-
diff --git a/src/glsl/glcpp/tests/051-if-relational.c b/src/glsl/glcpp/tests/051-if-relational.c
deleted file mode 100644
index c3db488..0000000
--- a/src/glsl/glcpp/tests/051-if-relational.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#if 3 < 2
-failure_1
-#else
-success_1
-#endif
-
-#if 3 >= 2
-success_2
-#else
-failure_2
-#endif
-
-#if 2 + 3 <= 5
-success_3
-#else
-failure_3
-#endif
-
-#if 3 - 2 == 1
-success_3
-#else
-failure_3
-#endif
-
-#if 1 > 3
-failure_4
-#else
-success_4
-#endif
-
-#if 1 != 5
-success_5
-#else
-failure_5
-#endif
diff --git a/src/glsl/glcpp/tests/051-if-relational.c.expected b/src/glsl/glcpp/tests/051-if-relational.c.expected
deleted file mode 100644
index d2b76f14..0000000
--- a/src/glsl/glcpp/tests/051-if-relational.c.expected
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-success_1
-
-
-
-success_2
-
-
-
-
-
-success_3
-
-
-
-
-
-success_3
-
-
-
-
-
-
-
-success_4
-
-
-
-success_5
-
-
-
-
diff --git a/src/glsl/glcpp/tests/052-if-bitwise.c b/src/glsl/glcpp/tests/052-if-bitwise.c
deleted file mode 100644
index 2d8e45e..0000000
--- a/src/glsl/glcpp/tests/052-if-bitwise.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#if (0xaaaaaaaa | 0x55555555) != 4294967295
-failure_1
-#else
-success_1
-#endif
-#if (0x12345678 ^ 0xfdecba98) == 4023971040
-success_2
-#else
-failure_2
-#endif
-#if (~ 0xdeadbeef) != -3735928560
-failure_3
-#else
-success_3
-#endif
-#if (0667 & 0733) == 403
-success_4
-#else
-failure_4
-#endif
diff --git a/src/glsl/glcpp/tests/052-if-bitwise.c.expected b/src/glsl/glcpp/tests/052-if-bitwise.c.expected
deleted file mode 100644
index bb5d92e..0000000
--- a/src/glsl/glcpp/tests/052-if-bitwise.c.expected
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-success_1
-
-
-success_2
-
-
-
-
-
-
-success_3
-
-
-success_4
-
-
-
-
diff --git a/src/glsl/glcpp/tests/053-if-divide-and-shift.c b/src/glsl/glcpp/tests/053-if-divide-and-shift.c
deleted file mode 100644
index d24c54a..0000000
--- a/src/glsl/glcpp/tests/053-if-divide-and-shift.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#if (15 / 2) != 7
-failure_1
-#else
-success_1
-#endif
-#if (1 << 12) == 4096
-success_2
-#else
-failure_2
-#endif
-#if (31762 >> 8) != 124
-failure_3
-#else
-success_3
-#endif
diff --git a/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected b/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected
deleted file mode 100644
index f97e936..0000000
--- a/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-success_1
-
-
-success_2
-
-
-
-
-
-
-success_3
-
-
diff --git a/src/glsl/glcpp/tests/054-if-with-macros.c b/src/glsl/glcpp/tests/054-if-with-macros.c
deleted file mode 100644
index 3da79a0..0000000
--- a/src/glsl/glcpp/tests/054-if-with-macros.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#define one 1
-#define two 2
-#define three 3
-#define five 5
-#if five < two
-failure_1
-#else
-success_1
-#endif
-#if three >= two
-success_2
-#else
-failure_2
-#endif
-#if two + three <= five
-success_3
-#else
-failure_3
-#endif
-#if five - two == three
-success_4
-#else
-failure_4
-#endif
-#if one > three
-failure_5
-#else
-success_5
-#endif
-#if one != five
-success_6
-#else
-failure_6
-#endif
diff --git a/src/glsl/glcpp/tests/054-if-with-macros.c.expected b/src/glsl/glcpp/tests/054-if-with-macros.c.expected
deleted file mode 100644
index 27ea496..0000000
--- a/src/glsl/glcpp/tests/054-if-with-macros.c.expected
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-success_1
-
-
-success_2
-
-
-
-
-success_3
-
-
-
-
-success_4
-
-
-
-
-
-
-success_5
-
-
-success_6
-
-
-
-
diff --git a/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c b/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c
deleted file mode 100644
index 00f2c23..0000000
--- a/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define failure() success
-#define foo failure
-foo()
diff --git a/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected b/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected
deleted file mode 100644
index aef762e..0000000
--- a/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/056-macro-argument-with-comma.c b/src/glsl/glcpp/tests/056-macro-argument-with-comma.c
deleted file mode 100644
index 58701d1..0000000
--- a/src/glsl/glcpp/tests/056-macro-argument-with-comma.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define bar with,embedded,commas
-#define function(x) success
-#define foo function
-foo(bar)
diff --git a/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected b/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected
deleted file mode 100644
index 729bdd1..0000000
--- a/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/057-empty-arguments.c b/src/glsl/glcpp/tests/057-empty-arguments.c
deleted file mode 100644
index 6140232..0000000
--- a/src/glsl/glcpp/tests/057-empty-arguments.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define zero() success
-zero()
-#define one(x) success
-one()
-#define two(x,y) success
-two(,)
diff --git a/src/glsl/glcpp/tests/057-empty-arguments.c.expected b/src/glsl/glcpp/tests/057-empty-arguments.c.expected
deleted file mode 100644
index 4e3aad5..0000000
--- a/src/glsl/glcpp/tests/057-empty-arguments.c.expected
+++ /dev/null
@@ -1,7 +0,0 @@
-
-success
-
-success
-
-success
-
diff --git a/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c b/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c
deleted file mode 100644
index 8ac260c..0000000
--- a/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define paste(x,y) x ## y
-paste(a,b)
-paste(a,)
-paste(,b)
-paste(,)
diff --git a/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected b/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected
deleted file mode 100644
index a1c34e5..0000000
--- a/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-ab
-a
-b
-
-
diff --git a/src/glsl/glcpp/tests/059-token-pasting-integer.c b/src/glsl/glcpp/tests/059-token-pasting-integer.c
deleted file mode 100644
index 37b895a..0000000
--- a/src/glsl/glcpp/tests/059-token-pasting-integer.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define paste(x,y) x ## y
-paste(1,2)
-paste(1,000)
-paste(identifier,2)
diff --git a/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected b/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected
deleted file mode 100644
index f1a2cd2..0000000
--- a/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-12
-1000
-identifier2
-
diff --git a/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c b/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c
deleted file mode 100644
index ed80ea8..0000000
--- a/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define double(a) a*2
-#define foo double(
-foo 5)
diff --git a/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected b/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected
deleted file mode 100644
index c1f0d24..0000000
--- a/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-5*2
-
diff --git a/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c b/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c
deleted file mode 100644
index 6dbfd1f..0000000
--- a/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define foo(x) success
-#define bar foo
-#define baz bar
-#define joe baz
-joe (failure)
diff --git a/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected b/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected
deleted file mode 100644
index 111f7d1..0000000
--- a/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/062-if-0-skips-garbage.c b/src/glsl/glcpp/tests/062-if-0-skips-garbage.c
deleted file mode 100644
index d9e439b..0000000
--- a/src/glsl/glcpp/tests/062-if-0-skips-garbage.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define foo(a,b)
-#if 0
-foo(bar)
-foo(
-#endif
diff --git a/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected b/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected
deleted file mode 100644
index 6fb66a5..0000000
--- a/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/063-comments.c b/src/glsl/glcpp/tests/063-comments.c
deleted file mode 100644
index e641d2f..0000000
--- a/src/glsl/glcpp/tests/063-comments.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* this is a comment */
-// so is this
-// */
-f = g/**//h;
-/*//*/l();
-m = n//**/o
-+ p;
-/* this
-comment spans
-multiple lines and
-contains *** stars
-and slashes / *** /
-and other stuff.
-****/
-more code here
-/* Test that /* nested
-   comments */
-are not treated like comments.
-/*/ this is a comment */
-/*/*/
diff --git a/src/glsl/glcpp/tests/063-comments.c.expected b/src/glsl/glcpp/tests/063-comments.c.expected
deleted file mode 100644
index ed4feed..0000000
--- a/src/glsl/glcpp/tests/063-comments.c.expected
+++ /dev/null
@@ -1,14 +0,0 @@
- 
-
-
-f = g /h;
- l();
-m = n
-+ p;
- 
-more code here
- 
-are not treated like comments.
- 
- 
-
diff --git a/src/glsl/glcpp/tests/064-version.c b/src/glsl/glcpp/tests/064-version.c
deleted file mode 100644
index 2132648..0000000
--- a/src/glsl/glcpp/tests/064-version.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#version 130
-#define FOO
diff --git a/src/glsl/glcpp/tests/064-version.c.expected b/src/glsl/glcpp/tests/064-version.c.expected
deleted file mode 100644
index 3af7111..0000000
--- a/src/glsl/glcpp/tests/064-version.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-
-
diff --git a/src/glsl/glcpp/tests/065-if-defined-parens.c b/src/glsl/glcpp/tests/065-if-defined-parens.c
deleted file mode 100644
index 48aa0f8..0000000
--- a/src/glsl/glcpp/tests/065-if-defined-parens.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#if defined(foo)
-failure_1
-#else
-success_1
-#endif
-#define foo
-#if defined ( foo )
-success_2
-#else
-failure_2
-#endif
-#undef foo
-#if defined (foo)
-failure_3
-#else
-success_3
-#endif
diff --git a/src/glsl/glcpp/tests/065-if-defined-parens.c.expected b/src/glsl/glcpp/tests/065-if-defined-parens.c.expected
deleted file mode 100644
index 3f01955..0000000
--- a/src/glsl/glcpp/tests/065-if-defined-parens.c.expected
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-success_1
-
-
-
-success_2
-
-
-
-
-
-
-
-success_3
-
-
diff --git a/src/glsl/glcpp/tests/066-if-nospace-expression.c b/src/glsl/glcpp/tests/066-if-nospace-expression.c
deleted file mode 100644
index 3b0b473..0000000
--- a/src/glsl/glcpp/tests/066-if-nospace-expression.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#if(1)
-success
-#endif
diff --git a/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected b/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected
deleted file mode 100644
index 0e84a7c..0000000
--- a/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-success
-
-
diff --git a/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c b/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c
deleted file mode 100644
index f46cce4..0000000
--- a/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#define D1
-#define D2
-
-#define result success
-
-#ifdef U1
-#ifdef U2
-#undef result
-#define result failure
-#endif
-#endif
-result
-
-#ifndef D1
-#ifndef D2
-#undef result
-#define result failure
-#endif
-#endif
-result
-
-#undef result
-#define result failure
-#ifdef D1
-#ifdef D2
-#undef result
-#define result success
-#endif
-#endif
-result
-
-#undef result
-#define result failure
-#ifndef U1
-#ifndef U2
-#undef result
-#define result success
-#endif
-#endif
-result
diff --git a/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected b/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected
deleted file mode 100644
index 3340daa..0000000
--- a/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-success
-
-
-
-
-
-
-
-success
-
-
-
-
-
-
-
-
-
-success
-
-
-
-
-
-
-
-
-
-success
-
diff --git a/src/glsl/glcpp/tests/068-accidental-pasting.c b/src/glsl/glcpp/tests/068-accidental-pasting.c
deleted file mode 100644
index 699ac51..0000000
--- a/src/glsl/glcpp/tests/068-accidental-pasting.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#define empty
-<empty<
-<empty=
->empty>
->empty=
-=empty=
-!empty=
-&empty&
-|empty|
-+empty+
--empty-
diff --git a/src/glsl/glcpp/tests/068-accidental-pasting.c.expected b/src/glsl/glcpp/tests/068-accidental-pasting.c.expected
deleted file mode 100644
index ce41cd6..0000000
--- a/src/glsl/glcpp/tests/068-accidental-pasting.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-
-< <
-< =
-> >
-> =
-= =
-! =
-& &
-| |
-+ +
-- -
-
diff --git a/src/glsl/glcpp/tests/069-repeated-argument.c b/src/glsl/glcpp/tests/069-repeated-argument.c
deleted file mode 100644
index 2b46ead..0000000
--- a/src/glsl/glcpp/tests/069-repeated-argument.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define double(x) x x
-double(1)
diff --git a/src/glsl/glcpp/tests/069-repeated-argument.c.expected b/src/glsl/glcpp/tests/069-repeated-argument.c.expected
deleted file mode 100644
index 755c4d4..0000000
--- a/src/glsl/glcpp/tests/069-repeated-argument.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1 1
-
diff --git a/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c b/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c
deleted file mode 100644
index b6dc2ba..0000000
--- a/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#if UNDEFINED_MACRO
-#endif
diff --git a/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected b/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected
deleted file mode 100644
index 2bb38a1..0000000
--- a/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-0:1(21): preprocessor error: syntax error, unexpected IDENTIFIER
-
diff --git a/src/glsl/glcpp/tests/071-punctuator.c b/src/glsl/glcpp/tests/071-punctuator.c
deleted file mode 100644
index 959d682..0000000
--- a/src/glsl/glcpp/tests/071-punctuator.c
+++ /dev/null
@@ -1 +0,0 @@
-a = b
diff --git a/src/glsl/glcpp/tests/071-punctuator.c.expected b/src/glsl/glcpp/tests/071-punctuator.c.expected
deleted file mode 100644
index fee253b..0000000
--- a/src/glsl/glcpp/tests/071-punctuator.c.expected
+++ /dev/null
@@ -1,2 +0,0 @@
-a = b
-
diff --git a/src/glsl/glcpp/tests/072-token-pasting-same-line.c b/src/glsl/glcpp/tests/072-token-pasting-same-line.c
deleted file mode 100644
index e421e9d..0000000
--- a/src/glsl/glcpp/tests/072-token-pasting-same-line.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define paste(x) success_ ## x
-paste(1) paste(2) paste(3)
diff --git a/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected b/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected
deleted file mode 100644
index c780b43..0000000
--- a/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-
-success_1 success_2 success_3
-
diff --git a/src/glsl/glcpp/tests/073-if-in-ifdef.c b/src/glsl/glcpp/tests/073-if-in-ifdef.c
deleted file mode 100644
index 61a4809..0000000
--- a/src/glsl/glcpp/tests/073-if-in-ifdef.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifdef UNDEF
-#if UNDEF > 1
-#endif
-#endif
diff --git a/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected b/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected
deleted file mode 100644
index 3f2ff2d..0000000
--- a/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/074-elif-undef.c b/src/glsl/glcpp/tests/074-elif-undef.c
deleted file mode 100644
index 67aac89..0000000
--- a/src/glsl/glcpp/tests/074-elif-undef.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef UNDEF
-#elif UNDEF < 0
-#endif
diff --git a/src/glsl/glcpp/tests/074-elif-undef.c.expected b/src/glsl/glcpp/tests/074-elif-undef.c.expected
deleted file mode 100644
index fd40910..0000000
--- a/src/glsl/glcpp/tests/074-elif-undef.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/src/glsl/glcpp/tests/075-elif-elif-undef.c b/src/glsl/glcpp/tests/075-elif-elif-undef.c
deleted file mode 100644
index 264bc4f..0000000
--- a/src/glsl/glcpp/tests/075-elif-elif-undef.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef UNDEF
-#elif UNDEF < 0
-#elif UNDEF == 3
-#endif
diff --git a/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected b/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected
deleted file mode 100644
index 3f2ff2d..0000000
--- a/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/076-elif-undef-nested.c b/src/glsl/glcpp/tests/076-elif-undef-nested.c
deleted file mode 100644
index ebd550e..0000000
--- a/src/glsl/glcpp/tests/076-elif-undef-nested.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef UNDEF
-#if UNDEF == 4
-#elif UNDEF == 5
-#endif
-#endif
diff --git a/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected b/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected
deleted file mode 100644
index 6fb66a5..0000000
--- a/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/077-else-without-if.c b/src/glsl/glcpp/tests/077-else-without-if.c
deleted file mode 100644
index 81f00bf..0000000
--- a/src/glsl/glcpp/tests/077-else-without-if.c
+++ /dev/null
@@ -1 +0,0 @@
-#else
diff --git a/src/glsl/glcpp/tests/077-else-without-if.c.expected b/src/glsl/glcpp/tests/077-else-without-if.c.expected
deleted file mode 100644
index d289b36..0000000
--- a/src/glsl/glcpp/tests/077-else-without-if.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-0:1(2): preprocessor error: else without #if
-
-
-
diff --git a/src/glsl/glcpp/tests/078-elif-without-if.c b/src/glsl/glcpp/tests/078-elif-without-if.c
deleted file mode 100644
index 60466b3..0000000
--- a/src/glsl/glcpp/tests/078-elif-without-if.c
+++ /dev/null
@@ -1 +0,0 @@
-#elif defined FOO
diff --git a/src/glsl/glcpp/tests/078-elif-without-if.c.expected b/src/glsl/glcpp/tests/078-elif-without-if.c.expected
deleted file mode 100644
index 7d41f0a..0000000
--- a/src/glsl/glcpp/tests/078-elif-without-if.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-0:1(2): preprocessor error: elif without #if
-
-
-
diff --git a/src/glsl/glcpp/tests/079-endif-without-if.c b/src/glsl/glcpp/tests/079-endif-without-if.c
deleted file mode 100644
index 69331c3..0000000
--- a/src/glsl/glcpp/tests/079-endif-without-if.c
+++ /dev/null
@@ -1 +0,0 @@
-#endif
diff --git a/src/glsl/glcpp/tests/079-endif-without-if.c.expected b/src/glsl/glcpp/tests/079-endif-without-if.c.expected
deleted file mode 100644
index 08dd335..0000000
--- a/src/glsl/glcpp/tests/079-endif-without-if.c.expected
+++ /dev/null
@@ -1,4 +0,0 @@
-0:1(2): preprocessor error: #endif without #if
-
-
-
diff --git a/src/glsl/glcpp/tests/080-if-without-expression.c b/src/glsl/glcpp/tests/080-if-without-expression.c
deleted file mode 100644
index a27ba36..0000000
--- a/src/glsl/glcpp/tests/080-if-without-expression.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Error message for unskipped #if with no expression. */
-#if
-#endif
-
diff --git a/src/glsl/glcpp/tests/080-if-without-expression.c.expected b/src/glsl/glcpp/tests/080-if-without-expression.c.expected
deleted file mode 100644
index 768ba0f..0000000
--- a/src/glsl/glcpp/tests/080-if-without-expression.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-0:2(1): preprocessor error: #if with no expression
- 
-
-
-
-
diff --git a/src/glsl/glcpp/tests/081-elif-without-expression.c b/src/glsl/glcpp/tests/081-elif-without-expression.c
deleted file mode 100644
index 79c7866..0000000
--- a/src/glsl/glcpp/tests/081-elif-without-expression.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#if 0
-#elif
-#endif
diff --git a/src/glsl/glcpp/tests/081-elif-without-expression.c.expected b/src/glsl/glcpp/tests/081-elif-without-expression.c.expected
deleted file mode 100644
index 974f0f5..0000000
--- a/src/glsl/glcpp/tests/081-elif-without-expression.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-0:2(1): preprocessor error: #elif with no expression
-
-
-
-
diff --git a/src/glsl/glcpp/tests/082-invalid-paste.c b/src/glsl/glcpp/tests/082-invalid-paste.c
deleted file mode 100644
index 40bf644..0000000
--- a/src/glsl/glcpp/tests/082-invalid-paste.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define PASTE(x,y) x ## y
-PASTE(<,>)
diff --git a/src/glsl/glcpp/tests/082-invalid-paste.c.expected b/src/glsl/glcpp/tests/082-invalid-paste.c.expected
deleted file mode 100644
index 2c92440..0000000
--- a/src/glsl/glcpp/tests/082-invalid-paste.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-0:2(7): preprocessor error: 
-Pasting "<" and ">" does not give a valid preprocessing token.
-
-<
-
diff --git a/src/glsl/glcpp/tests/083-unterminated-if.c b/src/glsl/glcpp/tests/083-unterminated-if.c
deleted file mode 100644
index 9180635..0000000
--- a/src/glsl/glcpp/tests/083-unterminated-if.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#if 1
-
diff --git a/src/glsl/glcpp/tests/083-unterminated-if.c.expected b/src/glsl/glcpp/tests/083-unterminated-if.c.expected
deleted file mode 100644
index a69f8ba..0000000
--- a/src/glsl/glcpp/tests/083-unterminated-if.c.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-0:1(7): preprocessor error: Unterminated #if
-
-
-
-
diff --git a/src/glsl/glcpp/tests/084-unbalanced-parentheses.c b/src/glsl/glcpp/tests/084-unbalanced-parentheses.c
deleted file mode 100644
index 0789ba5..0000000
--- a/src/glsl/glcpp/tests/084-unbalanced-parentheses.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC(x) (2*(x))
-FUNC(23
diff --git a/src/glsl/glcpp/tests/085-incorrect-argument-count.c b/src/glsl/glcpp/tests/085-incorrect-argument-count.c
deleted file mode 100644
index 91bea60..0000000
--- a/src/glsl/glcpp/tests/085-incorrect-argument-count.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define MULT(x,y) ((x)*(y))
-MULT()
-MULT(1)
-MULT(1,2,3)
-
diff --git a/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected b/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected
deleted file mode 100644
index 1df30cb..0000000
--- a/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected
+++ /dev/null
@@ -1,12 +0,0 @@
-0:2(1): preprocessor error: Error: macro MULT invoked with 1 arguments (expected 2)
-
-0:3(1): preprocessor error: Error: macro MULT invoked with 1 arguments (expected 2)
-
-0:4(1): preprocessor error: Error: macro MULT invoked with 3 arguments (expected 2)
-
-
-MULT()
-MULT(1)
-MULT(1,2,3)
-
-
diff --git a/src/glsl/glcpp/tests/086-reserved-macro-names.c b/src/glsl/glcpp/tests/086-reserved-macro-names.c
deleted file mode 100644
index fd0c29f..0000000
--- a/src/glsl/glcpp/tests/086-reserved-macro-names.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __BAD reserved
-#define GL_ALSO_BAD() also reserved
diff --git a/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected b/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected
deleted file mode 100644
index 6a9df68..0000000
--- a/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected
+++ /dev/null
@@ -1,7 +0,0 @@
-0:1(10): preprocessor error: Macro names starting with "__" are reserved.
-
-0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
-
-
-
-
diff --git a/src/glsl/glcpp/tests/087-if-comments.c b/src/glsl/glcpp/tests/087-if-comments.c
deleted file mode 100644
index ce8dc43..0000000
--- a/src/glsl/glcpp/tests/087-if-comments.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#if (1 == 0) // dangerous comment
-fail
-#else
-win
-#endif
diff --git a/src/glsl/glcpp/tests/087-if-comments.c.expected b/src/glsl/glcpp/tests/087-if-comments.c.expected
deleted file mode 100644
index 827e548..0000000
--- a/src/glsl/glcpp/tests/087-if-comments.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-win
-
-
diff --git a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c b/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c
deleted file mode 100644
index 0e0666b..0000000
--- a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define abc 123
-#define abc 123
-
-#define foo(x) (x)+23
-#define foo(x) ( x ) + 23
diff --git a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected b/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected
deleted file mode 100644
index 6fb66a5..0000000
--- a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/089-redefine-macro-error.c b/src/glsl/glcpp/tests/089-redefine-macro-error.c
deleted file mode 100644
index b3d1391..0000000
--- a/src/glsl/glcpp/tests/089-redefine-macro-error.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#define x y
-#define x z
-
-#define abc 123
-#define abc() 123
-
-#define foo() bar
-#define foo(x) bar
-
-#define bar() baz
-#define bar baz
-
-#define biff(a,b) a+b
-#define biff(a,b,c) a+b
-
-#define oper(a,b) a+b
-#define oper(a,b) a*b
diff --git a/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected b/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected
deleted file mode 100644
index 6209ead..0000000
--- a/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected
+++ /dev/null
@@ -1,30 +0,0 @@
-0:2(9): preprocessor error: Redefinition of macro x
-
-0:5(9): preprocessor error: Redefinition of macro abc
-
-0:8(9): preprocessor error: Redefinition of macro foo
-
-0:11(9): preprocessor error: Redefinition of macro bar
-
-0:14(9): preprocessor error: Redefinition of macro biff
-
-0:17(9): preprocessor error: Redefinition of macro oper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/090-hash-error.c b/src/glsl/glcpp/tests/090-hash-error.c
deleted file mode 100644
index d19bb7f..0000000
--- a/src/glsl/glcpp/tests/090-hash-error.c
+++ /dev/null
@@ -1 +0,0 @@
-#error human error
diff --git a/src/glsl/glcpp/tests/090-hash-error.c.expected b/src/glsl/glcpp/tests/090-hash-error.c.expected
deleted file mode 100644
index f2f1fbe..0000000
--- a/src/glsl/glcpp/tests/090-hash-error.c.expected
+++ /dev/null
@@ -1,3 +0,0 @@
-0:1(2): preprocessor error: #error human error
-
-
diff --git a/src/glsl/glcpp/tests/091-hash-line.c b/src/glsl/glcpp/tests/091-hash-line.c
deleted file mode 100644
index fea35d3..0000000
--- a/src/glsl/glcpp/tests/091-hash-line.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#line 0
-#error line 0 error
-#line 25
-#error line 25 error
-#line 0 1
-#error source 1, line 0 error
-#line 30 2
-#error source 2, line 30 error
diff --git a/src/glsl/glcpp/tests/091-hash-line.c.expected b/src/glsl/glcpp/tests/091-hash-line.c.expected
deleted file mode 100644
index e663398..0000000
--- a/src/glsl/glcpp/tests/091-hash-line.c.expected
+++ /dev/null
@@ -1,13 +0,0 @@
-0:0(1): preprocessor error: #error line 0 error
-0:25(1): preprocessor error: #error line 25 error
-1:0(1): preprocessor error: #error source 1, line 0 error
-2:30(1): preprocessor error: #error source 2, line 30 error
-
-
-
-
-
-
-
-
-
diff --git a/src/glsl/glcpp/tests/099-c99-example.c b/src/glsl/glcpp/tests/099-c99-example.c
deleted file mode 100644
index d1976b1..0000000
--- a/src/glsl/glcpp/tests/099-c99-example.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#define  x      3
-#define  f(a)   f(x * (a))
-#undef   x
-#define  x      2
-#define  g      f
-#define  z      z[0]
-#define  h      g(~
-#define  m(a)   a(w)
-#define  w      0,1
-#define  t(a)   a
-#define  p()    int
-#define  q(x)   x
-#define  r(x,y) x ## y
-f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
-g(x +(3,4)-w) | h 5) & m
-       (f)^m(m);
-p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,)};
diff --git a/src/glsl/glcpp/tests/099-c99-example.c.expected b/src/glsl/glcpp/tests/099-c99-example.c.expected
deleted file mode 100644
index 19be750..0000000
--- a/src/glsl/glcpp/tests/099-c99-example.c.expected
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
-f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
-int i[] = { 1, 23, 4, 5, };
-
diff --git a/src/glsl/glcpp/tests/glcpp-test b/src/glsl/glcpp/tests/glcpp-test
deleted file mode 100755
index 5dc08ea..0000000
--- a/src/glsl/glcpp/tests/glcpp-test
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-trap 'rm $test.valgrind-errors; exit 1' INT QUIT
-
-total=0
-pass=0
-clean=0
-
-echo "====== Testing for correctness ======"
-for test in *.c; do
-    echo -n "Testing $test..."
-    ../glcpp < $test > $test.out 2>&1
-    total=$((total+1))
-    if cmp $test.expected $test.out >/dev/null 2>&1; then
-	echo "PASS"
-	pass=$((pass+1))
-    else
-	echo "FAIL"
-	diff -u $test.expected $test.out
-    fi
-done
-
-echo ""
-echo "$pass/$total tests returned correct results"
-echo ""
-
-echo "====== Testing for valgrind cleanliness ======"
-for test in *.c; do
-    echo -n "Testing $test with valgrind..."
-    valgrind --error-exitcode=31 --log-file=$test.valgrind-errors ../glcpp < $test >/dev/null 2>&1
-    if [ "$?" = "31" ]; then
-	echo "ERRORS"
-	cat $test.valgrind-errors
-    else
-	echo "CLEAN"
-	clean=$((clean+1))
-	rm $test.valgrind-errors
-    fi
-done
-
-echo ""
-echo "$pass/$total tests returned correct results"
-echo "$clean/$total tests are valgrind-clean"
-
-if [ "$pass" = "$total" ] && [ "$clean" = "$total" ]; then
-    exit 0
-else
-    exit 1
-fi
-
diff --git a/src/glsl/glsl_compiler.cpp b/src/glsl/glsl_compiler.cpp
deleted file mode 100644
index 72baa7d..0000000
--- a/src/glsl/glsl_compiler.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <cstdlib>
-#include <cstdio>
-#include <getopt.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_parser.h"
-#include "ir_optimization.h"
-#include "ir_print_visitor.h"
-#include "program.h"
-#include "loop_analysis.h"
-#include "src/mesa/main/shaderobj.h"
-
-static void
-initialize_context(struct gl_context *ctx, gl_api api)
-{
-   memset(ctx, 0, sizeof(*ctx));
-
-   ctx->API = api;
-
-   ctx->Extensions.ARB_draw_buffers = GL_TRUE;
-   ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
-   ctx->Extensions.EXT_texture_array = GL_TRUE;
-   ctx->Extensions.NV_texture_rectangle = GL_TRUE;
-
-   /* 1.10 minimums. */
-   ctx->Const.MaxLights = 8;
-   ctx->Const.MaxClipPlanes = 8;
-   ctx->Const.MaxTextureUnits = 2;
-
-   /* More than the 1.10 minimum to appease parser tests taken from
-    * apps that (hopefully) already checked the number of coords.
-    */
-   ctx->Const.MaxTextureCoordUnits = 4;
-
-   ctx->Const.VertexProgram.MaxAttribs = 16;
-   ctx->Const.VertexProgram.MaxUniformComponents = 512;
-   ctx->Const.MaxVarying = 8;
-   ctx->Const.MaxVertexTextureImageUnits = 0;
-   ctx->Const.MaxCombinedTextureImageUnits = 2;
-   ctx->Const.MaxTextureImageUnits = 2;
-   ctx->Const.FragmentProgram.MaxUniformComponents = 64;
-
-   ctx->Const.MaxDrawBuffers = 2;
-}
-
-/* Returned string will have 'ctx' as its hieralloc owner. */
-static char *
-load_text_file(void *ctx, const char *file_name)
-{
-	char *text = NULL;
-	struct stat st;
-	ssize_t total_read = 0;
-	int fd = open(file_name, O_RDONLY);
-
-	if (fd < 0) {
-		return NULL;
-	}
-
-	if (fstat(fd, & st) == 0) {
-	   text = (char *) hieralloc_size(ctx, st.st_size + 1);
-		if (text != NULL) {
-			do {
-				ssize_t bytes = read(fd, text + total_read,
-						     st.st_size - total_read);
-				if (bytes < 0) {
-					free(text);
-					text = NULL;
-					break;
-				}
-
-				if (bytes == 0) {
-					break;
-				}
-
-				total_read += bytes;
-			} while (total_read < st.st_size);
-
-			text[total_read] = '\0';
-		}
-	}
-
-	close(fd);
-
-	return text;
-}
-
-int glsl_es = 0;
-int dump_ast = 0;
-int dump_hir = 0;
-int dump_lir = 0;
-int do_link = 0;
-
-const struct option compiler_opts[] = {
-   { "glsl-es",  0, &glsl_es,  1 },
-   { "dump-ast", 0, &dump_ast, 1 },
-   { "dump-hir", 0, &dump_hir, 1 },
-   { "dump-lir", 0, &dump_lir, 1 },
-   { "link",     0, &do_link,  1 },
-   { NULL, 0, NULL, 0 }
-};
-
-/**
- * \brief Print proper usage and exit with failure.
- */
-void
-usage_fail(const char *name)
-{
-
-   const char *header =
-      "usage: %s [options] <file.vert | file.geom | file.frag>\n"
-      "\n"
-      "Possible options are:\n";
-   printf(header, name, name);
-   for (const struct option *o = compiler_opts; o->name != 0; ++o) {
-      printf("    --%s\n", o->name);
-   }
-   exit(EXIT_FAILURE);
-}
-
-
-void
-compile_shader(struct gl_context *ctx, struct gl_shader *shader)
-{
-   struct _mesa_glsl_parse_state *state =
-      new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader);
-
-   const char *source = shader->Source;
-   state->error = preprocess(state, &source, &state->info_log,
-			     state->extensions, ctx->API);
-
-   if (!state->error) {
-      _mesa_glsl_lexer_ctor(state, source);
-      _mesa_glsl_parse(state);
-      _mesa_glsl_lexer_dtor(state);
-   }
-
-   if (dump_ast) {
-      foreach_list_const(n, &state->translation_unit) {
-	 ast_node *ast = exec_node_data(ast_node, n, link);
-	 ast->print();
-      }
-      printf("\n\n");
-   }
-
-   shader->ir = new(shader) exec_list;
-   if (!state->error && !state->translation_unit.is_empty())
-      _mesa_ast_to_hir(shader->ir, state);
-
-   /* Print out the unoptimized IR. */
-   if (!state->error && dump_hir) {
-      validate_ir_tree(shader->ir);
-      _mesa_print_ir(shader->ir, state);
-   }
-
-   /* Optimization passes */
-   if (!state->error && !shader->ir->is_empty()) {
-      bool progress;
-      do {
-	 progress = do_common_optimization(shader->ir, false, 32);
-      } while (progress);
-
-      validate_ir_tree(shader->ir);
-   }
-
-
-   /* Print out the resulting IR */
-   if (!state->error && dump_lir) {
-      _mesa_print_ir(shader->ir, state);
-   }
-
-   shader->symbols = state->symbols;
-   shader->CompileStatus = !state->error;
-   shader->Version = state->language_version;
-   memcpy(shader->builtins_to_link, state->builtins_to_link,
-	  sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link);
-   shader->num_builtins_to_link = state->num_builtins_to_link;
-
-   if (shader->InfoLog)
-      hieralloc_free(shader->InfoLog);
-
-   shader->InfoLog = state->info_log;
-
-   /* Retain any live IR, but trash the rest. */
-   reparent_ir(shader->ir, shader);
-
-   hieralloc_free(state);
-
-   return;
-}
-
-int
-main(int argc, char **argv)
-{
-   int status = EXIT_SUCCESS;
-   struct gl_context local_ctx;
-   struct gl_context *ctx = &local_ctx;
-
-   int c;
-   int idx = 0;
-   while ((c = getopt_long(argc, argv, "", compiler_opts, &idx)) != -1)
-      /* empty */ ;
-
-
-   if (argc <= optind)
-      usage_fail(argv[0]);
-
-   initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL);
-
-   struct gl_shader_program *whole_program;
-
-   whole_program = hieralloc_zero (NULL, struct gl_shader_program);
-   assert(whole_program != NULL);
-
-   for (/* empty */; argc > optind; optind++) {
-      whole_program->Shaders = (struct gl_shader **)
-	 hieralloc_realloc(whole_program, whole_program->Shaders,
-			struct gl_shader *, whole_program->NumShaders + 1);
-      assert(whole_program->Shaders != NULL);
-
-      struct gl_shader *shader = hieralloc_zero(whole_program, gl_shader);
-
-      whole_program->Shaders[whole_program->NumShaders] = shader;
-      whole_program->NumShaders++;
-
-      const unsigned len = strlen(argv[optind]);
-      if (len < 6)
-	 usage_fail(argv[0]);
-
-      const char *const ext = & argv[optind][len - 5];
-      if (strncmp(".vert", ext, 5) == 0)
-	 shader->Type = GL_VERTEX_SHADER;
-      else if (strncmp(".geom", ext, 5) == 0)
-	 shader->Type = GL_GEOMETRY_SHADER;
-      else if (strncmp(".frag", ext, 5) == 0)
-	 shader->Type = GL_FRAGMENT_SHADER;
-      else
-	 usage_fail(argv[0]);
-
-      shader->Source = load_text_file(whole_program, argv[optind]);
-      if (shader->Source == NULL) {
-	 printf("File \"%s\" does not exist.\n", argv[optind]);
-	 exit(EXIT_FAILURE);
-      }
-
-      compile_shader(ctx, shader);
-
-      if (!shader->CompileStatus) {
-	 printf("Info log for %s:\n%s\n", argv[optind], shader->InfoLog);
-	 status = EXIT_FAILURE;
-	 break;
-      }
-   }
-
-   if ((status == EXIT_SUCCESS) && do_link)  {
-      link_shaders(ctx, whole_program);
-      status = (whole_program->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE;
-
-      if (strlen(whole_program->InfoLog) > 0)
-	 printf("Info log for linking:\n%s\n", whole_program->InfoLog);
-   }
-
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++)
-      hieralloc_free(whole_program->_LinkedShaders[i]);
-
-   hieralloc_free(whole_program);
-   _mesa_glsl_release_types();
-   _mesa_glsl_release_functions();
-
-   return status;
-}
diff --git a/src/glsl/glsl_lexer.cpp b/src/glsl/glsl_lexer.cpp
deleted file mode 100644
index 5a1fd28..0000000
--- a/src/glsl/glsl_lexer.cpp
+++ /dev/null
@@ -1,3688 +0,0 @@
-#line 2 "glsl_lexer.cpp"
-
-#line 4 "glsl_lexer.cpp"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* An opaque pointer. */
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-/* For convenience, these vars (plus the bison vars far below)
-   are macros in the reentrant scanner. */
-#define yyin yyg->yyin_r
-#define yyout yyg->yyout_r
-#define yyextra yyg->yyextra_r
-#define yyleng yyg->yyleng_r
-#define yytext yyg->yytext_r
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug yyg->yy_flex_debug_r
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yyg->yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yyg->yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE _mesa_glsl_restart(yyin ,yyscanner )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    #define YY_LESS_LINENO(n)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = yyg->yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via _mesa_glsl_restart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
-                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-
-void _mesa_glsl_restart (FILE *input_file ,yyscan_t yyscanner );
-void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner );
-
-static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner );
-static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner );
-static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-
-#define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-
-YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner );
-void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner );
-void _mesa_glsl_free (void * ,yyscan_t yyscanner );
-
-#define yy_new_buffer _mesa_glsl__create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        _mesa_glsl_ensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        _mesa_glsl_ensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define _mesa_glsl_wrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-typedef int yy_state_type;
-
-#define yytext_ptr yytext_r
-
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yyg->yytext_ptr = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
-	yyg->yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yyg->yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 209
-#define YY_END_OF_BUFFER 210
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_accept[813] =
-    {   0,
-        0,    0,   15,   15,    0,    0,  210,  208,    1,   20,
-      208,  208,  208,  208,  208,  208,  208,  208,  119,  117,
-      208,  208,  208,  207,  208,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  208,    1,  208,  209,   15,
-       19,  209,   18,   16,   17,   13,   12,    1,  101,  110,
-      102,  113,  107,   96,  109,   97,  116,  121,  108,  122,
-      119,    0,    0,  124,  119,    0,  117,  117,  105,   98,
-      100,   99,  106,  207,  114,  104,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,   29,  207,
-
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,   33,  207,  207,   60,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  115,
-      103,    1,    0,    0,    2,    0,    0,    0,    0,   15,
-       14,   18,   17,    0,  121,  120,    0,  122,    0,  123,
-      118,  111,  112,  207,  127,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,   32,  207,  207,  207,
-
-      207,  207,  207,  207,  207,  207,  207,   25,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,   61,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-        0,    0,    0,    0,   14,    0,  121,    0,  120,    0,
-      122,  123,  118,  207,  207,   23,  207,  207,  174,  167,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,   31,
-      130,  207,  207,  207,  207,   67,  207,  207,  135,  149,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-
-      207,  207,  146,  170,   48,   49,   50,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  133,  125,  207,
-      207,   26,  207,  207,  207,  207,  207,  207,  207,   45,
-       46,   47,   94,  207,  207,    0,    0,    0,    0,    0,
-      120,  207,  207,   27,   36,   37,   38,  207,  128,  207,
-       22,  207,  207,  207,  207,  157,  158,  159,  207,  126,
-      207,  150,   24,  160,  161,  162,  172,  154,  155,  156,
-      207,  207,  207,   62,  152,  207,  207,  207,   39,   40,
-       41,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-
-      207,  207,  207,  207,  207,  207,  207,  147,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  129,  207,
-      207,  169,   42,   43,   44,  207,  207,   30,    0,    0,
-        0,    0,  177,  207,  207,  175,  207,  207,  207,  148,
-      143,  180,  207,  207,  207,  207,  207,  207,  138,  207,
-      207,  207,   95,   51,   52,   53,   54,   55,   56,   57,
-       58,   59,  207,  207,  207,  207,  153,  134,  207,  207,
-      141,   35,  207,  207,  166,   68,  142,   93,  178,  136,
-      207,  207,  207,  207,  207,  207,  207,  207,    0,    0,
-        0,    0,  207,  207,  207,  137,   34,  207,  207,  207,
-
-      207,  207,  207,  181,  182,  183,  207,  207,  207,  207,
-      207,  171,  207,  207,  207,  207,  207,  207,  207,  207,
-      131,  207,  207,  207,  207,  207,   63,  207,  207,   64,
-      207,    0,    0,    0,    0,    0,  207,   65,   28,  144,
-      185,  186,  187,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  139,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  132,  189,  190,  191,  207,
-      207,  151,  207,  140,    0,    0,    6,    0,    0,    0,
-       11,    3,   21,  207,  207,  207,  207,  207,  207,  207,
-      207,  207,  184,  145,   66,  207,  207,  207,  207,  168,
-
-      207,  176,  173,  206,   70,   71,   72,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,    0,    0,    0,
-        0,    0,    0,  207,  207,  207,  188,  207,  207,  207,
-      207,  207,   81,   82,   83,  207,  207,  207,  207,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  192,   87,
-       88,   89,  207,    4,    0,    5,    0,    0,    0,    0,
-        0,  207,  207,  207,  207,  207,  207,  207,  203,  207,
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-       73,  207,  207,  207,  207,  207,  207,    0,    0,    0,
-      207,  207,  204,  193,  207,  194,  207,  207,  207,   84,
-
-      207,  207,  207,  207,  207,  207,  207,  207,  207,  207,
-      207,  205,  207,  207,   90,    0,    0,  195,  196,  207,
-      199,  207,  200,  207,  207,   69,  207,  207,  207,  163,
-      207,  164,  179,  207,  197,  198,  207,  207,    0,    0,
-      207,  207,  207,  207,   74,  207,   75,  207,  207,  207,
-      207,  207,    0,    0,    0,  207,  207,   85,   86,  207,
-       76,  207,  207,   77,  207,   91,   92,    0,    0,    0,
-      207,  207,  207,  207,  207,  207,    0,    0,    0,  207,
-      207,  207,  207,  207,   78,    0,    0,    7,    0,    0,
-      201,  202,  207,  207,  207,    0,    8,    0,    0,  207,
-
-      207,  165,    0,    0,   79,   80,    0,    0,    9,    0,
-       10,    0
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    5,    1,    6,    1,    7,    8,    1,    9,
-       10,   11,   12,    1,   13,   14,   15,   16,   17,   18,
-       19,   20,   21,   21,   21,   22,   22,   23,    1,   24,
-       25,   26,    1,    1,   27,   28,   29,   30,   31,   32,
-       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
-       33,   34,   35,   33,   36,   33,   33,   37,   33,   33,
-        1,    1,    1,   38,   39,    1,   40,   41,   42,   43,
-
-       44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
-       54,   55,   33,   56,   57,   58,   59,   60,   61,   62,
-       63,   64,    1,   65,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[66] =
-    {   0,
-        1,    2,    3,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    4,    4,    4,    4,    4,
-        4,    5,    1,    1,    1,    1,    6,    6,    6,    6,
-        5,    5,    7,    7,    7,    7,    8,    1,    7,    6,
-        6,    6,    6,    5,    5,    7,    7,    7,    7,    7,
-        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
-        7,    8,    7,    7,    1
-    } ;
-
-static yyconst flex_int16_t yy_base[824] =
-    {   0,
-        0,   64,   70,    0, 1185, 1184, 1186, 1189,   65, 1189,
-     1160, 1159,  128, 1158,  125,  126,  124, 1157,  140,  189,
-      123, 1156,  138,    0,  127,  124,  113,  135,  144,  161,
-      176, 1126,  130,  187,  140,  143,  161, 1120,  182,  174,
-      202,  199,  211,  212, 1131,  130,  263,  255, 1189,  189,
-     1189, 1162,  256, 1189,    0, 1189, 1189,  215, 1189, 1189,
-     1189, 1189, 1189, 1189, 1189, 1189, 1189,  248, 1189,  250,
-      112,  302,  319, 1189, 1189,    0,    0, 1189, 1151, 1189,
-     1189, 1189, 1150,    0, 1189, 1189, 1116, 1121, 1114, 1117,
-     1126, 1125, 1111, 1114, 1126,  144, 1120, 1107, 1104, 1118,
-
-     1104, 1101, 1101, 1107,  175,  191, 1101, 1112, 1097, 1103,
-     1107, 1108,    0, 1099, 1110,  247, 1109, 1104, 1084,  230,
-     1088, 1102, 1092,  241, 1085,  228, 1098, 1100, 1082, 1078,
-     1086, 1083, 1072, 1081,  173, 1079, 1085, 1080, 1083, 1071,
-     1074,  233,  240,  260, 1084, 1071, 1084,  239, 1077, 1189,
-     1189,  307,  301,  323, 1189, 1062, 1075, 1066, 1077,  249,
-        0,  368,    0,  379, 1189,  298,  390, 1189,  397,  404,
-      291, 1189, 1189, 1072,    0, 1063, 1067, 1077, 1074,  270,
-     1057, 1057, 1061,  291, 1072, 1069, 1069, 1067, 1064, 1055,
-     1062, 1048, 1046, 1059, 1044, 1061,    0, 1058, 1045, 1053,
-
-     1050, 1054, 1055, 1048, 1045, 1033, 1032, 1046, 1049, 1036,
-     1045, 1032, 1039, 1029,  335, 1035, 1038, 1028, 1036, 1024,
-     1028, 1019, 1034, 1024, 1015, 1034, 1017, 1015, 1026, 1015,
-     1010, 1008, 1022, 1007, 1009, 1006, 1018, 1017, 1020, 1001,
-      306, 1010, 1005, 1003, 1013,  991,  339, 1010, 1012, 1000,
-      992,  996, 1008,  991,    0,  411,  421,  438, 1189,  451,
-      458, 1189, 1189,  986,  997,    0,  994,  344,    0,    0,
-      987,  985,  987,  982,  991,  979,  997,  985,  350,    0,
-        0,  979,  990,  989,  989,    0,  973,  353,    0,    0,
-      975,  357,  983,  984,  974,  968,  967,  968,  967,  967,
-
-      361,  962,    0,    0,  958,  957,  956,  958,  959,  964,
-      958,  954,  968,  963,  962,  961,  952,  955,  955,  947,
-      950,  945,  954,  959,  944,  957,  947,    0,    0,  954,
-      950,    0,  941,  941,  947,  937,  945,  426,  942,    0,
-        0,    0,    0,  931,  944,  943,  942,  939,  927,  465,
-      475,  939,  941,    0,    0,    0,    0,  927,    0,  927,
-        0,  926,  927,  921,  932,    0,    0,    0,  922,    0,
-      918,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-      929,  481,  928,    0,    0,  926,  922,  918,    0,    0,
-        0,  910,  443,  486,  493,  915,  911,  917,  907,  905,
-
-      919,  903,  903,  917,  905,  917,  912,    0,  910,  907,
-      911,  894,  896,  903,  909,  904,  903,  890,    0,  892,
-      893,    0,    0,    0,    0,  890,  894,    0,  888,  938,
-      887,  890,    0,  878,  888,    0,  876,  876,  890,    0,
-      892,    0,  497,  901,  900,  899,  869,  868,    0,  886,
-      885,  880,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,  868,  882,  868,  865,    0,    0,  871,  870,
-        0,    0,  868,  860,    0,    0,    0,    0,    0,    0,
-      857,  869,  500,  861,  868,  867,  864,  858,  851,  519,
-      867,  852,  847,  861,  859,    0,    0,  851,  871,  870,
-
-      869,  839,  838,  495,  496,    0,  851,  854,  852,  840,
-      836,    0,  849,  846,  845,  834,  833,  832,  515,  841,
-        0,  854,  853,  852,  822,  821,    0,  836,  822,    0,
-      833,  828,  543,  545,  873,  821,  829,    0,    0,    0,
-      845,  844,    0,  825,  828,  812,  820,  810,  818,  819,
-      819,  818,  803,  539,  816,    0,  817,  805,  804,  800,
-      825,  824,  823,  793,  792,    0,  823,  822,    0,  803,
-      806,    0,  552,    0,  792,  557, 1189,  580,    0,  590,
-      499, 1189,    0,  789,  788,  798,  798,  785,  800,  783,
-      798,  793,    0,    0,    0,  806,  805,  804,  774,    0,
-
-      774,    0,    0,    0,  559,  568,  797,  785,  788,  772,
-      771,  781,  781,  794,  793,  792,  762,  767,  552,  613,
-      363,  775,  763,  761,  760,  771,    0,  774,  770,  772,
-      768,  754,  782,  781,    0,  766,  758,  749,  757,  747,
-      758,  754,  756,  754,  754,  741,  740,  751,    0,  767,
-      766,    0,  751, 1189,  391, 1189,  620,    0,  640,  750,
-      732,  749,  748,  731,  723,  731,  721,  729,    0,  726,
-      725,  736,  719,  722,  737,  720,  733,  734,  731,  728,
-      736,  730,  729,  712,  711,  710,  721,  402,  705,  715,
-      699,  698,    0,  725,  698,  723,  696,  700,  699,    0,
-
-      710,  713,  709,  711,  688,  702,  686,  680,  688,  671,
-      662,    0,  640,  639,    0,  648,  641,    0,    0,  645,
-        0,  644,    0,  650,  649,    0,  625,  633,  623,  650,
-      630,    0,    0,  643,    0,    0,  642,  641,  582,  632,
-      639,  638,  614,  613,  635,  608,  633,  607,  590,  607,
-      586,  585,  611,  380,  526,  545,  544,    0,    0,  538,
-        0,  504,  510,    0,  495,    0,    0,  550,  572,  483,
-      470,  454,  462,  449,  445,  404,  419,  616,  619,  391,
-      387,  404,  392,  290,    0,  617,  642, 1189,  644,  570,
-        0,    0,  263,  258,  139,  645, 1189,  643,  618,  107,
-
-       77,    0,   23,  662,    0,    0,  663,  664, 1189,  665,
-     1189, 1189,  697,  702,  707,  712,  714,  716,  722,  729,
-      734,  739,  744
-    } ;
-
-static yyconst flex_int16_t yy_def[824] =
-    {   0,
-      812,    1,  812,    3,  813,  813,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  814,  812,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  815,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  816,  812,  817,
-       19,  812,  812,  812,  812,  818,   20,  812,  812,  812,
-      812,  812,  812,  814,  812,  812,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      819,  812,  815,  812,  812,  817,  812,  812,  812,  812,
-      818,  812,  812,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      812,  812,  812,  812,  819,  812,  812,  812,  812,  812,
-      812,  812,  812,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  812,  812,  812,  812,  812,
-      812,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  812,  812,
-      812,  812,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  812,  812,
-      812,  812,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  812,  820,  812,  812,  812,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  812,  812,  812,  812,  821,  812,
-      812,  812,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  812,  822,  812,
-      821,  812,  812,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  812,  812,  812,  812,  823,  812,  812,
-      812,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  823,  812,  812,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  812,  812,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  814,  812,  812,
-      814,  814,  814,  814,  814,  814,  814,  814,  814,  814,
-      814,  814,  812,  812,  812,  814,  814,  814,  814,  814,
-      814,  814,  814,  814,  814,  814,  814,  812,  812,  812,
-      814,  814,  814,  814,  814,  814,  812,  812,  812,  814,
-      814,  814,  814,  814,  814,  812,  812,  812,  812,  812,
-      814,  814,  814,  814,  814,  812,  812,  812,  812,  814,
-
-      814,  814,  812,  812,  814,  814,  812,  812,  812,  812,
-      812,    0,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812
-    } ;
-
-static yyconst flex_int16_t yy_nxt[1255] =
-    {   0,
-        8,    9,   10,    9,   11,    8,   12,   13,    8,    8,
-       14,   15,   16,   17,   18,   19,   20,   20,   20,   20,
-       20,   20,    8,   21,   22,   23,   24,   24,   24,   24,
-       24,   24,   24,   24,   24,   24,   24,   25,   24,   26,
-       27,   28,   29,   30,   31,   32,   33,   34,   24,   24,
-       35,   36,   37,   38,   39,   40,   41,   42,   43,   44,
-       45,   24,   24,   24,   46,   47,   58,  807,   58,   48,
-       49,   50,   51,   50,   49,   49,   49,   49,   49,   49,
-       49,   49,   49,   49,   52,   49,   53,   53,   53,   53,
-       53,   53,   54,   49,   49,   49,   55,   55,   55,   55,
-
-       55,   55,   55,   55,   55,   55,   55,   49,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   55,   49,   61,   64,  806,   66,   68,
-       68,   68,   68,   68,   68,   68,   79,   80,  812,   65,
-       67,   85,   62,   70,  150,   71,   71,   71,   71,   71,
-       71,   72,   82,   83,   86,   87,   90,  805,   91,  110,
-       73,   74,   92,  812,   93,   75,   76,  111,   94,  119,
-       88,   89,  121,   73,   74,   95,  122,   97,   96,  112,
-      160,   98,  160,  120,  151,  183,  184,   99,   75,  802,
-
-      123,   76,   70,  100,   77,   77,   77,   77,   77,   77,
-       77,  101,  231,  102,  124,  104,   58,  129,   58,   73,
-       74,  126,  103,  105,   78,  193,  106,  130,  232,  107,
-      195,  113,   73,   74,  114,  108,  194,  127,  115,  116,
-      128,  131,  138,  117,  196,  139,  118,   78,  132,  133,
-      160,  146,  160,  134,  140,  147,  154,  155,  142,  135,
-      136,  141,  137,  143,  152,  148,   58,  144,  153,  221,
-      145,  162,  162,  162,  162,  162,  162,  162,  164,  165,
-      167,  168,  213,  222,  239,  240,  248,  241,  218,  249,
-      214,  164,  165,  167,  168,  219,  242,  205,  156,  243,
-
-      206,  207,  154,  155,  208,  157,  209,  244,  152,  158,
-       58,  801,  153,  269,  159,   70,  800,   72,   72,   72,
-       72,   72,   72,   72,  154,  155,  263,  270,  258,  259,
-      169,  169,   73,   74,  170,  170,  170,  170,  170,  170,
-      170,  258,  259,  795,  156,   73,   74,  274,  275,  263,
-      333,  157,  305,  306,  307,  158,  340,  341,  342,  334,
-      159,  355,  356,  357,  576,  577,  156,  366,  367,  368,
-      374,  375,  376,  157,  378,  379,  380,  158,  389,  390,
-      391,  768,  159,  162,  162,  162,  162,  162,  162,  162,
-      256,  256,  655,  656,  257,  257,  257,  257,  257,  257,
-
-      257,  260,  260,  655,  656,  261,  261,  261,  261,  261,
-      261,  261,  170,  170,  170,  170,  170,  170,  170,  170,
-      170,  170,  170,  170,  170,  170,  257,  257,  257,  257,
-      257,  257,  257,  769,  794,  262,  257,  257,  257,  257,
-      257,  257,  257,  423,  424,  425,  793,  792,  262,  350,
-      350,  791,  165,  351,  351,  351,  351,  351,  351,  351,
-      454,  455,  456,  786,  785,  165,  261,  261,  261,  261,
-      261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
-      351,  351,  351,  351,  351,  351,  351,  784,  783,  168,
-      351,  351,  351,  351,  351,  351,  351,  444,  445,  446,
-
-      581,  782,  168,  457,  458,  459,  259,  781,  447,  448,
-      460,  461,  462,  499,  500,  501,  522,  523,  524,  259,
-      490,  546,  548,  780,  502,  503,  779,  525,  526,  547,
-      549,  561,  562,  563,  533,  534,  534,  534,  534,  534,
-      534,  622,  564,  565,  576,  577,  576,  577,  776,  775,
-      774,  768,  623,  655,  656,  596,  597,  598,  576,  577,
-      580,  580,  580,  580,  580,  580,  580,  599,  614,  615,
-      616,  798,  619,  620,  620,  620,  620,  620,  620,  579,
-      617,  576,  577,  753,  773,  638,  772,  771,  658,  770,
-      754,  576,  577,  639,  640,  578,  578,  578,  578,  578,
-
-      578,  641,  642,  769,  579,  580,  580,  580,  580,  580,
-      580,  580,  753,  658,  655,  656,  777,  787,  796,  754,
-      789,  655,  656,  799,  778,  788,  797,  790,  659,  659,
-      659,  659,  659,  659,  659,  657,  657,  657,  657,  657,
-      657,  655,  656,  787,  798,  789,  796,  767,  766,  765,
-      764,  788,  790,  763,  797,  659,  659,  659,  659,  659,
-      659,  659,  803,  808,  810,  808,  810,  762,  761,  760,
-      804,  809,  811,  809,  811,  759,  758,  757,  756,  755,
-      752,  751,  750,  749,  748,  747,  746,  745,  744,  743,
-      742,  741,  740,  739,  738,  737,  799,   56,   56,   56,
-
-       56,   56,   56,   56,   56,   84,   84,   84,   84,   84,
-      163,  163,  163,  163,  163,   68,   68,  166,  166,  171,
-      171,  171,  255,  255,  736,  255,  255,  255,  255,  255,
-      578,  578,  578,  735,  734,  733,  578,  621,  621,  621,
-      657,  657,  657,  732,  731,  730,  657,  688,  688,  688,
-      729,  728,  727,  726,  725,  724,  723,  722,  721,  720,
-      719,  718,  717,  716,  715,  714,  713,  712,  711,  710,
-      709,  708,  707,  706,  705,  704,  703,  702,  701,  700,
-      699,  698,  697,  696,  695,  694,  693,  692,  691,  690,
-      689,  687,  686,  685,  684,  683,  682,  681,  680,  679,
-
-      678,  677,  676,  675,  674,  673,  672,  671,  670,  669,
-      668,  667,  666,  665,  664,  663,  662,  661,  660,  654,
-      653,  652,  651,  650,  649,  648,  647,  646,  645,  644,
-      643,  637,  636,  635,  634,  633,  632,  631,  630,  629,
-      628,  627,  626,  625,  624,  618,  613,  612,  611,  610,
-      609,  608,  607,  606,  605,  604,  603,  602,  601,  600,
-      595,  594,  593,  592,  591,  590,  589,  588,  587,  586,
-      585,  584,  583,  582,  581,  575,  574,  573,  572,  571,
-      570,  569,  568,  567,  566,  560,  559,  558,  557,  556,
-      555,  554,  553,  552,  551,  550,  545,  544,  543,  542,
-
-      541,  540,  539,  538,  537,  536,  535,  532,  531,  530,
-      529,  528,  527,  521,  520,  519,  518,  517,  516,  515,
-      514,  513,  512,  511,  510,  509,  508,  507,  506,  505,
-      504,  498,  497,  496,  495,  494,  493,  492,  491,  490,
-      489,  488,  487,  486,  485,  484,  483,  482,  481,  480,
-      479,  478,  477,  476,  475,  474,  473,  472,  471,  470,
-      469,  468,  467,  466,  465,  464,  463,  453,  452,  451,
-      450,  449,  443,  442,  441,  440,  439,  438,  437,  436,
-      435,  434,  433,  432,  431,  430,  429,  428,  427,  426,
-      422,  421,  420,  419,  418,  417,  416,  415,  414,  413,
-
-      412,  411,  410,  409,  408,  407,  406,  405,  404,  403,
-      402,  401,  400,  399,  398,  397,  396,  395,  394,  393,
-      392,  388,  387,  386,  385,  384,  383,  382,  381,  377,
-      373,  372,  371,  370,  369,  365,  364,  363,  362,  361,
-      360,  359,  358,  354,  353,  352,  349,  348,  347,  346,
-      345,  344,  343,  339,  338,  337,  336,  335,  332,  331,
-      330,  329,  328,  327,  326,  325,  324,  323,  322,  321,
-      320,  319,  318,  317,  316,  315,  314,  313,  312,  311,
-      310,  309,  308,  304,  303,  302,  301,  300,  299,  298,
-      297,  296,  295,  294,  293,  292,  291,  290,  289,  288,
-
-      287,  286,  285,  284,  283,  282,  281,  280,  279,  278,
-      277,  276,  273,  272,  271,  268,  267,  266,  265,  264,
-      254,  253,  252,  251,  250,  247,  246,  245,  238,  237,
-      236,  235,  234,  233,  230,  229,  228,  227,  226,  225,
-      224,  223,  220,  217,  216,  215,  212,  211,  210,  204,
-      203,  202,  201,  200,  199,  198,  197,  192,  191,  190,
-      189,  188,  187,  186,  185,  182,  181,  180,  179,  178,
-      177,  176,  175,  174,  173,  172,  161,  149,  125,  109,
-       81,   69,   63,   60,   59,  812,   57,   57,    7,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812
-    } ;
-
-static yyconst flex_int16_t yy_chk[1255] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    2,    9,  803,    9,    2,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,   13,   15,  801,   16,   17,
-       17,   17,   17,   17,   17,   17,   21,   21,   71,   15,
-       16,   25,   13,   19,   46,   19,   19,   19,   19,   19,
-       19,   19,   23,   23,   25,   26,   27,  800,   27,   33,
-       19,   19,   27,   71,   28,   19,   19,   33,   28,   35,
-       26,   26,   36,   19,   19,   28,   36,   29,   28,   33,
-       50,   29,   50,   35,   46,   96,   96,   29,   19,  795,
-
-       37,   19,   20,   29,   20,   20,   20,   20,   20,   20,
-       20,   30,  135,   30,   37,   31,   58,   40,   58,   20,
-       20,   39,   30,   31,   20,  105,   31,   40,  135,   31,
-      106,   34,   20,   20,   34,   31,  105,   39,   34,   34,
-       39,   41,   42,   34,  106,   42,   34,   20,   41,   41,
-      160,   44,  160,   41,   42,   44,   48,   48,   43,   41,
-       41,   42,   41,   43,   47,   44,   47,   43,   47,  126,
-       43,   53,   53,   53,   53,   53,   53,   53,   68,   68,
-       70,   70,  120,  126,  142,  142,  148,  143,  124,  148,
-      120,   68,   68,   70,   70,  124,  143,  116,   48,  144,
-
-      116,  116,  153,  153,  116,   48,  116,  144,  152,   48,
-      152,  794,  152,  180,   48,   72,  793,   72,   72,   72,
-       72,   72,   72,   72,  154,  154,  171,  180,  166,  166,
-       73,   73,   72,   72,   73,   73,   73,   73,   73,   73,
-       73,  166,  166,  784,  153,   72,   72,  184,  184,  171,
-      241,  153,  215,  215,  215,  153,  247,  247,  247,  241,
-      153,  268,  268,  268,  621,  621,  154,  279,  279,  279,
-      288,  288,  288,  154,  292,  292,  292,  154,  301,  301,
-      301,  754,  154,  162,  162,  162,  162,  162,  162,  162,
-      164,  164,  655,  655,  164,  164,  164,  164,  164,  164,
-
-      164,  167,  167,  688,  688,  167,  167,  167,  167,  167,
-      167,  167,  169,  169,  169,  169,  169,  169,  169,  170,
-      170,  170,  170,  170,  170,  170,  256,  256,  256,  256,
-      256,  256,  256,  754,  783,  170,  257,  257,  257,  257,
-      257,  257,  257,  338,  338,  338,  782,  781,  170,  258,
-      258,  780,  257,  258,  258,  258,  258,  258,  258,  258,
-      393,  393,  393,  777,  776,  257,  260,  260,  260,  260,
-      260,  260,  260,  261,  261,  261,  261,  261,  261,  261,
-      350,  350,  350,  350,  350,  350,  350,  775,  774,  261,
-      351,  351,  351,  351,  351,  351,  351,  382,  382,  382,
-
-      581,  773,  261,  394,  394,  394,  351,  772,  382,  382,
-      395,  395,  395,  443,  443,  443,  483,  483,  483,  351,
-      490,  504,  505,  771,  443,  443,  770,  483,  483,  504,
-      505,  519,  519,  519,  490,  490,  490,  490,  490,  490,
-      490,  581,  519,  519,  533,  533,  534,  534,  765,  763,
-      762,  768,  581,  619,  619,  554,  554,  554,  576,  576,
-      534,  534,  534,  534,  534,  534,  534,  554,  573,  573,
-      573,  790,  576,  576,  576,  576,  576,  576,  576,  533,
-      573,  578,  578,  739,  760,  605,  757,  756,  619,  755,
-      739,  580,  580,  605,  606,  578,  578,  578,  578,  578,
-
-      578,  606,  606,  768,  533,  580,  580,  580,  580,  580,
-      580,  580,  753,  619,  620,  620,  769,  778,  786,  753,
-      779,  657,  657,  790,  769,  778,  786,  779,  620,  620,
-      620,  620,  620,  620,  620,  657,  657,  657,  657,  657,
-      657,  659,  659,  787,  798,  789,  796,  752,  751,  750,
-      749,  787,  789,  748,  796,  659,  659,  659,  659,  659,
-      659,  659,  799,  804,  807,  808,  810,  747,  746,  745,
-      799,  804,  807,  808,  810,  744,  743,  742,  741,  740,
-      738,  737,  734,  731,  730,  729,  728,  727,  725,  724,
-      722,  720,  717,  716,  714,  713,  798,  813,  813,  813,
-
-      813,  813,  813,  813,  813,  814,  814,  814,  814,  814,
-      815,  815,  815,  815,  815,  816,  816,  817,  817,  818,
-      818,  818,  819,  819,  711,  819,  819,  819,  819,  819,
-      820,  820,  820,  710,  709,  708,  820,  821,  821,  821,
-      822,  822,  822,  707,  706,  705,  822,  823,  823,  823,
-      704,  703,  702,  701,  699,  698,  697,  696,  695,  694,
-      692,  691,  690,  689,  687,  686,  685,  684,  683,  682,
-      681,  680,  679,  678,  677,  676,  675,  674,  673,  672,
-      671,  670,  668,  667,  666,  665,  664,  663,  662,  661,
-      660,  653,  651,  650,  648,  647,  646,  645,  644,  643,
-
-      642,  641,  640,  639,  638,  637,  636,  634,  633,  632,
-      631,  630,  629,  628,  626,  625,  624,  623,  622,  618,
-      617,  616,  615,  614,  613,  612,  611,  610,  609,  608,
-      607,  601,  599,  598,  597,  596,  592,  591,  590,  589,
-      588,  587,  586,  585,  584,  575,  571,  570,  568,  567,
-      565,  564,  563,  562,  561,  560,  559,  558,  557,  555,
-      553,  552,  551,  550,  549,  548,  547,  546,  545,  544,
-      542,  541,  537,  536,  535,  532,  531,  529,  528,  526,
-      525,  524,  523,  522,  520,  518,  517,  516,  515,  514,
-      513,  511,  510,  509,  508,  507,  503,  502,  501,  500,
-
-      499,  498,  495,  494,  493,  492,  491,  489,  488,  487,
-      486,  485,  484,  482,  481,  474,  473,  470,  469,  466,
-      465,  464,  463,  452,  451,  450,  448,  447,  446,  445,
-      444,  441,  439,  438,  437,  435,  434,  432,  431,  430,
-      429,  427,  426,  421,  420,  418,  417,  416,  415,  414,
-      413,  412,  411,  410,  409,  407,  406,  405,  404,  403,
-      402,  401,  400,  399,  398,  397,  396,  392,  388,  387,
-      386,  383,  381,  371,  369,  365,  364,  363,  362,  360,
-      358,  353,  352,  349,  348,  347,  346,  345,  344,  339,
-      337,  336,  335,  334,  333,  331,  330,  327,  326,  325,
-
-      324,  323,  322,  321,  320,  319,  318,  317,  316,  315,
-      314,  313,  312,  311,  310,  309,  308,  307,  306,  305,
-      302,  300,  299,  298,  297,  296,  295,  294,  293,  291,
-      287,  285,  284,  283,  282,  278,  277,  276,  275,  274,
-      273,  272,  271,  267,  265,  264,  254,  253,  252,  251,
-      250,  249,  248,  246,  245,  244,  243,  242,  240,  239,
-      238,  237,  236,  235,  234,  233,  232,  231,  230,  229,
-      228,  227,  226,  225,  224,  223,  222,  221,  220,  219,
-      218,  217,  216,  214,  213,  212,  211,  210,  209,  208,
-      207,  206,  205,  204,  203,  202,  201,  200,  199,  198,
-
-      196,  195,  194,  193,  192,  191,  190,  189,  188,  187,
-      186,  185,  183,  182,  181,  179,  178,  177,  176,  174,
-      159,  158,  157,  156,  149,  147,  146,  145,  141,  140,
-      139,  138,  137,  136,  134,  133,  132,  131,  130,  129,
-      128,  127,  125,  123,  122,  121,  119,  118,  117,  115,
-      114,  112,  111,  110,  109,  108,  107,  104,  103,  102,
-      101,  100,   99,   98,   97,   95,   94,   93,   92,   91,
-       90,   89,   88,   87,   83,   79,   52,   45,   38,   32,
-       22,   18,   14,   12,   11,    7,    6,    5,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
-      812,  812,  812,  812
-    } ;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "glsl_lexer.lpp"
-#line 2 "glsl_lexer.lpp"
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <ctype.h>
-#include "strtod.h"
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_parser.h"
-
-#define YY_USER_ACTION						\
-   do {								\
-      yylloc->source = 0;					\
-      yylloc->first_column = yycolumn + 1;			\
-      yylloc->first_line = yylineno + 1;			\
-      yycolumn += yyleng;					\
-   } while(0);
-
-#define YY_USER_INIT yylineno = 0; yycolumn = 0;
-
-#define IS_UINT (yytext[yyleng - 1] == 'u' || yytext[yyleng - 1] == 'U')
-
-/* A macro for handling reserved words and keywords across language versions.
- *
- * Certain words start out as identifiers, become reserved words in
- * later language revisions, and finally become language keywords.
- *
- * For example, consider the following lexer rule:
- * samplerBuffer       KEYWORD(130, 140, SAMPLERBUFFER)
- *
- * This means that "samplerBuffer" will be treated as:
- * - a keyword (SAMPLERBUFFER token)         ...in GLSL >= 1.40
- * - a reserved word - error                 ...in GLSL >= 1.30
- * - an identifier                           ...in GLSL <  1.30
- */
-#define KEYWORD(reserved_version, allowed_version, token)		\
-   do {									\
-      if (yyextra->language_version >= allowed_version) {		\
-	 return token;							\
-      } else if (yyextra->language_version >= reserved_version) {	\
-	 _mesa_glsl_error(yylloc, yyextra,				\
-			  "Illegal use of reserved word `%s'", yytext);	\
-	 return ERROR_TOK;						\
-      } else {								\
-	 yylval->identifier = strdup(yytext);				\
-	 return IDENTIFIER;						\
-      }									\
-   } while (0)
-
-/* The ES macro can be used in KEYWORD checks:
- *
- *    word      KEYWORD(110 || ES, 400, TOKEN)
- * ...means the word is reserved in GLSL ES 1.00, while
- *
- *    word      KEYWORD(110, 130 || ES, TOKEN)
- * ...means the word is a legal keyword in GLSL ES 1.00.
- */
-#define ES yyextra->es_shader
-
-#line 1059 "glsl_lexer.cpp"
-
-#define INITIAL 0
-#define PP 1
-#define PRAGMA 2
-
-#define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
-
-/* Holds the entire state of the reentrant scanner. */
-struct yyguts_t
-    {
-
-    /* User-defined. Not touched by flex. */
-    YY_EXTRA_TYPE yyextra_r;
-
-    /* The rest are the same as the globals declared in the non-reentrant scanner. */
-    FILE *yyin_r, *yyout_r;
-    size_t yy_buffer_stack_top; /**< index of top of stack. */
-    size_t yy_buffer_stack_max; /**< capacity of stack. */
-    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
-    char yy_hold_char;
-    int yy_n_chars;
-    int yyleng_r;
-    char *yy_c_buf_p;
-    int yy_init;
-    int yy_start;
-    int yy_did_buffer_switch_on_eof;
-    int yy_start_stack_ptr;
-    int yy_start_stack_depth;
-    int *yy_start_stack;
-    yy_state_type yy_last_accepting_state;
-    char* yy_last_accepting_cpos;
-
-    int yylineno_r;
-    int yy_flex_debug_r;
-
-    char *yytext_r;
-    int yy_more_flag;
-    int yy_more_len;
-
-    YYSTYPE * yylval_r;
-
-    YYLTYPE * yylloc_r;
-
-    }; /* end struct yyguts_t */
-
-static int yy_init_globals (yyscan_t yyscanner );
-
-    /* This must go here because YYSTYPE and YYLTYPE are included
-     * from bison output in section 1.*/
-    #    define yylval yyg->yylval_r
-    
-    #    define yylloc yyg->yylloc_r
-    
-int _mesa_glsl_lex_init (yyscan_t* scanner);
-
-int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int _mesa_glsl_lex_destroy (yyscan_t yyscanner );
-
-int _mesa_glsl_get_debug (yyscan_t yyscanner );
-
-void _mesa_glsl_set_debug (int debug_flag ,yyscan_t yyscanner );
-
-YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner );
-
-void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-
-FILE *_mesa_glsl_get_in (yyscan_t yyscanner );
-
-void _mesa_glsl_set_in  (FILE * in_str ,yyscan_t yyscanner );
-
-FILE *_mesa_glsl_get_out (yyscan_t yyscanner );
-
-void _mesa_glsl_set_out  (FILE * out_str ,yyscan_t yyscanner );
-
-int _mesa_glsl_get_leng (yyscan_t yyscanner );
-
-char *_mesa_glsl_get_text (yyscan_t yyscanner );
-
-int _mesa_glsl_get_lineno (yyscan_t yyscanner );
-
-void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner );
-
-YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner );
-
-void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
-
-       YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner );
-    
-        void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-    
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner );
-#else
-extern int _mesa_glsl_wrap (yyscan_t yyscanner );
-#endif
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
-#else
-static int input (yyscan_t yyscanner );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		unsigned n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int _mesa_glsl_lex \
-               (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-
-#define YY_DECL int _mesa_glsl_lex \
-               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 95 "glsl_lexer.lpp"
-
-
-#line 1296 "glsl_lexer.cpp"
-
-    yylval = yylval_param;
-
-    yylloc = yylloc_param;
-
-	if ( !yyg->yy_init )
-		{
-		yyg->yy_init = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yyg->yy_start )
-			yyg->yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			_mesa_glsl_ensure_buffer_stack (yyscanner);
-			YY_CURRENT_BUFFER_LVALUE =
-				_mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-		}
-
-		_mesa_glsl__load_buffer_state(yyscanner );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yyg->yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yyg->yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yyg->yy_start;
-		yy_current_state += YY_AT_BOL();
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yyg->yy_last_accepting_state = yy_current_state;
-				yyg->yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 813 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_current_state != 812 );
-		yy_cp = yyg->yy_last_accepting_cpos;
-		yy_current_state = yyg->yy_last_accepting_state;
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-
-		YY_DO_BEFORE_ACTION;
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yyg->yy_hold_char;
-			yy_cp = yyg->yy_last_accepting_cpos;
-			yy_current_state = yyg->yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 97 "glsl_lexer.lpp"
-;
-	YY_BREAK
-/* Preprocessor tokens. */ 
-case 2:
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 100 "glsl_lexer.lpp"
-;
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 101 "glsl_lexer.lpp"
-{ BEGIN PP; return VERSION; }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 102 "glsl_lexer.lpp"
-{ BEGIN PP; return EXTENSION; }
-	YY_BREAK
-case 5:
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 103 "glsl_lexer.lpp"
-{
-				   /* Eat characters until the first digit is
-				    * encountered
-				    */
-				   char *ptr = yytext;
-				   while (!isdigit(*ptr))
-				      ptr++;
-
-				   /* Subtract one from the line number because
-				    * yylineno is zero-based instead of
-				    * one-based.
-				    */
-				   yylineno = strtol(ptr, &ptr, 0) - 1;
-				   yylloc->source = strtol(ptr, NULL, 0);
-				}
-	YY_BREAK
-case 6:
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 118 "glsl_lexer.lpp"
-{
-				   /* Eat characters until the first digit is
-				    * encountered
-				    */
-				   char *ptr = yytext;
-				   while (!isdigit(*ptr))
-				      ptr++;
-
-				   /* Subtract one from the line number because
-				    * yylineno is zero-based instead of
-				    * one-based.
-				    */
-				   yylineno = strtol(ptr, &ptr, 0) - 1;
-				}
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 132 "glsl_lexer.lpp"
-{
-				  BEGIN PP;
-				  return PRAGMA_DEBUG_ON;
-				}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 136 "glsl_lexer.lpp"
-{
-				  BEGIN PP;
-				  return PRAGMA_DEBUG_OFF;
-				}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 140 "glsl_lexer.lpp"
-{
-				  BEGIN PP;
-				  return PRAGMA_OPTIMIZE_ON;
-				}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 144 "glsl_lexer.lpp"
-{
-				  BEGIN PP;
-				  return PRAGMA_OPTIMIZE_OFF;
-				}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 148 "glsl_lexer.lpp"
-{ BEGIN PRAGMA; }
-	YY_BREAK
-case 12:
-/* rule 12 can match eol */
-YY_RULE_SETUP
-#line 150 "glsl_lexer.lpp"
-{ BEGIN 0; yylineno++; yycolumn = 0; }
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 151 "glsl_lexer.lpp"
-{ }
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 153 "glsl_lexer.lpp"
-{ }
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 154 "glsl_lexer.lpp"
-{ }
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 155 "glsl_lexer.lpp"
-return COLON;
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 156 "glsl_lexer.lpp"
-{
-				   yylval->identifier = strdup(yytext);
-				   return IDENTIFIER;
-				}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 160 "glsl_lexer.lpp"
-{
-				    yylval->n = strtol(yytext, NULL, 10);
-				    return INTCONSTANT;
-				}
-	YY_BREAK
-case 19:
-/* rule 19 can match eol */
-YY_RULE_SETUP
-#line 164 "glsl_lexer.lpp"
-{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
-	YY_BREAK
-case 20:
-/* rule 20 can match eol */
-YY_RULE_SETUP
-#line 166 "glsl_lexer.lpp"
-{ yylineno++; yycolumn = 0; }
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 168 "glsl_lexer.lpp"
-return ATTRIBUTE;
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 169 "glsl_lexer.lpp"
-return CONST_TOK;
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 170 "glsl_lexer.lpp"
-return BOOL_TOK;
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 171 "glsl_lexer.lpp"
-return FLOAT_TOK;
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 172 "glsl_lexer.lpp"
-return INT_TOK;
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 173 "glsl_lexer.lpp"
-KEYWORD(130, 130, UINT_TOK);
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 175 "glsl_lexer.lpp"
-return BREAK;
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 176 "glsl_lexer.lpp"
-return CONTINUE;
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 177 "glsl_lexer.lpp"
-return DO;
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 178 "glsl_lexer.lpp"
-return WHILE;
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 179 "glsl_lexer.lpp"
-return ELSE;
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 180 "glsl_lexer.lpp"
-return FOR;
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 181 "glsl_lexer.lpp"
-return IF;
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 182 "glsl_lexer.lpp"
-return DISCARD;
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 183 "glsl_lexer.lpp"
-return RETURN;
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 185 "glsl_lexer.lpp"
-return BVEC2;
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 186 "glsl_lexer.lpp"
-return BVEC3;
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 187 "glsl_lexer.lpp"
-return BVEC4;
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 188 "glsl_lexer.lpp"
-return IVEC2;
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 189 "glsl_lexer.lpp"
-return IVEC3;
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 190 "glsl_lexer.lpp"
-return IVEC4;
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 191 "glsl_lexer.lpp"
-KEYWORD(130, 130, UVEC2);
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 192 "glsl_lexer.lpp"
-KEYWORD(130, 130, UVEC3);
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 193 "glsl_lexer.lpp"
-KEYWORD(130, 130, UVEC4);
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 194 "glsl_lexer.lpp"
-return VEC2;
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 195 "glsl_lexer.lpp"
-return VEC3;
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 196 "glsl_lexer.lpp"
-return VEC4;
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 197 "glsl_lexer.lpp"
-return MAT2X2;
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 198 "glsl_lexer.lpp"
-return MAT3X3;
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 199 "glsl_lexer.lpp"
-return MAT4X4;
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 200 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT2X2);
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 201 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT2X3);
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 202 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT2X4);
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 203 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT3X2);
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 204 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT3X3);
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 205 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT3X4);
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 206 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT4X2);
-	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 207 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT4X3);
-	YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 208 "glsl_lexer.lpp"
-KEYWORD(120, 120, MAT4X4);
-	YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 210 "glsl_lexer.lpp"
-return IN_TOK;
-	YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 211 "glsl_lexer.lpp"
-return OUT_TOK;
-	YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 212 "glsl_lexer.lpp"
-return INOUT_TOK;
-	YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 213 "glsl_lexer.lpp"
-return UNIFORM;
-	YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 214 "glsl_lexer.lpp"
-return VARYING;
-	YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 215 "glsl_lexer.lpp"
-KEYWORD(120, 120, CENTROID);
-	YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 216 "glsl_lexer.lpp"
-KEYWORD(120 || ES, 120 || ES, INVARIANT);
-	YY_BREAK
-case 67:
-YY_RULE_SETUP
-#line 217 "glsl_lexer.lpp"
-KEYWORD(130 || ES, 130, FLAT);
-	YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 218 "glsl_lexer.lpp"
-KEYWORD(130, 130, SMOOTH);
-	YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 219 "glsl_lexer.lpp"
-KEYWORD(130, 130, NOPERSPECTIVE);
-	YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 221 "glsl_lexer.lpp"
-return SAMPLER1D;
-	YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 222 "glsl_lexer.lpp"
-return SAMPLER2D;
-	YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 223 "glsl_lexer.lpp"
-return SAMPLER3D;
-	YY_BREAK
-case 73:
-YY_RULE_SETUP
-#line 224 "glsl_lexer.lpp"
-return SAMPLERCUBE;
-	YY_BREAK
-case 74:
-YY_RULE_SETUP
-#line 225 "glsl_lexer.lpp"
-KEYWORD(130, 130, SAMPLER1DARRAY);
-	YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 226 "glsl_lexer.lpp"
-KEYWORD(130, 130, SAMPLER2DARRAY);
-	YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 227 "glsl_lexer.lpp"
-return SAMPLER1DSHADOW;
-	YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 228 "glsl_lexer.lpp"
-return SAMPLER2DSHADOW;
-	YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 229 "glsl_lexer.lpp"
-KEYWORD(130, 130, SAMPLERCUBESHADOW);
-	YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 230 "glsl_lexer.lpp"
-KEYWORD(130, 130, SAMPLER1DARRAYSHADOW);
-	YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 231 "glsl_lexer.lpp"
-KEYWORD(130, 130, SAMPLER2DARRAYSHADOW);
-	YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 232 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLER1D);
-	YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 233 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLER2D);
-	YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 234 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLER3D);
-	YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 235 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLERCUBE);
-	YY_BREAK
-case 85:
-YY_RULE_SETUP
-#line 236 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLER1DARRAY);
-	YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 237 "glsl_lexer.lpp"
-KEYWORD(130, 130, ISAMPLER2DARRAY);
-	YY_BREAK
-case 87:
-YY_RULE_SETUP
-#line 238 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLER1D);
-	YY_BREAK
-case 88:
-YY_RULE_SETUP
-#line 239 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLER2D);
-	YY_BREAK
-case 89:
-YY_RULE_SETUP
-#line 240 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLER3D);
-	YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 241 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLERCUBE);
-	YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 242 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLER1DARRAY);
-	YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 243 "glsl_lexer.lpp"
-KEYWORD(130, 130, USAMPLER2DARRAY);
-	YY_BREAK
-case 93:
-YY_RULE_SETUP
-#line 246 "glsl_lexer.lpp"
-return STRUCT;
-	YY_BREAK
-case 94:
-YY_RULE_SETUP
-#line 247 "glsl_lexer.lpp"
-return VOID_TOK;
-	YY_BREAK
-case 95:
-YY_RULE_SETUP
-#line 249 "glsl_lexer.lpp"
-{
-		  if ((yyextra->language_version >= 140)
-		      || yyextra->ARB_explicit_attrib_location_enable
-		      || (yyextra->ARB_fragment_coord_conventions_enable)){
-		      return LAYOUT_TOK;
-		   } else {
-		      yylval->identifier = strdup(yytext);
-		      return IDENTIFIER;
-		   }
-		}
-	YY_BREAK
-case 96:
-YY_RULE_SETUP
-#line 260 "glsl_lexer.lpp"
-return INC_OP;
-	YY_BREAK
-case 97:
-YY_RULE_SETUP
-#line 261 "glsl_lexer.lpp"
-return DEC_OP;
-	YY_BREAK
-case 98:
-YY_RULE_SETUP
-#line 262 "glsl_lexer.lpp"
-return LE_OP;
-	YY_BREAK
-case 99:
-YY_RULE_SETUP
-#line 263 "glsl_lexer.lpp"
-return GE_OP;
-	YY_BREAK
-case 100:
-YY_RULE_SETUP
-#line 264 "glsl_lexer.lpp"
-return EQ_OP;
-	YY_BREAK
-case 101:
-YY_RULE_SETUP
-#line 265 "glsl_lexer.lpp"
-return NE_OP;
-	YY_BREAK
-case 102:
-YY_RULE_SETUP
-#line 266 "glsl_lexer.lpp"
-return AND_OP;
-	YY_BREAK
-case 103:
-YY_RULE_SETUP
-#line 267 "glsl_lexer.lpp"
-return OR_OP;
-	YY_BREAK
-case 104:
-YY_RULE_SETUP
-#line 268 "glsl_lexer.lpp"
-return XOR_OP;
-	YY_BREAK
-case 105:
-YY_RULE_SETUP
-#line 269 "glsl_lexer.lpp"
-return LEFT_OP;
-	YY_BREAK
-case 106:
-YY_RULE_SETUP
-#line 270 "glsl_lexer.lpp"
-return RIGHT_OP;
-	YY_BREAK
-case 107:
-YY_RULE_SETUP
-#line 272 "glsl_lexer.lpp"
-return MUL_ASSIGN;
-	YY_BREAK
-case 108:
-YY_RULE_SETUP
-#line 273 "glsl_lexer.lpp"
-return DIV_ASSIGN;
-	YY_BREAK
-case 109:
-YY_RULE_SETUP
-#line 274 "glsl_lexer.lpp"
-return ADD_ASSIGN;
-	YY_BREAK
-case 110:
-YY_RULE_SETUP
-#line 275 "glsl_lexer.lpp"
-return MOD_ASSIGN;
-	YY_BREAK
-case 111:
-YY_RULE_SETUP
-#line 276 "glsl_lexer.lpp"
-return LEFT_ASSIGN;
-	YY_BREAK
-case 112:
-YY_RULE_SETUP
-#line 277 "glsl_lexer.lpp"
-return RIGHT_ASSIGN;
-	YY_BREAK
-case 113:
-YY_RULE_SETUP
-#line 278 "glsl_lexer.lpp"
-return AND_ASSIGN;
-	YY_BREAK
-case 114:
-YY_RULE_SETUP
-#line 279 "glsl_lexer.lpp"
-return XOR_ASSIGN;
-	YY_BREAK
-case 115:
-YY_RULE_SETUP
-#line 280 "glsl_lexer.lpp"
-return OR_ASSIGN;
-	YY_BREAK
-case 116:
-YY_RULE_SETUP
-#line 281 "glsl_lexer.lpp"
-return SUB_ASSIGN;
-	YY_BREAK
-case 117:
-YY_RULE_SETUP
-#line 283 "glsl_lexer.lpp"
-{
-			    yylval->n = strtol(yytext, NULL, 10);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-	YY_BREAK
-case 118:
-YY_RULE_SETUP
-#line 287 "glsl_lexer.lpp"
-{
-			    yylval->n = strtol(yytext + 2, NULL, 16);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-	YY_BREAK
-case 119:
-YY_RULE_SETUP
-#line 291 "glsl_lexer.lpp"
-{
-			    yylval->n = strtol(yytext, NULL, 8);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-	YY_BREAK
-case 120:
-YY_RULE_SETUP
-#line 296 "glsl_lexer.lpp"
-{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-	YY_BREAK
-case 121:
-YY_RULE_SETUP
-#line 300 "glsl_lexer.lpp"
-{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-	YY_BREAK
-case 122:
-YY_RULE_SETUP
-#line 304 "glsl_lexer.lpp"
-{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-	YY_BREAK
-case 123:
-YY_RULE_SETUP
-#line 308 "glsl_lexer.lpp"
-{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-	YY_BREAK
-case 124:
-YY_RULE_SETUP
-#line 312 "glsl_lexer.lpp"
-{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-	YY_BREAK
-case 125:
-YY_RULE_SETUP
-#line 317 "glsl_lexer.lpp"
-{
-			    yylval->n = 1;
-			    return BOOLCONSTANT;
-			}
-	YY_BREAK
-case 126:
-YY_RULE_SETUP
-#line 321 "glsl_lexer.lpp"
-{
-			    yylval->n = 0;
-			    return BOOLCONSTANT;
-			}
-	YY_BREAK
-/* Reserved words in GLSL 1.10. */
-case 127:
-YY_RULE_SETUP
-#line 328 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, ASM);
-	YY_BREAK
-case 128:
-YY_RULE_SETUP
-#line 329 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, CLASS);
-	YY_BREAK
-case 129:
-YY_RULE_SETUP
-#line 330 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, UNION);
-	YY_BREAK
-case 130:
-YY_RULE_SETUP
-#line 331 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, ENUM);
-	YY_BREAK
-case 131:
-YY_RULE_SETUP
-#line 332 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, TYPEDEF);
-	YY_BREAK
-case 132:
-YY_RULE_SETUP
-#line 333 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, TEMPLATE);
-	YY_BREAK
-case 133:
-YY_RULE_SETUP
-#line 334 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, THIS);
-	YY_BREAK
-case 134:
-YY_RULE_SETUP
-#line 335 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, PACKED_TOK);
-	YY_BREAK
-case 135:
-YY_RULE_SETUP
-#line 336 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, GOTO);
-	YY_BREAK
-case 136:
-YY_RULE_SETUP
-#line 337 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 130, SWITCH);
-	YY_BREAK
-case 137:
-YY_RULE_SETUP
-#line 338 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 130, DEFAULT);
-	YY_BREAK
-case 138:
-YY_RULE_SETUP
-#line 339 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, INLINE_TOK);
-	YY_BREAK
-case 139:
-YY_RULE_SETUP
-#line 340 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, NOINLINE);
-	YY_BREAK
-case 140:
-YY_RULE_SETUP
-#line 341 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, VOLATILE);
-	YY_BREAK
-case 141:
-YY_RULE_SETUP
-#line 342 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, PUBLIC_TOK);
-	YY_BREAK
-case 142:
-YY_RULE_SETUP
-#line 343 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, STATIC);
-	YY_BREAK
-case 143:
-YY_RULE_SETUP
-#line 344 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, EXTERN);
-	YY_BREAK
-case 144:
-YY_RULE_SETUP
-#line 345 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, EXTERNAL);
-	YY_BREAK
-case 145:
-YY_RULE_SETUP
-#line 346 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, INTERFACE);
-	YY_BREAK
-case 146:
-YY_RULE_SETUP
-#line 347 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, LONG_TOK);
-	YY_BREAK
-case 147:
-YY_RULE_SETUP
-#line 348 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, SHORT_TOK);
-	YY_BREAK
-case 148:
-YY_RULE_SETUP
-#line 349 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 400, DOUBLE_TOK);
-	YY_BREAK
-case 149:
-YY_RULE_SETUP
-#line 350 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, HALF);
-	YY_BREAK
-case 150:
-YY_RULE_SETUP
-#line 351 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, FIXED_TOK);
-	YY_BREAK
-case 151:
-YY_RULE_SETUP
-#line 352 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, UNSIGNED);
-	YY_BREAK
-case 152:
-YY_RULE_SETUP
-#line 353 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, INPUT_TOK);
-	YY_BREAK
-case 153:
-YY_RULE_SETUP
-#line 354 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, OUTPUT);
-	YY_BREAK
-case 154:
-YY_RULE_SETUP
-#line 355 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, HVEC2);
-	YY_BREAK
-case 155:
-YY_RULE_SETUP
-#line 356 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, HVEC3);
-	YY_BREAK
-case 156:
-YY_RULE_SETUP
-#line 357 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, HVEC4);
-	YY_BREAK
-case 157:
-YY_RULE_SETUP
-#line 358 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 400, DVEC2);
-	YY_BREAK
-case 158:
-YY_RULE_SETUP
-#line 359 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 400, DVEC3);
-	YY_BREAK
-case 159:
-YY_RULE_SETUP
-#line 360 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 400, DVEC4);
-	YY_BREAK
-case 160:
-YY_RULE_SETUP
-#line 361 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, FVEC2);
-	YY_BREAK
-case 161:
-YY_RULE_SETUP
-#line 362 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, FVEC3);
-	YY_BREAK
-case 162:
-YY_RULE_SETUP
-#line 363 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, FVEC4);
-	YY_BREAK
-case 163:
-YY_RULE_SETUP
-#line 364 "glsl_lexer.lpp"
-return SAMPLER2DRECT;
-	YY_BREAK
-case 164:
-YY_RULE_SETUP
-#line 365 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, SAMPLER3DRECT);
-	YY_BREAK
-case 165:
-YY_RULE_SETUP
-#line 366 "glsl_lexer.lpp"
-return SAMPLER2DRECTSHADOW;
-	YY_BREAK
-case 166:
-YY_RULE_SETUP
-#line 367 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, SIZEOF);
-	YY_BREAK
-case 167:
-YY_RULE_SETUP
-#line 368 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, CAST);
-	YY_BREAK
-case 168:
-YY_RULE_SETUP
-#line 369 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, NAMESPACE);
-	YY_BREAK
-case 169:
-YY_RULE_SETUP
-#line 370 "glsl_lexer.lpp"
-KEYWORD(110 || ES, 999, USING);
-	YY_BREAK
-/* Additional reserved words in GLSL 1.20. */
-case 170:
-YY_RULE_SETUP
-#line 373 "glsl_lexer.lpp"
-KEYWORD(120, 130 || ES, LOWP);
-	YY_BREAK
-case 171:
-YY_RULE_SETUP
-#line 374 "glsl_lexer.lpp"
-KEYWORD(120, 130 || ES, MEDIUMP);
-	YY_BREAK
-case 172:
-YY_RULE_SETUP
-#line 375 "glsl_lexer.lpp"
-KEYWORD(120, 130 || ES, HIGHP);
-	YY_BREAK
-case 173:
-YY_RULE_SETUP
-#line 376 "glsl_lexer.lpp"
-KEYWORD(120, 130 || ES, PRECISION);
-	YY_BREAK
-/* Additional reserved words in GLSL 1.30. */
-case 174:
-YY_RULE_SETUP
-#line 379 "glsl_lexer.lpp"
-KEYWORD(130, 130, CASE);
-	YY_BREAK
-case 175:
-YY_RULE_SETUP
-#line 380 "glsl_lexer.lpp"
-KEYWORD(130, 999, COMMON);
-	YY_BREAK
-case 176:
-YY_RULE_SETUP
-#line 381 "glsl_lexer.lpp"
-KEYWORD(130, 999, PARTITION);
-	YY_BREAK
-case 177:
-YY_RULE_SETUP
-#line 382 "glsl_lexer.lpp"
-KEYWORD(130, 999, ACTIVE);
-	YY_BREAK
-case 178:
-YY_RULE_SETUP
-#line 383 "glsl_lexer.lpp"
-KEYWORD(130 || ES, 999, SUPERP);
-	YY_BREAK
-case 179:
-YY_RULE_SETUP
-#line 384 "glsl_lexer.lpp"
-KEYWORD(130, 140, SAMPLERBUFFER);
-	YY_BREAK
-case 180:
-YY_RULE_SETUP
-#line 385 "glsl_lexer.lpp"
-KEYWORD(130, 999, FILTER);
-	YY_BREAK
-case 181:
-YY_RULE_SETUP
-#line 386 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE1D);
-	YY_BREAK
-case 182:
-YY_RULE_SETUP
-#line 387 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE2D);
-	YY_BREAK
-case 183:
-YY_RULE_SETUP
-#line 388 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE3D);
-	YY_BREAK
-case 184:
-YY_RULE_SETUP
-#line 389 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGECUBE);
-	YY_BREAK
-case 185:
-YY_RULE_SETUP
-#line 390 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGE1D);
-	YY_BREAK
-case 186:
-YY_RULE_SETUP
-#line 391 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGE2D);
-	YY_BREAK
-case 187:
-YY_RULE_SETUP
-#line 392 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGE3D);
-	YY_BREAK
-case 188:
-YY_RULE_SETUP
-#line 393 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGECUBE);
-	YY_BREAK
-case 189:
-YY_RULE_SETUP
-#line 394 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGE1D);
-	YY_BREAK
-case 190:
-YY_RULE_SETUP
-#line 395 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGE2D);
-	YY_BREAK
-case 191:
-YY_RULE_SETUP
-#line 396 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGE3D);
-	YY_BREAK
-case 192:
-YY_RULE_SETUP
-#line 397 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGECUBE);
-	YY_BREAK
-case 193:
-YY_RULE_SETUP
-#line 398 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE1DARRAY);
-	YY_BREAK
-case 194:
-YY_RULE_SETUP
-#line 399 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE2DARRAY);
-	YY_BREAK
-case 195:
-YY_RULE_SETUP
-#line 400 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGE1DARRAY);
-	YY_BREAK
-case 196:
-YY_RULE_SETUP
-#line 401 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGE2DARRAY);
-	YY_BREAK
-case 197:
-YY_RULE_SETUP
-#line 402 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGE1DARRAY);
-	YY_BREAK
-case 198:
-YY_RULE_SETUP
-#line 403 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGE2DARRAY);
-	YY_BREAK
-case 199:
-YY_RULE_SETUP
-#line 404 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE1DSHADOW);
-	YY_BREAK
-case 200:
-YY_RULE_SETUP
-#line 405 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE2DSHADOW);
-	YY_BREAK
-case 201:
-YY_RULE_SETUP
-#line 406 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE1DARRAYSHADOW);
-	YY_BREAK
-case 202:
-YY_RULE_SETUP
-#line 407 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
-	YY_BREAK
-case 203:
-YY_RULE_SETUP
-#line 408 "glsl_lexer.lpp"
-KEYWORD(130, 999, IMAGEBUFFER);
-	YY_BREAK
-case 204:
-YY_RULE_SETUP
-#line 409 "glsl_lexer.lpp"
-KEYWORD(130, 999, IIMAGEBUFFER);
-	YY_BREAK
-case 205:
-YY_RULE_SETUP
-#line 410 "glsl_lexer.lpp"
-KEYWORD(130, 999, UIMAGEBUFFER);
-	YY_BREAK
-case 206:
-YY_RULE_SETUP
-#line 411 "glsl_lexer.lpp"
-KEYWORD(130, 999, ROW_MAJOR);
-	YY_BREAK
-case 207:
-YY_RULE_SETUP
-#line 413 "glsl_lexer.lpp"
-{
-			    struct _mesa_glsl_parse_state *state = yyextra;
-			    void *ctx = state;	
-			    yylval->identifier = hieralloc_strdup(ctx, yytext);
-			    return IDENTIFIER;
-			}
-	YY_BREAK
-case 208:
-YY_RULE_SETUP
-#line 420 "glsl_lexer.lpp"
-{ return yytext[0]; }
-	YY_BREAK
-case 209:
-YY_RULE_SETUP
-#line 422 "glsl_lexer.lpp"
-ECHO;
-	YY_BREAK
-#line 2530 "glsl_lexer.cpp"
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(PP):
-case YY_STATE_EOF(PRAGMA):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yyg->yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * _mesa_glsl_lex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state( yyscanner );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
-
-			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yyg->yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yyg->yy_last_accepting_cpos;
-				yy_current_state = yyg->yy_last_accepting_state;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer( yyscanner ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yyg->yy_did_buffer_switch_on_eof = 0;
-
-				if ( _mesa_glsl_wrap(yyscanner ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yyg->yy_c_buf_p =
-					yyg->yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yyg->yy_c_buf_p =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-} /* end of _mesa_glsl_lex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = yyg->yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
-			int yy_c_buf_p_offset =
-				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					_mesa_glsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-						number_to_move - 1;
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			yyg->yy_n_chars, (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	if ( yyg->yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			_mesa_glsl_restart(yyin  ,yyscanner);
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	yyg->yy_n_chars += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	yy_current_state = yyg->yy_start;
-	yy_current_state += YY_AT_BOL();
-
-	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yyg->yy_last_accepting_state = yy_current_state;
-			yyg->yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 813 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
-{
-	register int yy_is_jam;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
-	register char *yy_cp = yyg->yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yyg->yy_last_accepting_state = yy_current_state;
-		yyg->yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 813 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 812);
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (yyscan_t yyscanner)
-#else
-    static int input  (yyscan_t yyscanner)
-#endif
-
-{
-	int c;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	*yyg->yy_c_buf_p = yyg->yy_hold_char;
-
-	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			/* This was really a NUL. */
-			*yyg->yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
-			++yyg->yy_c_buf_p;
-
-			switch ( yy_get_next_buffer( yyscanner ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					_mesa_glsl_restart(yyin ,yyscanner);
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( _mesa_glsl_wrap(yyscanner ) )
-						return EOF;
-
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput(yyscanner);
-#else
-					return input(yyscanner);
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
-	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
-	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
-
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * @param yyscanner The scanner object.
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void _mesa_glsl_restart  (FILE * input_file , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! YY_CURRENT_BUFFER ){
-        _mesa_glsl_ensure_buffer_stack (yyscanner);
-		YY_CURRENT_BUFFER_LVALUE =
-            _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-	}
-
-	_mesa_glsl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
-	_mesa_glsl__load_buffer_state(yyscanner );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * @param yyscanner The scanner object.
- */
-    void _mesa_glsl__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		_mesa_glsl_pop_buffer_state();
-	 *		_mesa_glsl_push_buffer_state(new_buffer);
-     */
-	_mesa_glsl_ensure_buffer_stack (yyscanner);
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	_mesa_glsl__load_buffer_state(yyscanner );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (_mesa_glsl_wrap()) processing, but the only time this flag
-	 * is looked at is after _mesa_glsl_wrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-static void _mesa_glsl__load_buffer_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	yyg->yy_hold_char = *yyg->yy_c_buf_p;
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * @param yyscanner The scanner object.
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE _mesa_glsl__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) _mesa_glsl_alloc(b->yy_buf_size + 2 ,yyscanner );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	_mesa_glsl__init_buffer(b,file ,yyscanner);
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with _mesa_glsl__create_buffer()
- * @param yyscanner The scanner object.
- */
-    void _mesa_glsl__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		_mesa_glsl_free((void *) b->yy_ch_buf ,yyscanner );
-
-	_mesa_glsl_free((void *) b ,yyscanner );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a _mesa_glsl_restart() or at EOF.
- */
-    static void _mesa_glsl__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
-
-{
-	int oerrno = errno;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	_mesa_glsl__flush_buffer(b ,yyscanner);
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then _mesa_glsl__init_buffer was _probably_
-     * called from _mesa_glsl_restart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * @param yyscanner The scanner object.
- */
-    void _mesa_glsl__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		_mesa_glsl__load_buffer_state(yyscanner );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  @param yyscanner The scanner object.
- */
-void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (new_buffer == NULL)
-		return;
-
-	_mesa_glsl_ensure_buffer_stack(yyscanner);
-
-	/* This block is copied from _mesa_glsl__switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		yyg->yy_buffer_stack_top++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from _mesa_glsl__switch_to_buffer. */
-	_mesa_glsl__load_buffer_state(yyscanner );
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  @param yyscanner The scanner object.
- */
-void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (!YY_CURRENT_BUFFER)
-		return;
-
-	_mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if (yyg->yy_buffer_stack_top > 0)
-		--yyg->yy_buffer_stack_top;
-
-	if (YY_CURRENT_BUFFER) {
-		_mesa_glsl__load_buffer_state(yyscanner );
-		yyg->yy_did_buffer_switch_on_eof = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
-{
-	int num_to_alloc;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if (!yyg->yy_buffer_stack) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_alloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" );
-								  
-		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		yyg->yy_buffer_stack_max = num_to_alloc;
-		yyg->yy_buffer_stack_top = 0;
-		return;
-	}
-
-	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_realloc
-								(yyg->yy_buffer_stack,
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
-		yyg->yy_buffer_stack_max = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE _mesa_glsl__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	_mesa_glsl__switch_to_buffer(b ,yyscanner );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       _mesa_glsl__scan_bytes() instead.
- */
-YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner)
-{
-    
-	return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner);
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE _mesa_glsl__scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) _mesa_glsl_alloc(n ,yyscanner );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = _mesa_glsl__scan_buffer(buf,n ,yyscanner);
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = yyg->yy_hold_char; \
-		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
-		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
-		*yyg->yy_c_buf_p = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the user-defined data for this scanner.
- * @param yyscanner The scanner object.
- */
-YY_EXTRA_TYPE _mesa_glsl_get_extra  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyextra;
-}
-
-/** Get the current line number.
- * @param yyscanner The scanner object.
- */
-int _mesa_glsl_get_lineno  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yylineno;
-}
-
-/** Get the current column number.
- * @param yyscanner The scanner object.
- */
-int _mesa_glsl_get_column  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yycolumn;
-}
-
-/** Get the input stream.
- * @param yyscanner The scanner object.
- */
-FILE *_mesa_glsl_get_in  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyin;
-}
-
-/** Get the output stream.
- * @param yyscanner The scanner object.
- */
-FILE *_mesa_glsl_get_out  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyout;
-}
-
-/** Get the length of the current token.
- * @param yyscanner The scanner object.
- */
-int _mesa_glsl_get_leng  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyleng;
-}
-
-/** Get the current token.
- * @param yyscanner The scanner object.
- */
-
-char *_mesa_glsl_get_text  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yytext;
-}
-
-/** Set the user-defined data. This data is never touched by the scanner.
- * @param user_defined The data to be associated with this scanner.
- * @param yyscanner The scanner object.
- */
-void _mesa_glsl_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyextra = user_defined ;
-}
-
-/** Set the current line number.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void _mesa_glsl_set_lineno (int  line_number , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* lineno is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner); 
-    
-    yylineno = line_number;
-}
-
-/** Set the current column.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void _mesa_glsl_set_column (int  column_no , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* column is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner); 
-    
-    yycolumn = column_no;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * @param yyscanner The scanner object.
- * @see _mesa_glsl__switch_to_buffer
- */
-void _mesa_glsl_set_in (FILE *  in_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyin = in_str ;
-}
-
-void _mesa_glsl_set_out (FILE *  out_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyout = out_str ;
-}
-
-int _mesa_glsl_get_debug  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yy_flex_debug;
-}
-
-void _mesa_glsl_set_debug (int  bdebug , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yy_flex_debug = bdebug ;
-}
-
-/* Accessor methods for yylval and yylloc */
-
-YYSTYPE * _mesa_glsl_get_lval  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yylval;
-}
-
-void _mesa_glsl_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yylval = yylval_param;
-}
-
-YYLTYPE *_mesa_glsl_get_lloc  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yylloc;
-}
-    
-void _mesa_glsl_set_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yylloc = yylloc_param;
-}
-    
-/* User-visible API */
-
-/* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is
- * the ONLY reentrant function that doesn't take the scanner as the last argument.
- * That's why we explicitly handle the declaration, instead of using our macros.
- */
-
-int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals)
-
-{
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-
-    *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), NULL );
-
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-
-    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-/* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the
- * convention of taking the scanner as the last argument. Note however, that
- * this is a *pointer* to a scanner, as it will be allocated by this call (and
- * is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to _mesa_glsl_alloc in
- * the yyextra field.
- */
-
-int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
-{
-    struct yyguts_t dummy_yyguts;
-
-    _mesa_glsl_set_extra (yy_user_defined, &dummy_yyguts);
-
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-	
-    *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-	
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-    
-    /* By setting to 0xAA, we expose bugs in
-    yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-    
-    _mesa_glsl_set_extra (yy_user_defined, *ptr_yy_globals);
-    
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-static int yy_init_globals (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from _mesa_glsl_lex_destroy(), so don't allocate here.
-     */
-
-    yyg->yy_buffer_stack = 0;
-    yyg->yy_buffer_stack_top = 0;
-    yyg->yy_buffer_stack_max = 0;
-    yyg->yy_c_buf_p = (char *) 0;
-    yyg->yy_init = 0;
-    yyg->yy_start = 0;
-
-    yyg->yy_start_stack_ptr = 0;
-    yyg->yy_start_stack_depth = 0;
-    yyg->yy_start_stack =  NULL;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * _mesa_glsl_lex_init()
-     */
-    return 0;
-}
-
-/* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */
-int _mesa_glsl_lex_destroy  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		_mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		_mesa_glsl_pop_buffer_state(yyscanner);
-	}
-
-	/* Destroy the stack itself. */
-	_mesa_glsl_free(yyg->yy_buffer_stack ,yyscanner);
-	yyg->yy_buffer_stack = NULL;
-
-    /* Destroy the start condition stack. */
-        _mesa_glsl_free(yyg->yy_start_stack ,yyscanner );
-        yyg->yy_start_stack = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * _mesa_glsl_lex() is called, initialization will occur. */
-    yy_init_globals( yyscanner);
-
-    /* Destroy the main struct (reentrant only). */
-    _mesa_glsl_free ( yyscanner , yyscanner );
-    yyscanner = NULL;
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
-{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *_mesa_glsl_alloc (yy_size_t  size , yyscan_t yyscanner)
-{
-	return (void *) malloc( size );
-}
-
-void *_mesa_glsl_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
-{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-}
-
-void _mesa_glsl_free (void * ptr , yyscan_t yyscanner)
-{
-	free( (char *) ptr );	/* see _mesa_glsl_realloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 422 "glsl_lexer.lpp"
-
-
-
-void
-_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
-{
-   _mesa_glsl_lex_init_extra(state,& state->scanner);
-   _mesa_glsl__scan_string(string,state->scanner);
-}
-
-void
-_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
-{
-   _mesa_glsl_lex_destroy(state->scanner);
-}
-
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.lpp
deleted file mode 100644
index 15742ac..0000000
--- a/src/glsl/glsl_lexer.lpp
+++ /dev/null
@@ -1,435 +0,0 @@
-%{
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <ctype.h>
-#include "strtod.h"
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_parser.h"
-
-#define YY_USER_ACTION						\
-   do {								\
-      yylloc->source = 0;					\
-      yylloc->first_column = yycolumn + 1;			\
-      yylloc->first_line = yylineno + 1;			\
-      yycolumn += yyleng;					\
-   } while(0);
-
-#define YY_USER_INIT yylineno = 0; yycolumn = 0;
-
-#define IS_UINT (yytext[yyleng - 1] == 'u' || yytext[yyleng - 1] == 'U')
-
-/* A macro for handling reserved words and keywords across language versions.
- *
- * Certain words start out as identifiers, become reserved words in
- * later language revisions, and finally become language keywords.
- *
- * For example, consider the following lexer rule:
- * samplerBuffer       KEYWORD(130, 140, SAMPLERBUFFER)
- *
- * This means that "samplerBuffer" will be treated as:
- * - a keyword (SAMPLERBUFFER token)         ...in GLSL >= 1.40
- * - a reserved word - error                 ...in GLSL >= 1.30
- * - an identifier                           ...in GLSL <  1.30
- */
-#define KEYWORD(reserved_version, allowed_version, token)		\
-   do {									\
-      if (yyextra->language_version >= allowed_version) {		\
-	 return token;							\
-      } else if (yyextra->language_version >= reserved_version) {	\
-	 _mesa_glsl_error(yylloc, yyextra,				\
-			  "Illegal use of reserved word `%s'", yytext);	\
-	 return ERROR_TOK;						\
-      } else {								\
-	 yylval->identifier = strdup(yytext);				\
-	 return IDENTIFIER;						\
-      }									\
-   } while (0)
-
-/* The ES macro can be used in KEYWORD checks:
- *
- *    word      KEYWORD(110 || ES, 400, TOKEN)
- * ...means the word is reserved in GLSL ES 1.00, while
- *
- *    word      KEYWORD(110, 130 || ES, TOKEN)
- * ...means the word is a legal keyword in GLSL ES 1.00.
- */
-#define ES yyextra->es_shader
-%}
-
-%option bison-bridge bison-locations reentrant noyywrap
-%option nounput noyy_top_state
-%option never-interactive
-%option prefix="_mesa_glsl_"
-%option extra-type="struct _mesa_glsl_parse_state *"
-
-%x PP PRAGMA
-
-DEC_INT		[1-9][0-9]*
-HEX_INT		0[xX][0-9a-fA-F]+
-OCT_INT		0[0-7]*
-INT		({DEC_INT}|{HEX_INT}|{OCT_INT})
-SPC		[ \t]*
-SPCP		[ \t]+
-HASH		^{SPC}#{SPC}
-%%
-
-[ \r\t]+		;
-
-    /* Preprocessor tokens. */ 
-^[ \t]*#[ \t]*$			;
-^[ \t]*#[ \t]*version		{ BEGIN PP; return VERSION; }
-^[ \t]*#[ \t]*extension		{ BEGIN PP; return EXTENSION; }
-{HASH}line{SPCP}{INT}{SPCP}{INT}{SPC}$ {
-				   /* Eat characters until the first digit is
-				    * encountered
-				    */
-				   char *ptr = yytext;
-				   while (!isdigit(*ptr))
-				      ptr++;
-
-				   /* Subtract one from the line number because
-				    * yylineno is zero-based instead of
-				    * one-based.
-				    */
-				   yylineno = strtol(ptr, &ptr, 0) - 1;
-				   yylloc->source = strtol(ptr, NULL, 0);
-				}
-{HASH}line{SPCP}{INT}{SPC}$	{
-				   /* Eat characters until the first digit is
-				    * encountered
-				    */
-				   char *ptr = yytext;
-				   while (!isdigit(*ptr))
-				      ptr++;
-
-				   /* Subtract one from the line number because
-				    * yylineno is zero-based instead of
-				    * one-based.
-				    */
-				   yylineno = strtol(ptr, &ptr, 0) - 1;
-				}
-^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}on{SPC}\) {
-				  BEGIN PP;
-				  return PRAGMA_DEBUG_ON;
-				}
-^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}off{SPC}\) {
-				  BEGIN PP;
-				  return PRAGMA_DEBUG_OFF;
-				}
-^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}on{SPC}\) {
-				  BEGIN PP;
-				  return PRAGMA_OPTIMIZE_ON;
-				}
-^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}off{SPC}\) {
-				  BEGIN PP;
-				  return PRAGMA_OPTIMIZE_OFF;
-				}
-^{SPC}#{SPC}pragma{SPCP}	{ BEGIN PRAGMA; }
-
-<PRAGMA>\n			{ BEGIN 0; yylineno++; yycolumn = 0; }
-<PRAGMA>.			{ }
-
-<PP>\/\/[^\n]*			{ }
-<PP>[ \t\r]*			{ }
-<PP>:				return COLON;
-<PP>[_a-zA-Z][_a-zA-Z0-9]*	{
-				   yylval->identifier = strdup(yytext);
-				   return IDENTIFIER;
-				}
-<PP>[1-9][0-9]*			{
-				    yylval->n = strtol(yytext, NULL, 10);
-				    return INTCONSTANT;
-				}
-<PP>\n				{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
-
-\n		{ yylineno++; yycolumn = 0; }
-
-attribute	return ATTRIBUTE;
-const		return CONST_TOK;
-bool		return BOOL_TOK;
-float		return FLOAT_TOK;
-int		return INT_TOK;
-uint		KEYWORD(130, 130, UINT_TOK);
-
-break		return BREAK;
-continue	return CONTINUE;
-do		return DO;
-while		return WHILE;
-else		return ELSE;
-for		return FOR;
-if		return IF;
-discard		return DISCARD;
-return		return RETURN;
-
-bvec2		return BVEC2;
-bvec3		return BVEC3;
-bvec4		return BVEC4;
-ivec2		return IVEC2;
-ivec3		return IVEC3;
-ivec4		return IVEC4;
-uvec2		KEYWORD(130, 130, UVEC2);
-uvec3		KEYWORD(130, 130, UVEC3);
-uvec4		KEYWORD(130, 130, UVEC4);
-vec2		return VEC2;
-vec3		return VEC3;
-vec4		return VEC4;
-mat2		return MAT2X2;
-mat3		return MAT3X3;
-mat4		return MAT4X4;
-mat2x2		KEYWORD(120, 120, MAT2X2);
-mat2x3		KEYWORD(120, 120, MAT2X3);
-mat2x4		KEYWORD(120, 120, MAT2X4);
-mat3x2		KEYWORD(120, 120, MAT3X2);
-mat3x3		KEYWORD(120, 120, MAT3X3);
-mat3x4		KEYWORD(120, 120, MAT3X4);
-mat4x2		KEYWORD(120, 120, MAT4X2);
-mat4x3		KEYWORD(120, 120, MAT4X3);
-mat4x4		KEYWORD(120, 120, MAT4X4);
-
-in		return IN_TOK;
-out		return OUT_TOK;
-inout		return INOUT_TOK;
-uniform		return UNIFORM;
-varying		return VARYING;
-centroid	KEYWORD(120, 120, CENTROID);
-invariant	KEYWORD(120 || ES, 120 || ES, INVARIANT);
-flat		KEYWORD(130 || ES, 130, FLAT);
-smooth		KEYWORD(130, 130, SMOOTH);
-noperspective	KEYWORD(130, 130, NOPERSPECTIVE);
-
-sampler1D	return SAMPLER1D;
-sampler2D	return SAMPLER2D;
-sampler3D	return SAMPLER3D;
-samplerCube	return SAMPLERCUBE;
-sampler1DArray	KEYWORD(130, 130, SAMPLER1DARRAY);
-sampler2DArray	KEYWORD(130, 130, SAMPLER2DARRAY);
-sampler1DShadow	return SAMPLER1DSHADOW;
-sampler2DShadow	return SAMPLER2DSHADOW;
-samplerCubeShadow	KEYWORD(130, 130, SAMPLERCUBESHADOW);
-sampler1DArrayShadow	KEYWORD(130, 130, SAMPLER1DARRAYSHADOW);
-sampler2DArrayShadow	KEYWORD(130, 130, SAMPLER2DARRAYSHADOW);
-isampler1D		KEYWORD(130, 130, ISAMPLER1D);
-isampler2D		KEYWORD(130, 130, ISAMPLER2D);
-isampler3D		KEYWORD(130, 130, ISAMPLER3D);
-isamplerCube		KEYWORD(130, 130, ISAMPLERCUBE);
-isampler1DArray		KEYWORD(130, 130, ISAMPLER1DARRAY);
-isampler2DArray		KEYWORD(130, 130, ISAMPLER2DARRAY);
-usampler1D		KEYWORD(130, 130, USAMPLER1D);
-usampler2D		KEYWORD(130, 130, USAMPLER2D);
-usampler3D		KEYWORD(130, 130, USAMPLER3D);
-usamplerCube		KEYWORD(130, 130, USAMPLERCUBE);
-usampler1DArray		KEYWORD(130, 130, USAMPLER1DARRAY);
-usampler2DArray		KEYWORD(130, 130, USAMPLER2DARRAY);
-
-
-struct		return STRUCT;
-void		return VOID_TOK;
-
-layout		{
-		  if ((yyextra->language_version >= 140)
-		      || yyextra->ARB_explicit_attrib_location_enable
-		      || (yyextra->ARB_fragment_coord_conventions_enable)){
-		      return LAYOUT_TOK;
-		   } else {
-		      yylval->identifier = strdup(yytext);
-		      return IDENTIFIER;
-		   }
-		}
-
-\+\+		return INC_OP;
---		return DEC_OP;
-\<=		return LE_OP;
->=		return GE_OP;
-==		return EQ_OP;
-!=		return NE_OP;
-&&		return AND_OP;
-\|\|		return OR_OP;
-"^^"		return XOR_OP;
-"<<"		return LEFT_OP;
-">>"		return RIGHT_OP;
-
-\*=		return MUL_ASSIGN;
-\/=		return DIV_ASSIGN;
-\+=		return ADD_ASSIGN;
-\%=		return MOD_ASSIGN;
-\<\<=		return LEFT_ASSIGN;
->>=		return RIGHT_ASSIGN;
-&=		return AND_ASSIGN;
-"^="		return XOR_ASSIGN;
-\|=		return OR_ASSIGN;
--=		return SUB_ASSIGN;
-
-[1-9][0-9]*[uU]?	{
-			    yylval->n = strtol(yytext, NULL, 10);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-0[xX][0-9a-fA-F]+[uU]?	{
-			    yylval->n = strtol(yytext + 2, NULL, 16);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-0[0-7]*[uU]?		{
-			    yylval->n = strtol(yytext, NULL, 8);
-			    return IS_UINT ? UINTCONSTANT : INTCONSTANT;
-			}
-
-[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]?	{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-\.[0-9]+([eE][+-]?[0-9]+)?[fF]?		{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-[0-9]+\.([eE][+-]?[0-9]+)?[fF]?		{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-[0-9]+[eE][+-]?[0-9]+[fF]?		{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-[0-9]+[fF]		{
-			    yylval->real = glsl_strtod(yytext, NULL);
-			    return FLOATCONSTANT;
-			}
-
-true			{
-			    yylval->n = 1;
-			    return BOOLCONSTANT;
-			}
-false			{
-			    yylval->n = 0;
-			    return BOOLCONSTANT;
-			}
-
-
-    /* Reserved words in GLSL 1.10. */
-asm		KEYWORD(110 || ES, 999, ASM);
-class		KEYWORD(110 || ES, 999, CLASS);
-union		KEYWORD(110 || ES, 999, UNION);
-enum		KEYWORD(110 || ES, 999, ENUM);
-typedef		KEYWORD(110 || ES, 999, TYPEDEF);
-template	KEYWORD(110 || ES, 999, TEMPLATE);
-this		KEYWORD(110 || ES, 999, THIS);
-packed		KEYWORD(110 || ES, 999, PACKED_TOK);
-goto		KEYWORD(110 || ES, 999, GOTO);
-switch		KEYWORD(110 || ES, 130, SWITCH);
-default		KEYWORD(110 || ES, 130, DEFAULT);
-inline		KEYWORD(110 || ES, 999, INLINE_TOK);
-noinline	KEYWORD(110 || ES, 999, NOINLINE);
-volatile	KEYWORD(110 || ES, 999, VOLATILE);
-public		KEYWORD(110 || ES, 999, PUBLIC_TOK);
-static		KEYWORD(110 || ES, 999, STATIC);
-extern		KEYWORD(110 || ES, 999, EXTERN);
-external	KEYWORD(110 || ES, 999, EXTERNAL);
-interface	KEYWORD(110 || ES, 999, INTERFACE);
-long		KEYWORD(110 || ES, 999, LONG_TOK);
-short		KEYWORD(110 || ES, 999, SHORT_TOK);
-double		KEYWORD(110 || ES, 400, DOUBLE_TOK);
-half		KEYWORD(110 || ES, 999, HALF);
-fixed		KEYWORD(110 || ES, 999, FIXED_TOK);
-unsigned	KEYWORD(110 || ES, 999, UNSIGNED);
-input		KEYWORD(110 || ES, 999, INPUT_TOK);
-output		KEYWORD(110 || ES, 999, OUTPUT);
-hvec2		KEYWORD(110 || ES, 999, HVEC2);
-hvec3		KEYWORD(110 || ES, 999, HVEC3);
-hvec4		KEYWORD(110 || ES, 999, HVEC4);
-dvec2		KEYWORD(110 || ES, 400, DVEC2);
-dvec3		KEYWORD(110 || ES, 400, DVEC3);
-dvec4		KEYWORD(110 || ES, 400, DVEC4);
-fvec2		KEYWORD(110 || ES, 999, FVEC2);
-fvec3		KEYWORD(110 || ES, 999, FVEC3);
-fvec4		KEYWORD(110 || ES, 999, FVEC4);
-sampler2DRect		return SAMPLER2DRECT;
-sampler3DRect		KEYWORD(110 || ES, 999, SAMPLER3DRECT);
-sampler2DRectShadow	return SAMPLER2DRECTSHADOW;
-sizeof		KEYWORD(110 || ES, 999, SIZEOF);
-cast		KEYWORD(110 || ES, 999, CAST);
-namespace	KEYWORD(110 || ES, 999, NAMESPACE);
-using		KEYWORD(110 || ES, 999, USING);
-
-    /* Additional reserved words in GLSL 1.20. */
-lowp		KEYWORD(120, 130 || ES, LOWP);
-mediump		KEYWORD(120, 130 || ES, MEDIUMP);
-highp		KEYWORD(120, 130 || ES, HIGHP);
-precision	KEYWORD(120, 130 || ES, PRECISION);
-
-    /* Additional reserved words in GLSL 1.30. */
-case		KEYWORD(130, 130, CASE);
-common		KEYWORD(130, 999, COMMON);
-partition	KEYWORD(130, 999, PARTITION);
-active		KEYWORD(130, 999, ACTIVE);
-superp		KEYWORD(130 || ES, 999, SUPERP);
-samplerBuffer	KEYWORD(130, 140, SAMPLERBUFFER);
-filter		KEYWORD(130, 999, FILTER);
-image1D		KEYWORD(130, 999, IMAGE1D);
-image2D		KEYWORD(130, 999, IMAGE2D);
-image3D		KEYWORD(130, 999, IMAGE3D);
-imageCube	KEYWORD(130, 999, IMAGECUBE);
-iimage1D	KEYWORD(130, 999, IIMAGE1D);
-iimage2D	KEYWORD(130, 999, IIMAGE2D);
-iimage3D	KEYWORD(130, 999, IIMAGE3D);
-iimageCube	KEYWORD(130, 999, IIMAGECUBE);
-uimage1D	KEYWORD(130, 999, UIMAGE1D);
-uimage2D	KEYWORD(130, 999, UIMAGE2D);
-uimage3D	KEYWORD(130, 999, UIMAGE3D);
-uimageCube	KEYWORD(130, 999, UIMAGECUBE);
-image1DArray	KEYWORD(130, 999, IMAGE1DARRAY);
-image2DArray	KEYWORD(130, 999, IMAGE2DARRAY);
-iimage1DArray	KEYWORD(130, 999, IIMAGE1DARRAY);
-iimage2DArray	KEYWORD(130, 999, IIMAGE2DARRAY);
-uimage1DArray	KEYWORD(130, 999, UIMAGE1DARRAY);
-uimage2DArray	KEYWORD(130, 999, UIMAGE2DARRAY);
-image1DShadow	KEYWORD(130, 999, IMAGE1DSHADOW);
-image2DShadow	KEYWORD(130, 999, IMAGE2DSHADOW);
-image1DArrayShadow KEYWORD(130, 999, IMAGE1DARRAYSHADOW);
-image2DArrayShadow KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
-imageBuffer	KEYWORD(130, 999, IMAGEBUFFER);
-iimageBuffer	KEYWORD(130, 999, IIMAGEBUFFER);
-uimageBuffer	KEYWORD(130, 999, UIMAGEBUFFER);
-row_major	KEYWORD(130, 999, ROW_MAJOR);
-
-[_a-zA-Z][_a-zA-Z0-9]*	{
-			    struct _mesa_glsl_parse_state *state = yyextra;
-			    void *ctx = state;	
-			    yylval->identifier = talloc_strdup(ctx, yytext);
-			    return IDENTIFIER;
-			}
-
-.			{ return yytext[0]; }
-
-%%
-
-void
-_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
-{
-   yylex_init_extra(state, & state->scanner);
-   yy_scan_string(string, state->scanner);
-}
-
-void
-_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
-{
-   yylex_destroy(state->scanner);
-}
diff --git a/src/glsl/glsl_parser.cpp b/src/glsl/glsl_parser.cpp
deleted file mode 100644
index 23e439c..0000000
--- a/src/glsl/glsl_parser.cpp
+++ /dev/null
@@ -1,5306 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 1
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Using locations.  */
-#define YYLSP_NEEDED 1
-
-/* Substitute the variable and function names.  */
-#define yyparse         _mesa_glsl_parse
-#define yylex           _mesa_glsl_lex
-#define yyerror         _mesa_glsl_error
-#define yylval          _mesa_glsl_lval
-#define yychar          _mesa_glsl_char
-#define yydebug         _mesa_glsl_debug
-#define yynerrs         _mesa_glsl_nerrs
-#define yylloc          _mesa_glsl_lloc
-
-/* Copy the first part of user declarations.  */
-
-/* Line 189 of yacc.c  */
-#line 1 "glsl_parser.ypp"
-
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-    
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_types.h"
-
-#define YYLEX_PARAM state->scanner
-
-
-
-/* Line 189 of yacc.c  */
-#line 117 "glsl_parser.cpp"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     ATTRIBUTE = 258,
-     CONST_TOK = 259,
-     BOOL_TOK = 260,
-     FLOAT_TOK = 261,
-     INT_TOK = 262,
-     UINT_TOK = 263,
-     BREAK = 264,
-     CONTINUE = 265,
-     DO = 266,
-     ELSE = 267,
-     FOR = 268,
-     IF = 269,
-     DISCARD = 270,
-     RETURN = 271,
-     SWITCH = 272,
-     CASE = 273,
-     DEFAULT = 274,
-     BVEC2 = 275,
-     BVEC3 = 276,
-     BVEC4 = 277,
-     IVEC2 = 278,
-     IVEC3 = 279,
-     IVEC4 = 280,
-     UVEC2 = 281,
-     UVEC3 = 282,
-     UVEC4 = 283,
-     VEC2 = 284,
-     VEC3 = 285,
-     VEC4 = 286,
-     CENTROID = 287,
-     IN_TOK = 288,
-     OUT_TOK = 289,
-     INOUT_TOK = 290,
-     UNIFORM = 291,
-     VARYING = 292,
-     NOPERSPECTIVE = 293,
-     FLAT = 294,
-     SMOOTH = 295,
-     MAT2X2 = 296,
-     MAT2X3 = 297,
-     MAT2X4 = 298,
-     MAT3X2 = 299,
-     MAT3X3 = 300,
-     MAT3X4 = 301,
-     MAT4X2 = 302,
-     MAT4X3 = 303,
-     MAT4X4 = 304,
-     SAMPLER1D = 305,
-     SAMPLER2D = 306,
-     SAMPLER3D = 307,
-     SAMPLERCUBE = 308,
-     SAMPLER1DSHADOW = 309,
-     SAMPLER2DSHADOW = 310,
-     SAMPLERCUBESHADOW = 311,
-     SAMPLER1DARRAY = 312,
-     SAMPLER2DARRAY = 313,
-     SAMPLER1DARRAYSHADOW = 314,
-     SAMPLER2DARRAYSHADOW = 315,
-     ISAMPLER1D = 316,
-     ISAMPLER2D = 317,
-     ISAMPLER3D = 318,
-     ISAMPLERCUBE = 319,
-     ISAMPLER1DARRAY = 320,
-     ISAMPLER2DARRAY = 321,
-     USAMPLER1D = 322,
-     USAMPLER2D = 323,
-     USAMPLER3D = 324,
-     USAMPLERCUBE = 325,
-     USAMPLER1DARRAY = 326,
-     USAMPLER2DARRAY = 327,
-     STRUCT = 328,
-     VOID_TOK = 329,
-     WHILE = 330,
-     IDENTIFIER = 331,
-     FLOATCONSTANT = 332,
-     INTCONSTANT = 333,
-     UINTCONSTANT = 334,
-     BOOLCONSTANT = 335,
-     FIELD_SELECTION = 336,
-     LEFT_OP = 337,
-     RIGHT_OP = 338,
-     INC_OP = 339,
-     DEC_OP = 340,
-     LE_OP = 341,
-     GE_OP = 342,
-     EQ_OP = 343,
-     NE_OP = 344,
-     AND_OP = 345,
-     OR_OP = 346,
-     XOR_OP = 347,
-     MUL_ASSIGN = 348,
-     DIV_ASSIGN = 349,
-     ADD_ASSIGN = 350,
-     MOD_ASSIGN = 351,
-     LEFT_ASSIGN = 352,
-     RIGHT_ASSIGN = 353,
-     AND_ASSIGN = 354,
-     XOR_ASSIGN = 355,
-     OR_ASSIGN = 356,
-     SUB_ASSIGN = 357,
-     INVARIANT = 358,
-     LOWP = 359,
-     MEDIUMP = 360,
-     HIGHP = 361,
-     SUPERP = 362,
-     PRECISION = 363,
-     VERSION = 364,
-     EXTENSION = 365,
-     LINE = 366,
-     COLON = 367,
-     EOL = 368,
-     INTERFACE = 369,
-     OUTPUT = 370,
-     PRAGMA_DEBUG_ON = 371,
-     PRAGMA_DEBUG_OFF = 372,
-     PRAGMA_OPTIMIZE_ON = 373,
-     PRAGMA_OPTIMIZE_OFF = 374,
-     LAYOUT_TOK = 375,
-     ASM = 376,
-     CLASS = 377,
-     UNION = 378,
-     ENUM = 379,
-     TYPEDEF = 380,
-     TEMPLATE = 381,
-     THIS = 382,
-     PACKED_TOK = 383,
-     GOTO = 384,
-     INLINE_TOK = 385,
-     NOINLINE = 386,
-     VOLATILE = 387,
-     PUBLIC_TOK = 388,
-     STATIC = 389,
-     EXTERN = 390,
-     EXTERNAL = 391,
-     LONG_TOK = 392,
-     SHORT_TOK = 393,
-     DOUBLE_TOK = 394,
-     HALF = 395,
-     FIXED_TOK = 396,
-     UNSIGNED = 397,
-     INPUT_TOK = 398,
-     OUPTUT = 399,
-     HVEC2 = 400,
-     HVEC3 = 401,
-     HVEC4 = 402,
-     DVEC2 = 403,
-     DVEC3 = 404,
-     DVEC4 = 405,
-     FVEC2 = 406,
-     FVEC3 = 407,
-     FVEC4 = 408,
-     SAMPLER2DRECT = 409,
-     SAMPLER3DRECT = 410,
-     SAMPLER2DRECTSHADOW = 411,
-     SIZEOF = 412,
-     CAST = 413,
-     NAMESPACE = 414,
-     USING = 415,
-     ERROR_TOK = 416,
-     COMMON = 417,
-     PARTITION = 418,
-     ACTIVE = 419,
-     SAMPLERBUFFER = 420,
-     FILTER = 421,
-     IMAGE1D = 422,
-     IMAGE2D = 423,
-     IMAGE3D = 424,
-     IMAGECUBE = 425,
-     IMAGE1DARRAY = 426,
-     IMAGE2DARRAY = 427,
-     IIMAGE1D = 428,
-     IIMAGE2D = 429,
-     IIMAGE3D = 430,
-     IIMAGECUBE = 431,
-     IIMAGE1DARRAY = 432,
-     IIMAGE2DARRAY = 433,
-     UIMAGE1D = 434,
-     UIMAGE2D = 435,
-     UIMAGE3D = 436,
-     UIMAGECUBE = 437,
-     UIMAGE1DARRAY = 438,
-     UIMAGE2DARRAY = 439,
-     IMAGE1DSHADOW = 440,
-     IMAGE2DSHADOW = 441,
-     IMAGEBUFFER = 442,
-     IIMAGEBUFFER = 443,
-     UIMAGEBUFFER = 444,
-     IMAGE1DARRAYSHADOW = 445,
-     IMAGE2DARRAYSHADOW = 446,
-     ROW_MAJOR = 447
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c  */
-#line 52 "glsl_parser.ypp"
-
-   int n;
-   float real;
-   char *identifier;
-
-   struct ast_type_qualifier type_qualifier;
-
-   ast_node *node;
-   ast_type_specifier *type_specifier;
-   ast_fully_specified_type *fully_specified_type;
-   ast_function *function;
-   ast_parameter_declarator *parameter_declarator;
-   ast_function_definition *function_definition;
-   ast_compound_statement *compound_statement;
-   ast_expression *expression;
-   ast_declarator_list *declarator_list;
-   ast_struct_specifier *struct_specifier;
-   ast_declaration *declaration;
-
-   struct {
-      ast_node *cond;
-      ast_expression *rest;
-   } for_rest_statement;
-
-   struct {
-      ast_node *then_statement;
-      ast_node *else_statement;
-   } selection_rest_statement;
-
-
-
-/* Line 214 of yacc.c  */
-#line 377 "glsl_parser.cpp"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 264 of yacc.c  */
-#line 402 "glsl_parser.cpp"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
-#endif
-{
-  return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-	     && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-	 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
-	     && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-  YYLTYPE yyls_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
-      + 2 * YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  5
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   3718
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  217
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  87
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  278
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  413
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   447
-
-#define YYTRANSLATE(YYX)						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   201,     2,     2,     2,   205,   208,     2,
-     193,   194,   203,   199,   198,   200,   197,   204,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,   212,   214,
-     206,   213,   207,   211,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   195,     2,   196,   209,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   215,   210,   216,   202,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
-     185,   186,   187,   188,   189,   190,   191,   192
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     4,     9,    10,    14,    17,    20,    23,
-      26,    27,    30,    36,    38,    41,    43,    45,    47,    49,
-      51,    53,    57,    59,    64,    66,    70,    73,    76,    78,
-      80,    82,    86,    89,    92,    95,    97,   100,   104,   107,
-     109,   111,   113,   115,   118,   121,   124,   126,   128,   130,
-     132,   134,   138,   142,   146,   148,   152,   156,   158,   162,
-     166,   168,   172,   176,   180,   184,   186,   190,   194,   196,
-     200,   202,   206,   208,   212,   214,   218,   220,   224,   226,
-     230,   232,   238,   240,   244,   246,   248,   250,   252,   254,
-     256,   258,   260,   262,   264,   266,   268,   272,   274,   277,
-     280,   285,   288,   290,   292,   295,   299,   303,   306,   312,
-     316,   319,   323,   326,   327,   329,   331,   333,   335,   337,
-     341,   347,   354,   362,   371,   377,   379,   382,   387,   393,
-     400,   408,   413,   416,   418,   421,   426,   428,   432,   434,
-     438,   440,   442,   444,   446,   448,   450,   453,   455,   458,
-     461,   465,   467,   469,   471,   473,   476,   478,   480,   483,
-     486,   488,   490,   493,   495,   499,   504,   506,   508,   510,
-     512,   514,   516,   518,   520,   522,   524,   526,   528,   530,
-     532,   534,   536,   538,   540,   542,   544,   546,   548,   550,
-     552,   554,   556,   558,   560,   562,   564,   566,   568,   570,
-     572,   574,   576,   578,   580,   582,   584,   586,   588,   590,
-     592,   594,   596,   598,   600,   602,   604,   606,   608,   610,
-     612,   614,   616,   618,   624,   629,   631,   634,   638,   640,
-     644,   646,   651,   653,   655,   657,   659,   661,   663,   665,
-     667,   669,   671,   673,   676,   680,   682,   684,   687,   691,
-     693,   696,   698,   701,   707,   711,   713,   715,   720,   726,
-     730,   733,   739,   747,   754,   756,   758,   760,   761,   764,
-     768,   771,   774,   777,   781,   784,   786,   788,   790
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int16 yyrhs[] =
-{
-     218,     0,    -1,    -1,   220,   222,   219,   224,    -1,    -1,
-     109,    78,   113,    -1,   116,   113,    -1,   117,   113,    -1,
-     118,   113,    -1,   119,   113,    -1,    -1,   222,   223,    -1,
-     110,    76,   112,    76,   113,    -1,   302,    -1,   224,   302,
-      -1,    76,    -1,   225,    -1,    78,    -1,    79,    -1,    77,
-      -1,    80,    -1,   193,   252,   194,    -1,   226,    -1,   227,
-     195,   228,   196,    -1,   229,    -1,   227,   197,    76,    -1,
-     227,    84,    -1,   227,    85,    -1,   252,    -1,   230,    -1,
-     231,    -1,   227,   197,   231,    -1,   233,   194,    -1,   232,
-     194,    -1,   234,    74,    -1,   234,    -1,   234,   250,    -1,
-     233,   198,   250,    -1,   235,   193,    -1,   273,    -1,    76,
-      -1,    81,    -1,   227,    -1,    84,   236,    -1,    85,   236,
-      -1,   237,   236,    -1,   199,    -1,   200,    -1,   201,    -1,
-     202,    -1,   236,    -1,   238,   203,   236,    -1,   238,   204,
-     236,    -1,   238,   205,   236,    -1,   238,    -1,   239,   199,
-     238,    -1,   239,   200,   238,    -1,   239,    -1,   240,    82,
-     239,    -1,   240,    83,   239,    -1,   240,    -1,   241,   206,
-     240,    -1,   241,   207,   240,    -1,   241,    86,   240,    -1,
-     241,    87,   240,    -1,   241,    -1,   242,    88,   241,    -1,
-     242,    89,   241,    -1,   242,    -1,   243,   208,   242,    -1,
-     243,    -1,   244,   209,   243,    -1,   244,    -1,   245,   210,
-     244,    -1,   245,    -1,   246,    90,   245,    -1,   246,    -1,
-     247,    92,   246,    -1,   247,    -1,   248,    91,   247,    -1,
-     248,    -1,   248,   211,   252,   212,   250,    -1,   249,    -1,
-     236,   251,   250,    -1,   213,    -1,    93,    -1,    94,    -1,
-      96,    -1,    95,    -1,   102,    -1,    97,    -1,    98,    -1,
-      99,    -1,   100,    -1,   101,    -1,   250,    -1,   252,   198,
-     250,    -1,   249,    -1,   255,   214,    -1,   263,   214,    -1,
-     108,   277,   274,   214,    -1,   256,   194,    -1,   258,    -1,
-     257,    -1,   258,   260,    -1,   257,   198,   260,    -1,   265,
-      76,   193,    -1,   273,    76,    -1,   273,    76,   195,   253,
-     196,    -1,   270,   261,   259,    -1,   261,   259,    -1,   270,
-     261,   262,    -1,   261,   262,    -1,    -1,    33,    -1,    34,
-      -1,    35,    -1,   273,    -1,   264,    -1,   263,   198,    76,
-      -1,   263,   198,    76,   195,   196,    -1,   263,   198,    76,
-     195,   253,   196,    -1,   263,   198,    76,   195,   196,   213,
-     283,    -1,   263,   198,    76,   195,   253,   196,   213,   283,
-      -1,   263,   198,    76,   213,   283,    -1,   265,    -1,   265,
-      76,    -1,   265,    76,   195,   196,    -1,   265,    76,   195,
-     253,   196,    -1,   265,    76,   195,   196,   213,   283,    -1,
-     265,    76,   195,   253,   196,   213,   283,    -1,   265,    76,
-     213,   283,    -1,   103,    76,    -1,   273,    -1,   271,   273,
-      -1,   120,   193,   267,   194,    -1,   268,    -1,   267,   198,
-     268,    -1,    76,    -1,    76,   213,    78,    -1,    40,    -1,
-      39,    -1,    38,    -1,     4,    -1,   272,    -1,   266,    -1,
-     266,   272,    -1,   269,    -1,   269,   272,    -1,   103,   272,
-      -1,   103,   269,   272,    -1,   103,    -1,     4,    -1,     3,
-      -1,    37,    -1,    32,    37,    -1,    33,    -1,    34,    -1,
-      32,    33,    -1,    32,    34,    -1,    36,    -1,   274,    -1,
-     277,   274,    -1,   275,    -1,   275,   195,   196,    -1,   275,
-     195,   253,   196,    -1,   276,    -1,   278,    -1,    76,    -1,
-      74,    -1,     6,    -1,     7,    -1,     8,    -1,     5,    -1,
-      29,    -1,    30,    -1,    31,    -1,    20,    -1,    21,    -1,
-      22,    -1,    23,    -1,    24,    -1,    25,    -1,    26,    -1,
-      27,    -1,    28,    -1,    41,    -1,    42,    -1,    43,    -1,
-      44,    -1,    45,    -1,    46,    -1,    47,    -1,    48,    -1,
-      49,    -1,    50,    -1,    51,    -1,   154,    -1,    52,    -1,
-      53,    -1,    54,    -1,    55,    -1,   156,    -1,    56,    -1,
-      57,    -1,    58,    -1,    59,    -1,    60,    -1,    61,    -1,
-      62,    -1,    63,    -1,    64,    -1,    65,    -1,    66,    -1,
-      67,    -1,    68,    -1,    69,    -1,    70,    -1,    71,    -1,
-      72,    -1,   106,    -1,   105,    -1,   104,    -1,    73,    76,
-     215,   279,   216,    -1,    73,   215,   279,   216,    -1,   280,
-      -1,   279,   280,    -1,   273,   281,   214,    -1,   282,    -1,
-     281,   198,   282,    -1,    76,    -1,    76,   195,   253,   196,
-      -1,   250,    -1,   254,    -1,   287,    -1,   286,    -1,   284,
-      -1,   291,    -1,   292,    -1,   295,    -1,   296,    -1,   297,
-      -1,   301,    -1,   215,   216,    -1,   215,   290,   216,    -1,
-     289,    -1,   286,    -1,   215,   216,    -1,   215,   290,   216,
-      -1,   285,    -1,   290,   285,    -1,   214,    -1,   252,   214,
-      -1,    14,   193,   252,   194,   293,    -1,   285,    12,   285,
-      -1,   285,    -1,   252,    -1,   265,    76,   213,   283,    -1,
-      17,   193,   252,   194,   287,    -1,    18,   252,   212,    -1,
-      19,   212,    -1,    75,   193,   294,   194,   288,    -1,    11,
-     285,    75,   193,   252,   194,   214,    -1,    13,   193,   298,
-     300,   194,   288,    -1,   291,    -1,   284,    -1,   294,    -1,
-      -1,   299,   214,    -1,   299,   214,   252,    -1,    10,   214,
-      -1,     9,   214,    -1,    16,   214,    -1,    16,   252,   214,
-      -1,    15,   214,    -1,   303,    -1,   254,    -1,   221,    -1,
-     255,   289,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint16 yyrline[] =
-{
-       0,   212,   212,   211,   218,   220,   240,   241,   242,   243,
-     246,   248,   252,   261,   269,   280,   284,   291,   298,   305,
-     312,   319,   326,   327,   333,   337,   344,   350,   359,   363,
-     367,   368,   377,   378,   382,   383,   387,   393,   405,   409,
-     415,   422,   433,   434,   440,   446,   456,   457,   458,   459,
-     463,   464,   470,   476,   485,   486,   492,   501,   502,   508,
-     517,   518,   524,   530,   536,   545,   546,   552,   561,   562,
-     571,   572,   581,   582,   591,   592,   601,   602,   611,   612,
-     621,   622,   631,   632,   641,   642,   643,   644,   645,   646,
-     647,   648,   649,   650,   651,   655,   659,   675,   679,   683,
-     687,   701,   705,   706,   710,   715,   723,   734,   744,   759,
-     766,   771,   782,   795,   798,   803,   808,   817,   821,   822,
-     831,   840,   849,   858,   867,   880,   891,   900,   909,   918,
-     927,   936,   945,   959,   966,   977,   984,   985,  1004,  1033,
-    1074,  1079,  1084,  1092,  1100,  1101,  1102,  1107,  1108,  1113,
-    1118,  1124,  1132,  1137,  1142,  1147,  1153,  1158,  1163,  1168,
-    1173,  1181,  1182,  1190,  1191,  1197,  1206,  1212,  1218,  1227,
-    1228,  1229,  1230,  1231,  1232,  1233,  1234,  1235,  1236,  1237,
-    1238,  1239,  1240,  1241,  1242,  1243,  1244,  1245,  1246,  1247,
-    1248,  1249,  1250,  1251,  1252,  1253,  1254,  1255,  1256,  1257,
-    1258,  1259,  1260,  1261,  1262,  1263,  1264,  1265,  1266,  1267,
-    1268,  1269,  1270,  1271,  1272,  1273,  1274,  1275,  1276,  1277,
-    1281,  1292,  1303,  1317,  1323,  1332,  1337,  1345,  1360,  1365,
-    1373,  1379,  1388,  1392,  1398,  1399,  1403,  1404,  1405,  1406,
-    1407,  1408,  1409,  1413,  1419,  1428,  1429,  1433,  1439,  1448,
-    1458,  1470,  1476,  1485,  1494,  1499,  1507,  1511,  1525,  1529,
-    1530,  1534,  1541,  1548,  1558,  1559,  1563,  1565,  1571,  1576,
-    1585,  1591,  1597,  1603,  1609,  1618,  1619,  1620,  1624
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "ATTRIBUTE", "CONST_TOK", "BOOL_TOK",
-  "FLOAT_TOK", "INT_TOK", "UINT_TOK", "BREAK", "CONTINUE", "DO", "ELSE",
-  "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "BVEC2",
-  "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "UVEC2", "UVEC3", "UVEC4",
-  "VEC2", "VEC3", "VEC4", "CENTROID", "IN_TOK", "OUT_TOK", "INOUT_TOK",
-  "UNIFORM", "VARYING", "NOPERSPECTIVE", "FLAT", "SMOOTH", "MAT2X2",
-  "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3",
-  "MAT4X4", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE",
-  "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW",
-  "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW",
-  "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D",
-  "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D",
-  "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY",
-  "USAMPLER2DARRAY", "STRUCT", "VOID_TOK", "WHILE", "IDENTIFIER",
-  "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT",
-  "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP",
-  "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN",
-  "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN",
-  "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "INVARIANT",
-  "LOWP", "MEDIUMP", "HIGHP", "SUPERP", "PRECISION", "VERSION",
-  "EXTENSION", "LINE", "COLON", "EOL", "INTERFACE", "OUTPUT",
-  "PRAGMA_DEBUG_ON", "PRAGMA_DEBUG_OFF", "PRAGMA_OPTIMIZE_ON",
-  "PRAGMA_OPTIMIZE_OFF", "LAYOUT_TOK", "ASM", "CLASS", "UNION", "ENUM",
-  "TYPEDEF", "TEMPLATE", "THIS", "PACKED_TOK", "GOTO", "INLINE_TOK",
-  "NOINLINE", "VOLATILE", "PUBLIC_TOK", "STATIC", "EXTERN", "EXTERNAL",
-  "LONG_TOK", "SHORT_TOK", "DOUBLE_TOK", "HALF", "FIXED_TOK", "UNSIGNED",
-  "INPUT_TOK", "OUPTUT", "HVEC2", "HVEC3", "HVEC4", "DVEC2", "DVEC3",
-  "DVEC4", "FVEC2", "FVEC3", "FVEC4", "SAMPLER2DRECT", "SAMPLER3DRECT",
-  "SAMPLER2DRECTSHADOW", "SIZEOF", "CAST", "NAMESPACE", "USING",
-  "ERROR_TOK", "COMMON", "PARTITION", "ACTIVE", "SAMPLERBUFFER", "FILTER",
-  "IMAGE1D", "IMAGE2D", "IMAGE3D", "IMAGECUBE", "IMAGE1DARRAY",
-  "IMAGE2DARRAY", "IIMAGE1D", "IIMAGE2D", "IIMAGE3D", "IIMAGECUBE",
-  "IIMAGE1DARRAY", "IIMAGE2DARRAY", "UIMAGE1D", "UIMAGE2D", "UIMAGE3D",
-  "UIMAGECUBE", "UIMAGE1DARRAY", "UIMAGE2DARRAY", "IMAGE1DSHADOW",
-  "IMAGE2DSHADOW", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER",
-  "IMAGE1DARRAYSHADOW", "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'",
-  "'['", "']'", "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'",
-  "'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'",
-  "'{'", "'}'", "$accept", "translation_unit", "$@1", "version_statement",
-  "pragma_statement", "extension_statement_list", "extension_statement",
-  "external_declaration_list", "variable_identifier", "primary_expression",
-  "postfix_expression", "integer_expression", "function_call",
-  "function_call_or_method", "function_call_generic",
-  "function_call_header_no_parameters",
-  "function_call_header_with_parameters", "function_call_header",
-  "function_identifier", "unary_expression", "unary_operator",
-  "multiplicative_expression", "additive_expression", "shift_expression",
-  "relational_expression", "equality_expression", "and_expression",
-  "exclusive_or_expression", "inclusive_or_expression",
-  "logical_and_expression", "logical_xor_expression",
-  "logical_or_expression", "conditional_expression",
-  "assignment_expression", "assignment_operator", "expression",
-  "constant_expression", "declaration", "function_prototype",
-  "function_declarator", "function_header_with_parameters",
-  "function_header", "parameter_declarator", "parameter_declaration",
-  "parameter_qualifier", "parameter_type_specifier",
-  "init_declarator_list", "single_declaration", "fully_specified_type",
-  "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id",
-  "interpolation_qualifier", "parameter_type_qualifier", "type_qualifier",
-  "storage_qualifier", "type_specifier", "type_specifier_no_prec",
-  "type_specifier_nonarray", "basic_type_specifier_nonarray",
-  "precision_qualifier", "struct_specifier", "struct_declaration_list",
-  "struct_declaration", "struct_declarator_list", "struct_declarator",
-  "initializer", "declaration_statement", "statement", "simple_statement",
-  "compound_statement", "statement_no_new_scope",
-  "compound_statement_no_new_scope", "statement_list",
-  "expression_statement", "selection_statement",
-  "selection_rest_statement", "condition", "switch_statement",
-  "case_label", "iteration_statement", "for_init_statement",
-  "conditionopt", "for_rest_statement", "jump_statement",
-  "external_declaration", "function_definition", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
-     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
-     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
-     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
-     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
-     365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
-     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
-     395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
-     405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
-     415,   416,   417,   418,   419,   420,   421,   422,   423,   424,
-     425,   426,   427,   428,   429,   430,   431,   432,   433,   434,
-     435,   436,   437,   438,   439,   440,   441,   442,   443,   444,
-     445,   446,   447,    40,    41,    91,    93,    46,    44,    43,
-      45,    33,   126,    42,    47,    37,    60,    62,    38,    94,
-     124,    63,    58,    61,    59,   123,   125
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint16 yyr1[] =
-{
-       0,   217,   219,   218,   220,   220,   221,   221,   221,   221,
-     222,   222,   223,   224,   224,   225,   226,   226,   226,   226,
-     226,   226,   227,   227,   227,   227,   227,   227,   228,   229,
-     230,   230,   231,   231,   232,   232,   233,   233,   234,   235,
-     235,   235,   236,   236,   236,   236,   237,   237,   237,   237,
-     238,   238,   238,   238,   239,   239,   239,   240,   240,   240,
-     241,   241,   241,   241,   241,   242,   242,   242,   243,   243,
-     244,   244,   245,   245,   246,   246,   247,   247,   248,   248,
-     249,   249,   250,   250,   251,   251,   251,   251,   251,   251,
-     251,   251,   251,   251,   251,   252,   252,   253,   254,   254,
-     254,   255,   256,   256,   257,   257,   258,   259,   259,   260,
-     260,   260,   260,   261,   261,   261,   261,   262,   263,   263,
-     263,   263,   263,   263,   263,   264,   264,   264,   264,   264,
-     264,   264,   264,   265,   265,   266,   267,   267,   268,   268,
-     269,   269,   269,   270,   271,   271,   271,   271,   271,   271,
-     271,   271,   272,   272,   272,   272,   272,   272,   272,   272,
-     272,   273,   273,   274,   274,   274,   275,   275,   275,   276,
-     276,   276,   276,   276,   276,   276,   276,   276,   276,   276,
-     276,   276,   276,   276,   276,   276,   276,   276,   276,   276,
-     276,   276,   276,   276,   276,   276,   276,   276,   276,   276,
-     276,   276,   276,   276,   276,   276,   276,   276,   276,   276,
-     276,   276,   276,   276,   276,   276,   276,   276,   276,   276,
-     277,   277,   277,   278,   278,   279,   279,   280,   281,   281,
-     282,   282,   283,   284,   285,   285,   286,   286,   286,   286,
-     286,   286,   286,   287,   287,   288,   288,   289,   289,   290,
-     290,   291,   291,   292,   293,   293,   294,   294,   295,   296,
-     296,   297,   297,   297,   298,   298,   299,   299,   300,   300,
-     301,   301,   301,   301,   301,   302,   302,   302,   303
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     0,     4,     0,     3,     2,     2,     2,     2,
-       0,     2,     5,     1,     2,     1,     1,     1,     1,     1,
-       1,     3,     1,     4,     1,     3,     2,     2,     1,     1,
-       1,     3,     2,     2,     2,     1,     2,     3,     2,     1,
-       1,     1,     1,     2,     2,     2,     1,     1,     1,     1,
-       1,     3,     3,     3,     1,     3,     3,     1,     3,     3,
-       1,     3,     3,     3,     3,     1,     3,     3,     1,     3,
-       1,     3,     1,     3,     1,     3,     1,     3,     1,     3,
-       1,     5,     1,     3,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     3,     1,     2,     2,
-       4,     2,     1,     1,     2,     3,     3,     2,     5,     3,
-       2,     3,     2,     0,     1,     1,     1,     1,     1,     3,
-       5,     6,     7,     8,     5,     1,     2,     4,     5,     6,
-       7,     4,     2,     1,     2,     4,     1,     3,     1,     3,
-       1,     1,     1,     1,     1,     1,     2,     1,     2,     2,
-       3,     1,     1,     1,     1,     2,     1,     1,     2,     2,
-       1,     1,     2,     1,     3,     4,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     5,     4,     1,     2,     3,     1,     3,
-       1,     4,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     2,     3,     1,     1,     2,     3,     1,
-       2,     1,     2,     5,     3,     1,     1,     4,     5,     3,
-       2,     5,     7,     6,     1,     1,     1,     0,     2,     3,
-       2,     2,     2,     3,     2,     1,     1,     1,     2
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint16 yydefact[] =
-{
-       4,     0,     0,    10,     0,     1,     2,     5,     0,     0,
-      11,     0,   153,   152,   173,   170,   171,   172,   177,   178,
-     179,   180,   181,   182,   183,   184,   185,   174,   175,   176,
-       0,   156,   157,   160,   154,   142,   141,   140,   186,   187,
-     188,   189,   190,   191,   192,   193,   194,   195,   196,   198,
-     199,   200,   201,   203,   204,   205,   206,   207,   208,   209,
-     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
-       0,   169,   168,   151,   222,   221,   220,     0,     0,     0,
-       0,     0,     0,   197,   202,   277,     3,   276,     0,     0,
-     103,   113,     0,   118,   125,   145,   147,     0,   144,   133,
-     161,   163,   166,     0,   167,    13,   275,     0,   158,   159,
-     155,     0,     0,   132,     0,   149,     0,     6,     7,     8,
-       9,     0,    14,    98,     0,   278,   101,   113,   143,   114,
-     115,   116,   104,     0,   113,     0,    99,   126,   146,   148,
-     134,     0,   162,     0,     0,     0,     0,   225,   150,     0,
-     138,     0,   136,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    15,    19,    17,    18,    20,    41,
-       0,     0,     0,    46,    47,    48,    49,   251,     0,   247,
-      16,    22,    42,    24,    29,    30,     0,     0,    35,     0,
-      50,     0,    54,    57,    60,    65,    68,    70,    72,    74,
-      76,    78,    80,    82,    95,     0,   233,     0,   133,   236,
-     249,   235,   234,     0,   237,   238,   239,   240,   241,   242,
-     105,   110,   112,   117,     0,   119,   106,     0,     0,   164,
-      50,    97,     0,    39,    12,     0,   230,     0,   228,   224,
-     226,   100,     0,   135,     0,   271,   270,     0,     0,     0,
-     274,   272,     0,     0,     0,   260,     0,    43,    44,     0,
-     243,     0,    26,    27,     0,     0,    33,    32,     0,   169,
-      36,    38,    85,    86,    88,    87,    90,    91,    92,    93,
-      94,    89,    84,     0,    45,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   252,   248,   250,   107,
-     109,   111,     0,     0,   127,     0,   232,   131,   165,   223,
-       0,     0,   227,   139,   137,     0,   265,   264,   267,     0,
-     273,     0,   259,   151,   256,     0,     0,    21,   244,     0,
-      28,    25,    31,    37,    83,    51,    52,    53,    55,    56,
-      58,    59,    63,    64,    61,    62,    66,    67,    69,    71,
-      73,    75,    77,    79,     0,    96,     0,   120,     0,   124,
-       0,   128,     0,   229,     0,   266,     0,     0,     0,     0,
-       0,     0,    23,     0,     0,     0,   121,   129,     0,   231,
-       0,   268,     0,   255,   253,   258,     0,   246,   261,   245,
-      81,   108,   122,     0,   130,     0,   269,   263,     0,   257,
-     123,   262,   254
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,     2,     9,     3,    85,     6,    10,    86,   180,   181,
-     182,   339,   183,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
-     201,   202,   203,   204,   283,   205,   232,   206,   207,    89,
-      90,    91,   221,   132,   133,   222,    92,    93,    94,    95,
-     151,   152,    96,   134,    97,    98,   233,   100,   101,   102,
-     103,   104,   146,   147,   237,   238,   317,   209,   210,   211,
-     212,   398,   399,   213,   214,   215,   394,   336,   216,   217,
-     218,   328,   376,   377,   219,   105,   106
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -350
-static const yytype_int16 yypact[] =
-{
-     -78,   -56,    54,  -350,   -52,  -350,   -37,  -350,     8,  3302,
-    -350,   -26,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-      88,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-     -66,  -350,  -350,    42,  -350,  -350,  -350,    70,    -4,    10,
-      29,    34,   -79,  -350,  -350,  -350,  3302,  -350,   -19,   -24,
-     -69,     5,  -154,  -350,   102,    16,    16,  3490,  -350,  -350,
-    -350,    18,  -350,  3562,  -350,  -350,  -350,   108,  -350,  -350,
-    -350,    -8,  3490,  -350,    16,  -350,  3562,  -350,  -350,  -350,
-    -350,   138,  -350,  -350,   387,  -350,  -350,    24,  -350,  -350,
-    -350,  -350,  -350,  3490,   147,   141,  -350,  -166,  -350,  -350,
-    -350,  2387,  -350,   106,  3490,   144,  1772,  -350,  -350,     7,
-      11,   -87,  -350,    14,    15,  1243,    30,    32,    20,  2004,
-      37,  2936,    25,    39,   -65,  -350,  -350,  -350,  -350,  -350,
-    2936,  2936,  2936,  -350,  -350,  -350,  -350,  -350,   601,  -350,
-    -350,  -350,   -59,  -350,  -350,  -350,    28,   -82,  3119,    43,
-     -30,  2936,   -11,    -2,   118,   -74,   114,    35,    31,    36,
-     148,   152,   -77,  -350,  -350,  -115,  -350,    40,    52,  -350,
-    -350,  -350,  -350,   815,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,   172,  3490,  -180,  -350,  2570,  2936,  -350,
-    -350,  -350,    53,  -350,  -350,  1888,    55,  -113,  -350,  -350,
-    -350,  -350,   173,  -350,   138,  -350,  -350,   178,  1656,  2936,
-    -350,  -350,  -108,  2936,  -161,  -350,  2204,  -350,  -350,   -68,
-    -350,  1029,  -350,  -350,  2936,  3418,  -350,  -350,  2936,    61,
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  2936,  -350,  2936,  2936,  2936,  2936,  2936,
-    2936,  2936,  2936,  2936,  2936,  2936,  2936,  2936,  2936,  2936,
-    2936,  2936,  2936,  2936,  2936,  2936,  -350,  -350,  -350,    63,
-    -350,  -350,  2753,  2936,    46,    60,  -350,  -350,  -350,  -350,
-    2936,   144,  -350,  -350,  -350,    67,  -350,  -350,  2204,   -55,
-    -350,   -54,  -350,   238,    65,   188,    71,  -350,  -350,    72,
-      65,    73,  -350,  -350,  -350,  -350,  -350,  -350,   -11,   -11,
-      -2,    -2,   118,   118,   118,   118,   -74,   -74,   114,    35,
-      31,    36,   148,   152,  -157,  -350,  2936,    56,    83,  -350,
-    2936,    68,    84,  -350,  2936,  -350,    69,    90,  1243,    74,
-      77,  1456,  -350,  2936,    86,  2936,    79,  -350,  2936,  -350,
-     -53,  2936,  1456,   255,  -350,  -350,  2936,  -350,  -350,  -350,
-    -350,  -350,  -350,  2936,  -350,    80,    65,  -350,  1243,  -350,
-    -350,  -350,  -350
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
-{
-    -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,  -350,
-    -350,  -350,  -350,  -350,    22,  -350,  -350,  -350,  -350,  -135,
-    -350,   -83,   -81,  -104,   -85,   -13,    -6,    -5,    -3,    -1,
-      -7,  -350,  -133,   -97,  -350,  -156,  -193,     9,    12,  -350,
-    -350,  -350,    76,   170,   168,    81,  -350,  -350,  -239,  -350,
-    -350,    59,   -71,  -350,  -350,   -72,    -9,     1,  -350,  -350,
-     227,  -350,   163,  -139,  -350,   -12,  -283,    62,  -151,  -349,
-     -67,   -84,   223,   135,    66,  -350,  -350,   -10,  -350,  -350,
-    -350,  -350,  -350,  -350,  -350,   229,  -350
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -169
-static const yytype_int16 yytable[] =
-{
-      99,   115,   114,   252,   247,   254,   230,   240,   231,   128,
-     111,  -168,   292,   293,   303,   312,   259,   335,    87,    12,
-      13,    88,     4,   138,   139,   262,   263,   226,   128,   227,
-     369,     1,   397,   313,   315,   257,   258,   305,   129,   130,
-     131,   305,   148,   397,   135,    12,    13,   228,    30,    31,
-      32,   332,    33,    34,     5,   383,   284,   129,   130,   131,
-     136,     7,   308,   272,   273,   274,   275,   276,   277,   278,
-     279,   280,   281,     8,    30,    31,    32,    99,    33,    34,
-      35,    36,    37,   305,    11,   321,   107,   387,   140,   335,
-     305,   270,   230,   329,   231,    87,   240,   331,    88,   306,
-     334,   322,   402,   145,   142,   404,   330,   243,   340,   117,
-     308,   244,   267,   409,   121,   208,   268,   149,   113,   368,
-     410,   108,   109,   118,   223,   110,   337,   372,   -40,   127,
-     305,   316,   294,   295,   304,   145,   264,   145,   265,   378,
-     379,   405,   119,   305,   305,   305,   208,   120,   364,   112,
-     345,   346,   347,   230,   230,   230,   230,   230,   230,   230,
-     230,   230,   230,   230,   230,   230,   230,   230,   230,   208,
-     126,   343,   334,   384,    74,    75,    76,   230,   137,   231,
-     129,   130,   131,   282,   143,   230,   344,   231,   352,   353,
-     354,   355,   285,   286,   287,   123,   124,   288,   289,  -102,
-     290,   291,   296,   297,   208,   348,   349,   144,   365,   350,
-     351,   356,   357,   141,   150,   223,   316,   225,   390,   234,
-     236,   241,   266,   248,   242,   249,   145,   393,   245,   246,
-     253,   230,   256,   231,   250,   406,   271,   255,   301,   208,
-     299,    12,    13,   298,   302,   -39,   300,   208,   309,   318,
-     320,   323,   208,   325,   123,   -34,   371,   412,   366,   370,
-     374,   115,   114,   305,   380,   381,   -40,   408,   382,   385,
-      30,    31,    32,   316,    33,    34,    35,    36,    37,   386,
-     389,   388,   401,   391,   392,   358,   400,   342,   316,   178,
-     396,   316,   403,   359,   411,   360,   363,   220,   361,   316,
-     310,   362,   224,   324,   116,   311,   316,   235,   407,   373,
-     326,   125,   395,   261,   327,   122,     0,     0,   375,   208,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   208,
-       0,     0,   208,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   208,     0,     0,     0,     0,     0,     0,
-      12,    13,    14,    15,    16,    17,   153,   154,   155,   208,
-     156,   157,   158,   159,   160,   161,   162,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,     0,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,   163,   164,   165,   166,   167,   168,   169,     0,
-       0,   170,   171,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      73,    74,    75,    76,     0,    77,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    82,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    83,     0,    84,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     172,     0,     0,     0,     0,     0,   173,   174,   175,   176,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   177,   178,   179,    12,    13,    14,    15,    16,    17,
-     153,   154,   155,     0,   156,   157,   158,   159,   160,   161,
-     162,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,     0,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,   163,   164,   165,   166,
-     167,   168,   169,     0,     0,   170,   171,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    73,    74,    75,    76,     0,    77,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    82,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    83,     0,    84,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   172,     0,     0,     0,     0,     0,
-     173,   174,   175,   176,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   177,   178,   260,    12,    13,
-      14,    15,    16,    17,   153,   154,   155,     0,   156,   157,
-     158,   159,   160,   161,   162,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-       0,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-     163,   164,   165,   166,   167,   168,   169,     0,     0,   170,
-     171,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    73,    74,
-      75,    76,     0,    77,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    82,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    83,
-       0,    84,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   172,     0,
-       0,     0,     0,     0,   173,   174,   175,   176,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   177,
-     178,   307,    12,    13,    14,    15,    16,    17,   153,   154,
-     155,     0,   156,   157,   158,   159,   160,   161,   162,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,     0,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,   163,   164,   165,   166,   167,   168,
-     169,     0,     0,   170,   171,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    73,    74,    75,    76,     0,    77,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    82,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    83,     0,    84,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   172,     0,     0,     0,     0,     0,   173,   174,
-     175,   176,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   177,   178,   338,    12,    13,    14,    15,
-      16,    17,   153,   154,   155,     0,   156,   157,   158,   159,
-     160,   161,   162,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,     0,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,   163,   164,
-     165,   166,   167,   168,   169,     0,     0,   170,   171,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    73,    74,    75,    76,
-       0,    77,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    82,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    83,     0,    84,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   172,     0,     0,     0,
-       0,     0,   173,   174,   175,   176,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   177,   178,    12,
-      13,    14,    15,    16,    17,   153,   154,   155,     0,   156,
-     157,   158,   159,   160,   161,   162,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,     0,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,   163,   164,   165,   166,   167,   168,   169,     0,     0,
-     170,   171,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    73,
-      74,    75,    76,     0,    77,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    82,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      83,     0,    84,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   172,
-       0,     0,     0,     0,     0,   173,   174,   175,   176,    12,
-      13,    14,    15,    16,    17,     0,     0,     0,     0,     0,
-     177,   124,     0,     0,     0,     0,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,     0,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,     0,   164,   165,   166,   167,   168,   169,     0,     0,
-     170,   171,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    73,
-      74,    75,    76,     0,    77,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    82,    14,    15,    16,
-      17,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,     0,     0,     0,     0,     0,     0,
-      83,     0,    84,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,     0,    72,   172,
-       0,     0,     0,     0,     0,   173,   174,   175,   176,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     177,     0,     0,     0,     0,     0,    74,    75,    76,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    14,    15,    16,    17,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-       0,     0,     0,     0,     0,     0,    83,     0,    84,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,     0,    72,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   239,     0,
-       0,     0,    74,    75,    76,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    14,
-      15,    16,    17,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,     0,     0,     0,     0,
-       0,     0,    83,     0,    84,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,     0,
-     164,   165,   166,   167,   168,   169,     0,     0,   170,   171,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   319,     0,     0,     0,    74,    75,
-      76,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    83,     0,
-      84,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   172,     0,     0,
-       0,     0,     0,   173,   174,   175,   176,    12,    13,    14,
-      15,    16,    17,     0,     0,     0,     0,     0,   251,     0,
-       0,     0,     0,     0,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,     0,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,     0,
-     164,   165,   166,   167,   168,   169,     0,     0,   170,   171,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   333,    74,    75,
-      76,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    82,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    83,     0,
-      84,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    14,    15,    16,    17,     0,   172,     0,     0,
-       0,     0,     0,   173,   174,   175,   176,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,     0,   164,   165,   166,   167,   168,   169,     0,
-       0,   170,   171,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    74,    75,    76,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    83,     0,    84,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    14,    15,    16,    17,     0,
-     172,     0,     0,   229,     0,     0,   173,   174,   175,   176,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,     0,   164,   165,   166,   167,
-     168,   169,     0,     0,   170,   171,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    74,    75,    76,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    83,     0,    84,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    14,    15,
-      16,    17,     0,   172,     0,     0,   314,     0,     0,   173,
-     174,   175,   176,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,     0,   164,
-     165,   166,   167,   168,   169,     0,     0,   170,   171,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    74,    75,    76,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    83,     0,    84,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    14,    15,    16,    17,     0,   172,     0,     0,   367,
-       0,     0,   173,   174,   175,   176,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,     0,   164,   165,   166,   167,   168,   169,     0,     0,
-     170,   171,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      74,    75,    76,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      83,     0,    84,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    14,    15,    16,    17,     0,   172,
-       0,     0,     0,     0,     0,   173,   174,   175,   176,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,   269,     0,   164,   165,   166,   167,   168,
-     169,     0,     0,   170,   171,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    74,    75,    76,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    83,     0,    84,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    12,    13,    14,    15,    16,
-      17,     0,   172,     0,     0,     0,     0,     0,   173,   174,
-     175,   176,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,     0,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,     0,    72,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    73,    74,    75,    76,     0,
-      77,     0,     0,     0,     0,     0,     0,     0,    78,    79,
-      80,    81,    82,    14,    15,    16,    17,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-       0,     0,     0,     0,     0,     0,    83,     0,    84,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,     0,   341,    14,    15,    16,    17,   169,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    74,    75,    76,     0,     0,     0,     0,     0,
-       0,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,     0,    72,    14,    15,    16,
-      17,     0,    83,     0,    84,     0,     0,     0,     0,     0,
-       0,     0,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    74,    75,    76,     0,     0,     0,
-       0,     0,     0,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,     0,    72,     0,
-       0,     0,     0,     0,    83,     0,    84,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    83,     0,    84
-};
-
-static const yytype_int16 yycheck[] =
-{
-       9,    73,    73,   159,   155,   161,   141,   146,   141,     4,
-      76,    76,    86,    87,    91,   195,   172,   256,     9,     3,
-       4,     9,    78,    95,    96,    84,    85,   193,     4,   195,
-     313,   109,   381,   213,   227,   170,   171,   198,    33,    34,
-      35,   198,   114,   392,   198,     3,     4,   213,    32,    33,
-      34,   212,    36,    37,     0,   212,   191,    33,    34,    35,
-     214,   113,   213,    93,    94,    95,    96,    97,    98,    99,
-     100,   101,   102,   110,    32,    33,    34,    86,    36,    37,
-      38,    39,    40,   198,    76,   198,   112,   370,    97,   328,
-     198,   188,   227,   249,   227,    86,   235,   253,    86,   214,
-     256,   214,   385,   112,   103,   388,   214,   194,   264,   113,
-     261,   198,   194,   396,   193,   124,   198,   116,    76,   312,
-     403,    33,    34,   113,   133,    37,   194,   320,   193,   198,
-     198,   228,   206,   207,   211,   144,   195,   146,   197,   194,
-     194,   194,   113,   198,   198,   198,   155,   113,   304,   215,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   178,
-     194,   268,   328,   366,   104,   105,   106,   312,    76,   312,
-      33,    34,    35,   213,    76,   320,   283,   320,   292,   293,
-     294,   295,   203,   204,   205,   214,   215,   199,   200,   194,
-      82,    83,    88,    89,   213,   288,   289,   215,   305,   290,
-     291,   296,   297,   195,    76,   224,   313,    76,   374,   113,
-      76,   214,   194,   193,   213,   193,   235,   378,   214,   214,
-     193,   366,   193,   366,   214,   391,   193,   212,    90,   248,
-     209,     3,     4,   208,    92,   193,   210,   256,    76,   196,
-     195,    78,   261,    75,   214,   194,   196,   408,   195,   213,
-     193,   333,   333,   198,    76,   194,   193,    12,   196,   213,
-      32,    33,    34,   370,    36,    37,    38,    39,    40,   196,
-     196,   213,   196,   214,   194,   298,   383,   265,   385,   215,
-     213,   388,   213,   299,   214,   300,   303,   127,   301,   396,
-     224,   302,   134,   244,    77,   224,   403,   144,   392,   321,
-     248,    88,   379,   178,   248,    86,    -1,    -1,   328,   328,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   378,
-      -1,    -1,   381,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   392,    -1,    -1,    -1,    -1,    -1,    -1,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,   408,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    -1,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    -1,
-      -1,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     103,   104,   105,   106,    -1,   108,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   154,    -1,   156,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     193,    -1,    -1,    -1,    -1,    -1,   199,   200,   201,   202,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   214,   215,   216,     3,     4,     5,     6,     7,     8,
-       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    -1,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    -1,    -1,    84,    85,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   103,   104,   105,   106,    -1,   108,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   120,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   154,    -1,   156,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   193,    -1,    -1,    -1,    -1,    -1,
-     199,   200,   201,   202,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   214,   215,   216,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    -1,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      -1,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    -1,    -1,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   103,   104,
-     105,   106,    -1,   108,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,
-      -1,   156,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   193,    -1,
-      -1,    -1,    -1,    -1,   199,   200,   201,   202,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   214,
-     215,   216,     3,     4,     5,     6,     7,     8,     9,    10,
-      11,    -1,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    -1,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    -1,    -1,    84,    85,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   103,   104,   105,   106,    -1,   108,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   154,    -1,   156,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   193,    -1,    -1,    -1,    -1,    -1,   199,   200,
-     201,   202,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   214,   215,   216,     3,     4,     5,     6,
-       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    -1,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    -1,    -1,    84,    85,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   103,   104,   105,   106,
-      -1,   108,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   120,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,   156,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   193,    -1,    -1,    -1,
-      -1,    -1,   199,   200,   201,   202,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   214,   215,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    -1,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    -1,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    -1,    -1,
-      84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   103,
-     104,   105,   106,    -1,   108,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     154,    -1,   156,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   193,
-      -1,    -1,    -1,    -1,    -1,   199,   200,   201,   202,     3,
-       4,     5,     6,     7,     8,    -1,    -1,    -1,    -1,    -1,
-     214,   215,    -1,    -1,    -1,    -1,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    -1,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    -1,    76,    77,    78,    79,    80,    81,    -1,    -1,
-      84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   103,
-     104,   105,   106,    -1,   108,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   120,     5,     6,     7,
-       8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,
-     154,    -1,   156,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    74,    -1,    76,   193,
-      -1,    -1,    -1,    -1,    -1,   199,   200,   201,   202,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     214,    -1,    -1,    -1,    -1,    -1,   104,   105,   106,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     5,     6,     7,     8,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,   156,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    -1,    76,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   216,    -1,
-      -1,    -1,   104,   105,   106,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,
-       6,     7,     8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    -1,    -1,    -1,    -1,
-      -1,    -1,   154,    -1,   156,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,    72,    73,    74,    -1,
-      76,    77,    78,    79,    80,    81,    -1,    -1,    84,    85,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   216,    -1,    -1,    -1,   104,   105,
-     106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,
-     156,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   193,    -1,    -1,
-      -1,    -1,    -1,   199,   200,   201,   202,     3,     4,     5,
-       6,     7,     8,    -1,    -1,    -1,    -1,    -1,   214,    -1,
-      -1,    -1,    -1,    -1,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,    72,    73,    74,    -1,
-      76,    77,    78,    79,    80,    81,    -1,    -1,    84,    85,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   103,   104,   105,
-     106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   120,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,
-     156,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,     5,     6,     7,     8,    -1,   193,    -1,    -1,
-      -1,    -1,    -1,   199,   200,   201,   202,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    -1,    76,    77,    78,    79,    80,    81,    -1,
-      -1,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   104,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   154,    -1,   156,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     5,     6,     7,     8,    -1,
-     193,    -1,    -1,   196,    -1,    -1,   199,   200,   201,   202,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    74,    -1,    76,    77,    78,    79,
-      80,    81,    -1,    -1,    84,    85,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   104,   105,   106,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   154,    -1,   156,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     5,     6,
-       7,     8,    -1,   193,    -1,    -1,   196,    -1,    -1,   199,
-     200,   201,   202,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    74,    -1,    76,
-      77,    78,    79,    80,    81,    -1,    -1,    84,    85,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,   105,   106,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,   156,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,     5,     6,     7,     8,    -1,   193,    -1,    -1,   196,
-      -1,    -1,   199,   200,   201,   202,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    -1,    76,    77,    78,    79,    80,    81,    -1,    -1,
-      84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     104,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     154,    -1,   156,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,     5,     6,     7,     8,    -1,   193,
-      -1,    -1,    -1,    -1,    -1,   199,   200,   201,   202,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    -1,    76,    77,    78,    79,    80,
-      81,    -1,    -1,    84,    85,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   104,   105,   106,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   154,    -1,   156,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
-       8,    -1,   193,    -1,    -1,    -1,    -1,    -1,   199,   200,
-     201,   202,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    -1,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    74,    -1,    76,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   103,   104,   105,   106,    -1,
-     108,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   116,   117,
-     118,   119,   120,     5,     6,     7,     8,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,   156,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    -1,    76,     5,     6,     7,     8,    81,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,   104,   105,   106,    -1,    -1,    -1,    -1,    -1,
-      -1,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    74,    -1,    76,     5,     6,     7,
-       8,    -1,   154,    -1,   156,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,   104,   105,   106,    -1,    -1,    -1,
-      -1,    -1,    -1,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    74,    -1,    76,    -1,
-      -1,    -1,    -1,    -1,   154,    -1,   156,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,   156
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint16 yystos[] =
-{
-       0,   109,   218,   220,    78,     0,   222,   113,   110,   219,
-     223,    76,     3,     4,     5,     6,     7,     8,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    76,   103,   104,   105,   106,   108,   116,   117,
-     118,   119,   120,   154,   156,   221,   224,   254,   255,   256,
-     257,   258,   263,   264,   265,   266,   269,   271,   272,   273,
-     274,   275,   276,   277,   278,   302,   303,   112,    33,    34,
-      37,    76,   215,    76,   269,   272,   277,   113,   113,   113,
-     113,   193,   302,   214,   215,   289,   194,   198,     4,    33,
-      34,    35,   260,   261,   270,   198,   214,    76,   272,   272,
-     273,   195,   274,    76,   215,   273,   279,   280,   272,   274,
-      76,   267,   268,     9,    10,    11,    13,    14,    15,    16,
-      17,    18,    19,    75,    76,    77,    78,    79,    80,    81,
-      84,    85,   193,   199,   200,   201,   202,   214,   215,   216,
-     225,   226,   227,   229,   230,   231,   232,   233,   234,   235,
-     236,   237,   238,   239,   240,   241,   242,   243,   244,   245,
-     246,   247,   248,   249,   250,   252,   254,   255,   273,   284,
-     285,   286,   287,   290,   291,   292,   295,   296,   297,   301,
-     260,   259,   262,   273,   261,    76,   193,   195,   213,   196,
-     236,   249,   253,   273,   113,   279,    76,   281,   282,   216,
-     280,   214,   213,   194,   198,   214,   214,   285,   193,   193,
-     214,   214,   252,   193,   252,   212,   193,   236,   236,   252,
-     216,   290,    84,    85,   195,   197,   194,   194,   198,    74,
-     250,   193,    93,    94,    95,    96,    97,    98,    99,   100,
-     101,   102,   213,   251,   236,   203,   204,   205,   199,   200,
-      82,    83,    86,    87,   206,   207,    88,    89,   208,   209,
-     210,    90,    92,    91,   211,   198,   214,   216,   285,    76,
-     259,   262,   195,   213,   196,   253,   250,   283,   196,   216,
-     195,   198,   214,    78,   268,    75,   284,   291,   298,   252,
-     214,   252,   212,   103,   252,   265,   294,   194,   216,   228,
-     252,    76,   231,   250,   250,   236,   236,   236,   238,   238,
-     239,   239,   240,   240,   240,   240,   241,   241,   242,   243,
-     244,   245,   246,   247,   252,   250,   195,   196,   253,   283,
-     213,   196,   253,   282,   193,   294,   299,   300,   194,   194,
-      76,   194,   196,   212,   253,   213,   196,   283,   213,   196,
-     252,   214,   194,   285,   293,   287,   213,   286,   288,   289,
-     250,   196,   283,   213,   283,   194,   252,   288,    12,   283,
-     283,   214,   285
-};
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  However,
-   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
-   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
-   discussed.  */
-
-#define YYFAIL		goto yyerrlab
-#if defined YYFAIL
-  /* This is here to suppress warnings from the GCC cpp's
-     -Wunused-macros.  Normally we don't worry about that warning, but
-     some users do, and we want to make it easy for users to remove
-     YYFAIL uses, which will produce warnings from Bison 2.5.  */
-#endif
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \
-      YYERROR;							\
-    }								\
-while (YYID (0))
-
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, &yylloc, scanner)
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
-do {									  \
-  if (yydebug)								  \
-    {									  \
-      YYFPRINTF (stderr, "%s ", Title);					  \
-      yy_symbol_print (stderr,						  \
-		  Type, Value, Location, state); \
-      YYFPRINTF (stderr, "\n");						  \
-    }									  \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    YYLTYPE const * const yylocationp;
-    struct _mesa_glsl_parse_state *state;
-#endif
-{
-  if (!yyvaluep)
-    return;
-  YYUSE (yylocationp);
-  YYUSE (state);
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    YYLTYPE const * const yylocationp;
-    struct _mesa_glsl_parse_state *state;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  YY_LOCATION_PRINT (yyoutput, *yylocationp);
-  YYFPRINTF (yyoutput, ": ");
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct _mesa_glsl_parse_state *state)
-#else
-static void
-yy_reduce_print (yyvsp, yylsp, yyrule, state)
-    YYSTYPE *yyvsp;
-    YYLTYPE *yylsp;
-    int yyrule;
-    struct _mesa_glsl_parse_state *state;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-	     yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       , &(yylsp[(yyi + 1) - (yynrhs)])		       , state);
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, yylsp, Rule, state); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-	switch (*++yyp)
-	  {
-	  case '\'':
-	  case ',':
-	    goto do_not_strip_quotes;
-
-	  case '\\':
-	    if (*++yyp != '\\')
-	      goto do_not_strip_quotes;
-	    /* Fall through.  */
-	  default:
-	    if (yyres)
-	      yyres[yyn] = *yyp;
-	    yyn++;
-	    break;
-
-	  case '"':
-	    if (yyres)
-	      yyres[yyn] = '\0';
-	    return yyn;
-	  }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct _mesa_glsl_parse_state *state)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp, state)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-    YYLTYPE *yylocationp;
-    struct _mesa_glsl_parse_state *state;
-#endif
-{
-  YYUSE (yyvaluep);
-  YYUSE (yylocationp);
-  YYUSE (state);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
-}
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (struct _mesa_glsl_parse_state *state);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (struct _mesa_glsl_parse_state *state)
-#else
-int
-yyparse (state)
-    struct _mesa_glsl_parse_state *state;
-#endif
-#endif
-{
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Location data for the lookahead symbol.  */
-YYLTYPE yylloc;
-
-    /* Number of syntax errors so far.  */
-    int yynerrs;
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-       `yyls': related to locations.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    /* The location stack.  */
-    YYLTYPE yylsa[YYINITDEPTH];
-    YYLTYPE *yyls;
-    YYLTYPE *yylsp;
-
-    /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[3];
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-  YYLTYPE yyloc;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yyls = yylsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-  yylsp = yyls;
-
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-  /* Initialize the default location before parsing starts.  */
-  yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 1;
-#endif
-
-/* User initialization code.  */
-
-/* Line 1251 of yacc.c  */
-#line 41 "glsl_parser.ypp"
-{
-   yylloc.first_line = 1;
-   yylloc.first_column = 1;
-   yylloc.last_line = 1;
-   yylloc.last_column = 1;
-   yylloc.source = 0;
-}
-
-/* Line 1251 of yacc.c  */
-#line 2635 "glsl_parser.cpp"
-  yylsp[0] = yylloc;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack.  Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	yytype_int16 *yyss1 = yyss;
-	YYLTYPE *yyls1 = yyls;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow (YY_("memory exhausted"),
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yyls1, yysize * sizeof (*yylsp),
-		    &yystacksize);
-
-	yyls = yyls1;
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	yytype_int16 *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-	YYSTACK_RELOCATE (yyls_alloc, yyls);
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-      yylsp = yyls + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-  *++yylsp = yylloc;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-  /* Default location.  */
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-
-/* Line 1464 of yacc.c  */
-#line 212 "glsl_parser.ypp"
-    {
-	   _mesa_glsl_initialize_types(state);
-	;}
-    break;
-
-  case 5:
-
-/* Line 1464 of yacc.c  */
-#line 221 "glsl_parser.ypp"
-    {
-	   switch ((yyvsp[(2) - (3)].n)) {
-	   case 100:
-	      state->es_shader = true;
-	   case 110:
-	   case 120:
-	   case 130:
-	      /* FINISHME: Check against implementation support versions. */
-	      state->language_version = (yyvsp[(2) - (3)].n);
-	      break;
-	   default:
-	      _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "Shading language version"
-			       "%u is not supported\n", (yyvsp[(2) - (3)].n));
-	      break;
-	   }
-	;}
-    break;
-
-  case 12:
-
-/* Line 1464 of yacc.c  */
-#line 253 "glsl_parser.ypp"
-    {
-	   if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
-	      YYERROR;
-	   }
-	;}
-    break;
-
-  case 13:
-
-/* Line 1464 of yacc.c  */
-#line 262 "glsl_parser.ypp"
-    {
-	   /* FINISHME: The NULL test is only required because 'precision'
-	    * FINISHME: statements are not yet supported.
-	    */
-	   if ((yyvsp[(1) - (1)].node) != NULL)
-	      state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link);
-	;}
-    break;
-
-  case 14:
-
-/* Line 1464 of yacc.c  */
-#line 270 "glsl_parser.ypp"
-    {
-	   /* FINISHME: The NULL test is only required because 'precision'
-	    * FINISHME: statements are not yet supported.
-	    */
-	   if ((yyvsp[(2) - (2)].node) != NULL)
-	      state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link);
-	;}
-    break;
-
-  case 16:
-
-/* Line 1464 of yacc.c  */
-#line 285 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)].identifier);
-	;}
-    break;
-
-  case 17:
-
-/* Line 1464 of yacc.c  */
-#line 292 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1)].n);
-	;}
-    break;
-
-  case 18:
-
-/* Line 1464 of yacc.c  */
-#line 299 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - (1)].n);
-	;}
-    break;
-
-  case 19:
-
-/* Line 1464 of yacc.c  */
-#line 306 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real);
-	;}
-    break;
-
-  case 20:
-
-/* Line 1464 of yacc.c  */
-#line 313 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - (1)].n);
-	;}
-    break;
-
-  case 21:
-
-/* Line 1464 of yacc.c  */
-#line 320 "glsl_parser.ypp"
-    {
-	   (yyval.expression) = (yyvsp[(2) - (3)].expression);
-	;}
-    break;
-
-  case 23:
-
-/* Line 1464 of yacc.c  */
-#line 328 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 24:
-
-/* Line 1464 of yacc.c  */
-#line 334 "glsl_parser.ypp"
-    {
-	   (yyval.expression) = (yyvsp[(1) - (1)].expression);
-	;}
-    break;
-
-  case 25:
-
-/* Line 1464 of yacc.c  */
-#line 338 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)].identifier);
-	;}
-    break;
-
-  case 26:
-
-/* Line 1464 of yacc.c  */
-#line 345 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 27:
-
-/* Line 1464 of yacc.c  */
-#line 351 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 31:
-
-/* Line 1464 of yacc.c  */
-#line 369 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 36:
-
-/* Line 1464 of yacc.c  */
-#line 388 "glsl_parser.ypp"
-    {
-	   (yyval.expression) = (yyvsp[(1) - (2)].expression);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
-	;}
-    break;
-
-  case 37:
-
-/* Line 1464 of yacc.c  */
-#line 394 "glsl_parser.ypp"
-    {
-	   (yyval.expression) = (yyvsp[(1) - (3)].expression);
-	   (yyval.expression)->set_location(yylloc);
-	   (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
-	;}
-    break;
-
-  case 39:
-
-/* Line 1464 of yacc.c  */
-#line 410 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier));
-	   (yyval.expression)->set_location(yylloc);
-   	;}
-    break;
-
-  case 40:
-
-/* Line 1464 of yacc.c  */
-#line 416 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
-	   (yyval.expression) = new(ctx) ast_function_expression(callee);
-	   (yyval.expression)->set_location(yylloc);
-   	;}
-    break;
-
-  case 41:
-
-/* Line 1464 of yacc.c  */
-#line 423 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
-	   (yyval.expression) = new(ctx) ast_function_expression(callee);
-	   (yyval.expression)->set_location(yylloc);
-   	;}
-    break;
-
-  case 43:
-
-/* Line 1464 of yacc.c  */
-#line 435 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 44:
-
-/* Line 1464 of yacc.c  */
-#line 441 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 45:
-
-/* Line 1464 of yacc.c  */
-#line 447 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 46:
-
-/* Line 1464 of yacc.c  */
-#line 456 "glsl_parser.ypp"
-    { (yyval.n) = ast_plus; ;}
-    break;
-
-  case 47:
-
-/* Line 1464 of yacc.c  */
-#line 457 "glsl_parser.ypp"
-    { (yyval.n) = ast_neg; ;}
-    break;
-
-  case 48:
-
-/* Line 1464 of yacc.c  */
-#line 458 "glsl_parser.ypp"
-    { (yyval.n) = ast_logic_not; ;}
-    break;
-
-  case 49:
-
-/* Line 1464 of yacc.c  */
-#line 459 "glsl_parser.ypp"
-    { (yyval.n) = ast_bit_not; ;}
-    break;
-
-  case 51:
-
-/* Line 1464 of yacc.c  */
-#line 465 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 52:
-
-/* Line 1464 of yacc.c  */
-#line 471 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 53:
-
-/* Line 1464 of yacc.c  */
-#line 477 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 55:
-
-/* Line 1464 of yacc.c  */
-#line 487 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 56:
-
-/* Line 1464 of yacc.c  */
-#line 493 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 58:
-
-/* Line 1464 of yacc.c  */
-#line 503 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 59:
-
-/* Line 1464 of yacc.c  */
-#line 509 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 61:
-
-/* Line 1464 of yacc.c  */
-#line 519 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 62:
-
-/* Line 1464 of yacc.c  */
-#line 525 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 63:
-
-/* Line 1464 of yacc.c  */
-#line 531 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 64:
-
-/* Line 1464 of yacc.c  */
-#line 537 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 66:
-
-/* Line 1464 of yacc.c  */
-#line 547 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 67:
-
-/* Line 1464 of yacc.c  */
-#line 553 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 69:
-
-/* Line 1464 of yacc.c  */
-#line 563 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 71:
-
-/* Line 1464 of yacc.c  */
-#line 573 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 73:
-
-/* Line 1464 of yacc.c  */
-#line 583 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 75:
-
-/* Line 1464 of yacc.c  */
-#line 593 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 77:
-
-/* Line 1464 of yacc.c  */
-#line 603 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 79:
-
-/* Line 1464 of yacc.c  */
-#line 613 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 81:
-
-/* Line 1464 of yacc.c  */
-#line 623 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression));
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 83:
-
-/* Line 1464 of yacc.c  */
-#line 633 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
-	   (yyval.expression)->set_location(yylloc);
-	;}
-    break;
-
-  case 84:
-
-/* Line 1464 of yacc.c  */
-#line 641 "glsl_parser.ypp"
-    { (yyval.n) = ast_assign; ;}
-    break;
-
-  case 85:
-
-/* Line 1464 of yacc.c  */
-#line 642 "glsl_parser.ypp"
-    { (yyval.n) = ast_mul_assign; ;}
-    break;
-
-  case 86:
-
-/* Line 1464 of yacc.c  */
-#line 643 "glsl_parser.ypp"
-    { (yyval.n) = ast_div_assign; ;}
-    break;
-
-  case 87:
-
-/* Line 1464 of yacc.c  */
-#line 644 "glsl_parser.ypp"
-    { (yyval.n) = ast_mod_assign; ;}
-    break;
-
-  case 88:
-
-/* Line 1464 of yacc.c  */
-#line 645 "glsl_parser.ypp"
-    { (yyval.n) = ast_add_assign; ;}
-    break;
-
-  case 89:
-
-/* Line 1464 of yacc.c  */
-#line 646 "glsl_parser.ypp"
-    { (yyval.n) = ast_sub_assign; ;}
-    break;
-
-  case 90:
-
-/* Line 1464 of yacc.c  */
-#line 647 "glsl_parser.ypp"
-    { (yyval.n) = ast_ls_assign; ;}
-    break;
-
-  case 91:
-
-/* Line 1464 of yacc.c  */
-#line 648 "glsl_parser.ypp"
-    { (yyval.n) = ast_rs_assign; ;}
-    break;
-
-  case 92:
-
-/* Line 1464 of yacc.c  */
-#line 649 "glsl_parser.ypp"
-    { (yyval.n) = ast_and_assign; ;}
-    break;
-
-  case 93:
-
-/* Line 1464 of yacc.c  */
-#line 650 "glsl_parser.ypp"
-    { (yyval.n) = ast_xor_assign; ;}
-    break;
-
-  case 94:
-
-/* Line 1464 of yacc.c  */
-#line 651 "glsl_parser.ypp"
-    { (yyval.n) = ast_or_assign; ;}
-    break;
-
-  case 95:
-
-/* Line 1464 of yacc.c  */
-#line 656 "glsl_parser.ypp"
-    {
-	   (yyval.expression) = (yyvsp[(1) - (1)].expression);
-	;}
-    break;
-
-  case 96:
-
-/* Line 1464 of yacc.c  */
-#line 660 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) {
-	      (yyval.expression) = new(ctx) ast_expression(ast_sequence, NULL, NULL, NULL);
-	      (yyval.expression)->set_location(yylloc);
-	      (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (3)].expression)->link);
-	   } else {
-	      (yyval.expression) = (yyvsp[(1) - (3)].expression);
-	   }
-
-	   (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
-	;}
-    break;
-
-  case 98:
-
-/* Line 1464 of yacc.c  */
-#line 680 "glsl_parser.ypp"
-    {
-	   (yyval.node) = (yyvsp[(1) - (2)].function);
-	;}
-    break;
-
-  case 99:
-
-/* Line 1464 of yacc.c  */
-#line 684 "glsl_parser.ypp"
-    {
-	   (yyval.node) = (yyvsp[(1) - (2)].declarator_list);
-	;}
-    break;
-
-  case 100:
-
-/* Line 1464 of yacc.c  */
-#line 688 "glsl_parser.ypp"
-    {
-	   if (((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_float)
-	       && ((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_int)) {
-	      _mesa_glsl_error(& (yylsp[(3) - (4)]), state, "global precision qualifier can "
-			       "only be applied to `int' or `float'\n");
-	      YYERROR;
-	   }
-
-	   (yyval.node) = NULL; /* FINISHME */
-	;}
-    break;
-
-  case 104:
-
-/* Line 1464 of yacc.c  */
-#line 711 "glsl_parser.ypp"
-    {
-	   (yyval.function) = (yyvsp[(1) - (2)].function);
-	   (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link);
-	;}
-    break;
-
-  case 105:
-
-/* Line 1464 of yacc.c  */
-#line 716 "glsl_parser.ypp"
-    {
-	   (yyval.function) = (yyvsp[(1) - (3)].function);
-	   (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link);
-	;}
-    break;
-
-  case 106:
-
-/* Line 1464 of yacc.c  */
-#line 724 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.function) = new(ctx) ast_function();
-	   (yyval.function)->set_location(yylloc);
-	   (yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_type);
-	   (yyval.function)->identifier = (yyvsp[(2) - (3)].identifier);
-	;}
-    break;
-
-  case 107:
-
-/* Line 1464 of yacc.c  */
-#line 735 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
-	   (yyval.parameter_declarator)->set_location(yylloc);
-	   (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
-	   (yyval.parameter_declarator)->type->set_location(yylloc);
-	   (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].type_specifier);
-	   (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifier);
-	;}
-    break;
-
-  case 108:
-
-/* Line 1464 of yacc.c  */
-#line 745 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
-	   (yyval.parameter_declarator)->set_location(yylloc);
-	   (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
-	   (yyval.parameter_declarator)->type->set_location(yylloc);
-	   (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (5)].type_specifier);
-	   (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifier);
-	   (yyval.parameter_declarator)->is_array = true;
-	   (yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expression);
-	;}
-    break;
-
-  case 109:
-
-/* Line 1464 of yacc.c  */
-#line 760 "glsl_parser.ypp"
-    {
-	   (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i;
-
-	   (yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator);
-	   (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier);
-	;}
-    break;
-
-  case 110:
-
-/* Line 1464 of yacc.c  */
-#line 767 "glsl_parser.ypp"
-    {
-	   (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator);
-	   (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
-	;}
-    break;
-
-  case 111:
-
-/* Line 1464 of yacc.c  */
-#line 772 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i;
-
-	   (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
-	   (yyval.parameter_declarator)->set_location(yylloc);
-	   (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
-	   (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier);
-	   (yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].type_specifier);
-	;}
-    break;
-
-  case 112:
-
-/* Line 1464 of yacc.c  */
-#line 783 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
-	   (yyval.parameter_declarator)->set_location(yylloc);
-	   (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
-	   (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
-	   (yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].type_specifier);
-	;}
-    break;
-
-  case 113:
-
-/* Line 1464 of yacc.c  */
-#line 795 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	;}
-    break;
-
-  case 114:
-
-/* Line 1464 of yacc.c  */
-#line 799 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.in = 1;
-	;}
-    break;
-
-  case 115:
-
-/* Line 1464 of yacc.c  */
-#line 804 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.out = 1;
-	;}
-    break;
-
-  case 116:
-
-/* Line 1464 of yacc.c  */
-#line 809 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.in = 1;
-	   (yyval.type_qualifier).flags.q.out = 1;
-	;}
-    break;
-
-  case 119:
-
-/* Line 1464 of yacc.c  */
-#line 823 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL);
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 120:
-
-/* Line 1464 of yacc.c  */
-#line 832 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), true, NULL, NULL);
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 121:
-
-/* Line 1464 of yacc.c  */
-#line 841 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL);
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 122:
-
-/* Line 1464 of yacc.c  */
-#line 850 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression));
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 123:
-
-/* Line 1464 of yacc.c  */
-#line 859 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].identifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression));
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 124:
-
-/* Line 1464 of yacc.c  */
-#line 868 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression));
-	   decl->set_location(yylloc);
-
-	   (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 125:
-
-/* Line 1464 of yacc.c  */
-#line 881 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   if ((yyvsp[(1) - (1)].fully_specified_type)->specifier->type_specifier != ast_struct) {
-	      _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "empty declaration list\n");
-	      YYERROR;
-	   } else {
-	      (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type));
-	      (yyval.declarator_list)->set_location(yylloc);
-	   }
-	;}
-    break;
-
-  case 126:
-
-/* Line 1464 of yacc.c  */
-#line 892 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL);
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (2)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 127:
-
-/* Line 1464 of yacc.c  */
-#line 901 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), true, NULL, NULL);
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 128:
-
-/* Line 1464 of yacc.c  */
-#line 910 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].identifier), true, (yyvsp[(4) - (5)].expression), NULL);
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (5)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 129:
-
-/* Line 1464 of yacc.c  */
-#line 919 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression));
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (6)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 130:
-
-/* Line 1464 of yacc.c  */
-#line 928 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression));
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (7)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 131:
-
-/* Line 1464 of yacc.c  */
-#line 937 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression));
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type));
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 132:
-
-/* Line 1464 of yacc.c  */
-#line 946 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL);
-
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list(NULL);
-	   (yyval.declarator_list)->set_location(yylloc);
-	   (yyval.declarator_list)->invariant = true;
-
-	   (yyval.declarator_list)->declarations.push_tail(&decl->link);
-	;}
-    break;
-
-  case 133:
-
-/* Line 1464 of yacc.c  */
-#line 960 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
-	   (yyval.fully_specified_type)->set_location(yylloc);
-	   (yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_specifier);
-	;}
-    break;
-
-  case 134:
-
-/* Line 1464 of yacc.c  */
-#line 967 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
-	   (yyval.fully_specified_type)->set_location(yylloc);
-	   (yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qualifier);
-	   (yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_specifier);
-	;}
-    break;
-
-  case 135:
-
-/* Line 1464 of yacc.c  */
-#line 978 "glsl_parser.ypp"
-    {
-	  (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
-	;}
-    break;
-
-  case 137:
-
-/* Line 1464 of yacc.c  */
-#line 986 "glsl_parser.ypp"
-    {
-	   if (((yyvsp[(1) - (3)].type_qualifier).flags.i & (yyvsp[(3) - (3)].type_qualifier).flags.i) != 0) {
-	      _mesa_glsl_error(& (yylsp[(3) - (3)]), state,
-			       "duplicate layout qualifiers used\n");
-	      YYERROR;
-	   }
-
-	   (yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i;
-
-	   if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location)
-	      (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location;
-
-	   if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location)
-	      (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location;
-	;}
-    break;
-
-  case 138:
-
-/* Line 1464 of yacc.c  */
-#line 1005 "glsl_parser.ypp"
-    {
-	   bool got_one = false;
-
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-
-	   if (state->ARB_fragment_coord_conventions_enable) {
-	      if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) {
-		 got_one = true;
-		 (yyval.type_qualifier).flags.q.origin_upper_left = 1;
-	      } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) {
-		 got_one = true;
-		 (yyval.type_qualifier).flags.q.pixel_center_integer = 1;
-	      }
-	   }
-
-	   /* If the identifier didn't match any known layout identifiers,
-	    * emit an error.
-	    */
-	   if (!got_one) {
-	      _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier "
-			       "`%s'\n", (yyvsp[(1) - (1)].identifier));
-	      YYERROR;
-	   } else if (state->ARB_fragment_coord_conventions_warn) {
-	      _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
-				 "GL_ARB_fragment_coord_conventions layout "
-				 "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier));
-	   }
-	;}
-    break;
-
-  case 139:
-
-/* Line 1464 of yacc.c  */
-#line 1034 "glsl_parser.ypp"
-    {
-	   bool got_one = false;
-
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-
-	   if (state->ARB_explicit_attrib_location_enable) {
-	      /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and
-	       * FINISHME: GLSL 1.30 (or later) are supported.
-	       */
-	      if (strcmp("location", (yyvsp[(1) - (3)].identifier)) == 0) {
-		 got_one = true;
-
-		 (yyval.type_qualifier).flags.q.explicit_location = 1;
-
-		 if ((yyvsp[(3) - (3)].n) >= 0) {
-		    (yyval.type_qualifier).location = (yyvsp[(3) - (3)].n);
-		 } else {
-		    _mesa_glsl_error(& (yylsp[(3) - (3)]), state,
-				     "invalid location %d specified\n", (yyvsp[(3) - (3)].n));
-		    YYERROR;
-		 }
-	      }
-	   }
-
-	   /* If the identifier didn't match any known layout identifiers,
-	    * emit an error.
-	    */
-	   if (!got_one) {
-	      _mesa_glsl_error(& (yylsp[(1) - (3)]), state, "unrecognized layout identifier "
-			       "`%s'\n", (yyvsp[(1) - (3)].identifier));
-	      YYERROR;
-	   } else if (state->ARB_explicit_attrib_location_warn) {
-	      _mesa_glsl_warning(& (yylsp[(1) - (3)]), state,
-				 "GL_ARB_explicit_attrib_location layout "
-				 "identifier `%s' used\n", (yyvsp[(1) - (3)].identifier));
-	   }
-	;}
-    break;
-
-  case 140:
-
-/* Line 1464 of yacc.c  */
-#line 1075 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.smooth = 1;
-	;}
-    break;
-
-  case 141:
-
-/* Line 1464 of yacc.c  */
-#line 1080 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.flat = 1;
-	;}
-    break;
-
-  case 142:
-
-/* Line 1464 of yacc.c  */
-#line 1085 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.noperspective = 1;
-	;}
-    break;
-
-  case 143:
-
-/* Line 1464 of yacc.c  */
-#line 1093 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.constant = 1;
-	;}
-    break;
-
-  case 146:
-
-/* Line 1464 of yacc.c  */
-#line 1103 "glsl_parser.ypp"
-    {
-	   (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
-	   (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
-	;}
-    break;
-
-  case 148:
-
-/* Line 1464 of yacc.c  */
-#line 1109 "glsl_parser.ypp"
-    {
-	   (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
-	   (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
-	;}
-    break;
-
-  case 149:
-
-/* Line 1464 of yacc.c  */
-#line 1114 "glsl_parser.ypp"
-    {
-	   (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
-	   (yyval.type_qualifier).flags.q.invariant = 1;
-	;}
-    break;
-
-  case 150:
-
-/* Line 1464 of yacc.c  */
-#line 1119 "glsl_parser.ypp"
-    {
-	   (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier);
-	   (yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i;
-	   (yyval.type_qualifier).flags.q.invariant = 1;
-	;}
-    break;
-
-  case 151:
-
-/* Line 1464 of yacc.c  */
-#line 1125 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.invariant = 1;
-	;}
-    break;
-
-  case 152:
-
-/* Line 1464 of yacc.c  */
-#line 1133 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.constant = 1;
-	;}
-    break;
-
-  case 153:
-
-/* Line 1464 of yacc.c  */
-#line 1138 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.attribute = 1;
-	;}
-    break;
-
-  case 154:
-
-/* Line 1464 of yacc.c  */
-#line 1143 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.varying = 1;
-	;}
-    break;
-
-  case 155:
-
-/* Line 1464 of yacc.c  */
-#line 1148 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.centroid = 1;
-	   (yyval.type_qualifier).flags.q.varying = 1;
-	;}
-    break;
-
-  case 156:
-
-/* Line 1464 of yacc.c  */
-#line 1154 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.in = 1;
-	;}
-    break;
-
-  case 157:
-
-/* Line 1464 of yacc.c  */
-#line 1159 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.out = 1;
-	;}
-    break;
-
-  case 158:
-
-/* Line 1464 of yacc.c  */
-#line 1164 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1;
-	;}
-    break;
-
-  case 159:
-
-/* Line 1464 of yacc.c  */
-#line 1169 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1;
-	;}
-    break;
-
-  case 160:
-
-/* Line 1464 of yacc.c  */
-#line 1174 "glsl_parser.ypp"
-    {
-	   memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-	   (yyval.type_qualifier).flags.q.uniform = 1;
-	;}
-    break;
-
-  case 162:
-
-/* Line 1464 of yacc.c  */
-#line 1183 "glsl_parser.ypp"
-    {
-	   (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier);
-	   (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n);
-	;}
-    break;
-
-  case 164:
-
-/* Line 1464 of yacc.c  */
-#line 1192 "glsl_parser.ypp"
-    {
-	   (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
-	   (yyval.type_specifier)->is_array = true;
-	   (yyval.type_specifier)->array_size = NULL;
-	;}
-    break;
-
-  case 165:
-
-/* Line 1464 of yacc.c  */
-#line 1198 "glsl_parser.ypp"
-    {
-	   (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier);
-	   (yyval.type_specifier)->is_array = true;
-	   (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression);
-	;}
-    break;
-
-  case 166:
-
-/* Line 1464 of yacc.c  */
-#line 1207 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].n));
-	   (yyval.type_specifier)->set_location(yylloc);
-	;}
-    break;
-
-  case 167:
-
-/* Line 1464 of yacc.c  */
-#line 1213 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier));
-	   (yyval.type_specifier)->set_location(yylloc);
-	;}
-    break;
-
-  case 168:
-
-/* Line 1464 of yacc.c  */
-#line 1219 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
-	   (yyval.type_specifier)->set_location(yylloc);
-	;}
-    break;
-
-  case 169:
-
-/* Line 1464 of yacc.c  */
-#line 1227 "glsl_parser.ypp"
-    { (yyval.n) = ast_void; ;}
-    break;
-
-  case 170:
-
-/* Line 1464 of yacc.c  */
-#line 1228 "glsl_parser.ypp"
-    { (yyval.n) = ast_float; ;}
-    break;
-
-  case 171:
-
-/* Line 1464 of yacc.c  */
-#line 1229 "glsl_parser.ypp"
-    { (yyval.n) = ast_int; ;}
-    break;
-
-  case 172:
-
-/* Line 1464 of yacc.c  */
-#line 1230 "glsl_parser.ypp"
-    { (yyval.n) = ast_uint; ;}
-    break;
-
-  case 173:
-
-/* Line 1464 of yacc.c  */
-#line 1231 "glsl_parser.ypp"
-    { (yyval.n) = ast_bool; ;}
-    break;
-
-  case 174:
-
-/* Line 1464 of yacc.c  */
-#line 1232 "glsl_parser.ypp"
-    { (yyval.n) = ast_vec2; ;}
-    break;
-
-  case 175:
-
-/* Line 1464 of yacc.c  */
-#line 1233 "glsl_parser.ypp"
-    { (yyval.n) = ast_vec3; ;}
-    break;
-
-  case 176:
-
-/* Line 1464 of yacc.c  */
-#line 1234 "glsl_parser.ypp"
-    { (yyval.n) = ast_vec4; ;}
-    break;
-
-  case 177:
-
-/* Line 1464 of yacc.c  */
-#line 1235 "glsl_parser.ypp"
-    { (yyval.n) = ast_bvec2; ;}
-    break;
-
-  case 178:
-
-/* Line 1464 of yacc.c  */
-#line 1236 "glsl_parser.ypp"
-    { (yyval.n) = ast_bvec3; ;}
-    break;
-
-  case 179:
-
-/* Line 1464 of yacc.c  */
-#line 1237 "glsl_parser.ypp"
-    { (yyval.n) = ast_bvec4; ;}
-    break;
-
-  case 180:
-
-/* Line 1464 of yacc.c  */
-#line 1238 "glsl_parser.ypp"
-    { (yyval.n) = ast_ivec2; ;}
-    break;
-
-  case 181:
-
-/* Line 1464 of yacc.c  */
-#line 1239 "glsl_parser.ypp"
-    { (yyval.n) = ast_ivec3; ;}
-    break;
-
-  case 182:
-
-/* Line 1464 of yacc.c  */
-#line 1240 "glsl_parser.ypp"
-    { (yyval.n) = ast_ivec4; ;}
-    break;
-
-  case 183:
-
-/* Line 1464 of yacc.c  */
-#line 1241 "glsl_parser.ypp"
-    { (yyval.n) = ast_uvec2; ;}
-    break;
-
-  case 184:
-
-/* Line 1464 of yacc.c  */
-#line 1242 "glsl_parser.ypp"
-    { (yyval.n) = ast_uvec3; ;}
-    break;
-
-  case 185:
-
-/* Line 1464 of yacc.c  */
-#line 1243 "glsl_parser.ypp"
-    { (yyval.n) = ast_uvec4; ;}
-    break;
-
-  case 186:
-
-/* Line 1464 of yacc.c  */
-#line 1244 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat2; ;}
-    break;
-
-  case 187:
-
-/* Line 1464 of yacc.c  */
-#line 1245 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat2x3; ;}
-    break;
-
-  case 188:
-
-/* Line 1464 of yacc.c  */
-#line 1246 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat2x4; ;}
-    break;
-
-  case 189:
-
-/* Line 1464 of yacc.c  */
-#line 1247 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat3x2; ;}
-    break;
-
-  case 190:
-
-/* Line 1464 of yacc.c  */
-#line 1248 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat3; ;}
-    break;
-
-  case 191:
-
-/* Line 1464 of yacc.c  */
-#line 1249 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat3x4; ;}
-    break;
-
-  case 192:
-
-/* Line 1464 of yacc.c  */
-#line 1250 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat4x2; ;}
-    break;
-
-  case 193:
-
-/* Line 1464 of yacc.c  */
-#line 1251 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat4x3; ;}
-    break;
-
-  case 194:
-
-/* Line 1464 of yacc.c  */
-#line 1252 "glsl_parser.ypp"
-    { (yyval.n) = ast_mat4; ;}
-    break;
-
-  case 195:
-
-/* Line 1464 of yacc.c  */
-#line 1253 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler1d; ;}
-    break;
-
-  case 196:
-
-/* Line 1464 of yacc.c  */
-#line 1254 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2d; ;}
-    break;
-
-  case 197:
-
-/* Line 1464 of yacc.c  */
-#line 1255 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2drect; ;}
-    break;
-
-  case 198:
-
-/* Line 1464 of yacc.c  */
-#line 1256 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler3d; ;}
-    break;
-
-  case 199:
-
-/* Line 1464 of yacc.c  */
-#line 1257 "glsl_parser.ypp"
-    { (yyval.n) = ast_samplercube; ;}
-    break;
-
-  case 200:
-
-/* Line 1464 of yacc.c  */
-#line 1258 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler1dshadow; ;}
-    break;
-
-  case 201:
-
-/* Line 1464 of yacc.c  */
-#line 1259 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2dshadow; ;}
-    break;
-
-  case 202:
-
-/* Line 1464 of yacc.c  */
-#line 1260 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2drectshadow; ;}
-    break;
-
-  case 203:
-
-/* Line 1464 of yacc.c  */
-#line 1261 "glsl_parser.ypp"
-    { (yyval.n) = ast_samplercubeshadow; ;}
-    break;
-
-  case 204:
-
-/* Line 1464 of yacc.c  */
-#line 1262 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler1darray; ;}
-    break;
-
-  case 205:
-
-/* Line 1464 of yacc.c  */
-#line 1263 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2darray; ;}
-    break;
-
-  case 206:
-
-/* Line 1464 of yacc.c  */
-#line 1264 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler1darrayshadow; ;}
-    break;
-
-  case 207:
-
-/* Line 1464 of yacc.c  */
-#line 1265 "glsl_parser.ypp"
-    { (yyval.n) = ast_sampler2darrayshadow; ;}
-    break;
-
-  case 208:
-
-/* Line 1464 of yacc.c  */
-#line 1266 "glsl_parser.ypp"
-    { (yyval.n) = ast_isampler1d; ;}
-    break;
-
-  case 209:
-
-/* Line 1464 of yacc.c  */
-#line 1267 "glsl_parser.ypp"
-    { (yyval.n) = ast_isampler2d; ;}
-    break;
-
-  case 210:
-
-/* Line 1464 of yacc.c  */
-#line 1268 "glsl_parser.ypp"
-    { (yyval.n) = ast_isampler3d; ;}
-    break;
-
-  case 211:
-
-/* Line 1464 of yacc.c  */
-#line 1269 "glsl_parser.ypp"
-    { (yyval.n) = ast_isamplercube; ;}
-    break;
-
-  case 212:
-
-/* Line 1464 of yacc.c  */
-#line 1270 "glsl_parser.ypp"
-    { (yyval.n) = ast_isampler1darray; ;}
-    break;
-
-  case 213:
-
-/* Line 1464 of yacc.c  */
-#line 1271 "glsl_parser.ypp"
-    { (yyval.n) = ast_isampler2darray; ;}
-    break;
-
-  case 214:
-
-/* Line 1464 of yacc.c  */
-#line 1272 "glsl_parser.ypp"
-    { (yyval.n) = ast_usampler1d; ;}
-    break;
-
-  case 215:
-
-/* Line 1464 of yacc.c  */
-#line 1273 "glsl_parser.ypp"
-    { (yyval.n) = ast_usampler2d; ;}
-    break;
-
-  case 216:
-
-/* Line 1464 of yacc.c  */
-#line 1274 "glsl_parser.ypp"
-    { (yyval.n) = ast_usampler3d; ;}
-    break;
-
-  case 217:
-
-/* Line 1464 of yacc.c  */
-#line 1275 "glsl_parser.ypp"
-    { (yyval.n) = ast_usamplercube; ;}
-    break;
-
-  case 218:
-
-/* Line 1464 of yacc.c  */
-#line 1276 "glsl_parser.ypp"
-    { (yyval.n) = ast_usampler1darray; ;}
-    break;
-
-  case 219:
-
-/* Line 1464 of yacc.c  */
-#line 1277 "glsl_parser.ypp"
-    { (yyval.n) = ast_usampler2darray; ;}
-    break;
-
-  case 220:
-
-/* Line 1464 of yacc.c  */
-#line 1281 "glsl_parser.ypp"
-    {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
-				         "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     (yyval.n) = ast_precision_high;
-		  ;}
-    break;
-
-  case 221:
-
-/* Line 1464 of yacc.c  */
-#line 1292 "glsl_parser.ypp"
-    {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
-					 "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     (yyval.n) = ast_precision_medium;
-		  ;}
-    break;
-
-  case 222:
-
-/* Line 1464 of yacc.c  */
-#line 1303 "glsl_parser.ypp"
-    {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
-					 "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     (yyval.n) = ast_precision_low;
-		  ;}
-    break;
-
-  case 223:
-
-/* Line 1464 of yacc.c  */
-#line 1318 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node));
-	   (yyval.struct_specifier)->set_location(yylloc);
-	;}
-    break;
-
-  case 224:
-
-/* Line 1464 of yacc.c  */
-#line 1324 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].node));
-	   (yyval.struct_specifier)->set_location(yylloc);
-	;}
-    break;
-
-  case 225:
-
-/* Line 1464 of yacc.c  */
-#line 1333 "glsl_parser.ypp"
-    {
-	   (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list);
-	   (yyvsp[(1) - (1)].declarator_list)->link.self_link();
-	;}
-    break;
-
-  case 226:
-
-/* Line 1464 of yacc.c  */
-#line 1338 "glsl_parser.ypp"
-    {
-	   (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node);
-	   (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
-	;}
-    break;
-
-  case 227:
-
-/* Line 1464 of yacc.c  */
-#line 1346 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
-	   type->set_location(yylloc);
-
-	   type->specifier = (yyvsp[(1) - (3)].type_specifier);
-	   (yyval.declarator_list) = new(ctx) ast_declarator_list(type);
-	   (yyval.declarator_list)->set_location(yylloc);
-
-	   (yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link);
-	;}
-    break;
-
-  case 228:
-
-/* Line 1464 of yacc.c  */
-#line 1361 "glsl_parser.ypp"
-    {
-	   (yyval.declaration) = (yyvsp[(1) - (1)].declaration);
-	   (yyvsp[(1) - (1)].declaration)->link.self_link();
-	;}
-    break;
-
-  case 229:
-
-/* Line 1464 of yacc.c  */
-#line 1366 "glsl_parser.ypp"
-    {
-	   (yyval.declaration) = (yyvsp[(1) - (3)].declaration);
-	   (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link);
-	;}
-    break;
-
-  case 230:
-
-/* Line 1464 of yacc.c  */
-#line 1374 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL);
-	   (yyval.declaration)->set_location(yylloc);
-	;}
-    break;
-
-  case 231:
-
-/* Line 1464 of yacc.c  */
-#line 1380 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL);
-	   (yyval.declaration)->set_location(yylloc);
-	;}
-    break;
-
-  case 234:
-
-/* Line 1464 of yacc.c  */
-#line 1398 "glsl_parser.ypp"
-    { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
-    break;
-
-  case 239:
-
-/* Line 1464 of yacc.c  */
-#line 1406 "glsl_parser.ypp"
-    { (yyval.node) = NULL; ;}
-    break;
-
-  case 240:
-
-/* Line 1464 of yacc.c  */
-#line 1407 "glsl_parser.ypp"
-    { (yyval.node) = NULL; ;}
-    break;
-
-  case 243:
-
-/* Line 1464 of yacc.c  */
-#line 1414 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
-	   (yyval.compound_statement)->set_location(yylloc);
-	;}
-    break;
-
-  case 244:
-
-/* Line 1464 of yacc.c  */
-#line 1420 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(2) - (3)].node));
-	   (yyval.compound_statement)->set_location(yylloc);
-	;}
-    break;
-
-  case 245:
-
-/* Line 1464 of yacc.c  */
-#line 1428 "glsl_parser.ypp"
-    { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
-    break;
-
-  case 247:
-
-/* Line 1464 of yacc.c  */
-#line 1434 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
-	   (yyval.compound_statement)->set_location(yylloc);
-	;}
-    break;
-
-  case 248:
-
-/* Line 1464 of yacc.c  */
-#line 1440 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node));
-	   (yyval.compound_statement)->set_location(yylloc);
-	;}
-    break;
-
-  case 249:
-
-/* Line 1464 of yacc.c  */
-#line 1449 "glsl_parser.ypp"
-    {
-	   if ((yyvsp[(1) - (1)].node) == NULL) {
-	      _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "<nil> statement\n");
-	      assert((yyvsp[(1) - (1)].node) != NULL);
-	   }
-
-	   (yyval.node) = (yyvsp[(1) - (1)].node);
-	   (yyval.node)->link.self_link();
-	;}
-    break;
-
-  case 250:
-
-/* Line 1464 of yacc.c  */
-#line 1459 "glsl_parser.ypp"
-    {
-	   if ((yyvsp[(2) - (2)].node) == NULL) {
-	      _mesa_glsl_error(& (yylsp[(2) - (2)]), state, "<nil> statement\n");
-	      assert((yyvsp[(2) - (2)].node) != NULL);
-	   }
-	   (yyval.node) = (yyvsp[(1) - (2)].node);
-	   (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link);
-	;}
-    break;
-
-  case 251:
-
-/* Line 1464 of yacc.c  */
-#line 1471 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_expression_statement(NULL);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 252:
-
-/* Line 1464 of yacc.c  */
-#line 1477 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression));
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 253:
-
-/* Line 1464 of yacc.c  */
-#line 1486 "glsl_parser.ypp"
-    {
-	   (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement,
-						   (yyvsp[(5) - (5)].selection_rest_statement).else_statement);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 254:
-
-/* Line 1464 of yacc.c  */
-#line 1495 "glsl_parser.ypp"
-    {
-	   (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node);
-	   (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node);
-	;}
-    break;
-
-  case 255:
-
-/* Line 1464 of yacc.c  */
-#line 1500 "glsl_parser.ypp"
-    {
-	   (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node);
-	   (yyval.selection_rest_statement).else_statement = NULL;
-	;}
-    break;
-
-  case 256:
-
-/* Line 1464 of yacc.c  */
-#line 1508 "glsl_parser.ypp"
-    {
-	   (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
-	;}
-    break;
-
-  case 257:
-
-/* Line 1464 of yacc.c  */
-#line 1512 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression));
-	   ast_declarator_list *declarator = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type));
-	   decl->set_location(yylloc);
-	   declarator->set_location(yylloc);
-
-	   declarator->declarations.push_tail(&decl->link);
-	   (yyval.node) = declarator;
-	;}
-    break;
-
-  case 261:
-
-/* Line 1464 of yacc.c  */
-#line 1535 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while,
-	   					    NULL, (yyvsp[(3) - (5)].node), NULL, (yyvsp[(5) - (5)].node));
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 262:
-
-/* Line 1464 of yacc.c  */
-#line 1542 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while,
-						    NULL, (yyvsp[(5) - (7)].expression), NULL, (yyvsp[(2) - (7)].node));
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 263:
-
-/* Line 1464 of yacc.c  */
-#line 1549 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for,
-						    (yyvsp[(3) - (6)].node), (yyvsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).rest, (yyvsp[(6) - (6)].node));
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 267:
-
-/* Line 1464 of yacc.c  */
-#line 1565 "glsl_parser.ypp"
-    {
-	   (yyval.node) = NULL;
-	;}
-    break;
-
-  case 268:
-
-/* Line 1464 of yacc.c  */
-#line 1572 "glsl_parser.ypp"
-    {
-	   (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
-	   (yyval.for_rest_statement).rest = NULL;
-	;}
-    break;
-
-  case 269:
-
-/* Line 1464 of yacc.c  */
-#line 1577 "glsl_parser.ypp"
-    {
-	   (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
-	   (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
-	;}
-    break;
-
-  case 270:
-
-/* Line 1464 of yacc.c  */
-#line 1586 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 271:
-
-/* Line 1464 of yacc.c  */
-#line 1592 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 272:
-
-/* Line 1464 of yacc.c  */
-#line 1598 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 273:
-
-/* Line 1464 of yacc.c  */
-#line 1604 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression));
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 274:
-
-/* Line 1464 of yacc.c  */
-#line 1610 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
-	   (yyval.node)->set_location(yylloc);
-	;}
-    break;
-
-  case 275:
-
-/* Line 1464 of yacc.c  */
-#line 1618 "glsl_parser.ypp"
-    { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;}
-    break;
-
-  case 276:
-
-/* Line 1464 of yacc.c  */
-#line 1619 "glsl_parser.ypp"
-    { (yyval.node) = (yyvsp[(1) - (1)].node); ;}
-    break;
-
-  case 277:
-
-/* Line 1464 of yacc.c  */
-#line 1620 "glsl_parser.ypp"
-    { (yyval.node) = NULL; ;}
-    break;
-
-  case 278:
-
-/* Line 1464 of yacc.c  */
-#line 1625 "glsl_parser.ypp"
-    {
-	   void *ctx = state;
-	   (yyval.function_definition) = new(ctx) ast_function_definition();
-	   (yyval.function_definition)->set_location(yylloc);
-	   (yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function);
-	   (yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statement);
-	;}
-    break;
-
-
-
-/* Line 1464 of yacc.c  */
-#line 5090 "glsl_parser.cpp"
-      default: break;
-    }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-  *++yylsp = yyloc;
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (&yylloc, state, YY_("syntax error"));
-#else
-      {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (&yylloc, state, yymsg);
-	  }
-	else
-	  {
-	    yyerror (&yylloc, state, YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
-      }
-#endif
-    }
-
-  yyerror_range[1] = yylloc;
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      if (yychar <= YYEOF)
-	{
-	  /* Return failure if at end of input.  */
-	  if (yychar == YYEOF)
-	    YYABORT;
-	}
-      else
-	{
-	  yydestruct ("Error: discarding",
-		      yytoken, &yylval, &yylloc, state);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  yyerror_range[1] = yylsp[1-yylen];
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-      yyerror_range[1] = *yylsp;
-      yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp, yylsp, state);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  *++yyvsp = yylval;
-
-  yyerror_range[2] = yylloc;
-  /* Using YYLLOC is tempting, but would change the location of
-     the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
-  *++yylsp = yyloc;
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (&yylloc, state, YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval, &yylloc, state);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp, yylsp, state);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-
diff --git a/src/glsl/glsl_parser.h b/src/glsl/glsl_parser.h
deleted file mode 100644
index 83aa56f..0000000
--- a/src/glsl/glsl_parser.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     ATTRIBUTE = 258,
-     CONST_TOK = 259,
-     BOOL_TOK = 260,
-     FLOAT_TOK = 261,
-     INT_TOK = 262,
-     UINT_TOK = 263,
-     BREAK = 264,
-     CONTINUE = 265,
-     DO = 266,
-     ELSE = 267,
-     FOR = 268,
-     IF = 269,
-     DISCARD = 270,
-     RETURN = 271,
-     SWITCH = 272,
-     CASE = 273,
-     DEFAULT = 274,
-     BVEC2 = 275,
-     BVEC3 = 276,
-     BVEC4 = 277,
-     IVEC2 = 278,
-     IVEC3 = 279,
-     IVEC4 = 280,
-     UVEC2 = 281,
-     UVEC3 = 282,
-     UVEC4 = 283,
-     VEC2 = 284,
-     VEC3 = 285,
-     VEC4 = 286,
-     CENTROID = 287,
-     IN_TOK = 288,
-     OUT_TOK = 289,
-     INOUT_TOK = 290,
-     UNIFORM = 291,
-     VARYING = 292,
-     NOPERSPECTIVE = 293,
-     FLAT = 294,
-     SMOOTH = 295,
-     MAT2X2 = 296,
-     MAT2X3 = 297,
-     MAT2X4 = 298,
-     MAT3X2 = 299,
-     MAT3X3 = 300,
-     MAT3X4 = 301,
-     MAT4X2 = 302,
-     MAT4X3 = 303,
-     MAT4X4 = 304,
-     SAMPLER1D = 305,
-     SAMPLER2D = 306,
-     SAMPLER3D = 307,
-     SAMPLERCUBE = 308,
-     SAMPLER1DSHADOW = 309,
-     SAMPLER2DSHADOW = 310,
-     SAMPLERCUBESHADOW = 311,
-     SAMPLER1DARRAY = 312,
-     SAMPLER2DARRAY = 313,
-     SAMPLER1DARRAYSHADOW = 314,
-     SAMPLER2DARRAYSHADOW = 315,
-     ISAMPLER1D = 316,
-     ISAMPLER2D = 317,
-     ISAMPLER3D = 318,
-     ISAMPLERCUBE = 319,
-     ISAMPLER1DARRAY = 320,
-     ISAMPLER2DARRAY = 321,
-     USAMPLER1D = 322,
-     USAMPLER2D = 323,
-     USAMPLER3D = 324,
-     USAMPLERCUBE = 325,
-     USAMPLER1DARRAY = 326,
-     USAMPLER2DARRAY = 327,
-     STRUCT = 328,
-     VOID_TOK = 329,
-     WHILE = 330,
-     IDENTIFIER = 331,
-     FLOATCONSTANT = 332,
-     INTCONSTANT = 333,
-     UINTCONSTANT = 334,
-     BOOLCONSTANT = 335,
-     FIELD_SELECTION = 336,
-     LEFT_OP = 337,
-     RIGHT_OP = 338,
-     INC_OP = 339,
-     DEC_OP = 340,
-     LE_OP = 341,
-     GE_OP = 342,
-     EQ_OP = 343,
-     NE_OP = 344,
-     AND_OP = 345,
-     OR_OP = 346,
-     XOR_OP = 347,
-     MUL_ASSIGN = 348,
-     DIV_ASSIGN = 349,
-     ADD_ASSIGN = 350,
-     MOD_ASSIGN = 351,
-     LEFT_ASSIGN = 352,
-     RIGHT_ASSIGN = 353,
-     AND_ASSIGN = 354,
-     XOR_ASSIGN = 355,
-     OR_ASSIGN = 356,
-     SUB_ASSIGN = 357,
-     INVARIANT = 358,
-     LOWP = 359,
-     MEDIUMP = 360,
-     HIGHP = 361,
-     SUPERP = 362,
-     PRECISION = 363,
-     VERSION = 364,
-     EXTENSION = 365,
-     LINE = 366,
-     COLON = 367,
-     EOL = 368,
-     INTERFACE = 369,
-     OUTPUT = 370,
-     PRAGMA_DEBUG_ON = 371,
-     PRAGMA_DEBUG_OFF = 372,
-     PRAGMA_OPTIMIZE_ON = 373,
-     PRAGMA_OPTIMIZE_OFF = 374,
-     LAYOUT_TOK = 375,
-     ASM = 376,
-     CLASS = 377,
-     UNION = 378,
-     ENUM = 379,
-     TYPEDEF = 380,
-     TEMPLATE = 381,
-     THIS = 382,
-     PACKED_TOK = 383,
-     GOTO = 384,
-     INLINE_TOK = 385,
-     NOINLINE = 386,
-     VOLATILE = 387,
-     PUBLIC_TOK = 388,
-     STATIC = 389,
-     EXTERN = 390,
-     EXTERNAL = 391,
-     LONG_TOK = 392,
-     SHORT_TOK = 393,
-     DOUBLE_TOK = 394,
-     HALF = 395,
-     FIXED_TOK = 396,
-     UNSIGNED = 397,
-     INPUT_TOK = 398,
-     OUPTUT = 399,
-     HVEC2 = 400,
-     HVEC3 = 401,
-     HVEC4 = 402,
-     DVEC2 = 403,
-     DVEC3 = 404,
-     DVEC4 = 405,
-     FVEC2 = 406,
-     FVEC3 = 407,
-     FVEC4 = 408,
-     SAMPLER2DRECT = 409,
-     SAMPLER3DRECT = 410,
-     SAMPLER2DRECTSHADOW = 411,
-     SIZEOF = 412,
-     CAST = 413,
-     NAMESPACE = 414,
-     USING = 415,
-     ERROR_TOK = 416,
-     COMMON = 417,
-     PARTITION = 418,
-     ACTIVE = 419,
-     SAMPLERBUFFER = 420,
-     FILTER = 421,
-     IMAGE1D = 422,
-     IMAGE2D = 423,
-     IMAGE3D = 424,
-     IMAGECUBE = 425,
-     IMAGE1DARRAY = 426,
-     IMAGE2DARRAY = 427,
-     IIMAGE1D = 428,
-     IIMAGE2D = 429,
-     IIMAGE3D = 430,
-     IIMAGECUBE = 431,
-     IIMAGE1DARRAY = 432,
-     IIMAGE2DARRAY = 433,
-     UIMAGE1D = 434,
-     UIMAGE2D = 435,
-     UIMAGE3D = 436,
-     UIMAGECUBE = 437,
-     UIMAGE1DARRAY = 438,
-     UIMAGE2DARRAY = 439,
-     IMAGE1DSHADOW = 440,
-     IMAGE2DSHADOW = 441,
-     IMAGEBUFFER = 442,
-     IIMAGEBUFFER = 443,
-     UIMAGEBUFFER = 444,
-     IMAGE1DARRAYSHADOW = 445,
-     IMAGE2DARRAYSHADOW = 446,
-     ROW_MAJOR = 447
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 1685 of yacc.c  */
-#line 52 "glsl_parser.ypp"
-
-   int n;
-   float real;
-   char *identifier;
-
-   struct ast_type_qualifier type_qualifier;
-
-   ast_node *node;
-   ast_type_specifier *type_specifier;
-   ast_fully_specified_type *fully_specified_type;
-   ast_function *function;
-   ast_parameter_declarator *parameter_declarator;
-   ast_function_definition *function_definition;
-   ast_compound_statement *compound_statement;
-   ast_expression *expression;
-   ast_declarator_list *declarator_list;
-   ast_struct_specifier *struct_specifier;
-   ast_declaration *declaration;
-
-   struct {
-      ast_node *cond;
-      ast_expression *rest;
-   } for_rest_statement;
-
-   struct {
-      ast_node *then_statement;
-      ast_node *else_statement;
-   } selection_rest_statement;
-
-
-
-/* Line 1685 of yacc.c  */
-#line 275 "glsl_parser.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp
deleted file mode 100644
index 6d7d148..0000000
--- a/src/glsl/glsl_parser.ypp
+++ /dev/null
@@ -1,1632 +0,0 @@
-%{
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-    
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_types.h"
-
-#define YYLEX_PARAM state->scanner
-
-%}
-
-%pure-parser
-%error-verbose
-
-%locations
-%initial-action {
-   @$.first_line = 1;
-   @$.first_column = 1;
-   @$.last_line = 1;
-   @$.last_column = 1;
-   @$.source = 0;
-}
-
-%lex-param   {void *scanner}
-%parse-param {struct _mesa_glsl_parse_state *state}
-
-%union {
-   int n;
-   float real;
-   char *identifier;
-
-   struct ast_type_qualifier type_qualifier;
-
-   ast_node *node;
-   ast_type_specifier *type_specifier;
-   ast_fully_specified_type *fully_specified_type;
-   ast_function *function;
-   ast_parameter_declarator *parameter_declarator;
-   ast_function_definition *function_definition;
-   ast_compound_statement *compound_statement;
-   ast_expression *expression;
-   ast_declarator_list *declarator_list;
-   ast_struct_specifier *struct_specifier;
-   ast_declaration *declaration;
-
-   struct {
-      ast_node *cond;
-      ast_expression *rest;
-   } for_rest_statement;
-
-   struct {
-      ast_node *then_statement;
-      ast_node *else_statement;
-   } selection_rest_statement;
-}
-
-%token ATTRIBUTE CONST_TOK BOOL_TOK FLOAT_TOK INT_TOK UINT_TOK
-%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
-%token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 UVEC2 UVEC3 UVEC4 VEC2 VEC3 VEC4
-%token CENTROID IN_TOK OUT_TOK INOUT_TOK UNIFORM VARYING
-%token NOPERSPECTIVE FLAT SMOOTH
-%token MAT2X2 MAT2X3 MAT2X4
-%token MAT3X2 MAT3X3 MAT3X4
-%token MAT4X2 MAT4X3 MAT4X4
-%token SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW
-%token SAMPLERCUBESHADOW SAMPLER1DARRAY SAMPLER2DARRAY SAMPLER1DARRAYSHADOW
-%token SAMPLER2DARRAYSHADOW ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
-%token ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
-%token USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
-%token STRUCT VOID_TOK WHILE
-%token <identifier> IDENTIFIER
-%token <real> FLOATCONSTANT
-%token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
-%token <identifier> FIELD_SELECTION
-%token LEFT_OP RIGHT_OP
-%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
-%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
-%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN
-%token SUB_ASSIGN
-%token INVARIANT
-%token LOWP MEDIUMP HIGHP SUPERP PRECISION
-
-%token VERSION EXTENSION LINE COLON EOL INTERFACE OUTPUT
-%token PRAGMA_DEBUG_ON PRAGMA_DEBUG_OFF
-%token PRAGMA_OPTIMIZE_ON PRAGMA_OPTIMIZE_OFF
-%token LAYOUT_TOK
-
-   /* Reserved words that are not actually used in the grammar.
-    */
-%token ASM CLASS UNION ENUM TYPEDEF TEMPLATE THIS PACKED_TOK GOTO
-%token INLINE_TOK NOINLINE VOLATILE PUBLIC_TOK STATIC EXTERN EXTERNAL
-%token LONG_TOK SHORT_TOK DOUBLE_TOK HALF FIXED_TOK UNSIGNED INPUT_TOK OUPTUT
-%token HVEC2 HVEC3 HVEC4 DVEC2 DVEC3 DVEC4 FVEC2 FVEC3 FVEC4
-%token SAMPLER2DRECT SAMPLER3DRECT SAMPLER2DRECTSHADOW
-%token SIZEOF CAST NAMESPACE USING
-
-%token ERROR_TOK
-
-%token COMMON PARTITION ACTIVE SAMPLERBUFFER FILTER
-%token  IMAGE1D  IMAGE2D  IMAGE3D  IMAGECUBE  IMAGE1DARRAY  IMAGE2DARRAY
-%token IIMAGE1D IIMAGE2D IIMAGE3D IIMAGECUBE IIMAGE1DARRAY IIMAGE2DARRAY
-%token UIMAGE1D UIMAGE2D UIMAGE3D UIMAGECUBE UIMAGE1DARRAY UIMAGE2DARRAY
-%token IMAGE1DSHADOW IMAGE2DSHADOW IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
-%token IMAGE1DARRAYSHADOW IMAGE2DARRAYSHADOW
-%token ROW_MAJOR
-
-%type <identifier> variable_identifier
-%type <node> statement
-%type <node> statement_list
-%type <node> simple_statement
-%type <n> precision_qualifier
-%type <type_qualifier> type_qualifier
-%type <type_qualifier> storage_qualifier
-%type <type_qualifier> interpolation_qualifier
-%type <type_qualifier> layout_qualifier
-%type <type_qualifier> layout_qualifier_id_list layout_qualifier_id
-%type <type_specifier> type_specifier
-%type <type_specifier> type_specifier_no_prec
-%type <type_specifier> type_specifier_nonarray
-%type <n> basic_type_specifier_nonarray
-%type <fully_specified_type> fully_specified_type
-%type <function> function_prototype
-%type <function> function_header
-%type <function> function_header_with_parameters
-%type <function> function_declarator
-%type <parameter_declarator> parameter_declarator
-%type <parameter_declarator> parameter_declaration
-%type <type_qualifier> parameter_qualifier
-%type <type_qualifier> parameter_type_qualifier
-%type <type_specifier> parameter_type_specifier
-%type <function_definition> function_definition
-%type <compound_statement> compound_statement_no_new_scope
-%type <compound_statement> compound_statement
-%type <node> statement_no_new_scope
-%type <node> expression_statement
-%type <expression> expression
-%type <expression> primary_expression
-%type <expression> assignment_expression
-%type <expression> conditional_expression
-%type <expression> logical_or_expression
-%type <expression> logical_xor_expression
-%type <expression> logical_and_expression
-%type <expression> inclusive_or_expression
-%type <expression> exclusive_or_expression
-%type <expression> and_expression
-%type <expression> equality_expression
-%type <expression> relational_expression
-%type <expression> shift_expression
-%type <expression> additive_expression
-%type <expression> multiplicative_expression
-%type <expression> unary_expression
-%type <expression> constant_expression
-%type <expression> integer_expression
-%type <expression> postfix_expression
-%type <expression> function_call_header_with_parameters
-%type <expression> function_call_header_no_parameters
-%type <expression> function_call_header
-%type <expression> function_call_generic
-%type <expression> function_call_or_method
-%type <expression> function_call
-%type <n> assignment_operator
-%type <n> unary_operator
-%type <expression> function_identifier
-%type <node> external_declaration
-%type <declarator_list> init_declarator_list
-%type <declarator_list> single_declaration
-%type <expression> initializer
-%type <node> declaration
-%type <node> declaration_statement
-%type <node> jump_statement
-%type <struct_specifier> struct_specifier
-%type <node> struct_declaration_list
-%type <declarator_list> struct_declaration
-%type <declaration> struct_declarator
-%type <declaration> struct_declarator_list
-%type <node> selection_statement
-%type <selection_rest_statement> selection_rest_statement
-%type <node> iteration_statement
-%type <node> condition
-%type <node> conditionopt
-%type <node> for_init_statement
-%type <for_rest_statement> for_rest_statement
-%%
-
-translation_unit: 
-	version_statement extension_statement_list
-	{
-	   _mesa_glsl_initialize_types(state);
-	}
-	external_declaration_list
-	;
-
-version_statement:
-	/* blank - no #version specified: defaults are already set */
-	| VERSION INTCONSTANT EOL
-	{
-	   switch ($2) {
-	   case 100:
-	      state->es_shader = true;
-	   case 110:
-	   case 120:
-	   case 130:
-	      /* FINISHME: Check against implementation support versions. */
-	      state->language_version = $2;
-	      break;
-	   default:
-	      _mesa_glsl_error(& @2, state, "Shading language version"
-			       "%u is not supported\n", $2);
-	      break;
-	   }
-	}
-	;
-
-pragma_statement:
-	PRAGMA_DEBUG_ON EOL
-	| PRAGMA_DEBUG_OFF EOL
-	| PRAGMA_OPTIMIZE_ON EOL
-	| PRAGMA_OPTIMIZE_OFF EOL
-	;
-
-extension_statement_list:
-
-	| extension_statement_list extension_statement
-	;
-
-extension_statement:
-	EXTENSION IDENTIFIER COLON IDENTIFIER EOL
-	{
-	   if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) {
-	      YYERROR;
-	   }
-	}
-	;
-
-external_declaration_list:
-	external_declaration
-	{
-	   /* FINISHME: The NULL test is only required because 'precision'
-	    * FINISHME: statements are not yet supported.
-	    */
-	   if ($1 != NULL)
-	      state->translation_unit.push_tail(& $1->link);
-	}
-	| external_declaration_list external_declaration
-	{
-	   /* FINISHME: The NULL test is only required because 'precision'
-	    * FINISHME: statements are not yet supported.
-	    */
-	   if ($2 != NULL)
-	      state->translation_unit.push_tail(& $2->link);
-	}
-	;
-
-variable_identifier:
-	IDENTIFIER
-	;
-
-primary_expression:
-	variable_identifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.identifier = $1;
-	}
-	| INTCONSTANT
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.int_constant = $1;
-	}
-	| UINTCONSTANT
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.uint_constant = $1;
-	}
-	| FLOATCONSTANT
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.float_constant = $1;
-	}
-	| BOOLCONSTANT
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.bool_constant = $1;
-	}
-	| '(' expression ')'
-	{
-	   $$ = $2;
-	}
-	;
-
-postfix_expression:
-	primary_expression
-	| postfix_expression '[' integer_expression ']'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_array_index, $1, $3, NULL);
-	   $$->set_location(yylloc);
-	}
-	| function_call
-	{
-	   $$ = $1;
-	}
-	| postfix_expression '.' IDENTIFIER
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_field_selection, $1, NULL, NULL);
-	   $$->set_location(yylloc);
-	   $$->primary_expression.identifier = $3;
-	}
-	| postfix_expression INC_OP
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_post_inc, $1, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	| postfix_expression DEC_OP
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_post_dec, $1, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-integer_expression:
-	expression
-	;
-
-function_call:
-	function_call_or_method
-	;
-
-function_call_or_method:
-	function_call_generic
-	| postfix_expression '.' function_call_generic
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_field_selection, $1, $3, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-function_call_generic:
-	function_call_header_with_parameters ')'
-	| function_call_header_no_parameters ')'
-	;
-
-function_call_header_no_parameters:
-	function_call_header VOID_TOK
-	| function_call_header
-	;
-
-function_call_header_with_parameters:
-	function_call_header assignment_expression
-	{
-	   $$ = $1;
-	   $$->set_location(yylloc);
-	   $$->expressions.push_tail(& $2->link);
-	}
-	| function_call_header_with_parameters ',' assignment_expression
-	{
-	   $$ = $1;
-	   $$->set_location(yylloc);
-	   $$->expressions.push_tail(& $3->link);
-	}
-	;
-
-	// Grammar Note: Constructors look like functions, but lexical 
-	// analysis recognized most of them as keywords. They are now
-	// recognized through "type_specifier".
-function_call_header:
-	function_identifier '('
-	;
-
-function_identifier:
-	type_specifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_function_expression($1);
-	   $$->set_location(yylloc);
-   	}
-	| IDENTIFIER
-	{
-	   void *ctx = state;
-	   ast_expression *callee = new(ctx) ast_expression($1);
-	   $$ = new(ctx) ast_function_expression(callee);
-	   $$->set_location(yylloc);
-   	}
-	| FIELD_SELECTION
-	{
-	   void *ctx = state;
-	   ast_expression *callee = new(ctx) ast_expression($1);
-	   $$ = new(ctx) ast_function_expression(callee);
-	   $$->set_location(yylloc);
-   	}
-	;
-
-	// Grammar Note: No traditional style type casts.
-unary_expression:
-	postfix_expression
-	| INC_OP unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_pre_inc, $2, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	| DEC_OP unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_pre_dec, $2, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	| unary_operator unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression($1, $2, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-	// Grammar Note: No '*' or '&' unary ops. Pointers are not supported.
-unary_operator:
-	'+'	{ $$ = ast_plus; }
-	| '-'	{ $$ = ast_neg; }
-	| '!'	{ $$ = ast_logic_not; }
-	| '~'	{ $$ = ast_bit_not; }
-	;
-
-multiplicative_expression:
-	unary_expression
-	| multiplicative_expression '*' unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_mul, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| multiplicative_expression '/' unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_div, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| multiplicative_expression '%' unary_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_mod, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-additive_expression:
-	multiplicative_expression
-	| additive_expression '+' multiplicative_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_add, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| additive_expression '-' multiplicative_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_sub, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-shift_expression:
-	additive_expression
-	| shift_expression LEFT_OP additive_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_lshift, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| shift_expression RIGHT_OP additive_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_rshift, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-relational_expression:
-	shift_expression
-	| relational_expression '<' shift_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_less, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| relational_expression '>' shift_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_greater, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| relational_expression LE_OP shift_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_lequal, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| relational_expression GE_OP shift_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_gequal, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-equality_expression:
-	relational_expression
-	| equality_expression EQ_OP relational_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_equal, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	| equality_expression NE_OP relational_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_nequal, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-and_expression:
-	equality_expression
-	| and_expression '&' equality_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_bit_and, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-exclusive_or_expression:
-	and_expression
-	| exclusive_or_expression '^' and_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_bit_xor, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-inclusive_or_expression:
-	exclusive_or_expression
-	| inclusive_or_expression '|' exclusive_or_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_bit_or, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-logical_and_expression:
-	inclusive_or_expression
-	| logical_and_expression AND_OP inclusive_or_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_logic_and, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-logical_xor_expression:
-	logical_and_expression
-	| logical_xor_expression XOR_OP logical_and_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_logic_xor, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-logical_or_expression:
-	logical_xor_expression
-	| logical_or_expression OR_OP logical_xor_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_bin(ast_logic_or, $1, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-conditional_expression:
-	logical_or_expression
-	| logical_or_expression '?' expression ':' assignment_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression(ast_conditional, $1, $3, $5);
-	   $$->set_location(yylloc);
-	}
-	;
-
-assignment_expression:
-	conditional_expression
-	| unary_expression assignment_operator assignment_expression
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression($2, $1, $3, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-assignment_operator:
-	'='		{ $$ = ast_assign; }
-	| MUL_ASSIGN	{ $$ = ast_mul_assign; }
-	| DIV_ASSIGN	{ $$ = ast_div_assign; }
-	| MOD_ASSIGN	{ $$ = ast_mod_assign; }
-	| ADD_ASSIGN	{ $$ = ast_add_assign; }
-	| SUB_ASSIGN	{ $$ = ast_sub_assign; }
-	| LEFT_ASSIGN	{ $$ = ast_ls_assign; }
-	| RIGHT_ASSIGN	{ $$ = ast_rs_assign; }
-	| AND_ASSIGN	{ $$ = ast_and_assign; }
-	| XOR_ASSIGN	{ $$ = ast_xor_assign; }
-	| OR_ASSIGN	{ $$ = ast_or_assign; }
-	;
-
-expression:
-	assignment_expression
-	{
-	   $$ = $1;
-	}
-	| expression ',' assignment_expression
-	{
-	   void *ctx = state;
-	   if ($1->oper != ast_sequence) {
-	      $$ = new(ctx) ast_expression(ast_sequence, NULL, NULL, NULL);
-	      $$->set_location(yylloc);
-	      $$->expressions.push_tail(& $1->link);
-	   } else {
-	      $$ = $1;
-	   }
-
-	   $$->expressions.push_tail(& $3->link);
-	}
-	;
-
-constant_expression:
-	conditional_expression
-	;
-
-declaration:
-	function_prototype ';'
-	{
-	   $$ = $1;
-	}
-	| init_declarator_list ';'
-	{
-	   $$ = $1;
-	}
-	| PRECISION precision_qualifier type_specifier_no_prec ';'
-	{
-	   if (($3->type_specifier != ast_float)
-	       && ($3->type_specifier != ast_int)) {
-	      _mesa_glsl_error(& @3, state, "global precision qualifier can "
-			       "only be applied to `int' or `float'\n");
-	      YYERROR;
-	   }
-
-	   $$ = NULL; /* FINISHME */
-	}
-	;
-
-function_prototype:
-	function_declarator ')'
-	;
-
-function_declarator:
-	function_header
-	| function_header_with_parameters
-	;
-
-function_header_with_parameters:
-	function_header parameter_declaration
-	{
-	   $$ = $1;
-	   $$->parameters.push_tail(& $2->link);
-	}
-	| function_header_with_parameters ',' parameter_declaration
-	{
-	   $$ = $1;
-	   $$->parameters.push_tail(& $3->link);
-	}
-	;
-
-function_header:
-	fully_specified_type IDENTIFIER '('
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_function();
-	   $$->set_location(yylloc);
-	   $$->return_type = $1;
-	   $$->identifier = $2;
-	}
-	;
-
-parameter_declarator:
-	type_specifier IDENTIFIER
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_parameter_declarator();
-	   $$->set_location(yylloc);
-	   $$->type = new(ctx) ast_fully_specified_type();
-	   $$->type->set_location(yylloc);
-	   $$->type->specifier = $1;
-	   $$->identifier = $2;
-	}
-	| type_specifier IDENTIFIER '[' constant_expression ']'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_parameter_declarator();
-	   $$->set_location(yylloc);
-	   $$->type = new(ctx) ast_fully_specified_type();
-	   $$->type->set_location(yylloc);
-	   $$->type->specifier = $1;
-	   $$->identifier = $2;
-	   $$->is_array = true;
-	   $$->array_size = $4;
-	}
-	;
-
-parameter_declaration:
-	parameter_type_qualifier parameter_qualifier parameter_declarator
-	{
-	   $1.flags.i |= $2.flags.i;
-
-	   $$ = $3;
-	   $$->type->qualifier = $1;
-	}
-	| parameter_qualifier parameter_declarator
-	{
-	   $$ = $2;
-	   $$->type->qualifier = $1;
-	}
-	| parameter_type_qualifier parameter_qualifier parameter_type_specifier
-	{
-	   void *ctx = state;
-	   $1.flags.i |= $2.flags.i;
-
-	   $$ = new(ctx) ast_parameter_declarator();
-	   $$->set_location(yylloc);
-	   $$->type = new(ctx) ast_fully_specified_type();
-	   $$->type->qualifier = $1;
-	   $$->type->specifier = $3;
-	}
-	| parameter_qualifier parameter_type_specifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_parameter_declarator();
-	   $$->set_location(yylloc);
-	   $$->type = new(ctx) ast_fully_specified_type();
-	   $$->type->qualifier = $1;
-	   $$->type->specifier = $2;
-	}
-	;
-
-parameter_qualifier:
-	/* empty */
-	{
-	   memset(& $$, 0, sizeof($$));
-	}
-	| IN_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.in = 1;
-	}
-	| OUT_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.out = 1;
-	}
-	| INOUT_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.in = 1;
-	   $$.flags.q.out = 1;
-	}
-	;
-
-parameter_type_specifier:
-	type_specifier
-	;
-
-init_declarator_list:
-	single_declaration
-	| init_declarator_list ',' IDENTIFIER
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, NULL);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| init_declarator_list ',' IDENTIFIER '[' ']'
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, NULL);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| init_declarator_list ',' IDENTIFIER '[' constant_expression ']'
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, NULL);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| init_declarator_list ',' IDENTIFIER '[' ']' '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, $7);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| init_declarator_list ',' IDENTIFIER '[' constant_expression ']' '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, $8);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| init_declarator_list ',' IDENTIFIER '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, $5);
-	   decl->set_location(yylloc);
-
-	   $$ = $1;
-	   $$->declarations.push_tail(&decl->link);
-	}
-	;
-
-	// Grammar Note: No 'enum', or 'typedef'.
-single_declaration:
-	fully_specified_type
-	{
-	   void *ctx = state;
-	   if ($1->specifier->type_specifier != ast_struct) {
-	      _mesa_glsl_error(& @1, state, "empty declaration list\n");
-	      YYERROR;
-	   } else {
-	      $$ = new(ctx) ast_declarator_list($1);
-	      $$->set_location(yylloc);
-	   }
-	}
-	| fully_specified_type IDENTIFIER
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| fully_specified_type IDENTIFIER '[' ']'
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, NULL);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| fully_specified_type IDENTIFIER '[' constant_expression ']'
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, NULL);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| fully_specified_type IDENTIFIER '[' ']' '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, $6);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| fully_specified_type IDENTIFIER '[' constant_expression ']' '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, $7);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| fully_specified_type IDENTIFIER '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4);
-
-	   $$ = new(ctx) ast_declarator_list($1);
-	   $$->set_location(yylloc);
-	   $$->declarations.push_tail(&decl->link);
-	}
-	| INVARIANT IDENTIFIER // Vertex only.
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL);
-
-	   $$ = new(ctx) ast_declarator_list(NULL);
-	   $$->set_location(yylloc);
-	   $$->invariant = true;
-
-	   $$->declarations.push_tail(&decl->link);
-	}
-	;
-
-fully_specified_type:
-	type_specifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_fully_specified_type();
-	   $$->set_location(yylloc);
-	   $$->specifier = $1;
-	}
-	| type_qualifier type_specifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_fully_specified_type();
-	   $$->set_location(yylloc);
-	   $$->qualifier = $1;
-	   $$->specifier = $2;
-	}
-	;
-
-layout_qualifier:
-	LAYOUT_TOK '(' layout_qualifier_id_list ')'
-	{
-	  $$ = $3;
-	}
-	;
-
-layout_qualifier_id_list:
-	layout_qualifier_id
-	| layout_qualifier_id_list ',' layout_qualifier_id
-	{
-	   if (($1.flags.i & $3.flags.i) != 0) {
-	      _mesa_glsl_error(& @3, state,
-			       "duplicate layout qualifiers used\n");
-	      YYERROR;
-	   }
-
-	   $$.flags.i = $1.flags.i | $3.flags.i;
-
-	   if ($1.flags.q.explicit_location)
-	      $$.location = $1.location;
-
-	   if ($3.flags.q.explicit_location)
-	      $$.location = $3.location;
-	}
-	;
-
-layout_qualifier_id:
-	IDENTIFIER
-	{
-	   bool got_one = false;
-
-	   memset(& $$, 0, sizeof($$));
-
-	   if (state->ARB_fragment_coord_conventions_enable) {
-	      if (strcmp($1, "origin_upper_left") == 0) {
-		 got_one = true;
-		 $$.flags.q.origin_upper_left = 1;
-	      } else if (strcmp($1, "pixel_center_integer") == 0) {
-		 got_one = true;
-		 $$.flags.q.pixel_center_integer = 1;
-	      }
-	   }
-
-	   /* If the identifier didn't match any known layout identifiers,
-	    * emit an error.
-	    */
-	   if (!got_one) {
-	      _mesa_glsl_error(& @1, state, "unrecognized layout identifier "
-			       "`%s'\n", $1);
-	      YYERROR;
-	   } else if (state->ARB_fragment_coord_conventions_warn) {
-	      _mesa_glsl_warning(& @1, state,
-				 "GL_ARB_fragment_coord_conventions layout "
-				 "identifier `%s' used\n", $1);
-	   }
-	}
-	| IDENTIFIER '=' INTCONSTANT
-	{
-	   bool got_one = false;
-
-	   memset(& $$, 0, sizeof($$));
-
-	   if (state->ARB_explicit_attrib_location_enable) {
-	      /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and
-	       * FINISHME: GLSL 1.30 (or later) are supported.
-	       */
-	      if (strcmp("location", $1) == 0) {
-		 got_one = true;
-
-		 $$.flags.q.explicit_location = 1;
-
-		 if ($3 >= 0) {
-		    $$.location = $3;
-		 } else {
-		    _mesa_glsl_error(& @3, state,
-				     "invalid location %d specified\n", $3);
-		    YYERROR;
-		 }
-	      }
-	   }
-
-	   /* If the identifier didn't match any known layout identifiers,
-	    * emit an error.
-	    */
-	   if (!got_one) {
-	      _mesa_glsl_error(& @1, state, "unrecognized layout identifier "
-			       "`%s'\n", $1);
-	      YYERROR;
-	   } else if (state->ARB_explicit_attrib_location_warn) {
-	      _mesa_glsl_warning(& @1, state,
-				 "GL_ARB_explicit_attrib_location layout "
-				 "identifier `%s' used\n", $1);
-	   }
-	}
-	;
-
-interpolation_qualifier:
-	SMOOTH
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.smooth = 1;
-	}
-	| FLAT
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.flat = 1;
-	}
-	| NOPERSPECTIVE
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.noperspective = 1;
-	}
-	;
-
-parameter_type_qualifier:
-	CONST_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.constant = 1;
-	}
-	;
-
-type_qualifier:
-	storage_qualifier
-	| layout_qualifier
-	| layout_qualifier storage_qualifier
-	{
-	   $$ = $1;
-	   $$.flags.i |= $2.flags.i;
-	}
-	| interpolation_qualifier
-	| interpolation_qualifier storage_qualifier
-	{
-	   $$ = $1;
-	   $$.flags.i |= $2.flags.i;
-	}
-	| INVARIANT storage_qualifier
-	{
-	   $$ = $2;
-	   $$.flags.q.invariant = 1;
-	}
-	| INVARIANT interpolation_qualifier storage_qualifier
-	{
-	   $$ = $2;
-	   $$.flags.i |= $3.flags.i;
-	   $$.flags.q.invariant = 1;
-	}
-	| INVARIANT
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.invariant = 1;
-	}
-	;
-
-storage_qualifier:
-	CONST_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.constant = 1;
-	}
-	| ATTRIBUTE
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.attribute = 1;
-	}
-	| VARYING
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.varying = 1;
-	}
-	| CENTROID VARYING
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.centroid = 1;
-	   $$.flags.q.varying = 1;
-	}
-	| IN_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.in = 1;
-	}
-	| OUT_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.out = 1;
-	}
-	| CENTROID IN_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.centroid = 1; $$.flags.q.in = 1;
-	}
-	| CENTROID OUT_TOK
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.centroid = 1; $$.flags.q.out = 1;
-	}
-	| UNIFORM
-	{
-	   memset(& $$, 0, sizeof($$));
-	   $$.flags.q.uniform = 1;
-	}
-	;
-
-type_specifier:
-	type_specifier_no_prec
-	| precision_qualifier type_specifier_no_prec
-	{
-	   $$ = $2;
-	   $$->precision = $1;
-	}
-	;
-
-type_specifier_no_prec:
-	type_specifier_nonarray
-	| type_specifier_nonarray '[' ']'
-	{
-	   $$ = $1;
-	   $$->is_array = true;
-	   $$->array_size = NULL;
-	}
-	| type_specifier_nonarray '[' constant_expression ']'
-	{
-	   $$ = $1;
-	   $$->is_array = true;
-	   $$->array_size = $3;
-	}
-	;
-
-type_specifier_nonarray:
-	basic_type_specifier_nonarray
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_type_specifier($1);
-	   $$->set_location(yylloc);
-	}
-	| struct_specifier
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_type_specifier($1);
-	   $$->set_location(yylloc);
-	}
-	| IDENTIFIER
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_type_specifier($1);
-	   $$->set_location(yylloc);
-	}
-	;
-
-basic_type_specifier_nonarray:
-	VOID_TOK		{ $$ = ast_void; }
-	| FLOAT_TOK		{ $$ = ast_float; }
-	| INT_TOK		{ $$ = ast_int; }
-	| UINT_TOK		{ $$ = ast_uint; }
-	| BOOL_TOK		{ $$ = ast_bool; }
-	| VEC2			{ $$ = ast_vec2; }
-	| VEC3			{ $$ = ast_vec3; }
-	| VEC4			{ $$ = ast_vec4; }
-	| BVEC2			{ $$ = ast_bvec2; }
-	| BVEC3			{ $$ = ast_bvec3; }
-	| BVEC4			{ $$ = ast_bvec4; }
-	| IVEC2			{ $$ = ast_ivec2; }
-	| IVEC3			{ $$ = ast_ivec3; }
-	| IVEC4			{ $$ = ast_ivec4; }
-	| UVEC2			{ $$ = ast_uvec2; }
-	| UVEC3			{ $$ = ast_uvec3; }
-	| UVEC4			{ $$ = ast_uvec4; }
-	| MAT2X2		{ $$ = ast_mat2; }
-	| MAT2X3		{ $$ = ast_mat2x3; }
-	| MAT2X4		{ $$ = ast_mat2x4; }
-	| MAT3X2		{ $$ = ast_mat3x2; }
-	| MAT3X3		{ $$ = ast_mat3; }
-	| MAT3X4		{ $$ = ast_mat3x4; }
-	| MAT4X2		{ $$ = ast_mat4x2; }
-	| MAT4X3		{ $$ = ast_mat4x3; }
-	| MAT4X4		{ $$ = ast_mat4; }
-	| SAMPLER1D		{ $$ = ast_sampler1d; }
-	| SAMPLER2D		{ $$ = ast_sampler2d; }
-	| SAMPLER2DRECT		{ $$ = ast_sampler2drect; }
-	| SAMPLER3D		{ $$ = ast_sampler3d; }
-	| SAMPLERCUBE		{ $$ = ast_samplercube; }
-	| SAMPLER1DSHADOW	{ $$ = ast_sampler1dshadow; }
-	| SAMPLER2DSHADOW	{ $$ = ast_sampler2dshadow; }
-	| SAMPLER2DRECTSHADOW	{ $$ = ast_sampler2drectshadow; }
-	| SAMPLERCUBESHADOW	{ $$ = ast_samplercubeshadow; }
-	| SAMPLER1DARRAY	{ $$ = ast_sampler1darray; }
-	| SAMPLER2DARRAY	{ $$ = ast_sampler2darray; }
-	| SAMPLER1DARRAYSHADOW	{ $$ = ast_sampler1darrayshadow; }
-	| SAMPLER2DARRAYSHADOW	{ $$ = ast_sampler2darrayshadow; }
-	| ISAMPLER1D		{ $$ = ast_isampler1d; }
-	| ISAMPLER2D		{ $$ = ast_isampler2d; }
-	| ISAMPLER3D		{ $$ = ast_isampler3d; }
-	| ISAMPLERCUBE		{ $$ = ast_isamplercube; }
-	| ISAMPLER1DARRAY	{ $$ = ast_isampler1darray; }
-	| ISAMPLER2DARRAY	{ $$ = ast_isampler2darray; }
-	| USAMPLER1D		{ $$ = ast_usampler1d; }
-	| USAMPLER2D		{ $$ = ast_usampler2d; }
-	| USAMPLER3D		{ $$ = ast_usampler3d; }
-	| USAMPLERCUBE		{ $$ = ast_usamplercube; }
-	| USAMPLER1DARRAY	{ $$ = ast_usampler1darray; }
-	| USAMPLER2DARRAY	{ $$ = ast_usampler2darray; }
-	;
-
-precision_qualifier:
-	HIGHP	  {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& @1, state,
-				         "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     $$ = ast_precision_high;
-		  }
-	| MEDIUMP {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& @1, state,
-					 "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     $$ = ast_precision_medium;
-		  }
-	| LOWP	  {
-		     if (!state->es_shader && state->language_version < 130)
-			_mesa_glsl_error(& @1, state,
-					 "precision qualifier forbidden "
-					 "in GLSL %d.%d (1.30 or later "
-					 "required)\n",
-					 state->language_version / 100,
-					 state->language_version % 100);
-
-		     $$ = ast_precision_low;
-		  }
-	;
-
-struct_specifier:
-	STRUCT IDENTIFIER '{' struct_declaration_list '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_struct_specifier($2, $4);
-	   $$->set_location(yylloc);
-	}
-	| STRUCT '{' struct_declaration_list '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_struct_specifier(NULL, $3);
-	   $$->set_location(yylloc);
-	}
-	;
-
-struct_declaration_list:
-	struct_declaration
-	{
-	   $$ = (ast_node *) $1;
-	   $1->link.self_link();
-	}
-	| struct_declaration_list struct_declaration
-	{
-	   $$ = (ast_node *) $1;
-	   $$->link.insert_before(& $2->link);
-	}
-	;
-
-struct_declaration:
-	type_specifier struct_declarator_list ';'
-	{
-	   void *ctx = state;
-	   ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
-	   type->set_location(yylloc);
-
-	   type->specifier = $1;
-	   $$ = new(ctx) ast_declarator_list(type);
-	   $$->set_location(yylloc);
-
-	   $$->declarations.push_degenerate_list_at_head(& $2->link);
-	}
-	;
-
-struct_declarator_list:
-	struct_declarator
-	{
-	   $$ = $1;
-	   $1->link.self_link();
-	}
-	| struct_declarator_list ',' struct_declarator
-	{
-	   $$ = $1;
-	   $$->link.insert_before(& $3->link);
-	}
-	;
-
-struct_declarator:
-	IDENTIFIER
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_declaration($1, false, NULL, NULL);
-	   $$->set_location(yylloc);
-	}
-	| IDENTIFIER '[' constant_expression ']'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_declaration($1, true, $3, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-initializer:
-	assignment_expression
-	;
-
-declaration_statement:
-	declaration
-	;
-
-	// Grammar Note: labeled statements for SWITCH only; 'goto' is not
-	// supported.
-statement:
-	compound_statement	{ $$ = (ast_node *) $1; }
-	| simple_statement
-	;
-
-simple_statement:
-	declaration_statement
-	| expression_statement
-	| selection_statement
-	| switch_statement		{ $$ = NULL; }
-	| case_label			{ $$ = NULL; }
-	| iteration_statement
-	| jump_statement
-	;
-
-compound_statement:
-	'{' '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_compound_statement(true, NULL);
-	   $$->set_location(yylloc);
-	}
-	| '{' statement_list '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_compound_statement(true, $2);
-	   $$->set_location(yylloc);
-	}
-	;
-
-statement_no_new_scope:
-	compound_statement_no_new_scope { $$ = (ast_node *) $1; }
-	| simple_statement
-	;
-
-compound_statement_no_new_scope:
-	'{' '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_compound_statement(false, NULL);
-	   $$->set_location(yylloc);
-	}
-	| '{' statement_list '}'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_compound_statement(false, $2);
-	   $$->set_location(yylloc);
-	}
-	;
-
-statement_list:
-	statement
-	{
-	   if ($1 == NULL) {
-	      _mesa_glsl_error(& @1, state, "<nil> statement\n");
-	      assert($1 != NULL);
-	   }
-
-	   $$ = $1;
-	   $$->link.self_link();
-	}
-	| statement_list statement
-	{
-	   if ($2 == NULL) {
-	      _mesa_glsl_error(& @2, state, "<nil> statement\n");
-	      assert($2 != NULL);
-	   }
-	   $$ = $1;
-	   $$->link.insert_before(& $2->link);
-	}
-	;
-
-expression_statement:
-	';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_statement(NULL);
-	   $$->set_location(yylloc);
-	}
-	| expression ';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_expression_statement($1);
-	   $$->set_location(yylloc);
-	}
-	;
-
-selection_statement:
-	IF '(' expression ')' selection_rest_statement
-	{
-	   $$ = new(state) ast_selection_statement($3, $5.then_statement,
-						   $5.else_statement);
-	   $$->set_location(yylloc);
-	}
-	;
-
-selection_rest_statement:
-	statement ELSE statement
-	{
-	   $$.then_statement = $1;
-	   $$.else_statement = $3;
-	}
-	| statement
-	{
-	   $$.then_statement = $1;
-	   $$.else_statement = NULL;
-	}
-	;
-
-condition:
-	expression
-	{
-	   $$ = (ast_node *) $1;
-	}
-	| fully_specified_type IDENTIFIER '=' initializer
-	{
-	   void *ctx = state;
-	   ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4);
-	   ast_declarator_list *declarator = new(ctx) ast_declarator_list($1);
-	   decl->set_location(yylloc);
-	   declarator->set_location(yylloc);
-
-	   declarator->declarations.push_tail(&decl->link);
-	   $$ = declarator;
-	}
-	;
-
-switch_statement:
-	SWITCH '(' expression ')' compound_statement
-	;
-
-case_label:
-	CASE expression ':'
-	| DEFAULT ':'
-	;
-
-iteration_statement:
-	WHILE '(' condition ')' statement_no_new_scope
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while,
-	   					    NULL, $3, NULL, $5);
-	   $$->set_location(yylloc);
-	}
-	| DO statement WHILE '(' expression ')' ';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while,
-						    NULL, $5, NULL, $2);
-	   $$->set_location(yylloc);
-	}
-	| FOR '(' for_init_statement for_rest_statement ')' statement_no_new_scope
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for,
-						    $3, $4.cond, $4.rest, $6);
-	   $$->set_location(yylloc);
-	}
-	;
-
-for_init_statement:
-	expression_statement
-	| declaration_statement
-	;
-
-conditionopt:
-	condition
-	| /* empty */
-	{
-	   $$ = NULL;
-	}
-	;
-
-for_rest_statement:
-	conditionopt ';'
-	{
-	   $$.cond = $1;
-	   $$.rest = NULL;
-	}
-	| conditionopt ';' expression
-	{
-	   $$.cond = $1;
-	   $$.rest = $3;
-	}
-	;
-
-	// Grammar Note: No 'goto'. Gotos are not supported.
-jump_statement:
-	CONTINUE ';' 
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
-	   $$->set_location(yylloc);
-	}
-	| BREAK ';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
-	   $$->set_location(yylloc);
-	}
-	| RETURN ';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
-	   $$->set_location(yylloc);
-	}
-	| RETURN expression ';'
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, $2);
-	   $$->set_location(yylloc);
-	}
-	| DISCARD ';' // Fragment shader only.
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
-	   $$->set_location(yylloc);
-	}
-	;
-
-external_declaration:
-	function_definition	{ $$ = $1; }
-	| declaration		{ $$ = $1; }
-	| pragma_statement	{ $$ = NULL; }
-	;
-
-function_definition:
-	function_prototype compound_statement_no_new_scope
-	{
-	   void *ctx = state;
-	   $$ = new(ctx) ast_function_definition();
-	   $$->set_location(yylloc);
-	   $$->prototype = $1;
-	   $$->body = $2;
-	}
-	;
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
deleted file mode 100644
index d9f52da..0000000
--- a/src/glsl/glsl_parser_extras.cpp
+++ /dev/null
@@ -1,777 +0,0 @@
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <assert.h>
-
-extern "C" {
-#include <hieralloc.h>
-#include "main/core.h" /* for struct gl_context */
-}
-
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_parser.h"
-#include "ir_optimization.h"
-#include "loop_analysis.h"
-
-_mesa_glsl_parse_state::_mesa_glsl_parse_state(const struct gl_context *ctx,
-					       GLenum target, void *mem_ctx)
-{
-   switch (target) {
-   case GL_VERTEX_SHADER:   this->target = vertex_shader; break;
-   case GL_FRAGMENT_SHADER: this->target = fragment_shader; break;
-   case GL_GEOMETRY_SHADER: this->target = geometry_shader; break;
-   }
-
-   this->scanner = NULL;
-   this->translation_unit.make_empty();
-   this->symbols = new(mem_ctx) glsl_symbol_table(mem_ctx);
-   this->info_log = hieralloc_strdup(mem_ctx, "");
-   this->error = false;
-   this->loop_or_switch_nesting = NULL;
-
-   /* Set default language version and extensions */
-   this->language_version = 110;
-   this->es_shader = false;
-   this->ARB_texture_rectangle_enable = true;
-
-   /* OpenGL ES 2.0 has different defaults from desktop GL. */
-   if (ctx->API == API_OPENGLES2) {
-      this->language_version = 120;
-      this->es_shader = true;
-      this->ARB_texture_rectangle_enable = false;
-   }
-
-   this->extensions = &ctx->Extensions;
-
-   this->Const.MaxLights = ctx->Const.MaxLights;
-   this->Const.MaxClipPlanes = ctx->Const.MaxClipPlanes;
-   this->Const.MaxTextureUnits = ctx->Const.MaxTextureUnits;
-   this->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits;
-   this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs;
-   this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents;
-   this->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4;
-   this->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits;
-   this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
-   this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
-   this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
-
-   this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
-}
-
-const char *
-_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target)
-{
-   switch (target) {
-   case vertex_shader:   return "vertex";
-   case fragment_shader: return "fragment";
-   case geometry_shader: return "geometry";
-   }
-
-   assert(!"Should not get here.");
-   return "unknown";
-}
-
-
-void
-_mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
-		 const char *fmt, ...)
-{
-   va_list ap;
-
-   state->error = true;
-
-   assert(state->info_log != NULL);
-   state->info_log = hieralloc_asprintf_append(state->info_log,
-					    "%u:%u(%u): error: ",
-					    locp->source,
-					    locp->first_line,
-					    locp->first_column);
-   va_start(ap, fmt);
-   state->info_log = hieralloc_vasprintf_append(state->info_log, fmt, ap);
-   va_end(ap);
-   state->info_log = hieralloc_strdup_append(state->info_log, "\n");
-}
-
-
-void
-_mesa_glsl_warning(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
-		   const char *fmt, ...)
-{
-   va_list ap;
-
-   assert(state->info_log != NULL);
-   state->info_log = hieralloc_asprintf_append(state->info_log,
-					    "%u:%u(%u): warning: ",
-					    locp->source,
-					    locp->first_line,
-					    locp->first_column);
-   va_start(ap, fmt);
-   state->info_log = hieralloc_vasprintf_append(state->info_log, fmt, ap);
-   va_end(ap);
-   state->info_log = hieralloc_strdup_append(state->info_log, "\n");
-}
-
-
-bool
-_mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
-			     const char *behavior, YYLTYPE *behavior_locp,
-			     _mesa_glsl_parse_state *state)
-{
-   enum {
-      extension_disable,
-      extension_enable,
-      extension_require,
-      extension_warn
-   } ext_mode;
-
-   if (strcmp(behavior, "warn") == 0) {
-      ext_mode = extension_warn;
-   } else if (strcmp(behavior, "require") == 0) {
-      ext_mode = extension_require;
-   } else if (strcmp(behavior, "enable") == 0) {
-      ext_mode = extension_enable;
-   } else if (strcmp(behavior, "disable") == 0) {
-      ext_mode = extension_disable;
-   } else {
-      _mesa_glsl_error(behavior_locp, state,
-		       "Unknown extension behavior `%s'",
-		       behavior);
-      return false;
-   }
-
-   bool unsupported = false;
-
-   if (strcmp(name, "all") == 0) {
-      if ((ext_mode == extension_enable) || (ext_mode == extension_require)) {
-	 _mesa_glsl_error(name_locp, state, "Cannot %s all extensions",
-			  (ext_mode == extension_enable)
-			  ? "enable" : "require");
-	 return false;
-      }
-   } else if (strcmp(name, "GL_ARB_draw_buffers") == 0) {
-      /* This extension is only supported in fragment shaders.
-       */
-      if (state->target != fragment_shader) {
-	 unsupported = true;
-      } else {
-	 state->ARB_draw_buffers_enable = (ext_mode != extension_disable);
-	 state->ARB_draw_buffers_warn = (ext_mode == extension_warn);
-      }
-   } else if (strcmp(name, "GL_ARB_explicit_attrib_location") == 0) {
-      state->ARB_explicit_attrib_location_enable =
-	 (ext_mode != extension_disable);
-      state->ARB_explicit_attrib_location_warn =
-	 (ext_mode == extension_warn);
-
-      unsupported = !state->extensions->ARB_explicit_attrib_location;
-   } else if (strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) {
-      state->ARB_fragment_coord_conventions_enable =
-	 (ext_mode != extension_disable);
-      state->ARB_fragment_coord_conventions_warn =
-	 (ext_mode == extension_warn);
-
-      unsupported = !state->extensions->ARB_fragment_coord_conventions;
-   } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) {
-      state->ARB_texture_rectangle_enable = (ext_mode != extension_disable);
-      state->ARB_texture_rectangle_warn = (ext_mode == extension_warn);
-   } else if (strcmp(name, "GL_EXT_texture_array") == 0) {
-      state->EXT_texture_array_enable = (ext_mode != extension_disable);
-      state->EXT_texture_array_warn = (ext_mode == extension_warn);
-
-      unsupported = !state->extensions->EXT_texture_array;
-   } else if (strcmp(name, "GL_ARB_shader_stencil_export") == 0) {
-      if (state->target != fragment_shader) {
-	 unsupported = true;
-      } else {
-	 state->ARB_shader_stencil_export_enable = (ext_mode != extension_disable);
-	 state->ARB_shader_stencil_export_warn = (ext_mode == extension_warn);
-	 unsupported = !state->extensions->ARB_shader_stencil_export;
-      }
-   } else {
-      unsupported = true;
-   }
-
-   if (unsupported) {
-      static const char *const fmt = "extension `%s' unsupported in %s shader";
-
-      if (ext_mode == extension_require) {
-	 _mesa_glsl_error(name_locp, state, fmt,
-			  name, _mesa_glsl_shader_target_name(state->target));
-	 return false;
-      } else {
-	 _mesa_glsl_warning(name_locp, state, fmt,
-			    name, _mesa_glsl_shader_target_name(state->target));
-      }
-   }
-
-   return true;
-}
-
-void
-_mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q)
-{
-   if (q->flags.q.constant)
-      printf("const ");
-
-   if (q->flags.q.invariant)
-      printf("invariant ");
-
-   if (q->flags.q.attribute)
-      printf("attribute ");
-
-   if (q->flags.q.varying)
-      printf("varying ");
-
-   if (q->flags.q.in && q->flags.q.out)
-      printf("inout ");
-   else {
-      if (q->flags.q.in)
-	 printf("in ");
-
-      if (q->flags.q.out)
-	 printf("out ");
-   }
-
-   if (q->flags.q.centroid)
-      printf("centroid ");
-   if (q->flags.q.uniform)
-      printf("uniform ");
-   if (q->flags.q.smooth)
-      printf("smooth ");
-   if (q->flags.q.flat)
-      printf("flat ");
-   if (q->flags.q.noperspective)
-      printf("noperspective ");
-}
-
-
-void
-ast_node::print(void) const
-{
-   printf("unhandled node ");
-}
-
-
-ast_node::ast_node(void)
-{
-   this->location.source = 0;
-   this->location.line = 0;
-   this->location.column = 0;
-}
-
-
-static void
-ast_opt_array_size_print(bool is_array, const ast_expression *array_size)
-{
-   if (is_array) {
-      printf("[ ");
-
-      if (array_size)
-	 array_size->print();
-
-      printf("] ");
-   }
-}
-
-
-void
-ast_compound_statement::print(void) const
-{
-   printf("{\n");
-   
-   foreach_list_const(n, &this->statements) {
-      ast_node *ast = exec_node_data(ast_node, n, link);
-      ast->print();
-   }
-
-   printf("}\n");
-}
-
-
-ast_compound_statement::ast_compound_statement(int new_scope,
-					       ast_node *statements)
-{
-   this->new_scope = new_scope;
-
-   if (statements != NULL) {
-      this->statements.push_degenerate_list_at_head(&statements->link);
-   }
-}
-
-
-void
-ast_expression::print(void) const
-{
-   switch (oper) {
-   case ast_assign:
-   case ast_mul_assign:
-   case ast_div_assign:
-   case ast_mod_assign:
-   case ast_add_assign:
-   case ast_sub_assign:
-   case ast_ls_assign:
-   case ast_rs_assign:
-   case ast_and_assign:
-   case ast_xor_assign:
-   case ast_or_assign:
-      subexpressions[0]->print();
-      printf("%s ", operator_string(oper));
-      subexpressions[1]->print();
-      break;
-
-   case ast_field_selection:
-      subexpressions[0]->print();
-      printf(". %s ", primary_expression.identifier);
-      break;
-
-   case ast_plus:
-   case ast_neg:
-   case ast_bit_not:
-   case ast_logic_not:
-   case ast_pre_inc:
-   case ast_pre_dec:
-      printf("%s ", operator_string(oper));
-      subexpressions[0]->print();
-      break;
-
-   case ast_post_inc:
-   case ast_post_dec:
-      subexpressions[0]->print();
-      printf("%s ", operator_string(oper));
-      break;
-
-   case ast_conditional:
-      subexpressions[0]->print();
-      printf("? ");
-      subexpressions[1]->print();
-      printf(": ");
-      subexpressions[1]->print();
-      break;
-
-   case ast_array_index:
-      subexpressions[0]->print();
-      printf("[ ");
-      subexpressions[1]->print();
-      printf("] ");
-      break;
-
-   case ast_function_call: {
-      subexpressions[0]->print();
-      printf("( ");
-
-      foreach_list_const (n, &this->expressions) {
-	 if (n != this->expressions.get_head())
-	    printf(", ");
-
-	 ast_node *ast = exec_node_data(ast_node, n, link);
-	 ast->print();
-      }
-
-      printf(") ");
-      break;
-   }
-
-   case ast_identifier:
-      printf("%s ", primary_expression.identifier);
-      break;
-
-   case ast_int_constant:
-      printf("%d ", primary_expression.int_constant);
-      break;
-
-   case ast_uint_constant:
-      printf("%u ", primary_expression.uint_constant);
-      break;
-
-   case ast_float_constant:
-      printf("%f ", primary_expression.float_constant);
-      break;
-
-   case ast_bool_constant:
-      printf("%s ",
-	     primary_expression.bool_constant
-	     ? "true" : "false");
-      break;
-
-   case ast_sequence: {
-      printf("( ");
-      foreach_list_const(n, & this->expressions) {
-	 if (n != this->expressions.get_head())
-	    printf(", ");
-
-	 ast_node *ast = exec_node_data(ast_node, n, link);
-	 ast->print();
-      }
-      printf(") ");
-      break;
-   }
-
-   default:
-      assert(0);
-      break;
-   }
-}
-
-ast_expression::ast_expression(int oper,
-			       ast_expression *ex0,
-			       ast_expression *ex1,
-			       ast_expression *ex2)
-{
-   this->oper = ast_operators(oper);
-   this->subexpressions[0] = ex0;
-   this->subexpressions[1] = ex1;
-   this->subexpressions[2] = ex2;
-}
-
-
-void
-ast_expression_statement::print(void) const
-{
-   if (expression)
-      expression->print();
-
-   printf("; ");
-}
-
-
-ast_expression_statement::ast_expression_statement(ast_expression *ex) :
-   expression(ex)
-{
-   /* empty */
-}
-
-
-void
-ast_function::print(void) const
-{
-   return_type->print();
-   printf(" %s (", identifier);
-
-   foreach_list_const(n, & this->parameters) {
-      ast_node *ast = exec_node_data(ast_node, n, link);
-      ast->print();
-   }
-
-   printf(")");
-}
-
-
-ast_function::ast_function(void)
-   : is_definition(false), signature(NULL)
-{
-   /* empty */
-}
-
-
-void
-ast_fully_specified_type::print(void) const
-{
-   _mesa_ast_type_qualifier_print(& qualifier);
-   specifier->print();
-}
-
-
-void
-ast_parameter_declarator::print(void) const
-{
-   type->print();
-   if (identifier)
-      printf("%s ", identifier);
-   ast_opt_array_size_print(is_array, array_size);
-}
-
-
-void
-ast_function_definition::print(void) const
-{
-   prototype->print();
-   body->print();
-}
-
-
-void
-ast_declaration::print(void) const
-{
-   printf("%s ", identifier);
-   ast_opt_array_size_print(is_array, array_size);
-
-   if (initializer) {
-      printf("= ");
-      initializer->print();
-   }
-}
-
-
-ast_declaration::ast_declaration(char *identifier, int is_array,
-				 ast_expression *array_size,
-				 ast_expression *initializer)
-{
-   this->identifier = identifier;
-   this->is_array = is_array;
-   this->array_size = array_size;
-   this->initializer = initializer;
-}
-
-
-void
-ast_declarator_list::print(void) const
-{
-   assert(type || invariant);
-
-   if (type)
-      type->print();
-   else
-      printf("invariant ");
-
-   foreach_list_const (ptr, & this->declarations) {
-      if (ptr != this->declarations.get_head())
-	 printf(", ");
-
-      ast_node *ast = exec_node_data(ast_node, ptr, link);
-      ast->print();
-   }
-
-   printf("; ");
-}
-
-
-ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type)
-{
-   this->type = type;
-   this->invariant = false;
-}
-
-void
-ast_jump_statement::print(void) const
-{
-   switch (mode) {
-   case ast_continue:
-      printf("continue; ");
-      break;
-   case ast_break:
-      printf("break; ");
-      break;
-   case ast_return:
-      printf("return ");
-      if (opt_return_value)
-	 opt_return_value->print();
-
-      printf("; ");
-      break;
-   case ast_discard:
-      printf("discard; ");
-      break;
-   }
-}
-
-
-ast_jump_statement::ast_jump_statement(int mode, ast_expression *return_value)
-{
-   this->mode = ast_jump_modes(mode);
-
-   if (mode == ast_return)
-      opt_return_value = return_value;
-}
-
-
-void
-ast_selection_statement::print(void) const
-{
-   printf("if ( ");
-   condition->print();
-   printf(") ");
-
-   then_statement->print();
-
-   if (else_statement) {
-      printf("else ");
-      else_statement->print();
-   }
-   
-}
-
-
-ast_selection_statement::ast_selection_statement(ast_expression *condition,
-						 ast_node *then_statement,
-						 ast_node *else_statement)
-{
-   this->condition = condition;
-   this->then_statement = then_statement;
-   this->else_statement = else_statement;
-}
-
-
-void
-ast_iteration_statement::print(void) const
-{
-   switch (mode) {
-   case ast_for:
-      printf("for( ");
-      if (init_statement)
-	 init_statement->print();
-      printf("; ");
-
-      if (condition)
-	 condition->print();
-      printf("; ");
-
-      if (rest_expression)
-	 rest_expression->print();
-      printf(") ");
-
-      body->print();
-      break;
-
-   case ast_while:
-      printf("while ( ");
-      if (condition)
-	 condition->print();
-      printf(") ");
-      body->print();
-      break;
-
-   case ast_do_while:
-      printf("do ");
-      body->print();
-      printf("while ( ");
-      if (condition)
-	 condition->print();
-      printf("); ");
-      break;
-   }
-}
-
-
-ast_iteration_statement::ast_iteration_statement(int mode,
-						 ast_node *init,
-						 ast_node *condition,
-						 ast_expression *rest_expression,
-						 ast_node *body)
-{
-   this->mode = ast_iteration_modes(mode);
-   this->init_statement = init;
-   this->condition = condition;
-   this->rest_expression = rest_expression;
-   this->body = body;
-}
-
-
-void
-ast_struct_specifier::print(void) const
-{
-   printf("struct %s { ", name);
-   foreach_list_const(n, &this->declarations) {
-      ast_node *ast = exec_node_data(ast_node, n, link);
-      ast->print();
-   }
-   printf("} ");
-}
-
-
-ast_struct_specifier::ast_struct_specifier(char *identifier,
-					   ast_node *declarator_list)
-{
-   if (identifier == NULL) {
-      static unsigned anon_count = 1;
-      identifier = hieralloc_asprintf(this, "#anon_struct_%04x", anon_count);
-      anon_count++;
-   }
-   name = identifier;
-   this->declarations.push_degenerate_list_at_head(&declarator_list->link);
-}
-
-bool
-do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations)
-{
-   GLboolean progress = GL_FALSE;
-
-   progress = lower_instructions(ir, SUB_TO_ADD_NEG) || progress;
-
-   if (linked) {
-      progress = do_function_inlining(ir) || progress;
-      progress = do_dead_functions(ir) || progress;
-   }
-   progress = do_structure_splitting(ir) || progress;
-   progress = do_if_simplification(ir) || progress;
-   progress = do_discard_simplification(ir) || progress;
-   progress = do_copy_propagation(ir) || progress;
-   if (linked)
-      progress = do_dead_code(ir) || progress;
-   else
-      progress = do_dead_code_unlinked(ir) || progress;
-   progress = do_dead_code_local(ir) || progress;
-   progress = do_tree_grafting(ir) || progress;
-   progress = do_constant_propagation(ir) || progress;
-   if (linked)
-      progress = do_constant_variable(ir) || progress;
-   else
-      progress = do_constant_variable_unlinked(ir) || progress;
-   progress = do_constant_folding(ir) || progress;
-   progress = do_algebraic(ir) || progress;
-   progress = do_lower_jumps(ir) || progress;
-   progress = do_vec_index_to_swizzle(ir) || progress;
-   progress = do_swizzle_swizzle(ir) || progress;
-   progress = do_noop_swizzle(ir) || progress;
-
-   progress = optimize_redundant_jumps(ir) || progress;
-
-   loop_state *ls = analyze_loop_variables(ir);
-   progress = set_loop_controls(ir, ls) || progress;
-   progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
-   delete ls;
-
-   return progress;
-}
-
-extern "C" {
-
-/**
- * To be called at GL teardown time, this frees compiler datastructures.
- *
- * After calling this, any previously compiled shaders and shader
- * programs would be invalid.  So this should happen at approximately
- * program exit.
- */
-void
-_mesa_destroy_shader_compiler(void)
-{
-   _mesa_destroy_shader_compiler_caches();
-
-   _mesa_glsl_release_types();
-}
-
-/**
- * Releases compiler caches to trade off performance for memory.
- *
- * Intended to be used with glReleaseShaderCompiler().
- */
-void
-_mesa_destroy_shader_compiler_caches(void)
-{
-   _mesa_glsl_release_functions();
-}
-
-}
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
deleted file mode 100644
index e65a0a3..0000000
--- a/src/glsl/glsl_parser_extras.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef GLSL_PARSER_EXTRAS_H
-#define GLSL_PARSER_EXTRAS_H
-
-/*
- * Most of the definitions here only apply to C++
- */
-#ifdef __cplusplus
-
-
-#include <cstdlib>
-#include "glsl_symbol_table.h"
-
-enum _mesa_glsl_parser_targets {
-   vertex_shader,
-   geometry_shader,
-   fragment_shader
-};
-
-struct gl_context;
-
-struct _mesa_glsl_parse_state {
-   _mesa_glsl_parse_state(const struct gl_context *ctx, GLenum target,
-			  void *mem_ctx);
-
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *mem = hieralloc_zero_size(ctx, size);
-      assert(mem != NULL);
-
-      return mem;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. */
-   static void operator delete(void *mem)
-   {
-      hieralloc_free(mem);
-   }
-
-   void *scanner;
-   exec_list translation_unit;
-   glsl_symbol_table *symbols;
-
-   bool es_shader;
-   unsigned language_version;
-   enum _mesa_glsl_parser_targets target;
-
-   /**
-    * Implementation defined limits that affect built-in variables, etc.
-    *
-    * \sa struct gl_constants (in mtypes.h)
-    */
-   struct {
-      /* 1.10 */
-      unsigned MaxLights;
-      unsigned MaxClipPlanes;
-      unsigned MaxTextureUnits;
-      unsigned MaxTextureCoords;
-      unsigned MaxVertexAttribs;
-      unsigned MaxVertexUniformComponents;
-      unsigned MaxVaryingFloats;
-      unsigned MaxVertexTextureImageUnits;
-      unsigned MaxCombinedTextureImageUnits;
-      unsigned MaxTextureImageUnits;
-      unsigned MaxFragmentUniformComponents;
-
-      /* ARB_draw_buffers */
-      unsigned MaxDrawBuffers;
-   } Const;
-
-   /**
-    * During AST to IR conversion, pointer to current IR function
-    *
-    * Will be \c NULL whenever the AST to IR conversion is not inside a
-    * function definition.
-    */
-   class ir_function_signature *current_function;
-
-   /** Have we found a return statement in this function? */
-   bool found_return;
-
-   /** Was there an error during compilation? */
-   bool error;
-
-   /** Loop or switch statement containing the current instructions. */
-   class ir_instruction *loop_or_switch_nesting;
-   class ast_iteration_statement *loop_or_switch_nesting_ast;
-
-   /** List of structures defined in user code. */
-   const glsl_type **user_structures;
-   unsigned num_user_structures;
-
-   char *info_log;
-
-   /**
-    * \name Enable bits for GLSL extensions
-    */
-   /*@{*/
-   unsigned ARB_draw_buffers_enable:1;
-   unsigned ARB_draw_buffers_warn:1;
-   unsigned ARB_explicit_attrib_location_enable:1;
-   unsigned ARB_explicit_attrib_location_warn:1;
-   unsigned ARB_fragment_coord_conventions_enable:1;
-   unsigned ARB_fragment_coord_conventions_warn:1;
-   unsigned ARB_texture_rectangle_enable:1;
-   unsigned ARB_texture_rectangle_warn:1;
-   unsigned EXT_texture_array_enable:1;
-   unsigned EXT_texture_array_warn:1;
-   unsigned ARB_shader_stencil_export_enable:1;
-   unsigned ARB_shader_stencil_export_warn:1;
-   /*@}*/
-
-   /** Extensions supported by the OpenGL implementation. */
-   const struct gl_extensions *extensions;
-
-   /** Shaders containing built-in functions that are used for linking. */
-   struct gl_shader *builtins_to_link[16];
-   unsigned num_builtins_to_link;
-};
-
-typedef struct YYLTYPE {
-   int first_line;
-   int first_column;
-   int last_line;
-   int last_column;
-   unsigned source;
-} YYLTYPE;
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-
-# define YYLLOC_DEFAULT(Current, Rhs, N)			\
-do {								\
-   if (N)							\
-   {								\
-      (Current).first_line   = YYRHSLOC(Rhs, 1).first_line;	\
-      (Current).first_column = YYRHSLOC(Rhs, 1).first_column;	\
-      (Current).last_line    = YYRHSLOC(Rhs, N).last_line;	\
-      (Current).last_column  = YYRHSLOC(Rhs, N).last_column;	\
-   }								\
-   else								\
-   {								\
-      (Current).first_line   = (Current).last_line =		\
-	 YYRHSLOC(Rhs, 0).last_line;				\
-      (Current).first_column = (Current).last_column =		\
-	 YYRHSLOC(Rhs, 0).last_column;				\
-   }								\
-   (Current).source = 0;					\
-} while (0)
-
-extern void _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
-			     const char *fmt, ...);
-
-/**
- * Emit a warning to the shader log
- *
- * \sa _mesa_glsl_error
- */
-extern void _mesa_glsl_warning(const YYLTYPE *locp,
-			       _mesa_glsl_parse_state *state,
-			       const char *fmt, ...);
-
-extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
-				  const char *string);
-
-extern void _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state);
-
-union YYSTYPE;
-extern int _mesa_glsl_lex(union YYSTYPE *yylval, YYLTYPE *yylloc, 
-			  void *scanner);
-
-extern int _mesa_glsl_parse(struct _mesa_glsl_parse_state *);
-
-/**
- * Process elements of the #extension directive
- *
- * \return
- * If \c name and \c behavior are valid, \c true is returned.  Otherwise
- * \c false is returned.
- */
-extern bool _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
-					 const char *behavior,
-					 YYLTYPE *behavior_locp,
-					 _mesa_glsl_parse_state *state);
-
-/**
- * Get the textual name of the specified shader target
- */
-extern const char *
-_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target);
-
-
-#endif /* __cplusplus */
-
-
-/*
- * These definitions apply to C and C++
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int preprocess(void *ctx, const char **shader, char **info_log,
-                      const struct gl_extensions *extensions, int api);
-
-extern void _mesa_destroy_shader_compiler();
-extern void _mesa_destroy_shader_compiler_caches();
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* GLSL_PARSER_EXTRAS_H */
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
deleted file mode 100644
index 6602857..0000000
--- a/src/glsl/glsl_symbol_table.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "glsl_symbol_table.h"
-
-class symbol_table_entry {
-public:
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *entry = hieralloc_size(ctx, size);
-      assert(entry != NULL);
-      return entry;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. Here, C++ will have already called the
-    * destructor so tell hieralloc not to do that again. */
-   static void operator delete(void *table)
-   {
-      hieralloc_set_destructor(table, NULL);
-      hieralloc_free(table);
-   }
-
-   symbol_table_entry(ir_variable *v)                     : v(v), f(0), t(0) {}
-   symbol_table_entry(ir_function *f)                     : v(0), f(f), t(0) {}
-   symbol_table_entry(const glsl_type *t)                 : v(0), f(0), t(t) {}
-
-   ir_variable *v;
-   ir_function *f;
-   const glsl_type *t;
-}; 
-
-glsl_symbol_table::glsl_symbol_table(void * ctx)
-{
-   this->language_version = 120;
-   this->table = _mesa_symbol_table_ctor();
-   this->mem_ctx = hieralloc_allocate(ctx, 0, "symbol table entries");
-}
-
-glsl_symbol_table::~glsl_symbol_table()
-{
-   _mesa_symbol_table_dtor(table);
-   //hieralloc_free(mem_ctx); parent context free will free this
-}
-
-void glsl_symbol_table::push_scope()
-{
-   _mesa_symbol_table_push_scope(table);
-}
-
-void glsl_symbol_table::pop_scope()
-{
-   _mesa_symbol_table_pop_scope(table);
-}
-
-bool glsl_symbol_table::name_declared_this_scope(const char *name)
-{
-   return _mesa_symbol_table_symbol_scope(table, -1, name) == 0;
-}
-
-bool glsl_symbol_table::add_variable(ir_variable *v)
-{
-   if (this->language_version == 110) {
-      /* In 1.10, functions and variables have separate namespaces. */
-      symbol_table_entry *existing = get_entry(v->name);
-      if (name_declared_this_scope(v->name)) {
-	 /* If there's already an existing function (not a constructor!) in
-	  * the current scope, just update the existing entry to include 'v'.
-	  */
-	 if (existing->v == NULL && existing->t == NULL) {
-	    existing->v = v;
-	    return true;
-	 }
-      } else {
-	 /* If not declared at this scope, add a new entry.  But if an existing
-	  * entry includes a function, propagate that to this block - otherwise
-	  * the new variable declaration would shadow the function.
-	  */
-	 symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v);
-	 if (existing != NULL)
-	    entry->f = existing->f;
-	 int added = _mesa_symbol_table_add_symbol(table, -1, v->name, entry);
-	 assert(added == 0);
-	 (void)added;
-	 return true;
-      }
-      return false;
-   }
-
-   /* 1.20+ rules: */
-   symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v);
-   return _mesa_symbol_table_add_symbol(table, -1, v->name, entry) == 0;
-}
-
-bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
-{
-   symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(t);
-   return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
-}
-
-bool glsl_symbol_table::add_function(ir_function *f)
-{
-   if (this->language_version == 110 && name_declared_this_scope(f->name)) {
-      /* In 1.10, functions and variables have separate namespaces. */
-      symbol_table_entry *existing = get_entry(f->name);
-      if ((existing->f == NULL) && (existing->t == NULL)) {
-	 existing->f = f;
-	 return true;
-      }
-   }
-   symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
-   return _mesa_symbol_table_add_symbol(table, -1, f->name, entry) == 0;
-}
-
-void glsl_symbol_table::add_global_function(ir_function *f)
-{
-   symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
-   int added = _mesa_symbol_table_add_global_symbol(table, -1, f->name, entry);
-   assert(added == 0);
-}
-
-ir_variable *glsl_symbol_table::get_variable(const char *name)
-{
-   symbol_table_entry *entry = get_entry(name);
-   return entry != NULL ? entry->v : NULL;
-}
-
-const glsl_type *glsl_symbol_table::get_type(const char *name)
-{
-   symbol_table_entry *entry = get_entry(name);
-   return entry != NULL ? entry->t : NULL;
-}
-
-ir_function *glsl_symbol_table::get_function(const char *name)
-{
-   symbol_table_entry *entry = get_entry(name);
-   return entry != NULL ? entry->f : NULL;
-}
-
-symbol_table_entry *glsl_symbol_table::get_entry(const char *name)
-{
-   return (symbol_table_entry *)
-      _mesa_symbol_table_find_symbol(table, -1, name);
-}
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h
deleted file mode 100644
index 0004875..0000000
--- a/src/glsl/glsl_symbol_table.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef GLSL_SYMBOL_TABLE
-#define GLSL_SYMBOL_TABLE
-
-#include <new>
-
-extern "C" {
-#include "program/symbol_table.h"
-}
-#include "ir.h"
-#include "glsl_types.h"
-
-class symbol_table_entry;
-
-/**
- * Facade class for _mesa_symbol_table
- *
- * Wraps the existing \c _mesa_symbol_table data structure to enforce some
- * type safe and some symbol table invariants.
- */
-struct glsl_symbol_table {
-private:
-   static int
-   _glsl_symbol_table_destructor (glsl_symbol_table *table)
-   {
-      table->~glsl_symbol_table();
-
-      return 0;
-   }
-
-public:
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *table;
-
-      table = hieralloc_size(ctx, size);
-      assert(table != NULL);
-
-      hieralloc_set_destructor(table, (int (*)(void*)) _glsl_symbol_table_destructor);
-      return table;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. Here, C++ will have already called the
-    * destructor so tell hieralloc not to do that again. */
-   static void operator delete(void *table)
-   {
-      hieralloc_set_destructor(table, NULL);
-      hieralloc_free(table);
-   }
-   
-   glsl_symbol_table(void * mem_ctx);
-   ~glsl_symbol_table();
-
-   unsigned int language_version;
-
-   void push_scope();
-   void pop_scope();
-
-   /**
-    * Determine whether a name was declared at the current scope
-    */
-   bool name_declared_this_scope(const char *name);
-
-   /**
-    * \name Methods to add symbols to the table
-    *
-    * There is some temptation to rename all these functions to \c add_symbol
-    * or similar.  However, this breaks symmetry with the getter functions and
-    * reduces the clarity of the intention of code that uses these methods.
-    */
-   /*@{*/
-   bool add_variable(ir_variable *v);
-   bool add_type(const char *name, const glsl_type *t);
-   bool add_function(ir_function *f);
-   /*@}*/
-
-   /**
-    * Add an function at global scope without checking for scoping conflicts.
-    */
-   void add_global_function(ir_function *f);
-
-   /**
-    * \name Methods to get symbols from the table
-    */
-   /*@{*/
-   ir_variable *get_variable(const char *name);
-   const glsl_type *get_type(const char *name);
-   ir_function *get_function(const char *name);
-   /*@}*/
-
-private:
-   symbol_table_entry *get_entry(const char *name);
-
-   struct _mesa_symbol_table *table;
-   void *mem_ctx;
-};
-
-#endif /* GLSL_SYMBOL_TABLE */
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
deleted file mode 100644
index e1da9e1..0000000
--- a/src/glsl/glsl_types.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <cstdio>
-#include <stdlib.h>
-#include "main/core.h" /* for Elements */
-#include "glsl_symbol_table.h"
-#include "glsl_parser_extras.h"
-#include "glsl_types.h"
-#include "builtin_types.h"
-extern "C" {
-#include "program/hash_table.h"
-}
-
-hash_table *glsl_type::array_types = NULL;
-hash_table *glsl_type::record_types = NULL;
-void *glsl_type::mem_ctx = NULL;
-
-void
-glsl_type::init_hieralloc_type_ctx(void)
-{
-   if (glsl_type::mem_ctx == NULL) {
-      glsl_type::mem_ctx = hieralloc_autofree_context();
-      assert(glsl_type::mem_ctx != NULL);
-   }
-}
-
-glsl_type::glsl_type(GLenum gl_type,
-		     glsl_base_type base_type, unsigned vector_elements,
-		     unsigned matrix_columns, const char *name) :
-   gl_type(gl_type),
-   base_type(base_type),
-   sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
-   sampler_type(0),
-   vector_elements(vector_elements), matrix_columns(matrix_columns),
-   length(0)
-{
-   init_hieralloc_type_ctx();
-   this->name = hieralloc_strdup(this->mem_ctx, name);
-   /* Neither dimension is zero or both dimensions are zero.
-    */
-   assert((vector_elements == 0) == (matrix_columns == 0));
-   memset(& fields, 0, sizeof(fields));
-}
-
-glsl_type::glsl_type(GLenum gl_type,
-		     enum glsl_sampler_dim dim, bool shadow, bool array,
-		     unsigned type, const char *name) :
-   gl_type(gl_type),
-   base_type(GLSL_TYPE_SAMPLER),
-   sampler_dimensionality(dim), sampler_shadow(shadow),
-   sampler_array(array), sampler_type(type),
-   vector_elements(0), matrix_columns(0),
-   length(0)
-{
-   init_hieralloc_type_ctx();
-   this->name = hieralloc_strdup(this->mem_ctx, name);
-   memset(& fields, 0, sizeof(fields));
-}
-
-glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
-		     const char *name) :
-   base_type(GLSL_TYPE_STRUCT),
-   sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
-   sampler_type(0),
-   vector_elements(0), matrix_columns(0),
-   length(num_fields)
-{
-   unsigned int i;
-
-   init_hieralloc_type_ctx();
-   this->name = hieralloc_strdup(this->mem_ctx, name);
-   this->fields.structure = hieralloc_array(this->mem_ctx,
-					 glsl_struct_field, length);
-   for (i = 0; i < length; i++) {
-      this->fields.structure[i].type = fields[i].type;
-      this->fields.structure[i].name = hieralloc_strdup(this->fields.structure,
-						     fields[i].name);
-   }
-}
-
-static void
-add_types_to_symbol_table(glsl_symbol_table *symtab,
-			  const struct glsl_type *types,
-			  unsigned num_types, bool warn)
-{
-   (void) warn;
-
-   for (unsigned i = 0; i < num_types; i++) {
-      symtab->add_type(types[i].name, & types[i]);
-   }
-}
-
-void
-glsl_type::generate_100ES_types(glsl_symbol_table *symtab)
-{
-   add_types_to_symbol_table(symtab, builtin_core_types,
-			     Elements(builtin_core_types),
-			     false);
-   add_types_to_symbol_table(symtab, builtin_structure_types,
-			     Elements(builtin_structure_types),
-			     false);
-   add_types_to_symbol_table(symtab, &void_type, 1, false);
-}
-
-void
-glsl_type::generate_110_types(glsl_symbol_table *symtab)
-{
-   generate_100ES_types(symtab);
-
-   add_types_to_symbol_table(symtab, builtin_110_types,
-			     Elements(builtin_110_types),
-			     false);
-   add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types,
-			     Elements(builtin_110_deprecated_structure_types),
-			     false);
-}
-
-
-void
-glsl_type::generate_120_types(glsl_symbol_table *symtab)
-{
-   generate_110_types(symtab);
-
-   add_types_to_symbol_table(symtab, builtin_120_types,
-			     Elements(builtin_120_types), false);
-}
-
-
-void
-glsl_type::generate_130_types(glsl_symbol_table *symtab)
-{
-   generate_120_types(symtab);
-
-   add_types_to_symbol_table(symtab, builtin_130_types,
-			     Elements(builtin_130_types), false);
-   generate_EXT_texture_array_types(symtab, false);
-}
-
-
-void
-glsl_type::generate_ARB_texture_rectangle_types(glsl_symbol_table *symtab,
-						bool warn)
-{
-   add_types_to_symbol_table(symtab, builtin_ARB_texture_rectangle_types,
-			     Elements(builtin_ARB_texture_rectangle_types),
-			     warn);
-}
-
-
-void
-glsl_type::generate_EXT_texture_array_types(glsl_symbol_table *symtab,
-					    bool warn)
-{
-   add_types_to_symbol_table(symtab, builtin_EXT_texture_array_types,
-			     Elements(builtin_EXT_texture_array_types),
-			     warn);
-}
-
-
-void
-_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
-{
-   switch (state->language_version) {
-   case 100:
-      assert(state->es_shader);
-      glsl_type::generate_100ES_types(state->symbols);
-      break;
-   case 110:
-      glsl_type::generate_110_types(state->symbols);
-      break;
-   case 120:
-      glsl_type::generate_120_types(state->symbols);
-      break;
-   case 130:
-      glsl_type::generate_130_types(state->symbols);
-      break;
-   default:
-      /* error */
-      break;
-   }
-
-   if (state->ARB_texture_rectangle_enable) {
-      glsl_type::generate_ARB_texture_rectangle_types(state->symbols,
-					   state->ARB_texture_rectangle_warn);
-   }
-
-   if (state->EXT_texture_array_enable && state->language_version < 130) {
-      // These are already included in 130; don't create twice.
-      glsl_type::generate_EXT_texture_array_types(state->symbols,
-				       state->EXT_texture_array_warn);
-   }
-}
-
-
-const glsl_type *glsl_type::get_base_type() const
-{
-   switch (base_type) {
-   case GLSL_TYPE_UINT:
-      return uint_type;
-   case GLSL_TYPE_INT:
-      return int_type;
-   case GLSL_TYPE_FLOAT:
-      return float_type;
-   case GLSL_TYPE_BOOL:
-      return bool_type;
-   default:
-      return error_type;
-   }
-}
-
-
-void
-_mesa_glsl_release_types(void)
-{
-   if (glsl_type::array_types != NULL) {
-      hash_table_dtor(glsl_type::array_types);
-      glsl_type::array_types = NULL;
-   }
-
-   if (glsl_type::record_types != NULL) {
-      hash_table_dtor(glsl_type::record_types);
-      glsl_type::record_types = NULL;
-   }
-}
-
-
-glsl_type::glsl_type(const glsl_type *array, unsigned length) :
-   base_type(GLSL_TYPE_ARRAY),
-   sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
-   sampler_type(0),
-   vector_elements(0), matrix_columns(0),
-   name(NULL), length(length)
-{
-   this->fields.array = array;
-   /* Inherit the gl type of the base. The GL type is used for
-    * uniform/statevar handling in Mesa and the arrayness of the type
-    * is represented by the size rather than the type.
-    */
-   this->gl_type = array->gl_type;
-
-   /* Allow a maximum of 10 characters for the array size.  This is enough
-    * for 32-bits of ~0.  The extra 3 are for the '[', ']', and terminating
-    * NUL.
-    */
-   const unsigned name_length = strlen(array->name) + 10 + 3;
-   char *const n = (char *) hieralloc_size(this->mem_ctx, name_length);
-
-   if (length == 0)
-      snprintf(n, name_length, "%s[]", array->name);
-   else
-      snprintf(n, name_length, "%s[%u]", array->name, length);
-
-   this->name = n;
-}
-
-
-const glsl_type *
-glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
-{
-   if (base_type == GLSL_TYPE_VOID)
-      return &void_type;
-
-   if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4))
-      return error_type;
-
-   /* Treat GLSL vectors as Nx1 matrices.
-    */
-   if (columns == 1) {
-      switch (base_type) {
-      case GLSL_TYPE_UINT:
-	 return uint_type + (rows - 1);
-      case GLSL_TYPE_INT:
-	 return int_type + (rows - 1);
-      case GLSL_TYPE_FLOAT:
-	 return float_type + (rows - 1);
-      case GLSL_TYPE_BOOL:
-	 return bool_type + (rows - 1);
-      default:
-	 return error_type;
-      }
-   } else {
-      if ((base_type != GLSL_TYPE_FLOAT) || (rows == 1))
-	 return error_type;
-
-      /* GLSL matrix types are named mat{COLUMNS}x{ROWS}.  Only the following
-       * combinations are valid:
-       *
-       *   1 2 3 4
-       * 1
-       * 2   x x x
-       * 3   x x x
-       * 4   x x x
-       */
-#define IDX(c,r) (((c-1)*3) + (r-1))
-
-      switch (IDX(columns, rows)) {
-      case IDX(2,2): return mat2_type;
-      case IDX(2,3): return mat2x3_type;
-      case IDX(2,4): return mat2x4_type;
-      case IDX(3,2): return mat3x2_type;
-      case IDX(3,3): return mat3_type;
-      case IDX(3,4): return mat3x4_type;
-      case IDX(4,2): return mat4x2_type;
-      case IDX(4,3): return mat4x3_type;
-      case IDX(4,4): return mat4_type;
-      default: return error_type;
-      }
-   }
-
-   assert(!"Should not get here.");
-   return error_type;
-}
-
-
-const glsl_type *
-glsl_type::get_array_instance(const glsl_type *base, unsigned array_size)
-{
-
-   if (array_types == NULL) {
-      array_types = hash_table_ctor(64, hash_table_string_hash,
-				    hash_table_string_compare);
-   }
-
-   /* Generate a name using the base type pointer in the key.  This is
-    * done because the name of the base type may not be unique across
-    * shaders.  For example, two shaders may have different record types
-    * named 'foo'.
-    */
-   char key[128];
-   snprintf(key, sizeof(key), "%p[%u]", (void *) base, array_size);
-
-   const glsl_type *t = (glsl_type *) hash_table_find(array_types, key);
-   if (t == NULL) {
-      t = new glsl_type(base, array_size);
-
-      hash_table_insert(array_types, (void *) t, hieralloc_strdup(mem_ctx, key));
-   }
-
-   assert(t->base_type == GLSL_TYPE_ARRAY);
-   assert(t->length == array_size);
-   assert(t->fields.array == base);
-
-   return t;
-}
-
-
-int
-glsl_type::record_key_compare(const void *a, const void *b)
-{
-   const glsl_type *const key1 = (glsl_type *) a;
-   const glsl_type *const key2 = (glsl_type *) b;
-
-   /* Return zero is the types match (there is zero difference) or non-zero
-    * otherwise.
-    */
-   if (strcmp(key1->name, key2->name) != 0)
-      return 1;
-
-   if (key1->length != key2->length)
-      return 1;
-
-   for (unsigned i = 0; i < key1->length; i++) {
-      if (key1->fields.structure[i].type != key2->fields.structure[i].type)
-	 return 1;
-      if (strcmp(key1->fields.structure[i].name,
-		 key2->fields.structure[i].name) != 0)
-	 return 1;
-   }
-
-   return 0;
-}
-
-
-unsigned
-glsl_type::record_key_hash(const void *a)
-{
-   const glsl_type *const key = (glsl_type *) a;
-   char hash_key[128];
-   unsigned size = 0;
-
-   size = snprintf(hash_key, sizeof(hash_key), "%08x", key->length);
-
-   for (unsigned i = 0; i < key->length; i++) {
-      if (size >= sizeof(hash_key))
-	 break;
-
-      size += snprintf(& hash_key[size], sizeof(hash_key) - size,
-		       "%p", (void *) key->fields.structure[i].type);
-   }
-
-   return hash_table_string_hash(& hash_key);
-}
-
-
-const glsl_type *
-glsl_type::get_record_instance(const glsl_struct_field *fields,
-			       unsigned num_fields,
-			       const char *name)
-{
-   const glsl_type key(fields, num_fields, name);
-
-   if (record_types == NULL) {
-      record_types = hash_table_ctor(64, record_key_hash, record_key_compare);
-   }
-
-   const glsl_type *t = (glsl_type *) hash_table_find(record_types, & key);
-   if (t == NULL) {
-      t = new glsl_type(fields, num_fields, name);
-
-      hash_table_insert(record_types, (void *) t, t);
-   }
-
-   assert(t->base_type == GLSL_TYPE_STRUCT);
-   assert(t->length == num_fields);
-   assert(strcmp(t->name, name) == 0);
-
-   return t;
-}
-
-
-const glsl_type *
-glsl_type::field_type(const char *name) const
-{
-   if (this->base_type != GLSL_TYPE_STRUCT)
-      return error_type;
-
-   for (unsigned i = 0; i < this->length; i++) {
-      if (strcmp(name, this->fields.structure[i].name) == 0)
-	 return this->fields.structure[i].type;
-   }
-
-   return error_type;
-}
-
-
-int
-glsl_type::field_index(const char *name) const
-{
-   if (this->base_type != GLSL_TYPE_STRUCT)
-      return -1;
-
-   for (unsigned i = 0; i < this->length; i++) {
-      if (strcmp(name, this->fields.structure[i].name) == 0)
-	 return i;
-   }
-
-   return -1;
-}
-
-
-unsigned
-glsl_type::component_slots() const
-{
-   switch (this->base_type) {
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-   case GLSL_TYPE_FLOAT:
-   case GLSL_TYPE_BOOL:
-      return this->components();
-
-   case GLSL_TYPE_STRUCT: {
-      unsigned size = 0;
-
-      for (unsigned i = 0; i < this->length; i++)
-	 size += this->fields.structure[i].type->component_slots();
-
-      return size;
-   }
-
-   case GLSL_TYPE_ARRAY:
-      return this->length * this->fields.array->component_slots();
-
-   default:
-      return 0;
-   }
-}
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
deleted file mode 100644
index f5e6855..0000000
--- a/src/glsl/glsl_types.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef GLSL_TYPES_H
-#define GLSL_TYPES_H
-
-#include <cstring>
-#include <cassert>
-
-extern "C" {
-#include "GLES2/gl2.h"
-#include <hieralloc.h>
-}
-
-struct _mesa_glsl_parse_state;
-struct glsl_symbol_table;
-
-extern "C" void
-_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state);
-
-extern "C" void
-_mesa_glsl_release_types(void);
-
-enum glsl_base_type {
-   GLSL_TYPE_UINT = 0,
-   GLSL_TYPE_INT,
-   GLSL_TYPE_FLOAT,
-   GLSL_TYPE_BOOL,
-   GLSL_TYPE_SAMPLER,
-   GLSL_TYPE_STRUCT,
-   GLSL_TYPE_ARRAY,
-   GLSL_TYPE_VOID,
-   GLSL_TYPE_ERROR
-};
-
-enum glsl_sampler_dim {
-   GLSL_SAMPLER_DIM_1D = 0,
-   GLSL_SAMPLER_DIM_2D,
-   GLSL_SAMPLER_DIM_3D,
-   GLSL_SAMPLER_DIM_CUBE,
-   GLSL_SAMPLER_DIM_RECT,
-   GLSL_SAMPLER_DIM_BUF
-};
-
-
-struct glsl_type {
-   GLenum gl_type;
-   glsl_base_type base_type;
-
-   unsigned sampler_dimensionality:3;
-   unsigned sampler_shadow:1;
-   unsigned sampler_array:1;
-   unsigned sampler_type:2;    /**< Type of data returned using this sampler.
-				* only \c GLSL_TYPE_FLOAT, \c GLSL_TYPE_INT,
-				* and \c GLSL_TYPE_UINT are valid.
-				*/
-
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'mem_ctx' (or any of its ancestors). */
-   static void* operator new(size_t size)
-   {
-      if (glsl_type::mem_ctx == NULL) {
-	 glsl_type::mem_ctx = hieralloc_init("glsl_type");
-	 assert(glsl_type::mem_ctx != NULL);
-      }
-
-      void *type;
-
-      type = hieralloc_size(glsl_type::mem_ctx, size);
-      assert(type != NULL);
-
-      return type;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. */
-   static void operator delete(void *type)
-   {
-      hieralloc_free(type);
-   }
-
-   /**
-    * \name Vector and matrix element counts
-    *
-    * For scalars, each of these values will be 1.  For non-numeric types
-    * these will be 0.
-    */
-   /*@{*/
-   unsigned vector_elements:3; /**< 1, 2, 3, or 4 vector elements. */
-   unsigned matrix_columns:3;  /**< 1, 2, 3, or 4 matrix columns. */
-   /*@}*/
-
-   /**
-    * Name of the data type
-    *
-    * This may be \c NULL for anonymous structures, for arrays, or for
-    * function types.
-    */
-   const char *name;
-
-   /**
-    * For \c GLSL_TYPE_ARRAY, this is the length of the array.  For
-    * \c GLSL_TYPE_STRUCT, it is the number of elements in the structure and
-    * the number of values pointed to by \c fields.structure (below).
-    */
-   unsigned length;
-
-   /**
-    * Subtype of composite data types.
-    */
-   union {
-      const struct glsl_type *array;            /**< Type of array elements. */
-      const struct glsl_type *parameters;       /**< Parameters to function. */
-      struct glsl_struct_field *structure;      /**< List of struct fields. */
-   } fields;
-
-
-   /**
-    * \name Pointers to various public type singletons
-    */
-   /*@{*/
-   static const glsl_type *const error_type;
-   static const glsl_type *const int_type;
-   static const glsl_type *const ivec4_type;
-   static const glsl_type *const uint_type;
-   static const glsl_type *const uvec2_type;
-   static const glsl_type *const uvec3_type;
-   static const glsl_type *const uvec4_type;
-   static const glsl_type *const float_type;
-   static const glsl_type *const vec2_type;
-   static const glsl_type *const vec3_type;
-   static const glsl_type *const vec4_type;
-   static const glsl_type *const bool_type;
-   static const glsl_type *const mat2_type;
-   static const glsl_type *const mat2x3_type;
-   static const glsl_type *const mat2x4_type;
-   static const glsl_type *const mat3x2_type;
-   static const glsl_type *const mat3_type;
-   static const glsl_type *const mat3x4_type;
-   static const glsl_type *const mat4x2_type;
-   static const glsl_type *const mat4x3_type;
-   static const glsl_type *const mat4_type;
-   /*@}*/
-
-
-   /**
-    * For numeric and boolean derrived types returns the basic scalar type
-    *
-    * If the type is a numeric or boolean scalar, vector, or matrix type,
-    * this function gets the scalar type of the individual components.  For
-    * all other types, including arrays of numeric or boolean types, the
-    * error type is returned.
-    */
-   const glsl_type *get_base_type() const;
-
-   /**
-    * Query the type of elements in an array
-    *
-    * \return
-    * Pointer to the type of elements in the array for array types, or \c NULL
-    * for non-array types.
-    */
-   const glsl_type *element_type() const
-   {
-      return is_array() ? fields.array : NULL;
-   }
-
-   /**
-    * Get the instance of a built-in scalar, vector, or matrix type
-    */
-   static const glsl_type *get_instance(unsigned base_type, unsigned rows,
-					unsigned columns);
-
-   /**
-    * Get the instance of an array type
-    */
-   static const glsl_type *get_array_instance(const glsl_type *base,
-					      unsigned elements);
-
-   /**
-    * Get the instance of a record type
-    */
-   static const glsl_type *get_record_instance(const glsl_struct_field *fields,
-					       unsigned num_fields,
-					       const char *name);
-
-   /**
-    * Query the total number of scalars that make up a scalar, vector or matrix
-    */
-   unsigned components() const
-   {
-      return vector_elements * matrix_columns;
-   }
-
-   /**
-    * Calculate the number of components slots required to hold this type
-    *
-    * This is used to determine how many uniform or varying locations a type
-    * might occupy.
-    */
-   unsigned component_slots() const;
-
-
-   /**
-    * Query whether or not a type is a scalar (non-vector and non-matrix).
-    */
-   bool is_scalar() const
-   {
-      return (vector_elements == 1)
-	 && (base_type >= GLSL_TYPE_UINT)
-	 && (base_type <= GLSL_TYPE_BOOL);
-   }
-
-   /**
-    * Query whether or not a type is a vector
-    */
-   bool is_vector() const
-   {
-      return (vector_elements > 1)
-	 && (matrix_columns == 1)
-	 && (base_type >= GLSL_TYPE_UINT)
-	 && (base_type <= GLSL_TYPE_BOOL);
-   }
-
-   /**
-    * Query whether or not a type is a matrix
-    */
-   bool is_matrix() const
-   {
-      /* GLSL only has float matrices. */
-      return (matrix_columns > 1) && (base_type == GLSL_TYPE_FLOAT);
-   }
-
-   /**
-    * Query whether or not a type is a non-array numeric type
-    */
-   bool is_numeric() const
-   {
-      return (base_type >= GLSL_TYPE_UINT) && (base_type <= GLSL_TYPE_FLOAT);
-   }
-
-   /**
-    * Query whether or not a type is an integral type
-    */
-   bool is_integer() const
-   {
-      return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT);
-   }
-
-   /**
-    * Query whether or not a type is a float type
-    */
-   bool is_float() const
-   {
-      return base_type == GLSL_TYPE_FLOAT;
-   }
-
-   /**
-    * Query whether or not a type is a non-array boolean type
-    */
-   bool is_boolean() const
-   {
-      return base_type == GLSL_TYPE_BOOL;
-   }
-
-   /**
-    * Query whether or not a type is a sampler
-    */
-   bool is_sampler() const
-   {
-      return base_type == GLSL_TYPE_SAMPLER;
-   }
-
-   /**
-    * Query whether or not a type is an array
-    */
-   bool is_array() const
-   {
-      return base_type == GLSL_TYPE_ARRAY;
-   }
-
-   /**
-    * Query whether or not a type is a record
-    */
-   bool is_record() const
-   {
-      return base_type == GLSL_TYPE_STRUCT;
-   }
-
-   /**
-    * Query whether or not a type is the void type singleton.
-    */
-   bool is_void() const
-   {
-      return base_type == GLSL_TYPE_VOID;
-   }
-
-   /**
-    * Query whether or not a type is the error type singleton.
-    */
-   bool is_error() const
-   {
-      return base_type == GLSL_TYPE_ERROR;
-   }
-
-   /**
-    * Query the full type of a matrix row
-    *
-    * \return
-    * If the type is not a matrix, \c glsl_type::error_type is returned.
-    * Otherwise a type matching the rows of the matrix is returned.
-    */
-   const glsl_type *row_type() const
-   {
-      return is_matrix()
-	 ? get_instance(base_type, matrix_columns, 1)
-	 : error_type;
-   }
-
-   /**
-    * Query the full type of a matrix column
-    *
-    * \return
-    * If the type is not a matrix, \c glsl_type::error_type is returned.
-    * Otherwise a type matching the columns of the matrix is returned.
-    */
-   const glsl_type *column_type() const
-   {
-      return is_matrix()
-	 ? get_instance(base_type, vector_elements, 1)
-	 : error_type;
-   }
-
-
-   /**
-    * Get the type of a structure field
-    *
-    * \return
-    * Pointer to the type of the named field.  If the type is not a structure
-    * or the named field does not exist, \c glsl_type::error_type is returned.
-    */
-   const glsl_type *field_type(const char *name) const;
-
-
-   /**
-    * Get the location of a filed within a record type
-    */
-   int field_index(const char *name) const;
-
-
-   /**
-    * Query the number of elements in an array type
-    *
-    * \return
-    * The number of elements in the array for array types or -1 for non-array
-    * types.  If the number of elements in the array has not yet been declared,
-    * zero is returned.
-    */
-   int array_size() const
-   {
-      return is_array() ? length : -1;
-   }
-
-private:
-   /**
-    * hieralloc context for all glsl_type allocations
-    *
-    * Set on the first call to \c glsl_type::new.
-    */
-   static void *mem_ctx;
-
-   void init_hieralloc_type_ctx(void);
-
-   /** Constructor for vector and matrix types */
-   glsl_type(GLenum gl_type,
-	     glsl_base_type base_type, unsigned vector_elements,
-	     unsigned matrix_columns, const char *name);
-
-   /** Constructor for sampler types */
-   glsl_type(GLenum gl_type,
-	     enum glsl_sampler_dim dim, bool shadow, bool array,
-	     unsigned type, const char *name);
-
-   /** Constructor for record types */
-   glsl_type(const glsl_struct_field *fields, unsigned num_fields,
-	     const char *name);
-
-   /** Constructor for array types */
-   glsl_type(const glsl_type *array, unsigned length);
-
-   /** Hash table containing the known array types. */
-   static struct hash_table *array_types;
-
-   /** Hash table containing the known record types. */
-   static struct hash_table *record_types;
-
-   static int record_key_compare(const void *a, const void *b);
-   static unsigned record_key_hash(const void *key);
-
-   /**
-    * \name Pointers to various type singletons
-    */
-   /*@{*/
-   static const glsl_type _error_type;
-   static const glsl_type void_type;
-   static const glsl_type builtin_core_types[];
-   static const glsl_type builtin_structure_types[];
-   static const glsl_type builtin_110_deprecated_structure_types[];
-   static const glsl_type builtin_110_types[];
-   static const glsl_type builtin_120_types[];
-   static const glsl_type builtin_130_types[];
-   static const glsl_type builtin_ARB_texture_rectangle_types[];
-   static const glsl_type builtin_EXT_texture_array_types[];
-   static const glsl_type builtin_EXT_texture_buffer_object_types[];
-   /*@}*/
-
-   /**
-    * \name Methods to populate a symbol table with built-in types.
-    *
-    * \internal
-    * This is one of the truely annoying things about C++.  Methods that are
-    * completely internal and private to a type still have to be advertised to
-    * the world in a public header file.
-    */
-   /*@{*/
-   static void generate_100ES_types(glsl_symbol_table *);
-   static void generate_110_types(glsl_symbol_table *);
-   static void generate_120_types(glsl_symbol_table *);
-   static void generate_130_types(glsl_symbol_table *);
-   static void generate_ARB_texture_rectangle_types(glsl_symbol_table *, bool);
-   static void generate_EXT_texture_array_types(glsl_symbol_table *, bool);
-   /*@}*/
-
-   /**
-    * \name Friend functions.
-    *
-    * These functions are friends because they must have C linkage and the
-    * need to call various private methods or access various private static
-    * data.
-    */
-   /*@{*/
-   friend void _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *);
-   friend void _mesa_glsl_release_types(void);
-   /*@}*/
-};
-
-struct glsl_struct_field {
-   const struct glsl_type *type;
-   const char *name;
-};
-
-#endif /* GLSL_TYPES_H */
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
deleted file mode 100644
index 3c33127..0000000
--- a/src/glsl/hir_field_selection.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "ir.h"
-#include "program/symbol_table.h"
-#include "glsl_parser_extras.h"
-#include "ast.h"
-#include "glsl_types.h"
-
-ir_rvalue *
-_mesa_ast_field_selection_to_hir(const ast_expression *expr,
-				 exec_list *instructions,
-				 struct _mesa_glsl_parse_state *state)
-{
-   void *ctx = state;
-   ir_rvalue *result = NULL;
-   ir_rvalue *op;
-
-   op = expr->subexpressions[0]->hir(instructions, state);
-
-   /* There are two kinds of field selection.  There is the selection of a
-    * specific field from a structure, and there is the selection of a
-    * swizzle / mask from a vector.  Which is which is determined entirely
-    * by the base type of the thing to which the field selection operator is
-    * being applied.
-    */
-   YYLTYPE loc = expr->get_location();
-   if (op->type->is_error()) {
-      /* silently propagate the error */
-   } else if (op->type->is_vector()) {
-      ir_swizzle *swiz = ir_swizzle::create(op,
-					    expr->primary_expression.identifier,
-					    op->type->vector_elements);
-      if (swiz != NULL) {
-	 result = swiz;
-      } else {
-	 /* FINISHME: Logging of error messages should be moved into
-	  * FINISHME: ir_swizzle::create.  This allows the generation of more
-	  * FINISHME: specific error messages.
-	  */
-	 _mesa_glsl_error(& loc, state, "Invalid swizzle / mask `%s'",
-			  expr->primary_expression.identifier);
-      }
-   } else if (op->type->base_type == GLSL_TYPE_STRUCT) {
-      result = new(ctx) ir_dereference_record(op,
-					      expr->primary_expression.identifier);
-
-      if (result->type->is_error()) {
-	 _mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
-			  "structure",
-			  expr->primary_expression.identifier);
-      }
-   } else if (expr->subexpressions[1] != NULL) {
-      /* Handle "method calls" in GLSL 1.20 - namely, array.length() */
-      if (state->language_version < 120)
-	 _mesa_glsl_error(&loc, state, "Methods not supported in GLSL 1.10.");
-
-      ast_expression *call = expr->subexpressions[1];
-      assert(call->oper == ast_function_call);
-
-      const char *method;
-      method = call->subexpressions[0]->primary_expression.identifier;
-
-      if (op->type->is_array() && strcmp(method, "length") == 0) {
-	 if (!call->expressions.is_empty())
-	    _mesa_glsl_error(&loc, state, "length method takes no arguments.");
-
-	 if (op->type->array_size() == 0)
-	    _mesa_glsl_error(&loc, state, "length called on unsized array.");
-
-	 result = new(ctx) ir_constant(op->type->array_size());
-      } else {
-	 _mesa_glsl_error(&loc, state, "Unknown method: `%s'.", method);
-      }
-   } else {
-      _mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
-		       "non-structure / non-vector.",
-		       expr->primary_expression.identifier);
-   }
-
-   return result ? result : ir_call::get_error_instruction(ctx);
-}
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
deleted file mode 100644
index 71f3429..0000000
--- a/src/glsl/ir.cpp
+++ /dev/null
@@ -1,1495 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <string.h>
-#include "main/core.h" /* for MAX2 */
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
-
-ir_rvalue::ir_rvalue()
-{
-   this->type = glsl_type::error_type;
-}
-
-bool ir_rvalue::is_zero() const
-{
-   return false;
-}
-
-bool ir_rvalue::is_one() const
-{
-   return false;
-}
-
-bool ir_rvalue::is_negative_one() const
-{
-   return false;
-}
-
-/**
- * Modify the swizzle make to move one component to another
- *
- * \param m    IR swizzle to be modified
- * \param from Component in the RHS that is to be swizzled
- * \param to   Desired swizzle location of \c from
- */
-static void
-update_rhs_swizzle(ir_swizzle_mask &m, unsigned from, unsigned to)
-{
-   switch (to) {
-   case 0: m.x = from; break;
-   case 1: m.y = from; break;
-   case 2: m.z = from; break;
-   case 3: m.w = from; break;
-   default: assert(!"Should not get here.");
-   }
-
-   m.num_components = MAX2(m.num_components, (to + 1));
-}
-
-void
-ir_assignment::set_lhs(ir_rvalue *lhs)
-{
-   void *mem_ctx = this;
-   bool swizzled = false;
-
-   while (lhs != NULL) {
-      ir_swizzle *swiz = lhs->as_swizzle();
-
-      if (swiz == NULL)
-	 break;
-
-      unsigned write_mask = 0;
-      ir_swizzle_mask rhs_swiz = { 0, 0, 0, 0, 0, 0 };
-
-      for (unsigned i = 0; i < swiz->mask.num_components; i++) {
-	 unsigned c = 0;
-
-	 switch (i) {
-	 case 0: c = swiz->mask.x; break;
-	 case 1: c = swiz->mask.y; break;
-	 case 2: c = swiz->mask.z; break;
-	 case 3: c = swiz->mask.w; break;
-	 default: assert(!"Should not get here.");
-	 }
-
-	 write_mask |= (((this->write_mask >> i) & 1) << c);
-	 update_rhs_swizzle(rhs_swiz, i, c);
-      }
-
-      this->write_mask = write_mask;
-      lhs = swiz->val;
-
-      this->rhs = new(mem_ctx) ir_swizzle(this->rhs, rhs_swiz);
-      swizzled = true;
-   }
-
-   if (swizzled) {
-      /* Now, RHS channels line up with the LHS writemask.  Collapse it
-       * to just the channels that will be written.
-       */
-      ir_swizzle_mask rhs_swiz = { 0, 0, 0, 0, 0, 0 };
-      int rhs_chan = 0;
-      for (int i = 0; i < 4; i++) {
-	 if (write_mask & (1 << i))
-	    update_rhs_swizzle(rhs_swiz, i, rhs_chan++);
-      }
-      this->rhs = new(mem_ctx) ir_swizzle(this->rhs, rhs_swiz);
-   }
-
-   assert((lhs == NULL) || lhs->as_dereference());
-
-   this->lhs = (ir_dereference *) lhs;
-}
-
-ir_variable *
-ir_assignment::whole_variable_written()
-{
-   ir_variable *v = this->lhs->whole_variable_referenced();
-
-   if (v == NULL)
-      return NULL;
-
-   if (v->type->is_scalar())
-      return v;
-
-   if (v->type->is_vector()) {
-      const unsigned mask = (1U << v->type->vector_elements) - 1;
-
-      if (mask != this->write_mask)
-	 return NULL;
-   }
-
-   /* Either all the vector components are assigned or the variable is some
-    * composite type (and the whole thing is assigned.
-    */
-   return v;
-}
-
-ir_assignment::ir_assignment(ir_dereference *lhs, ir_rvalue *rhs,
-			     ir_rvalue *condition, unsigned write_mask)
-{
-   this->ir_type = ir_type_assignment;
-   this->condition = condition;
-   this->rhs = rhs;
-   this->lhs = lhs;
-   this->write_mask = write_mask;
-
-   if (lhs->type->is_scalar() || lhs->type->is_vector()) {
-      int lhs_components = 0;
-      for (int i = 0; i < 4; i++) {
-	 if (write_mask & (1 << i))
-	    lhs_components++;
-      }
-
-      assert(lhs_components == this->rhs->type->vector_elements);
-   }
-}
-
-ir_assignment::ir_assignment(ir_rvalue *lhs, ir_rvalue *rhs,
-			     ir_rvalue *condition)
-{
-   this->ir_type = ir_type_assignment;
-   this->condition = condition;
-   this->rhs = rhs;
-
-   /* If the RHS is a vector type, assume that all components of the vector
-    * type are being written to the LHS.  The write mask comes from the RHS
-    * because we can have a case where the LHS is a vec4 and the RHS is a
-    * vec3.  In that case, the assignment is:
-    *
-    *     (assign (...) (xyz) (var_ref lhs) (var_ref rhs))
-    */
-   if (rhs->type->is_vector())
-      this->write_mask = (1U << rhs->type->vector_elements) - 1;
-   else if (rhs->type->is_scalar())
-      this->write_mask = 1;
-   else // TODO: write masking for matrix
-      this->write_mask = 0;
-
-   this->set_lhs(lhs);
-}
-
-
-ir_expression::ir_expression(int op, const struct glsl_type *type,
-			     ir_rvalue *op0)
-{
-   assert(get_num_operands(ir_expression_operation(op)) == 1);
-   this->ir_type = ir_type_expression;
-   this->type = type;
-   this->operation = ir_expression_operation(op);
-   this->operands[0] = op0;
-   this->operands[1] = NULL;
-   this->operands[2] = NULL;
-   this->operands[3] = NULL;
-}
-
-ir_expression::ir_expression(int op, const struct glsl_type *type,
-			     ir_rvalue *op0, ir_rvalue *op1)
-{
-   assert(((op1 == NULL) && (get_num_operands(ir_expression_operation(op)) == 1))
-	  || (get_num_operands(ir_expression_operation(op)) == 2));
-   this->ir_type = ir_type_expression;
-   this->type = type;
-   this->operation = ir_expression_operation(op);
-   this->operands[0] = op0;
-   this->operands[1] = op1;
-   this->operands[2] = NULL;
-   this->operands[3] = NULL;
-}
-
-ir_expression::ir_expression(int op, const struct glsl_type *type,
-			     ir_rvalue *op0, ir_rvalue *op1,
-			     ir_rvalue *op2, ir_rvalue *op3)
-{
-   this->ir_type = ir_type_expression;
-   this->type = type;
-   this->operation = ir_expression_operation(op);
-   this->operands[0] = op0;
-   this->operands[1] = op1;
-   this->operands[2] = op2;
-   this->operands[3] = op3;
-}
-
-ir_expression::ir_expression(int op, ir_rvalue *op0)
-{
-   this->ir_type = ir_type_expression;
-
-   this->operation = ir_expression_operation(op);
-   this->operands[0] = op0;
-   this->operands[1] = NULL;
-   this->operands[2] = NULL;
-   this->operands[3] = NULL;
-
-   assert(op <= ir_last_unop);
-
-   switch (this->operation) {
-   case ir_unop_bit_not:
-   case ir_unop_logic_not:
-   case ir_unop_neg:
-   case ir_unop_abs:
-   case ir_unop_sign:
-   case ir_unop_rcp:
-   case ir_unop_rsq:
-   case ir_unop_sqrt:
-   case ir_unop_exp:
-   case ir_unop_log:
-   case ir_unop_exp2:
-   case ir_unop_log2:
-   case ir_unop_trunc:
-   case ir_unop_ceil:
-   case ir_unop_floor:
-   case ir_unop_fract:
-   case ir_unop_round_even:
-   case ir_unop_cos:
-   case ir_unop_dFdx:
-   case ir_unop_dFdy:
-      this->type = op0->type;
-      break;
-
-   case ir_unop_any:
-      this->type = glsl_type::bool_type;
-      break;
-
-   default:
-      assert(!"not reached: missing automatic type setup for ir_expression");
-      this->type = op0->type;
-      break;
-   }
-}
-
-ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
-{
-   this->ir_type = ir_type_expression;
-
-   this->operation = ir_expression_operation(op);
-   this->operands[0] = op0;
-   this->operands[1] = op1;
-   this->operands[2] = NULL;
-   this->operands[3] = NULL;
-
-   assert(op > ir_last_unop);
-
-   switch (this->operation) {
-   case ir_binop_all_equal:
-   case ir_binop_any_nequal:
-      this->type = glsl_type::bool_type;
-      break;
-
-   case ir_binop_add:
-   case ir_binop_sub:
-   case ir_binop_min:
-   case ir_binop_max:
-   case ir_binop_pow:
-   case ir_binop_mul:
-      if (op0->type->is_scalar()) {
-	 this->type = op1->type;
-      } else if (op1->type->is_scalar()) {
-	 this->type = op0->type;
-      } else {
-	 /* FINISHME: matrix types */
-	 assert(!op0->type->is_matrix() && !op1->type->is_matrix());
-	 assert(op0->type == op1->type);
-	 this->type = op0->type;
-      }
-      break;
-
-   case ir_binop_logic_and:
-   case ir_binop_logic_or:
-      if (op0->type->is_scalar()) {
-	 this->type = op1->type;
-      } else if (op1->type->is_scalar()) {
-	 this->type = op0->type;
-      }
-      break;
-
-   case ir_binop_dot:
-      this->type = glsl_type::float_type;
-      break;
-
-   default:
-      assert(!"not reached: missing automatic type setup for ir_expression");
-      this->type = glsl_type::float_type;
-   }
-}
-
-unsigned int
-ir_expression::get_num_operands(ir_expression_operation op)
-{
-   assert(op <= ir_last_opcode);
-
-   if (op <= ir_last_unop)
-      return 1;
-
-   if (op <= ir_last_binop)
-      return 2;
-
-   if (op == ir_quadop_vector)
-      return 4;
-
-   assert(false);
-   return 0;
-}
-
-static const char *const operator_strs[] = {
-   "~",
-   "!",
-   "neg",
-   "abs",
-   "sign",
-   "rcp",
-   "rsq",
-   "sqrt",
-   "exp",
-   "log",
-   "exp2",
-   "log2",
-   "f2i",
-   "i2f",
-   "f2b",
-   "b2f",
-   "i2b",
-   "b2i",
-   "u2f",
-   "any",
-   "trunc",
-   "ceil",
-   "floor",
-   "fract",
-   "round_even",
-   "sin",
-   "cos",
-   "sin_reduced",
-   "cos_reduced",
-   "dFdx",
-   "dFdy",
-   "noise",
-   "+",
-   "-",
-   "*",
-   "/",
-   "%",
-   "<",
-   ">",
-   "<=",
-   ">=",
-   "==",
-   "!=",
-   "all_equal",
-   "any_nequal",
-   "<<",
-   ">>",
-   "&",
-   "^",
-   "|",
-   "&&",
-   "^^",
-   "||",
-   "dot",
-   "min",
-   "max",
-   "pow",
-   "vector",
-};
-
-const char *ir_expression::operator_string(ir_expression_operation op)
-{
-   assert((unsigned int) op < Elements(operator_strs));
-   assert(Elements(operator_strs) == (ir_quadop_vector + 1));
-   return operator_strs[op];
-}
-
-const char *ir_expression::operator_string()
-{
-   return operator_string(this->operation);
-}
-
-ir_expression_operation
-ir_expression::get_operator(const char *str)
-{
-   const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]);
-   for (int op = 0; op < operator_count; op++) {
-      if (strcmp(str, operator_strs[op]) == 0)
-	 return (ir_expression_operation) op;
-   }
-   return (ir_expression_operation) -1;
-}
-
-ir_constant::ir_constant()
-{
-   this->ir_type = ir_type_constant;
-}
-
-ir_constant::ir_constant(const struct glsl_type *type,
-			 const ir_constant_data *data)
-{
-   assert((type->base_type >= GLSL_TYPE_UINT)
-	  && (type->base_type <= GLSL_TYPE_BOOL));
-
-   this->ir_type = ir_type_constant;
-   this->type = type;
-   memcpy(& this->value, data, sizeof(this->value));
-}
-
-ir_constant::ir_constant(float f)
-{
-   this->ir_type = ir_type_constant;
-   this->type = glsl_type::float_type;
-   this->value.f[0] = f;
-   for (int i = 1; i < 16; i++)  {
-      this->value.f[i] = 0;
-   }
-}
-
-ir_constant::ir_constant(unsigned int u)
-{
-   this->ir_type = ir_type_constant;
-   this->type = glsl_type::uint_type;
-   this->value.u[0] = u;
-   for (int i = 1; i < 16; i++) {
-      this->value.u[i] = 0;
-   }
-}
-
-ir_constant::ir_constant(int i)
-{
-   this->ir_type = ir_type_constant;
-   this->type = glsl_type::int_type;
-   this->value.i[0] = i;
-   for (int i = 1; i < 16; i++) {
-      this->value.i[i] = 0;
-   }
-}
-
-ir_constant::ir_constant(bool b)
-{
-   this->ir_type = ir_type_constant;
-   this->type = glsl_type::bool_type;
-   this->value.b[0] = b;
-   for (int i = 1; i < 16; i++) {
-      this->value.b[i] = false;
-   }
-}
-
-ir_constant::ir_constant(const ir_constant *c, unsigned i)
-{
-   this->ir_type = ir_type_constant;
-   this->type = c->type->get_base_type();
-
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:  this->value.u[0] = c->value.u[i]; break;
-   case GLSL_TYPE_INT:   this->value.i[0] = c->value.i[i]; break;
-   case GLSL_TYPE_FLOAT: this->value.f[0] = c->value.f[i]; break;
-   case GLSL_TYPE_BOOL:  this->value.b[0] = c->value.b[i]; break;
-   default:              assert(!"Should not get here."); break;
-   }
-}
-
-ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
-{
-   this->ir_type = ir_type_constant;
-   this->type = type;
-
-   assert(type->is_scalar() || type->is_vector() || type->is_matrix()
-	  || type->is_record() || type->is_array());
-
-   if (type->is_array()) {
-      this->array_elements = hieralloc_array(this, ir_constant *, type->length);
-      unsigned i = 0;
-      foreach_list(node, value_list) {
-	 ir_constant *value = (ir_constant *) node;
-	 assert(value->as_constant() != NULL);
-
-	 this->array_elements[i++] = value;
-      }
-      return;
-   }
-
-   /* If the constant is a record, the types of each of the entries in
-    * value_list must be a 1-for-1 match with the structure components.  Each
-    * entry must also be a constant.  Just move the nodes from the value_list
-    * to the list in the ir_constant.
-    */
-   /* FINISHME: Should there be some type checking and / or assertions here? */
-   /* FINISHME: Should the new constant take ownership of the nodes from
-    * FINISHME: value_list, or should it make copies?
-    */
-   if (type->is_record()) {
-      value_list->move_nodes_to(& this->components);
-      return;
-   }
-
-   for (unsigned i = 0; i < 16; i++) {
-      this->value.u[i] = 0;
-   }
-
-   ir_constant *value = (ir_constant *) (value_list->head);
-
-   /* Constructors with exactly one scalar argument are special for vectors
-    * and matrices.  For vectors, the scalar value is replicated to fill all
-    * the components.  For matrices, the scalar fills the components of the
-    * diagonal while the rest is filled with 0.
-    */
-   if (value->type->is_scalar() && value->next->is_tail_sentinel()) {
-      if (type->is_matrix()) {
-	 /* Matrix - fill diagonal (rest is already set to 0) */
-	 assert(type->base_type == GLSL_TYPE_FLOAT);
-	 for (unsigned i = 0; i < type->matrix_columns; i++)
-	    this->value.f[i * type->vector_elements + i] = value->value.f[0];
-      } else {
-	 /* Vector or scalar - fill all components */
-	 switch (type->base_type) {
-	 case GLSL_TYPE_UINT:
-	 case GLSL_TYPE_INT:
-	    for (unsigned i = 0; i < type->components(); i++)
-	       this->value.u[i] = value->value.u[0];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    for (unsigned i = 0; i < type->components(); i++)
-	       this->value.f[i] = value->value.f[0];
-	    break;
-	 case GLSL_TYPE_BOOL:
-	    for (unsigned i = 0; i < type->components(); i++)
-	       this->value.b[i] = value->value.b[0];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	    break;
-	 }
-      }
-      return;
-   }
-
-   if (type->is_matrix() && value->type->is_matrix()) {
-      assert(value->next->is_tail_sentinel());
-
-      /* From section 5.4.2 of the GLSL 1.20 spec:
-       * "If a matrix is constructed from a matrix, then each component
-       *  (column i, row j) in the result that has a corresponding component
-       *  (column i, row j) in the argument will be initialized from there."
-       */
-      unsigned cols = MIN2(type->matrix_columns, value->type->matrix_columns);
-      unsigned rows = MIN2(type->vector_elements, value->type->vector_elements);
-      for (unsigned i = 0; i < cols; i++) {
-	 for (unsigned j = 0; j < rows; j++) {
-	    const unsigned src = i * value->type->vector_elements + j;
-	    const unsigned dst = i * type->vector_elements + j;
-	    this->value.f[dst] = value->value.f[src];
-	 }
-      }
-
-      /* "All other components will be initialized to the identity matrix." */
-      for (unsigned i = cols; i < type->matrix_columns; i++)
-	 this->value.f[i * type->vector_elements + i] = 1.0;
-
-      return;
-   }
-
-   /* Use each component from each entry in the value_list to initialize one
-    * component of the constant being constructed.
-    */
-   for (unsigned i = 0; i < type->components(); /* empty */) {
-      assert(value->as_constant() != NULL);
-      assert(!value->is_tail_sentinel());
-
-      for (unsigned j = 0; j < value->type->components(); j++) {
-	 switch (type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    this->value.u[i] = value->get_uint_component(j);
-	    break;
-	 case GLSL_TYPE_INT:
-	    this->value.i[i] = value->get_int_component(j);
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    this->value.f[i] = value->get_float_component(j);
-	    break;
-	 case GLSL_TYPE_BOOL:
-	    this->value.b[i] = value->get_bool_component(j);
-	    break;
-	 default:
-	    /* FINISHME: What to do?  Exceptions are not the answer.
-	     */
-	    break;
-	 }
-
-	 i++;
-	 if (i >= type->components())
-	    break;
-      }
-
-      value = (ir_constant *) value->next;
-   }
-}
-
-ir_constant *
-ir_constant::zero(void *mem_ctx, const glsl_type *type)
-{
-   assert(type->is_numeric() || type->is_boolean());
-
-   ir_constant *c = new(mem_ctx) ir_constant;
-   c->type = type;
-   memset(&c->value, 0, sizeof(c->value));
-
-   return c;
-}
-
-bool
-ir_constant::get_bool_component(unsigned i) const
-{
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:  return this->value.u[i] != 0;
-   case GLSL_TYPE_INT:   return this->value.i[i] != 0;
-   case GLSL_TYPE_FLOAT: return ((int)this->value.f[i]) != 0;
-   case GLSL_TYPE_BOOL:  return this->value.b[i];
-   default:              assert(!"Should not get here."); break;
-   }
-
-   /* Must return something to make the compiler happy.  This is clearly an
-    * error case.
-    */
-   return false;
-}
-
-float
-ir_constant::get_float_component(unsigned i) const
-{
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:  return (float) this->value.u[i];
-   case GLSL_TYPE_INT:   return (float) this->value.i[i];
-   case GLSL_TYPE_FLOAT: return this->value.f[i];
-   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1.0 : 0.0;
-   default:              assert(!"Should not get here."); break;
-   }
-
-   /* Must return something to make the compiler happy.  This is clearly an
-    * error case.
-    */
-   return 0.0;
-}
-
-int
-ir_constant::get_int_component(unsigned i) const
-{
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:  return this->value.u[i];
-   case GLSL_TYPE_INT:   return this->value.i[i];
-   case GLSL_TYPE_FLOAT: return (int) this->value.f[i];
-   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1 : 0;
-   default:              assert(!"Should not get here."); break;
-   }
-
-   /* Must return something to make the compiler happy.  This is clearly an
-    * error case.
-    */
-   return 0;
-}
-
-unsigned
-ir_constant::get_uint_component(unsigned i) const
-{
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:  return this->value.u[i];
-   case GLSL_TYPE_INT:   return this->value.i[i];
-   case GLSL_TYPE_FLOAT: return (unsigned) this->value.f[i];
-   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1 : 0;
-   default:              assert(!"Should not get here."); break;
-   }
-
-   /* Must return something to make the compiler happy.  This is clearly an
-    * error case.
-    */
-   return 0;
-}
-
-ir_constant *
-ir_constant::get_array_element(unsigned i) const
-{
-   assert(this->type->is_array());
-
-   /* From page 35 (page 41 of the PDF) of the GLSL 1.20 spec:
-    *
-    *     "Behavior is undefined if a shader subscripts an array with an index
-    *     less than 0 or greater than or equal to the size the array was
-    *     declared with."
-    *
-    * Most out-of-bounds accesses are removed before things could get this far.
-    * There are cases where non-constant array index values can get constant
-    * folded.
-    */
-   if (int(i) < 0)
-      i = 0;
-   else if (i >= this->type->length)
-      i = this->type->length - 1;
-
-   return array_elements[i];
-}
-
-ir_constant *
-ir_constant::get_record_field(const char *name)
-{
-   int idx = this->type->field_index(name);
-
-   if (idx < 0)
-      return NULL;
-
-   if (this->components.is_empty())
-      return NULL;
-
-   exec_node *node = this->components.head;
-   for (int i = 0; i < idx; i++) {
-      node = node->next;
-
-      /* If the end of the list is encountered before the element matching the
-       * requested field is found, return NULL.
-       */
-      if (node->is_tail_sentinel())
-	 return NULL;
-   }
-
-   return (ir_constant *) node;
-}
-
-
-bool
-ir_constant::has_value(const ir_constant *c) const
-{
-   if (this->type != c->type)
-      return false;
-
-   if (this->type->is_array()) {
-      for (unsigned i = 0; i < this->type->length; i++) {
-	 if (!this->array_elements[i]->has_value(c->array_elements[i]))
-	    return false;
-      }
-      return true;
-   }
-
-   if (this->type->base_type == GLSL_TYPE_STRUCT) {
-      const exec_node *a_node = this->components.head;
-      const exec_node *b_node = c->components.head;
-
-      while (!a_node->is_tail_sentinel()) {
-	 assert(!b_node->is_tail_sentinel());
-
-	 const ir_constant *const a_field = (ir_constant *) a_node;
-	 const ir_constant *const b_field = (ir_constant *) b_node;
-
-	 if (!a_field->has_value(b_field))
-	    return false;
-
-	 a_node = a_node->next;
-	 b_node = b_node->next;
-      }
-
-      return true;
-   }
-
-   for (unsigned i = 0; i < this->type->components(); i++) {
-      switch (this->type->base_type) {
-      case GLSL_TYPE_UINT:
-	 if (this->value.u[i] != c->value.u[i])
-	    return false;
-	 break;
-      case GLSL_TYPE_INT:
-	 if (this->value.i[i] != c->value.i[i])
-	    return false;
-	 break;
-      case GLSL_TYPE_FLOAT:
-	 if (this->value.f[i] != c->value.f[i])
-	    return false;
-	 break;
-      case GLSL_TYPE_BOOL:
-	 if (this->value.b[i] != c->value.b[i])
-	    return false;
-	 break;
-      default:
-	 assert(!"Should not get here.");
-	 return false;
-      }
-   }
-
-   return true;
-}
-
-bool
-ir_constant::is_zero() const
-{
-   if (!this->type->is_scalar() && !this->type->is_vector())
-      return false;
-
-   for (unsigned c = 0; c < this->type->vector_elements; c++) {
-      switch (this->type->base_type) {
-      case GLSL_TYPE_FLOAT:
-	 if (this->value.f[c] != 0.0)
-	    return false;
-	 break;
-      case GLSL_TYPE_INT:
-	 if (this->value.i[c] != 0)
-	    return false;
-	 break;
-      case GLSL_TYPE_UINT:
-	 if (this->value.u[c] != 0)
-	    return false;
-	 break;
-      case GLSL_TYPE_BOOL:
-	 if (this->value.b[c] != false)
-	    return false;
-	 break;
-      default:
-	 /* The only other base types are structures, arrays, and samplers.
-	  * Samplers cannot be constants, and the others should have been
-	  * filtered out above.
-	  */
-	 assert(!"Should not get here.");
-	 return false;
-      }
-   }
-
-   return true;
-}
-
-bool
-ir_constant::is_one() const
-{
-   if (!this->type->is_scalar() && !this->type->is_vector())
-      return false;
-
-   for (unsigned c = 0; c < this->type->vector_elements; c++) {
-      switch (this->type->base_type) {
-      case GLSL_TYPE_FLOAT:
-	 if (this->value.f[c] != 1.0)
-	    return false;
-	 break;
-      case GLSL_TYPE_INT:
-	 if (this->value.i[c] != 1)
-	    return false;
-	 break;
-      case GLSL_TYPE_UINT:
-	 if (this->value.u[c] != 1)
-	    return false;
-	 break;
-      case GLSL_TYPE_BOOL:
-	 if (this->value.b[c] != true)
-	    return false;
-	 break;
-      default:
-	 /* The only other base types are structures, arrays, and samplers.
-	  * Samplers cannot be constants, and the others should have been
-	  * filtered out above.
-	  */
-	 assert(!"Should not get here.");
-	 return false;
-      }
-   }
-
-   return true;
-}
-
-bool
-ir_constant::is_negative_one() const
-{
-   if (!this->type->is_scalar() && !this->type->is_vector())
-      return false;
-
-   if (this->type->is_boolean())
-      return false;
-
-   for (unsigned c = 0; c < this->type->vector_elements; c++) {
-      switch (this->type->base_type) {
-      case GLSL_TYPE_FLOAT:
-	 if (this->value.f[c] != -1.0)
-	    return false;
-	 break;
-      case GLSL_TYPE_INT:
-	 if (this->value.i[c] != -1)
-	    return false;
-	 break;
-      case GLSL_TYPE_UINT:
-	 if (int(this->value.u[c]) != -1)
-	    return false;
-	 break;
-      default:
-	 /* The only other base types are structures, arrays, samplers, and
-	  * booleans.  Samplers cannot be constants, and the others should
-	  * have been filtered out above.
-	  */
-	 assert(!"Should not get here.");
-	 return false;
-      }
-   }
-
-   return true;
-}
-
-ir_loop::ir_loop()
-{
-   this->ir_type = ir_type_loop;
-   this->cmp = ir_unop_neg;
-   this->from = NULL;
-   this->to = NULL;
-   this->increment = NULL;
-   this->counter = NULL;
-}
-
-
-ir_dereference_variable::ir_dereference_variable(ir_variable *var)
-{
-   this->ir_type = ir_type_dereference_variable;
-   this->var = var;
-   this->type = (var != NULL) ? var->type : glsl_type::error_type;
-}
-
-
-ir_dereference_array::ir_dereference_array(ir_rvalue *value,
-					   ir_rvalue *array_index)
-{
-   this->ir_type = ir_type_dereference_array;
-   this->array_index = array_index;
-   this->set_array(value);
-}
-
-
-ir_dereference_array::ir_dereference_array(ir_variable *var,
-					   ir_rvalue *array_index)
-{
-   void *ctx = hieralloc_parent(var);
-
-   this->ir_type = ir_type_dereference_array;
-   this->array_index = array_index;
-   this->set_array(new(ctx) ir_dereference_variable(var));
-}
-
-
-void
-ir_dereference_array::set_array(ir_rvalue *value)
-{
-   this->array = value;
-   this->type = glsl_type::error_type;
-
-   if (this->array != NULL) {
-      const glsl_type *const vt = this->array->type;
-
-      if (vt->is_array()) {
-	 type = vt->element_type();
-      } else if (vt->is_matrix()) {
-	 type = vt->column_type();
-      } else if (vt->is_vector()) {
-	 type = vt->get_base_type();
-      }
-   }
-}
-
-
-ir_dereference_record::ir_dereference_record(ir_rvalue *value,
-					     const char *field)
-{
-   this->ir_type = ir_type_dereference_record;
-   this->record = value;
-   this->field = hieralloc_strdup(this, field);
-   this->type = (this->record != NULL)
-      ? this->record->type->field_type(field) : glsl_type::error_type;
-}
-
-
-ir_dereference_record::ir_dereference_record(ir_variable *var,
-					     const char *field)
-{
-   void *ctx = hieralloc_parent(var);
-
-   this->ir_type = ir_type_dereference_record;
-   this->record = new(ctx) ir_dereference_variable(var);
-   this->field = hieralloc_strdup(this, field);
-   this->type = (this->record != NULL)
-      ? this->record->type->field_type(field) : glsl_type::error_type;
-}
-
-bool type_contains_sampler(const glsl_type *type)
-{
-   if (type->is_array()) {
-      return type_contains_sampler(type->fields.array);
-   } else if (type->is_record()) {
-      for (unsigned int i = 0; i < type->length; i++) {
-	 if (type_contains_sampler(type->fields.structure[i].type))
-	    return true;
-      }
-      return false;
-   } else {
-      return type->is_sampler();
-   }
-}
-
-bool
-ir_dereference::is_lvalue()
-{
-   ir_variable *var = this->variable_referenced();
-
-   /* Every l-value derference chain eventually ends in a variable.
-    */
-   if ((var == NULL) || var->read_only)
-      return false;
-
-   if (this->type->is_array() && !var->array_lvalue)
-      return false;
-
-   /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec:
-    *
-    *    "Samplers cannot be treated as l-values; hence cannot be used
-    *     as out or inout function parameters, nor can they be
-    *     assigned into."
-    */
-   if (type_contains_sampler(this->type))
-      return false;
-
-   return true;
-}
-
-
-const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf" };
-
-const char *ir_texture::opcode_string()
-{
-   assert((unsigned int) op <=
-	  sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]));
-   return tex_opcode_strs[op];
-}
-
-ir_texture_opcode
-ir_texture::get_opcode(const char *str)
-{
-   const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]);
-   for (int op = 0; op < count; op++) {
-      if (strcmp(str, tex_opcode_strs[op]) == 0)
-	 return (ir_texture_opcode) op;
-   }
-   return (ir_texture_opcode) -1;
-}
-
-
-void
-ir_texture::set_sampler(ir_dereference *sampler)
-{
-   assert(sampler != NULL);
-   this->sampler = sampler;
-
-   switch (sampler->type->sampler_type) {
-   case GLSL_TYPE_FLOAT:
-      this->type = glsl_type::vec4_type;
-      break;
-   case GLSL_TYPE_INT:
-      this->type = glsl_type::ivec4_type;
-      break;
-   case GLSL_TYPE_UINT:
-      this->type = glsl_type::uvec4_type;
-      break;
-   }
-}
-
-
-void
-ir_swizzle::init_mask(const unsigned *comp, unsigned count)
-{
-   assert((count >= 1) && (count <= 4));
-
-   memset(&this->mask, 0, sizeof(this->mask));
-   this->mask.num_components = count;
-
-   unsigned dup_mask = 0;
-   switch (count) {
-   case 4:
-      assert(comp[3] <= 3);
-      dup_mask |= (1U << comp[3])
-	 & ((1U << comp[0]) | (1U << comp[1]) | (1U << comp[2]));
-      this->mask.w = comp[3];
-
-   case 3:
-      assert(comp[2] <= 3);
-      dup_mask |= (1U << comp[2])
-	 & ((1U << comp[0]) | (1U << comp[1]));
-      this->mask.z = comp[2];
-
-   case 2:
-      assert(comp[1] <= 3);
-      dup_mask |= (1U << comp[1])
-	 & ((1U << comp[0]));
-      this->mask.y = comp[1];
-
-   case 1:
-      assert(comp[0] <= 3);
-      this->mask.x = comp[0];
-   }
-
-   this->mask.has_duplicates = dup_mask != 0;
-
-   /* Based on the number of elements in the swizzle and the base type
-    * (i.e., float, int, unsigned, or bool) of the vector being swizzled,
-    * generate the type of the resulting value.
-    */
-   type = glsl_type::get_instance(val->type->base_type, mask.num_components, 1);
-}
-
-ir_swizzle::ir_swizzle(ir_rvalue *val, unsigned x, unsigned y, unsigned z,
-		       unsigned w, unsigned count)
-   : val(val)
-{
-   const unsigned components[4] = { x, y, z, w };
-   this->ir_type = ir_type_swizzle;
-   this->init_mask(components, count);
-}
-
-ir_swizzle::ir_swizzle(ir_rvalue *val, const unsigned *comp,
-		       unsigned count)
-   : val(val)
-{
-   this->ir_type = ir_type_swizzle;
-   this->init_mask(comp, count);
-}
-
-ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
-{
-   this->ir_type = ir_type_swizzle;
-   this->val = val;
-   this->mask = mask;
-   this->type = glsl_type::get_instance(val->type->base_type,
-					mask.num_components, 1);
-}
-
-#define X 1
-#define R 5
-#define S 9
-#define I 13
-
-ir_swizzle *
-ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length)
-{
-   void *ctx = hieralloc_parent(val);
-
-   /* For each possible swizzle character, this table encodes the value in
-    * \c idx_map that represents the 0th element of the vector.  For invalid
-    * swizzle characters (e.g., 'k'), a special value is used that will allow
-    * detection of errors.
-    */
-   static const unsigned char base_idx[26] = {
-   /* a  b  c  d  e  f  g  h  i  j  k  l  m */
-      R, R, I, I, I, I, R, I, I, I, I, I, I,
-   /* n  o  p  q  r  s  t  u  v  w  x  y  z */
-      I, I, S, S, R, S, S, I, I, X, X, X, X
-   };
-
-   /* Each valid swizzle character has an entry in the previous table.  This
-    * table encodes the base index encoded in the previous table plus the actual
-    * index of the swizzle character.  When processing swizzles, the first
-    * character in the string is indexed in the previous table.  Each character
-    * in the string is indexed in this table, and the value found there has the
-    * value form the first table subtracted.  The result must be on the range
-    * [0,3].
-    *
-    * For example, the string "wzyx" will get X from the first table.  Each of
-    * the charcaters will get X+3, X+2, X+1, and X+0 from this table.  After
-    * subtraction, the swizzle values are { 3, 2, 1, 0 }.
-    *
-    * The string "wzrg" will get X from the first table.  Each of the characters
-    * will get X+3, X+2, R+0, and R+1 from this table.  After subtraction, the
-    * swizzle values are { 3, 2, 4, 5 }.  Since 4 and 5 are outside the range
-    * [0,3], the error is detected.
-    */
-   static const unsigned char idx_map[26] = {
-   /* a    b    c    d    e    f    g    h    i    j    k    l    m */
-      R+3, R+2, 0,   0,   0,   0,   R+1, 0,   0,   0,   0,   0,   0,
-   /* n    o    p    q    r    s    t    u    v    w    x    y    z */
-      0,   0,   S+2, S+3, R+0, S+0, S+1, 0,   0,   X+3, X+0, X+1, X+2
-   };
-
-   int swiz_idx[4] = { 0, 0, 0, 0 };
-   unsigned i;
-
-
-   /* Validate the first character in the swizzle string and look up the base
-    * index value as described above.
-    */
-   if ((str[0] < 'a') || (str[0] > 'z'))
-      return NULL;
-
-   const unsigned base = base_idx[str[0] - 'a'];
-
-
-   for (i = 0; (i < 4) && (str[i] != '\0'); i++) {
-      /* Validate the next character, and, as described above, convert it to a
-       * swizzle index.
-       */
-      if ((str[i] < 'a') || (str[i] > 'z'))
-	 return NULL;
-
-      swiz_idx[i] = idx_map[str[i] - 'a'] - base;
-      if ((swiz_idx[i] < 0) || (swiz_idx[i] >= (int) vector_length))
-	 return NULL;
-   }
-
-   if (str[i] != '\0')
-	 return NULL;
-
-   return new(ctx) ir_swizzle(val, swiz_idx[0], swiz_idx[1], swiz_idx[2],
-			      swiz_idx[3], i);
-}
-
-#undef X
-#undef R
-#undef S
-#undef I
-
-ir_variable *
-ir_swizzle::variable_referenced()
-{
-   return this->val->variable_referenced();
-}
-
-
-ir_variable::ir_variable(const struct glsl_type *type, const char *name,
-			 ir_variable_mode mode)
-   : max_array_access(0), read_only(false), centroid(false), invariant(false),
-     mode(mode), interpolation(ir_var_smooth), array_lvalue(false)
-{
-   this->ir_type = ir_type_variable;
-   this->type = type;
-   this->name = hieralloc_strdup(this, name);
-   this->explicit_location = false;
-   this->location = -1;
-   this->warn_extension = NULL;
-   this->constant_value = NULL;
-   this->origin_upper_left = false;
-   this->pixel_center_integer = false;
-
-   if (type && type->base_type == GLSL_TYPE_SAMPLER)
-      this->read_only = true;
-}
-
-
-const char *
-ir_variable::interpolation_string() const
-{
-   switch (this->interpolation) {
-   case ir_var_smooth:        return "smooth";
-   case ir_var_flat:          return "flat";
-   case ir_var_noperspective: return "noperspective";
-   }
-
-   assert(!"Should not get here.");
-   return "";
-}
-
-
-unsigned
-ir_variable::component_slots() const
-{
-   /* FINISHME: Sparsely accessed arrays require fewer slots. */
-   return this->type->component_slots();
-}
-
-
-ir_function_signature::ir_function_signature(const glsl_type *return_type)
-   : return_type(return_type), is_defined(false), _function(NULL)
-{
-   this->ir_type = ir_type_function_signature;
-   this->is_builtin = false;
-}
-
-
-const char *
-ir_function_signature::qualifiers_match(exec_list *params)
-{
-   exec_list_iterator iter_a = parameters.iterator();
-   exec_list_iterator iter_b = params->iterator();
-
-   /* check that the qualifiers match. */
-   while (iter_a.has_next()) {
-      ir_variable *a = (ir_variable *)iter_a.get();
-      ir_variable *b = (ir_variable *)iter_b.get();
-
-      if (a->read_only != b->read_only ||
-	  a->mode != b->mode ||
-	  a->interpolation != b->interpolation ||
-	  a->centroid != b->centroid) {
-
-	 /* parameter a's qualifiers don't match */
-	 return a->name;
-      }
-
-      iter_a.next();
-      iter_b.next();
-   }
-   return NULL;
-}
-
-
-void
-ir_function_signature::replace_parameters(exec_list *new_params)
-{
-   /* Destroy all of the previous parameter information.  If the previous
-    * parameter information comes from the function prototype, it may either
-    * specify incorrect parameter names or not have names at all.
-    */
-   foreach_iter(exec_list_iterator, iter, parameters) {
-      assert(((ir_instruction *) iter.get())->as_variable() != NULL);
-
-      iter.remove();
-   }
-
-   new_params->move_nodes_to(&parameters);
-}
-
-
-ir_function::ir_function(const char *name)
-{
-   this->ir_type = ir_type_function;
-   this->name = hieralloc_strdup(this, name);
-}
-
-
-bool
-ir_function::has_user_signature()
-{
-   foreach_list(n, &this->signatures) {
-      ir_function_signature *const sig = (ir_function_signature *) n;
-      if (!sig->is_builtin)
-	 return true;
-   }
-   return false;
-}
-
-
-ir_call *
-ir_call::get_error_instruction(void *ctx)
-{
-   ir_call *call = new(ctx) ir_call;
-
-   call->type = glsl_type::error_type;
-   return call;
-}
-
-void
-ir_call::set_callee(ir_function_signature *sig)
-{
-   assert((this->type == NULL) || (this->type == sig->return_type));
-
-   this->callee = sig;
-}
-
-void
-visit_exec_list(exec_list *list, ir_visitor *visitor)
-{
-   foreach_iter(exec_list_iterator, iter, *list) {
-      ((ir_instruction *)iter.get())->accept(visitor);
-   }
-}
-
-
-static void
-steal_memory(ir_instruction *ir, void *new_ctx)
-{
-   ir_variable *var = ir->as_variable();
-   ir_constant *constant = ir->as_constant();
-   if (var != NULL && var->constant_value != NULL)
-      steal_memory(var->constant_value, ir);
-
-   /* The components of aggregate constants are not visited by the normal
-    * visitor, so steal their values by hand.
-    */
-   if (constant != NULL) {
-      if (constant->type->is_record()) {
-	 foreach_iter(exec_list_iterator, iter, constant->components) {
-	    ir_constant *field = (ir_constant *)iter.get();
-	    steal_memory(field, ir);
-	 }
-      } else if (constant->type->is_array()) {
-	 for (unsigned int i = 0; i < constant->type->length; i++) {
-	    steal_memory(constant->array_elements[i], ir);
-	 }
-      }
-   }
-
-   hieralloc_steal(new_ctx, ir);
-}
-
-
-void
-reparent_ir(exec_list *list, void *mem_ctx)
-{
-   foreach_list(node, list) {
-      visit_tree((ir_instruction *) node, steal_memory, mem_ctx);
-   }
-}
-
-
-static ir_rvalue *
-try_min_one(ir_rvalue *ir)
-{
-   ir_expression *expr = ir->as_expression();
-
-   if (!expr || expr->operation != ir_binop_min)
-      return NULL;
-
-   if (expr->operands[0]->is_one())
-      return expr->operands[1];
-
-   if (expr->operands[1]->is_one())
-      return expr->operands[0];
-
-   return NULL;
-}
-
-static ir_rvalue *
-try_max_zero(ir_rvalue *ir)
-{
-   ir_expression *expr = ir->as_expression();
-
-   if (!expr || expr->operation != ir_binop_max)
-      return NULL;
-
-   if (expr->operands[0]->is_zero())
-      return expr->operands[1];
-
-   if (expr->operands[1]->is_zero())
-      return expr->operands[0];
-
-   return NULL;
-}
-
-ir_rvalue *
-ir_rvalue::as_rvalue_to_saturate()
-{
-   ir_expression *expr = this->as_expression();
-
-   if (!expr)
-      return NULL;
-
-   ir_rvalue *max_zero = try_max_zero(expr);
-   if (max_zero) {
-      return try_min_one(max_zero);
-   } else {
-      ir_rvalue *min_one = try_min_one(expr);
-      if (min_one) {
-	 return try_max_zero(min_one);
-      }
-   }
-
-   return NULL;
-}
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
deleted file mode 100644
index bb8b7fc..0000000
--- a/src/glsl/ir.h
+++ /dev/null
@@ -1,1610 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef IR_H
-#define IR_H
-
-#include <cstdio>
-#include <cstdlib>
-
-extern "C" {
-#include <hieralloc.h>
-}
-
-#include "glsl_types.h"
-#include "list.h"
-#include "ir_visitor.h"
-#include "ir_hierarchical_visitor.h"
-
-/**
- * \defgroup IR Intermediate representation nodes
- *
- * @{
- */
-
-/**
- * Class tags
- *
- * Each concrete class derived from \c ir_instruction has a value in this
- * enumerant.  The value for the type is stored in \c ir_instruction::ir_type
- * by the constructor.  While using type tags is not very C++, it is extremely
- * convenient.  For example, during debugging you can simply inspect
- * \c ir_instruction::ir_type to find out the actual type of the object.
- *
- * In addition, it is possible to use a switch-statement based on \c
- * \c ir_instruction::ir_type to select different behavior for different object
- * types.  For functions that have only slight differences for several object
- * types, this allows writing very straightforward, readable code.
- */
-enum ir_node_type {
-   /**
-    * Zero is unused so that the IR validator can detect cases where
-    * \c ir_instruction::ir_type has not been initialized.
-    */
-   ir_type_unset,
-   ir_type_variable,
-   ir_type_assignment,
-   ir_type_call,
-   ir_type_constant,
-   ir_type_dereference_array,
-   ir_type_dereference_record,
-   ir_type_dereference_variable,
-   ir_type_discard,
-   ir_type_expression,
-   ir_type_function,
-   ir_type_function_signature,
-   ir_type_if,
-   ir_type_loop,
-   ir_type_loop_jump,
-   ir_type_return,
-   ir_type_swizzle,
-   ir_type_texture,
-   ir_type_max /**< maximum ir_type enum number, for validation */
-};
-
-/**
- * Base class of all IR instructions
- */
-class ir_instruction : public exec_node {
-public:
-   enum ir_node_type ir_type;
-   const struct glsl_type *type;
-
-   /** ir_print_visitor helper for debugging. */
-   void print(void) const;
-
-   virtual void accept(ir_visitor *) = 0;
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *) = 0;
-   virtual ir_instruction *clone(void *mem_ctx,
-				 struct hash_table *ht) const = 0;
-
-   /**
-    * \name IR instruction downcast functions
-    *
-    * These functions either cast the object to a derived class or return
-    * \c NULL if the object's type does not match the specified derived class.
-    * Additional downcast functions will be added as needed.
-    */
-   /*@{*/
-   virtual class ir_variable *          as_variable()         { return NULL; }
-   virtual class ir_function *          as_function()         { return NULL; }
-   virtual class ir_dereference *       as_dereference()      { return NULL; }
-   virtual class ir_dereference_array *	as_dereference_array() { return NULL; }
-   virtual class ir_dereference_variable *as_dereference_variable() { return NULL; }
-   virtual class ir_expression *        as_expression()       { return NULL; }
-   virtual class ir_rvalue *            as_rvalue()           { return NULL; }
-   virtual class ir_loop *              as_loop()             { return NULL; }
-   virtual class ir_assignment *        as_assignment()       { return NULL; }
-   virtual class ir_call *              as_call()             { return NULL; }
-   virtual class ir_return *            as_return()           { return NULL; }
-   virtual class ir_if *                as_if()               { return NULL; }
-   virtual class ir_swizzle *           as_swizzle()          { return NULL; }
-   virtual class ir_constant *          as_constant()         { return NULL; }
-   virtual class ir_discard *           as_discard()          { return NULL; }
-   /*@}*/
-
-protected:
-   ir_instruction()
-   {
-      ir_type = ir_type_unset;
-      type = NULL;
-   }
-   
-   virtual  ~ir_instruction() { } // GCC error about accessible nonvirtual dctor
-
-   
-};
-
-
-class ir_rvalue : public ir_instruction {
-public:
-   virtual ir_rvalue *clone(void *mem_ctx, struct hash_table *) const = 0;
-
-   virtual ir_constant *constant_expression_value() = 0;
-
-   virtual ir_rvalue * as_rvalue()
-   {
-      return this;
-   }
-
-   ir_rvalue *as_rvalue_to_saturate();
-
-   virtual bool is_lvalue()
-   {
-      return false;
-   }
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced()
-   {
-      return NULL;
-   }
-
-
-   /**
-    * If an r-value is a reference to a whole variable, get that variable
-    *
-    * \return
-    * Pointer to a variable that is completely dereferenced by the r-value.  If
-    * the r-value is not a dereference or the dereference does not access the
-    * entire variable (i.e., it's just one array element, struct field), \c NULL
-    * is returned.
-    */
-   virtual ir_variable *whole_variable_referenced()
-   {
-      return NULL;
-   }
-
-   /**
-    * Determine if an r-value has the value zero
-    *
-    * The base implementation of this function always returns \c false.  The
-    * \c ir_constant class over-rides this function to return \c true \b only
-    * for vector and scalar types that have all elements set to the value
-    * zero (or \c false for booleans).
-    *
-    * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one
-    */
-   virtual bool is_zero() const;
-
-   /**
-    * Determine if an r-value has the value one
-    *
-    * The base implementation of this function always returns \c false.  The
-    * \c ir_constant class over-rides this function to return \c true \b only
-    * for vector and scalar types that have all elements set to the value
-    * one (or \c true for booleans).
-    *
-    * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one
-    */
-   virtual bool is_one() const;
-
-   /**
-    * Determine if an r-value has the value negative one
-    *
-    * The base implementation of this function always returns \c false.  The
-    * \c ir_constant class over-rides this function to return \c true \b only
-    * for vector and scalar types that have all elements set to the value
-    * negative one.  For boolean times, the result is always \c false.
-    *
-    * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one
-    */
-   virtual bool is_negative_one() const;
-
-protected:
-   ir_rvalue();
-};
-
-
-/**
- * Variable storage classes
- */
-enum ir_variable_mode {
-   ir_var_auto = 0,     /**< Function local variables and globals. */
-   ir_var_uniform,      /**< Variable declared as a uniform. */
-   ir_var_in,
-   ir_var_out,
-   ir_var_inout,
-   ir_var_temporary	/**< Temporary variable generated during compilation. */
-};
-
-enum ir_variable_interpolation {
-   ir_var_smooth = 0,
-   ir_var_flat,
-   ir_var_noperspective
-};
-
-
-class ir_variable : public ir_instruction {
-public:
-   ir_variable(const struct glsl_type *, const char *, ir_variable_mode);
-
-   virtual ir_variable *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual ir_variable *as_variable()
-   {
-      return this;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-
-   /**
-    * Get the string value for the interpolation qualifier
-    *
-    * \return The string that would be used in a shader to specify \c
-    * mode will be returned.
-    *
-    * This function should only be used on a shader input or output variable.
-    */
-   const char *interpolation_string() const;
-
-   /**
-    * Calculate the number of slots required to hold this variable
-    *
-    * This is used to determine how many uniform or varying locations a variable
-    * occupies.  The count is in units of floating point components.
-    */
-   unsigned component_slots() const;
-
-   /**
-    * Delcared name of the variable
-    */
-   const char *name;
-
-   /**
-    * Highest element accessed with a constant expression array index
-    *
-    * Not used for non-array variables.
-    */
-   unsigned max_array_access;
-
-   /**
-    * Is the variable read-only?
-    *
-    * This is set for variables declared as \c const, shader inputs,
-    * and uniforms.
-    */
-   unsigned read_only:1;
-   unsigned centroid:1;
-   unsigned invariant:1;
-
-   /**
-    * Storage class of the variable.
-    *
-    * \sa ir_variable_mode
-    */
-   unsigned mode:3;
-
-   /**
-    * Interpolation mode for shader inputs / outputs
-    *
-    * \sa ir_variable_interpolation
-    */
-   unsigned interpolation:2;
-
-   /**
-    * Flag that the whole array is assignable
-    *
-    * In GLSL 1.20 and later whole arrays are assignable (and comparable for
-    * equality).  This flag enables this behavior.
-    */
-   unsigned array_lvalue:1;
-
-   /**
-    * \name ARB_fragment_coord_conventions
-    * @{
-    */
-   unsigned origin_upper_left:1;
-   unsigned pixel_center_integer:1;
-   /*@}*/
-
-   /**
-    * Was the location explicitly set in the shader?
-    *
-    * If the location is explicitly set in the shader, it \b cannot be changed
-    * by the linker or by the API (e.g., calls to \c glBindAttribLocation have
-    * no effect).
-    */
-   unsigned explicit_location:1;
-
-   /**
-    * Storage location of the base of this variable
-    *
-    * The precise meaning of this field depends on the nature of the variable.
-    *
-    *   - Vertex shader input: one of the values from \c gl_vert_attrib.
-    *   - Vertex shader output: one of the values from \c gl_vert_result.
-    *   - Fragment shader input: one of the values from \c gl_frag_attrib.
-    *   - Fragment shader output: one of the values from \c gl_frag_result.
-    *   - Uniforms: Per-stage uniform slot number.
-    *   - Other: This field is not currently used.
-    *
-    * If the variable is a uniform, shader input, or shader output, and the
-    * slot has not been assigned, the value will be -1.
-    */
-   int location;
-
-   /**
-    * Emit a warning if this variable is accessed.
-    */
-   const char *warn_extension;
-
-   /**
-    * Value assigned in the initializer of a variable declared "const"
-    */
-   ir_constant *constant_value;
-};
-
-
-/*@{*/
-/**
- * The representation of a function instance; may be the full definition or
- * simply a prototype.
- */
-class ir_function_signature : public ir_instruction {
-   /* An ir_function_signature will be part of the list of signatures in
-    * an ir_function.
-    */
-public:
-   ir_function_signature(const glsl_type *return_type);
-
-   virtual ir_function_signature *clone(void *mem_ctx,
-					struct hash_table *ht) const;
-   ir_function_signature *clone_prototype(void *mem_ctx,
-					  struct hash_table *ht) const;
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   /**
-    * Get the name of the function for which this is a signature
-    */
-   const char *function_name() const;
-
-   /**
-    * Get a handle to the function for which this is a signature
-    *
-    * There is no setter function, this function returns a \c const pointer,
-    * and \c ir_function_signature::_function is private for a reason.  The
-    * only way to make a connection between a function and function signature
-    * is via \c ir_function::add_signature.  This helps ensure that certain
-    * invariants (i.e., a function signature is in the list of signatures for
-    * its \c _function) are met.
-    *
-    * \sa ir_function::add_signature
-    */
-   inline const class ir_function *function() const
-   {
-      return this->_function;
-   }
-
-   /**
-    * Check whether the qualifiers match between this signature's parameters
-    * and the supplied parameter list.  If not, returns the name of the first
-    * parameter with mismatched qualifiers (for use in error messages).
-    */
-   const char *qualifiers_match(exec_list *params);
-
-   /**
-    * Replace the current parameter list with the given one.  This is useful
-    * if the current information came from a prototype, and either has invalid
-    * or missing parameter names.
-    */
-   void replace_parameters(exec_list *new_params);
-
-   /**
-    * Function return type.
-    *
-    * \note This discards the optional precision qualifier.
-    */
-   const struct glsl_type *return_type;
-
-   /**
-    * List of ir_variable of function parameters.
-    *
-    * This represents the storage.  The paramaters passed in a particular
-    * call will be in ir_call::actual_paramaters.
-    */
-   struct exec_list parameters;
-
-   /** Whether or not this function has a body (which may be empty). */
-   unsigned is_defined:1;
-
-   /** Whether or not this function signature is a built-in. */
-   unsigned is_builtin:1;
-
-   /** Body of instructions in the function. */
-   struct exec_list body;
-
-private:
-   /** Function of which this signature is one overload. */
-   class ir_function *_function;
-
-   friend class ir_function;
-};
-
-
-/**
- * Header for tracking multiple overloaded functions with the same name.
- * Contains a list of ir_function_signatures representing each of the
- * actual functions.
- */
-class ir_function : public ir_instruction {
-public:
-   ir_function(const char *name);
-
-   virtual ir_function *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual ir_function *as_function()
-   {
-      return this;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   void add_signature(ir_function_signature *sig)
-   {
-      sig->_function = this;
-      this->signatures.push_tail(sig);
-   }
-
-   /**
-    * Get an iterator for the set of function signatures
-    */
-   exec_list_iterator iterator()
-   {
-      return signatures.iterator();
-   }
-
-   /**
-    * Find a signature that matches a set of actual parameters, taking implicit
-    * conversions into account.
-    */
-   ir_function_signature *matching_signature(const exec_list *actual_param);
-
-   /**
-    * Find a signature that exactly matches a set of actual parameters without
-    * any implicit type conversions.
-    */
-   ir_function_signature *exact_matching_signature(const exec_list *actual_ps);
-
-   /**
-    * Name of the function.
-    */
-   const char *name;
-
-   /** Whether or not this function has a signature that isn't a built-in. */
-   bool has_user_signature();
-
-   /**
-    * List of ir_function_signature for each overloaded function with this name.
-    */
-   struct exec_list signatures;
-};
-
-inline const char *ir_function_signature::function_name() const
-{
-   return this->_function->name;
-}
-/*@}*/
-
-
-/**
- * IR instruction representing high-level if-statements
- */
-class ir_if : public ir_instruction {
-public:
-   ir_if(ir_rvalue *condition)
-      : condition(condition)
-   {
-      ir_type = ir_type_if;
-   }
-
-   virtual ir_if *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual ir_if *as_if()
-   {
-      return this;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   ir_rvalue *condition;
-   /** List of ir_instruction for the body of the then branch */
-   exec_list  then_instructions;
-   /** List of ir_instruction for the body of the else branch */
-   exec_list  else_instructions;
-};
-
-
-/**
- * IR instruction representing a high-level loop structure.
- */
-class ir_loop : public ir_instruction {
-public:
-   ir_loop();
-
-   virtual ir_loop *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   virtual ir_loop *as_loop()
-   {
-      return this;
-   }
-
-   /**
-    * Get an iterator for the instructions of the loop body
-    */
-   exec_list_iterator iterator()
-   {
-      return body_instructions.iterator();
-   }
-
-   /** List of ir_instruction that make up the body of the loop. */
-   exec_list body_instructions;
-
-   /**
-    * \name Loop counter and controls
-    *
-    * Represents a loop like a FORTRAN \c do-loop.
-    *
-    * \note
-    * If \c from and \c to are the same value, the loop will execute once.
-    */
-   /*@{*/
-   ir_rvalue *from;             /** Value of the loop counter on the first
-				 * iteration of the loop.
-				 */
-   ir_rvalue *to;               /** Value of the loop counter on the last
-				 * iteration of the loop.
-				 */
-   ir_rvalue *increment;
-   ir_variable *counter;
-
-   /**
-    * Comparison operation in the loop terminator.
-    *
-    * If any of the loop control fields are non-\c NULL, this field must be
-    * one of \c ir_binop_less, \c ir_binop_greater, \c ir_binop_lequal,
-    * \c ir_binop_gequal, \c ir_binop_equal, or \c ir_binop_nequal.
-    */
-   int cmp;
-   /*@}*/
-};
-
-
-class ir_assignment : public ir_instruction {
-public:
-   ir_assignment(ir_rvalue *lhs, ir_rvalue *rhs, ir_rvalue *condition);
-
-   /**
-    * Construct an assignment with an explicit write mask
-    *
-    * \note
-    * Since a write mask is supplied, the LHS must already be a bare
-    * \c ir_dereference.  The cannot be any swizzles in the LHS.
-    */
-   ir_assignment(ir_dereference *lhs, ir_rvalue *rhs, ir_rvalue *condition,
-		 unsigned write_mask);
-
-   virtual ir_assignment *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   virtual ir_assignment * as_assignment()
-   {
-      return this;
-   }
-
-   /**
-    * Get a whole variable written by an assignment
-    *
-    * If the LHS of the assignment writes a whole variable, the variable is
-    * returned.  Otherwise \c NULL is returned.  Examples of whole-variable
-    * assignment are:
-    *
-    *  - Assigning to a scalar
-    *  - Assigning to all components of a vector
-    *  - Whole array (or matrix) assignment
-    *  - Whole structure assignment
-    */
-   ir_variable *whole_variable_written();
-
-   /**
-    * Set the LHS of an assignment
-    */
-   void set_lhs(ir_rvalue *lhs);
-
-   /**
-    * Left-hand side of the assignment.
-    *
-    * This should be treated as read only.  If you need to set the LHS of an
-    * assignment, use \c ir_assignment::set_lhs.
-    */
-   ir_dereference *lhs;
-
-   /**
-    * Value being assigned
-    */
-   ir_rvalue *rhs;
-
-   /**
-    * Optional condition for the assignment.
-    */
-   ir_rvalue *condition;
-
-
-   /**
-    * Component mask written
-    *
-    * For non-vector types in the LHS, this field will be zero.  For vector
-    * types, a bit will be set for each component that is written.  Note that
-    * for \c vec2 and \c vec3 types only the lower bits will ever be set.
-    *
-    * A partially-set write mask means that each enabled channel gets
-    * the value from a consecutive channel of the rhs.  For example,
-    * to write just .xyw of gl_FrontColor with color:
-    *
-    * (assign (constant bool (1)) (xyw)
-    *     (var_ref gl_FragColor)
-    *     (swiz xyw (var_ref color)))
-    */
-   unsigned write_mask:4;
-};
-
-/* Update ir_expression::num_operands() and operator_strs when
- * updating this list.
- */
-enum ir_expression_operation {
-   ir_unop_bit_not,
-   ir_unop_logic_not,
-   ir_unop_neg,
-   ir_unop_abs,
-   ir_unop_sign,
-   ir_unop_rcp,
-   ir_unop_rsq,
-   ir_unop_sqrt,
-   ir_unop_exp,      /**< Log base e on gentype */
-   ir_unop_log,	     /**< Natural log on gentype */
-   ir_unop_exp2,
-   ir_unop_log2,
-   ir_unop_f2i,      /**< Float-to-integer conversion. */
-   ir_unop_i2f,      /**< Integer-to-float conversion. */
-   ir_unop_f2b,      /**< Float-to-boolean conversion */
-   ir_unop_b2f,      /**< Boolean-to-float conversion */
-   ir_unop_i2b,      /**< int-to-boolean conversion */
-   ir_unop_b2i,      /**< Boolean-to-int conversion */
-   ir_unop_u2f,      /**< Unsigned-to-float conversion. */
-   ir_unop_any,
-
-   /**
-    * \name Unary floating-point rounding operations.
-    */
-   /*@{*/
-   ir_unop_trunc,
-   ir_unop_ceil,
-   ir_unop_floor,
-   ir_unop_fract,
-   ir_unop_round_even,
-   /*@}*/
-
-   /**
-    * \name Trigonometric operations.
-    */
-   /*@{*/
-   ir_unop_sin,
-   ir_unop_cos,
-   ir_unop_sin_reduced,    /**< Reduced range sin. [-pi, pi] */
-   ir_unop_cos_reduced,    /**< Reduced range cos. [-pi, pi] */
-   /*@}*/
-
-   /**
-    * \name Partial derivatives.
-    */
-   /*@{*/
-   ir_unop_dFdx,
-   ir_unop_dFdy,
-   /*@}*/
-
-   ir_unop_noise,
-
-   /**
-    * A sentinel marking the last of the unary operations.
-    */
-   ir_last_unop = ir_unop_noise,
-
-   ir_binop_add,
-   ir_binop_sub,
-   ir_binop_mul,
-   ir_binop_div,
-
-   /**
-    * Takes one of two combinations of arguments:
-    *
-    * - mod(vecN, vecN)
-    * - mod(vecN, float)
-    *
-    * Does not take integer types.
-    */
-   ir_binop_mod,
-
-   /**
-    * \name Binary comparison operators which return a boolean vector.
-    * The type of both operands must be equal.
-    */
-   /*@{*/
-   ir_binop_less,
-   ir_binop_greater,
-   ir_binop_lequal,
-   ir_binop_gequal,
-   ir_binop_equal,
-   ir_binop_nequal,
-   /**
-    * Returns single boolean for whether all components of operands[0]
-    * equal the components of operands[1].
-    */
-   ir_binop_all_equal,
-   /**
-    * Returns single boolean for whether any component of operands[0]
-    * is not equal to the corresponding component of operands[1].
-    */
-   ir_binop_any_nequal,
-   /*@}*/
-
-   /**
-    * \name Bit-wise binary operations.
-    */
-   /*@{*/
-   ir_binop_lshift,
-   ir_binop_rshift,
-   ir_binop_bit_and,
-   ir_binop_bit_xor,
-   ir_binop_bit_or,
-   /*@}*/
-
-   ir_binop_logic_and,
-   ir_binop_logic_xor,
-   ir_binop_logic_or,
-
-   ir_binop_dot,
-   ir_binop_min,
-   ir_binop_max,
-
-   ir_binop_pow,
-
-   /**
-    * A sentinel marking the last of the binary operations.
-    */
-   ir_last_binop = ir_binop_pow,
-
-   ir_quadop_vector,
-
-   /**
-    * A sentinel marking the last of all operations.
-    */
-   ir_last_opcode = ir_last_binop
-};
-
-class ir_expression : public ir_rvalue {
-public:
-   /**
-    * Constructor for unary operation expressions
-    */
-   ir_expression(int op, const struct glsl_type *type, ir_rvalue *);
-   ir_expression(int op, ir_rvalue *);
-
-   /**
-    * Constructor for binary operation expressions
-    */
-   ir_expression(int op, const struct glsl_type *type,
-		 ir_rvalue *, ir_rvalue *);
-   ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1);
-
-   /**
-    * Constructor for quad operator expressions
-    */
-   ir_expression(int op, const struct glsl_type *type,
-		 ir_rvalue *, ir_rvalue *, ir_rvalue *, ir_rvalue *);
-
-   virtual ir_expression *as_expression()
-   {
-      return this;
-   }
-
-   virtual ir_expression *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   /**
-    * Attempt to constant-fold the expression
-    *
-    * If the expression cannot be constant folded, this method will return
-    * \c NULL.
-    */
-   virtual ir_constant *constant_expression_value();
-
-   /**
-    * Determine the number of operands used by an expression
-    */
-   static unsigned int get_num_operands(ir_expression_operation);
-
-   /**
-    * Determine the number of operands used by an expression
-    */
-   unsigned int get_num_operands() const
-   {
-      return (this->operation == ir_quadop_vector)
-	 ? this->type->vector_elements : get_num_operands(operation);
-   }
-
-   /**
-    * Return a string representing this expression's operator.
-    */
-   const char *operator_string();
-
-   /**
-    * Return a string representing this expression's operator.
-    */
-   static const char *operator_string(ir_expression_operation);
-
-
-   /**
-    * Do a reverse-lookup to translate the given string into an operator.
-    */
-   static ir_expression_operation get_operator(const char *);
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   ir_expression_operation operation;
-   ir_rvalue *operands[4];
-};
-
-
-/**
- * IR instruction representing a function call
- */
-class ir_call : public ir_rvalue {
-public:
-   ir_call(ir_function_signature *callee, exec_list *actual_parameters)
-      : callee(callee)
-   {
-      ir_type = ir_type_call;
-      assert(callee->return_type != NULL);
-      type = callee->return_type;
-      actual_parameters->move_nodes_to(& this->actual_parameters);
-   }
-
-   virtual ir_call *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual ir_call *as_call()
-   {
-      return this;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   /**
-    * Get a generic ir_call object when an error occurs
-    *
-    * Any allocation will be performed with 'ctx' as hieralloc owner.
-    */
-   static ir_call *get_error_instruction(void *ctx);
-
-   /**
-    * Get an iterator for the set of acutal parameters
-    */
-   exec_list_iterator iterator()
-   {
-      return actual_parameters.iterator();
-   }
-
-   /**
-    * Get the name of the function being called.
-    */
-   const char *callee_name() const
-   {
-      return callee->function_name();
-   }
-
-   /**
-    * Get the function signature bound to this function call
-    */
-   ir_function_signature *get_callee()
-   {
-      return callee;
-   }
-
-   /**
-    * Set the function call target
-    */
-   void set_callee(ir_function_signature *sig);
-
-   /**
-    * Generates an inline version of the function before @ir,
-    * returning the return value of the function.
-    */
-   ir_rvalue *generate_inline(ir_instruction *ir);
-
-   /* List of ir_rvalue of paramaters passed in this call. */
-   exec_list actual_parameters;
-
-private:
-   ir_call()
-      : callee(NULL)
-   {
-      this->ir_type = ir_type_call;
-   }
-
-   ir_function_signature *callee;
-};
-
-
-/**
- * \name Jump-like IR instructions.
- *
- * These include \c break, \c continue, \c return, and \c discard.
- */
-/*@{*/
-class ir_jump : public ir_instruction {
-protected:
-   ir_jump()
-   {
-      ir_type = ir_type_unset;
-   }
-};
-
-class ir_return : public ir_jump {
-public:
-   ir_return()
-      : value(NULL)
-   {
-      this->ir_type = ir_type_return;
-   }
-
-   ir_return(ir_rvalue *value)
-      : value(value)
-   {
-      this->ir_type = ir_type_return;
-   }
-
-   virtual ir_return *clone(void *mem_ctx, struct hash_table *) const;
-
-   virtual ir_return *as_return()
-   {
-      return this;
-   }
-
-   ir_rvalue *get_value() const
-   {
-      return value;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   ir_rvalue *value;
-};
-
-
-/**
- * Jump instructions used inside loops
- *
- * These include \c break and \c continue.  The \c break within a loop is
- * different from the \c break within a switch-statement.
- *
- * \sa ir_switch_jump
- */
-class ir_loop_jump : public ir_jump {
-public:
-   enum jump_mode {
-      jump_break,
-      jump_continue
-   };
-
-   ir_loop_jump(jump_mode mode)
-   {
-      this->ir_type = ir_type_loop_jump;
-      this->mode = mode;
-      this->loop = loop;
-   }
-
-   virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const;
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   bool is_break() const
-   {
-      return mode == jump_break;
-   }
-
-   bool is_continue() const
-   {
-      return mode == jump_continue;
-   }
-
-   /** Mode selector for the jump instruction. */
-   enum jump_mode mode;
-private:
-   /** Loop containing this break instruction. */
-   ir_loop *loop;
-};
-
-/**
- * IR instruction representing discard statements.
- */
-class ir_discard : public ir_jump {
-public:
-   ir_discard()
-   {
-      this->ir_type = ir_type_discard;
-      this->condition = NULL;
-   }
-
-   ir_discard(ir_rvalue *cond)
-   {
-      this->ir_type = ir_type_discard;
-      this->condition = cond;
-   }
-
-   virtual ir_discard *clone(void *mem_ctx, struct hash_table *ht) const;
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   virtual ir_discard *as_discard()
-   {
-      return this;
-   }
-
-   ir_rvalue *condition;
-};
-/*@}*/
-
-
-/**
- * Texture sampling opcodes used in ir_texture
- */
-enum ir_texture_opcode {
-   ir_tex,		/**< Regular texture look-up */
-   ir_txb,		/**< Texture look-up with LOD bias */
-   ir_txl,		/**< Texture look-up with explicit LOD */
-   ir_txd,		/**< Texture look-up with partial derivatvies */
-   ir_txf		/**< Texel fetch with explicit LOD */
-};
-
-
-/**
- * IR instruction to sample a texture
- *
- * The specific form of the IR instruction depends on the \c mode value
- * selected from \c ir_texture_opcodes.  In the printed IR, these will
- * appear as:
- *
- *                              Texel offset
- *                              |       Projection divisor
- *                              |       |   Shadow comparitor
- *                              |       |   |
- *                              v       v   v
- * (tex (sampler) (coordinate) (0 0 0) (1) ( ))
- * (txb (sampler) (coordinate) (0 0 0) (1) ( ) (bias))
- * (txl (sampler) (coordinate) (0 0 0) (1) ( ) (lod))
- * (txd (sampler) (coordinate) (0 0 0) (1) ( ) (dPdx dPdy))
- * (txf (sampler) (coordinate) (0 0 0)         (lod))
- */
-class ir_texture : public ir_rvalue {
-public:
-   ir_texture(enum ir_texture_opcode op)
-      : op(op), projector(NULL), shadow_comparitor(NULL)
-   {
-      this->ir_type = ir_type_texture;
-   }
-
-   virtual ir_texture *clone(void *mem_ctx, struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   /**
-    * Return a string representing the ir_texture_opcode.
-    */
-   const char *opcode_string();
-
-   /** Set the sampler and infer the type. */
-   void set_sampler(ir_dereference *sampler);
-
-   /**
-    * Do a reverse-lookup to translate a string into an ir_texture_opcode.
-    */
-   static ir_texture_opcode get_opcode(const char *);
-
-   enum ir_texture_opcode op;
-
-   /** Sampler to use for the texture access. */
-   ir_dereference *sampler;
-
-   /** Texture coordinate to sample */
-   ir_rvalue *coordinate;
-
-   /**
-    * Value used for projective divide.
-    *
-    * If there is no projective divide (the common case), this will be
-    * \c NULL.  Optimization passes should check for this to point to a constant
-    * of 1.0 and replace that with \c NULL.
-    */
-   ir_rvalue *projector;
-
-   /**
-    * Coordinate used for comparison on shadow look-ups.
-    *
-    * If there is no shadow comparison, this will be \c NULL.  For the
-    * \c ir_txf opcode, this *must* be \c NULL.
-    */
-   ir_rvalue *shadow_comparitor;
-
-   /** Explicit texel offsets. */
-   signed char offsets[3];
-
-   union {
-      ir_rvalue *lod;		/**< Floating point LOD */
-      ir_rvalue *bias;		/**< Floating point LOD bias */
-      struct {
-	 ir_rvalue *dPdx;	/**< Partial derivative of coordinate wrt X */
-	 ir_rvalue *dPdy;	/**< Partial derivative of coordinate wrt Y */
-      } grad;
-   } lod_info;
-};
-
-
-struct ir_swizzle_mask {
-   unsigned x:2;
-   unsigned y:2;
-   unsigned z:2;
-   unsigned w:2;
-
-   /**
-    * Number of components in the swizzle.
-    */
-   unsigned num_components:3;
-
-   /**
-    * Does the swizzle contain duplicate components?
-    *
-    * L-value swizzles cannot contain duplicate components.
-    */
-   unsigned has_duplicates:1;
-};
-
-
-class ir_swizzle : public ir_rvalue {
-public:
-   ir_swizzle(ir_rvalue *, unsigned x, unsigned y, unsigned z, unsigned w,
-              unsigned count);
-
-   ir_swizzle(ir_rvalue *val, const unsigned *components, unsigned count);
-
-   ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask);
-
-   virtual ir_swizzle *clone(void *mem_ctx, struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual ir_swizzle *as_swizzle()
-   {
-      return this;
-   }
-
-   /**
-    * Construct an ir_swizzle from the textual representation.  Can fail.
-    */
-   static ir_swizzle *create(ir_rvalue *, const char *, unsigned vector_length);
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   bool is_lvalue()
-   {
-      return val->is_lvalue() && !mask.has_duplicates;
-   }
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced();
-
-   ir_rvalue *val;
-   ir_swizzle_mask mask;
-
-private:
-   /**
-    * Initialize the mask component of a swizzle
-    *
-    * This is used by the \c ir_swizzle constructors.
-    */
-   void init_mask(const unsigned *components, unsigned count);
-};
-
-
-class ir_dereference : public ir_rvalue {
-public:
-   virtual ir_dereference *clone(void *mem_ctx, struct hash_table *) const = 0;
-
-   virtual ir_dereference *as_dereference()
-   {
-      return this;
-   }
-
-   bool is_lvalue();
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced() = 0;
-};
-
-
-class ir_dereference_variable : public ir_dereference {
-public:
-   ir_dereference_variable(ir_variable *var);
-
-   virtual ir_dereference_variable *clone(void *mem_ctx,
-					  struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual ir_dereference_variable *as_dereference_variable()
-   {
-      return this;
-   }
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced()
-   {
-      return this->var;
-   }
-
-   virtual ir_variable *whole_variable_referenced()
-   {
-      /* ir_dereference_variable objects always dereference the entire
-       * variable.  However, if this dereference is dereferenced by anything
-       * else, the complete deferefernce chain is not a whole-variable
-       * dereference.  This method should only be called on the top most
-       * ir_rvalue in a dereference chain.
-       */
-      return this->var;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   /**
-    * Object being dereferenced.
-    */
-   ir_variable *var;
-};
-
-
-class ir_dereference_array : public ir_dereference {
-public:
-   ir_dereference_array(ir_rvalue *value, ir_rvalue *array_index);
-
-   ir_dereference_array(ir_variable *var, ir_rvalue *array_index);
-
-   virtual ir_dereference_array *clone(void *mem_ctx,
-				       struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual ir_dereference_array *as_dereference_array()
-   {
-      return this;
-   }
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced()
-   {
-      return this->array->variable_referenced();
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   ir_rvalue *array;
-   ir_rvalue *array_index;
-
-private:
-   void set_array(ir_rvalue *value);
-};
-
-
-class ir_dereference_record : public ir_dereference {
-public:
-   ir_dereference_record(ir_rvalue *value, const char *field);
-
-   ir_dereference_record(ir_variable *var, const char *field);
-
-   virtual ir_dereference_record *clone(void *mem_ctx,
-					struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   /**
-    * Get the variable that is ultimately referenced by an r-value
-    */
-   virtual ir_variable *variable_referenced()
-   {
-      return this->record->variable_referenced();
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   ir_rvalue *record;
-   const char *field;
-};
-
-
-/**
- * Data stored in an ir_constant
- */
-union ir_constant_data {
-      unsigned u[16];
-      int i[16];
-      float f[16];
-      bool b[16];
-};
-
-
-class ir_constant : public ir_rvalue {
-public:
-   ir_constant(const struct glsl_type *type, const ir_constant_data *data);
-   ir_constant(bool b);
-   ir_constant(unsigned int u);
-   ir_constant(int i);
-   ir_constant(float f);
-
-   /**
-    * Construct an ir_constant from a list of ir_constant values
-    */
-   ir_constant(const struct glsl_type *type, exec_list *values);
-
-   /**
-    * Construct an ir_constant from a scalar component of another ir_constant
-    *
-    * The new \c ir_constant inherits the type of the component from the
-    * source constant.
-    *
-    * \note
-    * In the case of a matrix constant, the new constant is a scalar, \b not
-    * a vector.
-    */
-   ir_constant(const ir_constant *c, unsigned i);
-
-   /**
-    * Return a new ir_constant of the specified type containing all zeros.
-    */
-   static ir_constant *zero(void *mem_ctx, const glsl_type *type);
-
-   virtual ir_constant *clone(void *mem_ctx, struct hash_table *) const;
-
-   virtual ir_constant *constant_expression_value();
-
-   virtual ir_constant *as_constant()
-   {
-      return this;
-   }
-
-   virtual void accept(ir_visitor *v)
-   {
-      v->visit(this);
-   }
-
-   virtual ir_visitor_status accept(ir_hierarchical_visitor *);
-
-   /**
-    * Get a particular component of a constant as a specific type
-    *
-    * This is useful, for example, to get a value from an integer constant
-    * as a float or bool.  This appears frequently when constructors are
-    * called with all constant parameters.
-    */
-   /*@{*/
-   bool get_bool_component(unsigned i) const;
-   float get_float_component(unsigned i) const;
-   int get_int_component(unsigned i) const;
-   unsigned get_uint_component(unsigned i) const;
-   /*@}*/
-
-   ir_constant *get_array_element(unsigned i) const;
-
-   ir_constant *get_record_field(const char *name);
-
-   /**
-    * Determine whether a constant has the same value as another constant
-    *
-    * \sa ir_constant::is_zero, ir_constant::is_one,
-    * ir_constant::is_negative_one
-    */
-   bool has_value(const ir_constant *) const;
-
-   virtual bool is_zero() const;
-   virtual bool is_one() const;
-   virtual bool is_negative_one() const;
-
-   /**
-    * Value of the constant.
-    *
-    * The field used to back the values supplied by the constant is determined
-    * by the type associated with the \c ir_instruction.  Constants may be
-    * scalars, vectors, or matrices.
-    */
-   union ir_constant_data value;
-
-   /* Array elements */
-   ir_constant **array_elements;
-
-   /* Structure fields */
-   exec_list components;
-
-private:
-   /**
-    * Parameterless constructor only used by the clone method
-    */
-   ir_constant(void);
-};
-
-/*@}*/
-
-/**
- * Apply a visitor to each IR node in a list
- */
-void
-visit_exec_list(exec_list *list, ir_visitor *visitor);
-
-/**
- * Validate invariants on each IR node in a list
- */
-void validate_ir_tree(exec_list *instructions);
-
-/**
- * Make a clone of each IR instruction in a list
- *
- * \param in   List of IR instructions that are to be cloned
- * \param out  List to hold the cloned instructions
- */
-void
-clone_ir_list(void *mem_ctx, exec_list *out, const exec_list *in);
-
-extern void
-_mesa_glsl_initialize_variables(exec_list *instructions,
-				struct _mesa_glsl_parse_state *state);
-
-extern void
-_mesa_glsl_initialize_functions(exec_list *instructions,
-				struct _mesa_glsl_parse_state *state);
-
-extern void
-_mesa_glsl_release_functions(void);
-
-extern void
-reparent_ir(exec_list *list, void *mem_ctx);
-
-struct glsl_symbol_table;
-
-extern void
-import_prototypes(const exec_list *source, exec_list *dest,
-		  struct glsl_symbol_table *symbols, void *mem_ctx);
-
-extern bool
-ir_has_call(ir_instruction *ir);
-
-extern void
-do_set_program_inouts(exec_list *instructions, struct gl_program *prog);
-
-#endif /* IR_H */
diff --git a/src/glsl/ir_basic_block.cpp b/src/glsl/ir_basic_block.cpp
deleted file mode 100644
index 2574181..0000000
--- a/src/glsl/ir_basic_block.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_basic_block.cpp
- *
- * Basic block analysis of instruction streams.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_basic_block.h"
-#include "glsl_types.h"
-
-class ir_has_call_visitor : public ir_hierarchical_visitor {
-public:
-   ir_has_call_visitor()
-   {
-      has_call = false;
-   }
-
-   using ir_hierarchical_visitor::visit_enter;
-   virtual ir_visitor_status visit_enter(ir_call *ir)
-   {
-      (void) ir;
-      has_call = true;
-      return visit_stop;
-   }
-
-   bool has_call;
-};
-
-bool
-ir_has_call(ir_instruction *ir)
-{
-   ir_has_call_visitor v;
-   ir->accept(&v);
-   return v.has_call;
-}
-
-/**
- * Calls a user function for every basic block in the instruction stream.
- *
- * Basic block analysis is pretty easy in our IR thanks to the lack of
- * unstructured control flow.  We've got:
- *
- * ir_loop (for () {}, while () {}, do {} while ())
- * ir_loop_jump (
- * ir_if () {}
- * ir_return
- * ir_call()
- *
- * Note that the basic blocks returned by this don't encompass all
- * operations performed by the program -- for example, if conditions
- * don't get returned, nor do the assignments that will be generated
- * for ir_call parameters.
- */
-void call_for_basic_blocks(exec_list *instructions,
-			   void (*callback)(ir_instruction *first,
-					    ir_instruction *last,
-					    void *data),
-			   void *data)
-{
-   ir_instruction *leader = NULL;
-   ir_instruction *last = NULL;
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir_if *ir_if;
-      ir_loop *ir_loop;
-      ir_function *ir_function;
-
-      if (!leader)
-	 leader = ir;
-
-      if ((ir_if = ir->as_if())) {
-	 callback(leader, ir, data);
-	 leader = NULL;
-
-	 call_for_basic_blocks(&ir_if->then_instructions, callback, data);
-	 call_for_basic_blocks(&ir_if->else_instructions, callback, data);
-      } else if ((ir_loop = ir->as_loop())) {
-	 callback(leader, ir, data);
-	 leader = NULL;
-	 call_for_basic_blocks(&ir_loop->body_instructions, callback, data);
-      } else if (ir->as_return() || ir->as_call()) {
-	 callback(leader, ir, data);
-	 leader = NULL;
-      } else if ((ir_function = ir->as_function())) {
-	 /* A function definition doesn't interrupt our basic block
-	  * since execution doesn't go into it.  We should process the
-	  * bodies of its signatures for BBs, though.
-	  *
-	  * Note that we miss an opportunity for producing more
-	  * maximal BBs between the instructions that precede main()
-	  * and the body of main().  Perhaps those instructions ought
-	  * to live inside of main().
-	  */
-	 foreach_iter(exec_list_iterator, fun_iter, *ir_function) {
-	    ir_function_signature *ir_sig;
-
-	    ir_sig = (ir_function_signature *)fun_iter.get();
-
-	    call_for_basic_blocks(&ir_sig->body, callback, data);
-	 }
-      } else if (ir->as_assignment()) {
-	 /* If there's a call in the expression tree being assigned,
-	  * then that ends the BB too.
-	  *
-	  * The assumption is that any consumer of the basic block
-	  * walker is fine with the fact that the call is somewhere in
-	  * the tree even if portions of the tree may be evaluated
-	  * after the call.
-	  *
-	  * A consumer that has an issue with this could not process
-	  * the last instruction of the basic block.  If doing so,
-	  * expression flattener may be useful before using the basic
-	  * block finder to get more maximal basic blocks out.
-	  */
-	 if (ir_has_call(ir)) {
-	    callback(leader, ir, data);
-	    leader = NULL;
-	 }
-      }
-      last = ir;
-   }
-   if (leader) {
-      callback(leader, last, data);
-   }
-}
diff --git a/src/glsl/ir_basic_block.h b/src/glsl/ir_basic_block.h
deleted file mode 100644
index dbd678b..0000000
--- a/src/glsl/ir_basic_block.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-void call_for_basic_blocks(exec_list *instructions,
-			   void (*callback)(ir_instruction *first,
-					    ir_instruction *last,
-					    void *data),
-			   void *data);
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
deleted file mode 100644
index ad06162..0000000
--- a/src/glsl/ir_clone.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <string.h>
-#include "main/compiler.h"
-#include "ir.h"
-#include "glsl_types.h"
-extern "C" {
-#include "program/hash_table.h"
-}
-
-/**
- * Duplicate an IR variable
- *
- * \note
- * This will probably be made \c virtual and moved to the base class
- * eventually.
- */
-ir_variable *
-ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_variable *var = new(mem_ctx) ir_variable(this->type, this->name,
-					       (ir_variable_mode) this->mode);
-
-   var->max_array_access = this->max_array_access;
-   var->read_only = this->read_only;
-   var->centroid = this->centroid;
-   var->invariant = this->invariant;
-   var->interpolation = this->interpolation;
-   var->array_lvalue = this->array_lvalue;
-   var->location = this->location;
-   var->warn_extension = this->warn_extension;
-   var->origin_upper_left = this->origin_upper_left;
-   var->pixel_center_integer = this->pixel_center_integer;
-   var->explicit_location = this->explicit_location;
-   if (this->explicit_location)
-      var->location = this->location;
-
-   if (this->constant_value)
-      var->constant_value = this->constant_value->clone(mem_ctx, ht);
-
-   if (ht) {
-      hash_table_insert(ht, var, (void *)const_cast<ir_variable *>(this));
-   }
-
-   return var;
-}
-
-ir_swizzle *
-ir_swizzle::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   return new(mem_ctx) ir_swizzle(this->val->clone(mem_ctx, ht), this->mask);
-}
-
-ir_return *
-ir_return::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_rvalue *new_value = NULL;
-
-   if (this->value)
-      new_value = this->value->clone(mem_ctx, ht);
-
-   return new(mem_ctx) ir_return(new_value);
-}
-
-ir_discard *
-ir_discard::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_rvalue *new_condition = NULL;
-
-   if (this->condition != NULL)
-      new_condition = this->condition->clone(mem_ctx, ht);
-
-   return new(mem_ctx) ir_discard(new_condition);
-}
-
-ir_loop_jump *
-ir_loop_jump::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   (void)ht;
-
-   return new(mem_ctx) ir_loop_jump(this->mode);
-}
-
-ir_if *
-ir_if::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_if *new_if = new(mem_ctx) ir_if(this->condition->clone(mem_ctx, ht));
-
-   foreach_iter(exec_list_iterator, iter, this->then_instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      new_if->then_instructions.push_tail(ir->clone(mem_ctx, ht));
-   }
-
-   foreach_iter(exec_list_iterator, iter, this->else_instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      new_if->else_instructions.push_tail(ir->clone(mem_ctx, ht));
-   }
-
-   return new_if;
-}
-
-ir_loop *
-ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_loop *new_loop = new(mem_ctx) ir_loop();
-
-   if (this->from)
-      new_loop->from = this->from->clone(mem_ctx, ht);
-   if (this->to)
-      new_loop->to = this->to->clone(mem_ctx, ht);
-   if (this->increment)
-      new_loop->increment = this->increment->clone(mem_ctx, ht);
-   new_loop->counter = counter;
-
-   foreach_iter(exec_list_iterator, iter, this->body_instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht));
-   }
-
-   new_loop->cmp = this->cmp;
-   return new_loop;
-}
-
-ir_call *
-ir_call::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   if (this->type == glsl_type::error_type)
-      return ir_call::get_error_instruction(mem_ctx);
-
-   exec_list new_parameters;
-
-   foreach_iter(exec_list_iterator, iter, this->actual_parameters) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      new_parameters.push_tail(ir->clone(mem_ctx, ht));
-   }
-
-   return new(mem_ctx) ir_call(this->callee, &new_parameters);
-}
-
-ir_expression *
-ir_expression::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_rvalue *op[Elements(this->operands)] = { NULL, };
-   unsigned int i;
-
-   for (i = 0; i < get_num_operands(); i++) {
-      op[i] = this->operands[i]->clone(mem_ctx, ht);
-   }
-
-   return new(mem_ctx) ir_expression(this->operation, this->type,
-				     op[0], op[1], op[2], op[3]);
-}
-
-ir_dereference_variable *
-ir_dereference_variable::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_variable *new_var;
-
-   if (ht) {
-      new_var = (ir_variable *)hash_table_find(ht, this->var);
-      if (!new_var)
-	 new_var = this->var;
-   } else {
-      new_var = this->var;
-   }
-
-   return new(mem_ctx) ir_dereference_variable(new_var);
-}
-
-ir_dereference_array *
-ir_dereference_array::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   return new(mem_ctx) ir_dereference_array(this->array->clone(mem_ctx, ht),
-					    this->array_index->clone(mem_ctx,
-								     ht));
-}
-
-ir_dereference_record *
-ir_dereference_record::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   return new(mem_ctx) ir_dereference_record(this->record->clone(mem_ctx, ht),
-					     this->field);
-}
-
-ir_texture *
-ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_texture *new_tex = new(mem_ctx) ir_texture(this->op);
-   new_tex->type = this->type;
-
-   new_tex->sampler = this->sampler->clone(mem_ctx, ht);
-   new_tex->coordinate = this->coordinate->clone(mem_ctx, ht);
-   if (this->projector)
-      new_tex->projector = this->projector->clone(mem_ctx, ht);
-   if (this->shadow_comparitor) {
-      new_tex->shadow_comparitor = this->shadow_comparitor->clone(mem_ctx, ht);
-   }
-
-   for (int i = 0; i < 3; i++)
-      new_tex->offsets[i] = this->offsets[i];
-
-   switch (this->op) {
-   case ir_tex:
-      break;
-   case ir_txb:
-      new_tex->lod_info.bias = this->lod_info.bias->clone(mem_ctx, ht);
-      break;
-   case ir_txl:
-   case ir_txf:
-      new_tex->lod_info.lod = this->lod_info.lod->clone(mem_ctx, ht);
-      break;
-   case ir_txd:
-      new_tex->lod_info.grad.dPdx = this->lod_info.grad.dPdx->clone(mem_ctx, ht);
-      new_tex->lod_info.grad.dPdy = this->lod_info.grad.dPdy->clone(mem_ctx, ht);
-      break;
-   }
-
-   return new_tex;
-}
-
-ir_assignment *
-ir_assignment::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_rvalue *new_condition = NULL;
-
-   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_function *
-ir_function::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_function *copy = new(mem_ctx) ir_function(this->name);
-
-   foreach_list_const(node, &this->signatures) {
-      const ir_function_signature *const sig =
-	 (const ir_function_signature *const) node;
-
-      ir_function_signature *sig_copy = sig->clone(mem_ctx, ht);
-      copy->add_signature(sig_copy);
-
-      if (ht != NULL)
-	 hash_table_insert(ht, sig_copy,
-			   (void *)const_cast<ir_function_signature *>(sig));
-   }
-
-   return copy;
-}
-
-ir_function_signature *
-ir_function_signature::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_function_signature *copy = this->clone_prototype(mem_ctx, ht);
-
-   copy->is_defined = this->is_defined;
-
-   /* Clone the instruction list.
-    */
-   foreach_list_const(node, &this->body) {
-      const ir_instruction *const inst = (const ir_instruction *) node;
-
-      ir_instruction *const inst_copy = inst->clone(mem_ctx, ht);
-      copy->body.push_tail(inst_copy);
-   }
-
-   return copy;
-}
-
-ir_function_signature *
-ir_function_signature::clone_prototype(void *mem_ctx, struct hash_table *ht) const
-{
-   ir_function_signature *copy =
-      new(mem_ctx) ir_function_signature(this->return_type);
-
-   copy->is_defined = false;
-   copy->is_builtin = this->is_builtin;
-
-   /* Clone the parameter list, but NOT the body.
-    */
-   foreach_list_const(node, &this->parameters) {
-      const ir_variable *const param = (const ir_variable *) node;
-
-      assert(const_cast<ir_variable *>(param)->as_variable() != NULL);
-
-      ir_variable *const param_copy = param->clone(mem_ctx, ht);
-      copy->parameters.push_tail(param_copy);
-   }
-
-   return copy;
-}
-
-ir_constant *
-ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
-{
-   (void)ht;
-
-   switch (this->type->base_type) {
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-   case GLSL_TYPE_FLOAT:
-   case GLSL_TYPE_BOOL:
-      return new(mem_ctx) ir_constant(this->type, &this->value);
-
-   case GLSL_TYPE_STRUCT: {
-      ir_constant *c = new(mem_ctx) ir_constant;
-
-      c->type = this->type;
-      for (exec_node *node = this->components.head
-	      ; !node->is_tail_sentinel()
-	      ; node = node->next) {
-	 ir_constant *const orig = (ir_constant *) node;
-
-	 c->components.push_tail(orig->clone(mem_ctx, NULL));
-      }
-
-      return c;
-   }
-
-   case GLSL_TYPE_ARRAY: {
-      ir_constant *c = new(mem_ctx) ir_constant;
-
-      c->type = this->type;
-      c->array_elements = hieralloc_array(c, ir_constant *, this->type->length);
-      for (unsigned i = 0; i < this->type->length; i++) {
-	 c->array_elements[i] = this->array_elements[i]->clone(mem_ctx, NULL);
-      }
-      return c;
-   }
-
-   default:
-      assert(!"Should not get here.");
-      return NULL;
-   }
-}
-
-
-class fixup_ir_call_visitor : public ir_hierarchical_visitor {
-public:
-   fixup_ir_call_visitor(struct hash_table *ht)
-   {
-      this->ht = ht;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_call *ir)
-   {
-      /* Try to find the function signature referenced by the ir_call in the
-       * table.  If it is found, replace it with the value from the table.
-       */
-      ir_function_signature *sig =
-	 (ir_function_signature *) hash_table_find(this->ht, ir->get_callee());
-      if (sig != NULL)
-	 ir->set_callee(sig);
-
-      /* Since this may be used before function call parameters are flattened,
-       * the children also need to be processed.
-       */
-      return visit_continue;
-   }
-
-private:
-   struct hash_table *ht;
-};
-
-
-static void
-fixup_function_calls(struct hash_table *ht, exec_list *instructions)
-{
-   fixup_ir_call_visitor v(ht);
-   v.run(instructions);
-}
-
-
-void
-clone_ir_list(void *mem_ctx, exec_list *out, const exec_list *in)
-{
-   struct hash_table *ht =
-      hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare);
-
-   foreach_list_const(node, in) {
-      const ir_instruction *const original = (ir_instruction *) node;
-      ir_instruction *copy = original->clone(mem_ctx, ht);
-
-      out->push_tail(copy);
-   }
-
-   /* Make a pass over the cloned tree to fix up ir_call nodes to point to the
-    * cloned ir_function_signature nodes.  This cannot be done automatically
-    * during cloning because the ir_call might be a forward reference (i.e.,
-    * the function signature that it references may not have been cloned yet).
-    */
-   fixup_function_calls(ht, out);
-
-   hash_table_dtor(ht);
-}
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
deleted file mode 100644
index 15a64c5..0000000
--- a/src/glsl/ir_constant_expression.cpp
+++ /dev/null
@@ -1,1355 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_constant_expression.cpp
- * Evaluate and process constant valued expressions
- *
- * In GLSL, constant valued expressions are used in several places.  These
- * must be processed and evaluated very early in the compilation process.
- *
- *    * Sizes of arrays
- *    * Initializers for uniforms
- *    * Initializers for \c const variables
- */
-
-#include <math.h>
-#include <cmath>
-#include "main/core.h" /* for MAX2, MIN2, CLAMP */
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
-
-static float
-dot(ir_constant *op0, ir_constant *op1)
-{
-   assert(op0->type->is_float() && op1->type->is_float());
-
-   float result = 0;
-   for (unsigned c = 0; c < op0->type->components(); c++)
-      result += op0->value.f[c] * op1->value.f[c];
-
-   return result;
-}
-
-ir_constant *
-ir_expression::constant_expression_value()
-{
-   if (this->type->is_error())
-      return NULL;
-
-   ir_constant *op[Elements(this->operands)] = { NULL, };
-   ir_constant_data data;
-
-   memset(&data, 0, sizeof(data));
-
-   for (unsigned operand = 0; operand < this->get_num_operands(); operand++) {
-      op[operand] = this->operands[operand]->constant_expression_value();
-      if (!op[operand])
-	 return NULL;
-   }
-
-   if (op[1] != NULL)
-      assert(op[0]->type->base_type == op[1]->type->base_type);
-
-   bool op0_scalar = op[0]->type->is_scalar();
-   bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar();
-
-   /* When iterating over a vector or matrix's components, we want to increase
-    * the loop counter.  However, for scalars, we want to stay at 0.
-    */
-   unsigned c0_inc = op0_scalar ? 0 : 1;
-   unsigned c1_inc = op1_scalar ? 0 : 1;
-   unsigned components;
-   if (op1_scalar || !op[1]) {
-      components = op[0]->type->components();
-   } else {
-      components = op[1]->type->components();
-   }
-
-   void *ctx = hieralloc_parent(this);
-
-   /* Handle array operations here, rather than below. */
-   if (op[0]->type->is_array()) {
-      assert(op[1] != NULL && op[1]->type->is_array());
-      switch (this->operation) {
-      case ir_binop_all_equal:
-	 return new(ctx) ir_constant(op[0]->has_value(op[1]));
-      case ir_binop_any_nequal:
-	 return new(ctx) ir_constant(!op[0]->has_value(op[1]));
-      default:
-	 break;
-      }
-      return NULL;
-   }
-
-   switch (this->operation) {
-   case ir_unop_bit_not:
-       switch (op[0]->type->base_type) {
-       case GLSL_TYPE_INT:
-           for (unsigned c = 0; c < components; c++)
-               data.i[c] = ~ op[0]->value.i[c];
-           break;
-       case GLSL_TYPE_UINT:
-           for (unsigned c = 0; c < components; c++)
-               data.u[c] = ~ op[0]->value.u[c];
-           break;
-       default:
-           assert(0);
-       }
-       break;
-
-   case ir_unop_logic_not:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.b[c] = !op[0]->value.b[c];
-      break;
-
-   case ir_unop_f2i:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.i[c] = (int) op[0]->value.f[c];
-      }
-      break;
-   case ir_unop_i2f:
-      assert(op[0]->type->base_type == GLSL_TYPE_INT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = (float) op[0]->value.i[c];
-      }
-      break;
-   case ir_unop_u2f:
-      assert(op[0]->type->base_type == GLSL_TYPE_UINT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = (float) op[0]->value.u[c];
-      }
-      break;
-   case ir_unop_b2f:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = op[0]->value.b[c] ? 1.0F : 0.0F;
-      }
-      break;
-   case ir_unop_f2b:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.b[c] = op[0]->value.f[c] != 0.0F ? true : false;
-      }
-      break;
-   case ir_unop_b2i:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.u[c] = op[0]->value.b[c] ? 1 : 0;
-      }
-      break;
-   case ir_unop_i2b:
-      assert(op[0]->type->is_integer());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.b[c] = op[0]->value.u[c] ? true : false;
-      }
-      break;
-
-   case ir_unop_any:
-      assert(op[0]->type->is_boolean());
-      data.b[0] = false;
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 if (op[0]->value.b[c])
-	    data.b[0] = true;
-      }
-      break;
-
-   case ir_unop_trunc:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = truncf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_ceil:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = ceilf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_floor:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = floorf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_fract:
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = 0;
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = 0;
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = op[0]->value.f[c] - floor(op[0]->value.f[c]);
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_unop_sin:
-   case ir_unop_sin_reduced:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = sinf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_cos:
-   case ir_unop_cos_reduced:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = cosf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_neg:
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = -((int) op[0]->value.u[c]);
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = -op[0]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = -op[0]->value.f[c];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_unop_abs:
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[0]->value.i[c];
-	    if (data.i[c] < 0)
-	       data.i[c] = -data.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = fabs(op[0]->value.f[c]);
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_unop_sign:
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.i[c] > 0;
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = (op[0]->value.i[c] > 0) - (op[0]->value.i[c] < 0);
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = float((op[0]->value.f[c] > 0)-(op[0]->value.f[c] < 0));
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_unop_rcp:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    if (op[0]->value.u[c] != 0.0)
-	       data.u[c] = 1 / op[0]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    if (op[0]->value.i[c] != 0.0)
-	       data.i[c] = 1 / op[0]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    if (op[0]->value.f[c] != 0.0)
-	       data.f[c] = 1.0F / op[0]->value.f[c];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_unop_rsq:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = 1.0F / sqrtf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_sqrt:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = sqrtf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_exp:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = expf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_exp2:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = exp2f(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_log:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = logf(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_log2:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = log(op[0]->value.f[c]);
-      }
-      break;
-
-   case ir_unop_dFdx:
-   case ir_unop_dFdy:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = 0.0;
-      }
-      break;
-
-   case ir_binop_pow:
-      assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 data.f[c] = powf(op[0]->value.f[c], op[1]->value.f[c]);
-      }
-      break;
-
-   case ir_binop_dot:
-      data.f[0] = dot(op[0], op[1]);
-      break;
-
-   case ir_binop_min:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = MIN2(op[0]->value.u[c0], op[1]->value.u[c1]);
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = MIN2(op[0]->value.i[c0], op[1]->value.i[c1]);
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = MIN2(op[0]->value.f[c0], op[1]->value.f[c1]);
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-
-      break;
-   case ir_binop_max:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = MAX2(op[0]->value.u[c0], op[1]->value.u[c1]);
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = MAX2(op[0]->value.i[c0], op[1]->value.i[c1]);
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = MAX2(op[0]->value.f[c0], op[1]->value.f[c1]);
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   case ir_binop_add:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.u[c0] + op[1]->value.u[c1];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[0]->value.i[c0] + op[1]->value.i[c1];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = op[0]->value.f[c0] + op[1]->value.f[c1];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-
-      break;
-   case ir_binop_sub:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.u[c0] - op[1]->value.u[c1];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[0]->value.i[c0] - op[1]->value.i[c1];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = op[0]->value.f[c0] - op[1]->value.f[c1];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-
-      break;
-   case ir_binop_mul:
-      /* Check for equal types, or unequal types involving scalars */
-      if ((op[0]->type == op[1]->type && !op[0]->type->is_matrix())
-	  || op0_scalar || op1_scalar) {
-	 for (unsigned c = 0, c0 = 0, c1 = 0;
-	      c < components;
-	      c0 += c0_inc, c1 += c1_inc, c++) {
-
-	    switch (op[0]->type->base_type) {
-	    case GLSL_TYPE_UINT:
-	       data.u[c] = op[0]->value.u[c0] * op[1]->value.u[c1];
-	       break;
-	    case GLSL_TYPE_INT:
-	       data.i[c] = op[0]->value.i[c0] * op[1]->value.i[c1];
-	       break;
-	    case GLSL_TYPE_FLOAT:
-	       data.f[c] = op[0]->value.f[c0] * op[1]->value.f[c1];
-	       break;
-	    default:
-	       assert(0);
-	    }
-	 }
-      } else {
-	 assert(op[0]->type->is_matrix() || op[1]->type->is_matrix());
-
-	 /* Multiply an N-by-M matrix with an M-by-P matrix.  Since either
-	  * matrix can be a GLSL vector, either N or P can be 1.
-	  *
-	  * For vec*mat, the vector is treated as a row vector.  This
-	  * means the vector is a 1-row x M-column matrix.
-	  *
-	  * For mat*vec, the vector is treated as a column vector.  Since
-	  * matrix_columns is 1 for vectors, this just works.
-	  */
-	 const unsigned n = op[0]->type->is_vector()
-	    ? 1 : op[0]->type->vector_elements;
-	 const unsigned m = op[1]->type->vector_elements;
-	 const unsigned p = op[1]->type->matrix_columns;
-	 for (unsigned j = 0; j < p; j++) {
-	    for (unsigned i = 0; i < n; i++) {
-	       for (unsigned k = 0; k < m; k++) {
-		  data.f[i+n*j] += op[0]->value.f[i+n*k]*op[1]->value.f[k+m*j];
-	       }
-	    }
-	 }
-      }
-
-      break;
-   case ir_binop_div:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.u[c0] / op[1]->value.u[c1];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[0]->value.i[c0] / op[1]->value.i[c1];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = op[0]->value.f[c0] / op[1]->value.f[c1];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-
-      break;
-   case ir_binop_mod:
-      assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-	   c < components;
-	   c0 += c0_inc, c1 += c1_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[0]->value.u[c0] % op[1]->value.u[c1];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[0]->value.i[c0] % op[1]->value.i[c1];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    /* We don't use fmod because it rounds toward zero; GLSL specifies
-	     * the use of floor.
-	     */
-	    data.f[c] = op[0]->value.f[c0] - op[1]->value.f[c1]
-	       * floorf(op[0]->value.f[c0] / op[1]->value.f[c1]);
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-
-      break;
-
-   case ir_binop_logic_and:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.b[c] = op[0]->value.b[c] && op[1]->value.b[c];
-      break;
-   case ir_binop_logic_xor:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.b[c] = op[0]->value.b[c] ^ op[1]->value.b[c];
-      break;
-   case ir_binop_logic_or:
-      assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.b[c] = op[0]->value.b[c] || op[1]->value.b[c];
-      break;
-
-   case ir_binop_less:
-      assert(op[0]->type == op[1]->type);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[0] = op[0]->value.u[0] < op[1]->value.u[0];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[0] = op[0]->value.i[0] < op[1]->value.i[0];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[0] = op[0]->value.f[0] < op[1]->value.f[0];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_greater:
-      assert(op[0]->type == op[1]->type);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] > op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] > op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] > op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_lequal:
-      assert(op[0]->type == op[1]->type);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[0] = op[0]->value.u[0] <= op[1]->value.u[0];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[0] = op[0]->value.i[0] <= op[1]->value.i[0];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[0] = op[0]->value.f[0] <= op[1]->value.f[0];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_gequal:
-      assert(op[0]->type == op[1]->type);
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[0] = op[0]->value.u[0] >= op[1]->value.u[0];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[0] = op[0]->value.i[0] >= op[1]->value.i[0];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[0] = op[0]->value.f[0] >= op[1]->value.f[0];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_equal:
-      assert(op[0]->type == op[1]->type);
-      for (unsigned c = 0; c < components; c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] == op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] == op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] == op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_nequal:
-      assert(op[0]->type != op[1]->type);
-      for (unsigned c = 0; c < components; c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] != op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] != op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] != op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-   case ir_binop_all_equal:
-      data.b[0] = op[0]->has_value(op[1]);
-      break;
-   case ir_binop_any_nequal:
-      data.b[0] = !op[0]->has_value(op[1]);
-      break;
-
-   case ir_binop_lshift:
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-           c < components;
-           c0 += c0_inc, c1 += c1_inc, c++) {
-
-          if (op[0]->type->base_type == GLSL_TYPE_INT &&
-              op[1]->type->base_type == GLSL_TYPE_INT) {
-              data.i[c] = op[0]->value.i[c0] << op[1]->value.i[c1];
-
-          } else if (op[0]->type->base_type == GLSL_TYPE_INT &&
-                     op[1]->type->base_type == GLSL_TYPE_UINT) {
-              data.i[c] = op[0]->value.i[c0] << op[1]->value.u[c1];
-
-          } else if (op[0]->type->base_type == GLSL_TYPE_UINT &&
-                     op[1]->type->base_type == GLSL_TYPE_INT) {
-              data.u[c] = op[0]->value.u[c0] << op[1]->value.i[c1];
-
-          } else if (op[0]->type->base_type == GLSL_TYPE_UINT &&
-                     op[1]->type->base_type == GLSL_TYPE_UINT) {
-              data.u[c] = op[0]->value.u[c0] << op[1]->value.u[c1];
-          }
-      }
-      break;
-
-   case ir_binop_rshift:
-       for (unsigned c = 0, c0 = 0, c1 = 0;
-            c < components;
-            c0 += c0_inc, c1 += c1_inc, c++) {
-
-           if (op[0]->type->base_type == GLSL_TYPE_INT &&
-               op[1]->type->base_type == GLSL_TYPE_INT) {
-               data.i[c] = op[0]->value.i[c0] >> op[1]->value.i[c1];
-
-           } else if (op[0]->type->base_type == GLSL_TYPE_INT &&
-                      op[1]->type->base_type == GLSL_TYPE_UINT) {
-               data.i[c] = op[0]->value.i[c0] >> op[1]->value.u[c1];
-
-           } else if (op[0]->type->base_type == GLSL_TYPE_UINT &&
-                      op[1]->type->base_type == GLSL_TYPE_INT) {
-               data.u[c] = op[0]->value.u[c0] >> op[1]->value.i[c1];
-
-           } else if (op[0]->type->base_type == GLSL_TYPE_UINT &&
-                      op[1]->type->base_type == GLSL_TYPE_UINT) {
-               data.u[c] = op[0]->value.u[c0] >> op[1]->value.u[c1];
-           }
-       }
-       break;
-
-   case ir_binop_bit_and:
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-           c < components;
-           c0 += c0_inc, c1 += c1_inc, c++) {
-
-          switch (op[0]->type->base_type) {
-          case GLSL_TYPE_INT:
-              data.i[c] = op[0]->value.i[c0] & op[1]->value.i[c1];
-              break;
-          case GLSL_TYPE_UINT:
-              data.u[c] = op[0]->value.u[c0] & op[1]->value.u[c1];
-              break;
-          default:
-              assert(0);
-          }
-      }
-      break;
-
-   case ir_binop_bit_or:
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-           c < components;
-           c0 += c0_inc, c1 += c1_inc, c++) {
-
-          switch (op[0]->type->base_type) {
-          case GLSL_TYPE_INT:
-              data.i[c] = op[0]->value.i[c0] | op[1]->value.i[c1];
-              break;
-          case GLSL_TYPE_UINT:
-              data.u[c] = op[0]->value.u[c0] | op[1]->value.u[c1];
-              break;
-          default:
-              assert(0);
-          }
-      }
-      break;
-
-   case ir_binop_bit_xor:
-      for (unsigned c = 0, c0 = 0, c1 = 0;
-           c < components;
-           c0 += c0_inc, c1 += c1_inc, c++) {
-
-          switch (op[0]->type->base_type) {
-          case GLSL_TYPE_INT:
-              data.i[c] = op[0]->value.i[c0] ^ op[1]->value.i[c1];
-              break;
-          case GLSL_TYPE_UINT:
-              data.u[c] = op[0]->value.u[c0] ^ op[1]->value.u[c1];
-              break;
-          default:
-              assert(0);
-          }
-      }
-      break;
-
-   case ir_quadop_vector:
-      for (unsigned c = 0; c < this->type->vector_elements; c++) {
-	 switch (this->type->base_type) {
-	 case GLSL_TYPE_INT:
-	    data.i[c] = op[c]->value.i[0];
-	    break;
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = op[c]->value.u[0];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = op[c]->value.f[0];
-	    break;
-	 default:
-	    assert(0);
-	 }
-      }
-      break;
-
-   default:
-      /* FINISHME: Should handle all expression types. */
-      return NULL;
-   }
-
-   return new(ctx) ir_constant(this->type, &data);
-}
-
-
-ir_constant *
-ir_texture::constant_expression_value()
-{
-   /* texture lookups aren't constant expressions */
-   return NULL;
-}
-
-
-ir_constant *
-ir_swizzle::constant_expression_value()
-{
-   ir_constant *v = this->val->constant_expression_value();
-
-   if (v != NULL) {
-      ir_constant_data data = { { 0 } };
-
-      const unsigned swiz_idx[4] = {
-	 this->mask.x, this->mask.y, this->mask.z, this->mask.w
-      };
-
-      for (unsigned i = 0; i < this->mask.num_components; i++) {
-	 switch (v->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	 case GLSL_TYPE_INT:   data.u[i] = v->value.u[swiz_idx[i]]; break;
-	 case GLSL_TYPE_FLOAT: data.f[i] = v->value.f[swiz_idx[i]]; break;
-	 case GLSL_TYPE_BOOL:  data.b[i] = v->value.b[swiz_idx[i]]; break;
-	 default:              assert(!"Should not get here."); break;
-	 }
-      }
-
-      void *ctx = hieralloc_parent(this);
-      return new(ctx) ir_constant(this->type, &data);
-   }
-   return NULL;
-}
-
-
-ir_constant *
-ir_dereference_variable::constant_expression_value()
-{
-   /* This may occur during compile and var->type is glsl_type::error_type */
-   if (!var)
-      return NULL;
-
-   /* The constant_value of a uniform variable is its initializer,
-    * not the lifetime constant value of the uniform.
-    */
-   if (var->mode == ir_var_uniform)
-      return NULL;
-
-   if (!var->constant_value)
-      return NULL;
-
-   return var->constant_value->clone(hieralloc_parent(var), NULL);
-}
-
-
-ir_constant *
-ir_dereference_array::constant_expression_value()
-{
-   ir_constant *array = this->array->constant_expression_value();
-   ir_constant *idx = this->array_index->constant_expression_value();
-
-   if ((array != NULL) && (idx != NULL)) {
-      void *ctx = hieralloc_parent(this);
-      if (array->type->is_matrix()) {
-	 /* Array access of a matrix results in a vector.
-	  */
-	 const unsigned column = idx->value.u[0];
-
-	 const glsl_type *const column_type = array->type->column_type();
-
-	 /* Offset in the constant matrix to the first element of the column
-	  * to be extracted.
-	  */
-	 const unsigned mat_idx = column * column_type->vector_elements;
-
-	 ir_constant_data data = { { 0 } };
-
-	 switch (column_type->base_type) {
-	 case GLSL_TYPE_UINT:
-	 case GLSL_TYPE_INT:
-	    for (unsigned i = 0; i < column_type->vector_elements; i++)
-	       data.u[i] = array->value.u[mat_idx + i];
-
-	    break;
-
-	 case GLSL_TYPE_FLOAT:
-	    for (unsigned i = 0; i < column_type->vector_elements; i++)
-	       data.f[i] = array->value.f[mat_idx + i];
-
-	    break;
-
-	 default:
-	    assert(!"Should not get here.");
-	    break;
-	 }
-
-	 return new(ctx) ir_constant(column_type, &data);
-      } else if (array->type->is_vector()) {
-	 const unsigned component = idx->value.u[0];
-
-	 return new(ctx) ir_constant(array, component);
-      } else {
-	 const unsigned index = idx->value.u[0];
-	 return array->get_array_element(index)->clone(ctx, NULL);
-      }
-   }
-   return NULL;
-}
-
-
-ir_constant *
-ir_dereference_record::constant_expression_value()
-{
-   ir_constant *v = this->record->constant_expression_value();
-
-   return (v != NULL) ? v->get_record_field(this->field) : NULL;
-}
-
-
-ir_constant *
-ir_assignment::constant_expression_value()
-{
-   /* FINISHME: Handle CEs involving assignment (return RHS) */
-   return NULL;
-}
-
-
-ir_constant *
-ir_constant::constant_expression_value()
-{
-   return this;
-}
-
-
-ir_constant *
-ir_call::constant_expression_value()
-{
-   if (this->type == glsl_type::error_type)
-      return NULL;
-
-   /* From the GLSL 1.20 spec, page 23:
-    * "Function calls to user-defined functions (non-built-in functions)
-    *  cannot be used to form constant expressions."
-    */
-   if (!this->callee->is_builtin)
-      return NULL;
-
-   unsigned num_parameters = 0;
-
-   /* Check if all parameters are constant */
-   ir_constant *op[3];
-   foreach_list(n, &this->actual_parameters) {
-      ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value();
-      if (constant == NULL)
-	 return NULL;
-
-      op[num_parameters] = constant;
-
-      assert(num_parameters < 3);
-      num_parameters++;
-   }
-
-   /* Individual cases below can either:
-    * - Assign "expr" a new ir_expression to evaluate (for basic opcodes)
-    * - Fill "data" with appopriate constant data
-    * - Return an ir_constant directly.
-    */
-   void *mem_ctx = hieralloc_parent(this);
-   ir_expression *expr = NULL;
-
-   ir_constant_data data;
-   memset(&data, 0, sizeof(data));
-
-   const char *callee = this->callee_name();
-   if (strcmp(callee, "abs") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL);
-   } else if (strcmp(callee, "all") == 0) {
-      assert(op[0]->type->is_boolean());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 if (!op[0]->value.b[c])
-	    return new(mem_ctx) ir_constant(false);
-      }
-      return new(mem_ctx) ir_constant(true);
-   } else if (strcmp(callee, "any") == 0) {
-      assert(op[0]->type->is_boolean());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 if (op[0]->value.b[c])
-	    return new(mem_ctx) ir_constant(true);
-      }
-      return new(mem_ctx) ir_constant(false);
-   } else if (strcmp(callee, "acos") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = acosf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "acosh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = acoshf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "asin") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = asinf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "asinh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = asinhf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "atan") == 0) {
-      assert(op[0]->type->is_float());
-      if (num_parameters == 2) {
-	 assert(op[1]->type->is_float());
-	 for (unsigned c = 0; c < op[0]->type->components(); c++)
-	    data.f[c] = atan2f(op[0]->value.f[c], op[1]->value.f[c]);
-      } else {
-	 for (unsigned c = 0; c < op[0]->type->components(); c++)
-	    data.f[c] = atanf(op[0]->value.f[c]);
-      }
-   } else if (strcmp(callee, "atanh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = atanhf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "dFdx") == 0 || strcmp(callee, "dFdy") == 0) {
-      return ir_constant::zero(mem_ctx, this->type);
-   } else if (strcmp(callee, "ceil") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL);
-   } else if (strcmp(callee, "clamp") == 0) {
-      assert(num_parameters == 3);
-      unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1;
-      unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1;
-      for (unsigned c = 0, c1 = 0, c2 = 0;
-	   c < op[0]->type->components();
-	   c1 += c1_inc, c2 += c2_inc, c++) {
-
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.u[c] = CLAMP(op[0]->value.u[c], op[1]->value.u[c1],
-			      op[2]->value.u[c2]);
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.i[c] = CLAMP(op[0]->value.i[c], op[1]->value.i[c1],
-			      op[2]->value.i[c2]);
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.f[c] = CLAMP(op[0]->value.f[c], op[1]->value.f[c1],
-			      op[2]->value.f[c2]);
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "cos") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL);
-   } else if (strcmp(callee, "cosh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = coshf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "cross") == 0) {
-      assert(op[0]->type == glsl_type::vec3_type);
-      assert(op[1]->type == glsl_type::vec3_type);
-      data.f[0] = (op[0]->value.f[1] * op[1]->value.f[2] -
-		   op[1]->value.f[1] * op[0]->value.f[2]);
-      data.f[1] = (op[0]->value.f[2] * op[1]->value.f[0] -
-		   op[1]->value.f[2] * op[0]->value.f[0]);
-      data.f[2] = (op[0]->value.f[0] * op[1]->value.f[1] -
-		   op[1]->value.f[0] * op[0]->value.f[1]);
-   } else if (strcmp(callee, "degrees") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = 180.0F / M_PI * op[0]->value.f[c];
-   } else if (strcmp(callee, "distance") == 0) {
-      assert(op[0]->type->is_float() && op[1]->type->is_float());
-      float length_squared = 0.0;
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 float t = op[0]->value.f[c] - op[1]->value.f[c];
-	 length_squared += t * t;
-      }
-      return new(mem_ctx) ir_constant(sqrtf(length_squared));
-   } else if (strcmp(callee, "dot") == 0) {
-      return new(mem_ctx) ir_constant(dot(op[0], op[1]));
-   } else if (strcmp(callee, "equal") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] == op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] == op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] == op[1]->value.f[c];
-	    break;
-	 case GLSL_TYPE_BOOL:
-	    data.b[c] = op[0]->value.b[c] == op[1]->value.b[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "exp") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL);
-   } else if (strcmp(callee, "exp2") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL);
-   } else if (strcmp(callee, "faceforward") == 0) {
-      if (dot(op[2], op[1]) < 0)
-	 return op[0];
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = -op[0]->value.f[c];
-   } else if (strcmp(callee, "floor") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL);
-   } else if (strcmp(callee, "fract") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL);
-   } else if (strcmp(callee, "fwidth") == 0) {
-      return ir_constant::zero(mem_ctx, this->type);
-   } else if (strcmp(callee, "greaterThan") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] > op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] > op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] > op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "greaterThanEqual") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] >= op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] >= op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] >= op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "inversesqrt") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL);
-   } else if (strcmp(callee, "length") == 0) {
-      return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0])));
-   } else if (strcmp(callee, "lessThan") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] < op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] < op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] < op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "lessThanEqual") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] <= op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] <= op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] <= op[1]->value.f[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "log") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL);
-   } else if (strcmp(callee, "log2") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL);
-   } else if (strcmp(callee, "matrixCompMult") == 0) {
-      assert(op[0]->type->is_float() && op[1]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = op[0]->value.f[c] * op[1]->value.f[c];
-   } else if (strcmp(callee, "max") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]);
-   } else if (strcmp(callee, "min") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]);
-   } else if (strcmp(callee, "mix") == 0) {
-      assert(op[0]->type->is_float() && op[1]->type->is_float());
-      if (op[2]->type->is_float()) {
-	 unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1;
-	 unsigned components = op[0]->type->components();
-	 for (unsigned c = 0, c2 = 0; c < components; c2 += c2_inc, c++) {
-	    data.f[c] = op[0]->value.f[c] * (1 - op[2]->value.f[c2]) +
-			op[1]->value.f[c] * op[2]->value.f[c2];
-	 }
-      } else {
-	 assert(op[2]->type->is_boolean());
-	 for (unsigned c = 0; c < op[0]->type->components(); c++)
-	    data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c];
-      }
-   } else if (strcmp(callee, "mod") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]);
-   } else if (strcmp(callee, "normalize") == 0) {
-      assert(op[0]->type->is_float());
-      float length = sqrtf(dot(op[0], op[0]));
-
-      if (length == 0)
-	 return ir_constant::zero(mem_ctx, this->type);
-
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = op[0]->value.f[c] / length;
-   } else if (strcmp(callee, "not") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL);
-   } else if (strcmp(callee, "notEqual") == 0) {
-      assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector());
-      for (unsigned c = 0; c < op[0]->type->components(); c++) {
-	 switch (op[0]->type->base_type) {
-	 case GLSL_TYPE_UINT:
-	    data.b[c] = op[0]->value.u[c] != op[1]->value.u[c];
-	    break;
-	 case GLSL_TYPE_INT:
-	    data.b[c] = op[0]->value.i[c] != op[1]->value.i[c];
-	    break;
-	 case GLSL_TYPE_FLOAT:
-	    data.b[c] = op[0]->value.f[c] != op[1]->value.f[c];
-	    break;
-	 case GLSL_TYPE_BOOL:
-	    data.b[c] = op[0]->value.b[c] != op[1]->value.b[c];
-	    break;
-	 default:
-	    assert(!"Should not get here.");
-	 }
-      }
-   } else if (strcmp(callee, "outerProduct") == 0) {
-      assert(op[0]->type->is_vector() && op[1]->type->is_vector());
-      const unsigned m = op[0]->type->vector_elements;
-      const unsigned n = op[1]->type->vector_elements;
-      for (unsigned j = 0; j < n; j++) {
-	 for (unsigned i = 0; i < m; i++) {
-	    data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j];
-	 }
-      }
-   } else if (strcmp(callee, "pow") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]);
-   } else if (strcmp(callee, "radians") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = M_PI / 180.0F * op[0]->value.f[c];
-   } else if (strcmp(callee, "reflect") == 0) {
-      assert(op[0]->type->is_float());
-      float dot_NI = dot(op[1], op[0]);
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c];
-   } else if (strcmp(callee, "refract") == 0) {
-      const float eta = op[2]->value.f[0];
-      const float dot_NI = dot(op[1], op[0]);
-      const float k = 1.0F - eta * eta * (1.0F - dot_NI * dot_NI);
-      if (k < 0.0) {
-	 return ir_constant::zero(mem_ctx, this->type);
-      } else {
-	 for (unsigned c = 0; c < type->components(); c++) {
-	    data.f[c] = eta * op[0]->value.f[c] - (eta * dot_NI + sqrtf(k))
-			    * op[1]->value.f[c];
-	 }
-      }
-   } else if (strcmp(callee, "sign") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL);
-   } else if (strcmp(callee, "sin") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL);
-   } else if (strcmp(callee, "sinh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = sinhf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "smoothstep") == 0) {
-      assert(num_parameters == 3);
-      assert(op[1]->type == op[0]->type);
-      unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1;
-      for (unsigned c = 0, e = 0; c < type->components(); e += edge_inc, c++) {
-	 const float edge0 = op[0]->value.f[e];
-	 const float edge1 = op[1]->value.f[e];
-	 if (edge0 == edge1) {
-	    data.f[c] = 0.0; /* Avoid a crash - results are undefined anyway */
-	 } else {
-	    const float numerator = op[2]->value.f[c] - edge0;
-	    const float denominator = edge1 - edge0;
-	    const float t = CLAMP(numerator/denominator, 0, 1);
-	    data.f[c] = t * t * (3 - 2 * t);
-	 }
-      }
-   } else if (strcmp(callee, "sqrt") == 0) {
-      expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL);
-   } else if (strcmp(callee, "step") == 0) {
-      assert(op[0]->type->is_float() && op[1]->type->is_float());
-      /* op[0] (edge) may be either a scalar or a vector */
-      const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1;
-      for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++)
-	 data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0F : 1.0F;
-   } else if (strcmp(callee, "tan") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = tanf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "tanh") == 0) {
-      assert(op[0]->type->is_float());
-      for (unsigned c = 0; c < op[0]->type->components(); c++)
-	 data.f[c] = tanhf(op[0]->value.f[c]);
-   } else if (strcmp(callee, "transpose") == 0) {
-      assert(op[0]->type->is_matrix());
-      const unsigned n = op[0]->type->vector_elements;
-      const unsigned m = op[0]->type->matrix_columns;
-      for (unsigned j = 0; j < m; j++) {
-	 for (unsigned i = 0; i < n; i++) {
-	    data.f[m*i+j] += op[0]->value.f[i+n*j];
-	 }
-      }
-   } else {
-      /* Unsupported builtin - some are not allowed in constant expressions. */
-      return NULL;
-   }
-
-   if (expr != NULL)
-      return expr->constant_expression_value();
-
-   return new(mem_ctx) ir_constant(this->type, &data);
-}
diff --git a/src/glsl/ir_div_to_mul_rcp.cpp b/src/glsl/ir_div_to_mul_rcp.cpp
deleted file mode 100644
index 640d5d6..0000000
--- a/src/glsl/ir_div_to_mul_rcp.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_div_to_mul_rcp.cpp
- *
- * Breaks an ir_unop_div expression down to op0 * (rcp(op1)).
- *
- * Many GPUs don't have a divide instruction (945 and 965 included),
- * but they do have an RCP instruction to compute an approximate
- * reciprocal.  By breaking the operation down, constant reciprocals
- * can get constant folded.
- */
-
-#include "ir.h"
-#include "glsl_types.h"
-
-class ir_div_to_mul_rcp_visitor : public ir_hierarchical_visitor {
-public:
-   ir_div_to_mul_rcp_visitor()
-   {
-      this->made_progress = false;
-   }
-
-   ir_visitor_status visit_leave(ir_expression *);
-
-   bool made_progress;
-};
-
-bool
-do_div_to_mul_rcp(exec_list *instructions)
-{
-   ir_div_to_mul_rcp_visitor v;
-
-   visit_list_elements(&v, instructions);
-   return v.made_progress;
-}
-
-ir_visitor_status
-ir_div_to_mul_rcp_visitor::visit_leave(ir_expression *ir)
-{
-   if (ir->operation != ir_binop_div)
-      return visit_continue;
-
-   if (ir->operands[1]->type->base_type != GLSL_TYPE_INT &&
-       ir->operands[1]->type->base_type != GLSL_TYPE_UINT) {
-      /* New expression for the 1.0 / op1 */
-      ir_rvalue *expr;
-      expr = new(ir) ir_expression(ir_unop_rcp,
-				   ir->operands[1]->type,
-				   ir->operands[1],
-				   NULL);
-
-      /* op0 / op1 -> op0 * (1.0 / op1) */
-      ir->operation = ir_binop_mul;
-      ir->operands[1] = expr;
-   } else {
-      /* Be careful with integer division -- we need to do it as a
-       * float and re-truncate, since rcp(n > 1) of an integer would
-       * just be 0.
-       */
-      ir_rvalue *op0, *op1;
-      const struct glsl_type *vec_type;
-
-      vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
-					 ir->operands[1]->type->vector_elements,
-					 ir->operands[1]->type->matrix_columns);
-
-      if (ir->operands[1]->type->base_type == GLSL_TYPE_INT)
-	 op1 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[1], NULL);
-      else
-	 op1 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[1], NULL);
-
-      op1 = new(ir) ir_expression(ir_unop_rcp, op1->type, op1, NULL);
-
-      vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
-					 ir->operands[0]->type->vector_elements,
-					 ir->operands[0]->type->matrix_columns);
-
-      if (ir->operands[0]->type->base_type == GLSL_TYPE_INT)
-	 op0 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[0], NULL);
-      else
-	 op0 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[0], NULL);
-
-      op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1);
-
-      ir->operation = ir_unop_f2i;
-      ir->operands[0] = op0;
-      ir->operands[1] = NULL;
-   }
-
-   this->made_progress = true;
-
-   return visit_continue;
-}
diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp
deleted file mode 100644
index 65c1b0a..0000000
--- a/src/glsl/ir_expression_flattening.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_expression_flattening.cpp
- *
- * Takes the leaves of expression trees and makes them dereferences of
- * assignments of the leaves to temporaries, according to a predicate.
- *
- * This is used for automatic function inlining, where we want to take
- * an expression containing a call and move the call out to its own
- * assignment so that we can inline it at the appropriate place in the
- * instruction stream.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_expression_flattening.h"
-#include "glsl_types.h"
-
-class ir_expression_flattening_visitor : public ir_rvalue_visitor {
-public:
-   ir_expression_flattening_visitor(bool (*predicate)(ir_instruction *ir))
-   {
-      this->predicate = predicate;
-   }
-
-   virtual ~ir_expression_flattening_visitor()
-   {
-      /* empty */
-   }
-
-   void handle_rvalue(ir_rvalue **rvalue);
-   bool (*predicate)(ir_instruction *ir);
-};
-
-void
-do_expression_flattening(exec_list *instructions,
-			 bool (*predicate)(ir_instruction *ir))
-{
-   ir_expression_flattening_visitor v(predicate);
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-
-      ir->accept(&v);
-   }
-}
-
-void
-ir_expression_flattening_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   ir_variable *var;
-   ir_assignment *assign;
-   ir_rvalue *ir = *rvalue;
-
-   if (!ir || !this->predicate(ir))
-      return;
-
-   void *ctx = hieralloc_parent(ir);
-
-   var = new(ctx) ir_variable(ir->type, "flattening_tmp", ir_var_temporary);
-   base_ir->insert_before(var);
-
-   assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var),
-				   ir,
-				   NULL);
-   base_ir->insert_before(assign);
-
-   *rvalue = new(ctx) ir_dereference_variable(var);
-}
diff --git a/src/glsl/ir_expression_flattening.h b/src/glsl/ir_expression_flattening.h
deleted file mode 100644
index 2eda159..0000000
--- a/src/glsl/ir_expression_flattening.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-
-/**
- * \file ir_expression_flattening.h
- *
- * Takes the leaves of expression trees and makes them dereferences of
- * assignments of the leaves to temporaries, according to a predicate.
- *
- * This is used for automatic function inlining, where we want to take
- * an expression containing a call and move the call out to its own
- * assignment so that we can inline it at the appropriate place in the
- * instruction stream.
- */
-
-void do_expression_flattening(exec_list *instructions,
-			      bool (*predicate)(ir_instruction *ir));
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
deleted file mode 100644
index 8db7011..0000000
--- a/src/glsl/ir_function.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "glsl_types.h"
-#include "ir.h"
-
-int
-type_compare(const glsl_type *a, const glsl_type *b)
-{
-   /* If the types are the same, they trivially match.
-    */
-   if (a == b)
-      return 0;
-
-   switch (a->base_type) {
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-   case GLSL_TYPE_BOOL:
-      /* There is no implicit conversion to or from integer types or bool.
-       */
-      if ((a->is_integer() != b->is_integer())
-	  || (a->is_boolean() != b->is_boolean()))
-	 return -1;
-
-      /* FALLTHROUGH */
-
-   case GLSL_TYPE_FLOAT:
-      if ((a->vector_elements != b->vector_elements)
-	  || (a->matrix_columns != b->matrix_columns))
-	 return -1;
-
-      return 1;
-
-   case GLSL_TYPE_SAMPLER:
-   case GLSL_TYPE_STRUCT:
-      /* Samplers and structures must match exactly.
-       */
-      return -1;
-
-   case GLSL_TYPE_ARRAY:
-      if ((b->base_type != GLSL_TYPE_ARRAY)
-	  || (a->length != b->length))
-	 return -1;
-
-      /* From GLSL 1.50 spec, page 27 (page 33 of the PDF):
-       *    "There are no implicit array or structure conversions."
-       *
-       * If the comparison of the array element types detects that a conversion
-       * would be required, the array types do not match.
-       */
-      return (type_compare(a->fields.array, b->fields.array) == 0) ? 0 : -1;
-
-   case GLSL_TYPE_VOID:
-   case GLSL_TYPE_ERROR:
-   default:
-      /* These are all error conditions.  It is invalid for a parameter to
-       * a function to be declared as error, void, or a function.
-       */
-      return -1;
-   }
-
-   /* This point should be unreachable.
-    */
-   assert(0);
-}
-
-
-static int
-parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
-{
-   const exec_node *node_a = list_a->head;
-   const exec_node *node_b = list_b->head;
-   int total_score = 0;
-
-   for (/* empty */
-	; !node_a->is_tail_sentinel()
-	; node_a = node_a->next, node_b = node_b->next) {
-      /* If all of the parameters from the other parameter list have been
-       * exhausted, the lists have different length and, by definition,
-       * do not match.
-       */
-      if (node_b->is_tail_sentinel())
-	 return -1;
-
-
-      const ir_variable *const param = (ir_variable *) node_a;
-      const ir_instruction *const actual = (ir_instruction *) node_b;
-
-      /* Determine whether or not the types match.  If the types are an
-       * exact match, the match score is zero.  If the types don't match
-       * but the actual parameter can be coerced to the type of the declared
-       * parameter, the match score is one.
-       */
-      int score;
-      switch ((enum ir_variable_mode)(param->mode)) {
-      case ir_var_auto:
-      case ir_var_uniform:
-      case ir_var_temporary:
-	 /* These are all error conditions.  It is invalid for a parameter to
-	  * a function to be declared as auto (not in, out, or inout) or
-	  * as uniform.
-	  */
-	 assert(0);
-	 return -1;
-
-      case ir_var_in:
-	 score = type_compare(param->type, actual->type);
-	 break;
-
-      case ir_var_out:
-	 score = type_compare(actual->type, param->type);
-	 break;
-
-      case ir_var_inout:
-	 /* Since there are no bi-directional automatic conversions (e.g.,
-	  * there is int -> float but no float -> int), inout parameters must
-	  * be exact matches.
-	  */
-	 score = (type_compare(actual->type, param->type) == 0) ? 0 : -1;
-	 break;
-
-      default:
-	 assert(false);
-      }
-
-      if (score < 0)
-	 return -1;
-
-      total_score += score;
-   }
-
-   /* If all of the parameters from the other parameter list have been
-    * exhausted, the lists have different length and, by definition, do not
-    * match.
-    */
-   if (!node_b->is_tail_sentinel())
-      return -1;
-
-   return total_score;
-}
-
-
-ir_function_signature *
-ir_function::matching_signature(const exec_list *actual_parameters)
-{
-   ir_function_signature *match = NULL;
-
-   foreach_iter(exec_list_iterator, iter, signatures) {
-      ir_function_signature *const sig =
-	 (ir_function_signature *) iter.get();
-
-      const int score = parameter_lists_match(& sig->parameters,
-					      actual_parameters);
-
-      if (score == 0)
-	 return sig;
-
-      if (score > 0) {
-	 if (match != NULL)
-	    return NULL;
-
-	 match = sig;
-      }
-   }
-
-   return match;
-}
-
-
-static bool
-parameter_lists_match_exact(const exec_list *list_a, const exec_list *list_b)
-{
-   const exec_node *node_a = list_a->head;
-   const exec_node *node_b = list_b->head;
-
-   for (/* empty */
-	; !node_a->is_tail_sentinel() && !node_b->is_tail_sentinel()
-	; node_a = node_a->next, node_b = node_b->next) {
-      ir_variable *a = (ir_variable *) node_a;
-      ir_variable *b = (ir_variable *) node_b;
-
-      /* If the types of the parameters do not match, the parameters lists
-       * are different.
-       */
-      if (a->type != b->type)
-         return false;
-   }
-
-   /* Unless both lists are exhausted, they differ in length and, by
-    * definition, do not match.
-    */
-   return (node_a->is_tail_sentinel() == node_b->is_tail_sentinel());
-}
-
-ir_function_signature *
-ir_function::exact_matching_signature(const exec_list *actual_parameters)
-{
-   foreach_iter(exec_list_iterator, iter, signatures) {
-      ir_function_signature *const sig =
-	 (ir_function_signature *) iter.get();
-
-      if (parameter_lists_match_exact(&sig->parameters, actual_parameters))
-	 return sig;
-   }
-   return NULL;
-}
diff --git a/src/glsl/ir_function_can_inline.cpp b/src/glsl/ir_function_can_inline.cpp
deleted file mode 100644
index c367c30..0000000
--- a/src/glsl/ir_function_can_inline.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_function_can_inline.cpp
- *
- * Determines if we can inline a function call using ir_function_inlining.cpp.
- *
- * The primary restriction is that we can't return from the function
- * other than as the last instruction.  We could potentially work
- * around this for some constructs by flattening control flow and
- * moving the return to the end, or by using breaks from a do {} while
- * (0) loop surrounding the function body.
- */
-
-#include "ir.h"
-
-class ir_function_can_inline_visitor : public ir_hierarchical_visitor {
-public:
-   ir_function_can_inline_visitor()
-   {
-      this->num_returns = 0;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_return *);
-
-   int num_returns;
-};
-
-ir_visitor_status
-ir_function_can_inline_visitor::visit_enter(ir_return *ir)
-{
-   (void) ir;
-   this->num_returns++;
-   return visit_continue;
-}
-
-bool
-can_inline(ir_call *call)
-{
-   ir_function_can_inline_visitor v;
-   const ir_function_signature *callee = call->get_callee();
-   if (!callee->is_defined)
-      return false;
-
-   v.run((exec_list *) &callee->body);
-
-   /* If the function is empty (no last instruction) or does not end with a
-    * return statement, we need to count the implicit return.
-    */
-   ir_instruction *last = (ir_instruction *)callee->body.get_tail();
-   if (last == NULL || !last->as_return())
-      v.num_returns++;
-
-   return v.num_returns == 1;
-}
diff --git a/src/glsl/ir_function_inlining.h b/src/glsl/ir_function_inlining.h
deleted file mode 100644
index 6db011b..0000000
--- a/src/glsl/ir_function_inlining.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_function_inlining.h
- *
- * Replaces calls to functions with the body of the function.
- */
-
-bool can_inline(ir_call *call);
diff --git a/src/glsl/ir_hierarchical_visitor.cpp b/src/glsl/ir_hierarchical_visitor.cpp
deleted file mode 100644
index b5eacd6..0000000
--- a/src/glsl/ir_hierarchical_visitor.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "ir.h"
-#include "ir_hierarchical_visitor.h"
-
-ir_hierarchical_visitor::ir_hierarchical_visitor()
-{
-   this->base_ir = NULL;
-   this->callback = NULL;
-   this->data = NULL;
-   this->in_assignee = false;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit(ir_variable *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit(ir_constant *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit(ir_loop_jump *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit(ir_dereference_variable *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_loop *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_loop *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_function_signature *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_function_signature *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_function *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_function *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_expression *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_expression *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_texture *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_texture *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_swizzle *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_swizzle *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_dereference_array *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_dereference_array *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_dereference_record *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_dereference_record *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_assignment *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_assignment *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_call *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_call *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_return *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_return *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_discard *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_discard *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_enter(ir_if *ir)
-{
-   if (this->callback != NULL)
-      this->callback(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_hierarchical_visitor::visit_leave(ir_if *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-void
-ir_hierarchical_visitor::run(exec_list *instructions)
-{
-   visit_list_elements(this, instructions);
-}
-
-
-void
-visit_tree(ir_instruction *ir,
-	   void (*callback)(class ir_instruction *ir, void *data),
-	   void *data)
-{
-   ir_hierarchical_visitor v;
-
-   v.callback = callback;
-   v.data = data;
-
-   ir->accept(&v);
-}
diff --git a/src/glsl/ir_hierarchical_visitor.h b/src/glsl/ir_hierarchical_visitor.h
deleted file mode 100644
index 610cc65..0000000
--- a/src/glsl/ir_hierarchical_visitor.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef IR_HIERARCHICAL_VISITOR_H
-#define IR_HIERARCHICAL_VISITOR_H
-
-/**
- * Enumeration values returned by visit methods to guide processing
- */
-enum ir_visitor_status {
-   visit_continue,		/**< Continue visiting as normal. */
-   visit_continue_with_parent,	/**< Don't visit siblings, continue w/parent. */
-   visit_stop			/**< Stop visiting immediately. */
-};
-
-
-/**
- * Base class of hierarchical visitors of IR instruction trees
- *
- * Hierarchical visitors differ from traditional visitors in a couple of
- * important ways.  Rather than having a single \c visit method for each
- * subclass in the composite, there are three kinds of visit methods.
- * Leaf-node classes have a traditional \c visit method.  Internal-node
- * classes have a \c visit_enter method, which is invoked just before
- * processing child nodes, and a \c visit_leave method which is invoked just
- * after processing child nodes.
- *
- * In addition, each visit method and the \c accept methods in the composite
- * have a return value which guides the navigation.  Any of the visit methods
- * can choose to continue visiting the tree as normal (by returning \c
- * visit_continue), terminate visiting any further nodes immediately (by
- * returning \c visit_stop), or stop visiting sibling nodes (by returning \c
- * visit_continue_with_parent).
- *
- * These two changes combine to allow nagivation of children to be implemented
- * in the composite's \c accept method.  The \c accept method for a leaf-node
- * class will simply call the \c visit method, as usual, and pass its return
- * value on.  The \c accept method for internal-node classes will call the \c
- * visit_enter method, call the \c accpet method of each child node, and,
- * finally, call the \c visit_leave method.  If any of these return a value
- * other that \c visit_continue, the correct action must be taken.
- *
- * The final benefit is that the hierarchical visitor base class need not be
- * abstract.  Default implementations of every \c visit, \c visit_enter, and
- * \c visit_leave method can be provided.  By default each of these methods
- * simply returns \c visit_continue.  This allows a significant reduction in
- * derived class code.
- *
- * For more information about hierarchical visitors, see:
- *
- *    http://c2.com/cgi/wiki?HierarchicalVisitorPattern
- *    http://c2.com/cgi/wiki?HierarchicalVisitorDiscussion
- */
-
-class ir_hierarchical_visitor {
-public:
-   ir_hierarchical_visitor();
-   virtual ~ir_hierarchical_visitor() { } // GCC error about accessible nonvirtual dctor
-
-   /**
-    * \name Visit methods for leaf-node classes
-    */
-   /*@{*/
-   virtual ir_visitor_status visit(class ir_variable *);
-   virtual ir_visitor_status visit(class ir_constant *);
-   virtual ir_visitor_status visit(class ir_loop_jump *);
-
-   /**
-    * ir_dereference_variable isn't technically a leaf, but it is treated as a
-    * leaf here for a couple reasons.  By not automatically visiting the one
-    * child ir_variable node from the ir_dereference_variable, ir_variable
-    * nodes can always be handled as variable declarations.  Code that used
-    * non-hierarchical visitors had to set an "in a dereference" flag to
-    * determine how to handle an ir_variable.  By forcing the visitor to
-    * handle the ir_variable within the ir_dereference_variable visitor, this
-    * kludge can be avoided.
-    *
-    * In addition, I can envision no use for having separate enter and leave
-    * methods.  Anything that could be done in the enter and leave methods
-    * that couldn't just be done in the visit method.
-    */
-   virtual ir_visitor_status visit(class ir_dereference_variable *);
-   /*@}*/
-
-   /**
-    * \name Visit methods for internal-node classes
-    */
-   /*@{*/
-   virtual ir_visitor_status visit_enter(class ir_loop *);
-   virtual ir_visitor_status visit_leave(class ir_loop *);
-   virtual ir_visitor_status visit_enter(class ir_function_signature *);
-   virtual ir_visitor_status visit_leave(class ir_function_signature *);
-   virtual ir_visitor_status visit_enter(class ir_function *);
-   virtual ir_visitor_status visit_leave(class ir_function *);
-   virtual ir_visitor_status visit_enter(class ir_expression *);
-   virtual ir_visitor_status visit_leave(class ir_expression *);
-   virtual ir_visitor_status visit_enter(class ir_texture *);
-   virtual ir_visitor_status visit_leave(class ir_texture *);
-   virtual ir_visitor_status visit_enter(class ir_swizzle *);
-   virtual ir_visitor_status visit_leave(class ir_swizzle *);
-   virtual ir_visitor_status visit_enter(class ir_dereference_array *);
-   virtual ir_visitor_status visit_leave(class ir_dereference_array *);
-   virtual ir_visitor_status visit_enter(class ir_dereference_record *);
-   virtual ir_visitor_status visit_leave(class ir_dereference_record *);
-   virtual ir_visitor_status visit_enter(class ir_assignment *);
-   virtual ir_visitor_status visit_leave(class ir_assignment *);
-   virtual ir_visitor_status visit_enter(class ir_call *);
-   virtual ir_visitor_status visit_leave(class ir_call *);
-   virtual ir_visitor_status visit_enter(class ir_return *);
-   virtual ir_visitor_status visit_leave(class ir_return *);
-   virtual ir_visitor_status visit_enter(class ir_discard *);
-   virtual ir_visitor_status visit_leave(class ir_discard *);
-   virtual ir_visitor_status visit_enter(class ir_if *);
-   virtual ir_visitor_status visit_leave(class ir_if *);
-   /*@}*/
-
-
-   /**
-    * Utility function to process a linked list of instructions with a visitor
-    */
-   void run(struct exec_list *instructions);
-
-   /* Some visitors may need to insert new variable declarations and
-    * assignments for portions of a subtree, which means they need a
-    * pointer to the current instruction in the stream, not just their
-    * node in the tree rooted at that instruction.
-    *
-    * This is implemented by visit_list_elements -- if the visitor is
-    * not called by it, nothing good will happen.
-    */
-   class ir_instruction *base_ir;
-
-   /**
-    * Callback function that is invoked on entry to each node visited.
-    *
-    * \warning
-    * Visitor classes derived from \c ir_hierarchical_visitor \b may \b not
-    * invoke this function.  This can be used, for example, to cause the
-    * callback to be invoked on every node type execpt one.
-    */
-   void (*callback)(class ir_instruction *ir, void *data);
-
-   /**
-    * Extra data parameter passed to the per-node callback function
-    */
-   void *data;
-
-   /**
-    * Currently in the LHS of an assignment?
-    *
-    * This is set and cleared by the \c ir_assignment::accept method.
-    */
-   bool in_assignee;
-};
-
-void visit_tree(ir_instruction *ir,
-		void (*callback)(class ir_instruction *ir, void *data),
-		void *data);
-
-ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l);
-
-#endif /* IR_HIERARCHICAL_VISITOR_H */
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
deleted file mode 100644
index be8b36a..0000000
--- a/src/glsl/ir_hv_accept.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "ir.h"
-
-/**
- * \file ir_hv_accept.cpp
- * Implementations of all hierarchical visitor accept methods for IR
- * instructions.
- */
-
-/**
- * Process a list of nodes using a hierarchical vistor
- *
- * \warning
- * This function will operate correctly if a node being processed is removed
- * from the list.  However, if nodes are added to the list after the node being
- * processed, some of the added nodes may not be processed.
- */
-ir_visitor_status
-visit_list_elements(ir_hierarchical_visitor *v, exec_list *l)
-{
-   ir_instruction *prev_base_ir = v->base_ir;
-
-   foreach_list_safe(n, l) {
-      ir_instruction *const ir = (ir_instruction *) n;
-      v->base_ir = ir;
-      ir_visitor_status s = ir->accept(v);
-
-      if (s != visit_continue)
-	 return s;
-   }
-   v->base_ir = prev_base_ir;
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_variable::accept(ir_hierarchical_visitor *v)
-{
-   return v->visit(this);
-}
-
-
-ir_visitor_status
-ir_loop::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = visit_list_elements(v, &this->body_instructions);
-   if (s == visit_stop)
-      return s;
-
-   if (s != visit_continue_with_parent) {
-      if (this->from) {
-	 s = this->from->accept(v);
-	 if (s != visit_continue)
-	    return (s == visit_continue_with_parent) ? visit_continue : s;
-      }
-
-      if (this->to) {
-	 s = this->to->accept(v);
-	 if (s != visit_continue)
-	    return (s == visit_continue_with_parent) ? visit_continue : s;
-      }
-
-      if (this->increment) {
-	 s = this->increment->accept(v);
-	 if (s != visit_continue)
-	    return (s == visit_continue_with_parent) ? visit_continue : s;
-      }
-   }
-
-   return v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_loop_jump::accept(ir_hierarchical_visitor *v)
-{
-   return v->visit(this);
-}
-
-
-ir_visitor_status
-ir_function_signature::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = visit_list_elements(v, &this->parameters);
-   if (s == visit_stop)
-      return s;
-
-   s = visit_list_elements(v, &this->body);
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_function::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = visit_list_elements(v, &this->signatures);
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_expression::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   for (unsigned i = 0; i < this->get_num_operands(); i++) {
-      switch (this->operands[i]->accept(v)) {
-      case visit_continue:
-	 break;
-
-      case visit_continue_with_parent:
-	 // I wish for Java's labeled break-statement here.
-	 goto done;
-
-      case visit_stop:
-	 return s;
-      }
-   }
-
-done:
-   return v->visit_leave(this);
-}
-
-ir_visitor_status
-ir_texture::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->sampler->accept(v);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->coordinate->accept(v);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   if (this->projector) {
-      s = this->projector->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-   }
-
-   if (this->shadow_comparitor) {
-      s = this->shadow_comparitor->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-   }
-
-   switch (this->op) {
-   case ir_tex:
-      break;
-   case ir_txb:
-      s = this->lod_info.bias->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-      break;
-   case ir_txl:
-   case ir_txf:
-      s = this->lod_info.lod->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-      break;
-   case ir_txd:
-      s = this->lod_info.grad.dPdx->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-
-      s = this->lod_info.grad.dPdy->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-      break;
-   }
-
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_swizzle::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->val->accept(v);
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_dereference_variable::accept(ir_hierarchical_visitor *v)
-{
-   return v->visit(this);
-}
-
-
-ir_visitor_status
-ir_dereference_array::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   /* The array index is not the target of the assignment, so clear the
-    * 'in_assignee' flag.  Restore it after returning from the array index.
-    */
-   const bool was_in_assignee = v->in_assignee;
-   v->in_assignee = false;
-   s = this->array_index->accept(v);
-   v->in_assignee = was_in_assignee;
-
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->array->accept(v);
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_dereference_record::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->record->accept(v);
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_assignment::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   v->in_assignee = true;
-   s = this->lhs->accept(v);
-   v->in_assignee = false;
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->rhs->accept(v);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   if (this->condition)
-      s = this->condition->accept(v);
-
-   return (s == visit_stop) ? s : v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_constant::accept(ir_hierarchical_visitor *v)
-{
-   return v->visit(this);
-}
-
-
-ir_visitor_status
-ir_call::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = visit_list_elements(v, &this->actual_parameters);
-   if (s == visit_stop)
-      return s;
-
-   return v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_return::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   ir_rvalue *val = this->get_value();
-   if (val) {
-      s = val->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-   }
-
-   return v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_discard::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   if (this->condition != NULL) {
-      s = this->condition->accept(v);
-      if (s != visit_continue)
-	 return (s == visit_continue_with_parent) ? visit_continue : s;
-   }
-
-   return v->visit_leave(this);
-}
-
-
-ir_visitor_status
-ir_if::accept(ir_hierarchical_visitor *v)
-{
-   ir_visitor_status s = v->visit_enter(this);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   s = this->condition->accept(v);
-   if (s != visit_continue)
-      return (s == visit_continue_with_parent) ? visit_continue : s;
-
-   if (s != visit_continue_with_parent) {
-      s = visit_list_elements(v, &this->then_instructions);
-      if (s == visit_stop)
-	 return s;
-   }
-
-   if (s != visit_continue_with_parent) {
-      s = visit_list_elements(v, &this->else_instructions);
-      if (s == visit_stop)
-	 return s;
-   }
-
-   return v->visit_leave(this);
-}
diff --git a/src/glsl/ir_if_return.cpp b/src/glsl/ir_if_return.cpp
deleted file mode 100644
index 5ab8759..0000000
--- a/src/glsl/ir_if_return.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_if_return.cpp
- *
- * This pass tries to normalize functions to always return from one
- * place by moving around blocks of code in if statements.
- *
- * This helps on hardware with no branching support, and may even be a
- * useful transform on hardware supporting control flow by turning
- * masked returns into normal returns.
- */
-
-#include <string.h>
-#include "glsl_types.h"
-#include "ir.h"
-
-class ir_if_return_visitor : public ir_hierarchical_visitor {
-public:
-   ir_if_return_visitor()
-   {
-      this->progress = false;
-   }
-
-   ir_visitor_status visit_enter(ir_function_signature *);
-   ir_visitor_status visit_leave(ir_if *);
-
-   ir_visitor_status move_outer_block_inside(ir_instruction *ir,
-					     exec_list *inner_block);
-   void move_returns_after_block(ir_instruction *ir,
-				 ir_return *then_return,
-				 ir_return *else_return);
-   bool progress;
-};
-
-bool
-do_if_return(exec_list *instructions)
-{
-   ir_if_return_visitor v;
-
-   do {
-      v.progress = false;
-      visit_list_elements(&v, instructions);
-   } while (v.progress);
-
-   return v.progress;
-}
-
-/**
- * Removes any instructions after a (unconditional) return, since they will
- * never be executed.
- */
-static void
-truncate_after_instruction(ir_instruction *ir)
-{
-   if (!ir)
-      return;
-
-   while (!ir->get_next()->is_tail_sentinel())
-      ((ir_instruction *)ir->get_next())->remove();
-}
-
-/**
- * Returns an ir_instruction of the first ir_return in the exec_list, or NULL.
- */
-static ir_return *
-find_return_in_block(exec_list *instructions)
-{
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      if (ir->ir_type == ir_type_return)
-	 return (ir_return *)ir;
-   }
-
-   return NULL;
-}
-
-void
-ir_if_return_visitor::move_returns_after_block(ir_instruction *ir,
-					       ir_return *then_return,
-					       ir_return *else_return)
-{
-
-   if (!then_return->value) {
-      then_return->remove();
-      else_return->remove();
-      ir->insert_after(new(ir) ir_return(NULL));
-   } else {
-      ir_assignment *assign;
-      ir_variable *new_var = new(ir) ir_variable(then_return->value->type,
-						 "if_return_tmp",
-						 ir_var_temporary);
-      ir->insert_before(new_var);
-
-      assign = new(ir) ir_assignment(new(ir) ir_dereference_variable(new_var),
-				     then_return->value, NULL);
-      then_return->replace_with(assign);
-
-      assign = new(ir) ir_assignment(new(ir) ir_dereference_variable(new_var),
-				     else_return->value, NULL);
-      else_return->replace_with(assign);
-
-      ir_dereference_variable *deref = new(ir) ir_dereference_variable(new_var);
-      ir->insert_after(new(ir) ir_return(deref));
-   }
-   this->progress = true;
-}
-
-ir_visitor_status
-ir_if_return_visitor::move_outer_block_inside(ir_instruction *ir,
-					      exec_list *inner_block)
-{
-   if (!ir->get_next()->is_tail_sentinel()) {
-      while (!ir->get_next()->is_tail_sentinel()) {
-	 ir_instruction *move_ir = (ir_instruction *)ir->get_next();
-
-	 move_ir->remove();
-	 inner_block->push_tail(move_ir);
-      }
-
-      /* If we move the instructions following ir inside the block, it
-       * will confuse the exec_list iteration in the parent that visited
-       * us.  So stop the visit at this point.
-       */
-      return visit_stop;
-   } else {
-      return visit_continue;
-   }
-}
-
-/* Normalize a function to always have a return statement at the end.
- *
- * This avoids the ir_if handler needing to know whether it is at the
- * top level of the function to know if there's an implicit return at
- * the end of the outer block.
- */
-ir_visitor_status
-ir_if_return_visitor::visit_enter(ir_function_signature *ir)
-{
-   ir_return *ret;
-
-   if (!ir->is_defined)
-      return visit_continue_with_parent;
-   if (strcmp(ir->function_name(), "main") == 0)
-      return visit_continue_with_parent;
-
-   ret = find_return_in_block(&ir->body);
-
-   if (ret) {
-      truncate_after_instruction(ret);
-   } else {
-      if (ir->return_type->is_void()) {
-	 ir->body.push_tail(new(ir) ir_return(NULL));
-      } else {
-	 /* Probably, if we've got a function with a return value
-	  * hitting this point, it's something like:
-	  *
-	  * float reduce_below_half(float val)
-	  * {
-	  *         while () {
-	  *                 if (val >= 0.5)
-	  *                         val /= 2.0;
-	  *                 else
-	  *                         return val;
-	  *         }
-	  * }
-	  *
-	  * So we gain a junk return statement of an undefined value
-	  * at the end that never gets executed.  However, a backend
-	  * using this pass is probably desperate to get rid of
-	  * function calls, so go ahead and do it for their sake in
-	  * case it fixes apps.
-	  */
-	 ir_variable *undef = new(ir) ir_variable(ir->return_type,
-						  "if_return_undef",
-						  ir_var_temporary);
-	 ir->body.push_tail(undef);
-
-	 ir_dereference_variable *deref = new(ir) ir_dereference_variable(undef);
-	 ir->body.push_tail(new(ir) ir_return(deref));
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_if_return_visitor::visit_leave(ir_if *ir)
-{
-   ir_return *then_return;
-   ir_return *else_return;
-
-   then_return = find_return_in_block(&ir->then_instructions);
-   else_return = find_return_in_block(&ir->else_instructions);
-   if (!then_return && !else_return)
-      return visit_continue;
-
-   /* Trim off any trailing instructions after the return statements
-    * on both sides.
-    */
-   truncate_after_instruction(then_return);
-   truncate_after_instruction(else_return);
-
-   /* If both sides return, then we can move the returns to a single
-    * one outside the if statement.
-    */
-   if (then_return && else_return) {
-      move_returns_after_block(ir, then_return, else_return);
-      return visit_continue;
-   }
-
-   /* If only one side returns, then the block of code after the "if"
-    * is only executed by the other side, so those instructions don't
-    * need to be anywhere but that other side.
-    *
-    * This will usually pull a return statement up into the other
-    * side, so we'll trigger the above case on the next pass.
-    */
-   if (then_return) {
-      return move_outer_block_inside(ir, &ir->else_instructions);
-   } else {
-      assert(else_return);
-      return move_outer_block_inside(ir, &ir->then_instructions);
-   }
-}
diff --git a/src/glsl/ir_import_prototypes.cpp b/src/glsl/ir_import_prototypes.cpp
deleted file mode 100644
index 39ed667..0000000
--- a/src/glsl/ir_import_prototypes.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_import_prototypes.cpp
- * Import function prototypes from one IR tree into another.
- *
- * \author Ian Romanick
- */
-#include <cstdio>
-#include "ir.h"
-#include "glsl_symbol_table.h"
-
-/**
- * Visitor used to import function prototypes
- *
- * Normally the \c clone method of either \c ir_function or
- * \c ir_function_signature could be used.  However, we don't want a complete
- * clone of the \c ir_function_signature.  We want everything \b except the
- * body of the function.
- */
-class import_prototype_visitor : public ir_hierarchical_visitor {
-public:
-   /**
-    */
-   import_prototype_visitor(exec_list *list, glsl_symbol_table *symbols,
-			    void *mem_ctx)
-   {
-      this->mem_ctx = mem_ctx;
-      this->list = list;
-      this->symbols = symbols;
-      this->function = NULL;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_function *ir)
-   {
-      assert(this->function == NULL);
-
-      this->function = this->symbols->get_function(ir->name);
-      if (!this->function) {
-	 this->function = new(this->mem_ctx) ir_function(ir->name);
-
-	 list->push_tail(this->function);
-
-	 /* Add the new function to the symbol table.
-	  */
-	 this->symbols->add_function(this->function);
-      }
-      return visit_continue;
-   }
-
-   virtual ir_visitor_status visit_leave(ir_function *ir)
-   {
-      (void) ir;
-      assert(this->function != NULL);
-
-      this->function = NULL;
-      return visit_continue;
-   }
-
-   ir_visitor_status visit_enter(ir_function_signature *ir)
-   {
-      assert(this->function != NULL);
-
-      ir_function_signature *copy = ir->clone_prototype(mem_ctx, NULL);
-
-      this->function->add_signature(copy);
-
-      /* Do not process child nodes of the ir_function_signature.  There can
-       * never be any nodes inside the ir_function_signature that we care
-       * about.  Instead continue with the next sibling.
-       */
-      return visit_continue_with_parent;
-   }
-
-private:
-   exec_list *list;
-   ir_function *function;
-   glsl_symbol_table *symbols;
-   void *mem_ctx;
-};
-
-
-/**
- * Import function prototypes from one IR tree into another
- *
- * \param source   Source instruction stream containing functions whose
- *                 prototypes are to be imported
- * \param dest     Destination instruction stream where new \c ir_function and
- *                 \c ir_function_signature nodes will be stored
- * \param symbols  Symbol table where new functions will be stored
- * \param mem_ctx  hieralloc memory context used for new allocations
- */
-void
-import_prototypes(const exec_list *source, exec_list *dest,
-		  glsl_symbol_table *symbols, void *mem_ctx)
-{
-   import_prototype_visitor v(dest, symbols, mem_ctx);
-
-   /* Making source be const is just extra documentation.
-    */
-   v.run(const_cast<exec_list *>(source));
-}
diff --git a/src/glsl/ir_mod_to_fract.cpp b/src/glsl/ir_mod_to_fract.cpp
deleted file mode 100644
index 71c9472..0000000
--- a/src/glsl/ir_mod_to_fract.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_mod_to_floor.cpp
- *
- * Breaks an ir_unop_mod expression down to (op1 * fract(op0 / op1))
- *
- * Many GPUs don't have a MOD instruction (945 and 965 included), and
- * if we have to break it down like this anyway, it gives an
- * opportunity to do things like constant fold the (1.0 / op1) easily.
- */
-
-#include "ir.h"
-
-class ir_mod_to_fract_visitor : public ir_hierarchical_visitor {
-public:
-   ir_mod_to_fract_visitor()
-   {
-      this->made_progress = false;
-   }
-
-   ir_visitor_status visit_leave(ir_expression *);
-
-   bool made_progress;
-};
-
-bool
-do_mod_to_fract(exec_list *instructions)
-{
-   ir_mod_to_fract_visitor v;
-
-   visit_list_elements(&v, instructions);
-   return v.made_progress;
-}
-
-ir_visitor_status
-ir_mod_to_fract_visitor::visit_leave(ir_expression *ir)
-{
-   if (ir->operation != ir_binop_mod)
-      return visit_continue;
-
-   ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b",
-					   ir_var_temporary);
-   this->base_ir->insert_before(temp);
-
-   ir_assignment *assign;
-   ir_rvalue *expr;
-
-   assign = new(ir) ir_assignment(new(ir) ir_dereference_variable(temp),
-				  ir->operands[1], NULL);
-   this->base_ir->insert_before(assign);
-
-   expr = new(ir) ir_expression(ir_binop_div,
-				ir->operands[0]->type,
-				ir->operands[0],
-				new(ir) ir_dereference_variable(temp));
-
-   expr = new(ir) ir_expression(ir_unop_fract,
-				ir->operands[0]->type,
-				expr,
-				NULL);
-
-   ir->operation = ir_binop_mul;
-   ir->operands[0] = new(ir) ir_dereference_variable(temp);
-   ir->operands[1] = expr;
-   this->made_progress = true;
-
-   return visit_continue;
-}
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h
deleted file mode 100644
index dbc9f4a..0000000
--- a/src/glsl/ir_optimization.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-
-/**
- * \file ir_optimization.h
- *
- * Prototypes for optimization passes to be called by the compiler and drivers.
- */
-
-/* Operations for lower_instructions() */
-#define SUB_TO_ADD_NEG 0x01
-#define DIV_TO_MUL_RCP 0x02
-#define EXP_TO_EXP2    0x04
-#define POW_TO_EXP2    0x08
-#define LOG_TO_LOG2    0x10
-#define MOD_TO_FRACT   0x20
-
-bool do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations);
-
-bool do_algebraic(exec_list *instructions);
-bool do_constant_folding(exec_list *instructions);
-bool do_constant_variable(exec_list *instructions);
-bool do_constant_variable_unlinked(exec_list *instructions);
-bool do_copy_propagation(exec_list *instructions);
-bool do_constant_propagation(exec_list *instructions);
-bool do_dead_code(exec_list *instructions);
-bool do_dead_code_local(exec_list *instructions);
-bool do_dead_code_unlinked(exec_list *instructions);
-bool do_dead_functions(exec_list *instructions);
-bool do_function_inlining(exec_list *instructions);
-bool do_lower_jumps(exec_list *instructions, bool pull_out_jumps = true, bool lower_sub_return = true, bool lower_main_return = false, bool lower_continue = false, bool lower_break = false);
-bool do_lower_texture_projection(exec_list *instructions);
-bool do_if_simplification(exec_list *instructions);
-bool do_discard_simplification(exec_list *instructions);
-bool lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth = 0);
-bool do_mat_op_to_vec(exec_list *instructions);
-bool do_mod_to_fract(exec_list *instructions);
-bool do_noop_swizzle(exec_list *instructions);
-bool do_structure_splitting(exec_list *instructions);
-bool do_sub_to_add_neg(exec_list *instructions);
-bool do_swizzle_swizzle(exec_list *instructions);
-bool do_tree_grafting(exec_list *instructions);
-bool do_vec_index_to_cond_assign(exec_list *instructions);
-bool do_vec_index_to_swizzle(exec_list *instructions);
-bool lower_discard(exec_list *instructions);
-bool lower_instructions(exec_list *instructions, unsigned what_to_lower);
-bool lower_noise(exec_list *instructions);
-bool lower_variable_index_to_cond_assign(exec_list *instructions,
-    bool lower_input, bool lower_output, bool lower_temp, bool lower_uniform);
-bool lower_quadop_vector(exec_list *instructions, bool dont_lower_swz);
-bool optimize_redundant_jumps(exec_list *instructions);
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
deleted file mode 100644
index 0aa0b0a..0000000
--- a/src/glsl/ir_print_visitor.cpp
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "ir_print_visitor.h"
-#include "glsl_types.h"
-#include "glsl_parser_extras.h"
-
-static void print_type(const glsl_type *t);
-
-void
-ir_instruction::print(void) const
-{
-   ir_instruction *deconsted = const_cast<ir_instruction *>(this);
-
-   ir_print_visitor v;
-   deconsted->accept(&v);
-}
-
-void
-_mesa_print_ir(exec_list *instructions,
-	       struct _mesa_glsl_parse_state *state)
-{
-   if (state) {
-      for (unsigned i = 0; i < state->num_user_structures; i++) {
-	 const glsl_type *const s = state->user_structures[i];
-
-	 printf("(structure (%s) (%s@%p) (%u) (\n",
-		s->name, s->name, (void *) s, s->length);
-
-	 for (unsigned j = 0; j < s->length; j++) {
-	    printf("\t((");
-	    print_type(s->fields.structure[j].type);
-	    printf(")(%s))\n", s->fields.structure[j].name);
-	 }
-
-	 printf(")\n");
-      }
-   }
-
-   printf("(\n");
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir->print();
-      if (ir->ir_type != ir_type_function)
-	 printf("\n");
-   }
-   printf("\n)");
-}
-
-
-void ir_print_visitor::indent(void)
-{
-   for (int i = 0; i < indentation; i++)
-      printf("  ");
-}
-
-static void
-print_type(const glsl_type *t)
-{
-   if (t->base_type == GLSL_TYPE_ARRAY) {
-      printf("(array ");
-      print_type(t->fields.array);
-      printf(" %u)", t->length);
-   } else if ((t->base_type == GLSL_TYPE_STRUCT)
-	      && (strncmp("gl_", t->name, 3) != 0)) {
-      printf("%s@%p", t->name, (void *) t);
-   } else {
-      printf("%s", t->name);
-   }
-}
-
-
-void ir_print_visitor::visit(ir_variable *ir)
-{
-   printf("(declare ");
-
-   const char *const cent = (ir->centroid) ? "centroid " : "";
-   const char *const inv = (ir->invariant) ? "invariant " : "";
-   const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ",
-			        "temporary " };
-   const char *const interp[] = { "", "flat", "noperspective" };
-
-   printf("(%s%s%s%s) ",
-	  cent, inv, mode[ir->mode], interp[ir->interpolation]);
-
-   print_type(ir->type);
-   printf(" %s@%p)", ir->name, (void *) ir);
-}
-
-
-void ir_print_visitor::visit(ir_function_signature *ir)
-{
-   printf("(signature ");
-   indentation++;
-
-   print_type(ir->return_type);
-   printf("\n");
-   indent();
-
-   printf("(parameters\n");
-   indentation++;
-
-   foreach_iter(exec_list_iterator, iter, ir->parameters) {
-      ir_variable *const inst = (ir_variable *) iter.get();
-
-      indent();
-      inst->accept(this);
-      printf("\n");
-   }
-   indentation--;
-
-   indent();
-   printf(")\n");
-
-   indent();
-
-   printf("(\n");
-   indentation++;
-
-   foreach_iter(exec_list_iterator, iter, ir->body) {
-      ir_instruction *const inst = (ir_instruction *) iter.get();
-
-      indent();
-      inst->accept(this);
-      printf("\n");
-   }
-   indentation--;
-   indent();
-   printf("))\n");
-   indentation--;
-}
-
-
-void ir_print_visitor::visit(ir_function *ir)
-{
-   printf("(function %s\n", ir->name);
-   indentation++;
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_function_signature *const sig = (ir_function_signature *) iter.get();
-      indent();
-      sig->accept(this);
-      printf("\n");
-   }
-   indentation--;
-   indent();
-   printf(")\n\n");
-}
-
-
-void ir_print_visitor::visit(ir_expression *ir)
-{
-   printf("(expression ");
-
-   print_type(ir->type);
-
-   printf(" %s ", ir->operator_string());
-
-   for (unsigned i = 0; i < ir->get_num_operands(); i++) {
-      ir->operands[i]->accept(this);
-   }
-
-   printf(") ");
-}
-
-
-void ir_print_visitor::visit(ir_texture *ir)
-{
-   printf("(%s ", ir->opcode_string());
-
-   ir->sampler->accept(this);
-   printf(" ");
-
-   ir->coordinate->accept(this);
-
-   printf(" (%d %d %d) ", ir->offsets[0], ir->offsets[1], ir->offsets[2]);
-
-   if (ir->op != ir_txf) {
-      if (ir->projector)
-	 ir->projector->accept(this);
-      else
-	 printf("1");
-
-      if (ir->shadow_comparitor) {
-	 printf(" ");
-	 ir->shadow_comparitor->accept(this);
-      } else {
-	 printf(" ()");
-      }
-   }
-
-   printf(" ");
-   switch (ir->op)
-   {
-   case ir_tex:
-      break;
-   case ir_txb:
-      ir->lod_info.bias->accept(this);
-      break;
-   case ir_txl:
-   case ir_txf:
-      ir->lod_info.lod->accept(this);
-      break;
-   case ir_txd:
-      printf("(");
-      ir->lod_info.grad.dPdx->accept(this);
-      printf(" ");
-      ir->lod_info.grad.dPdy->accept(this);
-      printf(")");
-      break;
-   };
-   printf(")");
-}
-
-
-void ir_print_visitor::visit(ir_swizzle *ir)
-{
-   const unsigned swiz[4] = {
-      ir->mask.x,
-      ir->mask.y,
-      ir->mask.z,
-      ir->mask.w,
-   };
-
-   printf("(swiz ");
-   for (unsigned i = 0; i < ir->mask.num_components; i++) {
-      printf("%c", "xyzw"[swiz[i]]);
-   }
-   printf(" ");
-   ir->val->accept(this);
-   printf(")");
-}
-
-
-void ir_print_visitor::visit(ir_dereference_variable *ir)
-{
-   ir_variable *var = ir->variable_referenced();
-   printf("(var_ref %s@%p) ", var->name, (void *) var);
-}
-
-
-void ir_print_visitor::visit(ir_dereference_array *ir)
-{
-   printf("(array_ref ");
-   ir->array->accept(this);
-   ir->array_index->accept(this);
-   printf(") ");
-}
-
-
-void ir_print_visitor::visit(ir_dereference_record *ir)
-{
-   printf("(record_ref ");
-   ir->record->accept(this);
-   printf(" %s) ", ir->field);
-}
-
-
-void ir_print_visitor::visit(ir_assignment *ir)
-{
-   printf("(assign ");
-
-   if (ir->condition)
-      ir->condition->accept(this);
-   else
-      printf("(constant bool (1))");
-
-
-   char mask[5];
-   unsigned j = 0;
-
-   for (unsigned i = 0; i < 4; i++) {
-      if ((ir->write_mask & (1 << i)) != 0) {
-	 mask[j] = "xyzw"[i];
-	 j++;
-      }
-   }
-   mask[j] = '\0';
-
-   printf(" (%s) ", mask);
-
-   ir->lhs->accept(this);
-
-   printf(" ");
-
-   ir->rhs->accept(this);
-   printf(") ");
-}
-
-
-void ir_print_visitor::visit(ir_constant *ir)
-{
-   const glsl_type *const base_type = ir->type->get_base_type();
-
-   printf("(constant ");
-   print_type(ir->type);
-   printf(" (");
-
-   if (ir->type->is_array()) {
-      for (unsigned i = 0; i < ir->type->length; i++)
-	 ir->get_array_element(i)->accept(this);
-   } else if (ir->type->is_record()) {
-      ir_constant *value = (ir_constant *) ir->components.get_head();
-      for (unsigned i = 0; i < ir->type->length; i++) {
-	 printf("(%s ", ir->type->fields.structure->name);
-	 value->accept(this);
-	 printf(")");
-
-	 value = (ir_constant *) value->next;
-      }
-   } else {
-      for (unsigned i = 0; i < ir->type->components(); i++) {
-	 if (i != 0)
-	    printf(" ");
-	 switch (base_type->base_type) {
-	 case GLSL_TYPE_UINT:  printf("%u", ir->value.u[i]); break;
-	 case GLSL_TYPE_INT:   printf("%d", ir->value.i[i]); break;
-	 case GLSL_TYPE_FLOAT: printf("%f", ir->value.f[i]); break;
-	 case GLSL_TYPE_BOOL:  printf("%d", ir->value.b[i]); break;
-	 default: assert(0);
-	 }
-      }
-   }
-   printf(")) ");
-}
-
-
-void
-ir_print_visitor::visit(ir_call *ir)
-{
-   printf("(call %s (", ir->callee_name());
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_instruction *const inst = (ir_instruction *) iter.get();
-
-      inst->accept(this);
-   }
-   printf("))\n");
-}
-
-
-void
-ir_print_visitor::visit(ir_return *ir)
-{
-   printf("(return");
-
-   ir_rvalue *const value = ir->get_value();
-   if (value) {
-      printf(" ");
-      value->accept(this);
-   }
-
-   printf(")");
-}
-
-
-void
-ir_print_visitor::visit(ir_discard *ir)
-{
-   printf("(discard ");
-
-   if (ir->condition != NULL) {
-      printf(" ");
-      ir->condition->accept(this);
-   }
-
-   printf(")");
-}
-
-
-void
-ir_print_visitor::visit(ir_if *ir)
-{
-   printf("(if ");
-   ir->condition->accept(this);
-
-   printf("(\n");
-   indentation++;
-
-   foreach_iter(exec_list_iterator, iter, ir->then_instructions) {
-      ir_instruction *const inst = (ir_instruction *) iter.get();
-
-      indent();
-      inst->accept(this);
-      printf("\n");
-   }
-
-   indentation--;
-   indent();
-   printf(")\n");
-
-   indent();
-   if (!ir->else_instructions.is_empty()) {
-      printf("(\n");
-      indentation++;
-
-      foreach_iter(exec_list_iterator, iter, ir->else_instructions) {
-	 ir_instruction *const inst = (ir_instruction *) iter.get();
-
-	 indent();
-	 inst->accept(this);
-	 printf("\n");
-      }
-      indentation--;
-      indent();
-      printf("))\n");
-   } else {
-      printf("())\n");
-   }
-}
-
-
-void
-ir_print_visitor::visit(ir_loop *ir)
-{
-   printf("(loop (");
-   if (ir->counter != NULL)
-      ir->counter->accept(this);
-   printf(") (");
-   if (ir->from != NULL)
-      ir->from->accept(this);
-   printf(") (");
-   if (ir->to != NULL)
-      ir->to->accept(this);
-   printf(") (");
-   if (ir->increment != NULL)
-      ir->increment->accept(this);
-   printf(") (\n");
-   indentation++;
-
-   foreach_iter(exec_list_iterator, iter, ir->body_instructions) {
-      ir_instruction *const inst = (ir_instruction *) iter.get();
-
-      indent();
-      inst->accept(this);
-      printf("\n");
-   }
-   indentation--;
-   indent();
-   printf("))\n");
-}
-
-
-void
-ir_print_visitor::visit(ir_loop_jump *ir)
-{
-   printf("%s", ir->is_break() ? "break" : "continue");
-}
diff --git a/src/glsl/ir_print_visitor.h b/src/glsl/ir_print_visitor.h
deleted file mode 100644
index 4feeb8c..0000000
--- a/src/glsl/ir_print_visitor.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef IR_PRINT_VISITOR_H
-#define IR_PRINT_VISITOR_H
-
-#include "ir.h"
-#include "ir_visitor.h"
-
-extern void _mesa_print_ir(exec_list *instructions,
-			   struct _mesa_glsl_parse_state *state);
-
-/**
- * Abstract base class of visitors of IR instruction trees
- */
-class ir_print_visitor : public ir_visitor {
-public:
-   ir_print_visitor()
-   {
-      indentation = 0;
-   }
-
-   virtual ~ir_print_visitor()
-   {
-      /* empty */
-   }
-
-   void indent(void);
-
-   /**
-    * \name Visit methods
-    *
-    * As typical for the visitor pattern, there must be one \c visit method for
-    * each concrete subclass of \c ir_instruction.  Virtual base classes within
-    * the hierarchy should not have \c visit methods.
-    */
-   /*@{*/
-   virtual void visit(ir_variable *);
-   virtual void visit(ir_function_signature *);
-   virtual void visit(ir_function *);
-   virtual void visit(ir_expression *);
-   virtual void visit(ir_texture *);
-   virtual void visit(ir_swizzle *);
-   virtual void visit(ir_dereference_variable *);
-   virtual void visit(ir_dereference_array *);
-   virtual void visit(ir_dereference_record *);
-   virtual void visit(ir_assignment *);
-   virtual void visit(ir_constant *);
-   virtual void visit(ir_call *);
-   virtual void visit(ir_return *);
-   virtual void visit(ir_discard *);
-   virtual void visit(ir_if *);
-   virtual void visit(ir_loop *);
-   virtual void visit(ir_loop_jump *);
-   /*@}*/
-
-private:
-   int indentation;
-};
-
-#endif /* IR_PRINT_VISITOR_H */
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
deleted file mode 100644
index 4b17a92..0000000
--- a/src/glsl/ir_reader.cpp
+++ /dev/null
@@ -1,1143 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <cstdarg>
-
-extern "C" {
-#include <hieralloc.h>
-}
-
-#include "ir_reader.h"
-#include "glsl_parser_extras.h"
-#include "glsl_types.h"
-#include "s_expression.h"
-
-const static bool debug = false;
-
-static void ir_read_error(_mesa_glsl_parse_state *, s_expression *,
-			  const char *fmt, ...);
-static const glsl_type *read_type(_mesa_glsl_parse_state *, s_expression *);
-
-static void scan_for_prototypes(_mesa_glsl_parse_state *, exec_list *,
-			        s_expression *);
-static ir_function *read_function(_mesa_glsl_parse_state *, s_list *,
-				  bool skip_body);
-static void read_function_sig(_mesa_glsl_parse_state *, ir_function *,
-			      s_list *, bool skip_body);
-
-static void read_instructions(_mesa_glsl_parse_state *, exec_list *,
-			      s_expression *, ir_loop *);
-static ir_instruction *read_instruction(_mesa_glsl_parse_state *,
-				        s_expression *, ir_loop *);
-static ir_variable *read_declaration(_mesa_glsl_parse_state *, s_list *);
-static ir_if *read_if(_mesa_glsl_parse_state *, s_list *, ir_loop *);
-static ir_loop *read_loop(_mesa_glsl_parse_state *st, s_list *list);
-static ir_return *read_return(_mesa_glsl_parse_state *, s_list *);
-
-static ir_rvalue *read_rvalue(_mesa_glsl_parse_state *, s_expression *);
-static ir_assignment *read_assignment(_mesa_glsl_parse_state *, s_list *);
-static ir_expression *read_expression(_mesa_glsl_parse_state *, s_list *);
-static ir_call *read_call(_mesa_glsl_parse_state *, s_list *);
-static ir_swizzle *read_swizzle(_mesa_glsl_parse_state *, s_list *);
-static ir_constant *read_constant(_mesa_glsl_parse_state *, s_list *);
-static ir_texture *read_texture(_mesa_glsl_parse_state *, s_list *);
-
-static ir_dereference *read_dereference(_mesa_glsl_parse_state *,
-				        s_expression *);
-static ir_dereference_variable *
-read_var_ref(_mesa_glsl_parse_state *, s_list *);
-static ir_dereference_array *
-read_array_ref(_mesa_glsl_parse_state *, s_list *);
-static ir_dereference_record *
-read_record_ref(_mesa_glsl_parse_state *, s_list *);
-
-void
-_mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
-		   const char *src, bool scan_for_protos)
-{
-   s_expression *expr = s_expression::read_expression(state, src);
-   if (expr == NULL) {
-      ir_read_error(state, NULL, "couldn't parse S-Expression.");
-      return;
-   }
-   
-   if (scan_for_protos) {
-      scan_for_prototypes(state, instructions, expr);
-      if (state->error)
-	 return;
-   }
-
-   read_instructions(state, instructions, expr, NULL);
-   hieralloc_free(expr);
-
-   if (debug)
-      validate_ir_tree(instructions);
-}
-
-static void
-ir_read_error(_mesa_glsl_parse_state *state, s_expression *expr,
-	      const char *fmt, ...)
-{
-   va_list ap;
-
-   state->error = true;
-
-   if (state->current_function != NULL)
-      state->info_log = hieralloc_asprintf_append(state->info_log,
-			   "In function %s:\n",
-			   state->current_function->function_name());
-   state->info_log = hieralloc_strdup_append(state->info_log, "error: ");
-
-   va_start(ap, fmt);
-   state->info_log = hieralloc_vasprintf_append(state->info_log, fmt, ap);
-   va_end(ap);
-   state->info_log = hieralloc_strdup_append(state->info_log, "\n");
-
-   if (expr != NULL) {
-      state->info_log = hieralloc_strdup_append(state->info_log,
-					     "...in this context:\n   ");
-      expr->print();
-      state->info_log = hieralloc_strdup_append(state->info_log, "\n\n");
-   }
-}
-
-static const glsl_type *
-read_type(_mesa_glsl_parse_state *st, s_expression *expr)
-{
-   s_list *list = SX_AS_LIST(expr);
-   if (list != NULL) {
-      s_symbol *type_sym = SX_AS_SYMBOL(list->subexpressions.get_head());
-      if (type_sym == NULL) {
-	 ir_read_error(st, expr, "expected type (array ...) or (struct ...)");
-	 return NULL;
-      }
-      if (strcmp(type_sym->value(), "array") == 0) {
-	 if (list->length() != 3) {
-	    ir_read_error(st, expr, "expected type (array <type> <int>)");
-	    return NULL;
-	 }
-
-	 // Read base type
-	 s_expression *base_expr = (s_expression*) type_sym->next;
-	 const glsl_type *base_type = read_type(st, base_expr);
-	 if (base_type == NULL) {
-	    ir_read_error(st, NULL, "when reading base type of array");
-	    return NULL;
-	 }
-
-	 // Read array size
-	 s_int *size = SX_AS_INT(base_expr->next);
-	 if (size == NULL) {
-	    ir_read_error(st, expr, "found non-integer array size");
-	    return NULL;
-	 }
-
-	 return glsl_type::get_array_instance(base_type, size->value());
-      } else if (strcmp(type_sym->value(), "struct") == 0) {
-	 assert(false); // FINISHME
-      } else {
-	 ir_read_error(st, expr, "expected (array ...) or (struct ...); "
-				 "found (%s ...)", type_sym->value());
-	 return NULL;
-      }
-   }
-   
-   s_symbol *type_sym = SX_AS_SYMBOL(expr);
-   if (type_sym == NULL) {
-      ir_read_error(st, expr, "expected <type> (symbol or list)");
-      return NULL;
-   }
-
-   const glsl_type *type = st->symbols->get_type(type_sym->value());
-   if (type == NULL)
-      ir_read_error(st, expr, "invalid type: %s", type_sym->value());
-
-   return type;
-}
-
-
-static void
-scan_for_prototypes(_mesa_glsl_parse_state *st, exec_list *instructions,
-		    s_expression *expr)
-{
-   s_list *list = SX_AS_LIST(expr);
-   if (list == NULL) {
-      ir_read_error(st, expr, "Expected (<instruction> ...); found an atom.");
-      return;
-   }
-
-   foreach_iter(exec_list_iterator, it, list->subexpressions) {
-      s_list *sub = SX_AS_LIST(it.get());
-      if (sub == NULL)
-	 continue; // not a (function ...); ignore it.
-
-      s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head());
-      if (tag == NULL || strcmp(tag->value(), "function") != 0)
-	 continue; // not a (function ...); ignore it.
-
-      ir_function *f = read_function(st, sub, true);
-      if (f == NULL)
-	 return;
-      instructions->push_tail(f);
-   }
-}
-
-static ir_function *
-read_function(_mesa_glsl_parse_state *st, s_list *list, bool skip_body)
-{
-   void *ctx = st;
-   bool added = false;
-   if (list->length() < 3) {
-      ir_read_error(st, list, "Expected (function <name> (signature ...) ...)");
-      return NULL;
-   }
-
-   s_symbol *name = SX_AS_SYMBOL(list->subexpressions.head->next);
-   if (name == NULL) {
-      ir_read_error(st, list, "Expected (function <name> ...)");
-      return NULL;
-   }
-
-   ir_function *f = st->symbols->get_function(name->value());
-   if (f == NULL) {
-      f = new(ctx) ir_function(name->value());
-      added = st->symbols->add_function(f);
-      assert(added);
-   }
-
-   exec_list_iterator it = list->subexpressions.iterator();
-   it.next(); // skip "function" tag
-   it.next(); // skip function name
-   for (/* nothing */; it.has_next(); it.next()) {
-      s_list *siglist = SX_AS_LIST(it.get());
-      if (siglist == NULL) {
-	 ir_read_error(st, list, "Expected (function (signature ...) ...)");
-	 return NULL;
-      }
-
-      s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head());
-      if (tag == NULL || strcmp(tag->value(), "signature") != 0) {
-	 ir_read_error(st, siglist, "Expected (signature ...)");
-	 return NULL;
-      }
-
-      read_function_sig(st, f, siglist, skip_body);
-   }
-   return added ? f : NULL;
-}
-
-static void
-read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
-		  bool skip_body)
-{
-   void *ctx = st;
-   if (list->length() != 4) {
-      ir_read_error(st, list, "Expected (signature <type> (parameters ...) "
-			      "(<instruction> ...))");
-      return;
-   }
-
-   s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
-   const glsl_type *return_type = read_type(st, type_expr);
-   if (return_type == NULL)
-      return;
-
-   s_list *paramlist = SX_AS_LIST(type_expr->next);
-   s_list *body_list = SX_AS_LIST(type_expr->next->next);
-   if (paramlist == NULL || body_list == NULL) {
-      ir_read_error(st, list, "Expected (signature <type> (parameters ...) "
-			      "(<instruction> ...))");
-      return;
-   }
-   s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head());
-   if (paramtag == NULL || strcmp(paramtag->value(), "parameters") != 0) {
-      ir_read_error(st, paramlist, "Expected (parameters ...)");
-      return;
-   }
-
-   // Read the parameters list into a temporary place.
-   exec_list hir_parameters;
-   st->symbols->push_scope();
-
-   exec_list_iterator it = paramlist->subexpressions.iterator();
-   for (it.next() /* skip "parameters" */; it.has_next(); it.next()) {
-      s_list *decl = SX_AS_LIST(it.get());
-      ir_variable *var = read_declaration(st, decl);
-      if (var == NULL)
-	 return;
-
-      hir_parameters.push_tail(var);
-   }
-
-   ir_function_signature *sig = f->exact_matching_signature(&hir_parameters);
-   if (sig == NULL && skip_body) {
-      /* If scanning for prototypes, generate a new signature. */
-      sig = new(ctx) ir_function_signature(return_type);
-      sig->is_builtin = true;
-      f->add_signature(sig);
-   } else if (sig != NULL) {
-      const char *badvar = sig->qualifiers_match(&hir_parameters);
-      if (badvar != NULL) {
-	 ir_read_error(st, list, "function `%s' parameter `%s' qualifiers "
-		       "don't match prototype", f->name, badvar);
-	 return;
-      }
-
-      if (sig->return_type != return_type) {
-	 ir_read_error(st, list, "function `%s' return type doesn't "
-		       "match prototype", f->name);
-	 return;
-      }
-   } else {
-      /* No prototype for this body exists - skip it. */
-      st->symbols->pop_scope();
-      return;
-   }
-   assert(sig != NULL);
-
-   sig->replace_parameters(&hir_parameters);
-
-   if (!skip_body && !body_list->subexpressions.is_empty()) {
-      if (sig->is_defined) {
-	 ir_read_error(st, list, "function %s redefined", f->name);
-	 return;
-      }
-      st->current_function = sig;
-      read_instructions(st, &sig->body, body_list, NULL);
-      st->current_function = NULL;
-      sig->is_defined = true;
-   }
-
-   st->symbols->pop_scope();
-}
-
-static void
-read_instructions(_mesa_glsl_parse_state *st, exec_list *instructions,
-		  s_expression *expr, ir_loop *loop_ctx)
-{
-   // Read in a list of instructions
-   s_list *list = SX_AS_LIST(expr);
-   if (list == NULL) {
-      ir_read_error(st, expr, "Expected (<instruction> ...); found an atom.");
-      return;
-   }
-
-   foreach_iter(exec_list_iterator, it, list->subexpressions) {
-      s_expression *sub = (s_expression*) it.get();
-      ir_instruction *ir = read_instruction(st, sub, loop_ctx);
-      if (ir != NULL) {
-	 /* Global variable declarations should be moved to the top, before
-	  * any functions that might use them.  Functions are added to the
-	  * instruction stream when scanning for prototypes, so without this
-	  * hack, they always appear before variable declarations.
-	  */
-	 if (st->current_function == NULL && ir->as_variable() != NULL)
-	    instructions->push_head(ir);
-	 else
-	    instructions->push_tail(ir);
-      }
-   }
-}
-
-
-static ir_instruction *
-read_instruction(_mesa_glsl_parse_state *st, s_expression *expr,
-	         ir_loop *loop_ctx)
-{
-   void *ctx = st;
-   s_symbol *symbol = SX_AS_SYMBOL(expr);
-   if (symbol != NULL) {
-      if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL)
-	 return new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
-      if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL)
-	 return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue);
-   }
-
-   s_list *list = SX_AS_LIST(expr);
-   if (list == NULL || list->subexpressions.is_empty()) {
-      ir_read_error(st, expr, "Invalid instruction.\n");
-      return NULL;
-   }
-
-   s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head());
-   if (tag == NULL) {
-      ir_read_error(st, expr, "expected instruction tag");
-      return NULL;
-   }
-
-   ir_instruction *inst = NULL;
-   if (strcmp(tag->value(), "declare") == 0) {
-      inst = read_declaration(st, list);
-   } else if (strcmp(tag->value(), "assign") == 0) {
-      inst = read_assignment(st, list);
-   } else if (strcmp(tag->value(), "if") == 0) {
-      inst = read_if(st, list, loop_ctx);
-   } else if (strcmp(tag->value(), "loop") == 0) {
-      inst = read_loop(st, list);
-   } else if (strcmp(tag->value(), "return") == 0) {
-      inst = read_return(st, list);
-   } else if (strcmp(tag->value(), "function") == 0) {
-      inst = read_function(st, list, false);
-   } else {
-      inst = read_rvalue(st, list);
-      if (inst == NULL)
-	 ir_read_error(st, NULL, "when reading instruction");
-   }
-   return inst;
-}
-
-
-static ir_variable *
-read_declaration(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 4) {
-      ir_read_error(st, list, "expected (declare (<qualifiers>) <type> "
-			      "<name>)");
-      return NULL;
-   }
-
-   s_list *quals = SX_AS_LIST(list->subexpressions.head->next);
-   if (quals == NULL) {
-      ir_read_error(st, list, "expected a list of variable qualifiers");
-      return NULL;
-   }
-
-   s_expression *type_expr = (s_expression*) quals->next;
-   const glsl_type *type = read_type(st, type_expr);
-   if (type == NULL)
-      return NULL;
-
-   s_symbol *var_name = SX_AS_SYMBOL(type_expr->next);
-   if (var_name == NULL) {
-      ir_read_error(st, list, "expected variable name, found non-symbol");
-      return NULL;
-   }
-
-   ir_variable *var = new(ctx) ir_variable(type, var_name->value(),
-					   ir_var_auto);
-
-   foreach_iter(exec_list_iterator, it, quals->subexpressions) {
-      s_symbol *qualifier = SX_AS_SYMBOL(it.get());
-      if (qualifier == NULL) {
-	 ir_read_error(st, list, "qualifier list must contain only symbols");
-	 delete var;
-	 return NULL;
-      }
-
-      // FINISHME: Check for duplicate/conflicting qualifiers.
-      if (strcmp(qualifier->value(), "centroid") == 0) {
-	 var->centroid = 1;
-      } else if (strcmp(qualifier->value(), "invariant") == 0) {
-	 var->invariant = 1;
-      } else if (strcmp(qualifier->value(), "uniform") == 0) {
-	 var->mode = ir_var_uniform;
-      } else if (strcmp(qualifier->value(), "auto") == 0) {
-	 var->mode = ir_var_auto;
-      } else if (strcmp(qualifier->value(), "in") == 0) {
-	 var->mode = ir_var_in;
-      } else if (strcmp(qualifier->value(), "out") == 0) {
-	 var->mode = ir_var_out;
-      } else if (strcmp(qualifier->value(), "inout") == 0) {
-	 var->mode = ir_var_inout;
-      } else if (strcmp(qualifier->value(), "smooth") == 0) {
-	 var->interpolation = ir_var_smooth;
-      } else if (strcmp(qualifier->value(), "flat") == 0) {
-	 var->interpolation = ir_var_flat;
-      } else if (strcmp(qualifier->value(), "noperspective") == 0) {
-	 var->interpolation = ir_var_noperspective;
-      } else {
-	 ir_read_error(st, list, "unknown qualifier: %s", qualifier->value());
-	 delete var;
-	 return NULL;
-      }
-   }
-
-   // Add the variable to the symbol table
-   st->symbols->add_variable(var);
-
-   return var;
-}
-
-
-static ir_if *
-read_if(_mesa_glsl_parse_state *st, s_list *list, ir_loop *loop_ctx)
-{
-   void *ctx = st;
-   if (list->length() != 4) {
-      ir_read_error(st, list, "expected (if <condition> (<then> ...) "
-                          "(<else> ...))");
-      return NULL;
-   }
-
-   s_expression *cond_expr = (s_expression*) list->subexpressions.head->next;
-   ir_rvalue *condition = read_rvalue(st, cond_expr);
-   if (condition == NULL) {
-      ir_read_error(st, NULL, "when reading condition of (if ...)");
-      return NULL;
-   }
-
-   s_expression *then_expr = (s_expression*) cond_expr->next;
-   s_expression *else_expr = (s_expression*) then_expr->next;
-
-   ir_if *iff = new(ctx) ir_if(condition);
-
-   read_instructions(st, &iff->then_instructions, then_expr, loop_ctx);
-   read_instructions(st, &iff->else_instructions, else_expr, loop_ctx);
-   if (st->error) {
-      delete iff;
-      iff = NULL;
-   }
-   return iff;
-}
-
-
-static ir_loop *
-read_loop(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 6) {
-      ir_read_error(st, list, "expected (loop <counter> <from> <to> "
-			      "<increment> <body>)");
-      return NULL;
-   }
-
-   s_expression *count_expr = (s_expression*) list->subexpressions.head->next;
-   s_expression *from_expr  = (s_expression*) count_expr->next;
-   s_expression *to_expr    = (s_expression*) from_expr->next;
-   s_expression *inc_expr   = (s_expression*) to_expr->next;
-   s_expression *body_expr  = (s_expression*) inc_expr->next;
-
-   // FINISHME: actually read the count/from/to fields.
-
-   ir_loop *loop = new(ctx) ir_loop;
-   read_instructions(st, &loop->body_instructions, body_expr, loop);
-   if (st->error) {
-      delete loop;
-      loop = NULL;
-   }
-   return loop;
-}
-
-
-static ir_return *
-read_return(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 2) {
-      ir_read_error(st, list, "expected (return <rvalue>)");
-      return NULL;
-   }
-
-   s_expression *expr = (s_expression*) list->subexpressions.head->next;
-
-   ir_rvalue *retval = read_rvalue(st, expr);
-   if (retval == NULL) {
-      ir_read_error(st, NULL, "when reading return value");
-      return NULL;
-   }
-
-   return new(ctx) ir_return(retval);
-}
-
-
-static ir_rvalue *
-read_rvalue(_mesa_glsl_parse_state *st, s_expression *expr)
-{
-   s_list *list = SX_AS_LIST(expr);
-   if (list == NULL || list->subexpressions.is_empty())
-      return NULL;
-
-   s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head());
-   if (tag == NULL) {
-      ir_read_error(st, expr, "expected rvalue tag");
-      return NULL;
-   }
-
-   ir_rvalue *rvalue = read_dereference(st, list);
-   if (rvalue != NULL || st->error)
-      return rvalue;
-   else if (strcmp(tag->value(), "swiz") == 0) {
-      rvalue = read_swizzle(st, list);
-   } else if (strcmp(tag->value(), "expression") == 0) {
-      rvalue = read_expression(st, list);
-   } else if (strcmp(tag->value(), "call") == 0) {
-      rvalue = read_call(st, list);
-   } else if (strcmp(tag->value(), "constant") == 0) {
-      rvalue = read_constant(st, list);
-   } else {
-      rvalue = read_texture(st, list);
-      if (rvalue == NULL && !st->error)
-	 ir_read_error(st, expr, "unrecognized rvalue tag: %s", tag->value());
-   }
-
-   return rvalue;
-}
-
-static ir_assignment *
-read_assignment(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 5) {
-      ir_read_error(st, list, "expected (assign <condition> (<write mask>) "
-			      "<lhs> <rhs>)");
-      return NULL;
-   }
-
-   s_expression *cond_expr = (s_expression*) list->subexpressions.head->next;
-   s_list       *mask_list = SX_AS_LIST(cond_expr->next);
-   s_expression *lhs_expr  = (s_expression*) cond_expr->next->next;
-   s_expression *rhs_expr  = (s_expression*) lhs_expr->next;
-
-   ir_rvalue *condition = read_rvalue(st, cond_expr);
-   if (condition == NULL) {
-      ir_read_error(st, NULL, "when reading condition of assignment");
-      return NULL;
-   }
-
-   if (mask_list == NULL || mask_list->length() > 1) {
-      ir_read_error(st, mask_list, "expected () or (<write mask>)");
-      return NULL;
-   }
-
-   unsigned mask = 0;
-   if (mask_list->length() == 1) {
-      s_symbol *mask_symbol = SX_AS_SYMBOL(mask_list->subexpressions.head);
-      if (mask_symbol == NULL) {
-	 ir_read_error(st, list, "expected a write mask; found non-symbol");
-	 return NULL;
-      }
-
-      const char *mask_str = mask_symbol->value();
-      unsigned mask_length = strlen(mask_str);
-      if (mask_length > 4) {
-	 ir_read_error(st, list, "invalid write mask: %s", mask_str);
-	 return NULL;
-      }
-
-      const unsigned idx_map[] = { 3, 0, 1, 2 }; /* w=bit 3, x=0, y=1, z=2 */
-
-      for (unsigned i = 0; i < mask_length; i++) {
-	 if (mask_str[i] < 'w' || mask_str[i] > 'z') {
-	    ir_read_error(st, list, "write mask contains invalid character: %c",
-			  mask_str[i]);
-	    return NULL;
-	 }
-	 mask |= 1 << idx_map[mask_str[i] - 'w'];
-      }
-   }
-
-   ir_dereference *lhs = read_dereference(st, lhs_expr);
-   if (lhs == NULL) {
-      ir_read_error(st, NULL, "when reading left-hand side of assignment");
-      return NULL;
-   }
-
-   ir_rvalue *rhs = read_rvalue(st, rhs_expr);
-   if (rhs == NULL) {
-      ir_read_error(st, NULL, "when reading right-hand side of assignment");
-      return NULL;
-   }
-
-   if (mask == 0 && (lhs->type->is_vector() || lhs->type->is_scalar())) {
-      ir_read_error(st, list, "non-zero write mask required.");
-      return NULL;
-   }
-
-   return new(ctx) ir_assignment(lhs, rhs, condition, mask);
-}
-
-static ir_call *
-read_call(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 3) {
-      ir_read_error(st, list, "expected (call <name> (<param> ...))");
-      return NULL;
-   }
-
-   s_symbol *name = SX_AS_SYMBOL(list->subexpressions.head->next);
-   s_list *params = SX_AS_LIST(list->subexpressions.head->next->next);
-   if (name == NULL || params == NULL) {
-      ir_read_error(st, list, "expected (call <name> (<param> ...))");
-      return NULL;
-   }
-
-   exec_list parameters;
-
-   foreach_iter(exec_list_iterator, it, params->subexpressions) {
-      s_expression *expr = (s_expression*) it.get();
-      ir_rvalue *param = read_rvalue(st, expr);
-      if (param == NULL) {
-	 ir_read_error(st, list, "when reading parameter to function call");
-	 return NULL;
-      }
-      parameters.push_tail(param);
-   }
-
-   ir_function *f = st->symbols->get_function(name->value());
-   if (f == NULL) {
-      ir_read_error(st, list, "found call to undefined function %s",
-		    name->value());
-      return NULL;
-   }
-
-   ir_function_signature *callee = f->matching_signature(&parameters);
-   if (callee == NULL) {
-      ir_read_error(st, list, "couldn't find matching signature for function "
-                    "%s", name->value());
-      return NULL;
-   }
-
-   return new(ctx) ir_call(callee, &parameters);
-}
-
-static ir_expression *
-read_expression(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   const unsigned list_length = list->length();
-   if (list_length < 4) {
-      ir_read_error(st, list, "expected (expression <type> <operator> "
-			      "<operand> [<operand>])");
-      return NULL;
-   }
-
-   s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
-   const glsl_type *type = read_type(st, type_expr);
-   if (type == NULL)
-      return NULL;
-
-   /* Read the operator */
-   s_symbol *op_sym = SX_AS_SYMBOL(type_expr->next);
-   if (op_sym == NULL) {
-      ir_read_error(st, list, "expected operator, found non-symbol");
-      return NULL;
-   }
-
-   ir_expression_operation op = ir_expression::get_operator(op_sym->value());
-   if (op == (ir_expression_operation) -1) {
-      ir_read_error(st, list, "invalid operator: %s", op_sym->value());
-      return NULL;
-   }
-    
-   /* Now that we know the operator, check for the right number of operands */ 
-   if (ir_expression::get_num_operands(op) == 2) {
-      if (list_length != 5) {
-	 ir_read_error(st, list, "expected (expression <type> %s <operand> "
-				 " <operand>)", op_sym->value());
-	 return NULL;
-      }
-   } else {
-      if (list_length != 4) {
-	 ir_read_error(st, list, "expected (expression <type> %s <operand>)",
-		       op_sym->value());
-	 return NULL;
-      }
-   }
-
-   s_expression *exp1 = (s_expression*) (op_sym->next);
-   ir_rvalue *arg1 = read_rvalue(st, exp1);
-   if (arg1 == NULL) {
-      ir_read_error(st, NULL, "when reading first operand of %s",
-		    op_sym->value());
-      return NULL;
-   }
-
-   ir_rvalue *arg2 = NULL;
-   if (ir_expression::get_num_operands(op) == 2) {
-      s_expression *exp2 = (s_expression*) (exp1->next);
-      arg2 = read_rvalue(st, exp2);
-      if (arg2 == NULL) {
-	 ir_read_error(st, NULL, "when reading second operand of %s",
-		       op_sym->value());
-	 return NULL;
-      }
-   }
-
-   return new(ctx) ir_expression(op, type, arg1, arg2);
-}
-
-static ir_swizzle *
-read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
-{
-   if (list->length() != 3) {
-      ir_read_error(st, list, "expected (swiz <swizzle> <rvalue>)");
-      return NULL;
-   }
-
-   s_symbol *swiz = SX_AS_SYMBOL(list->subexpressions.head->next);
-   if (swiz == NULL) {
-      ir_read_error(st, list, "expected a valid swizzle; found non-symbol");
-      return NULL;
-   }
-
-   if (strlen(swiz->value()) > 4) {
-      ir_read_error(st, list, "expected a valid swizzle; found %s",
-		    swiz->value());
-      return NULL;
-   }
-
-   s_expression *sub = (s_expression*) swiz->next;
-   ir_rvalue *rvalue = read_rvalue(st, sub);
-   if (rvalue == NULL)
-      return NULL;
-
-   ir_swizzle *ir = ir_swizzle::create(rvalue, swiz->value(),
-				       rvalue->type->vector_elements);
-   if (ir == NULL)
-      ir_read_error(st, list, "invalid swizzle");
-
-   return ir;
-}
-
-static ir_constant *
-read_constant(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 3) {
-      ir_read_error(st, list, "expected (constant <type> (...))");
-      return NULL;
-   }
-
-   s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
-   const glsl_type *type = read_type(st, type_expr);
-   if (type == NULL)
-      return NULL;
-
-   s_list *values = SX_AS_LIST(type_expr->next);
-   if (values == NULL) {
-      ir_read_error(st, list, "expected (constant <type> (...))");
-      return NULL;
-   }
-
-   if (type->is_array()) {
-      const unsigned elements_supplied = values->length();
-      if (elements_supplied != type->length) {
-	 ir_read_error(st, values, "expected exactly %u array elements, "
-		       "given %u", type->length, elements_supplied);
-	 return NULL;
-      }
-
-      exec_list elements;
-      foreach_iter(exec_list_iterator, it, values->subexpressions) {
-	 s_expression *expr = (s_expression *) it.get();
-	 s_list *elt = SX_AS_LIST(expr);
-	 if (elt == NULL) {
-	    ir_read_error(st, expr, "expected (constant ...) array element");
-	    return NULL;
-	 }
-
-	 ir_constant *ir_elt = read_constant(st, elt);
-	 if (ir_elt == NULL)
-	    return NULL;
-	 elements.push_tail(ir_elt);
-      }
-      return new(ctx) ir_constant(type, &elements);
-   }
-
-   const glsl_type *const base_type = type->get_base_type();
-
-   ir_constant_data data = { { 0 } };
-
-   // Read in list of values (at most 16).
-   int k = 0;
-   foreach_iter(exec_list_iterator, it, values->subexpressions) {
-      if (k >= 16) {
-	 ir_read_error(st, values, "expected at most 16 numbers");
-	 return NULL;
-      }
-
-      s_expression *expr = (s_expression*) it.get();
-
-      if (base_type->base_type == GLSL_TYPE_FLOAT) {
-	 s_number *value = SX_AS_NUMBER(expr);
-	 if (value == NULL) {
-	    ir_read_error(st, values, "expected numbers");
-	    return NULL;
-	 }
-	 data.f[k] = value->fvalue();
-      } else {
-	 s_int *value = SX_AS_INT(expr);
-	 if (value == NULL) {
-	    ir_read_error(st, values, "expected integers");
-	    return NULL;
-	 }
-
-	 switch (base_type->base_type) {
-	 case GLSL_TYPE_UINT: {
-	    data.u[k] = value->value();
-	    break;
-	 }
-	 case GLSL_TYPE_INT: {
-	    data.i[k] = value->value();
-	    break;
-	 }
-	 case GLSL_TYPE_BOOL: {
-	    data.b[k] = value->value();
-	    break;
-	 }
-	 default:
-	    ir_read_error(st, values, "unsupported constant type");
-	    return NULL;
-	 }
-      }
-      ++k;
-   }
-
-   return new(ctx) ir_constant(type, &data);
-}
-
-static ir_dereference *
-read_dereference(_mesa_glsl_parse_state *st, s_expression *expr)
-{
-   s_list *list = SX_AS_LIST(expr);
-   if (list == NULL || list->subexpressions.is_empty())
-      return NULL;
-
-   s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head);
-   assert(tag != NULL);
-
-   if (strcmp(tag->value(), "var_ref") == 0)
-      return read_var_ref(st, list);
-   if (strcmp(tag->value(), "array_ref") == 0)
-      return read_array_ref(st, list);
-   if (strcmp(tag->value(), "record_ref") == 0)
-      return read_record_ref(st, list);
-   return NULL;
-}
-
-static ir_dereference_variable *
-read_var_ref(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 2) {
-      ir_read_error(st, list, "expected (var_ref <variable name>)");
-      return NULL;
-   }
-   s_symbol *var_name = SX_AS_SYMBOL(list->subexpressions.head->next);
-   if (var_name == NULL) {
-      ir_read_error(st, list, "expected (var_ref <variable name>)");
-      return NULL;
-   }
-
-   ir_variable *var = st->symbols->get_variable(var_name->value());
-   if (var == NULL) {
-      ir_read_error(st, list, "undeclared variable: %s", var_name->value());
-      return NULL;
-   }
-
-   return new(ctx) ir_dereference_variable(var);
-}
-
-static ir_dereference_array *
-read_array_ref(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 3) {
-      ir_read_error(st, list, "expected (array_ref <rvalue> <index>)");
-      return NULL;
-   }
-
-   s_expression *subj_expr = (s_expression*) list->subexpressions.head->next;
-   ir_rvalue *subject = read_rvalue(st, subj_expr);
-   if (subject == NULL) {
-      ir_read_error(st, NULL, "when reading the subject of an array_ref");
-      return NULL;
-   }
-
-   s_expression *idx_expr = (s_expression*) subj_expr->next;
-   ir_rvalue *idx = read_rvalue(st, idx_expr);
-   return new(ctx) ir_dereference_array(subject, idx);
-}
-
-static ir_dereference_record *
-read_record_ref(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   if (list->length() != 3) {
-      ir_read_error(st, list, "expected (record_ref <rvalue> <field>)");
-      return NULL;
-   }
-
-   s_expression *subj_expr = (s_expression*) list->subexpressions.head->next;
-   ir_rvalue *subject = read_rvalue(st, subj_expr);
-   if (subject == NULL) {
-      ir_read_error(st, NULL, "when reading the subject of a record_ref");
-      return NULL;
-   }
-
-   s_symbol *field = SX_AS_SYMBOL(subj_expr->next);
-   if (field == NULL) {
-      ir_read_error(st, list, "expected (record_ref ... <field name>)");
-      return NULL;
-   }
-   return new(ctx) ir_dereference_record(subject, field->value());
-}
-
-static bool
-valid_texture_list_length(ir_texture_opcode op, s_list *list)
-{
-   unsigned required_length = 7;
-   if (op == ir_txf)
-      required_length = 5;
-   else if (op == ir_tex)
-      required_length = 6;
-
-   return list->length() == required_length;
-}
-
-static ir_texture *
-read_texture(_mesa_glsl_parse_state *st, s_list *list)
-{
-   void *ctx = st;
-   s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head);
-   assert(tag != NULL);
-
-   ir_texture_opcode op = ir_texture::get_opcode(tag->value());
-   if (op == (ir_texture_opcode) -1)
-      return NULL;
-
-   if (!valid_texture_list_length(op, list)) {
-      ir_read_error(st, NULL, "invalid list size in (%s ...)", tag->value());
-      return NULL;
-   }
-
-   ir_texture *tex = new(ctx) ir_texture(op);
-
-   // Read sampler (must be a deref)
-   s_expression *sampler_expr = (s_expression *) tag->next;
-   ir_dereference *sampler = read_dereference(st, sampler_expr);
-   if (sampler == NULL) {
-      ir_read_error(st, NULL, "when reading sampler in (%s ...)", tag->value());
-      return NULL;
-   }
-   tex->set_sampler(sampler);
-
-   // Read coordinate (any rvalue)
-   s_expression *coordinate_expr = (s_expression *) sampler_expr->next;
-   tex->coordinate = read_rvalue(st, coordinate_expr);
-   if (tex->coordinate == NULL) {
-      ir_read_error(st, NULL, "when reading coordinate in (%s ...)",
-		    tag->value());
-      return NULL;
-   }
-
-   // Read texel offset, i.e. (0 0 0)
-   s_list *offset_list = SX_AS_LIST(coordinate_expr->next);
-   if (offset_list == NULL || offset_list->length() != 3) {
-      ir_read_error(st, offset_list, "expected (<int> <int> <int>)");
-      return NULL;
-   }
-   s_int *offset_x = SX_AS_INT(offset_list->subexpressions.head);
-   s_int *offset_y = SX_AS_INT(offset_list->subexpressions.head->next);
-   s_int *offset_z = SX_AS_INT(offset_list->subexpressions.head->next->next);
-   if (offset_x == NULL || offset_y == NULL || offset_z == NULL) {
-      ir_read_error(st, offset_list, "expected (<int> <int> <int>)");
-      return NULL;
-   }
-   tex->offsets[0] = offset_x->value();
-   tex->offsets[1] = offset_y->value();
-   tex->offsets[2] = offset_z->value();
-
-   if (op == ir_txf) {
-      s_expression *lod_expr = (s_expression *) offset_list->next;
-      tex->lod_info.lod = read_rvalue(st, lod_expr);
-      if (tex->lod_info.lod == NULL) {
-	 ir_read_error(st, NULL, "when reading LOD in (txf ...)");
-	 return NULL;
-      }
-   } else {
-      s_expression *proj_expr = (s_expression *) offset_list->next;
-      s_int *proj_as_int = SX_AS_INT(proj_expr);
-      if (proj_as_int && proj_as_int->value() == 1) {
-	 tex->projector = NULL;
-      } else {
-	 tex->projector = read_rvalue(st, proj_expr);
-	 if (tex->projector == NULL) {
-	    ir_read_error(st, NULL, "when reading projective divide in (%s ..)",
-	                  tag->value());
-	    return NULL;
-	 }
-      }
-
-      s_list *shadow_list = SX_AS_LIST(proj_expr->next);
-      if (shadow_list == NULL) {
-	 ir_read_error(st, NULL, "shadow comparitor must be a list");
-	 return NULL;
-      }
-      if (shadow_list->subexpressions.is_empty()) {
-	 tex->shadow_comparitor= NULL;
-      } else {
-	 tex->shadow_comparitor = read_rvalue(st, shadow_list);
-	 if (tex->shadow_comparitor == NULL) {
-	    ir_read_error(st, NULL, "when reading shadow comparitor in (%s ..)",
-			  tag->value());
-	    return NULL;
-	 }
-      }
-      s_expression *lod_expr = (s_expression *) shadow_list->next;
-
-      switch (op) {
-      case ir_txb:
-	 tex->lod_info.bias = read_rvalue(st, lod_expr);
-	 if (tex->lod_info.bias == NULL) {
-	    ir_read_error(st, NULL, "when reading LOD bias in (txb ...)");
-	    return NULL;
-	 }
-	 break;
-      case ir_txl:
-	 tex->lod_info.lod = read_rvalue(st, lod_expr);
-	 if (tex->lod_info.lod == NULL) {
-	    ir_read_error(st, NULL, "when reading LOD in (txl ...)");
-	    return NULL;
-	 }
-	 break;
-      case ir_txd: {
-	 s_list *lod_list = SX_AS_LIST(lod_expr);
-	 if (lod_list->length() != 2) {
-	    ir_read_error(st, lod_expr, "expected (dPdx dPdy) in (txd ...)");
-	    return NULL;
-	 }
-	 s_expression *dx_expr = (s_expression *) lod_list->subexpressions.head;
-	 s_expression *dy_expr = (s_expression *) dx_expr->next;
-
-	 tex->lod_info.grad.dPdx = read_rvalue(st, dx_expr);
-	 if (tex->lod_info.grad.dPdx == NULL) {
-	    ir_read_error(st, NULL, "when reading dPdx in (txd ...)");
-	    return NULL;
-	 }
-	 tex->lod_info.grad.dPdy = read_rvalue(st, dy_expr);
-	 if (tex->lod_info.grad.dPdy == NULL) {
-	    ir_read_error(st, NULL, "when reading dPdy in (txd ...)");
-	    return NULL;
-	 }
-	 break;
-      }
-      default:
-	 // tex doesn't have any extra parameters and txf was handled earlier.
-	 break;
-      };
-   }
-   return tex;
-}
diff --git a/src/glsl/ir_reader.h b/src/glsl/ir_reader.h
deleted file mode 100644
index aef2ca2..0000000
--- a/src/glsl/ir_reader.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef IR_READER_H
-#define IR_READER_H
-
-#include "ir.h"
-
-void _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
-			const char *src, bool scan_for_prototypes);
-
-#endif /* IR_READER_H */
diff --git a/src/glsl/ir_rvalue_visitor.cpp b/src/glsl/ir_rvalue_visitor.cpp
deleted file mode 100644
index 773bfcf..0000000
--- a/src/glsl/ir_rvalue_visitor.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_rvalue_visitor.cpp
- *
- * Generic class to implement the common pattern we have of wanting to
- * visit each ir_rvalue * and possibly change that node to a different
- * class.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_print_visitor.h"
-#include "glsl_types.h"
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_expression *ir)
-{
-   unsigned int operand;
-
-   for (operand = 0; operand < ir->get_num_operands(); operand++) {
-      handle_rvalue(&ir->operands[operand]);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_texture *ir)
-{
-   handle_rvalue(&ir->coordinate);
-   handle_rvalue(&ir->projector);
-   handle_rvalue(&ir->shadow_comparitor);
-
-   switch (ir->op) {
-   case ir_tex:
-      break;
-   case ir_txb:
-      handle_rvalue(&ir->lod_info.bias);
-      break;
-   case ir_txf:
-   case ir_txl:
-      handle_rvalue(&ir->lod_info.lod);
-      break;
-   case ir_txd:
-      handle_rvalue(&ir->lod_info.grad.dPdx);
-      handle_rvalue(&ir->lod_info.grad.dPdy);
-      break;
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_swizzle *ir)
-{
-   handle_rvalue(&ir->val);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_dereference_array *ir)
-{
-   /* The array index is not the target of the assignment, so clear the
-    * 'in_assignee' flag.  Restore it after returning from the array index.
-    */
-   const bool was_in_assignee = this->in_assignee;
-   this->in_assignee = false;
-   handle_rvalue(&ir->array_index);
-   this->in_assignee = was_in_assignee;
-
-   handle_rvalue(&ir->array);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_dereference_record *ir)
-{
-   handle_rvalue(&ir->record);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_assignment *ir)
-{
-   handle_rvalue(&ir->rhs);
-   handle_rvalue(&ir->condition);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_call *ir)
-{
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param = (ir_rvalue *)iter.get();
-      ir_rvalue *new_param = param;
-      handle_rvalue(&new_param);
-
-      if (new_param != param) {
-	 param->replace_with(new_param);
-      }
-   }
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_return *ir)
-{
-   handle_rvalue(&ir->value);;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_if *ir)
-{
-   handle_rvalue(&ir->condition);
-   return visit_continue;
-}
diff --git a/src/glsl/ir_rvalue_visitor.h b/src/glsl/ir_rvalue_visitor.h
deleted file mode 100644
index 31a56be..0000000
--- a/src/glsl/ir_rvalue_visitor.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_rvalue_visitor.h
- *
- * Generic class to implement the common pattern we have of wanting to
- * visit each ir_rvalue * and possibly change that node to a different
- * class.  Just implement handle_rvalue() and you will be called with
- * a pointer to each rvalue in the tree.
- */
-
-class ir_rvalue_visitor : public ir_hierarchical_visitor {
-public:
-
-   virtual ir_visitor_status visit_leave(ir_assignment *);
-   virtual ir_visitor_status visit_leave(ir_call *);
-   virtual ir_visitor_status visit_leave(ir_dereference_array *);
-   virtual ir_visitor_status visit_leave(ir_dereference_record *);
-   virtual ir_visitor_status visit_leave(ir_expression *);
-   virtual ir_visitor_status visit_leave(ir_if *);
-   virtual ir_visitor_status visit_leave(ir_return *);
-   virtual ir_visitor_status visit_leave(ir_swizzle *);
-   virtual ir_visitor_status visit_leave(ir_texture *);
-
-   virtual void handle_rvalue(ir_rvalue **rvalue) = 0;
-};
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
deleted file mode 100644
index 7142815..0000000
--- a/src/glsl/ir_set_program_inouts.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_set_program_inouts.cpp
- *
- * Sets the InputsRead and OutputsWritten of Mesa programs.
- *
- * Mesa programs (gl_program, not gl_shader_program) have a set of
- * flags indicating which varyings are read and written.  Computing
- * which are actually read from some sort of backend code can be
- * tricky when variable array indexing involved.  So this pass
- * provides support for setting InputsRead and OutputsWritten right
- * from the GLSL IR.
- */
-
-extern "C" {
-#include "main/core.h" /* for struct gl_program */
-#include "program/hash_table.h"
-}
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
-
-class ir_set_program_inouts_visitor : public ir_hierarchical_visitor {
-public:
-   ir_set_program_inouts_visitor(struct gl_program *prog)
-   {
-      this->prog = prog;
-      this->ht = hash_table_ctor(0,
-				 hash_table_pointer_hash,
-				 hash_table_pointer_compare);
-   }
-   ~ir_set_program_inouts_visitor()
-   {
-      hash_table_dtor(this->ht);
-   }
-
-   virtual ir_visitor_status visit_enter(ir_dereference_array *);
-   virtual ir_visitor_status visit_enter(ir_function_signature *);
-   virtual ir_visitor_status visit(ir_dereference_variable *);
-   virtual ir_visitor_status visit(ir_variable *);
-
-   struct gl_program *prog;
-   struct hash_table *ht;
-};
-
-static void
-mark(struct gl_program *prog, ir_variable *var, int offset, int len)
-{
-   /* As of GLSL 1.20, varyings can only be floats, floating-point
-    * vectors or matrices, or arrays of them.  For Mesa programs using
-    * InputsRead/OutputsWritten, everything but matrices uses one
-    * slot, while matrices use a slot per column.  Presumably
-    * something doing a more clever packing would use something other
-    * than InputsRead/OutputsWritten.
-    */
-
-   for (int i = 0; i < len; i++) {
-      if (var->mode == ir_var_in)
-	 prog->InputsRead |= BITFIELD64_BIT(var->location + offset + i);
-      else
-	 prog->OutputsWritten |= BITFIELD64_BIT(var->location + offset + i);
-   }
-}
-
-/* Default handler: Mark all the locations in the variable as used. */
-ir_visitor_status
-ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
-{
-   if (hash_table_find(this->ht, ir->var) == NULL)
-      return visit_continue;
-
-   if (ir->type->is_array()) {
-      for (unsigned int i = 0; i < ir->type->length; i++) {
-	 mark(this->prog, ir->var, i,
-	      ir->type->length * ir->type->fields.array->matrix_columns);
-      }
-   } else {
-      mark(this->prog, ir->var, 0, ir->type->matrix_columns);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
-{
-   ir_dereference_variable *deref_var;
-   ir_constant *index = ir->array_index->as_constant();
-   deref_var = ir->array->as_dereference_variable();
-   ir_variable *var = NULL;
-
-   /* Check that we're dereferencing a shader in or out */
-   if (deref_var)
-      var = (ir_variable *)hash_table_find(this->ht, deref_var->var);
-
-   if (index && var) {
-      int width = 1;
-
-      if (deref_var->type->is_array() &&
-	  deref_var->type->fields.array->is_matrix()) {
-	 width = deref_var->type->fields.array->matrix_columns;
-      }
-
-      mark(this->prog, var, index->value.i[0] * width, width);
-      return visit_continue_with_parent;
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_set_program_inouts_visitor::visit(ir_variable *ir)
-{
-   if (ir->mode == ir_var_in ||
-       ir->mode == ir_var_out) {
-      hash_table_insert(this->ht, ir, ir);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir)
-{
-   /* We don't want to descend into the function parameters and
-    * consider them as shader inputs or outputs.
-    */
-   visit_list_elements(this, &ir->body);
-   return visit_continue_with_parent;
-}
-
-void
-do_set_program_inouts(exec_list *instructions, struct gl_program *prog)
-{
-   ir_set_program_inouts_visitor v(prog);
-
-   prog->InputsRead = 0;
-   prog->OutputsWritten = 0;
-   visit_list_elements(&v, instructions);
-}
diff --git a/src/glsl/ir_to_llvm.cpp b/src/glsl/ir_to_llvm.cpp
deleted file mode 100644
index dbe3a58..0000000
--- a/src/glsl/ir_to_llvm.cpp
+++ /dev/null
@@ -1,1413 +0,0 @@
-/*
- * Copyright (C) 2005-2007  Brian Paul   All Rights Reserved.
- * Copyright (C) 2008  VMware, Inc.   All Rights Reserved.
- * Copyright © 2010 Intel Corporation
- * Copyright © 2010 Luca Barbieri
- *
- * 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.
- */
-
-/**
- * \file ir_to_llvm.cpp
- *
- * Translates the IR to LLVM
- */
-
-/* this tends to get set as part of LLVM_CFLAGS, but we definitely want asserts */
-#ifdef NDEBUG
-#undef NDEBUG
-#endif
-
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Analysis/Verifier.h"
-//#include "llvm/Intrinsics.h"
-
-#include <vector>
-#include <stdio.h>
-#include <map>
-/*
-#ifdef _MSC_VER
-#include <unordered_map>
-#else
-#include <tr1/unordered_map>
-#endif
-// use C++0x/Microsoft convention
-namespace std
-{
-using namespace tr1;
-}
-//*/
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
-#include "src/mesa/main/mtypes.h"
-
-// Helper function to convert array to llvm::ArrayRef
-template <typename T, size_t N>
-static inline llvm::ArrayRef<T> pack(T const (&array)[N]) {
-   return llvm::ArrayRef<T>(array);
-}
-
-// Helper function to convert pointer + size to llvm::ArrayRef
-template <typename T>
-static inline llvm::ArrayRef<T> pack(T const *ptr, size_t n) {
-   return llvm::ArrayRef<T>(ptr, n);
-}
-
-struct GGLState;
-
-llvm::Value * tex2D(llvm::IRBuilder<> & builder, llvm::Value * in1, const unsigned sampler,
-                     const GGLState * gglCtx);
-llvm::Value * texCube(llvm::IRBuilder<> & builder, llvm::Value * in1, const unsigned sampler,
-                     const GGLState * gglCtx);
-
-class ir_to_llvm_visitor : public ir_visitor {
-   ir_to_llvm_visitor();
-public:
-
-
-   llvm::LLVMContext& ctx;
-   llvm::Module* mod;
-   llvm::Function* fun;
-   // could easily support more loops, but GLSL doesn't support multiloop break/continue
-   std::pair<llvm::BasicBlock*, llvm::BasicBlock*> loop;
-   llvm::BasicBlock* bb;
-   llvm::Value* result;
-   llvm::IRBuilder<> bld;
-
-   const GGLState * gglCtx;
-   const char * shaderSuffix;
-   llvm::Value * inputsPtr, * outputsPtr, * constantsPtr; // internal globals to store inputs/outputs/constants pointers
-   llvm::Value * inputs, * outputs, * constants;
-
-   ir_to_llvm_visitor(llvm::Module* p_mod, const GGLState * GGLCtx, const char * suffix)
-   : ctx(p_mod->getContext()), mod(p_mod), fun(0), loop(std::make_pair((llvm::BasicBlock*)0,
-      (llvm::BasicBlock*)0)), bb(0), bld(ctx), gglCtx(GGLCtx), shaderSuffix(suffix),
-      inputsPtr(NULL), outputsPtr(NULL), constantsPtr(NULL),
-      inputs(NULL), outputs(NULL), constants(NULL)
-   {
-      llvm::PointerType * const floatVecPtrType = llvm::PointerType::get(llvm::VectorType::get(bld.getFloatTy(),4), 0);
-      llvm::Constant * const nullFloatVecPtr = llvm::Constant::getNullValue(floatVecPtrType);
-      // make input, output and consts global pointers so they can be used in
-      // different LLVM functions since the shader shares these "registers" across "functions"
-
-      inputsPtr = new llvm::GlobalVariable(*mod, floatVecPtrType, false,
-         llvm::GlobalValue::InternalLinkage, nullFloatVecPtr, "gl_inputPtr");
-
-      outputsPtr = new llvm::GlobalVariable(*mod, floatVecPtrType, false,
-         llvm::GlobalValue::InternalLinkage, nullFloatVecPtr, "gl_outputsPtr");
-
-      constantsPtr = new llvm::GlobalVariable(*mod, floatVecPtrType, false,
-         llvm::GlobalValue::InternalLinkage, nullFloatVecPtr, "gl_constantsPtr");
-   }
-
-   llvm::Type* llvm_base_type(unsigned base_type)
-   {
-      switch(base_type)
-      {
-      case GLSL_TYPE_VOID:
-         return llvm::Type::getVoidTy(ctx);
-      case GLSL_TYPE_UINT:
-      case GLSL_TYPE_INT:
-         return llvm::Type::getInt32Ty(ctx);
-      case GLSL_TYPE_FLOAT:
-         return llvm::Type::getFloatTy(ctx);
-      case GLSL_TYPE_BOOL:
-         return llvm::Type::getInt1Ty(ctx);
-      case GLSL_TYPE_SAMPLER:
-         return llvm::PointerType::getUnqual(llvm::Type::getVoidTy(ctx));
-      default:
-         assert(0);
-         return 0;
-      }
-   }
-
-   llvm::Type* llvm_vec_type(const glsl_type* type)
-   {
-      if (type->is_array())
-         return llvm::ArrayType::get(llvm_type(type->fields.array), type->array_size());
-
-      if (type->is_record())
-      {
-         std::vector<llvm::Type*> fields;
-         for (unsigned i = 0; i < type->length; i++)
-            fields.push_back(llvm_type(type->fields.structure[i].type));
-         return llvm::StructType::get(ctx, llvm::ArrayRef<llvm::Type*>(
-             fields));
-      }
-
-      llvm::Type* base_type = llvm_base_type(type->base_type);
-      if (type->vector_elements <= 1) {
-         return base_type;
-      } else {
-         return llvm::VectorType::get(base_type, type->vector_elements);
-      }
-   }
-
-   llvm::Type* llvm_type(const glsl_type* type)
-   {
-      llvm::Type* vec_type = llvm_vec_type(type);
-      if (type->matrix_columns <= 1) {
-         return vec_type;
-      } else {
-         return llvm::ArrayType::get(vec_type, type->matrix_columns);
-      }
-   }
-
-   typedef std::map<ir_variable*, llvm::Value*> llvm_variables_t;
-   //typedef std::unordered_map<ir_variable*, llvm::Value*> llvm_variables_t;
-   llvm_variables_t llvm_variables;
-
-   llvm::Value* llvm_variable(class ir_variable* var)
-   {
-      llvm_variables_t::iterator vari = llvm_variables.find(var);
-      if (vari != llvm_variables.end()) {
-         return vari->second;
-      } else {
-         llvm::Type* type = llvm_type(var->type);
-
-         llvm::Value* v = NULL;
-         if(fun) {
-            if (ir_var_in == var->mode)
-            {
-               assert(var->location >= 0);
-               v = bld.CreateConstGEP1_32(inputs, var->location);
-               v = bld.CreateBitCast(v, llvm::PointerType::get(llvm_type(var->type), 0), var->name);
-            }
-            else if (ir_var_out == var->mode)
-            {
-               assert(var->location >= 0);
-               v = bld.CreateConstGEP1_32(outputs, var->location);
-               v = bld.CreateBitCast(v, llvm::PointerType::get(llvm_type(var->type), 0), var->name);
-            }
-            else if (ir_var_uniform == var->mode)
-            {
-               assert(var->location >= 0);
-               v = bld.CreateConstGEP1_32(constants, var->location);
-               v = bld.CreateBitCast(v, llvm::PointerType::get(llvm_type(var->type), 0), var->name);
-            }
-            else
-            {
-               if(bb == &fun->getEntryBlock())
-                  v = bld.CreateAlloca(type, 0, var->name);
-               else
-                  v = new llvm::AllocaInst(type, 0, var->name, fun->getEntryBlock().getTerminator());
-            }
-         } else {
-           // TODO: can anything global be non-constant in GLSL?; fix linkage
-            //printf("var '%s' mode=%d location=%d \n", var->name, var->mode, var->location);
-            switch(var->mode)
-            {
-               case ir_var_auto: // fall through
-               case ir_var_temporary:
-               {
-                  llvm::Constant * init = llvm::UndefValue::get(llvm_type(var->type));
-                  if(var->constant_value)
-                     init = llvm_constant(var->constant_value);
-                  v = new llvm::GlobalVariable(*mod, type, var->read_only, llvm::GlobalValue::InternalLinkage, init, var->name);
-                  break;
-               }
-               case ir_var_in: // fall through
-               case ir_var_out: // fall through
-               case ir_var_uniform: // fall through
-                  assert(var->location >= 0);
-                  return NULL; // variable outside of function means declaration
-               default:
-                  assert(0);
-            }
-
-//            llvm::Function::LinkageTypes linkage;
-//            if(var->mode == ir_var_auto || var->mode == ir_var_temporary)
-//               linkage = llvm::GlobalValue::InternalLinkage;
-//            else
-//               linkage = llvm::GlobalValue::ExternalLinkage;
-//            llvm::Constant* init = 0;
-//            if(var->constant_value)
-//            {
-//               init = llvm_constant(var->constant_value);
-//               // this constants need to be external (ie. written to output)
-//               if (llvm::GlobalValue::ExternalLinkage == linkage)
-//                  linkage = llvm::GlobalValue::AvailableExternallyLinkage;
-//            }
-//            else if(linkage == llvm::GlobalValue::InternalLinkage)
-//               init = llvm::UndefValue::get(llvm_type(var->type));
-//            v = new llvm::GlobalVariable(*mod, type, var->read_only, linkage, init, var->name);
-         }
-         assert(v);
-         llvm_variables[var] = v;
-         return v;
-      }
-   }
-
-   //typedef std::map<ir_function_signature*, llvm::Function*> llvm_functions_t;
-   //typedef std::unordered_map<ir_function_signature*, llvm::Function*> llvm_functions_t;
-   //llvm_functions_t llvm_functions;
-
-   llvm::Function* llvm_function(class ir_function_signature* sig)
-   {
-      const char* name = sig->function_name();
-      char * functionName = (char *)malloc(strlen(name) + strlen(shaderSuffix) + 1);
-      strcpy(functionName, name);
-      strcat(functionName, shaderSuffix);
-      llvm::Function * function = mod->getFunction(functionName);
-      if (function)
-      {
-         free(functionName);
-         return function;
-      }
-      else
-      {
-         llvm::Function::LinkageTypes linkage;
-         std::vector<llvm::Type*> params;
-         foreach_iter(exec_list_iterator, iter, sig->parameters) {
-            ir_variable* arg = (ir_variable*)iter.get();
-            params.push_back(llvm_type(arg->type));
-         }
-
-         if(!strcmp(name, "main") || !sig->is_defined)
-         {
-            linkage = llvm::Function::ExternalLinkage;
-            llvm::PointerType * vecPtrTy = llvm::PointerType::get(llvm::VectorType::get(bld.getFloatTy(), 4), 0);
-            assert(0 == params.size());
-            params.push_back(vecPtrTy); // inputs
-            params.push_back(vecPtrTy); // outputs
-            params.push_back(vecPtrTy); // constants
-         }
-         else {
-            linkage = llvm::Function::InternalLinkage;
-         }
-         llvm::FunctionType* ft = llvm::FunctionType::get(llvm_type(sig->return_type),
-                                                          llvm::ArrayRef<llvm::Type*>(params),
-                                                          false);
-         function = llvm::Function::Create(ft, linkage, functionName, mod);
-         free(functionName);
-         return function;
-      }
-   }
-
-   llvm::Value* llvm_value(class ir_instruction* ir)
-   {
-      result = 0;
-      ir->accept(this);
-      return result;
-   }
-
-   llvm::Constant* llvm_constant(class ir_instruction* ir)
-   {
-      return (llvm::Constant *)llvm_value(ir);
-      //return &dynamic_cast<llvm::Constant&>(*llvm_value(ir));
-   }
-
-   llvm::Constant* llvm_int(unsigned v)
-   {
-      return llvm::ConstantInt::get(llvm::Type::getInt32Ty(ctx), v);
-   }
-
-   llvm::Value* llvm_pointer(class ir_rvalue* ir)
-   {
-      if(ir_dereference_variable* deref = ir->as_dereference_variable())
-         return llvm_variable(deref->variable_referenced());
-      else if(ir_dereference_array* deref = ir->as_dereference_array())
-      {
-         llvm::Value* gep[2] = {llvm_int(0), llvm_value(deref->array_index)};
-         return bld.CreateInBoundsGEP(llvm_pointer(deref->array), gep);
-         }
-      else if(ir->as_dereference())
-      {
-         ir_dereference_record* deref = (ir_dereference_record*)ir;
-         int idx = deref->record->type->field_index(deref->field);
-         assert(idx >= 0);
-         return bld.CreateConstInBoundsGEP2_32(llvm_pointer(deref->record), 0, idx);
-      }
-      else
-      {
-         assert(0);
-         return 0;
-      }
-   }
-
-//   llvm::Value* llvm_intrinsic(llvm::Intrinsic::ID id, llvm::Value* a)
-//   {
-//      llvm::Type* types[1] = {a->getType()};
-//      return bld.CreateCall(llvm::Intrinsic::getDeclaration(mod, id, types, 1), a);
-//   }
-//
-//   llvm::Value* llvm_intrinsic(llvm::Intrinsic::ID id, llvm::Value* a, llvm::Value* b)
-//   {
-//      llvm::Type* types[2] = {a->getType(), b->getType()};
-//      /* only one type suffix is usually needed, so pass 1 here */
-//      return bld.CreateCall2(llvm::Intrinsic::getDeclaration(mod, id, types, 1), a, b);
-//   }
-
-   llvm::Value* llvm_intrinsic_unop(ir_expression_operation op, llvm::Value * op0)
-   {
-      llvm::Type * floatType = llvm::Type::getFloatTy(ctx);
-      const char * name = NULL;
-      switch (op) {
-      case ir_unop_sin:
-         name = "sinf";
-         break;
-      case ir_unop_cos:
-         name = "cosf";
-         break;
-      default:
-         assert(0);
-      }
-
-      llvm::Function * function = mod->getFunction(name);
-      if (!function) {
-         // predeclare the intrinsic
-         std::vector<llvm::Type*> args;
-         args.push_back(floatType);
-         llvm::FunctionType* type = llvm::FunctionType::get(floatType,
-                                                            llvm::ArrayRef<llvm::Type*>(args),
-                                                            false);
-         function = llvm::Function::Create(type, llvm::Function::ExternalLinkage, name, mod);
-         function->setCallingConv(llvm::CallingConv::C);
-      }
-
-      return bld.CreateCall(function, op0);
-   }
-
-   llvm::Value* llvm_intrinsic_binop(ir_expression_operation op, llvm::Value * op0, llvm::Value * op1)
-   {
-      llvm::Type * floatType = llvm::Type::getFloatTy(ctx);
-      const char * name = NULL;
-      switch (op) {
-      case ir_binop_pow:
-         name = "powf";
-         break;
-      default:
-         assert(0);
-      }
-
-      llvm::Function * function = mod->getFunction(name);
-      if (!function) {
-         // predeclare the intrinsic
-         std::vector<llvm::Type*> args;
-         args.push_back(floatType);
-         args.push_back(floatType);
-         llvm::FunctionType* type = llvm::FunctionType::get(floatType,
-                                                            llvm::ArrayRef<llvm::Type*>(args),
-                                                            false);
-         function = llvm::Function::Create(type, llvm::Function::ExternalLinkage, name, mod);
-         function->setCallingConv(llvm::CallingConv::C);
-      }
-
-      return bld.CreateCall2(function, op0, op1);
-   }
-
-   llvm::Constant* llvm_imm(llvm::Type* type, double v)
-   {
-      if(type->isVectorTy())
-      {
-         std::vector<llvm::Constant*> values;
-         values.push_back(llvm_imm(((llvm::VectorType*)type)->getElementType(), v));
-         for(unsigned i = 1; i < ((llvm::VectorType*)type)->getNumElements(); ++i)
-            values.push_back(values[0]);
-         return llvm::ConstantVector::get(values);
-      }
-      else if(type->isIntegerTy())
-         return llvm::ConstantInt::get(type, v);
-      else if(type->isFloatingPointTy())
-         return llvm::ConstantFP::get(type, v);
-      else
-      {
-         assert(0);
-         return 0;
-      }
-   }
-
-   static llvm::Value* create_shuffle3(llvm::IRBuilder<>& bld, llvm::Value* v, unsigned a, unsigned b, unsigned c, const llvm::Twine& name = "")
-   {
-      llvm::Type* int_ty = llvm::Type::getInt32Ty(v->getContext());
-      llvm::Constant* vals[3] = {llvm::ConstantInt::get(int_ty, a), llvm::ConstantInt::get(int_ty, b), llvm::ConstantInt::get(int_ty, c)};
-      return bld.CreateShuffleVector(v, llvm::UndefValue::get(v->getType()), llvm::ConstantVector::get(pack(vals)), name);
-   }
-
-   llvm::Value* create_select(unsigned width, llvm::Value * cond, llvm::Value * tru, llvm::Value * fal, const char * name = "")
-   {
-      if (1 == width)
-         return bld.CreateSelect(cond, tru, fal, name);
-
-      llvm::Type * vectorType = tru->getType();
-      llvm::Value * vector = llvm::Constant::getNullValue(vectorType);
-      for (unsigned int i = 0; i < width; i++) {
-         llvm::Value * c = bld.CreateExtractElement(cond, llvm_int(i));
-         llvm::Value * t = bld.CreateExtractElement(tru, llvm_int(i));
-         llvm::Value * f = bld.CreateExtractElement(fal, llvm_int(i));
-         llvm::Value * v = bld.CreateSelect(c, t, f, name);
-         vector = bld.CreateInsertElement(vector, v, llvm_int(i), "vslct");
-      }
-      return vector;
-   }
-
-   llvm::Value* create_dot_product(llvm::Value* ops0, llvm::Value* ops1, glsl_base_type type, unsigned width)
-   {
-      llvm::Value* prod;
-      switch (type) {
-      case GLSL_TYPE_UINT:
-      case GLSL_TYPE_INT:
-         prod = bld.CreateMul(ops0, ops1, "dot.mul");
-         break;
-      case GLSL_TYPE_FLOAT:
-         prod = bld.CreateFMul(ops0, ops1, "dot.mul");
-         break;
-      default:
-         assert(0);
-      }
-
-      if (width<= 1)
-         return prod;
-
-      llvm::Value* sum = 0;
-      for (unsigned i = 0; i < width; ++i) {
-         llvm::Value* elem = bld.CreateExtractElement(prod, llvm_int(i), "dot.elem");
-         if (sum) {
-            if (type == GLSL_TYPE_FLOAT)
-               sum = bld.CreateFAdd(sum, elem, "dot.add");
-            else
-               sum = bld.CreateAdd(sum, elem, "dot.add");
-         }
-         else
-            sum = elem;
-      }
-      return sum;
-   }
-
-   llvm::Value* llvm_expression(ir_expression* ir)
-   {
-      llvm::Value* ops[2];
-      for(unsigned i = 0; i < ir->get_num_operands(); ++i)
-         ops[i] = llvm_value(ir->operands[i]);
-
-      if(ir->get_num_operands() == 2)
-      {
-         int vecidx = -1;
-         int scaidx = -1;
-         if(ir->operands[0]->type->vector_elements <= 1 && ir->operands[1]->type->vector_elements > 1)
-         {
-            scaidx = 0;
-            vecidx = 1;
-         }
-         else if(ir->operands[0]->type->vector_elements > 1 && ir->operands[1]->type->vector_elements <= 1)
-         {
-            scaidx = 1;
-            vecidx = 0;
-         }
-         else
-            assert(ir->operands[0]->type->vector_elements == ir->operands[1]->type->vector_elements);
-
-         if(scaidx >= 0)
-         {
-            llvm::Value* vec;
-            vec = llvm::UndefValue::get(ops[vecidx]->getType());
-            for(unsigned i = 0; i < ir->operands[vecidx]->type->vector_elements; ++i)
-               vec = bld.CreateInsertElement(vec,  ops[scaidx], llvm_int(i), "sca2vec");
-            ops[scaidx] = vec;
-         }
-      }
-
-      switch (ir->operation) {
-      case ir_unop_logic_not:
-         return bld.CreateNot(ops[0]);
-      case ir_unop_neg:
-         switch (ir->operands[0]->type->base_type) {
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_INT:
-            return bld.CreateNeg(ops[0]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFNeg(ops[0]);
-         default:
-            assert(0);
-         }
-      case ir_unop_abs:
-         switch (ir->operands[0]->type->base_type) {
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_BOOL:
-            return ops[0];
-         case GLSL_TYPE_INT:
-            return create_select(ir->operands[0]->type->vector_elements,
-                                 bld.CreateICmpSGE(ops[0], llvm_imm(ops[0]->getType(), 0), "sabs.ge"),
-                                 ops[0], bld.CreateNeg(ops[0], "sabs.neg"), "sabs.select");
-         case GLSL_TYPE_FLOAT:
-            return create_select(ir->operands[0]->type->vector_elements,
-                                 bld.CreateFCmpUGE(ops[0], llvm_imm(ops[0]->getType(), 0), "fabs.ge"),
-                                 ops[0], bld.CreateFNeg(ops[0], "fabs.neg"), "fabs.select");
-         default:
-            assert(0);
-         }
-      case ir_unop_sign:
-         switch (ir->operands[0]->type->base_type) {
-         case GLSL_TYPE_BOOL:
-            return ops[0];
-         case GLSL_TYPE_UINT:
-            return bld.CreateZExt(bld.CreateICmpNE(ops[0], llvm_imm(ops[0]->getType(), 0), "usign.ne"), ops[0]->getType(), "usign.zext");
-         case GLSL_TYPE_INT:
-            return bld.CreateSelect(bld.CreateICmpNE(ops[0], llvm_imm(ops[0]->getType(), 0), "ssign.ne"),
-                                    bld.CreateSelect(bld.CreateICmpSGE(ops[0], llvm_imm(ops[0]->getType(), 0), "ssign.ge"), llvm_imm(ops[0]->getType(), 1), llvm_imm(ops[0]->getType(), -1), "sabs.selects"),
-                                    llvm_imm(ops[0]->getType(), 0), "sabs.select0");
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateSelect(bld.CreateFCmpONE(ops[0], llvm_imm(ops[0]->getType(), 0), "fsign.ne"),
-                                    bld.CreateSelect(bld.CreateFCmpUGE(ops[0], llvm_imm(ops[0]->getType(), 0), "fsign.ge"), llvm_imm(ops[0]->getType(), 1), llvm_imm(ops[0]->getType(), -1), "fabs.selects"),
-                                    llvm_imm(ops[0]->getType(), 0), "fabs.select0");
-         default:
-            assert(0);
-         }
-      case ir_unop_rcp:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-         return bld.CreateFDiv(llvm_imm(ops[0]->getType(), 1), ops[0]);
-      case ir_unop_exp: // fall through
-      case ir_unop_exp2: // fall through
-      case ir_unop_log: // fall through
-      case ir_unop_log2: // fall through
-      case ir_unop_sin: // fall through
-      case ir_unop_cos:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-         return llvm_intrinsic_unop(ir->operation, ops[0]);
-         // TODO: implement these somehow
-      case ir_unop_dFdx:
-         assert(0);
-         //return llvm_intrinsic(llvm::Intrinsic::ddx, ops[0]);
-      case ir_unop_dFdy:
-         assert(0);
-         //return llvm_intrinsic(llvm::Intrinsic::ddy, ops[0]);
-      case ir_binop_add:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateAdd(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFAdd(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_sub:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateSub(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFSub(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_mul:
-         if (ir->operands[0]->type->is_matrix() && ir->operands[1]->type->is_vector())
-            assert(0);
-         else if (ir->operands[0]->type->is_vector() && ir->operands[1]->type->is_matrix()) {
-            assert(0); // matrix multiplication should have been lowered to vector ops
-			llvm::VectorType * vectorType = llvm::VectorType::get(llvm_base_type(ir->operands[1]->type->base_type), ir->operands[1]->type->matrix_columns);
-            llvm::Value * vector = llvm::Constant::getNullValue(vectorType);
-            for (unsigned int i = 0; i < ir->operands[1]->type->matrix_columns; i++) {
-               llvm::Value * value = bld.CreateExtractValue(ops[1], i, "vec*mat_col");
-               value = create_dot_product(value, ops[0], ir->operands[1]->type->base_type, ir->operands[1]->type->vector_elements);
-               vector = bld.CreateInsertElement(vector, value, llvm_int(i), "vec*mat_res");
-            }
-            return vector;
-         }
-         else if (ir->operands[0]->type->is_matrix() && ir->operands[1]->type->is_matrix())
-            assert(0);
-
-         switch (ir->operands[0]->type->base_type) {
-         case GLSL_TYPE_BOOL:
-            return bld.CreateAnd(ops[0], ops[1]);
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateMul(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFMul(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-         case ir_binop_div:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateUDiv(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateSDiv(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFDiv(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_mod:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateURem(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateSRem(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFRem(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_less:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateICmpULT(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpSLT(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpOLT(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_greater:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateICmpUGT(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpSGT(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpOGT(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_lequal:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateICmpULE(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpSLE(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpOLE(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_gequal:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateICmpUGE(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpSGE(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpOGE(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_equal: // fall through
-      case ir_binop_all_equal: // TODO: check op same as ir_binop_equal
-         switch (ir->operands[0]->type->base_type) {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpEQ(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpOEQ(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_nequal:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateICmpNE(ops[0], ops[1]);
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateFCmpONE(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_logic_xor:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-         return bld.CreateICmpNE(ops[0], ops[1]);
-      case ir_binop_logic_or:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-         return bld.CreateOr(ops[0], ops[1]);
-      case ir_binop_logic_and:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-         return bld.CreateAnd(ops[0], ops[1]);
-      case ir_binop_dot:
-         return create_dot_product(ops[0], ops[1], ir->operands[0]->type->base_type, ir->operands[0]->type->vector_elements);
-//      case ir_binop_cross: this op does not exist in ir.h
-//         assert(ir->operands[0]->type->vector_elements == 3);
-//         switch(ir->operands[0]->type->base_type)
-//         {
-//         case GLSL_TYPE_UINT:
-//         case GLSL_TYPE_INT:
-//            return bld.CreateSub(
-//                  bld.CreateMul(create_shuffle3(bld, ops[0], 1, 2, 0, "cross.a120"), create_shuffle3(bld, ops[1], 2, 0, 1, "cross.a201"), "cross.ab"),
-//                  bld.CreateMul(create_shuffle3(bld, ops[1], 1, 2, 0, "cross.b120"), create_shuffle3(bld, ops[0], 2, 0, 1, "cross.b201"), "cross.ba"),
-//                  "cross.sub");
-//         case GLSL_TYPE_FLOAT:
-//            return bld.CreateFSub(
-//                  bld.CreateFMul(create_shuffle3(bld, ops[0], 1, 2, 0, "cross.a120"), create_shuffle3(bld, ops[1], 2, 0, 1, "cross.a201"), "cross.ab"),
-//                  bld.CreateFMul(create_shuffle3(bld, ops[1], 1, 2, 0, "cross.b120"), create_shuffle3(bld, ops[0], 2, 0, 1, "cross.b201"), "cross.ba"),
-//                  "cross.sub");
-//         default:
-//            assert(0);
-//         }
-      case ir_unop_sqrt:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-         return llvm_intrinsic_unop(ir->operation, ops[0]);
-      case ir_unop_rsq:
-         assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-         return bld.CreateFDiv(llvm_imm(ops[0]->getType(), 1), llvm_intrinsic_unop(ir_unop_sqrt, ops[0]), "rsqrt.rcp");
-      case ir_unop_i2f:
-         return bld.CreateSIToFP(ops[0], llvm_type(ir->type));
-      case ir_unop_u2f:
-      case ir_unop_b2f:
-         return bld.CreateUIToFP(ops[0], llvm_type(ir->type));
-      case ir_unop_b2i:
-         return bld.CreateZExt(ops[0], llvm_type(ir->type));
-      case ir_unop_f2i:
-         return bld.CreateFPToSI(ops[0], llvm_type(ir->type));
-      case ir_unop_f2b:
-         return bld.CreateFCmpONE(ops[0], llvm_imm(ops[0]->getType(), 0));
-      case ir_unop_i2b:
-         return bld.CreateICmpNE(ops[0], llvm_imm(ops[0]->getType(), 0));
-      case ir_unop_trunc:
-      {
-         if(ir->operands[0]->type->base_type != GLSL_TYPE_FLOAT)
-            return ops[0];
-         glsl_type int_type = *ir->operands[0]->type;
-         int_type.base_type = GLSL_TYPE_INT;
-         return bld.CreateSIToFP(bld.CreateFPToSI(ops[0], llvm_type(&int_type), "trunc.fptosi"),ops[0]->getType(), "trunc.sitofp");
-      }
-      case ir_unop_floor:
-      {
-         if(ir->operands[0]->type->base_type != GLSL_TYPE_FLOAT)
-            return ops[0];
-         llvm::Value* one = llvm_imm(ops[0]->getType(), 1);
-         return bld.CreateFSub(ops[0], bld.CreateFRem(ops[0], one));
-      }
-      case ir_unop_ceil:
-      {
-         if(ir->operands[0]->type->base_type != GLSL_TYPE_FLOAT)
-            return ops[0];
-         llvm::Value* one = llvm_imm(ops[0]->getType(), 1);
-         return bld.CreateFAdd(bld.CreateFSub(ops[0], bld.CreateFRem(ops[0], one)), one);
-      }
-      case ir_unop_fract:
-      {
-         if(ir->operands[0]->type->base_type != GLSL_TYPE_FLOAT)
-            return llvm_imm(ops[0]->getType(), 0);
-         llvm::Value* one = llvm_imm(ops[0]->getType(), 1);
-         return bld.CreateFRem(ops[0], one);
-      }
-      // TODO: NaNs might be wrong in min/max, not sure how to fix it
-      case ir_binop_min:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-            return bld.CreateAnd(ops[0], ops[1], "bmin");
-         case GLSL_TYPE_UINT:
-            return bld.CreateSelect(bld.CreateICmpULE(ops[0], ops[1], "umin.le"), ops[0], ops[1], "umin.select");
-         case GLSL_TYPE_INT:
-            return bld.CreateSelect(bld.CreateICmpSLE(ops[0], ops[1], "smin.le"), ops[0], ops[1], "smin.select");
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateSelect(bld.CreateFCmpULE(ops[0], ops[1], "fmin.le"), ops[0], ops[1], "fmin.select");
-         default:
-            assert(0);
-         }
-      case ir_binop_max:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-            return bld.CreateOr(ops[0], ops[1], "bmax");
-         case GLSL_TYPE_UINT:
-            return bld.CreateSelect(bld.CreateICmpUGE(ops[0], ops[1], "umax.ge"), ops[0], ops[1], "umax.select");
-         case GLSL_TYPE_INT:
-            return bld.CreateSelect(bld.CreateICmpSGE(ops[0], ops[1], "smax.ge"), ops[0], ops[1], "smax.select");
-         case GLSL_TYPE_FLOAT:
-            return bld.CreateSelect(bld.CreateFCmpUGE(ops[0], ops[1], "fmax.ge"), ops[0], ops[1], "fmax.select");
-         default:
-            assert(0);
-         }
-      case ir_binop_pow:
-         assert(GLSL_TYPE_FLOAT == ir->operands[0]->type->base_type);
-         assert(GLSL_TYPE_FLOAT == ir->operands[1]->type->base_type);
-         return llvm_intrinsic_binop(ir_binop_pow, ops[0], ops[1]);
-      case ir_unop_bit_not:
-         return bld.CreateNot(ops[0]);
-      case ir_binop_bit_and:
-         return bld.CreateAnd(ops[0], ops[1]);
-      case ir_binop_bit_xor:
-         return bld.CreateXor(ops[0], ops[1]);
-      case ir_binop_bit_or:
-         return bld.CreateOr(ops[0], ops[1]);
-      case ir_binop_lshift:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            return bld.CreateLShr(ops[0], ops[1]);
-         default:
-            assert(0);
-         }
-      case ir_binop_rshift:
-         switch(ir->operands[0]->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            return bld.CreateLShr(ops[0], ops[1]);
-         case GLSL_TYPE_INT:
-            return bld.CreateAShr(ops[0], ops[1]);
-         default:
-            assert(0);
-            return 0;
-         }
-      default:
-         printf("ir->operation=%d \n", ir->operation);
-         assert(0);
-         return 0;
-      }
-   }
-
-   virtual void visit(class ir_expression * ir)
-   {
-      result = llvm_expression(ir);
-   }
-
-   virtual void visit(class ir_dereference_array *ir)
-   {
-      result = bld.CreateLoad(llvm_pointer(ir));
-   }
-
-   virtual void visit(class ir_dereference_record *ir)
-   {
-      result = bld.CreateLoad(llvm_pointer(ir));
-   }
-
-   virtual void visit(class ir_dereference_variable *ir)
-   {
-      result = bld.CreateLoad(llvm_pointer(ir), ir->variable_referenced()->name);
-   }
-
-   virtual void visit(class ir_texture * ir)
-   {
-      llvm::Value * coordinate = llvm_value(ir->coordinate);
-      if (ir->projector)
-      {
-         llvm::Value * proj = llvm_value(ir->projector);
-         unsigned width = ((llvm::VectorType*)coordinate->getType())->getNumElements();
-         llvm::Value * div = llvm::Constant::getNullValue(coordinate->getType());
-         for (unsigned i = 0; i < width; i++)
-            div = bld.CreateInsertElement(div, proj, bld.getInt32(i), "texProjDup");
-         coordinate = bld.CreateFDiv(coordinate, div, "texProj");
-      }
-
-      ir_variable * sampler = NULL;
-      if(ir_dereference_variable* deref = ir->sampler->as_dereference_variable())
-         sampler = deref->variable_referenced();
-      else if(ir_dereference_array* deref = ir->sampler->as_dereference_array())
-      {
-         assert(0); // not implemented
-         return;
-         deref->array_index;
-         deref->array;
-      }
-      else if(ir->sampler->as_dereference())
-      {
-         assert(0); // not implemented
-         ir_dereference_record* deref = (ir_dereference_record*)ir->sampler;
-         int idx = deref->record->type->field_index(deref->field);
-         assert(idx >= 0);
-      }
-      else
-         assert(0);
-
-      assert(sampler->location >= 0 && sampler->location < 64); // TODO: proper limit
-
-      // ESSL texture LOD is only for 2D texture in vert shader, and it's explicit
-      // bias used only in frag shader, and added to computed LOD
-      assert(ir_tex == ir->op);
-
-      assert(GLSL_TYPE_FLOAT == sampler->type->sampler_type);
-      printf("sampler '%s' location=%d dim=%d type=%d proj=%d lod=%d \n", sampler->name, sampler->location,
-         sampler->type->sampler_dimensionality, sampler->type->sampler_type,
-         ir->projector ? 1 : 0, ir->lod_info.lod ? 1 : 0);
-      if (GLSL_SAMPLER_DIM_CUBE == sampler->type->sampler_dimensionality)
-         result = texCube(bld, coordinate, sampler->location, gglCtx);
-      else if (GLSL_SAMPLER_DIM_2D == sampler->type->sampler_dimensionality)
-         result = tex2D(bld, coordinate, sampler->location, gglCtx);
-      else
-         assert(0);
-   }
-
-   virtual void visit(class ir_discard * ir)
-   {
-      llvm::BasicBlock* discard = llvm::BasicBlock::Create(ctx, "discard", fun);
-      llvm::BasicBlock* after;
-      if(ir->condition)
-      {
-         after = llvm::BasicBlock::Create(ctx, "discard.survived", fun);
-         bld.CreateCondBr(llvm_value(ir->condition), discard, after);
-      }
-      else
-      {
-         after = llvm::BasicBlock::Create(ctx, "dead_code.discard", fun);
-         bld.CreateBr(discard);
-      }
-
-      bld.SetInsertPoint(discard);
-
-      // FIXME: According to the LLVM mailing list, UnwindInst should not
-      // be used by the frontend since LLVM 3.0, and 'CreateUnwind'
-      // method has been removed from the IRBuilder.  Here's the
-      // temporary workaround.  But it would be better to remove
-      // this in the future.
-      //
-      // A solution after LLVM 3.0: To add a global boolean in the shader to
-      // store whether it was discarded or not and just continue on normally,
-      // and handle the discard outside the shader, in the scanline function.
-      // The discard instruction is not used frequently, so it should be okay
-      // performance wise.
-      //new llvm::UnwindInst(ctx, discard); /// Deprecated
-
-      bb = after;
-      bld.SetInsertPoint(bb);
-   }
-
-   virtual void visit(class ir_loop_jump *ir)
-   {
-      llvm::BasicBlock* target;
-      if(ir->mode == ir_loop_jump::jump_continue)
-         target = loop.first;
-      else if(ir->mode == ir_loop_jump::jump_break)
-         target = loop.second;
-      assert(target);
-
-      bld.CreateBr(target);
-
-      bb = llvm::BasicBlock::Create(ctx, "dead_code.jump", fun);
-      bld.SetInsertPoint(bb);
-   }
-
-   virtual void visit(class ir_loop * ir)
-   {
-      llvm::BasicBlock* body = llvm::BasicBlock::Create(ctx, "loop", fun);
-      llvm::BasicBlock* header = body;
-      llvm::BasicBlock* after = llvm::BasicBlock::Create(ctx, "loop.after", fun);
-      llvm::Value* ctr;
-
-      if(ir->counter)
-      {
-         ctr = llvm_variable(ir->counter);
-         if(ir->from)
-            bld.CreateStore(llvm_value(ir->from), ctr);
-         if(ir->to)
-            header = llvm::BasicBlock::Create(ctx, "loop.header", fun);
-      }
-
-      bld.CreateBr(header);
-
-      if(ir->counter && ir->to)
-      {
-         bld.SetInsertPoint(header);
-         llvm::Value* cond;
-         llvm::Value* load = bld.CreateLoad(ctr);
-         llvm::Value* to = llvm_value(ir->to);
-         switch(ir->counter->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-            cond = bld.CreateICmpULT(load, to);
-            break;
-         case GLSL_TYPE_INT:
-            cond = bld.CreateICmpSLT(load, to);
-            break;
-         case GLSL_TYPE_FLOAT:
-            cond = bld.CreateFCmpOLT(load, to);
-            break;
-         }
-         bld.CreateCondBr(cond, body, after);
-      }
-
-      bld.SetInsertPoint(body);
-
-      std::pair<llvm::BasicBlock*, llvm::BasicBlock*> saved_loop = loop;
-      loop = std::make_pair(header, after);
-      visit_exec_list(&ir->body_instructions, this);
-      loop = saved_loop;
-
-      if(ir->counter && ir->increment)
-      {
-         switch(ir->counter->type->base_type)
-         {
-         case GLSL_TYPE_BOOL:
-         case GLSL_TYPE_UINT:
-         case GLSL_TYPE_INT:
-            bld.CreateStore(bld.CreateAdd(bld.CreateLoad(ctr), llvm_value(ir->increment)), ctr);
-            break;
-         case GLSL_TYPE_FLOAT:
-            bld.CreateStore(bld.CreateFAdd(bld.CreateLoad(ctr), llvm_value(ir->increment)), ctr);
-            break;
-         }
-      }
-      bld.CreateBr(header);
-
-      bb = after;
-      bld.SetInsertPoint(bb);
-   }
-
-   virtual void visit(class ir_if *ir)
-   {
-      llvm::BasicBlock* bbt = llvm::BasicBlock::Create(ctx, "if", fun);
-      llvm::BasicBlock* bbf = llvm::BasicBlock::Create(ctx, "else", fun);
-      llvm::BasicBlock* bbe = llvm::BasicBlock::Create(ctx, "endif", fun);
-      bld.CreateCondBr(llvm_value(ir->condition), bbt, bbf);
-
-      bld.SetInsertPoint(bbt);
-      visit_exec_list(&ir->then_instructions, this);
-      bld.CreateBr(bbe);
-
-      bld.SetInsertPoint(bbf);
-      visit_exec_list(&ir->else_instructions, this);
-      bld.CreateBr(bbe);
-
-      bb = bbe;
-      bld.SetInsertPoint(bb);
-   }
-
-   virtual void visit(class ir_return * ir)
-   {
-      if(!ir->value)
-         bld.CreateRetVoid();
-      else
-         bld.CreateRet(llvm_value(ir->value));
-
-      bb = llvm::BasicBlock::Create(ctx, "dead_code.return", fun);
-      bld.SetInsertPoint(bb);
-   }
-
-   virtual void visit(class ir_call * ir)
-   {
-      std::vector<llvm::Value*> args;
-
-      foreach_iter(exec_list_iterator, iter, *ir)
-      {
-         ir_rvalue *arg = (ir_constant *)iter.get();
-         args.push_back(llvm_value(arg));
-      }
-
-      result = bld.CreateCall(llvm_function(ir->get_callee()), llvm::ArrayRef<llvm::Value*>(args));
-
-      llvm::AttributeSet attr;
-      ((llvm::CallInst*)result)->setAttributes(attr);
-   }
-
-   virtual void visit(class ir_constant * ir)
-   {
-      if (ir->type->base_type == GLSL_TYPE_STRUCT) {
-         std::vector<llvm::Constant*> fields;
-         foreach_iter(exec_list_iterator, iter, ir->components) {
-            ir_constant *field = (ir_constant *)iter.get();
-            fields.push_back(llvm_constant(field));
-         }
-         result = llvm::ConstantStruct::get((llvm::StructType*)llvm_type(ir->type), fields);
-      }
-      else if (ir->type->base_type == GLSL_TYPE_ARRAY) {
-         std::vector<llvm::Constant*> elems;
-         for (unsigned i = 0; i < ir->type->length; i++)
-            elems.push_back(llvm_constant(ir->array_elements[i]));
-         result = llvm::ConstantArray::get((llvm::ArrayType*)llvm_type(ir->type), elems);
-      }
-      else
-      {
-         llvm::Type* base_type = llvm_base_type(ir->type->base_type);
-         llvm::Type* vec_type = llvm_vec_type(ir->type);
-         llvm::Type* type = llvm_type(ir->type);
-
-         std::vector<llvm::Constant*> vecs;
-         unsigned idx = 0;
-         for (unsigned i = 0; i < ir->type->matrix_columns; ++i) {
-            std::vector<llvm::Constant*> elems;
-            for (unsigned j = 0; j < ir->type->vector_elements; ++j) {
-               llvm::Constant* elem;
-               switch(ir->type->base_type)
-               {
-               case GLSL_TYPE_FLOAT:
-                  elem = llvm::ConstantFP::get(base_type, ir->value.f[idx]);
-                  break;
-               case GLSL_TYPE_UINT:
-                  elem = llvm::ConstantInt::get(base_type, ir->value.u[idx]);
-                  break;
-               case GLSL_TYPE_INT:
-                  elem = llvm::ConstantInt::get(base_type, ir->value.i[idx]);
-                  break;
-               case GLSL_TYPE_BOOL:
-                  elem = llvm::ConstantInt::get(base_type, ir->value.b[idx]);
-                  break;
-               }
-               elems.push_back(elem);
-               ++idx;
-            }
-
-            llvm::Constant* vec;
-            if(ir->type->vector_elements > 1) {
-               llvm::ArrayRef<llvm::Constant*> ConstantArray(elems);
-               vec = llvm::ConstantVector::get(ConstantArray);
-            } else {
-               vec = elems[0];
-            }
-            vecs.push_back(vec);
-         }
-
-         if(ir->type->matrix_columns > 1)
-            result = llvm::ConstantArray::get((llvm::ArrayType*)type, vecs);
-         else
-            result = vecs[0];
-      }
-   }
-
-   llvm::Value* llvm_shuffle(llvm::Value* val, int* shuffle_mask, unsigned res_width, const llvm::Twine &name = "")
-   {
-      llvm::Type* elem_type = val->getType();
-      llvm::Type* res_type = elem_type;;
-      unsigned val_width = 1;
-      if(val->getType()->isVectorTy())
-      {
-         val_width = ((llvm::VectorType*)val->getType())->getNumElements();
-         elem_type = ((llvm::VectorType*)val->getType())->getElementType();
-      }
-      if(res_width > 1)
-         res_type = llvm::VectorType::get(elem_type, res_width);
-
-      llvm::Constant* shuffle_mask_values[4];
-      assert(res_width <= 4);
-      bool any_def = false;
-      for(unsigned i = 0; i < res_width; ++i)
-      {
-         if(shuffle_mask[i] < 0)
-            shuffle_mask_values[i] = llvm::UndefValue::get(llvm::Type::getInt32Ty(ctx));
-         else
-         {
-            any_def = true;
-            shuffle_mask_values[i] = llvm_int(shuffle_mask[i]);
-         }
-      }
-
-      llvm::Value* undef = llvm::UndefValue::get(res_type);
-      if(!any_def)
-         return undef;
-
-      if(val_width > 1)
-      {
-         if(res_width > 1)
-         {
-            if(val_width == res_width)
-            {
-               bool nontrivial = false;
-               for(unsigned i = 0; i < val_width; ++i)
-               {
-                  if(shuffle_mask[i] != (int)i)
-                     nontrivial = true;
-               }
-               if(!nontrivial)
-                  return val;
-            }
-
-            return bld.CreateShuffleVector(val, llvm::UndefValue::get(val->getType()), llvm::ConstantVector::get(pack(shuffle_mask_values, res_width)), name);
-         }
-         else
-            return bld.CreateExtractElement(val, llvm_int(shuffle_mask[0]), name);
-      }
-      else
-      {
-         if(res_width > 1)
-         {
-            llvm::Value* tmp = undef;
-            for(unsigned i = 0; i < res_width; ++i)
-            {
-               if(shuffle_mask[i] >= 0)
-               tmp = bld.CreateInsertElement(tmp, val, llvm_int(i), name);
-            }
-            return tmp;
-         }
-         else if(shuffle_mask[0] >= 0)
-            return val;
-         else
-            return undef;
-      }
-   }
-
-
-   virtual void visit(class ir_swizzle * swz)
-   {
-      llvm::Value* val = llvm_value(swz->val);
-      int mask[4] = {swz->mask.x, swz->mask.y, swz->mask.z, swz->mask.w};
-      result = llvm_shuffle(val, mask, swz->mask.num_components, "swizzle");
-   }
-
-   virtual void visit(class ir_assignment * ir)
-   {
-      llvm::Value* lhs = llvm_pointer(ir->lhs);
-      llvm::Value* rhs = llvm_value(ir->rhs);
-      unsigned width = ir->lhs->type->vector_elements;
-      unsigned mask = (1 << width) - 1;
-      assert(rhs);
-
-      // TODO: masking for matrix assignment
-      if (ir->rhs->type->is_matrix()) {
-         bld.CreateStore(rhs, lhs, "mat_str");
-         return;
-      }
-
-      if (!(ir->write_mask & mask))
-         return;
-
-      if (ir->rhs->type->vector_elements < width) {
-         int expand_mask[4] = {-1, -1, -1, -1};
-         for (unsigned i = 0; i < ir->lhs->type->vector_elements; ++i)
-            expand_mask[i] = i;
-//         printf("ve: %u w %u issw: %i\n", ir->rhs->type->vector_elements, width, !!ir->rhs->as_swizzle());
-         rhs = llvm_shuffle(rhs, expand_mask, width, "assign.expand");
-      }
-
-      if (width > 1 && (ir->write_mask & mask) != mask) {
-         llvm::Constant* blend_mask[4];
-         // refer to ir.h: ir_assignment::write_mask
-         // A partially-set write mask means that each enabled channel gets
-         // the value from a consecutive channel of the rhs.
-         unsigned rhsChannel = 0;
-         for (unsigned i = 0; i < width; ++i) {
-            if (ir->write_mask & (1 << i))
-               blend_mask[i] = llvm_int(width + rhsChannel++);
-            else
-               blend_mask[i] = llvm_int(i);
-         }
-         rhs = bld.CreateShuffleVector(bld.CreateLoad(lhs), rhs, llvm::ConstantVector::get(pack(blend_mask, width)), "assign.writemask");
-      }
-
-      if(ir->condition)
-         rhs = bld.CreateSelect(llvm_value(ir->condition), rhs, bld.CreateLoad(lhs), "assign.conditional");
-
-      bld.CreateStore(rhs, lhs);
-   }
-
-   virtual void visit(class ir_variable * var)
-   {
-      llvm_variable(var);
-   }
-
-   virtual void visit(ir_function_signature *sig)
-   {
-      if(!sig->is_defined)
-         return;
-
-      assert(!fun);
-      fun = llvm_function(sig);
-
-      bb = llvm::BasicBlock::Create(ctx, "entry", fun);
-      bld.SetInsertPoint(bb);
-
-      llvm::Function::arg_iterator ai = fun->arg_begin();
-      if (!strcmp("main",sig->function_name()))
-      {
-         assert(3 == fun->arg_size());
-         bld.CreateStore(ai, inputsPtr);
-         inputs = ai;
-         ai++;
-         bld.CreateStore(ai, outputsPtr);
-         outputs = ai;
-         ai++;
-         bld.CreateStore(ai, constantsPtr);
-         constants = ai;
-         ai++;
-      }
-      else
-      {
-         foreach_iter(exec_list_iterator, iter, sig->parameters) {
-            ir_variable* arg = (ir_variable*)iter.get();
-            ai->setName(arg->name);
-            bld.CreateStore(ai, llvm_variable(arg));
-            ++ai;
-         }
-         inputs = bld.CreateLoad(inputsPtr);
-         outputs = bld.CreateLoad(outputsPtr);
-         constants = bld.CreateLoad(constantsPtr);
-      }
-      inputs->setName("gl_inputs");
-      outputs->setName("gl_outputs");
-      constants->setName("gl_constants");
-
-
-
-      foreach_iter(exec_list_iterator, iter, sig->body) {
-         ir_instruction *ir = (ir_instruction *)iter.get();
-
-         ir->accept(this);
-      }
-
-      if(fun->getReturnType()->isVoidTy())
-         bld.CreateRetVoid();
-      else
-         bld.CreateRet(llvm::UndefValue::get(fun->getReturnType()));
-
-      bb = NULL;
-      fun = NULL;
-   }
-
-   virtual void visit(class ir_function * funs)
-   {
-      foreach_iter(exec_list_iterator, iter, *funs)
-      {
-         ir_function_signature* sig = (ir_function_signature*)iter.get();
-         sig->accept(this);
-      }
-   }
-};
-
-struct llvm::Module *
-glsl_ir_to_llvm_module(struct exec_list *ir, llvm::Module * mod,
-                        const struct GGLState * gglCtx, const char * shaderSuffix)
-{
-   ir_to_llvm_visitor v(mod, gglCtx, shaderSuffix);
-
-   visit_exec_list(ir, &v);
-
-//   mod->dump();
-   if(llvm::verifyModule(*mod, llvm::PrintMessageAction, 0))
-   {
-      puts("**\n module verification failed **\n");
-      mod->dump();
-      assert(0);
-      return NULL;
-   }
-
-   return mod;
-   //v.ir_to_llvm_emit_op1(NULL, OPCODE_END, ir_to_llvm_undef_dst, ir_to_llvm_undef);
-}
diff --git a/src/glsl/ir_to_llvm.h b/src/glsl/ir_to_llvm.h
deleted file mode 100644
index a6c5653..0000000
--- a/src/glsl/ir_to_llvm.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef IR_TO_LLVM_H_
-#define IR_TO_LLVM_H_
-
-#include "llvm/IR/Module.h"
-#include "ir.h"
-
-struct llvm::Module * glsl_ir_to_llvm_module(struct exec_list *ir, llvm::Module * mod,
-               const struct GGLState * gglCtx, const char * shaderSuffix);
-
-#endif /* IR_TO_LLVM_H_ */
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
deleted file mode 100644
index 460b672..0000000
--- a/src/glsl/ir_validate.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_validate.cpp
- *
- * Attempts to verify that various invariants of the IR tree are true.
- *
- * In particular, at the moment it makes sure that no single
- * ir_instruction node except for ir_variable appears multiple times
- * in the ir tree.  ir_variable does appear multiple times: Once as a
- * declaration in an exec_list, and multiple times as the endpoint of
- * a dereference chain.
- */
-
-#include <inttypes.h>
-#include "ir.h"
-#include "ir_hierarchical_visitor.h"
-#include "program/hash_table.h"
-#include "glsl_types.h"
-
-class ir_validate : public ir_hierarchical_visitor {
-public:
-   ir_validate()
-   {
-      this->ht = hash_table_ctor(0, hash_table_pointer_hash,
-				 hash_table_pointer_compare);
-
-      this->current_function = NULL;
-
-      this->callback = ir_validate::validate_ir;
-      this->data = ht;
-   }
-
-   ~ir_validate()
-   {
-      hash_table_dtor(this->ht);
-   }
-
-   virtual ir_visitor_status visit(ir_variable *v);
-   virtual ir_visitor_status visit(ir_dereference_variable *ir);
-   virtual ir_visitor_status visit(ir_if *ir);
-
-   virtual ir_visitor_status visit_leave(ir_loop *ir);
-   virtual ir_visitor_status visit_enter(ir_function *ir);
-   virtual ir_visitor_status visit_leave(ir_function *ir);
-   virtual ir_visitor_status visit_enter(ir_function_signature *ir);
-
-   virtual ir_visitor_status visit_leave(ir_expression *ir);
-   virtual ir_visitor_status visit_leave(ir_swizzle *ir);
-
-   virtual ir_visitor_status visit_enter(ir_assignment *ir);
-
-   static void validate_ir(ir_instruction *ir, void *data);
-
-   ir_function *current_function;
-
-   struct hash_table *ht;
-};
-
-
-ir_visitor_status
-ir_validate::visit(ir_dereference_variable *ir)
-{
-   if ((ir->var == NULL) || (ir->var->as_variable() == NULL)) {
-      printf("ir_dereference_variable @ %p does not specify a variable %p\n",
-	     (void *) ir, (void *) ir->var);
-      abort();
-   }
-
-   if (hash_table_find(ht, ir->var) == NULL) {
-      printf("ir_dereference_variable @ %p specifies undeclared variable "
-	     "`%s' @ %p\n",
-	     (void *) ir, ir->var->name, (void *) ir->var);
-      abort();
-   }
-
-   this->validate_ir(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit(ir_if *ir)
-{
-   if (ir->condition->type != glsl_type::bool_type) {
-      printf("ir_if condition %s type instead of bool.\n",
-	     ir->condition->type->name);
-      ir->print();
-      printf("\n");
-      abort();
-   }
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_validate::visit_leave(ir_loop *ir)
-{
-   if (ir->counter != NULL) {
-      if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) {
-	 printf("ir_loop has invalid loop controls:\n"
-		"    counter:   %p\n"
-		"    from:      %p\n"
-		"    to:        %p\n"
-		"    increment: %p\n",
-		(void *) ir->counter, (void *) ir->from, (void *) ir->to,
-                (void *) ir->increment);
-	 abort();
-      }
-
-      if ((ir->cmp < ir_binop_less) || (ir->cmp > ir_binop_nequal)) {
-	 printf("ir_loop has invalid comparitor %d\n", ir->cmp);
-	 abort();
-      }
-   } else {
-      if ((ir->from != NULL) || (ir->from != NULL) || (ir->increment != NULL)) {
-	 printf("ir_loop has invalid loop controls:\n"
-		"    counter:   %p\n"
-		"    from:      %p\n"
-		"    to:        %p\n"
-		"    increment: %p\n",
-		(void *) ir->counter, (void *) ir->from, (void *) ir->to,
-                (void *) ir->increment);
-	 abort();
-      }
-   }
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_validate::visit_enter(ir_function *ir)
-{
-   /* Function definitions cannot be nested.
-    */
-   if (this->current_function != NULL) {
-      printf("Function definition nested inside another function "
-	     "definition:\n");
-      printf("%s %p inside %s %p\n",
-	     ir->name, (void *) ir,
-	     this->current_function->name, (void *) this->current_function);
-      abort();
-   }
-
-   /* Store the current function hierarchy being traversed.  This is used
-    * by the function signature visitor to ensure that the signatures are
-    * linked with the correct functions.
-    */
-   this->current_function = ir;
-
-   this->validate_ir(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit_leave(ir_function *ir)
-{
-   assert(hieralloc_parent(ir->name) == ir);
-
-   this->current_function = NULL;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit_enter(ir_function_signature *ir)
-{
-   if (this->current_function != ir->function()) {
-      printf("Function signature nested inside wrong function "
-	     "definition:\n");
-      printf("%p inside %s %p instead of %s %p\n",
-	     (void *) ir,
-	     this->current_function->name, (void *) this->current_function,
-	     ir->function_name(), (void *) ir->function());
-      abort();
-   }
-
-   this->validate_ir(ir, this->data);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit_leave(ir_expression *ir)
-{
-   switch (ir->operation) {
-   case ir_unop_bit_not:
-      assert(ir->operands[0]->type == ir->type);
-      break;
-   case ir_unop_logic_not:
-      assert(ir->type->base_type == GLSL_TYPE_BOOL);
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-      break;
-
-   case ir_unop_neg:
-   case ir_unop_abs:
-   case ir_unop_sign:
-   case ir_unop_rcp:
-   case ir_unop_rsq:
-   case ir_unop_sqrt:
-      assert(ir->type == ir->operands[0]->type);
-      break;
-
-   case ir_unop_exp:
-   case ir_unop_log:
-   case ir_unop_exp2:
-   case ir_unop_log2:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-      assert(ir->type == ir->operands[0]->type);
-      break;
-
-   case ir_unop_f2i:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-      assert(ir->type->base_type == GLSL_TYPE_INT);
-      break;
-   case ir_unop_i2f:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
-      assert(ir->type->base_type == GLSL_TYPE_FLOAT);
-      break;
-   case ir_unop_f2b:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-      assert(ir->type->base_type == GLSL_TYPE_BOOL);
-      break;
-   case ir_unop_b2f:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-      assert(ir->type->base_type == GLSL_TYPE_FLOAT);
-      break;
-   case ir_unop_i2b:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
-      assert(ir->type->base_type == GLSL_TYPE_BOOL);
-      break;
-   case ir_unop_b2i:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-      assert(ir->type->base_type == GLSL_TYPE_INT);
-      break;
-   case ir_unop_u2f:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
-      assert(ir->type->base_type == GLSL_TYPE_FLOAT);
-      break;
-
-   case ir_unop_any:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
-      assert(ir->type == glsl_type::bool_type);
-      break;
-
-   case ir_unop_trunc:
-   case ir_unop_round_even:
-   case ir_unop_ceil:
-   case ir_unop_floor:
-   case ir_unop_fract:
-   case ir_unop_sin:
-   case ir_unop_cos:
-   case ir_unop_sin_reduced:
-   case ir_unop_cos_reduced:
-   case ir_unop_dFdx:
-   case ir_unop_dFdy:
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-      assert(ir->operands[0]->type == ir->type);
-      break;
-
-   case ir_unop_noise:
-      /* XXX what can we assert here? */
-      break;
-
-   case ir_binop_add:
-   case ir_binop_sub:
-   case ir_binop_mul:
-   case ir_binop_div:
-   case ir_binop_mod:
-   case ir_binop_min:
-   case ir_binop_max:
-   case ir_binop_pow:
-      if (ir->operands[0]->type->is_scalar())
-	 assert(ir->operands[1]->type == ir->type);
-      else if (ir->operands[1]->type->is_scalar())
-	 assert(ir->operands[0]->type == ir->type);
-      else if (ir->operands[0]->type->is_vector() &&
-	       ir->operands[1]->type->is_vector()) {
-	 assert(ir->operands[0]->type == ir->operands[1]->type);
-	 assert(ir->operands[0]->type == ir->type);
-      }
-      break;
-
-   case ir_binop_less:
-   case ir_binop_greater:
-   case ir_binop_lequal:
-   case ir_binop_gequal:
-   case ir_binop_equal:
-   case ir_binop_nequal:
-      /* The semantics of the IR operators differ from the GLSL <, >, <=, >=,
-       * ==, and != operators.  The IR operators perform a component-wise
-       * comparison on scalar or vector types and return a boolean scalar or
-       * vector type of the same size.
-       */
-      assert(ir->type->base_type == GLSL_TYPE_BOOL);
-      assert(ir->operands[0]->type == ir->operands[1]->type);
-      assert(ir->operands[0]->type->is_vector()
-	     || ir->operands[0]->type->is_scalar());
-      assert(ir->operands[0]->type->vector_elements
-	     == ir->type->vector_elements);
-      break;
-
-   case ir_binop_all_equal:
-   case ir_binop_any_nequal:
-      /* GLSL == and != operate on scalars, vectors, matrices and arrays, and
-       * return a scalar boolean.  The IR matches that.
-       */
-      assert(ir->type == glsl_type::bool_type);
-      assert(ir->operands[0]->type == ir->operands[1]->type);
-      break;
-
-   case ir_binop_lshift:
-   case ir_binop_rshift:
-      assert(ir->operands[0]->type->is_integer() &&
-             ir->operands[1]->type->is_integer());
-      if (ir->operands[0]->type->is_scalar()) {
-          assert(ir->operands[1]->type->is_scalar());
-      }
-      if (ir->operands[0]->type->is_vector() &&
-          ir->operands[1]->type->is_vector()) {
-          assert(ir->operands[0]->type->components() ==
-                 ir->operands[1]->type->components());
-      }
-      assert(ir->type == ir->operands[0]->type);
-      break;
-
-   case ir_binop_bit_and:
-   case ir_binop_bit_xor:
-   case ir_binop_bit_or:
-       assert(ir->operands[0]->type->base_type ==
-              ir->operands[1]->type->base_type);
-       assert(ir->type->is_integer());
-       if (ir->operands[0]->type->is_vector() &&
-           ir->operands[1]->type->is_vector()) {
-           assert(ir->operands[0]->type->vector_elements ==
-                  ir->operands[1]->type->vector_elements);
-       }
-       break;
-
-   case ir_binop_logic_and:
-   case ir_binop_logic_xor:
-   case ir_binop_logic_or:
-      assert(ir->type == glsl_type::bool_type);
-      assert(ir->operands[0]->type == glsl_type::bool_type);
-      assert(ir->operands[1]->type == glsl_type::bool_type);
-      break;
-
-   case ir_binop_dot:
-      assert(ir->type == glsl_type::float_type);
-      assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
-      assert(ir->operands[0]->type->is_vector());
-      assert(ir->operands[0]->type == ir->operands[1]->type);
-      break;
-
-   case ir_quadop_vector:
-      /* The vector operator collects some number of scalars and generates a
-       * vector from them.
-       *
-       *  - All of the operands must be scalar.
-       *  - Number of operands must matche the size of the resulting vector.
-       *  - Base type of the operands must match the base type of the result.
-       */
-      assert(ir->type->is_vector());
-      switch (ir->type->vector_elements) {
-      case 2:
-	 assert(ir->operands[0]->type->is_scalar());
-	 assert(ir->operands[0]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[1]->type->is_scalar());
-	 assert(ir->operands[1]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[2] == NULL);
-	 assert(ir->operands[3] == NULL);
-	 break;
-      case 3:
-	 assert(ir->operands[0]->type->is_scalar());
-	 assert(ir->operands[0]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[1]->type->is_scalar());
-	 assert(ir->operands[1]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[2]->type->is_scalar());
-	 assert(ir->operands[2]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[3] == NULL);
-	 break;
-      case 4:
-	 assert(ir->operands[0]->type->is_scalar());
-	 assert(ir->operands[0]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[1]->type->is_scalar());
-	 assert(ir->operands[1]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[2]->type->is_scalar());
-	 assert(ir->operands[2]->type->base_type == ir->type->base_type);
-	 assert(ir->operands[3]->type->is_scalar());
-	 assert(ir->operands[3]->type->base_type == ir->type->base_type);
-	 break;
-      default:
-	 /* The is_vector assertion above should prevent execution from ever
-	  * getting here.
-	  */
-	 assert(!"Should not get here.");
-	 break;
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit_leave(ir_swizzle *ir)
-{
-   int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
-
-   for (unsigned int i = 0; i < ir->type->vector_elements; i++) {
-      if (chans[i] >= ir->val->type->vector_elements) {
-	 printf("ir_swizzle @ %p specifies a channel not present "
-		"in the value.\n", (void *) ir);
-	 ir->print();
-	 abort();
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit(ir_variable *ir)
-{
-   /* An ir_variable is the one thing that can (and will) appear multiple times
-    * in an IR tree.  It is added to the hashtable so that it can be used
-    * in the ir_dereference_variable handler to ensure that a variable is
-    * declared before it is dereferenced.
-    */
-   if (ir->name)
-      assert(hieralloc_parent(ir->name) == ir);
-
-   hash_table_insert(ht, ir, ir);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_validate::visit_enter(ir_assignment *ir)
-{
-   const ir_dereference *const lhs = ir->lhs;
-   if (lhs->type->is_scalar() || lhs->type->is_vector()) {
-      if (ir->write_mask == 0) {
-	 printf("Assignment LHS is %s, but write mask is 0:\n",
-		lhs->type->is_scalar() ? "scalar" : "vector");
-	 ir->print();
-	 abort();
-      }
-
-      int lhs_components = 0;
-      for (int i = 0; i < 4; i++) {
-	 if (ir->write_mask & (1 << i))
-	    lhs_components++;
-      }
-
-      if (lhs_components != ir->rhs->type->vector_elements) {
-	 printf("Assignment count of LHS write mask channels enabled not\n"
-		"matching RHS vector size (%d LHS, %d RHS).\n",
-		lhs_components, ir->rhs->type->vector_elements);
-	 ir->print();
-	 abort();
-      }
-   }
-
-   this->validate_ir(ir, this->data);
-
-   return visit_continue;
-}
-
-void
-ir_validate::validate_ir(ir_instruction *ir, void *data)
-{
-   struct hash_table *ht = (struct hash_table *) data;
-
-   if (hash_table_find(ht, ir)) {
-      printf("Instruction node present twice in ir tree:\n");
-      ir->print();
-      printf("\n");
-      abort();
-   }
-   hash_table_insert(ht, ir, ir);
-}
-
-void
-check_node_type(ir_instruction *ir, void *data)
-{
-   (void) data;
-
-   if (ir->ir_type <= ir_type_unset || ir->ir_type >= ir_type_max) {
-      printf("Instruction node with unset type\n");
-      ir->print(); printf("\n");
-   }
-   assert(ir->type != glsl_type::error_type);
-}
-
-void
-validate_ir_tree(exec_list *instructions)
-{
-   ir_validate v;
-
-   v.run(instructions);
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-
-      visit_tree(ir, check_node_type, NULL);
-   }
-}
diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp
deleted file mode 100644
index 5b8281e..0000000
--- a/src/glsl/ir_variable.cpp
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "ir.h"
-#include "glsl_parser_extras.h"
-#include "glsl_symbol_table.h"
-#include "builtin_variables.h"
-
-static void generate_ARB_draw_buffers_variables(exec_list *,
-						struct _mesa_glsl_parse_state *,
-						bool, _mesa_glsl_parser_targets);
-
-static ir_variable *
-add_variable(const char *name, enum ir_variable_mode mode, int slot,
-	     const glsl_type *type, exec_list *instructions,
-		     glsl_symbol_table *symtab)
-{
-   ir_variable *var = new(symtab) ir_variable(type, name, mode);
-
-   switch (var->mode) {
-   case ir_var_auto:
-   case ir_var_in:
-   case ir_var_uniform:
-      var->read_only = true;
-      break;
-   case ir_var_inout:
-   case ir_var_out:
-      break;
-   default:
-      assert(0);
-      break;
-   }
-
-   var->location = slot;
-   var->explicit_location = (slot >= 0);
-
-   /* Once the variable is created an initialized, add it to the symbol table
-    * and add the declaration to the IR stream.
-    */
-   instructions->push_tail(var);
-
-   symtab->add_variable(var);
-   return var;
-}
-
-static ir_variable *
-add_uniform(exec_list *instructions,
-	    struct _mesa_glsl_parse_state *state,
-	    const char *name, const glsl_type *type)
-{
-   return add_variable(name, ir_var_uniform, -1, type, instructions,
-		       state->symbols);
-}
-
-static void
-add_builtin_variable(const builtin_variable *proto, exec_list *instructions,
-		     glsl_symbol_table *symtab)
-{
-   /* Create a new variable declaration from the description supplied by
-    * the caller.
-    */
-   const glsl_type *const type = symtab->get_type(proto->type);
-
-   assert(type != NULL);
-
-   add_variable(proto->name, proto->mode, proto->slot, type, instructions,
-		symtab);
-}
-
-static void
-add_builtin_constant(exec_list *instructions,
-		     struct _mesa_glsl_parse_state *state,
-		     const char *name, int value)
-{
-   ir_variable *const var = add_variable(name, ir_var_auto,
-					 -1, glsl_type::int_type,
-					 instructions, state->symbols);
-   var->constant_value = new(var) ir_constant(value);
-}
-
-/* Several constants in GLSL ES have different names than normal desktop GLSL.
- * Therefore, this function should only be called on the ES path.
- */
-static void
-generate_100ES_uniforms(exec_list *instructions,
-		     struct _mesa_glsl_parse_state *state)
-{
-   add_builtin_constant(instructions, state, "gl_MaxVertexAttribs",
-			state->Const.MaxVertexAttribs);
-   add_builtin_constant(instructions, state, "gl_MaxVertexUniformVectors",
-			state->Const.MaxVertexUniformComponents);
-   add_builtin_constant(instructions, state, "gl_MaxVaryingVectors",
-			state->Const.MaxVaryingFloats / 4);
-   add_builtin_constant(instructions, state, "gl_MaxVertexTextureImageUnits",
-			state->Const.MaxVertexTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxCombinedTextureImageUnits",
-			state->Const.MaxCombinedTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxTextureImageUnits",
-			state->Const.MaxTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxFragmentUniformVectors",
-			state->Const.MaxFragmentUniformComponents);
-
-   add_uniform(instructions, state, "gl_DepthRange",
-	       state->symbols->get_type("gl_DepthRangeParameters"));
-}
-
-static void
-generate_110_uniforms(exec_list *instructions,
-		      struct _mesa_glsl_parse_state *state)
-{
-   for (unsigned i = 0
-	   ; i < Elements(builtin_110_deprecated_uniforms)
-	   ; i++) {
-      add_builtin_variable(& builtin_110_deprecated_uniforms[i],
-			   instructions, state->symbols);
-   }
-
-   add_builtin_constant(instructions, state, "gl_MaxLights",
-			state->Const.MaxLights);
-   add_builtin_constant(instructions, state, "gl_MaxClipPlanes",
-			state->Const.MaxClipPlanes);
-   add_builtin_constant(instructions, state, "gl_MaxTextureUnits",
-			state->Const.MaxTextureUnits);
-   add_builtin_constant(instructions, state, "gl_MaxTextureCoords",
-			state->Const.MaxTextureCoords);
-   add_builtin_constant(instructions, state, "gl_MaxVertexAttribs",
-			state->Const.MaxVertexAttribs);
-   add_builtin_constant(instructions, state, "gl_MaxVertexUniformComponents",
-			state->Const.MaxVertexUniformComponents);
-   add_builtin_constant(instructions, state, "gl_MaxVaryingFloats",
-			state->Const.MaxVaryingFloats);
-   add_builtin_constant(instructions, state, "gl_MaxVertexTextureImageUnits",
-			state->Const.MaxVertexTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxCombinedTextureImageUnits",
-			state->Const.MaxCombinedTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxTextureImageUnits",
-			state->Const.MaxTextureImageUnits);
-   add_builtin_constant(instructions, state, "gl_MaxFragmentUniformComponents",
-			state->Const.MaxFragmentUniformComponents);
-
-   const glsl_type *const mat4_array_type =
-      glsl_type::get_array_instance(glsl_type::mat4_type,
-				    state->Const.MaxTextureCoords);
-
-   add_uniform(instructions, state, "gl_TextureMatrix", mat4_array_type);
-   add_uniform(instructions, state, "gl_TextureMatrixInverse", mat4_array_type);
-   add_uniform(instructions, state, "gl_TextureMatrixTranspose", mat4_array_type);
-   add_uniform(instructions, state, "gl_TextureMatrixInverseTranspose", mat4_array_type);
-
-   add_uniform(instructions, state, "gl_DepthRange",
-		state->symbols->get_type("gl_DepthRangeParameters"));
-
-   add_uniform(instructions, state, "gl_ClipPlane",
-	       glsl_type::get_array_instance(glsl_type::vec4_type,
-					     state->Const.MaxClipPlanes));
-   add_uniform(instructions, state, "gl_Point",
-	       state->symbols->get_type("gl_PointParameters"));
-
-   const glsl_type *const material_parameters_type =
-      state->symbols->get_type("gl_MaterialParameters");
-   add_uniform(instructions, state, "gl_FrontMaterial", material_parameters_type);
-   add_uniform(instructions, state, "gl_BackMaterial", material_parameters_type);
-
-   const glsl_type *const light_source_array_type =
-      glsl_type::get_array_instance(state->symbols->get_type("gl_LightSourceParameters"), state->Const.MaxLights);
-
-   add_uniform(instructions, state, "gl_LightSource", light_source_array_type);
-
-   const glsl_type *const light_model_products_type =
-      state->symbols->get_type("gl_LightModelProducts");
-   add_uniform(instructions, state, "gl_FrontLightModelProduct",
-	       light_model_products_type);
-   add_uniform(instructions, state, "gl_BackLightModelProduct",
-	       light_model_products_type);
-
-   const glsl_type *const light_products_type =
-      glsl_type::get_array_instance(state->symbols->get_type("gl_LightProducts"),
-				    state->Const.MaxLights);
-   add_uniform(instructions, state, "gl_FrontLightProduct", light_products_type);
-   add_uniform(instructions, state, "gl_BackLightProduct", light_products_type);
-
-   add_uniform(instructions, state, "gl_TextureEnvColor",
-	       glsl_type::get_array_instance(glsl_type::vec4_type,
-					     state->Const.MaxTextureUnits));
-
-   const glsl_type *const texcoords_vec4 =
-      glsl_type::get_array_instance(glsl_type::vec4_type,
-				    state->Const.MaxTextureCoords);
-   add_uniform(instructions, state, "gl_EyePlaneS", texcoords_vec4);
-   add_uniform(instructions, state, "gl_EyePlaneT", texcoords_vec4);
-   add_uniform(instructions, state, "gl_EyePlaneR", texcoords_vec4);
-   add_uniform(instructions, state, "gl_EyePlaneQ", texcoords_vec4);
-   add_uniform(instructions, state, "gl_ObjectPlaneS", texcoords_vec4);
-   add_uniform(instructions, state, "gl_ObjectPlaneT", texcoords_vec4);
-   add_uniform(instructions, state, "gl_ObjectPlaneR", texcoords_vec4);
-   add_uniform(instructions, state, "gl_ObjectPlaneQ", texcoords_vec4);
-
-   add_uniform(instructions, state, "gl_Fog",
-	       state->symbols->get_type("gl_FogParameters"));
-}
-
-/* This function should only be called for ES, not desktop GL. */
-static void
-generate_100ES_vs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
-      add_builtin_variable(& builtin_core_vs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   generate_100ES_uniforms(instructions, state);
-
-   generate_ARB_draw_buffers_variables(instructions, state, false,
-				       vertex_shader);
-}
-
-
-static void
-generate_110_vs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
-      add_builtin_variable(& builtin_core_vs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   for (unsigned i = 0
-	   ; i < Elements(builtin_110_deprecated_vs_variables)
-	   ; i++) {
-      add_builtin_variable(& builtin_110_deprecated_vs_variables[i],
-			   instructions, state->symbols);
-   }
-   generate_110_uniforms(instructions, state);
-
-   /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
-    *
-    *     "As with all arrays, indices used to subscript gl_TexCoord must
-    *     either be an integral constant expressions, or this array must be
-    *     re-declared by the shader with a size. The size can be at most
-    *     gl_MaxTextureCoords. Using indexes close to 0 may aid the
-    *     implementation in preserving varying resources."
-    */
-   const glsl_type *const vec4_array_type =
-      glsl_type::get_array_instance(glsl_type::vec4_type, 0);
-
-   add_variable("gl_TexCoord", ir_var_out, VERT_RESULT_TEX0, vec4_array_type,
-		instructions, state->symbols);
-
-   generate_ARB_draw_buffers_variables(instructions, state, false,
-				       vertex_shader);
-}
-
-
-static void
-generate_120_vs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   /* GLSL version 1.20 did not add any built-in variables in the vertex
-    * shader.
-    */
-   generate_110_vs_variables(instructions, state);
-}
-
-
-static void
-generate_130_vs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   generate_120_vs_variables(instructions, state);
-
-   for (unsigned i = 0; i < Elements(builtin_130_vs_variables); i++) {
-      add_builtin_variable(& builtin_130_vs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   const glsl_type *const clip_distance_array_type =
-      glsl_type::get_array_instance(glsl_type::float_type,
-				    state->Const.MaxClipPlanes);
-
-   /* FINISHME: gl_ClipDistance needs a real location assigned. */
-   add_variable("gl_ClipDistance", ir_var_out, -1, clip_distance_array_type,
-		instructions, state->symbols);
-
-}
-
-
-static void
-initialize_vs_variables(exec_list *instructions,
-			struct _mesa_glsl_parse_state *state)
-{
-
-   switch (state->language_version) {
-   case 100:
-      generate_100ES_vs_variables(instructions, state);
-      break;
-   case 110:
-      generate_110_vs_variables(instructions, state);
-      break;
-   case 120:
-      generate_120_vs_variables(instructions, state);
-      break;
-   case 130:
-      generate_130_vs_variables(instructions, state);
-      break;
-   }
-}
-
-/* This function should only be called for ES, not desktop GL. */
-static void
-generate_100ES_fs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
-      add_builtin_variable(& builtin_core_fs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   for (unsigned i = 0; i < Elements(builtin_100ES_fs_variables); i++) {
-      add_builtin_variable(& builtin_100ES_fs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   generate_100ES_uniforms(instructions, state);
-
-   generate_ARB_draw_buffers_variables(instructions, state, false,
-				       fragment_shader);
-}
-
-static void
-generate_110_fs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
-      add_builtin_variable(& builtin_core_fs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   for (unsigned i = 0; i < Elements(builtin_110_fs_variables); i++) {
-      add_builtin_variable(& builtin_110_fs_variables[i],
-			   instructions, state->symbols);
-   }
-
-   for (unsigned i = 0
-	   ; i < Elements(builtin_110_deprecated_fs_variables)
-	   ; i++) {
-      add_builtin_variable(& builtin_110_deprecated_fs_variables[i],
-			   instructions, state->symbols);
-   }
-   generate_110_uniforms(instructions, state);
-
-   /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
-    *
-    *     "As with all arrays, indices used to subscript gl_TexCoord must
-    *     either be an integral constant expressions, or this array must be
-    *     re-declared by the shader with a size. The size can be at most
-    *     gl_MaxTextureCoords. Using indexes close to 0 may aid the
-    *     implementation in preserving varying resources."
-    */
-   const glsl_type *const vec4_array_type =
-      glsl_type::get_array_instance(glsl_type::vec4_type, 0);
-
-   add_variable("gl_TexCoord", ir_var_in, FRAG_ATTRIB_TEX0, vec4_array_type,
-		instructions, state->symbols);
-
-   generate_ARB_draw_buffers_variables(instructions, state, false,
-				       fragment_shader);
-}
-
-
-static void
-generate_ARB_draw_buffers_variables(exec_list *instructions,
-				    struct _mesa_glsl_parse_state *state,
-				    bool warn, _mesa_glsl_parser_targets target)
-{
-   /* gl_MaxDrawBuffers is available in all shader stages.
-    */
-   ir_variable *const mdb =
-      add_variable("gl_MaxDrawBuffers", ir_var_auto, -1,
-		   glsl_type::int_type, instructions, state->symbols);
-
-   if (warn)
-      mdb->warn_extension = "GL_ARB_draw_buffers";
-
-   mdb->constant_value = new(mdb)
-      ir_constant(int(state->Const.MaxDrawBuffers));
-
-
-   /* gl_FragData is only available in the fragment shader.
-    */
-   if (target == fragment_shader) {
-      const glsl_type *const vec4_array_type =
-	 glsl_type::get_array_instance(glsl_type::vec4_type,
-				       state->Const.MaxDrawBuffers);
-
-      ir_variable *const fd =
-	 add_variable("gl_FragData", ir_var_out, FRAG_RESULT_DATA0,
-		      vec4_array_type, instructions, state->symbols);
-
-      if (warn)
-	 fd->warn_extension = "GL_ARB_draw_buffers";
-   }
-}
-
-static void
-generate_ARB_shader_stencil_export_variables(exec_list *instructions,
-					     struct _mesa_glsl_parse_state *state,
-					     bool warn)
-{
-   /* gl_FragStencilRefARB is only available in the fragment shader.
-    */
-   ir_variable *const fd =
-      add_variable("gl_FragStencilRefARB", ir_var_out, FRAG_RESULT_STENCIL,
-		   glsl_type::int_type, instructions, state->symbols);
-
-   if (warn)
-      fd->warn_extension = "GL_ARB_shader_stencil_export";
-}
-
-static void
-generate_120_fs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   generate_110_fs_variables(instructions, state);
-
-   for (unsigned i = 0
-	   ; i < Elements(builtin_120_fs_variables)
-	   ; i++) {
-      add_builtin_variable(& builtin_120_fs_variables[i],
-			   instructions, state->symbols);
-   }
-}
-
-static void
-generate_130_fs_variables(exec_list *instructions,
-			  struct _mesa_glsl_parse_state *state)
-{
-   generate_120_fs_variables(instructions, state);
-
-   const glsl_type *const clip_distance_array_type =
-      glsl_type::get_array_instance(glsl_type::float_type,
-				    state->Const.MaxClipPlanes);
-
-   /* FINISHME: gl_ClipDistance needs a real location assigned. */
-   add_variable("gl_ClipDistance", ir_var_in, -1, clip_distance_array_type,
-		instructions, state->symbols);
-}
-
-static void
-initialize_fs_variables(exec_list *instructions,
-			struct _mesa_glsl_parse_state *state)
-{
-
-   switch (state->language_version) {
-   case 100:
-      generate_100ES_fs_variables(instructions, state);
-      break;
-   case 110:
-      generate_110_fs_variables(instructions, state);
-      break;
-   case 120:
-      generate_120_fs_variables(instructions, state);
-      break;
-   case 130:
-      generate_130_fs_variables(instructions, state);
-      break;
-   }
-
-   if (state->ARB_shader_stencil_export_enable)
-      generate_ARB_shader_stencil_export_variables(instructions, state,
-						   state->ARB_shader_stencil_export_warn);
-}
-
-void
-_mesa_glsl_initialize_variables(exec_list *instructions,
-				struct _mesa_glsl_parse_state *state)
-{
-   switch (state->target) {
-   case vertex_shader:
-      initialize_vs_variables(instructions, state);
-      break;
-   case geometry_shader:
-      break;
-   case fragment_shader:
-      initialize_fs_variables(instructions, state);
-      break;
-   }
-}
diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp
deleted file mode 100644
index 7d39abb..0000000
--- a/src/glsl/ir_variable_refcount.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_variable_refcount.cpp
- *
- * Provides a visitor which produces a list of variables referenced,
- * how many times they were referenced and assigned, and whether they
- * were defined in the scope.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_variable_refcount.h"
-#include "glsl_types.h"
-
-
-// constructor
-variable_entry::variable_entry(ir_variable *var)
-{
-   this->var = var;
-   assign = NULL;
-   assigned_count = 0;
-   declaration = false;
-   referenced_count = 0;
-}
-
-
-variable_entry *
-ir_variable_refcount_visitor::get_variable_entry(ir_variable *var)
-{
-   assert(var);
-   foreach_iter(exec_list_iterator, iter, this->variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
-      if (entry->var == var)
-	 return entry;
-   }
-
-   variable_entry *entry = new(mem_ctx) variable_entry(var);
-   assert(entry->referenced_count == 0);
-   this->variable_list.push_tail(entry);
-   return entry;
-}
-
-
-ir_visitor_status
-ir_variable_refcount_visitor::visit(ir_variable *ir)
-{
-   variable_entry *entry = this->get_variable_entry(ir);
-   if (entry)
-      entry->declaration = true;
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_variable_refcount_visitor::visit(ir_dereference_variable *ir)
-{
-   ir_variable *const var = ir->variable_referenced();
-   variable_entry *entry = this->get_variable_entry(var);
-
-   if (entry)
-      entry->referenced_count++;
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_variable_refcount_visitor::visit_enter(ir_function_signature *ir)
-{
-   /* We don't want to descend into the function parameters and
-    * dead-code eliminate them, so just accept the body here.
-    */
-   visit_list_elements(this, &ir->body);
-   return visit_continue_with_parent;
-}
-
-
-ir_visitor_status
-ir_variable_refcount_visitor::visit_leave(ir_assignment *ir)
-{
-   variable_entry *entry;
-   entry = this->get_variable_entry(ir->lhs->variable_referenced());
-   if (entry) {
-      entry->assigned_count++;
-      if (entry->assign == NULL)
-	 entry->assign = ir;
-   }
-
-   return visit_continue;
-}
diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h
deleted file mode 100644
index 2939ec1..0000000
--- a/src/glsl/ir_variable_refcount.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file ir_variable_refcount.h
- *
- * Provides a visitor which produces a list of variables referenced,
- * how many times they were referenced and assigned, and whether they
- * were defined in the scope.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
-
-class variable_entry : public exec_node
-{
-public:
-   variable_entry(ir_variable *var);
-
-   ir_variable *var; /* The key: the variable's pointer. */
-   ir_assignment *assign; /* An assignment to the variable, if any */
-
-   /** Number of times the variable is referenced, including assignments. */
-   unsigned referenced_count;
-
-   /** Number of times the variable is assigned. */
-   unsigned assigned_count;
-
-   bool declaration; /* If the variable had a decl in the instruction stream */
-};
-
-class ir_variable_refcount_visitor : public ir_hierarchical_visitor {
-public:
-   ir_variable_refcount_visitor(void)
-   {
-      this->mem_ctx = hieralloc_new(NULL);
-      this->variable_list.make_empty();
-   }
-
-   ~ir_variable_refcount_visitor(void)
-   {
-      hieralloc_free(this->mem_ctx);
-   }
-
-   virtual ir_visitor_status visit(ir_variable *);
-   virtual ir_visitor_status visit(ir_dereference_variable *);
-
-   virtual ir_visitor_status visit_enter(ir_function_signature *);
-   virtual ir_visitor_status visit_leave(ir_assignment *);
-
-   variable_entry *get_variable_entry(ir_variable *var);
-
-   /* List of variable_entry */
-   exec_list variable_list;
-
-   void *mem_ctx;
-};
diff --git a/src/glsl/ir_visitor.h b/src/glsl/ir_visitor.h
deleted file mode 100644
index cf7950d..0000000
--- a/src/glsl/ir_visitor.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef IR_VISITOR_H
-#define IR_VISITOR_H
-
-/**
- * Abstract base class of visitors of IR instruction trees
- */
-class ir_visitor {
-public:
-   virtual ~ir_visitor()
-   {
-      /* empty */
-   }
-
-   /**
-    * \name Visit methods
-    *
-    * As typical for the visitor pattern, there must be one \c visit method for
-    * each concrete subclass of \c ir_instruction.  Virtual base classes within
-    * the hierarchy should not have \c visit methods.
-    */
-   /*@{*/
-   virtual void visit(class ir_variable *) = 0;
-   virtual void visit(class ir_function_signature *) = 0;
-   virtual void visit(class ir_function *) = 0;
-   virtual void visit(class ir_expression *) = 0;
-   virtual void visit(class ir_texture *) = 0;
-   virtual void visit(class ir_swizzle *) = 0;
-   virtual void visit(class ir_dereference_variable *) = 0;
-   virtual void visit(class ir_dereference_array *) = 0;
-   virtual void visit(class ir_dereference_record *) = 0;
-   virtual void visit(class ir_assignment *) = 0;
-   virtual void visit(class ir_constant *) = 0;
-   virtual void visit(class ir_call *) = 0;
-   virtual void visit(class ir_return *) = 0;
-   virtual void visit(class ir_discard *) = 0;
-   virtual void visit(class ir_if *) = 0;
-   virtual void visit(class ir_loop *) = 0;
-   virtual void visit(class ir_loop_jump *) = 0;
-   /*@}*/
-};
-
-/* NOTE: function calls may never return due to discards inside them
- * This is usually not an issue, but if it is, keep it in mind
- */
-class ir_control_flow_visitor : public ir_visitor {
-public:
-   using ir_visitor::visit;
-   virtual void visit(class ir_variable *) {}
-   virtual void visit(class ir_expression *) {}
-   virtual void visit(class ir_texture *) {}
-   virtual void visit(class ir_swizzle *) {}
-   virtual void visit(class ir_dereference_variable *) {}
-   virtual void visit(class ir_dereference_array *) {}
-   virtual void visit(class ir_dereference_record *) {}
-   virtual void visit(class ir_assignment *) {}
-   virtual void visit(class ir_constant *) {}
-   virtual void visit(class ir_call *) {}
-};
-
-#endif /* IR_VISITOR_H */
diff --git a/src/glsl/link_functions.cpp b/src/glsl/link_functions.cpp
deleted file mode 100644
index 6207371..0000000
--- a/src/glsl/link_functions.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-
-#include "main/core.h"
-#include "glsl_symbol_table.h"
-#include "glsl_parser_extras.h"
-#include "ir.h"
-#include "program.h"
-#include "program/hash_table.h"
-#include "linker.h"
-
-static ir_function_signature *
-find_matching_signature(const char *name, const exec_list *actual_parameters,
-			gl_shader **shader_list, unsigned num_shaders);
-
-class call_link_visitor : public ir_hierarchical_visitor {
-public:
-   call_link_visitor(gl_shader_program *prog, gl_shader *linked,
-		     gl_shader **shader_list, unsigned num_shaders)
-   {
-      this->prog = prog;
-      this->shader_list = shader_list;
-      this->num_shaders = num_shaders;
-      this->success = true;
-      this->linked = linked;
-
-      this->locals = hash_table_ctor(0, hash_table_pointer_hash,
-				     hash_table_pointer_compare);
-   }
-
-   ~call_link_visitor()
-   {
-      hash_table_dtor(this->locals);
-   }
-
-   virtual ir_visitor_status visit(ir_variable *ir)
-   {
-      hash_table_insert(locals, ir, ir);
-      return visit_continue;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_call *ir)
-   {
-      /* If ir is an ir_call from a function that was imported from another
-       * shader callee will point to an ir_function_signature in the original
-       * shader.  In this case the function signature MUST NOT BE MODIFIED.
-       * Doing so will modify the original shader.  This may prevent that
-       * shader from being linkable in other programs.
-       */
-      const ir_function_signature *const callee = ir->get_callee();
-      assert(callee != NULL);
-      const char *const name = callee->function_name();
-
-      /* Determine if the requested function signature already exists in the
-       * final linked shader.  If it does, use it as the target of the call.
-       */
-      ir_function_signature *sig =
-	 find_matching_signature(name, &callee->parameters, &linked, 1);
-      if (sig != NULL) {
-	 ir->set_callee(sig);
-	 return visit_continue;
-      }
-
-      /* Try to find the signature in one of the other shaders that is being
-       * linked.  If it's not found there, return an error.
-       */
-      sig = find_matching_signature(name, &ir->actual_parameters, shader_list,
-				    num_shaders);
-      if (sig == NULL) {
-	 /* FINISHME: Log the full signature of unresolved function.
-	  */
-	 linker_error_printf(this->prog, "unresolved reference to function "
-			     "`%s'\n", name);
-	 this->success = false;
-	 return visit_stop;
-      }
-
-      /* Find the prototype information in the linked shader.  Generate any
-       * details that may be missing.
-       */
-      ir_function *f = linked->symbols->get_function(name);
-      if (f == NULL)
-	 f = new(linked) ir_function(name);
-
-      ir_function_signature *linked_sig =
-	 f->exact_matching_signature(&callee->parameters);
-      if (linked_sig == NULL) {
-	 linked_sig = new(linked) ir_function_signature(callee->return_type);
-	 f->add_signature(linked_sig);
-      }
-
-      /* At this point linked_sig and called may be the same.  If ir is an
-       * ir_call from linked then linked_sig and callee will be
-       * ir_function_signatures that have no definitions (is_defined is false).
-       */
-      assert(!linked_sig->is_defined);
-      assert(linked_sig->body.is_empty());
-
-      /* Create an in-place clone of the function definition.  This multistep
-       * process introduces some complexity here, but it has some advantages.
-       * The parameter list and the and function body are cloned separately.
-       * The clone of the parameter list is used to prime the hashtable used
-       * to replace variable references in the cloned body.
-       *
-       * The big advantage is that the ir_function_signature does not change.
-       * This means that we don't have to process the rest of the IR tree to
-       * patch ir_call nodes.  In addition, there is no way to remove or
-       * replace signature stored in a function.  One could easily be added,
-       * but this avoids the need.
-       */
-      struct hash_table *ht = hash_table_ctor(0, hash_table_pointer_hash,
-					      hash_table_pointer_compare);
-      exec_list formal_parameters;
-      foreach_list_const(node, &sig->parameters) {
-	 const ir_instruction *const original = (ir_instruction *) node;
-	 assert(const_cast<ir_instruction *>(original)->as_variable());
-
-	 ir_instruction *copy = original->clone(linked, ht);
-	 formal_parameters.push_tail(copy);
-      }
-
-      linked_sig->replace_parameters(&formal_parameters);
-
-      foreach_list_const(node, &sig->body) {
-	 const ir_instruction *const original = (ir_instruction *) node;
-
-	 ir_instruction *copy = original->clone(linked, ht);
-	 linked_sig->body.push_tail(copy);
-      }
-
-      linked_sig->is_defined = true;
-      hash_table_dtor(ht);
-
-      /* Patch references inside the function to things outside the function
-       * (i.e., function calls and global variables).
-       */
-      linked_sig->accept(this);
-
-      ir->set_callee(linked_sig);
-
-      return visit_continue;
-   }
-
-   virtual ir_visitor_status visit(ir_dereference_variable *ir)
-   {
-      if (hash_table_find(locals, ir->var) == NULL) {
-	 /* The non-function variable must be a global, so try to find the
-	  * variable in the shader's symbol table.  If the variable is not
-	  * found, then it's a global that *MUST* be defined in the original
-	  * shader.
-	  */
-	 ir_variable *var = linked->symbols->get_variable(ir->var->name);
-	 if (var == NULL) {
-	    /* Clone the ir_variable that the dereference already has and add
-	     * it to the linked shader.
-	     */
-	    var = ir->var->clone(linked, NULL);
-	    linked->symbols->add_variable(var);
-	    linked->ir->push_head(var);
-	 }
-
-	 ir->var = var;
-      }
-
-      return visit_continue;
-   }
-
-   /** Was function linking successful? */
-   bool success;
-
-private:
-   /**
-    * Shader program being linked
-    *
-    * This is only used for logging error messages.
-    */
-   gl_shader_program *prog;
-
-   /** List of shaders available for linking. */
-   gl_shader **shader_list;
-
-   /** Number of shaders available for linking. */
-   unsigned num_shaders;
-
-   /**
-    * Final linked shader
-    *
-    * This is used two ways.  It is used to find global variables in the
-    * linked shader that are accessed by the function.  It is also used to add
-    * global variables from the shader where the function originated.
-    */
-   gl_shader *linked;
-
-   /**
-    * Table of variables local to the function.
-    */
-   hash_table *locals;
-};
-
-
-/**
- * Searches a list of shaders for a particular function definition
- */
-ir_function_signature *
-find_matching_signature(const char *name, const exec_list *actual_parameters,
-			gl_shader **shader_list, unsigned num_shaders)
-{
-   for (unsigned i = 0; i < num_shaders; i++) {
-      ir_function *const f = shader_list[i]->symbols->get_function(name);
-
-      if (f == NULL)
-	 continue;
-
-      ir_function_signature *sig = f->matching_signature(actual_parameters);
-
-      if ((sig == NULL) || !sig->is_defined)
-	 continue;
-
-      return sig;
-   }
-
-   return NULL;
-}
-
-
-bool
-link_function_calls(gl_shader_program *prog, gl_shader *main,
-		    gl_shader **shader_list, unsigned num_shaders)
-{
-   call_link_visitor v(prog, main, shader_list, num_shaders);
-
-   v.run(main->ir);
-   return v.success;
-}
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
deleted file mode 100644
index d77b6a3..0000000
--- a/src/glsl/linker.cpp
+++ /dev/null
@@ -1,1769 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file linker.cpp
- * GLSL linker implementation
- *
- * Given a set of shaders that are to be linked to generate a final program,
- * there are three distinct stages.
- *
- * In the first stage shaders are partitioned into groups based on the shader
- * type.  All shaders of a particular type (e.g., vertex shaders) are linked
- * together.
- *
- *   - Undefined references in each shader are resolve to definitions in
- *     another shader.
- *   - Types and qualifiers of uniforms, outputs, and global variables defined
- *     in multiple shaders with the same name are verified to be the same.
- *   - Initializers for uniforms and global variables defined
- *     in multiple shaders with the same name are verified to be the same.
- *
- * The result, in the terminology of the GLSL spec, is a set of shader
- * executables for each processing unit.
- *
- * After the first stage is complete, a series of semantic checks are performed
- * on each of the shader executables.
- *
- *   - Each shader executable must define a \c main function.
- *   - Each vertex shader executable must write to \c gl_Position.
- *   - Each fragment shader executable must write to either \c gl_FragData or
- *     \c gl_FragColor.
- *
- * In the final stage individual shader executables are linked to create a
- * complete exectuable.
- *
- *   - Types of uniforms defined in multiple shader stages with the same name
- *     are verified to be the same.
- *   - Initializers for uniforms defined in multiple shader stages with the
- *     same name are verified to be the same.
- *   - Types and qualifiers of outputs defined in one stage are verified to
- *     be the same as the types and qualifiers of inputs defined with the same
- *     name in a later stage.
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-#include <cstddef>
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-#include <climits>
-
-#include <pixelflinger2/pixelflinger2_interface.h>
-
-extern "C" {
-#include <hieralloc.h>
-}
-
-#include "main/core.h"
-#include "glsl_symbol_table.h"
-#include "ir.h"
-#include "program.h"
-#include "program/hash_table.h"
-#include "linker.h"
-#include "ir_optimization.h"
-
-#include "main/shaderobj.h"
-
-/**
- * Visitor that determines whether or not a variable is ever written.
- */
-class find_assignment_visitor : public ir_hierarchical_visitor {
-public:
-   find_assignment_visitor(const char *name)
-      : name(name), found(false)
-   {
-      /* empty */
-   }
-
-   virtual ir_visitor_status visit_enter(ir_assignment *ir)
-   {
-      ir_variable *const var = ir->lhs->variable_referenced();
-
-      if (strcmp(name, var->name) == 0) {
-	 found = true;
-	 return visit_stop;
-      }
-
-      return visit_continue_with_parent;
-   }
-
-   using ir_hierarchical_visitor::visit_enter;
-   virtual ir_visitor_status visit_enter(ir_call *ir)
-   {
-      exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
-      foreach_iter(exec_list_iterator, iter, *ir) {
-	 ir_rvalue *param_rval = (ir_rvalue *)iter.get();
-	 ir_variable *sig_param = (ir_variable *)sig_iter.get();
-
-	 if (sig_param->mode == ir_var_out ||
-	     sig_param->mode == ir_var_inout) {
-	    ir_variable *var = param_rval->variable_referenced();
-	    if (var && strcmp(name, var->name) == 0) {
-	       found = true;
-	       return visit_stop;
-	    }
-	 }
-	 sig_iter.next();
-      }
-
-      return visit_continue_with_parent;
-   }
-
-   bool variable_found()
-   {
-      return found;
-   }
-
-private:
-   const char *name;       /**< Find writes to a variable with this name. */
-   bool found;             /**< Was a write to the variable found? */
-};
-
-
-/**
- * Visitor that determines whether or not a variable is ever read.
- */
-class find_deref_visitor : public ir_hierarchical_visitor {
-public:
-   find_deref_visitor(const char *name)
-      : name(name), found(false)
-   {
-      /* empty */
-   }
-
-   using ir_hierarchical_visitor::visit;
-   virtual ir_visitor_status visit(ir_dereference_variable *ir)
-   {
-      if (strcmp(this->name, ir->var->name) == 0) {
-	 this->found = true;
-	 return visit_stop;
-      }
-
-      return visit_continue;
-   }
-
-   bool variable_found() const
-   {
-      return this->found;
-   }
-
-private:
-   const char *name;       /**< Find writes to a variable with this name. */
-   bool found;             /**< Was a write to the variable found? */
-};
-
-
-void
-linker_error_printf(gl_shader_program *prog, const char *fmt, ...)
-{
-   va_list ap;
-
-   prog->InfoLog = hieralloc_strdup_append(prog->InfoLog, "error: ");
-   va_start(ap, fmt);
-   prog->InfoLog = hieralloc_vasprintf_append(prog->InfoLog, fmt, ap);
-   va_end(ap);
-}
-
-
-void
-invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
-			      int generic_base)
-{
-   foreach_list(node, sh->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-      if ((var == NULL) || (var->mode != (unsigned) mode))
-	 continue;
-
-      /* Only assign locations for generic attributes / varyings / etc.
-       */
-      if ((var->location >= generic_base) && !var->explicit_location)
-	  var->location = -1;
-   }
-}
-
-
-/**
- * Determine the number of attribute slots required for a particular type
- *
- * This code is here because it implements the language rules of a specific
- * GLSL version.  Since it's a property of the language and not a property of
- * types in general, it doesn't really belong in glsl_type.
- */
-unsigned
-count_attribute_slots(const glsl_type *t)
-{
-   /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec:
-    *
-    *     "A scalar input counts the same amount against this limit as a vec4,
-    *     so applications may want to consider packing groups of four
-    *     unrelated float inputs together into a vector to better utilize the
-    *     capabilities of the underlying hardware. A matrix input will use up
-    *     multiple locations.  The number of locations used will equal the
-    *     number of columns in the matrix."
-    *
-    * The spec does not explicitly say how arrays are counted.  However, it
-    * should be safe to assume the total number of slots consumed by an array
-    * is the number of entries in the array multiplied by the number of slots
-    * consumed by a single element of the array.
-    */
-
-   if (t->is_array())
-      return t->array_size() * count_attribute_slots(t->element_type());
-
-   if (t->is_matrix())
-      return t->matrix_columns;
-
-   return 1;
-}
-
-
-/**
- * Verify that a vertex shader executable meets all semantic requirements
- *
- * \param shader  Vertex shader executable to be verified
- */
-bool
-validate_vertex_shader_executable(struct gl_shader_program *prog,
-				  struct gl_shader *shader)
-{
-   if (shader == NULL)
-      return true;
-
-   find_assignment_visitor find("gl_Position");
-   find.run(shader->ir);
-   if (!find.variable_found()) {
-      linker_error_printf(prog,
-			  "vertex shader does not write to `gl_Position'\n");
-      return false;
-   }
-
-   return true;
-}
-
-
-/**
- * Verify that a fragment shader executable meets all semantic requirements
- *
- * \param shader  Fragment shader executable to be verified
- */
-bool
-validate_fragment_shader_executable(struct gl_shader_program *prog,
-				    struct gl_shader *shader)
-{
-   if (shader == NULL)
-      return true;
-
-   find_assignment_visitor frag_color("gl_FragColor");
-   find_assignment_visitor frag_data("gl_FragData");
-
-   frag_color.run(shader->ir);
-   frag_data.run(shader->ir);
-
-   if (frag_color.variable_found() && frag_data.variable_found()) {
-      linker_error_printf(prog,  "fragment shader writes to both "
-			  "`gl_FragColor' and `gl_FragData'\n");
-      return false;
-   }
-
-   return true;
-}
-
-
-/**
- * Generate a string describing the mode of a variable
- */
-static const char *
-mode_string(const ir_variable *var)
-{
-   switch (var->mode) {
-   case ir_var_auto:
-      return (var->read_only) ? "global constant" : "global variable";
-
-   case ir_var_uniform: return "uniform";
-   case ir_var_in:      return "shader input";
-   case ir_var_out:     return "shader output";
-   case ir_var_inout:   return "shader inout";
-
-   case ir_var_temporary:
-   default:
-      assert(!"Should not get here.");
-      return "invalid variable";
-   }
-}
-
-
-/**
- * Perform validation of global variables used across multiple shaders
- */
-bool
-cross_validate_globals(struct gl_shader_program *prog,
-		       struct gl_shader **shader_list,
-		       unsigned num_shaders,
-		       bool uniforms_only)
-{
-   /* Examine all of the uniforms in all of the shaders and cross validate
-    * them.
-    */
-   glsl_symbol_table variables(prog);
-   for (unsigned i = 0; i < num_shaders; i++) {
-      if (shader_list[i] == NULL)
-	 continue;
-
-      foreach_list(node, shader_list[i]->ir) {
-	 ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-	 if (var == NULL)
-	    continue;
-
-	 if (uniforms_only && (var->mode != ir_var_uniform))
-	    continue;
-
-	 /* Don't cross validate temporaries that are at global scope.  These
-	  * will eventually get pulled into the shaders 'main'.
-	  */
-	 if (var->mode == ir_var_temporary)
-	    continue;
-
-	 /* If a global with this name has already been seen, verify that the
-	  * new instance has the same type.  In addition, if the globals have
-	  * initializers, the values of the initializers must be the same.
-	  */
-	 ir_variable *const existing = variables.get_variable(var->name);
-	 if (existing != NULL) {
-	    if (var->type != existing->type) {
-	       /* Consider the types to be "the same" if both types are arrays
-		* of the same type and one of the arrays is implicitly sized.
-		* In addition, set the type of the linked variable to the
-		* explicitly sized array.
-		*/
-	       if (var->type->is_array()
-		   && existing->type->is_array()
-		   && (var->type->fields.array == existing->type->fields.array)
-		   && ((var->type->length == 0)
-		       || (existing->type->length == 0))) {
-		  if (existing->type->length == 0) {
-		     existing->type = var->type;
-		     existing->max_array_access =
-			MAX2(existing->max_array_access,
-			     var->max_array_access);
-		  }
-	       } else {
-		  linker_error_printf(prog, "%s `%s' declared as type "
-				      "`%s' and type `%s'\n",
-				      mode_string(var),
-				      var->name, var->type->name,
-				      existing->type->name);
-		  return false;
-	       }
-	    }
-
-	    if (var->explicit_location) {
-	       if (existing->explicit_location
-		   && (var->location != existing->location)) {
-		     linker_error_printf(prog, "explicit locations for %s "
-					 "`%s' have differing values\n",
-					 mode_string(var), var->name);
-		     return false;
-	       }
-
-	       existing->location = var->location;
-	       existing->explicit_location = true;
-	    }
-
-	    /* FINISHME: Handle non-constant initializers.
-	     */
-	    if (var->constant_value != NULL) {
-	       if (existing->constant_value != NULL) {
-		  if (!var->constant_value->has_value(existing->constant_value)) {
-		     linker_error_printf(prog, "initializers for %s "
-					 "`%s' have differing values\n",
-					 mode_string(var), var->name);
-		     return false;
-		  }
-	       } else
-		  /* If the first-seen instance of a particular uniform did not
-		   * have an initializer but a later instance does, copy the
-		   * initializer to the version stored in the symbol table.
-		   */
-		  /* FINISHME: This is wrong.  The constant_value field should
-		   * FINISHME: not be modified!  Imagine a case where a shader
-		   * FINISHME: without an initializer is linked in two different
-		   * FINISHME: programs with shaders that have differing
-		   * FINISHME: initializers.  Linking with the first will
-		   * FINISHME: modify the shader, and linking with the second
-		   * FINISHME: will fail.
-		   */
-		  existing->constant_value =
-		     var->constant_value->clone(hieralloc_parent(existing), NULL);
-	    }
-
-	    if (existing->invariant != var->invariant) {
-	       linker_error_printf(prog, "declarations for %s `%s' have "
-	                           "mismatching invariant qualifiers\n",
-	                           mode_string(var), var->name);
-	       return false;
-	    }
-	 } else
-	    variables.add_variable(var);
-      }
-   }
-
-   return true;
-}
-
-
-/**
- * Perform validation of uniforms used across multiple shader stages
- */
-bool
-cross_validate_uniforms(struct gl_shader_program *prog)
-{
-   return cross_validate_globals(prog, prog->_LinkedShaders,
-				 MESA_SHADER_TYPES, true);
-}
-
-
-/**
- * Validate that outputs from one stage match inputs of another
- */
-bool
-cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
-				 gl_shader *producer, gl_shader *consumer)
-{
-   glsl_symbol_table parameters(prog);
-   /* FINISHME: Figure these out dynamically. */
-   const char *const producer_stage = "vertex";
-   const char *const consumer_stage = "fragment";
-
-   /* Find all shader outputs in the "producer" stage.
-    */
-   foreach_list(node, producer->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-      /* FINISHME: For geometry shaders, this should also look for inout
-       * FINISHME: variables.
-       */
-      if ((var == NULL) || (var->mode != ir_var_out))
-	 continue;
-
-      parameters.add_variable(var);
-   }
-
-
-   /* Find all shader inputs in the "consumer" stage.  Any variables that have
-    * matching outputs already in the symbol table must have the same type and
-    * qualifiers.
-    */
-   foreach_list(node, consumer->ir) {
-      ir_variable *const input = ((ir_instruction *) node)->as_variable();
-
-      /* FINISHME: For geometry shaders, this should also look for inout
-       * FINISHME: variables.
-       */
-      if ((input == NULL) || (input->mode != ir_var_in))
-	 continue;
-
-      ir_variable *const output = parameters.get_variable(input->name);
-      if (output != NULL) {
-	 /* Check that the types match between stages.
-	  */
-	 if (input->type != output->type) {
-	    /* There is a bit of a special case for gl_TexCoord.  This
-	     * built-in is unsized by default.  Appliations that variable
-	     * access it must redeclare it with a size.  There is some
-	     * language in the GLSL spec that implies the fragment shader
-	     * and vertex shader do not have to agree on this size.  Other
-	     * driver behave this way, and one or two applications seem to
-	     * rely on it.
-	     *
-	     * Neither declaration needs to be modified here because the array
-	     * sizes are fixed later when update_array_sizes is called.
-	     *
-	     * From page 48 (page 54 of the PDF) of the GLSL 1.10 spec:
-	     *
-	     *     "Unlike user-defined varying variables, the built-in
-	     *     varying variables don't have a strict one-to-one
-	     *     correspondence between the vertex language and the
-	     *     fragment language."
-	     */
-	    if (!output->type->is_array()
-		|| (strncmp("gl_", output->name, 3) != 0)) {
-	       linker_error_printf(prog,
-				   "%s shader output `%s' declared as "
-				   "type `%s', but %s shader input declared "
-				   "as type `%s'\n",
-				   producer_stage, output->name,
-				   output->type->name,
-				   consumer_stage, input->type->name);
-	       return false;
-	    }
-	 }
-
-	 /* Check that all of the qualifiers match between stages.
-	  */
-	 if (input->centroid != output->centroid) {
-	    linker_error_printf(prog,
-				"%s shader output `%s' %s centroid qualifier, "
-				"but %s shader input %s centroid qualifier\n",
-				producer_stage,
-				output->name,
-				(output->centroid) ? "has" : "lacks",
-				consumer_stage,
-				(input->centroid) ? "has" : "lacks");
-	    return false;
-	 }
-
-	 if (input->invariant != output->invariant) {
-	    linker_error_printf(prog,
-				"%s shader output `%s' %s invariant qualifier, "
-				"but %s shader input %s invariant qualifier\n",
-				producer_stage,
-				output->name,
-				(output->invariant) ? "has" : "lacks",
-				consumer_stage,
-				(input->invariant) ? "has" : "lacks");
-	    return false;
-	 }
-
-	 if (input->interpolation != output->interpolation) {
-	    linker_error_printf(prog,
-				"%s shader output `%s' specifies %s "
-				"interpolation qualifier, "
-				"but %s shader input specifies %s "
-				"interpolation qualifier\n",
-				producer_stage,
-				output->name,
-				output->interpolation_string(),
-				consumer_stage,
-				input->interpolation_string());
-	    return false;
-	 }
-      }
-   }
-
-   return true;
-}
-
-
-/**
- * Populates a shaders symbol table with all global declarations
- */
-static void
-populate_symbol_table(gl_shader *sh)
-{
-   sh->symbols = new(sh) glsl_symbol_table(sh);
-
-   foreach_list(node, sh->ir) {
-      ir_instruction *const inst = (ir_instruction *) node;
-      ir_variable *var;
-      ir_function *func;
-
-      if ((func = inst->as_function()) != NULL) {
-	 sh->symbols->add_function(func);
-      } else if ((var = inst->as_variable()) != NULL) {
-	 sh->symbols->add_variable(var);
-      }
-   }
-}
-
-
-/**
- * Remap variables referenced in an instruction tree
- *
- * This is used when instruction trees are cloned from one shader and placed in
- * another.  These trees will contain references to \c ir_variable nodes that
- * do not exist in the target shader.  This function finds these \c ir_variable
- * references and replaces the references with matching variables in the target
- * shader.
- *
- * If there is no matching variable in the target shader, a clone of the
- * \c ir_variable is made and added to the target shader.  The new variable is
- * added to \b both the instruction stream and the symbol table.
- *
- * \param inst         IR tree that is to be processed.
- * \param symbols      Symbol table containing global scope symbols in the
- *                     linked shader.
- * \param instructions Instruction stream where new variable declarations
- *                     should be added.
- */
-void
-remap_variables(ir_instruction *inst, struct gl_shader *target,
-		hash_table *temps)
-{
-   class remap_visitor : public ir_hierarchical_visitor {
-   public:
-	 remap_visitor(struct gl_shader *target,
-		    hash_table *temps)
-      {
-	 this->target = target;
-	 this->symbols = target->symbols;
-	 this->instructions = target->ir;
-	 this->temps = temps;
-      }
-
-      using ir_hierarchical_visitor::visit;
-      virtual ir_visitor_status visit(ir_dereference_variable *ir)
-      {
-	 if (ir->var->mode == ir_var_temporary) {
-	    ir_variable *var = (ir_variable *) hash_table_find(temps, ir->var);
-
-	    assert(var != NULL);
-	    ir->var = var;
-	    return visit_continue;
-	 }
-
-	 ir_variable *const existing =
-	    this->symbols->get_variable(ir->var->name);
-	 if (existing != NULL)
-	    ir->var = existing;
-	 else {
-	    ir_variable *copy = ir->var->clone(this->target, NULL);
-
-	    this->symbols->add_variable(copy);
-	    this->instructions->push_head(copy);
-	    ir->var = copy;
-	 }
-
-	 return visit_continue;
-      }
-
-   private:
-      struct gl_shader *target;
-      glsl_symbol_table *symbols;
-      exec_list *instructions;
-      hash_table *temps;
-   };
-
-   remap_visitor v(target, temps);
-
-   inst->accept(&v);
-}
-
-
-/**
- * Move non-declarations from one instruction stream to another
- *
- * The intended usage pattern of this function is to pass the pointer to the
- * head sentinel of a list (i.e., a pointer to the list cast to an \c exec_node
- * pointer) for \c last and \c false for \c make_copies on the first
- * call.  Successive calls pass the return value of the previous call for
- * \c last and \c true for \c make_copies.
- *
- * \param instructions Source instruction stream
- * \param last         Instruction after which new instructions should be
- *                     inserted in the target instruction stream
- * \param make_copies  Flag selecting whether instructions in \c instructions
- *                     should be copied (via \c ir_instruction::clone) into the
- *                     target list or moved.
- *
- * \return
- * The new "last" instruction in the target instruction stream.  This pointer
- * is suitable for use as the \c last parameter of a later call to this
- * function.
- */
-exec_node *
-move_non_declarations(exec_list *instructions, exec_node *last,
-		      bool make_copies, gl_shader *target)
-{
-   hash_table *temps = NULL;
-
-   if (make_copies)
-      temps = hash_table_ctor(0, hash_table_pointer_hash,
-			      hash_table_pointer_compare);
-
-   foreach_list_safe(node, instructions) {
-      ir_instruction *inst = (ir_instruction *) node;
-
-      if (inst->as_function())
-	 continue;
-
-      ir_variable *var = inst->as_variable();
-      if ((var != NULL) && (var->mode != ir_var_temporary))
-	 continue;
-
-      assert(inst->as_assignment()
-	     || ((var != NULL) && (var->mode == ir_var_temporary)));
-
-      if (make_copies) {
-	 inst = inst->clone(target, NULL);
-
-	 if (var != NULL)
-	    hash_table_insert(temps, inst, var);
-	 else
-	    remap_variables(inst, target, temps);
-      } else {
-	 inst->remove();
-      }
-
-      last->insert_after(inst);
-      last = inst;
-   }
-
-   if (make_copies)
-      hash_table_dtor(temps);
-
-   return last;
-}
-
-/**
- * Get the function signature for main from a shader
- */
-static ir_function_signature *
-get_main_function_signature(gl_shader *sh)
-{
-   ir_function *const f = sh->symbols->get_function("main");
-   if (f != NULL) {
-      exec_list void_parameters;
-
-      /* Look for the 'void main()' signature and ensure that it's defined.
-       * This keeps the linker from accidentally pick a shader that just
-       * contains a prototype for main.
-       *
-       * We don't have to check for multiple definitions of main (in multiple
-       * shaders) because that would have already been caught above.
-       */
-      ir_function_signature *sig = f->matching_signature(&void_parameters);
-      if ((sig != NULL) && sig->is_defined) {
-	 return sig;
-      }
-   }
-
-   return NULL;
-}
-
-
-/**
- * Combine a group of shaders for a single stage to generate a linked shader
- *
- * \note
- * If this function is supplied a single shader, it is cloned, and the new
- * shader is returned.
- */
-static struct gl_shader *
-link_intrastage_shaders(void *mem_ctx,
-			const struct gl_context *ctx,
-			struct gl_shader_program *prog,
-			struct gl_shader **shader_list,
-			unsigned num_shaders)
-{
-   /* Check that global variables defined in multiple shaders are consistent.
-    */
-   if (!cross_validate_globals(prog, shader_list, num_shaders, false))
-      return NULL;
-
-   /* Check that there is only a single definition of each function signature
-    * across all shaders.
-    */
-   for (unsigned i = 0; i < (num_shaders - 1); i++) {
-      foreach_list(node, shader_list[i]->ir) {
-	 ir_function *const f = ((ir_instruction *) node)->as_function();
-
-	 if (f == NULL)
-	    continue;
-
-	 for (unsigned j = i + 1; j < num_shaders; j++) {
-	    ir_function *const other =
-	       shader_list[j]->symbols->get_function(f->name);
-
-	    /* If the other shader has no function (and therefore no function
-	     * signatures) with the same name, skip to the next shader.
-	     */
-	    if (other == NULL)
-	       continue;
-
-	    foreach_iter (exec_list_iterator, iter, *f) {
-	       ir_function_signature *sig =
-		  (ir_function_signature *) iter.get();
-
-	       if (!sig->is_defined || sig->is_builtin)
-		  continue;
-
-	       ir_function_signature *other_sig =
-		  other->exact_matching_signature(& sig->parameters);
-
-	       if ((other_sig != NULL) && other_sig->is_defined
-		   && !other_sig->is_builtin) {
-		  linker_error_printf(prog,
-				      "function `%s' is multiply defined",
-				      f->name);
-		  return NULL;
-	       }
-	    }
-	 }
-      }
-   }
-
-   /* Find the shader that defines main, and make a clone of it.
-    *
-    * Starting with the clone, search for undefined references.  If one is
-    * found, find the shader that defines it.  Clone the reference and add
-    * it to the shader.  Repeat until there are no undefined references or
-    * until a reference cannot be resolved.
-    */
-   gl_shader *main = NULL;
-   for (unsigned i = 0; i < num_shaders; i++) {
-      if (get_main_function_signature(shader_list[i]) != NULL) {
-	 main = shader_list[i];
-	 break;
-      }
-   }
-
-   if (main == NULL) {
-      linker_error_printf(prog, "%s shader lacks `main'\n",
-			  (shader_list[0]->Type == GL_VERTEX_SHADER)
-			  ? "vertex" : "fragment");
-      return NULL;
-   }
-
-   gl_shader *linked = _mesa_new_shader(prog, 0, main->Type);
-   linked->ir = new(linked) exec_list;
-   clone_ir_list(mem_ctx, linked->ir, main->ir);
-
-   populate_symbol_table(linked);
-
-   /* The a pointer to the main function in the final linked shader (i.e., the
-    * copy of the original shader that contained the main function).
-    */
-   ir_function_signature *const main_sig = get_main_function_signature(linked);
-
-   /* Move any instructions other than variable declarations or function
-    * declarations into main.
-    */
-   exec_node *insertion_point =
-      move_non_declarations(linked->ir, (exec_node *) &main_sig->body, false,
-			    linked);
-
-   for (unsigned i = 0; i < num_shaders; i++) {
-      if (shader_list[i] == main)
-	 continue;
-
-      insertion_point = move_non_declarations(shader_list[i]->ir,
-					      insertion_point, true, linked);
-   }
-
-   /* Resolve initializers for global variables in the linked shader.
-    */
-   unsigned num_linking_shaders = num_shaders;
-   for (unsigned i = 0; i < num_shaders; i++)
-      num_linking_shaders += shader_list[i]->num_builtins_to_link;
-
-   gl_shader **linking_shaders =
-      (gl_shader **) calloc(num_linking_shaders, sizeof(gl_shader *));
-
-   memcpy(linking_shaders, shader_list,
-	  sizeof(linking_shaders[0]) * num_shaders);
-
-   unsigned idx = num_shaders;
-   for (unsigned i = 0; i < num_shaders; i++) {
-      memcpy(&linking_shaders[idx], shader_list[i]->builtins_to_link,
-	     sizeof(linking_shaders[0]) * shader_list[i]->num_builtins_to_link);
-      idx += shader_list[i]->num_builtins_to_link;
-   }
-
-   assert(idx == num_linking_shaders);
-
-   if (!link_function_calls(prog, linked, linking_shaders,
-			    num_linking_shaders)) {
-      _mesa_delete_shader(ctx, linked);
-      linked = NULL;
-   }
-
-   free(linking_shaders);
-
-   /* Make a pass over all global variables to ensure that arrays with
-    * unspecified sizes have a size specified.  The size is inferred from the
-    * max_array_access field.
-    */
-   if (linked != NULL) {
-      foreach_list(node, linked->ir) {
-	 ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-	 if (var == NULL)
-	    continue;
-
-	 if ((var->mode != ir_var_auto) && (var->mode != ir_var_temporary))
-	    continue;
-
-	 if (!var->type->is_array() || (var->type->length != 0))
-	    continue;
-
-	 const glsl_type *type =
-	    glsl_type::get_array_instance(var->type->fields.array,
-					  var->max_array_access);
-
-	 assert(type != NULL);
-	 var->type = type;
-      }
-   }
-
-   return linked;
-}
-
-
-struct uniform_node {
-   exec_node link;
-   struct gl_uniform *u;
-   unsigned slots;
-};
-
-/**
- * Update the sizes of linked shader uniform arrays to the maximum
- * array index used.
- *
- * From page 81 (page 95 of the PDF) of the OpenGL 2.1 spec:
- *
- *     If one or more elements of an array are active,
- *     GetActiveUniform will return the name of the array in name,
- *     subject to the restrictions listed above. The type of the array
- *     is returned in type. The size parameter contains the highest
- *     array element index used, plus one. The compiler or linker
- *     determines the highest index used.  There will be only one
- *     active uniform reported by the GL per uniform array.
-
- */
-static void
-update_array_sizes(struct gl_shader_program *prog)
-{
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-	 if (prog->_LinkedShaders[i] == NULL)
-	    continue;
-
-      foreach_list(node, prog->_LinkedShaders[i]->ir) {
-	 ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-	 if ((var == NULL) || (var->mode != ir_var_uniform &&
-			       var->mode != ir_var_in &&
-			       var->mode != ir_var_out) ||
-	     !var->type->is_array())
-	    continue;
-
-	 unsigned int size = var->max_array_access;
-	 for (unsigned j = 0; j < MESA_SHADER_TYPES; j++) {
-	       if (prog->_LinkedShaders[j] == NULL)
-		  continue;
-
-	    foreach_list(node2, prog->_LinkedShaders[j]->ir) {
-	       ir_variable *other_var = ((ir_instruction *) node2)->as_variable();
-	       if (!other_var)
-		  continue;
-
-	       if (strcmp(var->name, other_var->name) == 0 &&
-		   other_var->max_array_access > size) {
-		  size = other_var->max_array_access;
-	       }
-	    }
-	 }
-
-	 if (size + 1 != var->type->fields.array->length) {
-	    var->type = glsl_type::get_array_instance(var->type->fields.array,
-						      size + 1);
-	    /* FINISHME: We should update the types of array
-	     * dereferences of this variable now.
-	     */
-	 }
-      }
-   }
-}
-
-static int // returns location assigned
-add_uniform(void *mem_ctx, exec_list *uniforms, struct hash_table *ht,
-	    const char *name, const glsl_type *type, GLenum shader_type,
-	    unsigned *next_shader_pos, unsigned *total_uniforms, unsigned *next_sampler_pos, unsigned * samplers_used)
-{
-   int index = -1;
-   if (type->is_record()) {
-      for (unsigned int i = 0; i < type->length; i++) {
-         const glsl_type *field_type = type->fields.structure[i].type;
-         char *field_name = hieralloc_asprintf(mem_ctx, "%s.%s", name,
-					    type->fields.structure[i].name);
-
-         int firstIndex = add_uniform(mem_ctx, uniforms, ht, field_name, field_type,
-            shader_type, next_shader_pos, total_uniforms, next_sampler_pos, samplers_used);
-         if (i == 0)
-            index = firstIndex;
-      }
-   } else {
-      uniform_node *n = (uniform_node *) hash_table_find(ht, name);
-      unsigned int vec4_slots;
-      const glsl_type *array_elem_type = NULL;
-
-      if (type->is_array()) {
-         array_elem_type = type->fields.array;
-         /* Array of structures. */
-         if (array_elem_type->is_record()) {
-            for (unsigned int i = 0; i < type->length; i++) {
-               char *elem_name = hieralloc_asprintf(mem_ctx, "%s[%d]", name, i);
-               int firstIndex = add_uniform(mem_ctx, uniforms, ht, elem_name, array_elem_type,
-                  shader_type, next_shader_pos, total_uniforms, next_sampler_pos, samplers_used);
-               if (i == 0)
-                  index = firstIndex;
-            }
-            return index;
-         }
-      }
-
-      /* Fix the storage size of samplers at 1 vec4 each. Be sure to pad out
-       * vectors to vec4 slots.
-       */
-      if (type->is_array()) {
-         if (array_elem_type->is_sampler())
-            vec4_slots = type->length;
-         else
-            vec4_slots = type->length * array_elem_type->matrix_columns;
-      } else if (type->is_sampler()) 
-         vec4_slots = 1;
-      else
-         vec4_slots = type->matrix_columns;
-
-      if (n == NULL) {
-         n = (uniform_node *) calloc(1, sizeof(struct uniform_node));
-         n->u = (gl_uniform *) calloc(1, sizeof(struct gl_uniform));
-         n->slots = vec4_slots;
-
-         n->u->Name = strdup(name);
-         n->u->Type = type;
-         n->u->Pos = *next_shader_pos;
-         (*total_uniforms)++;
-    
-         if (type->is_sampler() || (array_elem_type && array_elem_type->is_sampler()))
-         {
-            n->u->Pos = *next_sampler_pos;
-            *next_sampler_pos += vec4_slots;
-         }
-         else
-            (*next_shader_pos) += vec4_slots;
-         hash_table_insert(ht, n, name);
-         uniforms->push_tail(&n->link);
-      }
-      
-      if (type->is_sampler() || (array_elem_type && array_elem_type->is_sampler()))
-         (*samplers_used) |= 1 << n->u->Pos;
-      index = n->u->Pos;
-   }
-   return index;
-}
-
-void
-assign_uniform_locations(struct gl_shader_program *prog)
-{
-   /* */
-   exec_list uniforms;
-   unsigned total_uniforms = 0;
-   unsigned next_sampler_pos = 0; // all shaders in prog share same sampler location
-   hash_table *ht = hash_table_ctor(32, hash_table_string_hash,
-				    hash_table_string_compare);
-   void *mem_ctx = hieralloc_new(prog);
-
-   unsigned next_position = 0; // also number of slots for uniforms
-
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (prog->_LinkedShaders[i] == NULL)
-	 continue;
-
-      prog->_LinkedShaders[i]->SamplersUsed = 0;
-      foreach_list(node, prog->_LinkedShaders[i]->ir) {
-	 ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-	 if ((var == NULL) || (var->mode != ir_var_uniform))
-	    continue;
-
-	 if (strncmp(var->name, "gl_", 3) == 0) {
-	    /* At the moment, we don't allocate uniform locations for
-	     * builtin uniforms.  It's permitted by spec, and we'll
-	     * likely switch to doing that at some point, but not yet.
-	     */
-	    continue;
-	 }
-
-	 var->location = add_uniform(mem_ctx, &uniforms, ht, var->name, var->type,
-		     prog->_LinkedShaders[i]->Type,
-		     &next_position, &total_uniforms, &next_sampler_pos, &prog->_LinkedShaders[i]->SamplersUsed);
-      }
-   }
-
-   gl_uniform_list *ul = hieralloc_zero(prog, gl_uniform_list);
-
-   ul->Size = total_uniforms;
-   ul->NumUniforms = total_uniforms;
-   ul->Uniforms = (gl_uniform *)hieralloc_zero_size(ul, total_uniforms * sizeof(gl_uniform));
-
-   unsigned idx = 0;
-   uniform_node *next;
-   for (uniform_node *node = (uniform_node *) uniforms.head
-	   ; node->link.next != NULL
-	   ; node = next) {
-      next = (uniform_node *) node->link.next;
-
-      node->link.remove();
-      memcpy(&ul->Uniforms[idx], node->u, sizeof(gl_uniform));
-      idx++;
-
-      free(node->u);
-      free(node);
-   }
-
-   hash_table_dtor(ht);
-
-   prog->Uniforms = ul;
-   prog->Uniforms->Slots = next_position;
-   prog->Uniforms->SamplerSlots = next_sampler_pos;
-      
-   hieralloc_free(mem_ctx);
-}
-
-
-/**
- * Find a contiguous set of available bits in a bitmask
- *
- * \param used_mask     Bits representing used (1) and unused (0) locations
- * \param needed_count  Number of contiguous bits needed.
- *
- * \return
- * Base location of the available bits on success or -1 on failure.
- */
-int
-find_available_slots(unsigned used_mask, unsigned needed_count)
-{
-   unsigned needed_mask = (1 << needed_count) - 1;
-   const int max_bit_to_test = (8 * sizeof(used_mask)) - needed_count;
-
-   /* The comparison to 32 is redundant, but without it GCC emits "warning:
-    * cannot optimize possibly infinite loops" for the loop below.
-    */
-   if ((needed_count == 0) || (max_bit_to_test < 0) || (max_bit_to_test > 32))
-      return -1;
-
-   for (int i = 0; i <= max_bit_to_test; i++) {
-      if ((needed_mask & ~used_mask) == needed_mask)
-	 return i;
-
-      needed_mask <<= 1;
-   }
-
-   return -1;
-}
-
-
-bool
-assign_attribute_locations(gl_shader_program *prog, unsigned max_attribute_index)
-{
-   /* Mark invalid attribute locations as being used.
-    */
-   unsigned used_locations = (max_attribute_index >= 32)
-      ? ~0 : ~((1 << max_attribute_index) - 1);
-
-   gl_shader *const sh = prog->_LinkedShaders[0];
-   assert(sh->Type == GL_VERTEX_SHADER);
-   prog->VaryingSlots = 0;
-   /* Operate in a total of four passes.
-    *
-    * 1. Invalidate the location assignments for all vertex shader inputs,
-    *    except for explicit_location and glBindAttribLocation
-    *
-    * 2. Assign locations for inputs that have user-defined (via
-    *    glBindVertexAttribLocation) locatoins.
-    *
-    * 3. Sort the attributes without assigned locations by number of slots
-    *    required in decreasing order.  Fragmentation caused by attribute
-    *    locations assigned by the application may prevent large attributes
-    *    from having enough contiguous space.
-    *
-    * 4. Assign locations to any inputs without assigned locations.
-    */
-   if (prog->Attributes != NULL) {
-      // declare attributes if they haven't been already by BindAttribLocation
-      gl_program_parameter_list * attributes = prog->Attributes;
-         foreach_list(node, sh->ir) {
-            ir_variable *const var = ((ir_instruction *) node)->as_variable();
-            if ((var == NULL) || (var->mode != ir_var_in))
-               continue;
-            if (_mesa_get_parameter(attributes, var->name) < 0)
-                _mesa_add_parameter(attributes, var->name);
-         }
-         
-      for (unsigned i = 0; i < attributes->NumParameters; i++) {
-         gl_program_parameter * param = attributes->Parameters + i;
-         ir_variable * const var = sh->symbols->get_variable(param->Name);
-         if (!var || ir_var_in != var->mode)
-            continue;
-
-         if (param->BindLocation >= 0 && !var->explicit_location)
-            var->location = param->Location = param->BindLocation;
-         else if (var->explicit_location)
-            param->Location = var->location;
-         else
-            var->location = -1;
-         const unsigned slots = count_attribute_slots(var->type);
-         param->Slots = slots;
-         if (0 > var->location)
-            continue;
- 	 /* From page 61 of the OpenGL 4.0 spec:
-	  *
-	  *     "LinkProgram will fail if the attribute bindings assigned by
-	  *     BindAttribLocation do not leave not enough space to assign a
-	  *     location for an active matrix attribute or an active attribute
-	  *     array, both of which require multiple contiguous generic
-	  *     attributes."
-	  *
-	  * Previous versions of the spec contain similar language but omit the
-	  * bit about attribute arrays.
-	  *
-	  * Page 61 of the OpenGL 4.0 spec also says:
-	  *
-	  *     "It is possible for an application to bind more than one
-	  *     attribute name to the same location. This is referred to as
-	  *     aliasing. This will only work if only one of the aliased
-	  *     attributes is active in the executable program, or if no path
-	  *     through the shader consumes more than one attribute of a set
-	  *     of attributes aliased to the same location. A link error can
-	  *     occur if the linker determines that every path through the
-	  *     shader consumes multiple aliased attributes, but
-	  *     implementations are not required to generate an error in this
-	  *     case."
-	  *
-	  * These two paragraphs are either somewhat contradictory, or I don't
-	  * fully understand one or both of them.
-	  */
-	 /* FINISHME: The code as currently written does not support attribute
-	  * FINISHME: location aliasing (see comment above).
-	  */
-         const int attr = param->Location;
-	 /* Mask representing the contiguous slots that will be used by this
-	  * attribute.
-	  */
-	 const unsigned use_mask = (1 << slots) - 1;
-	 /* Generate a link error if the set of bits requested for this
-	  * attribute overlaps any previously allocated bits.
-	  */
-	 if ((use_mask << attr) & used_locations) {
-	    linker_error_printf(prog,
-				"insufficient contiguous attribute locations "
-				"available for vertex shader input `%s'",
-				var->name);
-	    return false;
-	 }
-    
-	 used_locations |= (use_mask << attr);
-      }
-   }
-
-   /* Temporary storage for the set of attributes that need locations assigned.
-    */
-   struct temp_attr {
-      unsigned slots;
-      ir_variable *var;
-
-      /* Used below in the call to qsort. */
-      static int compare(const void *a, const void *b)
-      {
-	 const temp_attr *const l = (const temp_attr *) a;
-	 const temp_attr *const r = (const temp_attr *) b;
-
-	 /* Reversed because we want a descending order sort below. */
-	 return r->slots - l->slots;
-      }
-   } to_assign[16];
-
-   unsigned num_attr = 0;
-
-   foreach_list(node, sh->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-      if ((var == NULL) || (var->mode != ir_var_in))
-         continue;
-      if (var->explicit_location) {
-	 const unsigned slots = count_attribute_slots(var->type);
-	 const unsigned use_mask = (1 << slots) - 1;
-	 const int attr = var->location/* - VERT_ATTRIB_GENERIC0*/;
-
-	 if ((var->location >= (int)(max_attribute_index/* + VERT_ATTRIB_GENERIC0*/))
-	     || (var->location < 0)) {
-	    linker_error_printf(prog,
-				"invalid explicit location %d specified for "
-				"`%s'\n",
-				(var->location < 0) ? var->location : attr,
-				var->name);
-	    return false;
-	 } else if (var->location >= 0/*VERT_ATTRIB_GENERIC0*/) {
-	    used_locations |= (use_mask << attr);
-	 }
-      }
-
-      /* The location was explicitly assigned, nothing to do here.
-       */
-      if (var->location != -1)
-	 continue;
-
-      to_assign[num_attr].slots = count_attribute_slots(var->type);
-      to_assign[num_attr].var = var;
-      num_attr++;
-   }
-
-   /* If all of the attributes were assigned locations by the application (or
-    * are built-in attributes with fixed locations), return early.  This should
-    * be the common case.
-    */
-   if (num_attr == 0)
-      return true;
-
-   qsort(to_assign, num_attr, sizeof(to_assign[0]), temp_attr::compare);
-
-   /* VERT_ATTRIB_GENERIC0 is a psdueo-alias for VERT_ATTRIB_POS.  It can only
-    * be explicitly assigned by via glBindAttribLocation.  Mark it as reserved
-    * to prevent it from being automatically allocated below.
-    */
-   find_deref_visitor find("gl_Vertex");
-   find.run(sh->ir);
-   if (find.variable_found())
-      used_locations |= (1 << 0);
-
-   for (unsigned i = 0; i < num_attr; i++) {
-      /* Mask representing the contiguous slots that will be used by this
-       * attribute.
-       */
-      const unsigned use_mask = (1 << to_assign[i].slots) - 1;
-
-      int location = find_available_slots(used_locations, to_assign[i].slots);
-
-      if (location < 0) {
-	 linker_error_printf(prog,
-			     "insufficient contiguous attribute locations "
-			     "available for vertex shader input `%s'",
-			     to_assign[i].var->name);
-	 return false;
-      }
-
-      to_assign[i].var->location = /*VERT_ATTRIB_GENERIC0 +*/ location;
-      used_locations |= (use_mask << location);
-      int paramIndex = _mesa_get_parameter(prog->Attributes, to_assign[i].var->name);
-      if (0 <= paramIndex)
-         prog->Attributes->Parameters[paramIndex].Location = location;
-   }
-
-   return true;
-}
-
-
-/**
- * Demote shader inputs and outputs that are not used in other stages
- */
-void
-demote_shader_inputs_and_outputs(gl_shader *sh, enum ir_variable_mode mode)
-{
-   foreach_list(node, sh->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-      if ((var == NULL) || (var->mode != int(mode)))
-	 continue;
-
-      /* A shader 'in' or 'out' variable is only really an input or output if
-       * its value is used by other shader stages.  This will cause the variable
-       * to have a location assigned.
-       */
-      if (var->location == -1) {
-	 var->mode = ir_var_auto;
-      }
-   }
-}
-
-void
-assign_varying_locations(struct gl_shader_program *prog,
-			 gl_shader *producer, gl_shader *consumer)
-{
-   prog->VaryingSlots = 0;
-   prog->UsesFragCoord = false;
-   prog->UsesPointCoord = false;
-   /* FINISHME: Set dynamically when geometry shader support is added. */
-   unsigned output_index = offsetof(VertexOutput,varyings) / sizeof(Vector4); /*VERT_RESULT_VAR0*/;
-   unsigned input_index = offsetof(VertexOutput,varyings) / sizeof(Vector4);
-
-   /* Operate in a total of three passes.
-    *
-    * 1. Assign locations for any matching inputs and outputs.
-    *
-    * 2. Mark output variables in the producer that do not have locations as
-    *    not being outputs.  This lets the optimizer eliminate them.
-    *
-    * 3. Mark input variables in the consumer that do not have locations as
-    *    not being inputs.  This lets the optimizer eliminate them.
-    */
-   foreach_list(node, producer->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-      if (!var || ir_var_out != var->mode)
-         continue;  
-      if (!strcmp("gl_Position", var->name))
-         var->location = offsetof(VertexOutput,position) / sizeof(Vector4);
-      else if (!strcmp("gl_PointSize", var->name))
-         var->location = offsetof(VertexOutput,pointSize) / sizeof(Vector4);
-      else
-         var->location = -1;
-   }
-   foreach_list(node, consumer->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-      if (!var || ir_var_in != var->mode)
-         continue;  
-      if (!strcmp("gl_FragCoord", var->name))
-      {
-         var->location = offsetof(VertexOutput,position)/sizeof(Vector4);
-         prog->UsesFragCoord = true;
-      }
-      else if (!strcmp("gl_FrontFacing", var->name))
-         var->location = offsetof(VertexOutput,frontFacingPointCoord)/sizeof(Vector4);
-      else if (!strcmp("gl_PointCoord", var->name))
-      {
-         var->location = offsetof(VertexOutput,frontFacingPointCoord)/sizeof(Vector4);
-         prog->UsesPointCoord = true;
-      }
-      else
-         var->location = -1;
-   }
-
-   foreach_list(node, producer->ir) {
-      ir_variable *const output_var = ((ir_instruction *) node)->as_variable();
-
-      if ((output_var == NULL) || (output_var->mode != ir_var_out))
-         continue;
-      int paramIndex = _mesa_get_parameter(prog->Varying, output_var->name);
-      if (paramIndex < 0)
-         paramIndex = _mesa_add_parameter(prog->Varying, output_var->name);
-      gl_program_parameter * param = prog->Varying->Parameters + paramIndex;
-      if (output_var->location != -1)
-      {
-         param->BindLocation = output_var->location;
-         continue;
-      }
-
-      ir_variable *const input_var =
-	 consumer->symbols->get_variable(output_var->name);
-
-      if ((input_var == NULL) || (input_var->mode != ir_var_in))
-	 continue;
-
-      assert(input_var->location == -1);
-
-      param->BindLocation = output_var->location = output_index;
-      param->Location = input_var->location = input_index;
-
-      /* FINISHME: Support for "varying" records in GLSL 1.50. */
-      assert(!output_var->type->is_record());
-
-      if (output_var->type->is_array()) {
-	 const unsigned slots = output_var->type->length
-	    * output_var->type->fields.array->matrix_columns;
-
-	 output_index += slots;
-	 input_index += slots;
-    prog->VaryingSlots += slots;
-      } else {
-	 const unsigned slots = output_var->type->matrix_columns;
-
-	 output_index += slots;
-	 input_index += slots;
-    prog->VaryingSlots += slots;
-      }
-   }
-
-   foreach_list(node, consumer->ir) {
-      ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
-      if ((var == NULL) || (var->mode != ir_var_in))
-	 continue;
-      int paramIndex = _mesa_get_parameter(prog->Varying, var->name);
-      if (paramIndex < 0)
-         paramIndex = _mesa_add_parameter(prog->Varying, var->name);
-      gl_program_parameter * param = prog->Varying->Parameters + paramIndex;
-      
-      if (var->location == -1) {
-         if (prog->Version <= 120) {
-	    /* On page 25 (page 31 of the PDF) of the GLSL 1.20 spec:
-	     *
-	     *     Only those varying variables used (i.e. read) in
-	     *     the fragment shader executable must be written to
-	     *     by the vertex shader executable; declaring
-	     *     superfluous varying variables in a vertex shader is
-	     *     permissible.
-	     *
-	     * We interpret this text as meaning that the VS must
-	     * write the variable for the FS to read it.  See
-	     * "glsl1-varying read but not written" in piglit.
-	     */
-
-            linker_error_printf(prog, "fragment shader varying %s not written "
-               "by vertex shader\n.", var->name);
-            prog->LinkStatus = false;
-         }
-
-	 /* An 'in' variable is only really a shader input if its
-	  * value is written by the previous stage.
-	  */
-         var->mode = ir_var_auto;
-      }
-      else
-         param->Location = var->location;
-   }
-}
-
-
-void
-link_shaders(const struct gl_context *ctx, struct gl_shader_program *prog)
-{
-   //void *mem_ctx = hieralloc_init("temporary linker context");
-   void * mem_ctx = prog; // need linked & cloned ir to persist 
-
-   prog->LinkStatus = false;
-   prog->Validated = false;
-   prog->_Used = false;
-
-   if (prog->InfoLog != NULL)
-      hieralloc_free(prog->InfoLog);
-
-   prog->InfoLog = hieralloc_strdup(prog, "");
-
-   /* Separate the shaders into groups based on their type.
-    */
-   struct gl_shader **vert_shader_list;
-   unsigned num_vert_shaders = 0;
-   struct gl_shader **frag_shader_list;
-   unsigned num_frag_shaders = 0;
-
-   vert_shader_list = (struct gl_shader **)
-      calloc(2 * prog->NumShaders, sizeof(struct gl_shader *));
-   frag_shader_list =  &vert_shader_list[prog->NumShaders];
-
-   unsigned min_version = UINT_MAX;
-   unsigned max_version = 0;
-   for (unsigned i = 0; i < prog->NumShaders; i++) {
-      min_version = MIN2(min_version, prog->Shaders[i]->Version);
-      max_version = MAX2(max_version, prog->Shaders[i]->Version);
-
-      switch (prog->Shaders[i]->Type) {
-      case GL_VERTEX_SHADER:
-	 vert_shader_list[num_vert_shaders] = prog->Shaders[i];
-	 num_vert_shaders++;
-	 break;
-      case GL_FRAGMENT_SHADER:
-	 frag_shader_list[num_frag_shaders] = prog->Shaders[i];
-	 num_frag_shaders++;
-	 break;
-      case GL_GEOMETRY_SHADER:
-	 /* FINISHME: Support geometry shaders. */
-	 assert(prog->Shaders[i]->Type != GL_GEOMETRY_SHADER);
-	 break;
-      }
-   }
-
-   /* Previous to GLSL version 1.30, different compilation units could mix and
-    * match shading language versions.  With GLSL 1.30 and later, the versions
-    * of all shaders must match.
-    */
-   assert(min_version >= 100);
-   assert(max_version <= 130);
-   if ((max_version >= 130 || min_version == 100)
-       && min_version != max_version) {
-      linker_error_printf(prog, "all shaders must use same shading "
-			  "language version\n");
-      goto done;
-   }
-
-   prog->Version = max_version;
-
-   for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (prog->_LinkedShaders[i] != NULL)
-         _mesa_delete_shader(ctx, prog->_LinkedShaders[i]);
-
-      prog->_LinkedShaders[i] = NULL;
-   }
-
-   /* Link all shaders for a particular stage and validate the result.
-    */
-   if (num_vert_shaders > 0) {
-      gl_shader *const sh =
-	 link_intrastage_shaders(mem_ctx, ctx, prog, vert_shader_list,
-				 num_vert_shaders);
-
-      if (sh == NULL)
-	 goto done;
-
-      if (!validate_vertex_shader_executable(prog, sh))
-	 goto done;
-
-      _mesa_reference_shader(ctx, &prog->_LinkedShaders[MESA_SHADER_VERTEX],
-			     sh);
-   }
-
-   if (num_frag_shaders > 0) {
-      gl_shader *const sh =
-	 link_intrastage_shaders(mem_ctx, ctx, prog, frag_shader_list,
-				 num_frag_shaders);
-
-      if (sh == NULL)
-	 goto done;
-
-      if (!validate_fragment_shader_executable(prog, sh))
-	 goto done;
-
-      _mesa_reference_shader(ctx, &prog->_LinkedShaders[MESA_SHADER_FRAGMENT],
-			     sh);
-   }
-
-   /* Here begins the inter-stage linking phase.  Some initial validation is
-    * performed, then locations are assigned for uniforms, attributes, and
-    * varyings.
-    */
-   if (cross_validate_uniforms(prog)) {
-      unsigned prev;
-
-      for (prev = 0; prev < MESA_SHADER_TYPES; prev++) {
-	 if (prog->_LinkedShaders[prev] != NULL)
-	    break;
-      }
-
-      /* Validate the inputs of each stage with the output of the preceeding
-       * stage.
-       */
-      for (unsigned i = prev + 1; i < MESA_SHADER_TYPES; i++) {
-	 if (prog->_LinkedShaders[i] == NULL)
-	    continue;
-
-	 if (!cross_validate_outputs_to_inputs(prog,
-					       prog->_LinkedShaders[prev],
-					       prog->_LinkedShaders[i]))
-	    goto done;
-
-	 prev = i;
-      }
-
-      prog->LinkStatus = true;
-   }
-
-   /* Do common optimization before assigning storage for attributes,
-    * uniforms, and varyings.  Later optimization could possibly make
-    * some of that unused.
-    */
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (prog->_LinkedShaders[i] == NULL)
-	 continue;
-
-      while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, 32))
-	 ;
-   }
-
-   update_array_sizes(prog);
-
-   assign_uniform_locations(prog);
-
-   if (prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL) {
-      /* FINISHME: The value of the max_attribute_index parameter is
-       * FINISHME: implementation dependent based on the value of
-       * FINISHME: GL_MAX_VERTEX_ATTRIBS.  GL_MAX_VERTEX_ATTRIBS must be
-       * FINISHME: at least 16, so hardcode 16 for now.
-       */
-      if (!assign_attribute_locations(prog, 16)) {
-	 prog->LinkStatus = false;
-	 goto done;
-      }
-      prog->AttributeSlots = 0;
-      for (unsigned i = 0; i < prog->Attributes->NumParameters; i++)
-      {
-         const gl_program_parameter & param = prog->Attributes->Parameters[i];
-         if (param.Location + param.Slots > prog->AttributeSlots)
-            prog->AttributeSlots = param.Location + param.Slots;
-      }
-   }
-
-   unsigned prev;
-   for (prev = 0; prev < MESA_SHADER_TYPES; prev++) {
-      if (prog->_LinkedShaders[prev] != NULL)
-	 break;
-   }
-
-   for (unsigned i = prev + 1; i < MESA_SHADER_TYPES; i++) {
-      if (prog->_LinkedShaders[i] == NULL)
-	 continue;
-
-      assign_varying_locations(prog,
-			       prog->_LinkedShaders[prev],
-			       prog->_LinkedShaders[i]);      
-      prev = i;
-   }
-
-   if (prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL) {
-      demote_shader_inputs_and_outputs(prog->_LinkedShaders[MESA_SHADER_VERTEX],
-				       ir_var_out);
-   }
-
-   if (prog->_LinkedShaders[MESA_SHADER_GEOMETRY] != NULL) {
-      gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_GEOMETRY];
-
-      demote_shader_inputs_and_outputs(sh, ir_var_in);
-      demote_shader_inputs_and_outputs(sh, ir_var_inout);
-      demote_shader_inputs_and_outputs(sh, ir_var_out);
-   }
-
-   if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] != NULL) {
-      gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
-
-      demote_shader_inputs_and_outputs(sh, ir_var_in);
-      
-      foreach_list(node, sh->ir) {
-         ir_variable *const var = ((ir_instruction *) node)->as_variable();
-         if (!var || ir_var_out != var->mode)
-            continue;  
-         if (!strcmp("gl_FragColor", var->name) || !strcmp("gl_FragData", var->name))
-         {
-            int paramIndex = _mesa_get_parameter(prog->Varying, var->name);
-            if (0 > paramIndex)
-               paramIndex = _mesa_add_parameter(prog->Varying, var->name);
-            var->location= offsetof(VertexOutput,fragColor)/sizeof(Vector4);
-            prog->Varying->Parameters[paramIndex].Location = var->location;
-         }
-         else
-            assert(0);
-      }
-   }
-   
-   //prog->InputOuputBase = malloc(1024 * 8);
-   //memset(prog->InputOuputBase, 0xdd, 1024 * 8);
-   prog->InputOuputBase = hieralloc_realloc(prog, prog->InputOuputBase, char, 
-      (prog->Uniforms->Slots + prog->Uniforms->SamplerSlots) * sizeof(float) * 4 + sizeof(VertexInput) + sizeof(VertexOutput) + 16);
-   prog->ValuesVertexInput = (float (*)[4])((((unsigned long)prog->InputOuputBase) + 15L) & (~15L));
-   prog->ValuesVertexOutput = (float (*)[4])((unsigned long)prog->ValuesVertexInput + sizeof(VertexInput));
-   prog->ValuesUniform = (float (*)[4])((unsigned long)prog->ValuesVertexOutput + sizeof(VertexOutput));
-
-   // initialize uniforms to zero after link
-   memset(prog->ValuesUniform, 0, sizeof(float) * 4 * (prog->Uniforms->Slots + prog->Uniforms->SamplerSlots));
-
-done:
-   free(vert_shader_list);
-
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (prog->_LinkedShaders[i] == NULL)
-	 continue;
-
-      /* Retain any live IR, but trash the rest. */
-      reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir);
-   }
-
-   //hieralloc_free(mem_ctx);
-}
diff --git a/src/glsl/linker.h b/src/glsl/linker.h
deleted file mode 100644
index a8ce16a..0000000
--- a/src/glsl/linker.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef GLSL_LINKER_H
-#define GLSL_LINKER_H
-
-extern void
-linker_error_printf(gl_shader_program *prog, const char *fmt, ...);
-
-extern bool
-link_function_calls(gl_shader_program *prog, gl_shader *main,
-		    gl_shader **shader_list, unsigned num_shaders);
-
-#endif /* GLSL_LINKER_H */
diff --git a/src/glsl/list.h b/src/glsl/list.h
deleted file mode 100644
index cf69075..0000000
--- a/src/glsl/list.h
+++ /dev/null
@@ -1,505 +0,0 @@
-/*
- * Copyright © 2008, 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file list.h
- * \brief Doubly-linked list abstract container type.
- *
- * Each doubly-linked list has a sentinel head and tail node.  These nodes
- * contain no data.  The head sentinel can be identified by its \c prev
- * pointer being \c NULL.  The tail sentinel can be identified by its
- * \c next pointer being \c NULL.
- *
- * A list is empty if either the head sentinel's \c next pointer points to the
- * tail sentinel or the tail sentinel's \c prev poiner points to the head
- * sentinel.
- *
- * Instead of tracking two separate \c node structures and a \c list structure
- * that points to them, the sentinel nodes are in a single structure.  Noting
- * that each sentinel node always has one \c NULL pointer, the \c NULL
- * pointers occupy the same memory location.  In the \c list structure
- * contains a the following:
- *
- *   - A \c head pointer that represents the \c next pointer of the
- *     head sentinel node.
- *   - A \c tail pointer that represents the \c prev pointer of the head
- *     sentinel node and the \c next pointer of the tail sentinel node.  This
- *     pointer is \b always \c NULL.
- *   - A \c tail_prev pointer that represents the \c prev pointer of the
- *     tail sentinel node.
- *
- * Therefore, if \c head->next is \c NULL or \c tail_prev->prev is \c NULL,
- * the list is empty.
- *
- * To anyone familiar with "exec lists" on the Amiga, this structure should
- * be immediately recognizable.  See the following link for the original Amiga
- * operating system documentation on the subject.
- *
- * http://www.natami.net/dev/Libraries_Manual_guide/node02D7.html
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-
-#pragma once
-#ifndef LIST_CONTAINER_H
-#define LIST_CONTAINER_H
-
-#ifndef __cplusplus
-#include <stddef.h>
-#include <hieralloc.h>
-#else
-extern "C" {
-#include <hieralloc.h>
-}
-#endif
-
-#include <assert.h>
-
-struct exec_node {
-   struct exec_node *next;
-   struct exec_node *prev;
-
-#ifdef __cplusplus
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *node;
-
-      node = hieralloc_size(ctx, size);
-      assert(node != NULL);
-
-      return node;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. */
-   static void operator delete(void *node)
-   {
-      hieralloc_free(node);
-   }
-
-   exec_node() : next(NULL), prev(NULL)
-   {
-      /* empty */
-   }
-
-   const exec_node *get_next() const
-   {
-      return next;
-   }
-
-   exec_node *get_next()
-   {
-      return next;
-   }
-
-   const exec_node *get_prev() const
-   {
-      return prev;
-   }
-
-   exec_node *get_prev()
-   {
-      return prev;
-   }
-
-   void remove()
-   {
-      next->prev = prev;
-      prev->next = next;
-      next = NULL;
-      prev = NULL;
-   }
-
-   /**
-    * Link a node with itself
-    *
-    * This creates a sort of degenerate list that is occasionally useful.
-    */
-   void self_link()
-   {
-      next = this;
-      prev = this;
-   }
-
-   /**
-    * Insert a node in the list after the current node
-    */
-   void insert_after(exec_node *after)
-   {
-      after->next = this->next;
-      after->prev = this;
-
-      this->next->prev = after;
-      this->next = after;
-   }
-   /**
-    * Insert a node in the list before the current node
-    */
-   void insert_before(exec_node *before)
-   {
-      before->next = this;
-      before->prev = this->prev;
-
-      this->prev->next = before;
-      this->prev = before;
-   }
-
-   /**
-    * Insert another list in the list before the current node
-    */
-   void insert_before(struct exec_list *before);
-
-   /**
-    * Replace the current node with the given node.
-    */
-   void replace_with(exec_node *replacement)
-   {
-      replacement->prev = this->prev;
-      replacement->next = this->next;
-
-      this->prev->next = replacement;
-      this->next->prev = replacement;
-   }
-
-   /**
-    * Is this the sentinel at the tail of the list?
-    */
-   bool is_tail_sentinel() const
-   {
-      return this->next == NULL;
-   }
-
-   /**
-    * Is this the sentinel at the head of the list?
-    */
-   bool is_head_sentinel() const
-   {
-      return this->prev == NULL;
-   }
-#endif
-};
-
-
-#ifdef __cplusplus
-/* This macro will not work correctly if `t' uses virtual inheritance.  If you
- * are using virtual inheritance, you deserve a slow and painful death.  Enjoy!
- */
-#define exec_list_offsetof(t, f, p) \
-   (((char *) &((t *) p)->f) - ((char *) p))
-#else
-#define exec_list_offsetof(t, f, p) offsetof(t, f)
-#endif
-
-/**
- * Get a pointer to the structure containing an exec_node
- *
- * Given a pointer to an \c exec_node embedded in a structure, get a pointer to
- * the containing structure.
- *
- * \param type  Base type of the structure containing the node
- * \param node  Pointer to the \c exec_node
- * \param field Name of the field in \c type that is the embedded \c exec_node
- */
-#define exec_node_data(type, node, field) \
-   ((type *) (((char *) node) - exec_list_offsetof(type, field, node)))
-
-#ifdef __cplusplus
-struct exec_node;
-
-class iterator {
-public:
-   void next()
-   {
-   }
-
-   void *get()
-   {
-      return NULL;
-   }
-
-   bool has_next() const
-   {
-      return false;
-   }
-};
-
-class exec_list_iterator : public iterator {
-public:
-   exec_list_iterator(exec_node *n) : node(n), _next(n->next)
-   {
-      /* empty */
-   }
-
-   void next()
-   {
-      node = _next;
-      _next = node->next;
-   }
-
-   void remove()
-   {
-      node->remove();
-   }
-
-   exec_node *get()
-   {
-      return node;
-   }
-
-   bool has_next() const
-   {
-      return _next != NULL;
-   }
-
-private:
-   exec_node *node;
-   exec_node *_next;
-};
-
-#define foreach_iter(iter_type, iter, container) \
-   for (iter_type iter = (container) . iterator(); iter.has_next(); iter.next())
-#endif
-
-
-struct exec_list {
-   struct exec_node *head;
-   struct exec_node *tail;
-   struct exec_node *tail_pred;
-
-#ifdef __cplusplus
-   /* Callers of this hieralloc-based new need not call delete. It's
-    * easier to just hieralloc_free 'ctx' (or any of its ancestors). */
-   static void* operator new(size_t size, void *ctx)
-   {
-      void *node;
-
-      node = hieralloc_size(ctx, size);
-      assert(node != NULL);
-
-      return node;
-   }
-
-   /* If the user *does* call delete, that's OK, we will just
-    * hieralloc_free in that case. */
-   static void operator delete(void *node)
-   {
-      hieralloc_free(node);
-   }
-
-   exec_list()
-   {
-      make_empty();
-   }
-
-   void make_empty()
-   {
-      head = (exec_node *) & tail;
-      tail = NULL;
-      tail_pred = (exec_node *) & head;
-   }
-
-   bool is_empty() const
-   {
-      /* There are three ways to test whether a list is empty or not.
-       *
-       * - Check to see if the \c head points to the \c tail.
-       * - Check to see if the \c tail_pred points to the \c head.
-       * - Check to see if the \c head is the sentinel node by test whether its
-       *   \c next pointer is \c NULL.
-       *
-       * The first two methods tend to generate better code on modern systems
-       * because they save a pointer dereference.
-       */
-      return head == (exec_node *) &tail;
-   }
-
-   const exec_node *get_head() const
-   {
-      return !is_empty() ? head : NULL;
-   }
-
-   exec_node *get_head()
-   {
-      return !is_empty() ? head : NULL;
-   }
-
-   const exec_node *get_tail() const
-   {
-      return !is_empty() ? tail_pred : NULL;
-   }
-
-   exec_node *get_tail()
-   {
-      return !is_empty() ? tail_pred : NULL;
-   }
-
-   void push_head(exec_node *n)
-   {
-      n->next = head;
-      n->prev = (exec_node *) &head;
-
-      n->next->prev = n;
-      head = n;
-   }
-
-   void push_tail(exec_node *n)
-   {
-      n->next = (exec_node *) &tail;
-      n->prev = tail_pred;
-
-      n->prev->next = n;
-      tail_pred = n;
-   }
-
-   void push_degenerate_list_at_head(exec_node *n)
-   {
-      assert(n->prev->next == n);
-
-      n->prev->next = head;
-      head->prev = n->prev;
-      n->prev = (exec_node *) &head;
-      head = n;
-   }
-
-   /**
-    * Remove the first node from a list and return it
-    *
-    * \return
-    * The first node in the list or \c NULL if the list is empty.
-    *
-    * \sa exec_list::get_head
-    */
-   exec_node *pop_head()
-   {
-      exec_node *const n = this->get_head();
-      if (n != NULL)
-	 n->remove();
-
-      return n;
-   }
-
-   /**
-    * Move all of the nodes from this list to the target list
-    */
-   void move_nodes_to(exec_list *target)
-   {
-      if (is_empty()) {
-	 target->make_empty();
-      } else {
-	 target->head = head;
-	 target->tail = NULL;
-	 target->tail_pred = tail_pred;
-
-	 target->head->prev = (exec_node *) &target->head;
-	 target->tail_pred->next = (exec_node *) &target->tail;
-
-	 make_empty();
-      }
-   }
-
-   /**
-    * Append all nodes from the source list to the target list
-    */
-   void
-   append_list(exec_list *source)
-   {
-      if (source->is_empty())
-	 return;
-
-      /* Link the first node of the source with the last node of the target list.
-       */
-      this->tail_pred->next = source->head;
-      source->head->prev = this->tail_pred;
-
-      /* Make the tail of the source list be the tail of the target list.
-       */
-      this->tail_pred = source->tail_pred;
-      this->tail_pred->next = (exec_node *) &this->tail;
-
-      /* Make the source list empty for good measure.
-       */
-      source->make_empty();
-   }
-
-   exec_list_iterator iterator()
-   {
-      return exec_list_iterator(head);
-   }
-
-   exec_list_iterator iterator() const
-   {
-      return exec_list_iterator((exec_node *) head);
-   }
-#endif
-};
-
-
-#ifdef __cplusplus
-inline void exec_node::insert_before(exec_list *before)
-{
-   if (before->is_empty())
-      return;
-
-   before->tail_pred->next = this;
-   before->head->prev = this->prev;
-
-   this->prev->next = before->head;
-   this->prev = before->tail_pred;
-
-   before->make_empty();
-}
-#endif
-
-/**
- * This version is safe even if the current node is removed.
- */ 
-#define foreach_list_safe(__node, __list)			     \
-   for (exec_node * __node = (__list)->head, * __next = __node->next \
-	; __next != NULL					     \
-	; __node = __next, __next = __next->next)
-
-#define foreach_list(__node, __list)			\
-   for (exec_node * __node = (__list)->head		\
-	; (__node)->next != NULL 			\
-	; (__node) = (__node)->next)
-
-#define foreach_list_const(__node, __list)		\
-   for (const exec_node * __node = (__list)->head	\
-	; (__node)->next != NULL 			\
-	; (__node) = (__node)->next)
-
-#define foreach_list_typed(__type, __node, __field, __list)		\
-   for (__type * __node =						\
-	   exec_node_data(__type, (__list)->head, __field);		\
-	(__node)->__field.next != NULL; 				\
-	(__node) = exec_node_data(__type, (__node)->__field.next, __field))
-
-#define foreach_list_typed_const(__type, __node, __field, __list)	\
-   for (const __type * __node =						\
-	   exec_node_data(__type, (__list)->head, __field);		\
-	(__node)->__field.next != NULL; 				\
-	(__node) = exec_node_data(__type, (__node)->__field.next, __field))
-
-#endif /* LIST_CONTAINER_H */
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
deleted file mode 100644
index 6afd668..0000000
--- a/src/glsl/loop_analysis.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "glsl_types.h"
-#include "loop_analysis.h"
-#include "ir_hierarchical_visitor.h"
-
-static bool is_loop_terminator(ir_if *ir);
-
-static bool all_expression_operands_are_loop_constant(ir_rvalue *,
-						      hash_table *);
-
-static ir_rvalue *get_basic_induction_increment(ir_assignment *, hash_table *);
-
-
-loop_state::loop_state()
-{
-   this->ht = hash_table_ctor(0, hash_table_pointer_hash,
-			      hash_table_pointer_compare);
-   this->mem_ctx = hieralloc_init("loop state");
-}
-
-
-loop_state::~loop_state()
-{
-   hash_table_dtor(this->ht);
-   hieralloc_free(this->mem_ctx);
-}
-
-
-loop_variable_state *
-loop_state::insert(ir_loop *ir)
-{
-   loop_variable_state *ls = new(this->mem_ctx) loop_variable_state;
-   hash_table_insert(this->ht, ls, ir);
-
-   return ls;
-}
-
-
-loop_variable_state *
-loop_state::get(const ir_loop *ir)
-{
-   return (loop_variable_state *) hash_table_find(this->ht, ir);
-}
-
-
-loop_variable *
-loop_variable_state::get(const ir_variable *ir)
-{
-   return (loop_variable *) hash_table_find(this->var_hash, ir);
-}
-
-
-loop_variable *
-loop_variable_state::insert(ir_variable *var)
-{
-   void *mem_ctx = hieralloc_parent(this);
-   loop_variable *lv = hieralloc_zero(mem_ctx, loop_variable);
-
-   lv->var = var;
-
-   hash_table_insert(this->var_hash, lv, lv->var);
-   this->variables.push_tail(lv);
-
-   return lv;
-}
-
-
-loop_terminator *
-loop_variable_state::insert(ir_if *if_stmt)
-{
-   void *mem_ctx = hieralloc_parent(this);
-   loop_terminator *t = hieralloc_zero(mem_ctx, loop_terminator);
-
-   t->ir = if_stmt;
-   this->terminators.push_tail(t);
-
-   return t;
-}
-
-
-class loop_analysis : public ir_hierarchical_visitor {
-public:
-   loop_analysis();
-
-   virtual ir_visitor_status visit(ir_loop_jump *);
-   virtual ir_visitor_status visit(ir_dereference_variable *);
-
-   virtual ir_visitor_status visit_enter(ir_loop *);
-   virtual ir_visitor_status visit_leave(ir_loop *);
-   virtual ir_visitor_status visit_enter(ir_assignment *);
-   virtual ir_visitor_status visit_leave(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_if *);
-   virtual ir_visitor_status visit_leave(ir_if *);
-
-   loop_state *loops;
-
-   int if_statement_depth;
-
-   ir_assignment *current_assignment;
-
-   exec_list state;
-};
-
-
-loop_analysis::loop_analysis()
-{
-   this->loops = new loop_state;
-
-   this->if_statement_depth = 0;
-   this->current_assignment = NULL;
-}
-
-
-ir_visitor_status
-loop_analysis::visit(ir_loop_jump *ir)
-{
-   (void) ir;
-
-   assert(!this->state.is_empty());
-
-   loop_variable_state *const ls =
-      (loop_variable_state *) this->state.get_head();
-
-   ls->num_loop_jumps++;
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-loop_analysis::visit(ir_dereference_variable *ir)
-{
-   /* If we're not somewhere inside a loop, there's nothing to do.
-    */
-   if (this->state.is_empty())
-      return visit_continue;
-
-   loop_variable_state *const ls =
-      (loop_variable_state *) this->state.get_head();
-
-   ir_variable *var = ir->variable_referenced();
-   loop_variable *lv = ls->get(var);
-
-   if (lv == NULL) {
-      lv = ls->insert(var);
-      lv->read_before_write = !this->in_assignee;
-   }
-
-   if (this->in_assignee) {
-      assert(this->current_assignment != NULL);
-
-      lv->conditional_assignment = (this->if_statement_depth > 0)
-	 || (this->current_assignment->condition != NULL);
-
-      if (lv->first_assignment == NULL) {
-	 assert(lv->num_assignments == 0);
-
-	 lv->first_assignment = this->current_assignment;
-      }
-
-      lv->num_assignments++;
-   } else if (lv->first_assignment == this->current_assignment) {
-      /* This catches the case where the variable is used in the RHS of an
-       * assignment where it is also in the LHS.
-       */
-      lv->read_before_write = true;
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_enter(ir_loop *ir)
-{
-   loop_variable_state *ls = this->loops->insert(ir);
-   this->state.push_head(ls);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_leave(ir_loop *ir)
-{
-   loop_variable_state *const ls =
-      (loop_variable_state *) this->state.pop_head();
-
-
-   foreach_list(node, &ir->body_instructions) {
-      /* Skip over declarations at the start of a loop.
-       */
-      if (((ir_instruction *) node)->as_variable())
-	 continue;
-
-      ir_if *if_stmt = ((ir_instruction *) node)->as_if();
-
-      if ((if_stmt != NULL) && is_loop_terminator(if_stmt))
-	 ls->insert(if_stmt);
-      else
-	 break;
-   }
-
-
-   foreach_list_safe(node, &ls->variables) {
-      loop_variable *lv = (loop_variable *) node;
-
-      /* Move variables that are already marked as being loop constant to
-       * a separate list.  These trivially don't need to be tested.
-       */
-      if (lv->is_loop_constant()) {
-	 lv->remove();
-	 ls->constants.push_tail(lv);
-      }
-   }
-
-   /* Each variable assigned in the loop that isn't already marked as being loop
-    * constant might still be loop constant.  The requirements at this point
-    * are:
-    *
-    *    - Variable is written before it is read.
-    *
-    *    - Only one assignment to the variable.
-    *
-    *    - All operands on the RHS of the assignment are also loop constants.
-    *
-    * The last requirement is the reason for the progress loop.  A variable
-    * marked as a loop constant on one pass may allow other variables to be
-    * marked as loop constant on following passes.
-    */
-   bool progress;
-   do {
-      progress = false;
-
-      foreach_list_safe(node, &ls->variables) {
-	 loop_variable *lv = (loop_variable *) node;
-
-	 if (lv->conditional_assignment || (lv->num_assignments > 1))
-	    continue;
-
-	 /* Process the RHS of the assignment.  If all of the variables
-	  * accessed there are loop constants, then add this
-	  */
-	 ir_rvalue *const rhs = lv->first_assignment->rhs;
-	 if (all_expression_operands_are_loop_constant(rhs, ls->var_hash)) {
-	    lv->rhs_clean = true;
-
-	    if (lv->is_loop_constant()) {
-	       progress = true;
-
-	       lv->remove();
-	       ls->constants.push_tail(lv);
-	    }
-	 }
-      }
-   } while (progress);
-
-   /* The remaining variables that are not loop invariant might be loop
-    * induction variables.
-    */
-   foreach_list_safe(node, &ls->variables) {
-      loop_variable *lv = (loop_variable *) node;
-
-      /* If there is more than one assignment to a variable, it cannot be a
-       * loop induction variable.  This isn't strictly true, but this is a
-       * very simple induction variable detector, and it can't handle more
-       * complex cases.
-       */
-      if (lv->num_assignments > 1)
-	 continue;
-
-      /* All of the variables with zero assignments in the loop are loop
-       * invariant, and they should have already been filtered out.
-       */
-      assert(lv->num_assignments == 1);
-      assert(lv->first_assignment != NULL);
-
-      /* The assignmnet to the variable in the loop must be unconditional.
-       */
-      if (lv->conditional_assignment)
-	 continue;
-
-      /* Basic loop induction variables have a single assignment in the loop
-       * that has the form 'VAR = VAR + i' or 'VAR = VAR - i' where i is a
-       * loop invariant.
-       */
-      ir_rvalue *const inc =
-	 get_basic_induction_increment(lv->first_assignment, ls->var_hash);
-      if (inc != NULL) {
-	 lv->iv_scale = NULL;
-	 lv->biv = lv->var;
-	 lv->increment = inc;
-
-	 lv->remove();
-	 ls->induction_variables.push_tail(lv);
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_enter(ir_if *ir)
-{
-   (void) ir;
-
-   if (!this->state.is_empty())
-      this->if_statement_depth++;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_leave(ir_if *ir)
-{
-   (void) ir;
-
-   if (!this->state.is_empty())
-      this->if_statement_depth--;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_enter(ir_assignment *ir)
-{
-   /* If we're not somewhere inside a loop, there's nothing to do.
-    */
-   if (this->state.is_empty())
-      return visit_continue_with_parent;
-
-   this->current_assignment = ir;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-loop_analysis::visit_leave(ir_assignment *ir)
-{
-   /* Since the visit_enter exits with visit_continue_with_parent for this
-    * case, the loop state stack should never be empty here.
-    */
-   assert(!this->state.is_empty());
-
-   assert(this->current_assignment == ir);
-   this->current_assignment = NULL;
-
-   return visit_continue;
-}
-
-
-class examine_rhs : public ir_hierarchical_visitor {
-public:
-   examine_rhs(hash_table *loop_variables)
-   {
-      this->only_uses_loop_constants = true;
-      this->loop_variables = loop_variables;
-   }
-
-   virtual ir_visitor_status visit(ir_dereference_variable *ir)
-   {
-      loop_variable *lv =
-	 (loop_variable *) hash_table_find(this->loop_variables, ir->var);
-
-      assert(lv != NULL);
-
-      if (lv->is_loop_constant()) {
-	 return visit_continue;
-      } else {
-	 this->only_uses_loop_constants = false;
-	 return visit_stop;
-      }
-   }
-
-   hash_table *loop_variables;
-   bool only_uses_loop_constants;
-};
-
-
-bool
-all_expression_operands_are_loop_constant(ir_rvalue *ir, hash_table *variables)
-{
-   examine_rhs v(variables);
-
-   ir->accept(&v);
-
-   return v.only_uses_loop_constants;
-}
-
-
-ir_rvalue *
-get_basic_induction_increment(ir_assignment *ir, hash_table *var_hash)
-{
-   /* The RHS must be a binary expression.
-    */
-   ir_expression *const rhs = ir->rhs->as_expression();
-   if ((rhs == NULL)
-       || ((rhs->operation != ir_binop_add)
-	   && (rhs->operation != ir_binop_sub)))
-      return NULL;
-
-   /* One of the of operands of the expression must be the variable assigned.
-    * If the operation is subtraction, the variable in question must be the
-    * "left" operand.
-    */
-   ir_variable *const var = ir->lhs->variable_referenced();
-
-   ir_variable *const op0 = rhs->operands[0]->variable_referenced();
-   ir_variable *const op1 = rhs->operands[1]->variable_referenced();
-
-   if (((op0 != var) && (op1 != var))
-       || ((op1 == var) && (rhs->operation == ir_binop_sub)))
-      return NULL;
-
-   ir_rvalue *inc = (op0 == var) ? rhs->operands[1] : rhs->operands[0];
-
-   if (inc->as_constant() == NULL) {
-      ir_variable *const inc_var = inc->variable_referenced();
-      if (inc_var != NULL) {
-	 loop_variable *lv =
-	    (loop_variable *) hash_table_find(var_hash, inc_var);
-
-	 if (!lv->is_loop_constant())
-	    inc = NULL;
-      } else
-	 inc = NULL;
-   }
-
-   if ((inc != NULL) && (rhs->operation == ir_binop_sub)) {
-      void *mem_ctx = hieralloc_parent(ir);
-
-      inc = new(mem_ctx) ir_expression(ir_unop_neg,
-				       inc->type,
-				       inc->clone(mem_ctx, NULL),
-				       NULL);
-   }
-
-   return inc;
-}
-
-
-/**
- * Detect whether an if-statement is a loop terminating condition
- *
- * Detects if-statements of the form
- *
- *  (if (expression bool ...) (break))
- */
-bool
-is_loop_terminator(ir_if *ir)
-{
-   if (!ir->else_instructions.is_empty())
-      return false;
-
-   ir_instruction *const inst =
-      (ir_instruction *) ir->then_instructions.get_head();
-   assert(inst != NULL);
-
-   if (inst->ir_type != ir_type_loop_jump)
-      return false;
-
-   ir_loop_jump *const jump = (ir_loop_jump *) inst;
-   if (jump->mode != ir_loop_jump::jump_break)
-      return false;
-
-   return true;
-}
-
-
-loop_state *
-analyze_loop_variables(exec_list *instructions)
-{
-   loop_analysis v;
-
-   v.run(instructions);
-   return v.loops;
-}
diff --git a/src/glsl/loop_analysis.h b/src/glsl/loop_analysis.h
deleted file mode 100644
index 7b0511f..0000000
--- a/src/glsl/loop_analysis.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef LOOP_ANALYSIS_H
-#define LOOP_ANALYSIS_H
-
-#include "ir.h"
-#include "program/hash_table.h"
-
-/**
- * Analyze and classify all variables used in all loops in the instruction list
- */
-extern class loop_state *
-analyze_loop_variables(exec_list *instructions);
-
-
-/**
- * Fill in loop control fields
- *
- * Based on analysis of loop variables, this function tries to remove sequences
- * in the loop of the form
- *
- *  (if (expression bool ...) (break))
- *
- * and fill in the \c ir_loop::from, \c ir_loop::to, and \c ir_loop::counter
- * fields of the \c ir_loop.
- *
- * In this process, some conditional break-statements may be eliminated
- * altogether.  For example, if it is provable that one loop exit condition will
- * always be satisfied before another, the unnecessary exit condition will be
- * removed.
- */
-extern bool
-set_loop_controls(exec_list *instructions, loop_state *ls);
-
-
-extern bool
-unroll_loops(exec_list *instructions, loop_state *ls, unsigned max_iterations);
-
-
-/**
- * Tracking for all variables used in a loop
- */
-class loop_variable_state : public exec_node {
-public:
-   class loop_variable *get(const ir_variable *);
-   class loop_variable *insert(ir_variable *);
-   class loop_terminator *insert(ir_if *);
-
-
-   /**
-    * Loop whose variable state is being tracked by this structure
-    */
-   ir_loop *loop;
-
-   /**
-    * Variables that have not yet been classified
-    */
-   exec_list variables;
-
-   /**
-    * Variables whose values are constant within the body of the loop
-    *
-    * This list contains \c loop_variable objects.
-    */
-   exec_list constants;
-
-   /**
-    * Induction variables for this loop
-    *
-    * This list contains \c loop_variable objects.
-    */
-   exec_list induction_variables;
-
-   /**
-    * Simple if-statements that lead to the termination of the loop
-    *
-    * This list contains \c loop_terminator objects.
-    *
-    * \sa is_loop_terminator
-    */
-   exec_list terminators;
-
-   /**
-    * Hash table containing all variables accessed in this loop
-    */
-   hash_table *var_hash;
-
-   /**
-    * Maximum number of loop iterations.
-    *
-    * If this value is negative, then the loop may be infinite.  This actually
-    * means that analysis was unable to determine an upper bound on the number
-    * of loop iterations.
-    */
-   int max_iterations;
-
-   /**
-    * Number of ir_loop_jump instructions that operate on this loop
-    */
-   unsigned num_loop_jumps;
-
-   loop_variable_state()
-   {
-      this->max_iterations = -1;
-      this->num_loop_jumps = 0;
-      this->var_hash = hash_table_ctor(0, hash_table_pointer_hash,
-				       hash_table_pointer_compare);
-   }
-
-   ~loop_variable_state()
-   {
-      hash_table_dtor(this->var_hash);
-   }
-};
-
-
-class loop_variable : public exec_node {
-public:
-   /** The variable in question. */
-   ir_variable *var;
-
-   /** Is the variable read in the loop before it is written? */
-   bool read_before_write;
-
-   /** Are all variables in the RHS of the assignment loop constants? */
-   bool rhs_clean;
-
-   /** Is there an assignment to the variable that is conditional? */
-   bool conditional_assignment;
-
-   /** Reference to the first assignment to the variable in the loop body. */
-   ir_assignment *first_assignment;
-
-   /** Number of assignments to the variable in the loop body. */
-   unsigned num_assignments;
-
-   /**
-    * Increment values for loop induction variables
-    *
-    * Loop induction variables have a single increment of the form
-    * \c b * \c biv + \c c, where \c b and \c c are loop constants and \c i
-    * is a basic loop induction variable.
-    *
-    * If \c iv_scale is \c NULL, 1 is used.  If \c biv is the same as \c var,
-    * then \c var is a basic loop induction variable.
-    */
-   /*@{*/
-   ir_rvalue *iv_scale;
-   ir_variable *biv;
-   ir_rvalue *increment;
-   /*@}*/
-
-
-   inline bool is_loop_constant() const
-   {
-      const bool is_const = (this->num_assignments == 0)
-	 || ((this->num_assignments == 1)
-	     && !this->conditional_assignment
-	     && !this->read_before_write
-	     && this->rhs_clean);
-
-      /* If the RHS of *the* assignment is clean, then there must be exactly
-       * one assignment of the variable.
-       */
-      assert((this->rhs_clean && (this->num_assignments == 1))
-	     || !this->rhs_clean);
-
-      /* Variables that are marked read-only *MUST* be loop constant.
-       */
-      assert(!this->var->read_only || (this->var->read_only && is_const));
-
-      return is_const;
-   }
-};
-
-
-class loop_terminator : public exec_node {
-public:
-   ir_if *ir;
-};
-
-
-class loop_state {
-public:
-   ~loop_state();
-
-   /**
-    * Get the loop variable state data for a particular loop
-    */
-   loop_variable_state *get(const ir_loop *);
-
-   loop_variable_state *insert(ir_loop *ir);
-
-private:
-   loop_state();
-
-   /**
-    * Hash table containing all loops that have been analyzed.
-    */
-   hash_table *ht;
-
-   void *mem_ctx;
-
-   friend class loop_analysis;
-};
-
-#endif /* LOOP_ANALYSIS_H */
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
deleted file mode 100644
index 2586145..0000000
--- a/src/glsl/loop_controls.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <climits>
-#include "main/compiler.h"
-#include "glsl_types.h"
-#include "loop_analysis.h"
-#include "ir_hierarchical_visitor.h"
-
-/**
- * Find an initializer of a variable outside a loop
- *
- * Works backwards from the loop to find the pre-loop value of the variable.
- * This is used, for example, to find the initial value of loop induction
- * variables.
- *
- * \param loop  Loop where \c var is an induction variable
- * \param var   Variable whose initializer is to be found
- *
- * \return
- * The \c ir_rvalue assigned to the variable outside the loop.  May return
- * \c NULL if no initializer can be found.
- */
-ir_rvalue *
-find_initial_value(ir_loop *loop, ir_variable *var)
-{
-   for (exec_node *node = loop->prev;
-	!node->is_head_sentinel();
-	node = node->prev) {
-      ir_instruction *ir = (ir_instruction *) node;
-
-      switch (ir->ir_type) {
-      case ir_type_call:
-      case ir_type_loop:
-      case ir_type_loop_jump:
-      case ir_type_return:
-      case ir_type_if:
-	 return NULL;
-
-      case ir_type_function:
-      case ir_type_function_signature:
-	 assert(!"Should not get here.");
-	 return NULL;
-
-      case ir_type_assignment: {
-	 ir_assignment *assign = ir->as_assignment();
-	 ir_variable *assignee = assign->lhs->whole_variable_referenced();
-
-	 if (assignee == var)
-	    return (assign->condition != NULL) ? NULL : assign->rhs;
-
-	 break;
-      }
-
-      default:
-	 break;
-      }
-   }
-
-   return NULL;
-}
-
-
-int
-calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
-		     enum ir_expression_operation op)
-{
-   if (from == NULL || to == NULL || increment == NULL)
-      return -1;
-
-   void *mem_ctx = hieralloc_init(__func__);
-
-   ir_expression *const sub =
-      new(mem_ctx) ir_expression(ir_binop_sub, from->type, to, from);
-
-   ir_expression *const div =
-      new(mem_ctx) ir_expression(ir_binop_div, sub->type, sub, increment);
-
-   ir_constant *iter = div->constant_expression_value();
-
-   if (iter == NULL)
-      return -1;
-
-   if (!iter->type->is_integer()) {
-      ir_rvalue *cast =
-	 new(mem_ctx) ir_expression(ir_unop_f2i, glsl_type::int_type, iter,
-				    NULL);
-
-      iter = cast->constant_expression_value();
-   }
-
-   int iter_value = iter->get_int_component(0);
-
-   /* Make sure that the calculated number of iterations satisfies the exit
-    * condition.  This is needed to catch off-by-one errors and some types of
-    * ill-formed loops.  For example, we need to detect that the following
-    * loop does not have a maximum iteration count.
-    *
-    *    for (float x = 0.0; x != 0.9; x += 0.2)
-    *        ;
-    */
-   const int bias[] = { -1, 0, 1 };
-   bool valid_loop = false;
-
-   for (unsigned i = 0; i < Elements(bias); i++) {
-      iter = (increment->type->is_integer())
-	 ? new(mem_ctx) ir_constant(iter_value + bias[i])
-	 : new(mem_ctx) ir_constant(float(iter_value + bias[i]));
-
-      ir_expression *const mul =
-	 new(mem_ctx) ir_expression(ir_binop_mul, increment->type, iter,
-				    increment);
-
-      ir_expression *const add =
-	 new(mem_ctx) ir_expression(ir_binop_add, mul->type, mul, from);
-
-      ir_expression *const cmp =
-	 new(mem_ctx) ir_expression(op, glsl_type::bool_type, add, to);
-
-      ir_constant *const cmp_result = cmp->constant_expression_value();
-
-      assert(cmp_result != NULL);
-      if (cmp_result->get_bool_component(0)) {
-	 iter_value += bias[i];
-	 valid_loop = true;
-	 break;
-      }
-   }
-
-   hieralloc_free(mem_ctx);
-   return (valid_loop) ? iter_value : -1;
-}
-
-
-class loop_control_visitor : public ir_hierarchical_visitor {
-public:
-   loop_control_visitor(loop_state *state)
-   {
-      this->state = state;
-      this->progress = false;
-   }
-
-   virtual ir_visitor_status visit_leave(ir_loop *ir);
-
-   loop_state *state;
-
-   bool progress;
-};
-
-
-ir_visitor_status
-loop_control_visitor::visit_leave(ir_loop *ir)
-{
-   loop_variable_state *const ls = this->state->get(ir);
-
-   /* If we've entered a loop that hasn't been analyzed, something really,
-    * really bad has happened.
-    */
-   if (ls == NULL) {
-      assert(ls != NULL);
-      return visit_continue;
-   }
-
-   /* Search the loop terminating conditions for one of the form 'i < c' where
-    * i is a loop induction variable, c is a constant, and < is any relative
-    * operator.
-    */
-   int max_iterations = ls->max_iterations;
-
-   if(ir->from && ir->to && ir->increment)
-      max_iterations = calculate_iterations(ir->from, ir->to, ir->increment, (ir_expression_operation)ir->cmp);
-
-   if(max_iterations < 0)
-      max_iterations = INT_MAX;
-
-   foreach_list(node, &ls->terminators) {
-      loop_terminator *t = (loop_terminator *) node;
-      ir_if *if_stmt = t->ir;
-
-      /* If-statements can be either 'if (expr)' or 'if (deref)'.  We only care
-       * about the former here.
-       */
-      ir_expression *cond = if_stmt->condition->as_expression();
-      if (cond == NULL)
-	 continue;
-
-      switch (cond->operation) {
-      case ir_binop_less:
-      case ir_binop_greater:
-      case ir_binop_lequal:
-      case ir_binop_gequal: {
-	 /* The expressions that we care about will either be of the form
-	  * 'counter < limit' or 'limit < counter'.  Figure out which is
-	  * which.
-	  */
-	 ir_rvalue *counter = cond->operands[0]->as_dereference_variable();
-	 ir_constant *limit = cond->operands[1]->as_constant();
-	 enum ir_expression_operation cmp = cond->operation;
-
-	 if (limit == NULL) {
-	    counter = cond->operands[1]->as_dereference_variable();
-	    limit = cond->operands[0]->as_constant();
-
-	    switch (cmp) {
-	    case ir_binop_less:    cmp = ir_binop_gequal;  break;
-	    case ir_binop_greater: cmp = ir_binop_lequal;  break;
-	    case ir_binop_lequal:  cmp = ir_binop_greater; break;
-	    case ir_binop_gequal:  cmp = ir_binop_less;    break;
-	    default: assert(!"Should not get here.");
-	    }
-	 }
-
-	 if ((counter == NULL) || (limit == NULL))
-	    break;
-
-	 ir_variable *var = counter->variable_referenced();
-
-	 ir_rvalue *init = find_initial_value(ir, var);
-
-	 foreach_list(iv_node, &ls->induction_variables) {
-	    loop_variable *lv = (loop_variable *) iv_node;
-
-	    if (lv->var == var) {
-	       const int iterations = calculate_iterations(init, limit,
-							   lv->increment,
-							   cmp);
-	       if (iterations >= 0) {
-		  /* If the new iteration count is lower than the previously
-		   * believed iteration count, update the loop control values.
-		   */
-		  if (iterations < max_iterations) {
-		     ir->from = init->clone(ir, NULL);
-		     ir->to = limit->clone(ir, NULL);
-		     ir->increment = lv->increment->clone(ir, NULL);
-		     ir->counter = lv->var;
-		     ir->cmp = cmp;
-
-		     max_iterations = iterations;
-		  }
-
-		  /* Remove the conditional break statement.  The loop
-		   * controls are now set such that the exit condition will be
-		   * satisfied.
-		   */
-		  if_stmt->remove();
-
-		  assert(ls->num_loop_jumps > 0);
-		  ls->num_loop_jumps--;
-
-		  this->progress = true;
-	       }
-
-	       break;
-	    }
-	 }
-	 break;
-      }
-
-      default:
-	 break;
-      }
-   }
-
-   /* If we have proven the one of the loop exit conditions is satisifed before
-    * running the loop once, remove the loop.
-    */
-   if (max_iterations == 0)
-      ir->remove();
-   else
-      ls->max_iterations = max_iterations;
-
-   return visit_continue;
-}
-
-
-bool
-set_loop_controls(exec_list *instructions, loop_state *ls)
-{
-   loop_control_visitor v(ls);
-
-   v.run(instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp
deleted file mode 100644
index 561b875..0000000
--- a/src/glsl/loop_unroll.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "glsl_types.h"
-#include "loop_analysis.h"
-#include "ir_hierarchical_visitor.h"
-
-class loop_unroll_visitor : public ir_hierarchical_visitor {
-public:
-   loop_unroll_visitor(loop_state *state, unsigned max_iterations)
-   {
-      this->state = state;
-      this->progress = false;
-      this->max_iterations = max_iterations;
-   }
-
-   virtual ir_visitor_status visit_leave(ir_loop *ir);
-
-   loop_state *state;
-
-   bool progress;
-   unsigned max_iterations;
-};
-
-
-static bool
-is_break(ir_instruction *ir)
-{
-   return ir != NULL && ir->ir_type == ir_type_loop_jump
-		     && ((ir_loop_jump *) ir)->is_break();
-}
-
-
-ir_visitor_status
-loop_unroll_visitor::visit_leave(ir_loop *ir)
-{
-   loop_variable_state *const ls = this->state->get(ir);
-   int iterations;
-
-   /* If we've entered a loop that hasn't been analyzed, something really,
-    * really bad has happened.
-    */
-   if (ls == NULL) {
-      assert(ls != NULL);
-      return visit_continue;
-   }
-
-   iterations = ls->max_iterations;
-
-   /* Don't try to unroll loops where the number of iterations is not known
-    * at compile-time.
-    */
-   if (iterations < 0)
-      return visit_continue;
-
-   /* Don't try to unroll loops that have zillions of iterations either.
-    */
-   if (iterations > (int) max_iterations)
-      return visit_continue;
-
-   if (ls->num_loop_jumps > 1)
-      return visit_continue;
-   else if (ls->num_loop_jumps) {
-      ir_instruction *last_ir = (ir_instruction *) ir->body_instructions.get_tail();
-      assert(last_ir != NULL);
-
-      if (is_break(last_ir)) {
-         /* If the only loop-jump is a break at the end of the loop, the loop
-          * will execute exactly once.  Remove the break, set the iteration
-          * count, and fall through to the normal unroller.
-          */
-         last_ir->remove();
-         iterations = 1;
-
-         this->progress = true;
-      } else {
-         ir_if *ir_if = NULL;
-         ir_instruction *break_ir = NULL;
-         bool continue_from_then_branch = false;
-
-         foreach_list(node, &ir->body_instructions) {
-            /* recognize loops in the form produced by ir_lower_jumps */
-            ir_instruction *cur_ir = (ir_instruction *) node;
-
-            ir_if = cur_ir->as_if();
-            if (ir_if != NULL) {
-	       /* Determine which if-statement branch, if any, ends with a
-		* break.  The branch that did *not* have the break will get a
-		* temporary continue inserted in each iteration of the loop
-		* unroll.
-		*
-		* Note that since ls->num_loop_jumps is <= 1, it is impossible
-		* for both branches to end with a break.
-		*/
-               ir_instruction *ir_if_last =
-                  (ir_instruction *) ir_if->then_instructions.get_tail();
-
-               if (is_break(ir_if_last)) {
-                  continue_from_then_branch = false;
-                  break_ir = ir_if_last;
-                  break;
-               } else {
-                  ir_if_last =
-		     (ir_instruction *) ir_if->else_instructions.get_tail();
-
-                  if (is_break(ir_if_last)) {
-                     break_ir = ir_if_last;
-                     continue_from_then_branch = true;
-                     break;
-                  }
-               }
-            }
-         }
-
-         if (break_ir == NULL)
-            return visit_continue;
-
-         /* move instructions after then if in the continue branch */
-         while (!ir_if->get_next()->is_tail_sentinel()) {
-            ir_instruction *move_ir = (ir_instruction *) ir_if->get_next();
-
-            move_ir->remove();
-            if (continue_from_then_branch)
-               ir_if->then_instructions.push_tail(move_ir);
-            else
-               ir_if->else_instructions.push_tail(move_ir);
-         }
-
-         /* Remove the break from the if-statement.
-          */
-         break_ir->remove();
-
-         void *const mem_ctx = hieralloc_parent(ir);
-         ir_instruction *ir_to_replace = ir;
-
-         for (int i = 0; i < iterations; i++) {
-            exec_list copy_list;
-
-            copy_list.make_empty();
-            clone_ir_list(mem_ctx, &copy_list, &ir->body_instructions);
-
-            ir_if = ((ir_instruction *) copy_list.get_tail())->as_if();
-            assert(ir_if != NULL);
-
-            ir_to_replace->insert_before(&copy_list);
-            ir_to_replace->remove();
-
-            /* placeholder that will be removed in the next iteration */
-            ir_to_replace =
-	       new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue);
-
-            exec_list *const list = (continue_from_then_branch)
-               ? &ir_if->then_instructions : &ir_if->else_instructions;
-
-            list->push_tail(ir_to_replace);
-         }
-
-         ir_to_replace->remove();
-
-         this->progress = true;
-         return visit_continue;
-      }
-   }
-
-   void *const mem_ctx = hieralloc_parent(ir);
-
-   for (int i = 0; i < iterations; i++) {
-      exec_list copy_list;
-
-      copy_list.make_empty();
-      clone_ir_list(mem_ctx, &copy_list, &ir->body_instructions);
-
-      ir->insert_before(&copy_list);
-   }
-
-   /* The loop has been replaced by the unrolled copies.  Remove the original
-    * loop from the IR sequence.
-    */
-   ir->remove();
-
-   this->progress = true;
-   return visit_continue;
-}
-
-
-bool
-unroll_loops(exec_list *instructions, loop_state *ls, unsigned max_iterations)
-{
-   loop_unroll_visitor v(ls, max_iterations);
-
-   v.run(instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_discard.cpp b/src/glsl/lower_discard.cpp
deleted file mode 100644
index 91ff4f2..0000000
--- a/src/glsl/lower_discard.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_discard.cpp
- *
- * This pass moves discards out of if-statements.
- *
- * Case 1: The "then" branch contains a conditional discard:
- * ---------------------------------------------------------
- *
- *    if (cond1) {
- *	 s1;
- *	 discard cond2;
- *	 s2;
- *    } else {
- *	 s3;
- *    }
- *
- * becomes:
- *
- *    temp = false;
- *    if (cond1) {
- *	 s1;
- *	 temp = cond2;
- *	 s2;
- *    } else {
- *	 s3;
- *    }
- *    discard temp;
- *
- * Case 2: The "else" branch contains a conditional discard:
- * ---------------------------------------------------------
- *
- *    if (cond1) {
- *	 s1;
- *    } else {
- *	 s2;
- *	 discard cond2;
- *	 s3;
- *    }
- *
- * becomes:
- *
- *    temp = false;
- *    if (cond1) {
- *	 s1;
- *    } else {
- *	 s2;
- *	 temp = cond2;
- *	 s3;
- *    }
- *    discard temp;
- *
- * Case 3: Both branches contain a conditional discard:
- * ----------------------------------------------------
- *
- *    if (cond1) {
- *	 s1;
- *	 discard cond2;
- *	 s2;
- *    } else {
- *	 s3;
- *	 discard cond3;
- *	 s4;
- *    }
- *
- * becomes:
- *
- *    temp = false;
- *    if (cond1) {
- *	 s1;
- *	 temp = cond2;
- *	 s2;
- *    } else {
- *	 s3;
- *	 temp = cond3;
- *	 s4;
- *    }
- *    discard temp;
- *
- * If there are multiple conditional discards, we need only deal with one of
- * them.  Repeatedly applying this pass will take care of the others.
- *
- * Unconditional discards are treated as having a condition of "true".
- */
-
-#include "glsl_types.h"
-#include "ir.h"
-
-class lower_discard_visitor : public ir_hierarchical_visitor {
-public:
-   lower_discard_visitor()
-   {
-      this->progress = false;
-   }
-
-   ir_visitor_status visit_leave(ir_if *);
-
-   bool progress;
-};
-
-
-bool
-lower_discard(exec_list *instructions)
-{
-   lower_discard_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
-
-
-static ir_discard *
-find_discard(exec_list &instructions)
-{
-   foreach_list(n, &instructions) {
-      ir_discard *ir = ((ir_instruction *) n)->as_discard();
-      if (ir != NULL)
-	 return ir;
-   }
-   return NULL;
-}
-
-
-static void
-replace_discard(void *mem_ctx, ir_variable *var, ir_discard *ir)
-{
-   ir_rvalue *condition = ir->condition;
-
-   /* For unconditional discards, use "true" as the condition. */
-   if (condition == NULL)
-      condition = new(mem_ctx) ir_constant(true);
-
-   ir_assignment *assignment =
-      new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(var),
-				 condition, NULL);
-
-   ir->replace_with(assignment);
-}
-
-
-ir_visitor_status
-lower_discard_visitor::visit_leave(ir_if *ir)
-{
-   ir_discard *then_discard = find_discard(ir->then_instructions);
-   ir_discard *else_discard = find_discard(ir->else_instructions);
-
-   if (then_discard == NULL && else_discard == NULL)
-      return visit_continue;
-
-   void *mem_ctx = hieralloc_parent(ir);
-
-   ir_variable *temp = new(mem_ctx) ir_variable(glsl_type::bool_type,
-						"discard_cond_temp",
-						ir_var_temporary);
-   ir_assignment *temp_initializer =
-      new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(temp),
-				 new(mem_ctx) ir_constant(false), NULL);
-
-   ir->insert_before(temp);
-   ir->insert_before(temp_initializer);
-
-   if (then_discard != NULL)
-      replace_discard(mem_ctx, temp, then_discard);
-
-   if (else_discard != NULL)
-      replace_discard(mem_ctx, temp, else_discard);
-
-   ir_discard *discard = then_discard != NULL ? then_discard : else_discard;
-   discard->condition = new(mem_ctx) ir_dereference_variable(temp);
-   ir->insert_after(discard);
-
-   this->progress = true;
-
-   return visit_continue;
-}
diff --git a/src/glsl/lower_if_to_cond_assign.cpp b/src/glsl/lower_if_to_cond_assign.cpp
deleted file mode 100644
index 82eeb34..0000000
--- a/src/glsl/lower_if_to_cond_assign.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_if_to_cond_assign.cpp
- *
- * This attempts to flatten if-statements to conditional assignments for
- * GPUs with limited or no flow control support.
- *
- * It can't handle other control flow being inside of its block, such
- * as calls or loops.  Hopefully loop unrolling and inlining will take
- * care of those.
- *
- * Drivers for GPUs with no control flow support should simply call
- *
- *    lower_if_to_cond_assign(instructions)
- *
- * to attempt to flatten all if-statements.
- *
- * Some GPUs (such as i965 prior to gen6) do support control flow, but have a
- * maximum nesting depth N.  Drivers for such hardware can call
- *
- *    lower_if_to_cond_assign(instructions, N)
- *
- * to attempt to flatten any if-statements appearing at depth > N.
- */
-
-#include "glsl_types.h"
-#include "ir.h"
-
-class ir_if_to_cond_assign_visitor : public ir_hierarchical_visitor {
-public:
-   ir_if_to_cond_assign_visitor(unsigned max_depth)
-   {
-      this->progress = false;
-      this->max_depth = max_depth;
-      this->depth = 0;
-   }
-
-   ir_visitor_status visit_enter(ir_if *);
-   ir_visitor_status visit_leave(ir_if *);
-
-   bool progress;
-   unsigned max_depth;
-   unsigned depth;
-};
-
-bool
-lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth)
-{
-   ir_if_to_cond_assign_visitor v(max_depth);
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
-
-void
-check_control_flow(ir_instruction *ir, void *data)
-{
-   bool *found_control_flow = (bool *)data;
-   switch (ir->ir_type) {
-   case ir_type_call:
-   case ir_type_discard:
-   case ir_type_loop:
-   case ir_type_loop_jump:
-   case ir_type_return:
-      *found_control_flow = true;
-      break;
-   default:
-      break;
-   }
-}
-
-void
-move_block_to_cond_assign(void *mem_ctx,
-			  ir_if *if_ir, ir_variable *cond_var, bool then)
-{
-   exec_list *instructions;
-
-   if (then) {
-      instructions = &if_ir->then_instructions;
-   } else {
-      instructions = &if_ir->else_instructions;
-   }
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-
-      if (ir->ir_type == ir_type_assignment) {
-	 ir_assignment *assign = (ir_assignment *)ir;
-	 ir_rvalue *cond_expr;
-	 ir_dereference *deref = new(mem_ctx) ir_dereference_variable(cond_var);
-
-	 if (then) {
-	    cond_expr = deref;
-	 } else {
-	    cond_expr = new(mem_ctx) ir_expression(ir_unop_logic_not,
-						   glsl_type::bool_type,
-						   deref,
-						   NULL);
-	 }
-
-	 if (!assign->condition) {
-	    assign->condition = cond_expr;
-	 } else {
-	    assign->condition = new(mem_ctx) ir_expression(ir_binop_logic_and,
-							   glsl_type::bool_type,
-							   cond_expr,
-							   assign->condition);
-	 }
-      }
-
-      /* Now, move from the if block to the block surrounding it. */
-      ir->remove();
-      if_ir->insert_before(ir);
-   }
-}
-
-ir_visitor_status
-ir_if_to_cond_assign_visitor::visit_enter(ir_if *ir)
-{
-   (void) ir;
-   this->depth++;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
-{
-   /* Only flatten when beyond the GPU's maximum supported nesting depth. */
-   if (this->depth <= this->max_depth)
-      return visit_continue;
-
-   this->depth--;
-
-   bool found_control_flow = false;
-   ir_variable *cond_var;
-   ir_assignment *assign;
-   ir_dereference_variable *deref;
-
-   /* Check that both blocks don't contain anything we can't support. */
-   foreach_iter(exec_list_iterator, then_iter, ir->then_instructions) {
-      ir_instruction *then_ir = (ir_instruction *)then_iter.get();
-      visit_tree(then_ir, check_control_flow, &found_control_flow);
-   }
-   foreach_iter(exec_list_iterator, else_iter, ir->else_instructions) {
-      ir_instruction *else_ir = (ir_instruction *)else_iter.get();
-      visit_tree(else_ir, check_control_flow, &found_control_flow);
-   }
-   if (found_control_flow)
-      return visit_continue;
-
-   void *mem_ctx = hieralloc_parent(ir);
-
-   /* Store the condition to a variable so the assignment conditions are
-    * simpler.
-    */
-   cond_var = new(mem_ctx) ir_variable(glsl_type::bool_type,
-				       "if_to_cond_assign_condition",
-				       ir_var_temporary);
-   ir->insert_before(cond_var);
-
-   deref = new(mem_ctx) ir_dereference_variable(cond_var);
-   assign = new(mem_ctx) ir_assignment(deref,
-				       ir->condition, NULL);
-   ir->insert_before(assign);
-
-   /* Now, move all of the instructions out of the if blocks, putting
-    * conditions on assignments.
-    */
-   move_block_to_cond_assign(mem_ctx, ir, cond_var, true);
-   move_block_to_cond_assign(mem_ctx, ir, cond_var, false);
-
-   ir->remove();
-
-   this->progress = true;
-
-   return visit_continue;
-}
diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
deleted file mode 100644
index a5f61f2..0000000
--- a/src/glsl/lower_instructions.cpp
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_instructions.cpp
- *
- * Many GPUs lack native instructions for certain expression operations, and
- * must replace them with some other expression tree.  This pass lowers some
- * of the most common cases, allowing the lowering code to be implemented once
- * rather than in each driver backend.
- *
- * Currently supported transformations:
- * - SUB_TO_ADD_NEG
- * - DIV_TO_MUL_RCP
- * - EXP_TO_EXP2
- * - POW_TO_EXP2
- * - LOG_TO_LOG2
- * - MOD_TO_FRACT
- *
- * SUB_TO_ADD_NEG:
- * ---------------
- * Breaks an ir_binop_sub expression down to add(op0, neg(op1))
- *
- * This simplifies expression reassociation, and for many backends
- * there is no subtract operation separate from adding the negation.
- * For backends with native subtract operations, they will probably
- * want to recognize add(op0, neg(op1)) or the other way around to
- * produce a subtract anyway.
- *
- * DIV_TO_MUL_RCP:
- * ---------------
- * Breaks an ir_unop_div expression down to op0 * (rcp(op1)).
- *
- * Many GPUs don't have a divide instruction (945 and 965 included),
- * but they do have an RCP instruction to compute an approximate
- * reciprocal.  By breaking the operation down, constant reciprocals
- * can get constant folded.
- *
- * EXP_TO_EXP2 and LOG_TO_LOG2:
- * ----------------------------
- * Many GPUs don't have a base e log or exponent instruction, but they
- * do have base 2 versions, so this pass converts exp and log to exp2
- * and log2 operations.
- *
- * POW_TO_EXP2:
- * -----------
- * Many older GPUs don't have an x**y instruction.  For these GPUs, convert
- * x**y to 2**(y * log2(x)).
- *
- * MOD_TO_FRACT:
- * -------------
- * Breaks an ir_unop_mod expression down to (op1 * fract(op0 / op1))
- *
- * Many GPUs don't have a MOD instruction (945 and 965 included), and
- * if we have to break it down like this anyway, it gives an
- * opportunity to do things like constant fold the (1.0 / op1) easily.
- */
-
-#include "main/core.h" /* for M_LOG2E */
-#include "glsl_types.h"
-#include "ir.h"
-#include "ir_optimization.h"
-
-class lower_instructions_visitor : public ir_hierarchical_visitor {
-public:
-   lower_instructions_visitor(unsigned lower)
-      : progress(false), lower(lower) { }
-
-   ir_visitor_status visit_leave(ir_expression *);
-
-   bool progress;
-
-private:
-   unsigned lower; /** Bitfield of which operations to lower */
-
-   void sub_to_add_neg(ir_expression *);
-   void div_to_mul_rcp(ir_expression *);
-   void mod_to_fract(ir_expression *);
-   void exp_to_exp2(ir_expression *);
-   void pow_to_exp2(ir_expression *);
-   void log_to_log2(ir_expression *);
-};
-
-/**
- * Determine if a particular type of lowering should occur
- */
-#define lowering(x) (this->lower & x)
-
-bool
-lower_instructions(exec_list *instructions, unsigned what_to_lower)
-{
-   lower_instructions_visitor v(what_to_lower);
-
-   visit_list_elements(&v, instructions);
-   return v.progress;
-}
-
-void
-lower_instructions_visitor::sub_to_add_neg(ir_expression *ir)
-{
-   ir->operation = ir_binop_add;
-   ir->operands[1] = new(ir) ir_expression(ir_unop_neg, ir->operands[1]->type,
-					   ir->operands[1], NULL);
-   this->progress = true;
-}
-
-void
-lower_instructions_visitor::div_to_mul_rcp(ir_expression *ir)
-{
-   if (!ir->operands[1]->type->is_integer()) {
-      /* New expression for the 1.0 / op1 */
-      ir_rvalue *expr;
-      expr = new(ir) ir_expression(ir_unop_rcp,
-				   ir->operands[1]->type,
-				   ir->operands[1],
-				   NULL);
-
-      /* op0 / op1 -> op0 * (1.0 / op1) */
-      ir->operation = ir_binop_mul;
-      ir->operands[1] = expr;
-   } else {
-      /* Be careful with integer division -- we need to do it as a
-       * float and re-truncate, since rcp(n > 1) of an integer would
-       * just be 0.
-       */
-      ir_rvalue *op0, *op1;
-      const struct glsl_type *vec_type;
-
-      vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
-					 ir->operands[1]->type->vector_elements,
-					 ir->operands[1]->type->matrix_columns);
-
-      if (ir->operands[1]->type->base_type == GLSL_TYPE_INT)
-	 op1 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[1], NULL);
-      else
-	 op1 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[1], NULL);
-
-      op1 = new(ir) ir_expression(ir_unop_rcp, op1->type, op1, NULL);
-
-      vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
-					 ir->operands[0]->type->vector_elements,
-					 ir->operands[0]->type->matrix_columns);
-
-      if (ir->operands[0]->type->base_type == GLSL_TYPE_INT)
-	 op0 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[0], NULL);
-      else
-	 op0 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[0], NULL);
-
-      op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1);
-
-      ir->operation = ir_unop_f2i;
-      ir->operands[0] = op0;
-      ir->operands[1] = NULL;
-   }
-
-   this->progress = true;
-}
-
-void
-lower_instructions_visitor::exp_to_exp2(ir_expression *ir)
-{
-   ir_constant *log2_e = new(ir) ir_constant(float(M_LOG2E));
-
-   ir->operation = ir_unop_exp2;
-   ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[0]->type,
-					   ir->operands[0], log2_e);
-   this->progress = true;
-}
-
-void
-lower_instructions_visitor::pow_to_exp2(ir_expression *ir)
-{
-   ir_expression *const log2_x =
-      new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type,
-			    ir->operands[0]);
-
-   ir->operation = ir_unop_exp2;
-   ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[1]->type,
-					   ir->operands[1], log2_x);
-   ir->operands[1] = NULL;
-   this->progress = true;
-}
-
-void
-lower_instructions_visitor::log_to_log2(ir_expression *ir)
-{
-   ir->operation = ir_binop_mul;
-   ir->operands[0] = new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type,
-					   ir->operands[0], NULL);
-   ir->operands[1] = new(ir) ir_constant(float(1.0 / M_LOG2E));
-   this->progress = true;
-}
-
-void
-lower_instructions_visitor::mod_to_fract(ir_expression *ir)
-{
-   ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b",
-					   ir_var_temporary);
-   this->base_ir->insert_before(temp);
-
-   ir_assignment *const assign =
-      new(ir) ir_assignment(new(ir) ir_dereference_variable(temp),
-			    ir->operands[1], NULL);
-
-   this->base_ir->insert_before(assign);
-
-   ir_expression *const div_expr =
-      new(ir) ir_expression(ir_binop_div, ir->operands[0]->type,
-			    ir->operands[0],
-			    new(ir) ir_dereference_variable(temp));
-
-   /* Don't generate new IR that would need to be lowered in an additional
-    * pass.
-    */
-   if (lowering(DIV_TO_MUL_RCP))
-      div_to_mul_rcp(div_expr);
-
-   ir_rvalue *expr = new(ir) ir_expression(ir_unop_fract,
-					   ir->operands[0]->type,
-					   div_expr,
-					   NULL);
-
-   ir->operation = ir_binop_mul;
-   ir->operands[0] = new(ir) ir_dereference_variable(temp);
-   ir->operands[1] = expr;
-   this->progress = true;
-}
-
-ir_visitor_status
-lower_instructions_visitor::visit_leave(ir_expression *ir)
-{
-   switch (ir->operation) {
-   case ir_binop_sub:
-      if (lowering(SUB_TO_ADD_NEG))
-	 sub_to_add_neg(ir);
-      break;
-
-   case ir_binop_div:
-      if (lowering(DIV_TO_MUL_RCP))
-	 div_to_mul_rcp(ir);
-      break;
-
-   case ir_unop_exp:
-      if (lowering(EXP_TO_EXP2))
-	 exp_to_exp2(ir);
-      break;
-
-   case ir_unop_log:
-      if (lowering(LOG_TO_LOG2))
-	 log_to_log2(ir);
-      break;
-
-   case ir_binop_mod:
-      if (lowering(MOD_TO_FRACT))
-	 mod_to_fract(ir);
-      break;
-
-   case ir_binop_pow:
-      if (lowering(POW_TO_EXP2))
-	 pow_to_exp2(ir);
-      break;
-
-   default:
-      return visit_continue;
-   }
-
-   return visit_continue;
-}
diff --git a/src/glsl/lower_jumps.cpp b/src/glsl/lower_jumps.cpp
deleted file mode 100644
index d99e0aa..0000000
--- a/src/glsl/lower_jumps.cpp
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- * Copyright © 2010 Luca Barbieri
- *
- * 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.
- */
-
-/**
- * \file lower_jumps.cpp
- *
- * This pass lowers jumps (break, continue, and return) to if/else structures.
- *
- * It can be asked to:
- * 1. Pull jumps out of ifs where possible
- * 2. Remove all "continue"s, replacing them with an "execute flag"
- * 3. Replace all "break" with a single conditional one at the end of the loop
- * 4. Replace all "return"s with a single return at the end of the function,
- *    for the main function and/or other functions
- *
- * Applying this pass gives several benefits:
- * 1. All functions can be inlined.
- * 2. nv40 and other pre-DX10 chips without "continue" can be supported
- * 3. nv30 and other pre-DX10 chips with no control flow at all are better
- *    supported
- *
- * Continues are lowered by adding a per-loop "execute flag", initialized to
- * true, that when cleared inhibits all execution until the end of the loop.
- *
- * Breaks are lowered to continues, plus setting a "break flag" that is checked
- * at the end of the loop, and trigger the unique "break".
- *
- * Returns are lowered to breaks/continues, plus adding a "return flag" that
- * causes loops to break again out of their enclosing loops until all the
- * loops are exited: then the "execute flag" logic will ignore everything
- * until the end of the function.
- *
- * Note that "continue" and "return" can also be implemented by adding
- * a dummy loop and using break.
- * However, this is bad for hardware with limited nesting depth, and
- * prevents further optimization, and thus is not currently performed.
- */
-
-#include "glsl_types.h"
-#include <string.h>
-#include "ir.h"
-
-enum jump_strength
-{
-   strength_none,
-   strength_always_clears_execute_flag,
-   strength_continue,
-   strength_break,
-   strength_return,
-};
-
-struct block_record
-{
-   /* minimum jump strength (of lowered IR, not pre-lowering IR)
-    *
-    * If the block ends with a jump, must be the strength of the jump.
-    * Otherwise, the jump would be dead and have been deleted before)
-    *
-    * If the block doesn't end with a jump, it can be different than strength_none if all paths before it lead to some jump
-    * (e.g. an if with a return in one branch, and a break in the other, while not lowering them)
-    * Note that identical jumps are usually unified though.
-    */
-   jump_strength min_strength;
-
-   /* can anything clear the execute flag? */
-   bool may_clear_execute_flag;
-
-   block_record()
-   {
-      this->min_strength = strength_none;
-      this->may_clear_execute_flag = false;
-   }
-};
-
-struct loop_record
-{
-   ir_function_signature* signature;
-   ir_loop* loop;
-
-   /* used to avoid lowering the break used to represent lowered breaks */
-   unsigned nesting_depth;
-   bool in_if_at_the_end_of_the_loop;
-
-   bool may_set_return_flag;
-
-   ir_variable* break_flag;
-   ir_variable* execute_flag; /* cleared to emulate continue */
-
-   loop_record(ir_function_signature* p_signature = 0, ir_loop* p_loop = 0)
-   {
-      this->signature = p_signature;
-      this->loop = p_loop;
-      this->nesting_depth = 0;
-      this->in_if_at_the_end_of_the_loop = false;
-      this->may_set_return_flag = false;
-      this->break_flag = 0;
-      this->execute_flag = 0;
-   }
-
-   ir_variable* get_execute_flag()
-   {
-      /* also supported for the "function loop" */
-      if(!this->execute_flag) {
-         exec_list& list = this->loop ? this->loop->body_instructions : signature->body;
-         this->execute_flag = new(this->signature) ir_variable(glsl_type::bool_type, "execute_flag", ir_var_temporary);
-         list.push_head(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(execute_flag), new(this->signature) ir_constant(true), 0));
-         list.push_head(this->execute_flag);
-      }
-      return this->execute_flag;
-   }
-
-   ir_variable* get_break_flag()
-   {
-      assert(this->loop);
-      if(!this->break_flag) {
-         this->break_flag = new(this->signature) ir_variable(glsl_type::bool_type, "break_flag", ir_var_temporary);
-         this->loop->insert_before(this->break_flag);
-         this->loop->insert_before(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(break_flag), new(this->signature) ir_constant(false), 0));
-      }
-      return this->break_flag;
-   }
-};
-
-struct function_record
-{
-   ir_function_signature* signature;
-   ir_variable* return_flag; /* used to break out of all loops and then jump to the return instruction */
-   ir_variable* return_value;
-   bool is_main;
-   unsigned nesting_depth;
-
-   function_record(ir_function_signature* p_signature = 0)
-   {
-      this->signature = p_signature;
-      this->return_flag = 0;
-      this->return_value = 0;
-      this->nesting_depth = 0;
-      this->is_main = this->signature && (strcmp(this->signature->function_name(), "main") == 0);
-   }
-
-   ir_variable* get_return_flag()
-   {
-      if(!this->return_flag) {
-         this->return_flag = new(this->signature) ir_variable(glsl_type::bool_type, "return_flag", ir_var_temporary);
-         this->signature->body.push_head(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(return_flag), new(this->signature) ir_constant(false), 0));
-         this->signature->body.push_head(this->return_flag);
-      }
-      return this->return_flag;
-   }
-
-   ir_variable* get_return_value()
-   {
-      if(!this->return_value) {
-         assert(!this->signature->return_type->is_void());
-         return_value = new(this->signature) ir_variable(this->signature->return_type, "return_value", ir_var_temporary);
-         this->signature->body.push_head(this->return_value);
-      }
-      return this->return_value;
-   }
-};
-
-struct ir_lower_jumps_visitor : public ir_control_flow_visitor {
-   bool progress;
-
-   struct function_record function;
-   struct loop_record loop;
-   struct block_record block;
-
-   bool pull_out_jumps;
-   bool lower_continue;
-   bool lower_break;
-   bool lower_sub_return;
-   bool lower_main_return;
-
-   ir_lower_jumps_visitor()
-   {
-      this->progress = false;
-   }
-
-   void truncate_after_instruction(exec_node *ir)
-   {
-      if (!ir)
-         return;
-
-      while (!ir->get_next()->is_tail_sentinel()) {
-         ((ir_instruction *)ir->get_next())->remove();
-         this->progress = true;
-      }
-   }
-
-   void move_outer_block_inside(ir_instruction *ir, exec_list *inner_block)
-   {
-      while (!ir->get_next()->is_tail_sentinel()) {
-         ir_instruction *move_ir = (ir_instruction *)ir->get_next();
-
-         move_ir->remove();
-         inner_block->push_tail(move_ir);
-      }
-   }
-
-   virtual void visit(class ir_loop_jump * ir)
-   {
-      truncate_after_instruction(ir);
-      this->block.min_strength = ir->is_break() ? strength_break : strength_continue;
-   }
-
-   virtual void visit(class ir_return * ir)
-   {
-      truncate_after_instruction(ir);
-      this->block.min_strength = strength_return;
-   }
-
-   virtual void visit(class ir_discard * ir)
-   {
-   }
-
-   enum jump_strength get_jump_strength(ir_instruction* ir)
-   {
-      if(!ir)
-         return strength_none;
-      else if(ir->ir_type == ir_type_loop_jump) {
-         if(((ir_loop_jump*)ir)->is_break())
-            return strength_break;
-         else
-            return strength_continue;
-      } else if(ir->ir_type == ir_type_return)
-         return strength_return;
-      else
-         return strength_none;
-   }
-
-   bool should_lower_jump(ir_jump* ir)
-   {
-      unsigned strength = get_jump_strength(ir);
-      bool lower;
-      switch(strength)
-      {
-      case strength_none:
-         lower = false; /* don't change this, code relies on it */
-         break;
-      case strength_continue:
-         lower = lower_continue;
-         break;
-      case strength_break:
-         assert(this->loop.loop);
-         /* never lower "canonical break" */
-         if(ir->get_next()->is_tail_sentinel() && (this->loop.nesting_depth == 0
-               || (this->loop.nesting_depth == 1 && this->loop.in_if_at_the_end_of_the_loop)))
-            lower = false;
-         else
-            lower = lower_break;
-         break;
-      case strength_return:
-         /* never lower return at the end of a this->function */
-         if(this->function.nesting_depth == 0 && ir->get_next()->is_tail_sentinel())
-            lower = false;
-         else if (this->function.is_main)
-            lower = lower_main_return;
-         else
-            lower = lower_sub_return;
-         break;
-      }
-      return lower;
-   }
-
-   block_record visit_block(exec_list* list)
-   {
-      block_record saved_block = this->block;
-      this->block = block_record();
-      visit_exec_list(list, this);
-      block_record ret = this->block;
-      this->block = saved_block;
-      return ret;
-   }
-
-   virtual void visit(ir_if *ir)
-   {
-      if(this->loop.nesting_depth == 0 && ir->get_next()->is_tail_sentinel())
-         this->loop.in_if_at_the_end_of_the_loop = true;
-
-      ++this->function.nesting_depth;
-      ++this->loop.nesting_depth;
-
-      block_record block_records[2];
-      ir_jump* jumps[2];
-
-      block_records[0] = visit_block(&ir->then_instructions);
-      block_records[1] = visit_block(&ir->else_instructions);
-
-retry: /* we get here if we put code after the if inside a branch */
-   for(unsigned i = 0; i < 2; ++i) {
-      exec_list& list = i ? ir->else_instructions : ir->then_instructions;
-      jumps[i] = 0;
-      if(!list.is_empty() && get_jump_strength((ir_instruction*)list.get_tail()))
-         jumps[i] = (ir_jump*)list.get_tail();
-   }
-
-      for(;;) {
-         jump_strength jump_strengths[2];
-
-         for(unsigned i = 0; i < 2; ++i) {
-            if(jumps[i]) {
-               jump_strengths[i] = block_records[i].min_strength;
-               assert(jump_strengths[i] == get_jump_strength(jumps[i]));
-            } else
-               jump_strengths[i] = strength_none;
-         }
-
-         /* move both jumps out if possible */
-         if(pull_out_jumps && jump_strengths[0] == jump_strengths[1]) {
-            bool unify = true;
-            if(jump_strengths[0] == strength_continue)
-               ir->insert_after(new(ir) ir_loop_jump(ir_loop_jump::jump_continue));
-            else if(jump_strengths[0] == strength_break)
-               ir->insert_after(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
-            /* FINISHME: unify returns with identical expressions */
-            else if(jump_strengths[0] == strength_return && this->function.signature->return_type->is_void())
-               ir->insert_after(new(ir) ir_return(NULL));
-	    else
-	       unify = false;
-
-            if(unify) {
-               jumps[0]->remove();
-               jumps[1]->remove();
-               this->progress = true;
-
-               jumps[0] = 0;
-               jumps[1] = 0;
-               block_records[0].min_strength = strength_none;
-               block_records[1].min_strength = strength_none;
-               break;
-            }
-         }
-
-         /* lower a jump: if both need to lowered, start with the strongest one, so that
-          * we might later unify the lowered version with the other one
-          */
-         bool should_lower[2];
-         for(unsigned i = 0; i < 2; ++i)
-            should_lower[i] = should_lower_jump(jumps[i]);
-
-         int lower;
-         if(should_lower[1] && should_lower[0])
-            lower = jump_strengths[1] > jump_strengths[0];
-         else if(should_lower[0])
-            lower = 0;
-         else if(should_lower[1])
-            lower = 1;
-         else
-            break;
-
-         if(jump_strengths[lower] == strength_return) {
-            ir_variable* return_flag = this->function.get_return_flag();
-            if(!this->function.signature->return_type->is_void()) {
-               ir_variable* return_value = this->function.get_return_value();
-               jumps[lower]->insert_before(new(ir) ir_assignment(new (ir) ir_dereference_variable(return_value), ((ir_return*)jumps[lower])->value, NULL));
-            }
-            jumps[lower]->insert_before(new(ir) ir_assignment(new (ir) ir_dereference_variable(return_flag), new (ir) ir_constant(true), NULL));
-            this->loop.may_set_return_flag = true;
-            if(this->loop.loop) {
-               ir_loop_jump* lowered = 0;
-               lowered = new(ir) ir_loop_jump(ir_loop_jump::jump_break);
-               block_records[lower].min_strength = strength_break;
-               jumps[lower]->replace_with(lowered);
-               jumps[lower] = lowered;
-            } else
-               goto lower_continue;
-            this->progress = true;
-         } else if(jump_strengths[lower] == strength_break) {
-            /* We can't lower to an actual continue because that would execute the increment.
-             *
-             * In the lowered code, we instead put the break check between the this->loop body and the increment,
-             * which is impossible with a real continue as defined by the GLSL IR currently.
-             *
-             * Smarter options (such as undoing the increment) are possible but it's not worth implementing them,
-             * because if break is lowered, continue is almost surely lowered too.
-             */
-            jumps[lower]->insert_before(new(ir) ir_assignment(new (ir) ir_dereference_variable(this->loop.get_break_flag()), new (ir) ir_constant(true), 0));
-            goto lower_continue;
-         } else if(jump_strengths[lower] == strength_continue) {
-lower_continue:
-            ir_variable* execute_flag = this->loop.get_execute_flag();
-            jumps[lower]->replace_with(new(ir) ir_assignment(new (ir) ir_dereference_variable(execute_flag), new (ir) ir_constant(false), 0));
-            jumps[lower] = 0;
-            block_records[lower].min_strength = strength_always_clears_execute_flag;
-            block_records[lower].may_clear_execute_flag = true;
-            this->progress = true;
-            break;
-         }
-      }
-
-      /* move out a jump out if possible */
-      if(pull_out_jumps) {
-         int move_out = -1;
-         if(jumps[0] && block_records[1].min_strength >= strength_continue)
-            move_out = 0;
-         else if(jumps[1] && block_records[0].min_strength >= strength_continue)
-            move_out = 1;
-
-         if(move_out >= 0)
-         {
-            jumps[move_out]->remove();
-            ir->insert_after(jumps[move_out]);
-            jumps[move_out] = 0;
-            block_records[move_out].min_strength = strength_none;
-            this->progress = true;
-         }
-      }
-
-      if(block_records[0].min_strength < block_records[1].min_strength)
-         this->block.min_strength = block_records[0].min_strength;
-      else
-         this->block.min_strength = block_records[1].min_strength;
-      this->block.may_clear_execute_flag = this->block.may_clear_execute_flag || block_records[0].may_clear_execute_flag || block_records[1].may_clear_execute_flag;
-
-      if(this->block.min_strength)
-         truncate_after_instruction(ir);
-      else if(this->block.may_clear_execute_flag)
-      {
-         int move_into = -1;
-         if(block_records[0].min_strength && !block_records[1].may_clear_execute_flag)
-            move_into = 1;
-         else if(block_records[1].min_strength && !block_records[0].may_clear_execute_flag)
-            move_into = 0;
-
-         if(move_into >= 0) {
-            assert(!block_records[move_into].min_strength && !block_records[move_into].may_clear_execute_flag); /* otherwise, we just truncated */
-
-            exec_list* list = move_into ? &ir->else_instructions : &ir->then_instructions;
-            exec_node* next = ir->get_next();
-            if(!next->is_tail_sentinel()) {
-               move_outer_block_inside(ir, list);
-
-               exec_list list;
-               list.head = next;
-               block_records[move_into] = visit_block(&list);
-
-               this->progress = true;
-               goto retry;
-            }
-         } else {
-            ir_instruction* ir_after;
-            for(ir_after = (ir_instruction*)ir->get_next(); !ir_after->is_tail_sentinel();)
-            {
-               ir_if* ir_if = ir_after->as_if();
-               if(ir_if && ir_if->else_instructions.is_empty()) {
-                  ir_dereference_variable* ir_if_cond_deref = ir_if->condition->as_dereference_variable();
-                  if(ir_if_cond_deref && ir_if_cond_deref->var == this->loop.execute_flag) {
-                     ir_instruction* ir_next = (ir_instruction*)ir_after->get_next();
-                     ir_after->insert_before(&ir_if->then_instructions);
-                     ir_after->remove();
-                     ir_after = ir_next;
-                     continue;
-                  }
-               }
-               ir_after = (ir_instruction*)ir_after->get_next();
-
-               /* only set this if we find any unprotected instruction */
-               this->progress = true;
-            }
-
-            if(!ir->get_next()->is_tail_sentinel()) {
-               assert(this->loop.execute_flag);
-               ir_if* if_execute = new(ir) ir_if(new(ir) ir_dereference_variable(this->loop.execute_flag));
-               move_outer_block_inside(ir, &if_execute->then_instructions);
-               ir->insert_after(if_execute);
-            }
-         }
-      }
-      --this->loop.nesting_depth;
-      --this->function.nesting_depth;
-   }
-
-   virtual void visit(ir_loop *ir)
-   {
-      ++this->function.nesting_depth;
-      loop_record saved_loop = this->loop;
-      this->loop = loop_record(this->function.signature, ir);
-
-      block_record body = visit_block(&ir->body_instructions);
-
-      if(body.min_strength >= strength_break) {
-         /* FINISHME: turn the this->loop into an if, or replace it with its body */
-      }
-
-      if(this->loop.break_flag) {
-         ir_if* break_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->loop.break_flag));
-         break_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
-         ir->body_instructions.push_tail(break_if);
-      }
-
-      if(this->loop.may_set_return_flag) {
-         assert(this->function.return_flag);
-         ir_if* return_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->function.return_flag));
-         saved_loop.may_set_return_flag = true;
-         if(saved_loop.loop)
-            return_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
-         else
-            move_outer_block_inside(ir, &return_if->else_instructions);
-         ir->insert_after(return_if);
-      }
-
-      this->loop = saved_loop;
-      --this->function.nesting_depth;
-   }
-
-   virtual void visit(ir_function_signature *ir)
-   {
-      /* these are not strictly necessary */
-      assert(!this->function.signature);
-      assert(!this->loop.loop);
-
-      function_record saved_function = this->function;
-      loop_record saved_loop = this->loop;
-      this->function = function_record(ir);
-      this->loop = loop_record(ir);
-
-      assert(!this->loop.loop);
-      visit_block(&ir->body);
-
-      if(this->function.return_value)
-         ir->body.push_tail(new(ir) ir_return(new (ir) ir_dereference_variable(this->function.return_value)));
-
-      this->loop = saved_loop;
-      this->function = saved_function;
-   }
-
-   virtual void visit(class ir_function * ir)
-   {
-      visit_block(&ir->signatures);
-   }
-};
-
-bool
-do_lower_jumps(exec_list *instructions, bool pull_out_jumps, bool lower_sub_return, bool lower_main_return, bool lower_continue, bool lower_break)
-{
-   ir_lower_jumps_visitor v;
-   v.pull_out_jumps = pull_out_jumps;
-   v.lower_continue = lower_continue;
-   v.lower_break = lower_break;
-   v.lower_sub_return = lower_sub_return;
-   v.lower_main_return = lower_main_return;
-
-   do {
-      v.progress = false;
-      visit_exec_list(instructions, &v);
-   } while (v.progress);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_mat_op_to_vec.cpp b/src/glsl/lower_mat_op_to_vec.cpp
deleted file mode 100644
index e09fa60..0000000
--- a/src/glsl/lower_mat_op_to_vec.cpp
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_mat_op_to_vec.cpp
- *
- * Breaks matrix operation expressions down to a series of vector operations.
- *
- * Generally this is how we have to codegen matrix operations for a
- * GPU, so this gives us the chance to constant fold operations on a
- * column or row.
- */
-
-#include "ir.h"
-#include "ir_expression_flattening.h"
-#include "glsl_types.h"
-
-class ir_mat_op_to_vec_visitor : public ir_hierarchical_visitor {
-public:
-   ir_mat_op_to_vec_visitor()
-   {
-      this->made_progress = false;
-      this->mem_ctx = NULL;
-   }
-
-   ir_visitor_status visit_leave(ir_assignment *);
-
-   ir_dereference *get_column(ir_variable *var, int col);
-   ir_rvalue *get_element(ir_variable *var, int col, int row);
-
-   void do_mul_mat_mat(ir_variable *result_var,
-		       ir_variable *a_var, ir_variable *b_var);
-   void do_mul_mat_vec(ir_variable *result_var,
-		       ir_variable *a_var, ir_variable *b_var);
-   void do_mul_vec_mat(ir_variable *result_var,
-		       ir_variable *a_var, ir_variable *b_var);
-   void do_mul_mat_scalar(ir_variable *result_var,
-			  ir_variable *a_var, ir_variable *b_var);
-   void do_equal_mat_mat(ir_variable *result_var, ir_variable *a_var,
-			 ir_variable *b_var, bool test_equal);
-
-   void *mem_ctx;
-   bool made_progress;
-};
-
-static bool
-mat_op_to_vec_predicate(ir_instruction *ir)
-{
-   ir_expression *expr = ir->as_expression();
-   unsigned int i;
-
-   if (!expr)
-      return false;
-
-   for (i = 0; i < expr->get_num_operands(); i++) {
-      if (expr->operands[i]->type->is_matrix())
-	 return true;
-   }
-
-   return false;
-}
-
-bool
-do_mat_op_to_vec(exec_list *instructions)
-{
-   ir_mat_op_to_vec_visitor v;
-
-   /* Pull out any matrix expression to a separate assignment to a
-    * temp.  This will make our handling of the breakdown to
-    * operations on the matrix's vector components much easier.
-    */
-   do_expression_flattening(instructions, mat_op_to_vec_predicate);
-
-   visit_list_elements(&v, instructions);
-
-   return v.made_progress;
-}
-
-ir_rvalue *
-ir_mat_op_to_vec_visitor::get_element(ir_variable *var, int col, int row)
-{
-   ir_dereference *deref;
-
-   deref = new(mem_ctx) ir_dereference_variable(var);
-
-   if (var->type->is_matrix()) {
-      deref = new(mem_ctx) ir_dereference_array(var,
-						new(mem_ctx) ir_constant(col));
-   } else {
-      assert(col == 0);
-   }
-
-   return new(mem_ctx) ir_swizzle(deref, row, 0, 0, 0, 1);
-}
-
-ir_dereference *
-ir_mat_op_to_vec_visitor::get_column(ir_variable *var, int row)
-{
-   ir_dereference *deref;
-
-   if (!var->type->is_matrix()) {
-      deref = new(mem_ctx) ir_dereference_variable(var);
-   } else {
-      deref = new(mem_ctx) ir_dereference_variable(var);
-      deref = new(mem_ctx) ir_dereference_array(deref,
-						new(mem_ctx) ir_constant(row));
-   }
-
-   return deref;
-}
-
-void
-ir_mat_op_to_vec_visitor::do_mul_mat_mat(ir_variable *result_var,
-					 ir_variable *a_var,
-					 ir_variable *b_var)
-{
-   int b_col, i;
-   ir_assignment *assign;
-   ir_expression *expr;
-
-   for (b_col = 0; b_col < b_var->type->matrix_columns; b_col++) {
-      ir_rvalue *a = get_column(a_var, 0);
-      ir_rvalue *b = get_element(b_var, b_col, 0);
-
-      /* first column */
-      expr = new(mem_ctx) ir_expression(ir_binop_mul,
-					a->type,
-					a,
-					b);
-
-      /* following columns */
-      for (i = 1; i < a_var->type->matrix_columns; i++) {
-	 ir_expression *mul_expr;
-
-	 a = get_column(a_var, i);
-	 b = get_element(b_var, b_col, i);
-
-	 mul_expr = new(mem_ctx) ir_expression(ir_binop_mul,
-					       a->type,
-					       a,
-					       b);
-	 expr = new(mem_ctx) ir_expression(ir_binop_add,
-					   a->type,
-					   expr,
-					   mul_expr);
-      }
-
-      ir_rvalue *result = get_column(result_var, b_col);
-      assign = new(mem_ctx) ir_assignment(result,
-					  expr,
-					  NULL);
-      base_ir->insert_before(assign);
-   }
-}
-
-void
-ir_mat_op_to_vec_visitor::do_mul_mat_vec(ir_variable *result_var,
-					 ir_variable *a_var,
-					 ir_variable *b_var)
-{
-   int i;
-   ir_rvalue *a = get_column(a_var, 0);
-   ir_rvalue *b = get_element(b_var, 0, 0);
-   ir_assignment *assign;
-   ir_expression *expr;
-
-   /* first column */
-   expr = new(mem_ctx) ir_expression(ir_binop_mul,
-				     result_var->type,
-				     a,
-				     b);
-
-   /* following columns */
-   for (i = 1; i < a_var->type->matrix_columns; i++) {
-      ir_expression *mul_expr;
-
-      a = get_column(a_var, i);
-      b = get_element(b_var, 0, i);
-
-      mul_expr = new(mem_ctx) ir_expression(ir_binop_mul,
-					    result_var->type,
-					    a,
-					    b);
-      expr = new(mem_ctx) ir_expression(ir_binop_add,
-					result_var->type,
-					expr,
-					mul_expr);
-   }
-
-   ir_rvalue *result = new(mem_ctx) ir_dereference_variable(result_var);
-   assign = new(mem_ctx) ir_assignment(result,
-				       expr,
-				       NULL);
-   base_ir->insert_before(assign);
-}
-
-void
-ir_mat_op_to_vec_visitor::do_mul_vec_mat(ir_variable *result_var,
-					 ir_variable *a_var,
-					 ir_variable *b_var)
-{
-   int i;
-
-   for (i = 0; i < b_var->type->matrix_columns; i++) {
-      ir_rvalue *a = new(mem_ctx) ir_dereference_variable(a_var);
-      ir_rvalue *b = get_column(b_var, i);
-      ir_rvalue *result;
-      ir_expression *column_expr;
-      ir_assignment *column_assign;
-
-      result = new(mem_ctx) ir_dereference_variable(result_var);
-      result = new(mem_ctx) ir_swizzle(result, i, 0, 0, 0, 1);
-
-      column_expr = new(mem_ctx) ir_expression(ir_binop_dot,
-					       result->type,
-					       a,
-					       b);
-
-      column_assign = new(mem_ctx) ir_assignment(result,
-						 column_expr,
-						 NULL);
-      base_ir->insert_before(column_assign);
-   }
-}
-
-void
-ir_mat_op_to_vec_visitor::do_mul_mat_scalar(ir_variable *result_var,
-					    ir_variable *a_var,
-					    ir_variable *b_var)
-{
-   int i;
-
-   for (i = 0; i < a_var->type->matrix_columns; i++) {
-      ir_rvalue *a = get_column(a_var, i);
-      ir_rvalue *b = new(mem_ctx) ir_dereference_variable(b_var);
-      ir_rvalue *result = get_column(result_var, i);
-      ir_expression *column_expr;
-      ir_assignment *column_assign;
-
-      column_expr = new(mem_ctx) ir_expression(ir_binop_mul,
-					       result->type,
-					       a,
-					       b);
-
-      column_assign = new(mem_ctx) ir_assignment(result,
-						 column_expr,
-						 NULL);
-      base_ir->insert_before(column_assign);
-   }
-}
-
-void
-ir_mat_op_to_vec_visitor::do_equal_mat_mat(ir_variable *result_var,
-					   ir_variable *a_var,
-					   ir_variable *b_var,
-					   bool test_equal)
-{
-   /* This essentially implements the following GLSL:
-    *
-    * bool equal(mat4 a, mat4 b)
-    * {
-    *   return !any(bvec4(a[0] != b[0],
-    *                     a[1] != b[1],
-    *                     a[2] != b[2],
-    *                     a[3] != b[3]);
-    * }
-    *
-    * bool nequal(mat4 a, mat4 b)
-    * {
-    *   return any(bvec4(a[0] != b[0],
-    *                    a[1] != b[1],
-    *                    a[2] != b[2],
-    *                    a[3] != b[3]);
-    * }
-    */
-   const unsigned columns = a_var->type->matrix_columns;
-   const glsl_type *const bvec_type =
-      glsl_type::get_instance(GLSL_TYPE_BOOL, columns, 1);
-
-   ir_variable *const tmp_bvec =
-      new(this->mem_ctx) ir_variable(bvec_type, "mat_cmp_bvec",
-				     ir_var_temporary);
-   this->base_ir->insert_before(tmp_bvec);
-
-   for (unsigned i = 0; i < columns; i++) {
-      ir_dereference *const op0 = get_column(a_var, i);
-      ir_dereference *const op1 = get_column(b_var, i);
-
-      ir_expression *const cmp =
-	 new(this->mem_ctx) ir_expression(ir_binop_any_nequal,
-					  glsl_type::bool_type, op0, op1);
-
-      ir_dereference *const lhs =
-	 new(this->mem_ctx) ir_dereference_variable(tmp_bvec);
-
-      ir_assignment *const assign =
-	 new(this->mem_ctx) ir_assignment(lhs, cmp, NULL, (1U << i));
-
-      this->base_ir->insert_before(assign);
-   }
-
-   ir_rvalue *const val =
-      new(this->mem_ctx) ir_dereference_variable(tmp_bvec);
-
-   ir_expression *any =
-      new(this->mem_ctx) ir_expression(ir_unop_any, glsl_type::bool_type,
-				       val, NULL);
-
-   if (test_equal)
-      any = new(this->mem_ctx) ir_expression(ir_unop_logic_not,
-					     glsl_type::bool_type,
-					     any, NULL);
-
-   ir_rvalue *const result =
-      new(this->mem_ctx) ir_dereference_variable(result_var);
-
-   ir_assignment *const assign =
-	 new(mem_ctx) ir_assignment(result, any, NULL);
-   base_ir->insert_before(assign);
-}
-
-static bool
-has_matrix_operand(const ir_expression *expr, unsigned &columns)
-{
-   for (unsigned i = 0; i < expr->get_num_operands(); i++) {
-      if (expr->operands[i]->type->is_matrix()) {
-	 columns = expr->operands[i]->type->matrix_columns;
-	 return true;
-      }
-   }
-
-   return false;
-}
-
-
-ir_visitor_status
-ir_mat_op_to_vec_visitor::visit_leave(ir_assignment *orig_assign)
-{
-   ir_expression *orig_expr = orig_assign->rhs->as_expression();
-   unsigned int i, matrix_columns = 1;
-   ir_variable *op_var[2];
-
-   if (!orig_expr)
-      return visit_continue;
-
-   if (!has_matrix_operand(orig_expr, matrix_columns))
-      return visit_continue;
-
-   assert(orig_expr->get_num_operands() <= 2);
-
-   mem_ctx = hieralloc_parent(orig_assign);
-
-   ir_dereference_variable *lhs_deref =
-      orig_assign->lhs->as_dereference_variable();
-   assert(lhs_deref);
-
-   ir_variable *result_var = lhs_deref->var;
-
-   /* Store the expression operands in temps so we can use them
-    * multiple times.
-    */
-   for (i = 0; i < orig_expr->get_num_operands(); i++) {
-      ir_assignment *assign;
-
-      op_var[i] = new(mem_ctx) ir_variable(orig_expr->operands[i]->type,
-					   "mat_op_to_vec",
-					   ir_var_temporary);
-      base_ir->insert_before(op_var[i]);
-
-      lhs_deref = new(mem_ctx) ir_dereference_variable(op_var[i]);
-      assign = new(mem_ctx) ir_assignment(lhs_deref,
-					  orig_expr->operands[i],
-					  NULL);
-      base_ir->insert_before(assign);
-   }
-
-   /* OK, time to break down this matrix operation. */
-   switch (orig_expr->operation) {
-   case ir_unop_neg: {
-      const unsigned mask = (1U << result_var->type->vector_elements) - 1;
-
-      /* Apply the operation to each column.*/
-      for (i = 0; i < matrix_columns; i++) {
-	 ir_rvalue *op0 = get_column(op_var[0], i);
-	 ir_dereference *result = get_column(result_var, i);
-	 ir_expression *column_expr;
-	 ir_assignment *column_assign;
-
-	 column_expr = new(mem_ctx) ir_expression(orig_expr->operation,
-						  result->type,
-						  op0,
-						  NULL);
-
-	 column_assign = new(mem_ctx) ir_assignment(result,
-						    column_expr,
-						    NULL,
-						    mask);
-	 assert(column_assign->write_mask != 0);
-	 base_ir->insert_before(column_assign);
-      }
-      break;
-   }
-   case ir_binop_add:
-   case ir_binop_sub:
-   case ir_binop_div:
-   case ir_binop_mod: {
-      const unsigned mask = (1U << result_var->type->vector_elements) - 1;
-
-      /* For most operations, the matrix version is just going
-       * column-wise through and applying the operation to each column
-       * if available.
-       */
-      for (i = 0; i < matrix_columns; i++) {
-	 ir_rvalue *op0 = get_column(op_var[0], i);
-	 ir_rvalue *op1 = get_column(op_var[1], i);
-	 ir_dereference *result = get_column(result_var, i);
-	 ir_expression *column_expr;
-	 ir_assignment *column_assign;
-
-	 column_expr = new(mem_ctx) ir_expression(orig_expr->operation,
-						  result->type,
-						  op0,
-						  op1);
-
-	 column_assign = new(mem_ctx) ir_assignment(result,
-						    column_expr,
-						    NULL,
-						    mask);
-	 assert(column_assign->write_mask != 0);
-	 base_ir->insert_before(column_assign);
-      }
-      break;
-   }
-   case ir_binop_mul:
-      if (op_var[0]->type->is_matrix()) {
-	 if (op_var[1]->type->is_matrix()) {
-	    do_mul_mat_mat(result_var, op_var[0], op_var[1]);
-	 } else if (op_var[1]->type->is_vector()) {
-	    do_mul_mat_vec(result_var, op_var[0], op_var[1]);
-	 } else {
-	    assert(op_var[1]->type->is_scalar());
-	    do_mul_mat_scalar(result_var, op_var[0], op_var[1]);
-	 }
-      } else {
-	 assert(op_var[1]->type->is_matrix());
-	 if (op_var[0]->type->is_vector()) {
-	    do_mul_vec_mat(result_var, op_var[0], op_var[1]);
-	 } else {
-	    assert(op_var[0]->type->is_scalar());
-	    do_mul_mat_scalar(result_var, op_var[1], op_var[0]);
-	 }
-      }
-      break;
-
-   case ir_binop_all_equal:
-   case ir_binop_any_nequal:
-      do_equal_mat_mat(result_var, op_var[1], op_var[0],
-		       (orig_expr->operation == ir_binop_all_equal));
-      break;
-
-   default:
-      printf("FINISHME: Handle matrix operation for %s\n",
-	     orig_expr->operator_string());
-      abort();
-   }
-   orig_assign->remove();
-   this->made_progress = true;
-
-   return visit_continue;
-}
diff --git a/src/glsl/lower_noise.cpp b/src/glsl/lower_noise.cpp
deleted file mode 100644
index 080376a..0000000
--- a/src/glsl/lower_noise.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_noise.cpp
- * IR lower pass to remove noise opcodes.
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-
-#include "ir.h"
-#include "ir_rvalue_visitor.h"
-
-class lower_noise_visitor : public ir_rvalue_visitor {
-public:
-   lower_noise_visitor() : progress(false)
-   {
-      /* empty */
-   }
-
-   void handle_rvalue(ir_rvalue **rvalue)
-   {
-      if (!*rvalue)
-	 return;
-
-      ir_expression *expr = (*rvalue)->as_expression();
-      if (!expr)
-	 return;
-
-      /* In the future, ir_unop_noise may be replaced by a call to a function
-       * that implements noise.  No hardware has a noise instruction.
-       */
-      if (expr->operation == ir_unop_noise) {
-	 *rvalue = ir_constant::zero(hieralloc_parent(expr), expr->type);
-	 this->progress = true;
-      }
-   }
-
-   bool progress;
-};
-
-
-bool
-lower_noise(exec_list *instructions)
-{
-   lower_noise_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_texture_projection.cpp b/src/glsl/lower_texture_projection.cpp
deleted file mode 100644
index 0514f2b..0000000
--- a/src/glsl/lower_texture_projection.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_texture_projection.cpp
- *
- * IR lower pass to perform the division of texture coordinates by the texture
- * projector if present.
- *
- * Many GPUs have a texture sampling opcode that takes the projector
- * and does the divide internally, thus the presence of the projector
- * in the IR.  For GPUs that don't, this saves the driver needing the
- * logic for handling the divide.
- *
- * \author Eric Anholt <eric@anholt.net>
- */
-
-#include "ir.h"
-
-class lower_texture_projection_visitor : public ir_hierarchical_visitor {
-public:
-   lower_texture_projection_visitor()
-   {
-      progress = false;
-   }
-
-   ir_visitor_status visit_leave(ir_texture *ir);
-
-   bool progress;
-};
-
-ir_visitor_status
-lower_texture_projection_visitor::visit_leave(ir_texture *ir)
-{
-   if (!ir->projector)
-      return visit_continue;
-
-   void *mem_ctx = hieralloc_parent(ir);
-
-   ir_variable *var = new(mem_ctx) ir_variable(ir->projector->type,
-					       "projector", ir_var_auto);
-   base_ir->insert_before(var);
-   ir_dereference *deref = new(mem_ctx) ir_dereference_variable(var);
-   ir_expression *expr = new(mem_ctx) ir_expression(ir_unop_rcp,
-						    ir->projector->type,
-						    ir->projector,
-						    NULL);
-   ir_assignment *assign = new(mem_ctx) ir_assignment(deref, expr, NULL);
-   base_ir->insert_before(assign);
-
-   deref = new(mem_ctx) ir_dereference_variable(var);
-   ir->coordinate = new(mem_ctx) ir_expression(ir_binop_mul,
-					       ir->coordinate->type,
-					       ir->coordinate,
-					       deref);
-
-   if (ir->shadow_comparitor) {
-      deref = new(mem_ctx) ir_dereference_variable(var);
-      ir->shadow_comparitor = new(mem_ctx) ir_expression(ir_binop_mul,
-						  ir->shadow_comparitor->type,
-						  ir->shadow_comparitor,
-						  deref);
-   }
-
-   ir->projector = NULL;
-
-   progress = true;
-   return visit_continue;
-}
-
-bool
-do_lower_texture_projection(exec_list *instructions)
-{
-   lower_texture_projection_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp
deleted file mode 100644
index 534fb51..0000000
--- a/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright © 2010 Luca Barbieri
- *
- * 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.
- */
-
-/**
- * \file lower_variable_index_to_cond_assign.cpp
- *
- * Turns non-constant indexing into array types to a series of
- * conditional moves of each element into a temporary.
- *
- * Pre-DX10 GPUs often don't have a native way to do this operation,
- * and this works around that.
- */
-
-#include "ir.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-#include "main/macros.h"
-
-struct assignment_generator
-{
-   ir_instruction* base_ir;
-   ir_rvalue* array;
-   bool is_write;
-   ir_variable* var;
-
-   assignment_generator()
-   {
-   }
-
-   void generate(unsigned i, ir_rvalue* condition, exec_list *list) const
-   {
-      /* Just clone the rest of the deref chain when trying to get at the
-       * underlying variable.
-       */
-      void *mem_ctx = hieralloc_parent(base_ir);
-      ir_rvalue *element =
-	 new(mem_ctx) ir_dereference_array(this->array->clone(mem_ctx, NULL),
-					   new(mem_ctx) ir_constant(i));
-      ir_rvalue *variable = new(mem_ctx) ir_dereference_variable(this->var);
-
-      ir_assignment *assignment = (is_write)
-	 ? new(mem_ctx) ir_assignment(element, variable, condition)
-	 : new(mem_ctx) ir_assignment(variable, element, condition);
-
-      list->push_tail(assignment);
-   }
-};
-
-struct switch_generator
-{
-   /* make TFunction a template parameter if you need to use other generators */
-   typedef assignment_generator TFunction;
-   const TFunction& generator;
-
-   ir_variable* index;
-   unsigned linear_sequence_max_length;
-   unsigned condition_components;
-
-   void *mem_ctx;
-
-   switch_generator(const TFunction& generator, ir_variable *index,
-		    unsigned linear_sequence_max_length,
-		    unsigned condition_components)
-      : generator(generator), index(index),
-	linear_sequence_max_length(linear_sequence_max_length),
-	condition_components(condition_components)
-   {
-      this->mem_ctx = hieralloc_parent(index);
-   }
-
-   void linear_sequence(unsigned begin, unsigned end, exec_list *list)
-   {
-      if (begin == end)
-         return;
-
-      /* If the array access is a read, read the first element of this subregion
-       * unconditionally.  The remaining tests will possibly overwrite this
-       * value with one of the other array elements.
-       *
-       * This optimization cannot be done for writes because it will cause the
-       * first element of the subregion to be written possibly *in addition* to
-       * one of the other elements.
-       */
-      unsigned first;
-      if (!this->generator.is_write) {
-	 this->generator.generate(begin, 0, list);
-	 first = begin + 1;
-      } else {
-	 first = begin;
-      }
-
-      for (unsigned i = first; i < end; i += 4) {
-         const unsigned comps = MIN2(condition_components, end - i);
-
-         ir_rvalue *broadcast_index =
-	    new(this->mem_ctx) ir_dereference_variable(index);
-
-         if (comps) {
-	    const ir_swizzle_mask m = { 0, 0, 0, 0, comps, false };
-	    broadcast_index = new(this->mem_ctx) ir_swizzle(broadcast_index, m);
-	 }
-
-	 /* Compare the desired index value with the next block of four indices.
-	  */
-         ir_constant_data test_indices_data;
-         memset(&test_indices_data, 0, sizeof(test_indices_data));
-         test_indices_data.i[0] = i;
-         test_indices_data.i[1] = i + 1;
-         test_indices_data.i[2] = i + 2;
-         test_indices_data.i[3] = i + 3;
-         ir_constant *const test_indices =
-	    new(this->mem_ctx) ir_constant(broadcast_index->type,
-					   &test_indices_data);
-
-         ir_rvalue *const condition_val =
-	    new(this->mem_ctx) ir_expression(ir_binop_equal,
-					     &glsl_type::bool_type[comps - 1],
-					     broadcast_index,
-					     test_indices);
-
-         ir_variable *const condition =
-	    new(this->mem_ctx) ir_variable(condition_val->type,
-					   "dereference_array_condition",
-					   ir_var_temporary);
-         list->push_tail(condition);
-
-	 ir_rvalue *const cond_deref =
-	    new(this->mem_ctx) ir_dereference_variable(condition);
-         list->push_tail(new(this->mem_ctx) ir_assignment(cond_deref,
-							  condition_val, 0));
-
-         if (comps == 1) {
-	    ir_rvalue *const cond_deref =
-	       new(this->mem_ctx) ir_dereference_variable(condition);
-
-            this->generator.generate(i, cond_deref, list);
-         } else {
-            for (unsigned j = 0; j < comps; j++) {
-	       ir_rvalue *const cond_deref =
-		  new(this->mem_ctx) ir_dereference_variable(condition);
-	       ir_rvalue *const cond_swiz =
-		  new(this->mem_ctx) ir_swizzle(cond_deref, j, 0, 0, 0, 1);
-
-               this->generator.generate(i + j, cond_swiz, list);
-            }
-         }
-      }
-   }
-
-   void bisect(unsigned begin, unsigned end, exec_list *list)
-   {
-      unsigned middle = (begin + end) >> 1;
-
-      assert(index->type->is_integer());
-
-      ir_constant *const middle_c = (index->type->base_type == GLSL_TYPE_UINT)
-	 ? new(this->mem_ctx) ir_constant((unsigned)middle)
-         : new(this->mem_ctx) ir_constant((int)middle);
-
-
-      ir_dereference_variable *deref =
-	 new(this->mem_ctx) ir_dereference_variable(this->index);
-
-      ir_expression *less =
-	 new(this->mem_ctx) ir_expression(ir_binop_less, glsl_type::bool_type,
-					  deref, middle_c);
-
-      ir_if *if_less = new(this->mem_ctx) ir_if(less);
-
-      generate(begin, middle, &if_less->then_instructions);
-      generate(middle, end, &if_less->else_instructions);
-
-      list->push_tail(if_less);
-   }
-
-   void generate(unsigned begin, unsigned end, exec_list *list)
-   {
-      unsigned length = end - begin;
-      if (length <= this->linear_sequence_max_length)
-         return linear_sequence(begin, end, list);
-      else
-         return bisect(begin, end, list);
-   }
-};
-
-/**
- * Visitor class for replacing expressions with ir_constant values.
- */
-
-class variable_index_to_cond_assign_visitor : public ir_rvalue_visitor {
-public:
-   variable_index_to_cond_assign_visitor(bool lower_input,
-					 bool lower_output,
-					 bool lower_temp,
-					 bool lower_uniform)
-   {
-      this->progress = false;
-      this->lower_inputs = lower_input;
-      this->lower_outputs = lower_output;
-      this->lower_temps = lower_temp;
-      this->lower_uniforms = lower_uniform;
-   }
-
-   bool progress;
-   bool lower_inputs;
-   bool lower_outputs;
-   bool lower_temps;
-   bool lower_uniforms;
-
-   bool is_array_or_matrix(const ir_instruction *ir) const
-   {
-      return (ir->type->is_array() || ir->type->is_matrix());
-   }
-
-   bool needs_lowering(ir_dereference_array *deref) const
-   {
-      if (deref == NULL || deref->array_index->as_constant()
-	  || !is_array_or_matrix(deref->array))
-	 return false;
-
-      if (deref->array->ir_type == ir_type_constant)
-	 return this->lower_temps;
-
-      const ir_variable *const var = deref->array->variable_referenced();
-      switch (var->mode) {
-      case ir_var_auto:
-      case ir_var_temporary:
-	 return this->lower_temps;
-      case ir_var_uniform:
-	 return this->lower_uniforms;
-      case ir_var_in:
-	 return (var->location == -1) ? this->lower_temps : this->lower_inputs;
-      case ir_var_out:
-	 return (var->location == -1) ? this->lower_temps : this->lower_outputs;
-      case ir_var_inout:
-	 return this->lower_temps;
-      }
-
-      assert(!"Should not get here.");
-      return false;
-   }
-
-   ir_variable *convert_dereference_array(ir_dereference_array *orig_deref,
-					  ir_rvalue* value)
-   {
-      assert(is_array_or_matrix(orig_deref->array));
-
-      const unsigned length = (orig_deref->array->type->is_array())
-         ? orig_deref->array->type->length
-         : orig_deref->array->type->matrix_columns;
-
-      void *const mem_ctx = hieralloc_parent(base_ir);
-      ir_variable *var =
-	 new(mem_ctx) ir_variable(orig_deref->type, "dereference_array_value",
-				  ir_var_temporary);
-      base_ir->insert_before(var);
-
-      if (value) {
-	 ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(var);
-	 ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, value, NULL);
-
-         base_ir->insert_before(assign);
-      }
-
-      /* Store the index to a temporary to avoid reusing its tree. */
-      ir_variable *index =
-	 new(mem_ctx) ir_variable(orig_deref->array_index->type,
-				  "dereference_array_index", ir_var_temporary);
-      base_ir->insert_before(index);
-
-      ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(index);
-      ir_assignment *assign =
-	 new(mem_ctx) ir_assignment(lhs, orig_deref->array_index, NULL);
-      base_ir->insert_before(assign);
-
-      assignment_generator ag;
-      ag.array = orig_deref->array;
-      ag.base_ir = base_ir;
-      ag.var = var;
-      ag.is_write = !!value;
-
-      switch_generator sg(ag, index, 4, 4);
-
-      exec_list list;
-      sg.generate(0, length, &list);
-      base_ir->insert_before(&list);
-
-      return var;
-   }
-
-   virtual void handle_rvalue(ir_rvalue **pir)
-   {
-      if (!*pir)
-         return;
-
-      ir_dereference_array* orig_deref = (*pir)->as_dereference_array();
-      if (needs_lowering(orig_deref)) {
-         ir_variable* var = convert_dereference_array(orig_deref, 0);
-         assert(var);
-         *pir = new(hieralloc_parent(base_ir)) ir_dereference_variable(var);
-         this->progress = true;
-      }
-   }
-
-   ir_visitor_status
-   visit_leave(ir_assignment *ir)
-   {
-      ir_rvalue_visitor::visit_leave(ir);
-
-      ir_dereference_array *orig_deref = ir->lhs->as_dereference_array();
-
-      if (needs_lowering(orig_deref)) {
-         convert_dereference_array(orig_deref, ir->rhs);
-         ir->remove();
-         this->progress = true;
-      }
-
-      return visit_continue;
-   }
-};
-
-bool
-lower_variable_index_to_cond_assign(exec_list *instructions,
-				    bool lower_input,
-				    bool lower_output,
-				    bool lower_temp,
-				    bool lower_uniform)
-{
-   variable_index_to_cond_assign_visitor v(lower_input,
-					   lower_output,
-					   lower_temp,
-					   lower_uniform);
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_vec_index_to_cond_assign.cpp b/src/glsl/lower_vec_index_to_cond_assign.cpp
deleted file mode 100644
index 0b86ba18..0000000
--- a/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_vec_index_to_cond_assign.cpp
- *
- * Turns indexing into vector types to a series of conditional moves
- * of each channel's swizzle into a temporary.
- *
- * Most GPUs don't have a native way to do this operation, and this
- * works around that.  For drivers using both this pass and
- * ir_vec_index_to_swizzle, there's a risk that this pass will happen
- * before sufficient constant folding to find that the array index is
- * constant.  However, we hope that other optimization passes,
- * particularly constant folding of assignment conditions and copy
- * propagation, will result in the same code in the end.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-/**
- * Visitor class for replacing expressions with ir_constant values.
- */
-
-class ir_vec_index_to_cond_assign_visitor : public ir_hierarchical_visitor {
-public:
-   ir_vec_index_to_cond_assign_visitor()
-   {
-      progress = false;
-   }
-
-   ir_rvalue *convert_vec_index_to_cond_assign(ir_rvalue *val);
-
-   virtual ir_visitor_status visit_enter(ir_expression *);
-   virtual ir_visitor_status visit_enter(ir_swizzle *);
-   virtual ir_visitor_status visit_leave(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_return *);
-   virtual ir_visitor_status visit_enter(ir_call *);
-   virtual ir_visitor_status visit_enter(ir_if *);
-
-   bool progress;
-};
-
-ir_rvalue *
-ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue *ir)
-{
-   ir_dereference_array *orig_deref = ir->as_dereference_array();
-   ir_assignment *assign;
-   ir_variable *index, *var;
-   ir_dereference *deref;
-   ir_expression *condition;
-   ir_swizzle *swizzle;
-   int i;
-
-   if (!orig_deref)
-      return ir;
-
-   if (orig_deref->array->type->is_matrix() ||
-       orig_deref->array->type->is_array())
-      return ir;
-
-   void *mem_ctx = hieralloc_parent(ir);
-
-   assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
-
-   /* Store the index to a temporary to avoid reusing its tree. */
-   index = new(base_ir) ir_variable(glsl_type::int_type,
-				    "vec_index_tmp_i",
-				    ir_var_temporary);
-   base_ir->insert_before(index);
-   deref = new(base_ir) ir_dereference_variable(index);
-   assign = new(base_ir) ir_assignment(deref, orig_deref->array_index, NULL);
-   base_ir->insert_before(assign);
-
-   /* Temporary where we store whichever value we swizzle out. */
-   var = new(base_ir) ir_variable(ir->type, "vec_index_tmp_v",
-				  ir_var_temporary);
-   base_ir->insert_before(var);
-
-   /* Generate a conditional move of each vector element to the temp. */
-   for (i = 0; i < orig_deref->array->type->vector_elements; i++) {
-      deref = new(base_ir) ir_dereference_variable(index);
-      condition = new(base_ir) ir_expression(ir_binop_equal,
-					     glsl_type::bool_type,
-					     deref,
-					     new(base_ir) ir_constant(i));
-
-      /* Just clone the rest of the deref chain when trying to get at the
-       * underlying variable.
-       */
-      swizzle = new(base_ir) ir_swizzle(orig_deref->array->clone(mem_ctx, NULL),
-					i, 0, 0, 0, 1);
-
-      deref = new(base_ir) ir_dereference_variable(var);
-      assign = new(base_ir) ir_assignment(deref, swizzle, condition);
-      base_ir->insert_before(assign);
-   }
-
-   this->progress = true;
-   return new(base_ir) ir_dereference_variable(var);
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_enter(ir_expression *ir)
-{
-   unsigned int i;
-
-   for (i = 0; i < ir->get_num_operands(); i++) {
-      ir->operands[i] = convert_vec_index_to_cond_assign(ir->operands[i]);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir)
-{
-   /* Can't be hit from normal GLSL, since you can't swizzle a scalar (which
-    * the result of indexing a vector is.  But maybe at some point we'll end up
-    * using swizzling of scalars for vector construction.
-    */
-   ir->val = convert_vec_index_to_cond_assign(ir->val);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
-{
-   ir_variable *index, *var;
-   ir_dereference_variable *deref;
-   ir_assignment *assign;
-   int i;
-
-   ir->rhs = convert_vec_index_to_cond_assign(ir->rhs);
-   if (ir->condition)
-      ir->condition = convert_vec_index_to_cond_assign(ir->condition);
-
-   /* Last, handle the LHS */
-   ir_dereference_array *orig_deref = ir->lhs->as_dereference_array();
-
-   if (!orig_deref ||
-       orig_deref->array->type->is_matrix() ||
-       orig_deref->array->type->is_array())
-      return visit_continue;
-
-   void *mem_ctx = hieralloc_parent(ir);
-
-   assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
-
-   /* Store the index to a temporary to avoid reusing its tree. */
-   index = new(ir) ir_variable(glsl_type::int_type, "vec_index_tmp_i",
-			       ir_var_temporary);
-   ir->insert_before(index);
-   deref = new(ir) ir_dereference_variable(index);
-   assign = new(ir) ir_assignment(deref, orig_deref->array_index, NULL);
-   ir->insert_before(assign);
-
-   /* Store the RHS to a temporary to avoid reusing its tree. */
-   var = new(ir) ir_variable(ir->rhs->type, "vec_index_tmp_v",
-			     ir_var_temporary);
-   ir->insert_before(var);
-   deref = new(ir) ir_dereference_variable(var);
-   assign = new(ir) ir_assignment(deref, ir->rhs, NULL);
-   ir->insert_before(assign);
-
-   /* Generate a conditional move of each vector element to the temp. */
-   for (i = 0; i < orig_deref->array->type->vector_elements; i++) {
-      ir_rvalue *condition, *swizzle;
-
-      deref = new(ir) ir_dereference_variable(index);
-      condition = new(ir) ir_expression(ir_binop_equal,
-					glsl_type::bool_type,
-					deref,
-					new(ir) ir_constant(i));
-
-      /* Just clone the rest of the deref chain when trying to get at the
-       * underlying variable.
-       */
-      swizzle = new(ir) ir_swizzle(orig_deref->array->clone(mem_ctx, NULL),
-				   i, 0, 0, 0, 1);
-
-      deref = new(ir) ir_dereference_variable(var);
-      assign = new(ir) ir_assignment(swizzle, deref, condition);
-      ir->insert_before(assign);
-   }
-   ir->remove();
-
-   this->progress = true;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_enter(ir_call *ir)
-{
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param = (ir_rvalue *)iter.get();
-      ir_rvalue *new_param = convert_vec_index_to_cond_assign(param);
-
-      if (new_param != param) {
-	 param->replace_with(new_param);
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_enter(ir_return *ir)
-{
-   if (ir->value) {
-      ir->value = convert_vec_index_to_cond_assign(ir->value);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_cond_assign_visitor::visit_enter(ir_if *ir)
-{
-   ir->condition = convert_vec_index_to_cond_assign(ir->condition);
-
-   return visit_continue;
-}
-
-bool
-do_vec_index_to_cond_assign(exec_list *instructions)
-{
-   ir_vec_index_to_cond_assign_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_vec_index_to_swizzle.cpp b/src/glsl/lower_vec_index_to_swizzle.cpp
deleted file mode 100644
index 444705f..0000000
--- a/src/glsl/lower_vec_index_to_swizzle.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_vec_index_to_swizzle.cpp
- *
- * Turns constant indexing into vector types to swizzles.  This will
- * let other swizzle-aware optimization passes catch these constructs,
- * and codegen backends not have to worry about this case.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-/**
- * Visitor class for replacing expressions with ir_constant values.
- */
-
-class ir_vec_index_to_swizzle_visitor : public ir_hierarchical_visitor {
-public:
-   ir_vec_index_to_swizzle_visitor()
-   {
-      progress = false;
-   }
-
-   ir_rvalue *convert_vec_index_to_swizzle(ir_rvalue *val);
-
-   virtual ir_visitor_status visit_enter(ir_expression *);
-   virtual ir_visitor_status visit_enter(ir_swizzle *);
-   virtual ir_visitor_status visit_enter(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_return *);
-   virtual ir_visitor_status visit_enter(ir_call *);
-   virtual ir_visitor_status visit_enter(ir_if *);
-
-   bool progress;
-};
-
-ir_rvalue *
-ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
-{
-   ir_dereference_array *deref = ir->as_dereference_array();
-   ir_constant *ir_constant;
-
-   if (!deref)
-      return ir;
-
-   if (deref->array->type->is_matrix() || deref->array->type->is_array())
-      return ir;
-
-   assert(deref->array_index->type->base_type == GLSL_TYPE_INT);
-   ir_constant = deref->array_index->constant_expression_value();
-   if (!ir_constant)
-      return ir;
-
-   void *ctx = hieralloc_parent(ir);
-   this->progress = true;
-   return new(ctx) ir_swizzle(deref->array,
-			      ir_constant->value.i[0], 0, 0, 0, 1);
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_expression *ir)
-{
-   unsigned int i;
-
-   for (i = 0; i < ir->get_num_operands(); i++) {
-      ir->operands[i] = convert_vec_index_to_swizzle(ir->operands[i]);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir)
-{
-   /* Can't be hit from normal GLSL, since you can't swizzle a scalar (which
-    * the result of indexing a vector is.  But maybe at some point we'll end up
-    * using swizzling of scalars for vector construction.
-    */
-   ir->val = convert_vec_index_to_swizzle(ir->val);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_assignment *ir)
-{
-   ir->set_lhs(convert_vec_index_to_swizzle(ir->lhs));
-   ir->rhs = convert_vec_index_to_swizzle(ir->rhs);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_call *ir)
-{
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param = (ir_rvalue *)iter.get();
-      ir_rvalue *new_param = convert_vec_index_to_swizzle(param);
-
-      if (new_param != param) {
-	 param->replace_with(new_param);
-      }
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_return *ir)
-{
-   if (ir->value) {
-      ir->value = convert_vec_index_to_swizzle(ir->value);
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_vec_index_to_swizzle_visitor::visit_enter(ir_if *ir)
-{
-   ir->condition = convert_vec_index_to_swizzle(ir->condition);
-
-   return visit_continue;
-}
-
-bool
-do_vec_index_to_swizzle(exec_list *instructions)
-{
-   ir_vec_index_to_swizzle_visitor v;
-
-   v.run(instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/lower_vector.cpp b/src/glsl/lower_vector.cpp
deleted file mode 100644
index 4429e9a..0000000
--- a/src/glsl/lower_vector.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file lower_vector.cpp
- * IR lowering pass to remove some types of ir_quadop_vector
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-
-#include "ir.h"
-#include "ir_rvalue_visitor.h"
-
-class lower_vector_visitor : public ir_rvalue_visitor {
-public:
-   lower_vector_visitor() : progress(false)
-   {
-      /* empty */
-   }
-
-   void handle_rvalue(ir_rvalue **rvalue);
-
-   /**
-    * Should SWZ-like expressions be lowered?
-    */
-   bool dont_lower_swz;
-
-   bool progress;
-};
-
-/**
- * Determine if an IR expression tree looks like an extended swizzle
- *
- * Extended swizzles consist of access of a single vector source (with possible
- * per component negation) and the constants -1, 0, or 1.
- */
-bool
-is_extended_swizzle(ir_expression *ir)
-{
-   /* Track any variables that are accessed by this expression.
-    */
-   ir_variable *var = NULL;
-
-   assert(ir->operation == ir_quadop_vector);
-
-   for (unsigned i = 0; i < ir->type->vector_elements; i++) {
-      ir_rvalue *op = ir->operands[i];
-
-      while (op != NULL) {
-	 switch (op->ir_type) {
-	 case ir_type_constant: {
-	    const ir_constant *const c = op->as_constant();
-
-	    if (!c->is_one() && !c->is_zero() && !c->is_negative_one())
-	       return false;
-
-	    op = NULL;
-	    break;
-	 }
-
-	 case ir_type_dereference_variable: {
-	    ir_dereference_variable *const d = (ir_dereference_variable *) op;
-
-	    if ((var != NULL) && (var != d->var))
-	       return false;
-
-	    var = d->var;
-	    op = NULL;
-	    break;
-	 }
-
-	 case ir_type_expression: {
-	    ir_expression *const ex = (ir_expression *) op;
-
-	    if (ex->operation != ir_unop_neg)
-	       return false;
-
-	    op = ex->operands[0];
-	    break;
-	 }
-
-	 case ir_type_swizzle:
-	    op = ((ir_swizzle *) op)->val;
-	    break;
-
-	 default:
-	    return false;
-	 }
-      }
-   }
-
-   return true;
-}
-
-void
-lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return;
-
-   ir_expression *expr = (*rvalue)->as_expression();
-   if ((expr == NULL) || (expr->operation != ir_quadop_vector))
-      return;
-
-   if (this->dont_lower_swz && is_extended_swizzle(expr))
-      return;
-
-   /* FINISHME: Is this the right thing to use for the hieralloc context?
-    */
-   void *const mem_ctx = expr;
-
-   assert(expr->type->vector_elements == expr->get_num_operands());
-
-   /* Generate a temporary with the same type as the ir_quadop_operation.
-    */
-   ir_variable *const temp =
-      new(mem_ctx) ir_variable(expr->type, "vecop_tmp", ir_var_temporary);
-
-   this->base_ir->insert_before(temp);
-
-   /* Counter of the number of components collected so far.
-    */
-   unsigned assigned;
-
-   /* Write-mask in the destination that receives counted by 'assigned'.
-    */
-   unsigned write_mask;
-
-
-   /* Generate upto four assignments to that variable.  Try to group component
-    * assignments together:
-    *
-    * - All constant components can be assigned at once.
-    * - All assigments of components from a single variable with the same
-    *   unary operator can be assigned at once.
-    */
-   ir_constant_data d = { { 0 } };
-
-   assigned = 0;
-   write_mask = 0;
-   for (unsigned i = 0; i < expr->type->vector_elements; i++) {
-      const ir_constant *const c = expr->operands[i]->as_constant();
-
-      if (c == NULL)
-	 continue;
-
-      switch (expr->type->base_type) {
-      case GLSL_TYPE_UINT:  d.u[assigned] = c->value.u[0]; break;
-      case GLSL_TYPE_INT:   d.i[assigned] = c->value.i[0]; break;
-      case GLSL_TYPE_FLOAT: d.f[assigned] = c->value.f[0]; break;
-      case GLSL_TYPE_BOOL:  d.b[assigned] = c->value.b[0]; break;
-      default:              assert(!"Should not get here."); break;
-      }
-
-      write_mask |= (1U << i);
-      assigned++;
-   }
-
-   assert((write_mask == 0) == (assigned == 0));
-
-   /* If there were constant values, generate an assignment.
-    */
-   if (assigned > 0) {
-      ir_constant *const c =
-	 new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type,
-							  assigned, 0),
-				  &d);
-      ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp);
-      ir_assignment *const assign =
-	 new(mem_ctx) ir_assignment(lhs, c, NULL, write_mask);
-
-      this->base_ir->insert_before(assign);
-   }
-
-   /* FINISHME: This should try to coalesce assignments.
-    */
-   for (unsigned i = 0; i < expr->type->vector_elements; i++) {
-      if (expr->operands[i]->ir_type == ir_type_constant)
-	 continue;
-
-      ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp);
-      ir_assignment *const assign =
-	 new(mem_ctx) ir_assignment(lhs, expr->operands[i], NULL, (1U << i));
-
-      this->base_ir->insert_before(assign);
-      assigned++;
-   }
-
-   assert(assigned == expr->type->vector_elements);
-
-   *rvalue = new(mem_ctx) ir_dereference_variable(temp);
-   this->progress = true;
-}
-
-bool
-lower_quadop_vector(exec_list *instructions, bool dont_lower_swz)
-{
-   lower_vector_visitor v;
-
-   v.dont_lower_swz = dont_lower_swz;
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
deleted file mode 100644
index c51ee9a..0000000
--- a/src/glsl/main.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-#include <cstdlib>
-#include <cstdio>
-#include <getopt.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_parser.h"
-#include "ir_optimization.h"
-#include "ir_print_visitor.h"
-#include "program.h"
-#include "loop_analysis.h"
-
-#include "ir_to_llvm.h"
-
-#include "src/pixelflinger2/pixelflinger2.h"
-
-static int dump_ast = 0;
-static int dump_hir = 0;
-static int dump_lir = 0;
-
-extern "C" void
-compile_shader(const struct gl_context *ctx, struct gl_shader *shader)
-{
-   struct _mesa_glsl_parse_state *state =
-      new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader);
-
-   const char *source = shader->Source;
-   state->error = preprocess(state, &source, &state->info_log,
-			     state->extensions, ctx->API);
-
-   if (!state->error) {
-      _mesa_glsl_lexer_ctor(state, source);
-      _mesa_glsl_parse(state);
-      _mesa_glsl_lexer_dtor(state);
-   }
-
-   if (dump_ast) {
-      foreach_list_const(n, &state->translation_unit) {
-	 ast_node *ast = exec_node_data(ast_node, n, link);
-	 ast->print();
-      }
-      printf("\n\n");
-   }
-
-   shader->ir = new(shader) exec_list;
-   if (!state->error && !state->translation_unit.is_empty())
-      _mesa_ast_to_hir(shader->ir, state);
-
-   /* Print out the unoptimized IR. */
-   if (!state->error && dump_hir) {
-      validate_ir_tree(shader->ir);
-      _mesa_print_ir(shader->ir, state);
-   }
-
-   /* Optimization passes */
-   if (!state->error && !shader->ir->is_empty()) {
-      bool progress;
-      do {
-	 progress = do_common_optimization(shader->ir, false, 32);
-      } while (progress);
-
-      validate_ir_tree(shader->ir);
-   }
-
-
-   /* Print out the resulting IR */
-   if (!state->error && dump_lir) {
-      _mesa_print_ir(shader->ir, state);
-   }
-
-   shader->symbols = state->symbols;
-   shader->CompileStatus = !state->error;
-   shader->Version = state->language_version;
-   memcpy(shader->builtins_to_link, state->builtins_to_link,
-	  sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link);
-   shader->num_builtins_to_link = state->num_builtins_to_link;
-
-   if (shader->InfoLog)
-      hieralloc_free(shader->InfoLog);
-
-   shader->InfoLog = state->info_log;
-
-   /* Retain any live IR, but trash the rest. */
-   reparent_ir(shader->ir, shader);
-
-   hieralloc_free(state);
-
-   return;
-}
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
deleted file mode 100644
index a5a2364..0000000
--- a/src/glsl/opt_algebraic.cpp
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_algebraic.cpp
- *
- * Takes advantage of association, commutivity, and other algebraic
- * properties to simplify expressions.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-/**
- * Visitor class for replacing expressions with ir_constant values.
- */
-
-class ir_algebraic_visitor : public ir_rvalue_visitor {
-public:
-   ir_algebraic_visitor()
-   {
-      this->progress = false;
-      this->mem_ctx = NULL;
-   }
-
-   virtual ~ir_algebraic_visitor()
-   {
-   }
-
-   ir_rvalue *handle_expression(ir_expression *ir);
-   void handle_rvalue(ir_rvalue **rvalue);
-   bool reassociate_constant(ir_expression *ir1,
-			     int const_index,
-			     ir_constant *constant,
-			     ir_expression *ir2);
-   void reassociate_operands(ir_expression *ir1,
-			     int op1,
-			     ir_expression *ir2,
-			     int op2);
-   ir_rvalue *swizzle_if_required(ir_expression *expr,
-				  ir_rvalue *operand);
-
-   void *mem_ctx;
-
-   bool progress;
-};
-
-static inline bool
-is_vec_zero(ir_constant *ir)
-{
-   return (ir == NULL) ? false : ir->is_zero();
-}
-
-static inline bool
-is_vec_one(ir_constant *ir)
-{
-   return (ir == NULL) ? false : ir->is_one();
-}
-
-static void
-update_type(ir_expression *ir)
-{
-   if (ir->operands[0]->type->is_vector())
-      ir->type = ir->operands[0]->type;
-   else
-      ir->type = ir->operands[1]->type;
-}
-
-void
-ir_algebraic_visitor::reassociate_operands(ir_expression *ir1,
-					   int op1,
-					   ir_expression *ir2,
-					   int op2)
-{
-   ir_rvalue *temp = ir2->operands[op2];
-   ir2->operands[op2] = ir1->operands[op1];
-   ir1->operands[op1] = temp;
-
-   /* Update the type of ir2.  The type of ir1 won't have changed --
-    * base types matched, and at least one of the operands of the 2
-    * binops is still a vector if any of them were.
-    */
-   update_type(ir2);
-
-   this->progress = true;
-}
-
-/**
- * Reassociates a constant down a tree of adds or multiplies.
- *
- * Consider (2 * (a * (b * 0.5))).  We want to send up with a * b.
- */
-bool
-ir_algebraic_visitor::reassociate_constant(ir_expression *ir1, int const_index,
-					   ir_constant *constant,
-					   ir_expression *ir2)
-{
-   if (!ir2 || ir1->operation != ir2->operation)
-      return false;
-
-   /* Don't want to even think about matrices. */
-   if (ir1->operands[0]->type->is_matrix() ||
-       ir1->operands[1]->type->is_matrix() ||
-       ir2->operands[0]->type->is_matrix() ||
-       ir2->operands[1]->type->is_matrix())
-      return false;
-
-   ir_constant *ir2_const[2];
-   ir2_const[0] = ir2->operands[0]->constant_expression_value();
-   ir2_const[1] = ir2->operands[1]->constant_expression_value();
-
-   if (ir2_const[0] && ir2_const[1])
-      return false;
-
-   if (ir2_const[0]) {
-      reassociate_operands(ir1, const_index, ir2, 1);
-      return true;
-   } else if (ir2_const[1]) {
-      reassociate_operands(ir1, const_index, ir2, 0);
-      return true;
-   }
-
-   if (reassociate_constant(ir1, const_index, constant,
-			    ir2->operands[0]->as_expression())) {
-      update_type(ir2);
-      return true;
-   }
-
-   if (reassociate_constant(ir1, const_index, constant,
-			    ir2->operands[1]->as_expression())) {
-      update_type(ir2);
-      return true;
-   }
-
-   return false;
-}
-
-/* When eliminating an expression and just returning one of its operands,
- * we may need to swizzle that operand out to a vector if the expression was
- * vector type.
- */
-ir_rvalue *
-ir_algebraic_visitor::swizzle_if_required(ir_expression *expr,
-					  ir_rvalue *operand)
-{
-   if (expr->type->is_vector() && operand->type->is_scalar()) {
-      return new(mem_ctx) ir_swizzle(operand, 0, 0, 0, 0,
-				     expr->type->vector_elements);
-   } else
-      return operand;
-}
-
-ir_rvalue *
-ir_algebraic_visitor::handle_expression(ir_expression *ir)
-{
-   ir_constant *op_const[2] = {NULL, NULL};
-   ir_expression *op_expr[2] = {NULL, NULL};
-   ir_expression *temp;
-   unsigned int i;
-
-   assert(ir->get_num_operands() <= 2);
-   for (i = 0; i < ir->get_num_operands(); i++) {
-      if (ir->operands[i]->type->is_matrix())
-	 return ir;
-
-      op_const[i] = ir->operands[i]->constant_expression_value();
-      op_expr[i] = ir->operands[i]->as_expression();
-   }
-
-   if (this->mem_ctx == NULL)
-      this->mem_ctx = hieralloc_parent(ir);
-
-   switch (ir->operation) {
-   case ir_unop_logic_not: {
-      enum ir_expression_operation new_op = ir_unop_logic_not;
-
-      if (op_expr[0] == NULL)
-	 break;
-
-      switch (op_expr[0]->operation) {
-      case ir_binop_less:    new_op = ir_binop_gequal;  break;
-      case ir_binop_greater: new_op = ir_binop_lequal;  break;
-      case ir_binop_lequal:  new_op = ir_binop_greater; break;
-      case ir_binop_gequal:  new_op = ir_binop_less;    break;
-      case ir_binop_equal:   new_op = ir_binop_nequal;  break;
-      case ir_binop_nequal:  new_op = ir_binop_equal;   break;
-      case ir_binop_all_equal:   new_op = ir_binop_any_nequal;  break;
-      case ir_binop_any_nequal:  new_op = ir_binop_all_equal;   break;
-
-      default:
-	 /* The default case handler is here to silence a warning from GCC.
-	  */
-	 break;
-      }
-
-      if (new_op != ir_unop_logic_not) {
-	 this->progress = true;
-	 return new(mem_ctx) ir_expression(new_op,
-					   ir->type,
-					   op_expr[0]->operands[0],
-					   op_expr[0]->operands[1]);
-      }
-
-      break;
-   }
-
-   case ir_binop_add:
-      if (is_vec_zero(op_const[0])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[1]);
-      }
-      if (is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[0]);
-      }
-
-      /* Reassociate addition of constants so that we can do constant
-       * folding.
-       */
-      if (op_const[0] && !op_const[1])
-	 reassociate_constant(ir, 0, op_const[0],
-			      ir->operands[1]->as_expression());
-      if (op_const[1] && !op_const[0])
-	 reassociate_constant(ir, 1, op_const[1],
-			      ir->operands[0]->as_expression());
-      break;
-
-   case ir_binop_sub:
-      if (is_vec_zero(op_const[0])) {
-	 this->progress = true;
-	 temp = new(mem_ctx) ir_expression(ir_unop_neg,
-					   ir->operands[1]->type,
-					   ir->operands[1],
-					   NULL);
-	 return swizzle_if_required(ir, temp);
-      }
-      if (is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[0]);
-      }
-      break;
-
-   case ir_binop_mul:
-      if (is_vec_one(op_const[0])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[1]);
-      }
-      if (is_vec_one(op_const[1])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[0]);
-      }
-
-      if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return ir_constant::zero(ir, ir->type);
-      }
-
-      /* Reassociate multiplication of constants so that we can do
-       * constant folding.
-       */
-      if (op_const[0] && !op_const[1])
-	 reassociate_constant(ir, 0, op_const[0],
-			      ir->operands[1]->as_expression());
-      if (op_const[1] && !op_const[0])
-	 reassociate_constant(ir, 1, op_const[1],
-			      ir->operands[0]->as_expression());
-
-      break;
-
-   case ir_binop_div:
-      if (is_vec_one(op_const[0]) && ir->type->base_type == GLSL_TYPE_FLOAT) {
-	 this->progress = true;
-	 temp = new(mem_ctx) ir_expression(ir_unop_rcp,
-					   ir->operands[1]->type,
-					   ir->operands[1],
-					   NULL);
-	 return swizzle_if_required(ir, temp);
-      }
-      if (is_vec_one(op_const[1])) {
-	 this->progress = true;
-	 return swizzle_if_required(ir, ir->operands[0]);
-      }
-      break;
-
-   case ir_binop_logic_and:
-      /* FINISHME: Also simplify (a && a) to (a). */
-      if (is_vec_one(op_const[0])) {
-	 this->progress = true;
-	 return ir->operands[1];
-      } else if (is_vec_one(op_const[1])) {
-	 this->progress = true;
-	 return ir->operands[0];
-      } else if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return ir_constant::zero(mem_ctx, ir->type);
-      }
-      break;
-
-   case ir_binop_logic_xor:
-      /* FINISHME: Also simplify (a ^^ a) to (false). */
-      if (is_vec_zero(op_const[0])) {
-	 this->progress = true;
-	 return ir->operands[1];
-      } else if (is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return ir->operands[0];
-      } else if (is_vec_one(op_const[0])) {
-	 this->progress = true;
-	 return new(mem_ctx) ir_expression(ir_unop_logic_not, ir->type,
-					   ir->operands[1], NULL);
-      } else if (is_vec_one(op_const[1])) {
-	 this->progress = true;
-	 return new(mem_ctx) ir_expression(ir_unop_logic_not, ir->type,
-					   ir->operands[0], NULL);
-      }
-      break;
-
-   case ir_binop_logic_or:
-      /* FINISHME: Also simplify (a || a) to (a). */
-      if (is_vec_zero(op_const[0])) {
-	 this->progress = true;
-	 return ir->operands[1];
-      } else if (is_vec_zero(op_const[1])) {
-	 this->progress = true;
-	 return ir->operands[0];
-      } else if (is_vec_one(op_const[0]) || is_vec_one(op_const[1])) {
-	 ir_constant_data data;
-
-	 for (unsigned i = 0; i < 16; i++)
-	    data.b[i] = true;
-
-	 this->progress = true;
-	 return new(mem_ctx) ir_constant(ir->type, &data);
-      }
-      break;
-
-   case ir_unop_rcp:
-      if (op_expr[0] && op_expr[0]->operation == ir_unop_rcp) {
-	 this->progress = true;
-	 return op_expr[0]->operands[0];
-      }
-
-      /* FINISHME: We should do rcp(rsq(x)) -> sqrt(x) for some
-       * backends, except that some backends will have done sqrt ->
-       * rcp(rsq(x)) and we don't want to undo it for them.
-       */
-
-      /* As far as we know, all backends are OK with rsq. */
-      if (op_expr[0] && op_expr[0]->operation == ir_unop_sqrt) {
-	 this->progress = true;
-	 temp = new(mem_ctx) ir_expression(ir_unop_rsq,
-					   op_expr[0]->operands[0]->type,
-					   op_expr[0]->operands[0],
-					   NULL);
-	 return swizzle_if_required(ir, temp);
-      }
-
-      break;
-
-   default:
-      break;
-   }
-
-   return ir;
-}
-
-void
-ir_algebraic_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return;
-
-   ir_expression *expr = (*rvalue)->as_expression();
-   if (!expr || expr->operation == ir_quadop_vector)
-      return;
-
-   *rvalue = handle_expression(expr);
-}
-
-bool
-do_algebraic(exec_list *instructions)
-{
-   ir_algebraic_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_constant_folding.cpp b/src/glsl/opt_constant_folding.cpp
deleted file mode 100644
index d69ca75..0000000
--- a/src/glsl/opt_constant_folding.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_constant_folding.cpp
- * Replace constant-valued expressions with references to constant values.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-/**
- * Visitor class for replacing expressions with ir_constant values.
- */
-
-class ir_constant_folding_visitor : public ir_rvalue_visitor {
-public:
-   ir_constant_folding_visitor()
-   {
-      this->progress = false;
-   }
-
-   virtual ~ir_constant_folding_visitor()
-   {
-      /* empty */
-   }
-
-   virtual ir_visitor_status visit_enter(ir_assignment *ir);
-   virtual ir_visitor_status visit_enter(ir_call *ir);
-
-   virtual void handle_rvalue(ir_rvalue **rvalue);
-
-   bool progress;
-};
-
-void
-ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (*rvalue == NULL || (*rvalue)->ir_type == ir_type_constant)
-      return;
-
-   /* Note that we do rvalue visitoring on leaving.  So if an
-    * expression has a non-constant operand, no need to go looking
-    * down it to find if it's constant.  This cuts the time of this
-    * pass down drastically.
-    */
-   ir_expression *expr = (*rvalue)->as_expression();
-   if (expr) {
-      for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
-	 if (!expr->operands[i]->as_constant())
-	    return;
-      }
-   }
-
-   ir_constant *constant = (*rvalue)->constant_expression_value();
-   if (constant) {
-      *rvalue = constant;
-      this->progress = true;
-   } else {
-      (*rvalue)->accept(this);
-   }
-}
-
-ir_visitor_status
-ir_constant_folding_visitor::visit_enter(ir_assignment *ir)
-{
-   ir->rhs->accept(this);
-   handle_rvalue(&ir->rhs);
-
-   if (ir->condition) {
-      ir->condition->accept(this);
-      handle_rvalue(&ir->condition);
-
-      ir_constant *const_val = ir->condition->as_constant();
-      /* If the condition is constant, either remove the condition or
-       * remove the never-executed assignment.
-       */
-      if (const_val) {
-	 if (const_val->value.b[0])
-	    ir->condition = NULL;
-	 else
-	    ir->remove();
-	 this->progress = true;
-      }
-   }
-
-   /* Don't descend into the LHS because we want it to stay as a
-    * variable dereference.  FINISHME: We probably should to get array
-    * indices though.
-    */
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_constant_folding_visitor::visit_enter(ir_call *ir)
-{
-   exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param_rval = (ir_rvalue *)iter.get();
-      ir_variable *sig_param = (ir_variable *)sig_iter.get();
-
-      if (sig_param->mode == ir_var_in) {
-	 ir_rvalue *new_param = param_rval;
-
-	 handle_rvalue(&new_param);
-	 if (new_param != param_rval) {
-	    param_rval->replace_with(new_param);
-	 }
-      }
-      sig_iter.next();
-   }
-
-   return visit_continue_with_parent;
-}
-
-bool
-do_constant_folding(exec_list *instructions)
-{
-   ir_constant_folding_visitor constant_folding;
-
-   visit_list_elements(&constant_folding, instructions);
-
-   return constant_folding.progress;
-}
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
deleted file mode 100644
index e92730e..0000000
--- a/src/glsl/opt_constant_propagation.cpp
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * constant of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, constant, 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 constantright 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 CONSTANTRIGHT 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.
- */
-
-/**
- * \file opt_constant_propagation.cpp
- *
- * Tracks assignments of constants to channels of variables, and
- * usage of those constant channels with direct usage of the constants.
- *
- * This can lead to constant folding and algebraic optimizations in
- * those later expressions, while causing no increase in instruction
- * count (due to constants being generally free to load from a
- * constant push buffer or as instruction immediate values) and
- * possibly reducing register pressure.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_basic_block.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-class acp_entry : public exec_node
-{
-public:
-   acp_entry(ir_variable *var, unsigned write_mask, ir_constant *constant)
-   {
-      assert(var);
-      assert(constant);
-      this->var = var;
-      this->write_mask = write_mask;
-      this->constant = constant;
-   }
-
-   ir_variable *var;
-   ir_constant *constant;
-   unsigned write_mask;
-};
-
-
-class kill_entry : public exec_node
-{
-public:
-   kill_entry(ir_variable *var, unsigned write_mask)
-   {
-      assert(var);
-      this->var = var;
-      this->write_mask = write_mask;
-   }
-
-   ir_variable *var;
-   unsigned write_mask;
-};
-
-class ir_constant_propagation_visitor : public ir_rvalue_visitor {
-public:
-   ir_constant_propagation_visitor()
-   {
-      progress = false;
-      mem_ctx = hieralloc_new(0);
-      this->acp = new(mem_ctx) exec_list;
-      this->kills = new(mem_ctx) exec_list;
-   }
-   ~ir_constant_propagation_visitor()
-   {
-      hieralloc_free(mem_ctx);
-   }
-
-   virtual ir_visitor_status visit_enter(class ir_loop *);
-   virtual ir_visitor_status visit_enter(class ir_function_signature *);
-   virtual ir_visitor_status visit_enter(class ir_function *);
-   virtual ir_visitor_status visit_leave(class ir_assignment *);
-   virtual ir_visitor_status visit_enter(class ir_call *);
-   virtual ir_visitor_status visit_enter(class ir_if *);
-
-   void add_constant(ir_assignment *ir);
-   void kill(ir_variable *ir, unsigned write_mask);
-   void handle_if_block(exec_list *instructions);
-   void handle_rvalue(ir_rvalue **rvalue);
-
-   /** List of acp_entry: The available constants to propagate */
-   exec_list *acp;
-
-   /**
-    * List of kill_entry: The masks of variables whose values were
-    * killed in this block.
-    */
-   exec_list *kills;
-
-   bool progress;
-
-   bool killed_all;
-
-   void *mem_ctx;
-};
-
-
-void
-ir_constant_propagation_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (this->in_assignee || !*rvalue)
-      return;
-
-   const glsl_type *type = (*rvalue)->type;
-   if (!type->is_scalar() && !type->is_vector())
-      return;
-
-   ir_swizzle *swiz = NULL;
-   ir_dereference_variable *deref = (*rvalue)->as_dereference_variable();
-   if (!deref) {
-      swiz = (*rvalue)->as_swizzle();
-      if (!swiz)
-	 return;
-
-      deref = swiz->val->as_dereference_variable();
-      if (!deref)
-	 return;
-   }
-
-   ir_constant_data data;
-   memset(&data, 0, sizeof(data));
-
-   for (unsigned int i = 0; i < type->components(); i++) {
-      int channel;
-      acp_entry *found = NULL;
-
-      if (swiz) {
-	 switch (i) {
-	 case 0: channel = swiz->mask.x; break;
-	 case 1: channel = swiz->mask.y; break;
-	 case 2: channel = swiz->mask.z; break;
-	 case 3: channel = swiz->mask.w; break;
-	 default: assert(!"shouldn't be reached"); channel = 0; break;
-	 }
-      } else {
-	 channel = i;
-      }
-
-      foreach_iter(exec_list_iterator, iter, *this->acp) {
-	 acp_entry *entry = (acp_entry *)iter.get();
-	 if (entry->var == deref->var && entry->write_mask & (1 << channel)) {
-	    found = entry;
-	    break;
-	 }
-      }
-
-      if (!found)
-	 return;
-
-      int rhs_channel = 0;
-      for (int j = 0; j < 4; j++) {
-	 if (j == channel)
-	    break;
-	 if (found->write_mask & (1 << j))
-	    rhs_channel++;
-      }
-
-      switch (type->base_type) {
-      case GLSL_TYPE_FLOAT:
-	 data.f[i] = found->constant->value.f[rhs_channel];
-	 break;
-      case GLSL_TYPE_INT:
-	 data.i[i] = found->constant->value.i[rhs_channel];
-	 break;
-      case GLSL_TYPE_UINT:
-	 data.u[i] = found->constant->value.u[rhs_channel];
-	 break;
-      case GLSL_TYPE_BOOL:
-	 data.b[i] = found->constant->value.b[rhs_channel];
-	 break;
-      default:
-	 assert(!"not reached");
-	 break;
-      }
-   }
-
-   *rvalue = new(hieralloc_parent(deref)) ir_constant(type, &data);
-   this->progress = true;
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_enter(ir_function_signature *ir)
-{
-   /* Treat entry into a function signature as a completely separate
-    * block.  Any instructions at global scope will be shuffled into
-    * main() at link time, so they're irrelevant to us.
-    */
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   visit_list_elements(this, &ir->body);
-
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = orig_killed_all;
-
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_leave(ir_assignment *ir)
-{
-   if (this->in_assignee)
-      return visit_continue;
-
-   kill(ir->lhs->variable_referenced(), ir->write_mask);
-
-   add_constant(ir);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_enter(ir_function *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_enter(ir_call *ir)
-{
-   /* Do constant propagation on call parameters, but skip any out params */
-   exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator();
-   foreach_iter(exec_list_iterator, iter, ir->actual_parameters) {
-      ir_variable *sig_param = (ir_variable *)sig_param_iter.get();
-      ir_rvalue *param = (ir_rvalue *)iter.get();
-      if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) {
-	 ir_rvalue *new_param = param;
-	 handle_rvalue(&new_param);
-         if (new_param != param)
-	    param->replace_with(new_param);
-	 else
-	    param->accept(this);
-      }
-      sig_param_iter.next();
-   }
-
-   /* Since we're unlinked, we don't (necssarily) know the side effects of
-    * this call.  So kill all copies.
-    */
-   acp->make_empty();
-   this->killed_all = true;
-
-   return visit_continue_with_parent;
-}
-
-void
-ir_constant_propagation_visitor::handle_if_block(exec_list *instructions)
-{
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   /* Populate the initial acp with a constant of the original */
-   foreach_iter(exec_list_iterator, iter, *orig_acp) {
-      acp_entry *a = (acp_entry *)iter.get();
-      this->acp->push_tail(new(this->mem_ctx) acp_entry(a->var, a->write_mask,
-							a->constant));
-   }
-
-   visit_list_elements(this, instructions);
-
-   if (this->killed_all) {
-      orig_acp->make_empty();
-   }
-
-   exec_list *new_kills = this->kills;
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = this->killed_all || orig_killed_all;
-
-   foreach_iter(exec_list_iterator, iter, *new_kills) {
-      kill_entry *k = (kill_entry *)iter.get();
-      kill(k->var, k->write_mask);
-   }
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_enter(ir_if *ir)
-{
-   ir->condition->accept(this);
-   handle_rvalue(&ir->condition);
-
-   handle_if_block(&ir->then_instructions);
-   handle_if_block(&ir->else_instructions);
-
-   /* handle_if_block() already descended into the children. */
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_constant_propagation_visitor::visit_enter(ir_loop *ir)
-{
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   /* FINISHME: For now, the initial acp for loops is totally empty.
-    * We could go through once, then go through again with the acp
-    * cloned minus the killed entries after the first run through.
-    */
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   visit_list_elements(this, &ir->body_instructions);
-
-   if (this->killed_all) {
-      orig_acp->make_empty();
-   }
-
-   exec_list *new_kills = this->kills;
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = this->killed_all || orig_killed_all;
-
-   foreach_iter(exec_list_iterator, iter, *new_kills) {
-      kill_entry *k = (kill_entry *)iter.get();
-      kill(k->var, k->write_mask);
-   }
-
-   /* already descended into the children. */
-   return visit_continue_with_parent;
-}
-
-void
-ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask)
-{
-   assert(var != NULL);
-
-   /* We don't track non-vectors. */
-   if (!var->type->is_vector() && !var->type->is_scalar())
-      return;
-
-   /* Remove any entries currently in the ACP for this kill. */
-   foreach_iter(exec_list_iterator, iter, *this->acp) {
-      acp_entry *entry = (acp_entry *)iter.get();
-
-      if (entry->var == var) {
-	 entry->write_mask &= ~write_mask;
-	 if (entry->write_mask == 0)
-	    entry->remove();
-      }
-   }
-
-   /* Add this writemask of the variable to the list of killed
-    * variables in this block.
-    */
-   foreach_iter(exec_list_iterator, iter, *this->kills) {
-      kill_entry *entry = (kill_entry *)iter.get();
-
-      if (entry->var == var) {
-	 entry->write_mask |= write_mask;
-	 return;
-      }
-   }
-   /* Not already in the list.  Make new entry. */
-   this->kills->push_tail(new(this->mem_ctx) kill_entry(var, write_mask));
-}
-
-/**
- * Adds an entry to the available constant list if it's a plain assignment
- * of a variable to a variable.
- */
-void
-ir_constant_propagation_visitor::add_constant(ir_assignment *ir)
-{
-   acp_entry *entry;
-
-   if (ir->condition) {
-      ir_constant *condition = ir->condition->as_constant();
-      if (!condition || !condition->value.b[0])
-	 return;
-   }
-
-   if (!ir->write_mask)
-      return;
-
-   ir_dereference_variable *deref = ir->lhs->as_dereference_variable();
-   ir_constant *constant = ir->rhs->as_constant();
-
-   if (!deref || !constant)
-      return;
-
-   /* Only do constant propagation on vectors.  Constant matrices,
-    * arrays, or structures would require more work elsewhere.
-    */
-   if (!deref->var->type->is_vector() && !deref->var->type->is_scalar())
-      return;
-
-   entry = new(this->mem_ctx) acp_entry(deref->var, ir->write_mask, constant);
-   this->acp->push_tail(entry);
-}
-
-/**
- * Does a constant propagation pass on the code present in the instruction stream.
- */
-bool
-do_constant_propagation(exec_list *instructions)
-{
-   ir_constant_propagation_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
deleted file mode 100644
index 8068d0c..0000000
--- a/src/glsl/opt_constant_variable.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_constant_variable.cpp
- *
- * Marks variables assigned a single constant value over the course
- * of the program as constant.
- *
- * The goal here is to trigger further constant folding and then dead
- * code elimination.  This is common with vector/matrix constructors
- * and calls to builtin functions.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-struct assignment_entry {
-   exec_node link;
-   int assignment_count;
-   ir_variable *var;
-   ir_constant *constval;
-   bool our_scope;
-};
-
-class ir_constant_variable_visitor : public ir_hierarchical_visitor {
-public:
-   virtual ir_visitor_status visit_enter(ir_dereference_variable *);
-   virtual ir_visitor_status visit(ir_variable *);
-   virtual ir_visitor_status visit_enter(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_call *);
-
-   exec_list list;
-};
-
-static struct assignment_entry *
-get_assignment_entry(ir_variable *var, exec_list *list)
-{
-   struct assignment_entry *entry;
-
-   foreach_list_typed(struct assignment_entry, entry, link, list) {
-      if (entry->var == var)
-	 return entry;
-   }
-
-   entry = (struct assignment_entry *)calloc(1, sizeof(*entry));
-   entry->var = var;
-   list->push_head(&entry->link);
-   return entry;
-}
-
-ir_visitor_status
-ir_constant_variable_visitor::visit(ir_variable *ir)
-{
-   struct assignment_entry *entry = get_assignment_entry(ir, &this->list);
-   entry->our_scope = true;
-   return visit_continue;
-}
-
-/* Skip derefs of variables so that we can detect declarations. */
-ir_visitor_status
-ir_constant_variable_visitor::visit_enter(ir_dereference_variable *ir)
-{
-   (void)ir;
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_constant_variable_visitor::visit_enter(ir_assignment *ir)
-{
-   ir_constant *constval;
-   struct assignment_entry *entry;
-
-   entry = get_assignment_entry(ir->lhs->variable_referenced(), &this->list);
-   assert(entry);
-   entry->assignment_count++;
-
-   /* If it's already constant, don't do the work. */
-   if (entry->var->constant_value)
-      return visit_continue;
-
-   /* OK, now find if we actually have all the right conditions for
-    * this to be a constant value assigned to the var.
-    */
-   if (ir->condition) {
-      constval = ir->condition->constant_expression_value();
-      if (!constval || !constval->value.b[0])
-	 return visit_continue;
-   }
-
-   ir_variable *var = ir->whole_variable_written();
-   if (!var)
-      return visit_continue;
-
-   constval = ir->rhs->constant_expression_value();
-   if (!constval)
-      return visit_continue;
-
-   /* Mark this entry as having a constant assignment (if the
-    * assignment count doesn't go >1).  do_constant_variable will fix
-    * up the variable with the constant value later.
-    */
-   entry->constval = constval;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_constant_variable_visitor::visit_enter(ir_call *ir)
-{
-   exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param_rval = (ir_rvalue *)iter.get();
-      ir_variable *param = (ir_variable *)sig_iter.get();
-
-      if (param->mode == ir_var_out ||
-	  param->mode == ir_var_inout) {
-	 ir_variable *var = param_rval->variable_referenced();
-	 struct assignment_entry *entry;
-
-	 assert(var);
-	 entry = get_assignment_entry(var, &this->list);
-	 entry->assignment_count++;
-      }
-      sig_iter.next();
-   }
-   return visit_continue;
-}
-
-/**
- * Does a copy propagation pass on the code present in the instruction stream.
- */
-bool
-do_constant_variable(exec_list *instructions)
-{
-   bool progress = false;
-   ir_constant_variable_visitor v;
-
-   v.run(instructions);
-
-   while (!v.list.is_empty()) {
-
-      struct assignment_entry *entry;
-      entry = exec_node_data(struct assignment_entry, v.list.head, link);
-
-      if (entry->assignment_count == 1 && entry->constval && entry->our_scope) {
-	 entry->var->constant_value = entry->constval;
-	 progress = true;
-      }
-      entry->link.remove();
-      free(entry);
-   }
-
-   return progress;
-}
-
-bool
-do_constant_variable_unlinked(exec_list *instructions)
-{
-   bool progress = false;
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir_function *f = ir->as_function();
-      if (f) {
-	 foreach_iter(exec_list_iterator, sigiter, *f) {
-	    ir_function_signature *sig =
-	       (ir_function_signature *) sigiter.get();
-	    if (do_constant_variable(&sig->body))
-	       progress = true;
-	 }
-      }
-   }
-
-   return progress;
-}
diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp
deleted file mode 100644
index f7612a2..0000000
--- a/src/glsl/opt_copy_propagation.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_copy_propagation.cpp
- *
- * Moves usage of recently-copied variables to the previous copy of
- * the variable.
- *
- * This should reduce the number of MOV instructions in the generated
- * programs unless copy propagation is also done on the LIR, and may
- * help anyway by triggering other optimizations that live in the HIR.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_basic_block.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-class acp_entry : public exec_node
-{
-public:
-   acp_entry(ir_variable *lhs, ir_variable *rhs)
-   {
-      assert(lhs);
-      assert(rhs);
-      this->lhs = lhs;
-      this->rhs = rhs;
-   }
-
-   ir_variable *lhs;
-   ir_variable *rhs;
-};
-
-
-class kill_entry : public exec_node
-{
-public:
-   kill_entry(ir_variable *var)
-   {
-      assert(var);
-      this->var = var;
-   }
-
-   ir_variable *var;
-};
-
-class ir_copy_propagation_visitor : public ir_hierarchical_visitor {
-public:
-   ir_copy_propagation_visitor()
-   {
-      progress = false;
-      mem_ctx = hieralloc_new(0);
-      this->acp = new(mem_ctx) exec_list;
-      this->kills = new(mem_ctx) exec_list;
-   }
-   ~ir_copy_propagation_visitor()
-   {
-      hieralloc_free(mem_ctx);
-   }
-
-   virtual ir_visitor_status visit(class ir_dereference_variable *);
-   virtual ir_visitor_status visit_enter(class ir_loop *);
-   virtual ir_visitor_status visit_enter(class ir_function_signature *);
-   virtual ir_visitor_status visit_enter(class ir_function *);
-   virtual ir_visitor_status visit_leave(class ir_assignment *);
-   virtual ir_visitor_status visit_enter(class ir_call *);
-   virtual ir_visitor_status visit_enter(class ir_if *);
-
-   void add_copy(ir_assignment *ir);
-   void kill(ir_variable *ir);
-   void handle_if_block(exec_list *instructions);
-
-   /** List of acp_entry: The available copies to propagate */
-   exec_list *acp;
-   /**
-    * List of kill_entry: The variables whose values were killed in this
-    * block.
-    */
-   exec_list *kills;
-
-   bool progress;
-
-   bool killed_all;
-
-   void *mem_ctx;
-};
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_enter(ir_function_signature *ir)
-{
-   /* Treat entry into a function signature as a completely separate
-    * block.  Any instructions at global scope will be shuffled into
-    * main() at link time, so they're irrelevant to us.
-    */
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   visit_list_elements(this, &ir->body);
-
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = orig_killed_all;
-
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_leave(ir_assignment *ir)
-{
-   kill(ir->lhs->variable_referenced());
-
-   add_copy(ir);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_enter(ir_function *ir)
-{
-   (void) ir;
-   return visit_continue;
-}
-
-/**
- * Replaces dereferences of ACP RHS variables with ACP LHS variables.
- *
- * This is where the actual copy propagation occurs.  Note that the
- * rewriting of ir_dereference means that the ir_dereference instance
- * must not be shared by multiple IR operations!
- */
-ir_visitor_status
-ir_copy_propagation_visitor::visit(ir_dereference_variable *ir)
-{
-   if (this->in_assignee)
-      return visit_continue;
-
-   ir_variable *var = ir->var;
-
-   foreach_iter(exec_list_iterator, iter, *this->acp) {
-      acp_entry *entry = (acp_entry *)iter.get();
-
-      if (var == entry->lhs) {
-	 ir->var = entry->rhs;
-	 this->progress = true;
-	 break;
-      }
-   }
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_enter(ir_call *ir)
-{
-   /* Do copy propagation on call parameters, but skip any out params */
-   exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator();
-   foreach_iter(exec_list_iterator, iter, ir->actual_parameters) {
-      ir_variable *sig_param = (ir_variable *)sig_param_iter.get();
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) {
-         ir->accept(this);
-      }
-      sig_param_iter.next();
-   }
-
-   /* Since we're unlinked, we don't (necssarily) know the side effects of
-    * this call.  So kill all copies.
-    */
-   acp->make_empty();
-   this->killed_all = true;
-
-   return visit_continue_with_parent;
-}
-
-void
-ir_copy_propagation_visitor::handle_if_block(exec_list *instructions)
-{
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   /* Populate the initial acp with a copy of the original */
-   foreach_iter(exec_list_iterator, iter, *orig_acp) {
-      acp_entry *a = (acp_entry *)iter.get();
-      this->acp->push_tail(new(this->mem_ctx) acp_entry(a->lhs, a->rhs));
-   }
-
-   visit_list_elements(this, instructions);
-
-   if (this->killed_all) {
-      orig_acp->make_empty();
-   }
-
-   exec_list *new_kills = this->kills;
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = this->killed_all || orig_killed_all;
-
-   foreach_iter(exec_list_iterator, iter, *new_kills) {
-      kill_entry *k = (kill_entry *)iter.get();
-      kill(k->var);
-   }
-}
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_enter(ir_if *ir)
-{
-   ir->condition->accept(this);
-
-   handle_if_block(&ir->then_instructions);
-   handle_if_block(&ir->else_instructions);
-
-   /* handle_if_block() already descended into the children. */
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_copy_propagation_visitor::visit_enter(ir_loop *ir)
-{
-   exec_list *orig_acp = this->acp;
-   exec_list *orig_kills = this->kills;
-   bool orig_killed_all = this->killed_all;
-
-   /* FINISHME: For now, the initial acp for loops is totally empty.
-    * We could go through once, then go through again with the acp
-    * cloned minus the killed entries after the first run through.
-    */
-   this->acp = new(mem_ctx) exec_list;
-   this->kills = new(mem_ctx) exec_list;
-   this->killed_all = false;
-
-   visit_list_elements(this, &ir->body_instructions);
-
-   if (this->killed_all) {
-      orig_acp->make_empty();
-   }
-
-   exec_list *new_kills = this->kills;
-   this->kills = orig_kills;
-   this->acp = orig_acp;
-   this->killed_all = this->killed_all || orig_killed_all;
-
-   foreach_iter(exec_list_iterator, iter, *new_kills) {
-      kill_entry *k = (kill_entry *)iter.get();
-      kill(k->var);
-   }
-
-   /* already descended into the children. */
-   return visit_continue_with_parent;
-}
-
-void
-ir_copy_propagation_visitor::kill(ir_variable *var)
-{
-   assert(var != NULL);
-
-   /* Remove any entries currently in the ACP for this kill. */
-   foreach_iter(exec_list_iterator, iter, *acp) {
-      acp_entry *entry = (acp_entry *)iter.get();
-
-      if (entry->lhs == var || entry->rhs == var) {
-	 entry->remove();
-      }
-   }
-
-   /* Add the LHS variable to the list of killed variables in this block.
-    */
-   this->kills->push_tail(new(this->mem_ctx) kill_entry(var));
-}
-
-/**
- * Adds an entry to the available copy list if it's a plain assignment
- * of a variable to a variable.
- */
-void
-ir_copy_propagation_visitor::add_copy(ir_assignment *ir)
-{
-   acp_entry *entry;
-
-   if (ir->condition) {
-      ir_constant *condition = ir->condition->as_constant();
-      if (!condition || !condition->value.b[0])
-	 return;
-   }
-
-   ir_variable *lhs_var = ir->whole_variable_written();
-   ir_variable *rhs_var = ir->rhs->whole_variable_referenced();
-
-   if ((lhs_var != NULL) && (rhs_var != NULL)) {
-      if (lhs_var == rhs_var) {
-	 /* This is a dumb assignment, but we've conveniently noticed
-	  * it here.  Removing it now would mess up the loop iteration
-	  * calling us.  Just flag it to not execute, and someone else
-	  * will clean up the mess.
-	  */
-	 ir->condition = new(hieralloc_parent(ir)) ir_constant(false);
-	 this->progress = true;
-      } else {
-	 entry = new(this->mem_ctx) acp_entry(lhs_var, rhs_var);
-	 this->acp->push_tail(entry);
-      }
-   }
-}
-
-/**
- * Does a copy propagation pass on the code present in the instruction stream.
- */
-bool
-do_copy_propagation(exec_list *instructions)
-{
-   ir_copy_propagation_visitor v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp
deleted file mode 100644
index cb500d2..0000000
--- a/src/glsl/opt_dead_code.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_dead_code.cpp
- *
- * Eliminates dead assignments and variable declarations from the code.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_variable_refcount.h"
-#include "glsl_types.h"
-
-static bool debug = false;
-
-/**
- * Do a dead code pass over instructions and everything that instructions
- * references.
- *
- * Note that this will remove assignments to globals, so it is not suitable
- * for usage on an unlinked instruction stream.
- */
-bool
-do_dead_code(exec_list *instructions)
-{
-   ir_variable_refcount_visitor v;
-   bool progress = false;
-
-   v.run(instructions);
-
-   foreach_iter(exec_list_iterator, iter, v.variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
-
-      /* Since each assignment is a reference, the refereneced count must be
-       * greater than or equal to the assignment count.  If they are equal,
-       * then all of the references are assignments, and the variable is
-       * dead.
-       *
-       * Note that if the variable is neither assigned nor referenced, both
-       * counts will be zero and will be caught by the equality test.
-       */
-      assert(entry->referenced_count >= entry->assigned_count);
-
-      if (debug) {
-	 printf("%s@%p: %d refs, %d assigns, %sdeclared in our scope\n",
-		entry->var->name, (void *) entry->var,
-		entry->referenced_count, entry->assigned_count,
-		entry->declaration ? "" : "not ");
-      }
-
-      if ((entry->referenced_count > entry->assigned_count)
-	  || !entry->declaration)
-	 continue;
-
-      if (entry->assign) {
-	 /* Remove a single dead assignment to the variable we found.
-	  * Don't do so if it's a shader output, though.
-	  */
-	 if (entry->var->mode != ir_var_out &&
-	     entry->var->mode != ir_var_inout &&
-	     !ir_has_call(entry->assign)) {
-	    entry->assign->remove();
-	    progress = true;
-
-	    if (debug) {
-	       printf("Removed assignment to %s@%p\n",
-		      entry->var->name, (void *) entry->var);
-	    }
-	 }
-      } else {
-	 /* If there are no assignments or references to the variable left,
-	  * then we can remove its declaration.
-	  */
-
-	 /* uniform initializers are precious, and could get used by another
-	  * stage.
-	  */
-	 if (entry->var->mode == ir_var_uniform &&
-	     entry->var->constant_value)
-	    continue;
-
-	 entry->var->remove();
-	 progress = true;
-
-	 if (debug) {
-	    printf("Removed declaration of %s@%p\n",
-		   entry->var->name, (void *) entry->var);
-	 }
-      }
-   }
-
-   return progress;
-}
-
-/**
- * Does a dead code pass on the functions present in the instruction stream.
- *
- * This is suitable for use while the program is not linked, as it will
- * ignore variable declarations (and the assignments to them) for variables
- * with global scope.
- */
-bool
-do_dead_code_unlinked(exec_list *instructions)
-{
-   bool progress = false;
-
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir_function *f = ir->as_function();
-      if (f) {
-	 foreach_iter(exec_list_iterator, sigiter, *f) {
-	    ir_function_signature *sig =
-	       (ir_function_signature *) sigiter.get();
-	    if (do_dead_code(&sig->body))
-	       progress = true;
-	 }
-      }
-   }
-
-   return progress;
-}
diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp
deleted file mode 100644
index 650b4e5..0000000
--- a/src/glsl/opt_dead_code_local.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_dead_code_local.cpp
- *
- * Eliminates local dead assignments from the code.
- *
- * This operates on basic blocks, tracking assignments and finding if
- * they're used before the variable is completely reassigned.
- *
- * Compare this to ir_dead_code.cpp, which operates globally looking
- * for assignments to variables that are never read.
- */
-
-#include "ir.h"
-#include "ir_basic_block.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-static bool debug = false;
-
-class assignment_entry : public exec_node
-{
-public:
-   assignment_entry(ir_variable *lhs, ir_instruction *ir)
-   {
-      assert(lhs);
-      assert(ir);
-      this->lhs = lhs;
-      this->ir = ir;
-   }
-
-   ir_variable *lhs;
-   ir_instruction *ir;
-};
-
-class kill_for_derefs_visitor : public ir_hierarchical_visitor {
-public:
-   kill_for_derefs_visitor(exec_list *assignments)
-   {
-      this->assignments = assignments;
-   }
-
-   virtual ir_visitor_status visit(ir_dereference_variable *ir)
-   {
-      ir_variable *const var = ir->variable_referenced();
-
-      foreach_iter(exec_list_iterator, iter, *this->assignments) {
-	 assignment_entry *entry = (assignment_entry *)iter.get();
-
-	 if (entry->lhs == var) {
-	    if (debug)
-	       printf("kill %s\n", entry->lhs->name);
-	    entry->remove();
-	 }
-      }
-
-      return visit_continue;
-   }
-
-private:
-   exec_list *assignments;
-};
-
-class array_index_visit : public ir_hierarchical_visitor {
-public:
-   array_index_visit(ir_hierarchical_visitor *v)
-   {
-      this->visitor = v;
-   }
-
-   virtual ir_visitor_status visit_enter(class ir_dereference_array *ir)
-   {
-      ir->array_index->accept(visitor);
-      return visit_continue;
-   }
-
-   static void run(ir_instruction *ir, ir_hierarchical_visitor *v)
-   {
-      array_index_visit top_visit(v);
-      ir->accept(& top_visit);
-   }
-
-   ir_hierarchical_visitor *visitor;
-};
-
-
-/**
- * Adds an entry to the available copy list if it's a plain assignment
- * of a variable to a variable.
- */
-static bool
-process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments)
-{
-   ir_variable *var = NULL;
-   bool progress = false;
-   kill_for_derefs_visitor v(assignments);
-
-   /* Kill assignment entries for things used to produce this assignment. */
-   ir->rhs->accept(&v);
-   if (ir->condition) {
-      ir->condition->accept(&v);
-   }
-
-   /* Kill assignment enties used as array indices.
-    */
-   array_index_visit::run(ir->lhs, &v);
-   var = ir->lhs->variable_referenced();
-   assert(var);
-
-   bool always_assign = true;
-   if (ir->condition) {
-      ir_constant *condition = ir->condition->as_constant();
-      if (!condition || !condition->value.b[0])
-	 always_assign = false;
-   }
-
-   /* Now, check if we did a whole-variable assignment. */
-   if (always_assign && (ir->whole_variable_written() != NULL)) {
-      /* We did a whole-variable assignment.  So, any instruction in
-       * the assignment list with the same LHS is dead.
-       */
-      if (debug)
-	 printf("looking for %s to remove\n", var->name);
-      foreach_iter(exec_list_iterator, iter, *assignments) {
-	 assignment_entry *entry = (assignment_entry *)iter.get();
-
-	 if (entry->lhs == var) {
-	    if (debug)
-	       printf("removing %s\n", var->name);
-	    entry->ir->remove();
-	    entry->remove();
-	    progress = true;
-	 }
-      }
-   }
-
-   /* Add this instruction to the assignment list available to be removed.
-    * But not if the assignment has other side effects.
-    */
-   if (ir_has_call(ir))
-      return progress;
-
-   assignment_entry *entry = new(ctx) assignment_entry(var, ir);
-   assignments->push_tail(entry);
-
-   if (debug) {
-      printf("add %s\n", var->name);
-
-      printf("current entries\n");
-      foreach_iter(exec_list_iterator, iter, *assignments) {
-	 assignment_entry *entry = (assignment_entry *)iter.get();
-
-	 printf("    %s\n", entry->lhs->name);
-      }
-   }
-
-   return progress;
-}
-
-static void
-dead_code_local_basic_block(ir_instruction *first,
-			     ir_instruction *last,
-			     void *data)
-{
-   ir_instruction *ir, *ir_next;
-   /* List of avaialble_copy */
-   exec_list assignments;
-   bool *out_progress = (bool *)data;
-   bool progress = false;
-
-   void *ctx = hieralloc_new(NULL);
-   /* Safe looping, since process_assignment */
-   for (ir = first, ir_next = (ir_instruction *)first->next;;
-	ir = ir_next, ir_next = (ir_instruction *)ir->next) {
-      ir_assignment *ir_assign = ir->as_assignment();
-
-      if (debug) {
-	 ir->print();
-	 printf("\n");
-      }
-
-      if (ir_assign) {
-	 progress = process_assignment(ctx, ir_assign, &assignments) || progress;
-      } else {
-	 kill_for_derefs_visitor kill(&assignments);
-	 ir->accept(&kill);
-      }
-
-      if (ir == last)
-	 break;
-   }
-   *out_progress = progress;
-   hieralloc_free(ctx);
-}
-
-/**
- * Does a copy propagation pass on the code present in the instruction stream.
- */
-bool
-do_dead_code_local(exec_list *instructions)
-{
-   bool progress = false;
-
-   call_for_basic_blocks(instructions, dead_code_local_basic_block, &progress);
-
-   return progress;
-}
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp
deleted file mode 100644
index 78618ba..0000000
--- a/src/glsl/opt_dead_functions.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
- /*
-  * Copyright © 2010 Intel Corporation
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-  * to deal in the Software without restriction, including without limitation
-  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-  * and/or sell copies of the Software, and to permit persons to whom the
-  * Software is furnished to do so, subject to the following conditions:
-  *
-  * The above copyright notice and this permission notice (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.
-  */
-
- /**
-  * \file opt_dead_functions.cpp
-  *
-  * Eliminates unused functions from the linked program.
-  */
-
- #include "ir.h"
- #include "ir_visitor.h"
- #include "ir_expression_flattening.h"
- #include "glsl_types.h"
-
- class signature_entry : public exec_node
- {
- public:
-    signature_entry(ir_function_signature *sig)
-    {
-       this->signature = sig;
-       this->used = false;
-    }
-
-    ir_function_signature *signature;
-    bool used;
- };
-
- class ir_dead_functions_visitor : public ir_hierarchical_visitor {
- public:
-    ir_dead_functions_visitor()
-    {
-       this->mem_ctx = hieralloc_new(NULL);
-    }
-
-    ~ir_dead_functions_visitor()
-    {
-       hieralloc_free(this->mem_ctx);
-    }
-
-    virtual ir_visitor_status visit_enter(ir_function_signature *);
-    virtual ir_visitor_status visit_enter(ir_call *);
-
-    signature_entry *get_signature_entry(ir_function_signature *var);
-
-    bool (*predicate)(ir_instruction *ir);
-
-    /* List of signature_entry */
-    exec_list signature_list;
-    void *mem_ctx;
- };
-
-
- signature_entry *
- ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
- {
-    foreach_iter(exec_list_iterator, iter, this->signature_list) {
-       signature_entry *entry = (signature_entry *)iter.get();
-       if (entry->signature == sig)
-	  return entry;
-    }
-
-    signature_entry *entry = new(mem_ctx) signature_entry(sig);
-    this->signature_list.push_tail(entry);
-    return entry;
- }
-
-
- ir_visitor_status
- ir_dead_functions_visitor::visit_enter(ir_function_signature *ir)
- {
-    signature_entry *entry = this->get_signature_entry(ir);
-
-    if (strcmp(ir->function_name(), "main") == 0) {
-       entry->used = true;
-    }
-
-    return visit_continue;
- }
-
-
- ir_visitor_status
- ir_dead_functions_visitor::visit_enter(ir_call *ir)
- {
-    signature_entry *entry = this->get_signature_entry(ir->get_callee());
-
-    entry->used = true;
-
-   return visit_continue;
-}
-
-bool
-do_dead_functions(exec_list *instructions)
-{
-   ir_dead_functions_visitor v;
-   bool progress = false;
-
-   visit_list_elements(&v, instructions);
-
-   /* Now that we've figured out which function signatures are used, remove
-    * the unused ones, and remove function definitions that have no more
-    * signatures.
-    */
-    foreach_iter(exec_list_iterator, iter, v.signature_list) {
-      signature_entry *entry = (signature_entry *)iter.get();
-
-      if (!entry->used) {
-	 entry->signature->remove();
-	 delete entry->signature;
-	 progress = true;
-      }
-      delete(entry);
-   }
-
-   /* We don't just do this above when we nuked a signature because of
-    * const pointers.
-    */
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir_function *func = ir->as_function();
-
-      if (func && func->signatures.is_empty()) {
-	 /* At this point (post-linking), the symbol table is no
-	  * longer in use, so not removing the function from the
-	  * symbol table should be OK.
-	  */
-	 func->remove();
-	 delete func;
-	 progress = true;
-      }
-   }
-
-   return progress;
-}
diff --git a/src/glsl/opt_discard_simplification.cpp b/src/glsl/opt_discard_simplification.cpp
deleted file mode 100644
index 0e577c4..0000000
--- a/src/glsl/opt_discard_simplification.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_discard_simplification.cpp
- *
- * This pass simplifies if-statements and loops containing unconditional
- * discards.
- *
- * Case 1: Both branches contain unconditional discards:
- * -----------------------------------------------------
- *
- *    if (cond) {
- *	 s1;
- *	 discard;
- *	 s2;
- *    } else {
- *	 s3;
- *	 discard;
- *	 s4;
- *    }
- *
- * becomes:
- *
- *    discard
- *
- * Case 2: The "then" clause contains an unconditional discard:
- * ------------------------------------------------------------
- *
- *    if (cond) {
- *       s1;
- *       discard;
- *       s2;
- *    } else {
- *	 s3;
- *    }
- *
- * becomes:
- *
- *    if (cond) {
- *	 discard;
- *    } else {
- *	 s3;
- *    }
- *
- * Case 3: The "else" clause contains an unconditional discard:
- * ------------------------------------------------------------
- *
- *    if (cond) {
- *       s1;
- *    } else {
- *       s2;
- *       discard;
- *	 s3;
- *    }
- *
- * becomes:
- *
- *    if (cond) {
- *	 s1;
- *    } else {
- *	 discard;
- *    }
- */
-
-#include "glsl_types.h"
-#include "ir.h"
-
-class discard_simplifier : public ir_hierarchical_visitor {
-public:
-   discard_simplifier()
-   {
-      this->progress = false;
-   }
-
-   ir_visitor_status visit_enter(ir_if *);
-   ir_visitor_status visit_enter(ir_loop *);
-
-   bool progress;
-};
-
-static ir_discard *
-find_unconditional_discard(exec_list &instructions)
-{
-   foreach_list(n, &instructions) {
-      ir_discard *ir = ((ir_instruction *) n)->as_discard();
-      if (ir != NULL && ir->condition == NULL)
-	 return ir;
-   }
-   return NULL;
-}
-
-static bool
-is_only_instruction(ir_discard *discard)
-{
-   return (discard->prev->is_head_sentinel() &&
-	   discard->next->is_tail_sentinel());
-}
-
-ir_visitor_status
-discard_simplifier::visit_enter(ir_if *ir)
-{
-   ir_discard *then_discard = find_unconditional_discard(ir->then_instructions);
-   ir_discard *else_discard = find_unconditional_discard(ir->else_instructions);
-
-   if (then_discard == NULL && else_discard == NULL)
-      return visit_continue;
-
-   /* If both branches result in discard, replace whole if with discard. */
-   if (then_discard != NULL && else_discard != NULL) {
-      this->progress = true;
-      ir->replace_with(then_discard);
-      return visit_continue_with_parent;
-   }
-
-   /* Otherwise, one branch has a discard. */
-   if (then_discard != NULL && !is_only_instruction(then_discard)) {
-      this->progress = true;
-      ir->then_instructions.make_empty();
-      ir->then_instructions.push_tail(then_discard);
-   } else if (else_discard != NULL && !is_only_instruction(else_discard)) {
-      this->progress = true;
-      ir->else_instructions.make_empty();
-      ir->else_instructions.push_tail(else_discard);
-   }
-
-   visit_list_elements(this, &ir->then_instructions);
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-discard_simplifier::visit_enter(ir_loop *ir)
-{
-   ir_discard *discard = find_unconditional_discard(ir->body_instructions);
-
-   if (discard) {
-      ir->replace_with(discard);
-      return visit_continue_with_parent;
-   }
-
-   return visit_continue;
-}
-
-bool
-do_discard_simplification(exec_list *instructions)
-{
-   /* Look for a top-level unconditional discard */
-   ir_discard *discard = find_unconditional_discard(*instructions);
-   if (discard != NULL) {
-      instructions->make_empty();
-      instructions->push_tail(discard);
-      return true;
-   }
-
-   discard_simplifier v;
-
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp
deleted file mode 100644
index 58bc2f9..0000000
--- a/src/glsl/opt_function_inlining.cpp
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_function_inlining.cpp
- *
- * Replaces calls to functions with the body of the function.
- */
-
-#include <inttypes.h>
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_function_inlining.h"
-#include "ir_expression_flattening.h"
-#include "glsl_types.h"
-#include "program/hash_table.h"
-
-static void
-do_sampler_replacement(exec_list *instructions,
-		       ir_variable *sampler,
-		       ir_dereference *deref);
-
-class ir_function_inlining_visitor : public ir_hierarchical_visitor {
-public:
-   ir_function_inlining_visitor()
-   {
-      progress = false;
-   }
-
-   virtual ~ir_function_inlining_visitor()
-   {
-      /* empty */
-   }
-
-   virtual ir_visitor_status visit_enter(ir_expression *);
-   virtual ir_visitor_status visit_enter(ir_call *);
-   virtual ir_visitor_status visit_enter(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_return *);
-   virtual ir_visitor_status visit_enter(ir_texture *);
-   virtual ir_visitor_status visit_enter(ir_swizzle *);
-
-   bool progress;
-};
-
-
-bool
-automatic_inlining_predicate(ir_instruction *ir)
-{
-   ir_call *call = ir->as_call();
-
-   if (call && can_inline(call))
-      return true;
-
-   return false;
-}
-
-bool
-do_function_inlining(exec_list *instructions)
-{
-   ir_function_inlining_visitor v;
-
-   do_expression_flattening(instructions, automatic_inlining_predicate);
-
-   v.run(instructions);
-
-   return v.progress;
-}
-
-static void
-replace_return_with_assignment(ir_instruction *ir, void *data)
-{
-   void *ctx = hieralloc_parent(ir);
-   ir_variable *retval = (ir_variable *)data;
-   ir_return *ret = ir->as_return();
-
-   if (ret) {
-      if (ret->value) {
-	 ir_rvalue *lhs = new(ctx) ir_dereference_variable(retval);
-	 ret->replace_with(new(ctx) ir_assignment(lhs, ret->value, NULL));
-      } else {
-	 /* un-valued return has to be the last return, or we shouldn't
-	  * have reached here. (see can_inline()).
-	  */
-	 assert(ret->next->is_tail_sentinel());
-	 ret->remove();
-      }
-   }
-}
-
-ir_rvalue *
-ir_call::generate_inline(ir_instruction *next_ir)
-{
-   void *ctx = hieralloc_parent(this);
-   ir_variable **parameters;
-   int num_parameters;
-   int i;
-   ir_variable *retval = NULL;
-   struct hash_table *ht;
-
-   ht = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare);
-
-   num_parameters = 0;
-   foreach_iter(exec_list_iterator, iter_sig, this->callee->parameters)
-      num_parameters++;
-
-   parameters = new ir_variable *[num_parameters];
-
-   /* Generate storage for the return value. */
-   if (this->callee->return_type) {
-      retval = new(ctx) ir_variable(this->callee->return_type, "_ret_val",
-				    ir_var_auto);
-      next_ir->insert_before(retval);
-   }
-
-   /* Generate the declarations for the parameters to our inlined code,
-    * and set up the mapping of real function body variables to ours.
-    */
-   i = 0;
-   exec_list_iterator sig_param_iter = this->callee->parameters.iterator();
-   exec_list_iterator param_iter = this->actual_parameters.iterator();
-   for (i = 0; i < num_parameters; i++) {
-      ir_variable *sig_param = (ir_variable *) sig_param_iter.get();
-      ir_rvalue *param = (ir_rvalue *) param_iter.get();
-
-      /* Generate a new variable for the parameter. */
-      if (sig_param->type->base_type == GLSL_TYPE_SAMPLER) {
-	 /* For samplers, we want the inlined sampler references
-	  * referencing the passed in sampler variable, since that
-	  * will have the location information, which an assignment of
-	  * a sampler wouldn't.  Fix it up below.
-	  */
-	 parameters[i] = NULL;
-      } else {
-	 parameters[i] = sig_param->clone(ctx, ht);
-	 parameters[i]->mode = ir_var_auto;
-
-	 /* Remove the read-only decoration becuase we're going to write
-	  * directly to this variable.  If the cloned variable is left
-	  * read-only and the inlined function is inside a loop, the loop
-	  * analysis code will get confused.
-	  */
-	 parameters[i]->read_only = false;
-	 next_ir->insert_before(parameters[i]);
-      }
-
-      /* Move the actual param into our param variable if it's an 'in' type. */
-      if (parameters[i] && (sig_param->mode == ir_var_in ||
-			    sig_param->mode == ir_var_inout)) {
-	 ir_assignment *assign;
-
-	 assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(parameters[i]),
-					 param, NULL);
-	 next_ir->insert_before(assign);
-      }
-
-      sig_param_iter.next();
-      param_iter.next();
-   }
-
-   exec_list new_instructions;
-
-   /* Generate the inlined body of the function to a new list */
-   foreach_iter(exec_list_iterator, iter, callee->body) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      ir_instruction *new_ir = ir->clone(ctx, ht);
-
-      new_instructions.push_tail(new_ir);
-      visit_tree(new_ir, replace_return_with_assignment, retval);
-   }
-
-   /* If any samplers were passed in, replace any deref of the sampler
-    * with a deref of the sampler argument.
-    */
-   param_iter = this->actual_parameters.iterator();
-   sig_param_iter = this->callee->parameters.iterator();
-   for (i = 0; i < num_parameters; i++) {
-      ir_instruction *const param = (ir_instruction *) param_iter.get();
-      ir_variable *sig_param = (ir_variable *) sig_param_iter.get();
-
-      if (sig_param->type->base_type == GLSL_TYPE_SAMPLER) {
-	 ir_dereference *deref = param->as_dereference();
-
-	 assert(deref);
-	 do_sampler_replacement(&new_instructions, sig_param, deref);
-      }
-      param_iter.next();
-      sig_param_iter.next();
-   }
-
-   /* Now push those new instructions in. */
-   foreach_iter(exec_list_iterator, iter, new_instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
-      next_ir->insert_before(ir);
-   }
-
-   /* Copy back the value of any 'out' parameters from the function body
-    * variables to our own.
-    */
-   i = 0;
-   param_iter = this->actual_parameters.iterator();
-   sig_param_iter = this->callee->parameters.iterator();
-   for (i = 0; i < num_parameters; i++) {
-      ir_instruction *const param = (ir_instruction *) param_iter.get();
-      const ir_variable *const sig_param = (ir_variable *) sig_param_iter.get();
-
-      /* Move our param variable into the actual param if it's an 'out' type. */
-      if (parameters[i] && (sig_param->mode == ir_var_out ||
-			    sig_param->mode == ir_var_inout)) {
-	 ir_assignment *assign;
-
-	 assign = new(ctx) ir_assignment(param->clone(ctx, NULL)->as_rvalue(),
-					 new(ctx) ir_dereference_variable(parameters[i]),
-					 NULL);
-	 next_ir->insert_before(assign);
-      }
-
-      param_iter.next();
-      sig_param_iter.next();
-   }
-
-   delete [] parameters;
-
-   hash_table_dtor(ht);
-
-   if (retval)
-      return new(ctx) ir_dereference_variable(retval);
-   else
-      return NULL;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_expression *ir)
-{
-   (void) ir;
-   return visit_continue_with_parent;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_return *ir)
-{
-   (void) ir;
-   return visit_continue_with_parent;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_texture *ir)
-{
-   (void) ir;
-   return visit_continue_with_parent;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_swizzle *ir)
-{
-   (void) ir;
-   return visit_continue_with_parent;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_call *ir)
-{
-   if (can_inline(ir)) {
-      /* If the call was part of some tree, then it should have been
-       * flattened out or we shouldn't have seen it because of a
-       * visit_continue_with_parent in this visitor.
-       */
-      assert(ir == base_ir);
-
-      (void) ir->generate_inline(ir);
-      ir->remove();
-      this->progress = true;
-   }
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-ir_function_inlining_visitor::visit_enter(ir_assignment *ir)
-{
-   ir_call *call = ir->rhs->as_call();
-   if (!call || !can_inline(call))
-      return visit_continue;
-
-   /* generates the parameter setup, function body, and returns the return
-    * value of the function
-    */
-   ir_rvalue *rhs = call->generate_inline(ir);
-   assert(rhs);
-
-   ir->rhs = rhs;
-   this->progress = true;
-
-   return visit_continue;
-}
-
-/**
- * Replaces references to the "sampler" variable with a clone of "deref."
- *
- * From the spec, samplers can appear in the tree as function
- * (non-out) parameters and as the result of array indexing and
- * structure field selection.  In our builtin implementation, they
- * also appear in the sampler field of an ir_tex instruction.
- */
-
-class ir_sampler_replacement_visitor : public ir_hierarchical_visitor {
-public:
-   ir_sampler_replacement_visitor(ir_variable *sampler, ir_dereference *deref)
-   {
-      this->sampler = sampler;
-      this->deref = deref;
-   }
-
-   virtual ~ir_sampler_replacement_visitor()
-   {
-   }
-
-   virtual ir_visitor_status visit_leave(ir_call *);
-   virtual ir_visitor_status visit_leave(ir_dereference_array *);
-   virtual ir_visitor_status visit_leave(ir_dereference_record *);
-   virtual ir_visitor_status visit_leave(ir_texture *);
-
-   void replace_deref(ir_dereference **deref);
-   void replace_rvalue(ir_rvalue **rvalue);
-
-   ir_variable *sampler;
-   ir_dereference *deref;
-};
-
-void
-ir_sampler_replacement_visitor::replace_deref(ir_dereference **deref)
-{
-   ir_dereference_variable *deref_var = (*deref)->as_dereference_variable();
-   if (deref_var && deref_var->var == this->sampler) {
-      *deref = this->deref->clone(hieralloc_parent(*deref), NULL);
-   }
-}
-
-void
-ir_sampler_replacement_visitor::replace_rvalue(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return;
-
-   ir_dereference *deref = (*rvalue)->as_dereference();
-
-   if (!deref)
-      return;
-
-   replace_deref(&deref);
-   *rvalue = deref;
-}
-
-ir_visitor_status
-ir_sampler_replacement_visitor::visit_leave(ir_texture *ir)
-{
-   replace_deref(&ir->sampler);
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_sampler_replacement_visitor::visit_leave(ir_dereference_array *ir)
-{
-   replace_rvalue(&ir->array);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_sampler_replacement_visitor::visit_leave(ir_dereference_record *ir)
-{
-   replace_rvalue(&ir->record);
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_sampler_replacement_visitor::visit_leave(ir_call *ir)
-{
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_rvalue *param = (ir_rvalue *)iter.get();
-      ir_rvalue *new_param = param;
-      replace_rvalue(&new_param);
-
-      if (new_param != param) {
-	 param->replace_with(new_param);
-      }
-   }
-   return visit_continue;
-}
-
-static void
-do_sampler_replacement(exec_list *instructions,
-		       ir_variable *sampler,
-		       ir_dereference *deref)
-{
-   ir_sampler_replacement_visitor v(sampler, deref);
-
-   visit_list_elements(&v, instructions);
-}
diff --git a/src/glsl/opt_if_simplification.cpp b/src/glsl/opt_if_simplification.cpp
deleted file mode 100644
index 618bacf..0000000
--- a/src/glsl/opt_if_simplification.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_if_simplification.cpp
- *
- * Moves constant branches of if statements out to the surrounding
- * instruction stream.
- */
-
-#include "ir.h"
-
-class ir_if_simplification_visitor : public ir_hierarchical_visitor {
-public:
-   ir_if_simplification_visitor()
-   {
-      this->made_progress = false;
-   }
-
-   ir_visitor_status visit_leave(ir_if *);
-
-   bool made_progress;
-};
-
-bool
-do_if_simplification(exec_list *instructions)
-{
-   ir_if_simplification_visitor v;
-
-   v.run(instructions);
-   return v.made_progress;
-}
-
-
-ir_visitor_status
-ir_if_simplification_visitor::visit_leave(ir_if *ir)
-{
-   /* FINISHME: Ideally there would be a way to note that the condition results
-    * FINISHME: in a constant before processing both of the other subtrees.
-    * FINISHME: This can probably be done with some flags, but it would take
-    * FINISHME: some work to get right.
-    */
-   ir_constant *condition_constant = ir->condition->constant_expression_value();
-   if (condition_constant) {
-      /* Move the contents of the one branch of the conditional
-       * that matters out.
-       */
-      if (condition_constant->value.b[0]) {
-	 foreach_iter(exec_list_iterator, then_iter, ir->then_instructions) {
-	    ir_instruction *then_ir = (ir_instruction *)then_iter.get();
-	    ir->insert_before(then_ir);
-	 }
-      } else {
-	 foreach_iter(exec_list_iterator, else_iter, ir->else_instructions) {
-	    ir_instruction *else_ir = (ir_instruction *)else_iter.get();
-	    ir->insert_before(else_ir);
-	 }
-      }
-      ir->remove();
-      this->made_progress = true;
-   }
-
-   return visit_continue;
-}
diff --git a/src/glsl/opt_noop_swizzle.cpp b/src/glsl/opt_noop_swizzle.cpp
deleted file mode 100644
index 0a906aa..0000000
--- a/src/glsl/opt_noop_swizzle.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_noop_swizzle.cpp
- *
- * If a swizzle doesn't change the order or count of components, then
- * remove the swizzle so that other optimization passes see the value
- * behind it.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "ir_print_visitor.h"
-#include "glsl_types.h"
-
-class ir_noop_swizzle_visitor : public ir_rvalue_visitor {
-public:
-   ir_noop_swizzle_visitor()
-   {
-      this->progress = false;
-   }
-
-   void handle_rvalue(ir_rvalue **rvalue);
-   bool progress;
-};
-
-void
-ir_noop_swizzle_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return;
-
-   ir_swizzle *swiz = (*rvalue)->as_swizzle();
-   if (!swiz || swiz->type != swiz->val->type)
-      return;
-
-   int elems = swiz->val->type->vector_elements;
-   if (swiz->mask.x != 0)
-      return;
-   if (elems >= 2 && swiz->mask.y != 1)
-      return;
-   if (elems >= 3 && swiz->mask.z != 2)
-      return;
-   if (elems >= 4 && swiz->mask.w != 3)
-      return;
-
-   this->progress = true;
-   *rvalue = swiz->val;
-}
-
-bool
-do_noop_swizzle(exec_list *instructions)
-{
-   ir_noop_swizzle_visitor v;
-   visit_list_elements(&v, instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_redundant_jumps.cpp b/src/glsl/opt_redundant_jumps.cpp
deleted file mode 100644
index edf4bb6..0000000
--- a/src/glsl/opt_redundant_jumps.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_redundant_jumps.cpp
- * Remove certain types of redundant jumps
- */
-
-#include "ir.h"
-
-class redundant_jumps_visitor : public ir_hierarchical_visitor {
-public:
-   redundant_jumps_visitor()
-   {
-      this->progress = false;
-   }
-
-   virtual ir_visitor_status visit_leave(ir_if *);
-   virtual ir_visitor_status visit_leave(ir_loop *);
-
-   bool progress;
-};
-
-
-ir_visitor_status
-redundant_jumps_visitor::visit_leave(ir_if *ir)
-{
-   /* If the last instruction in both branches is a 'break' or a 'continue',
-    * pull it out of the branches and insert it after the if-statment.  Note
-    * that both must be the same type (either 'break' or 'continue').
-    */
-   ir_instruction *const last_then =
-      (ir_instruction *) ir->then_instructions.get_tail();
-   ir_instruction *const last_else =
-      (ir_instruction *) ir->else_instructions.get_tail();
-
-   if ((last_then == NULL) || (last_else == NULL))
-      return visit_continue;
-
-   if ((last_then->ir_type != ir_type_loop_jump)
-       || (last_else->ir_type != ir_type_loop_jump))
-      return visit_continue;
-
-   ir_loop_jump *const then_jump = (ir_loop_jump *) last_then;
-   ir_loop_jump *const else_jump = (ir_loop_jump *) last_else;
-
-   if (then_jump->mode != else_jump->mode)
-      return visit_continue;
-
-   then_jump->remove();
-   else_jump->remove();
-   this->progress = true;
-
-   ir->insert_after(then_jump);
-
-   /* If both branchs of the if-statement are now empty, remove the
-    * if-statement.
-    */
-   if (ir->then_instructions.is_empty() && ir->else_instructions.is_empty())
-      ir->remove();
-
-   return visit_continue;
-}
-
-
-ir_visitor_status
-redundant_jumps_visitor::visit_leave(ir_loop *ir)
-{
-   /* If the last instruction of a loop body is a 'continue', remove it.
-    */
-   ir_instruction *const last =
-      (ir_instruction *) ir->body_instructions.get_tail();
-
-   if (last && (last->ir_type == ir_type_loop_jump)
-       && (((ir_loop_jump *) last)->mode == ir_loop_jump::jump_continue)) {
-      last->remove();
-      this->progress = true;
-   }
-
-   return visit_continue;
-}
-
-
-bool
-optimize_redundant_jumps(exec_list *instructions)
-{
-   redundant_jumps_visitor v;
-
-   v.run(instructions);
-   return v.progress;
-}
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
deleted file mode 100644
index ed18a43..0000000
--- a/src/glsl/opt_structure_splitting.cpp
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_structure_splitting.cpp
- *
- * If a structure is only ever referenced by its components, then
- * split those components out to individual variables so they can be
- * handled normally by other optimization passes.
- *
- * This skips structures like uniforms, which need to be accessible as
- * structures for their access by the GL.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_print_visitor.h"
-#include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
-
-static bool debug = false;
-
-// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined
-// function) with the variable_entry class seen in ir_variable_refcount.h
-// Perhaps we can use the one in ir_variable_refcount.h and make this class
-// here go away?
-class variable_entry2 : public exec_node
-{
-public:
-   variable_entry2(ir_variable *var)
-   {
-      this->var = var;
-      this->whole_structure_access = 0;
-      this->declaration = false;
-      this->components = NULL;
-      this->mem_ctx = NULL;
-   }
-
-   ir_variable *var; /* The key: the variable's pointer. */
-
-   /** Number of times the variable is referenced, including assignments. */
-   unsigned whole_structure_access;
-
-   bool declaration; /* If the variable had a decl in the instruction stream */
-
-   ir_variable **components;
-
-   /** hieralloc_parent(this->var) -- the shader's hieralloc context. */
-   void *mem_ctx;
-};
-
-
-class ir_structure_reference_visitor : public ir_hierarchical_visitor {
-public:
-   ir_structure_reference_visitor(void)
-   {
-      this->mem_ctx = hieralloc_new(NULL);
-      this->variable_list.make_empty();
-   }
-
-   ~ir_structure_reference_visitor(void)
-   {
-      hieralloc_free(mem_ctx);
-   }
-
-   virtual ir_visitor_status visit(ir_variable *);
-   virtual ir_visitor_status visit(ir_dereference_variable *);
-   virtual ir_visitor_status visit_enter(ir_dereference_record *);
-   virtual ir_visitor_status visit_enter(ir_assignment *);
-   virtual ir_visitor_status visit_enter(ir_function_signature *);
-
-   variable_entry2 *get_variable_entry2(ir_variable *var);
-
-   /* List of variable_entry */
-   exec_list variable_list;
-
-   void *mem_ctx;
-};
-
-variable_entry2 *
-ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
-{
-   assert(var);
-
-   if (!var->type->is_record() || var->mode == ir_var_uniform)
-      return NULL;
-
-   foreach_iter(exec_list_iterator, iter, this->variable_list) {
-      variable_entry2 *entry = (variable_entry2 *)iter.get();
-      if (entry->var == var)
-	 return entry;
-   }
-
-   variable_entry2 *entry = new(mem_ctx) variable_entry2(var);
-   this->variable_list.push_tail(entry);
-   return entry;
-}
-
-
-ir_visitor_status
-ir_structure_reference_visitor::visit(ir_variable *ir)
-{
-   variable_entry2 *entry = this->get_variable_entry2(ir);
-
-   if (entry)
-      entry->declaration = true;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_structure_reference_visitor::visit(ir_dereference_variable *ir)
-{
-   ir_variable *const var = ir->variable_referenced();
-   variable_entry2 *entry = this->get_variable_entry2(var);
-
-   if (entry)
-      entry->whole_structure_access++;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_structure_reference_visitor::visit_enter(ir_dereference_record *ir)
-{
-   (void) ir;
-   /* Don't descend into the ir_dereference_variable below. */
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_structure_reference_visitor::visit_enter(ir_assignment *ir)
-{
-   if (ir->lhs->as_dereference_variable() &&
-       ir->rhs->as_dereference_variable() &&
-       !ir->condition) {
-      /* We'll split copies of a structure to copies of components, so don't
-       * descend to the ir_dereference_variables.
-       */
-      return visit_continue_with_parent;
-   }
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_structure_reference_visitor::visit_enter(ir_function_signature *ir)
-{
-   /* We don't want to descend into the function parameters and
-    * dead-code eliminate them, so just accept the body here.
-    */
-   visit_list_elements(this, &ir->body);
-   return visit_continue_with_parent;
-}
-
-class ir_structure_splitting_visitor : public ir_rvalue_visitor {
-public:
-   ir_structure_splitting_visitor(exec_list *vars)
-   {
-      this->variable_list = vars;
-   }
-
-   virtual ~ir_structure_splitting_visitor()
-   {
-   }
-
-   virtual ir_visitor_status visit_leave(ir_assignment *);
-
-   void split_deref(ir_dereference **deref);
-   void handle_rvalue(ir_rvalue **rvalue);
-   variable_entry2 *get_splitting_entry(ir_variable *var);
-
-   exec_list *variable_list;
-   void *mem_ctx;
-};
-
-variable_entry2 *
-ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
-{
-   assert(var);
-
-   if (!var->type->is_record())
-      return NULL;
-
-   foreach_iter(exec_list_iterator, iter, *this->variable_list) {
-      variable_entry2 *entry = (variable_entry2 *)iter.get();
-      if (entry->var == var) {
-	 return entry;
-      }
-   }
-
-   return NULL;
-}
-
-void
-ir_structure_splitting_visitor::split_deref(ir_dereference **deref)
-{
-   if ((*deref)->ir_type != ir_type_dereference_record)
-      return;
-
-   ir_dereference_record *deref_record = (ir_dereference_record *)*deref;
-   ir_dereference_variable *deref_var = deref_record->record->as_dereference_variable();
-   if (!deref_var)
-      return;
-
-   variable_entry2 *entry = get_splitting_entry(deref_var->var);
-   if (!entry)
-      return;
-
-   unsigned int i;
-   for (i = 0; i < entry->var->type->length; i++) {
-      if (strcmp(deref_record->field,
-		 entry->var->type->fields.structure[i].name) == 0)
-	 break;
-   }
-   assert(i != entry->var->type->length);
-
-   *deref = new(entry->mem_ctx) ir_dereference_variable(entry->components[i]);
-}
-
-void
-ir_structure_splitting_visitor::handle_rvalue(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return;
-
-   ir_dereference *deref = (*rvalue)->as_dereference();
-
-   if (!deref)
-      return;
-
-   split_deref(&deref);
-   *rvalue = deref;
-}
-
-ir_visitor_status
-ir_structure_splitting_visitor::visit_leave(ir_assignment *ir)
-{
-   ir_dereference_variable *lhs_deref = ir->lhs->as_dereference_variable();
-   ir_dereference_variable *rhs_deref = ir->rhs->as_dereference_variable();
-   variable_entry2 *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL;
-   variable_entry2 *rhs_entry = rhs_deref ? get_splitting_entry(rhs_deref->var) : NULL;
-   const glsl_type *type = ir->rhs->type;
-
-   if ((lhs_entry || rhs_entry) && !ir->condition) {
-      for (unsigned int i = 0; i < type->length; i++) {
-	 ir_dereference *new_lhs, *new_rhs;
-	 void *mem_ctx = lhs_entry ? lhs_entry->mem_ctx : rhs_entry->mem_ctx;
-
-	 if (lhs_entry) {
-	    new_lhs = new(mem_ctx) ir_dereference_variable(lhs_entry->components[i]);
-	 } else {
-	    new_lhs = new(mem_ctx)
-	       ir_dereference_record(ir->lhs->clone(mem_ctx, NULL),
-				     type->fields.structure[i].name);
-	 }
-
-	 if (rhs_entry) {
-	    new_rhs = new(mem_ctx) ir_dereference_variable(rhs_entry->components[i]);
-	 } else {
-	    new_rhs = new(mem_ctx)
-	       ir_dereference_record(ir->rhs->clone(mem_ctx, NULL),
-				     type->fields.structure[i].name);
-	 }
-
-	 ir->insert_before(new(mem_ctx) ir_assignment(new_lhs,
-						      new_rhs,
-						      NULL));
-      }
-      ir->remove();
-   } else {
-      handle_rvalue(&ir->rhs);
-      split_deref(&ir->lhs);
-   }
-
-   handle_rvalue(&ir->condition);
-
-   return visit_continue;
-}
-
-bool
-do_structure_splitting(exec_list *instructions)
-{
-   ir_structure_reference_visitor refs;
-
-   visit_list_elements(&refs, instructions);
-
-   /* Trim out variables we can't split. */
-   foreach_iter(exec_list_iterator, iter, refs.variable_list) {
-      variable_entry2 *entry = (variable_entry2 *)iter.get();
-
-      if (debug) {
-	 printf("structure %s@%p: decl %d, whole_access %d\n",
-		entry->var->name, (void *) entry->var, entry->declaration,
-		entry->whole_structure_access);
-      }
-
-      if (!entry->declaration || entry->whole_structure_access) {
-	 entry->remove();
-      }
-   }
-
-   if (refs.variable_list.is_empty())
-      return false;
-
-   void *mem_ctx = hieralloc_new(NULL);
-
-   /* Replace the decls of the structures to be split with their split
-    * components.
-    */
-   foreach_iter(exec_list_iterator, iter, refs.variable_list) {
-      variable_entry2 *entry = (variable_entry2 *)iter.get();
-      const struct glsl_type *type = entry->var->type;
-
-      entry->mem_ctx = hieralloc_parent(entry->var);
-
-      entry->components = hieralloc_array(mem_ctx,
-				       ir_variable *,
-				       type->length);
-
-      for (unsigned int i = 0; i < entry->var->type->length; i++) {
-	 const char *name = hieralloc_asprintf(mem_ctx, "%s_%s",
-					    entry->var->name,
-					    type->fields.structure[i].name);
-
-	 entry->components[i] =
-	    new(entry->mem_ctx) ir_variable(type->fields.structure[i].type,
-					    name,
-					    ir_var_temporary);
-	 entry->var->insert_before(entry->components[i]);
-      }
-
-      entry->var->remove();
-   }
-
-   ir_structure_splitting_visitor split(&refs.variable_list);
-   visit_list_elements(&split, instructions);
-
-   hieralloc_free(mem_ctx);
-
-   return true;
-}
diff --git a/src/glsl/opt_swizzle_swizzle.cpp b/src/glsl/opt_swizzle_swizzle.cpp
deleted file mode 100644
index bc442fa..0000000
--- a/src/glsl/opt_swizzle_swizzle.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_swizzle_swizzle.cpp
- *
- * Eliminates the second swizzle in a swizzle chain.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-class ir_swizzle_swizzle_visitor : public ir_hierarchical_visitor {
-public:
-   ir_swizzle_swizzle_visitor()
-   {
-      progress = false;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_swizzle *);
-
-   bool progress;
-};
-
-ir_visitor_status
-ir_swizzle_swizzle_visitor::visit_enter(ir_swizzle *ir)
-{
-   int mask2[4];
-
-   ir_swizzle *swiz2 = ir->val->as_swizzle();
-   if (!swiz2)
-      return visit_continue;
-
-   memset(&mask2, 0, sizeof(mask2));
-   if (swiz2->mask.num_components >= 1)
-      mask2[0] = swiz2->mask.x;
-   if (swiz2->mask.num_components >= 2)
-      mask2[1] = swiz2->mask.y;
-   if (swiz2->mask.num_components >= 3)
-      mask2[2] = swiz2->mask.z;
-   if (swiz2->mask.num_components >= 4)
-      mask2[3] = swiz2->mask.w;
-
-   if (ir->mask.num_components >= 1)
-      ir->mask.x = mask2[ir->mask.x];
-   if (ir->mask.num_components >= 2)
-      ir->mask.y = mask2[ir->mask.y];
-   if (ir->mask.num_components >= 3)
-      ir->mask.z = mask2[ir->mask.z];
-   if (ir->mask.num_components >= 4)
-      ir->mask.w = mask2[ir->mask.w];
-
-   ir->val = swiz2->val;
-
-   this->progress = true;
-
-   return visit_continue;
-}
-
-/**
- * Does a copy propagation pass on the code present in the instruction stream.
- */
-bool
-do_swizzle_swizzle(exec_list *instructions)
-{
-   ir_swizzle_swizzle_visitor v;
-
-   v.run(instructions);
-
-   return v.progress;
-}
diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp
deleted file mode 100644
index 9917c04..0000000
--- a/src/glsl/opt_tree_grafting.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file opt_tree_grafting.cpp
- *
- * Takes assignments to variables that are dereferenced only once and
- * pastes the RHS expression into where the variable is dereferenced.
- *
- * In the process of various operations like function inlining and
- * tertiary op handling, we'll end up with our expression trees having
- * been chopped up into a series of assignments of short expressions
- * to temps.  Other passes like ir_algebraic.cpp would prefer to see
- * the deepest expression trees they can to try to optimize them.
- *
- * This is a lot like copy propagaton.  In comparison, copy
- * propagation only acts on plain copies, not arbitrary expressions on
- * the RHS.  Generally, we wouldn't want to go pasting some
- * complicated expression everywhere it got used, though, so we don't
- * handle expressions in that pass.
- *
- * The hard part is making sure we don't move an expression across
- * some other assignments that would change the value of the
- * expression.  So we split this into two passes: First, find the
- * variables in our scope which are written to once and read once, and
- * then go through basic blocks seeing if we find an opportunity to
- * move those expressions safely.
- */
-
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_variable_refcount.h"
-#include "ir_basic_block.h"
-#include "ir_optimization.h"
-#include "glsl_types.h"
-
-static bool debug = false;
-
-class ir_tree_grafting_visitor : public ir_hierarchical_visitor {
-public:
-   ir_tree_grafting_visitor(ir_assignment *graft_assign,
-			    ir_variable *graft_var)
-   {
-      this->progress = false;
-      this->graft_assign = graft_assign;
-      this->graft_var = graft_var;
-   }
-
-   virtual ir_visitor_status visit_leave(class ir_assignment *);
-   virtual ir_visitor_status visit_enter(class ir_call *);
-   virtual ir_visitor_status visit_enter(class ir_expression *);
-   virtual ir_visitor_status visit_enter(class ir_function *);
-   virtual ir_visitor_status visit_enter(class ir_function_signature *);
-   virtual ir_visitor_status visit_enter(class ir_if *);
-   virtual ir_visitor_status visit_enter(class ir_loop *);
-   virtual ir_visitor_status visit_enter(class ir_swizzle *);
-   virtual ir_visitor_status visit_enter(class ir_texture *);
-
-   bool do_graft(ir_rvalue **rvalue);
-
-   bool progress;
-   ir_variable *graft_var;
-   ir_assignment *graft_assign;
-};
-
-struct find_deref_info {
-   ir_variable *var;
-   bool found;
-};
-
-void
-dereferences_variable_callback(ir_instruction *ir, void *data)
-{
-   struct find_deref_info *info = (struct find_deref_info *)data;
-   ir_dereference_variable *deref = ir->as_dereference_variable();
-
-   if (deref && deref->var == info->var)
-      info->found = true;
-}
-
-static bool
-dereferences_variable(ir_instruction *ir, ir_variable *var)
-{
-   struct find_deref_info info;
-
-   info.var = var;
-   info.found = false;
-
-   visit_tree(ir, dereferences_variable_callback, &info);
-
-   return info.found;
-}
-
-bool
-ir_tree_grafting_visitor::do_graft(ir_rvalue **rvalue)
-{
-   if (!*rvalue)
-      return false;
-
-   ir_dereference_variable *deref = (*rvalue)->as_dereference_variable();
-
-   if (!deref || deref->var != this->graft_var)
-      return false;
-
-   if (debug) {
-      printf("GRAFTING:\n");
-      this->graft_assign->print();
-      printf("\n");
-      printf("TO:\n");
-      (*rvalue)->print();
-      printf("\n");
-   }
-
-   this->graft_assign->remove();
-   *rvalue = this->graft_assign->rhs;
-
-   this->progress = true;
-   return true;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_loop *ir)
-{
-   (void)ir;
-   /* Do not traverse into the body of the loop since that is a
-    * different basic block.
-    */
-   return visit_stop;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_leave(ir_assignment *ir)
-{
-   if (do_graft(&ir->rhs) ||
-       do_graft(&ir->condition))
-      return visit_stop;
-
-   /* If this assignment updates a variable used in the assignment
-    * we're trying to graft, then we're done.
-    */
-   if (dereferences_variable(this->graft_assign->rhs,
-			     ir->lhs->variable_referenced())) {
-      if (debug) {
-	 printf("graft killed by: ");
-	 ir->print();
-	 printf("\n");
-      }
-      return visit_stop;
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_function *ir)
-{
-   (void) ir;
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_function_signature *ir)
-{
-   (void)ir;
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_call *ir)
-{
-   exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
-   /* Reminder: iterating ir_call iterates its parameters. */
-   foreach_iter(exec_list_iterator, iter, *ir) {
-      ir_variable *sig_param = (ir_variable *)sig_iter.get();
-      ir_rvalue *ir = (ir_rvalue *)iter.get();
-      ir_rvalue *new_ir = ir;
-
-      if (sig_param->mode != ir_var_in)
-	 continue;
-
-      if (do_graft(&new_ir)) {
-	 ir->replace_with(new_ir);
-	 return visit_stop;
-      }
-      sig_iter.next();
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_expression *ir)
-{
-   for (unsigned int i = 0; i < ir->get_num_operands(); i++) {
-      if (do_graft(&ir->operands[i]))
-	 return visit_stop;
-   }
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_if *ir)
-{
-   if (do_graft(&ir->condition))
-      return visit_stop;
-
-   /* Do not traverse into the body of the if-statement since that is a
-    * different basic block.
-    */
-   return visit_continue_with_parent;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_swizzle *ir)
-{
-   if (do_graft(&ir->val))
-      return visit_stop;
-
-   return visit_continue;
-}
-
-ir_visitor_status
-ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
-{
-   if (do_graft(&ir->coordinate) ||
-       do_graft(&ir->projector) ||
-       do_graft(&ir->shadow_comparitor))
-	 return visit_stop;
-
-   switch (ir->op) {
-   case ir_tex:
-      break;
-   case ir_txb:
-      if (do_graft(&ir->lod_info.bias))
-	 return visit_stop;
-      break;
-   case ir_txf:
-   case ir_txl:
-      if (do_graft(&ir->lod_info.lod))
-	 return visit_stop;
-      break;
-   case ir_txd:
-      if (do_graft(&ir->lod_info.grad.dPdx) ||
-	  do_graft(&ir->lod_info.grad.dPdy))
-	 return visit_stop;
-      break;
-   }
-
-   return visit_continue;
-}
-
-struct tree_grafting_info {
-   ir_variable_refcount_visitor *refs;
-   bool progress;
-};
-
-static bool
-try_tree_grafting(ir_assignment *start,
-		  ir_variable *lhs_var,
-		  ir_instruction *bb_last)
-{
-   ir_tree_grafting_visitor v(start, lhs_var);
-
-   if (debug) {
-      printf("trying to graft: ");
-      lhs_var->print();
-      printf("\n");
-   }
-
-   for (ir_instruction *ir = (ir_instruction *)start->next;
-	ir != bb_last->next;
-	ir = (ir_instruction *)ir->next) {
-
-      if (debug) {
-	 printf("- ");
-	 ir->print();
-	 printf("\n");
-      }
-
-      ir_visitor_status s = ir->accept(&v);
-      if (s == visit_stop)
-	 return v.progress;
-   }
-
-   return false;
-}
-
-static void
-tree_grafting_basic_block(ir_instruction *bb_first,
-			  ir_instruction *bb_last,
-			  void *data)
-{
-   struct tree_grafting_info *info = (struct tree_grafting_info *)data;
-   ir_instruction *ir, *next;
-
-   for (ir = bb_first, next = (ir_instruction *)ir->next;
-	ir != bb_last->next;
-	ir = next, next = (ir_instruction *)ir->next) {
-      ir_assignment *assign = ir->as_assignment();
-
-      if (!assign)
-	 continue;
-
-      ir_variable *lhs_var = assign->whole_variable_written();
-      if (!lhs_var)
-	 continue;
-
-      if (lhs_var->mode == ir_var_out ||
-	  lhs_var->mode == ir_var_inout)
-	 continue;
-
-      variable_entry *entry = info->refs->get_variable_entry(lhs_var);
-
-      if (!entry->declaration ||
-	  entry->assigned_count != 1 ||
-	  entry->referenced_count != 2)
-	 continue;
-
-      assert(assign == entry->assign);
-
-      /* Found a possibly graftable assignment.  Now, walk through the
-       * rest of the BB seeing if the deref is here, and if nothing interfered with
-       * pasting its expression's values in between.
-       */
-      info->progress |= try_tree_grafting(assign, lhs_var, bb_last);
-   }
-}
-
-/**
- * Does a copy propagation pass on the code present in the instruction stream.
- */
-bool
-do_tree_grafting(exec_list *instructions)
-{
-   ir_variable_refcount_visitor refs;
-   struct tree_grafting_info info;
-
-   info.progress = false;
-   info.refs = &refs;
-
-   visit_list_elements(info.refs, instructions);
-
-   call_for_basic_blocks(instructions, tree_grafting_basic_block, &info);
-
-   return info.progress;
-}
diff --git a/src/glsl/program.h b/src/glsl/program.h
deleted file mode 100644
index ddae87e..0000000
--- a/src/glsl/program.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "main/core.h"
-
-extern void
-link_shaders(const struct gl_context *ctx, struct gl_shader_program *prog);
diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp
deleted file mode 100644
index a04c427..0000000
--- a/src/glsl/s_expression.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <assert.h>
-#include "s_expression.h"
-
-s_symbol::s_symbol(const char *tmp, size_t n)
-{
-   this->str = hieralloc_strndup (this, tmp, n);
-   assert(this->str != NULL);
-}
-
-s_list::s_list()
-{
-}
-
-unsigned
-s_list::length() const
-{
-   unsigned i = 0;
-   foreach_iter(exec_list_iterator, it, this->subexpressions) {
-      i++;
-   }
-   return i;
-}
-
-static s_expression *
-read_atom(void *ctx, const char *& src)
-{
-   s_expression *expr = NULL;
-
-   // Skip leading spaces.
-   src += strspn(src, " \v\t\r\n");
-
-   size_t n = strcspn(src, "( \v\t\r\n)");
-   if (n == 0)
-      return NULL; // no atom
-
-   // Check if the atom is a number.
-   char *float_end = NULL;
-   double f = glsl_strtod(src, &float_end);
-   if (float_end != src) {
-      char *int_end = NULL;
-      int i = strtol(src, &int_end, 10);
-      // If strtod matched more characters, it must have a decimal part
-      if (float_end > int_end)
-	 expr = new(ctx) s_float(f);
-      else
-	 expr = new(ctx) s_int(i);
-   } else {
-      // Not a number; return a symbol.
-      expr = new(ctx) s_symbol(src, n);
-   }
-
-   src += n;
-
-   return expr;
-}
-
-s_expression *
-s_expression::read_expression(void *ctx, const char *&src)
-{
-   assert(src != NULL);
-
-   s_expression *atom = read_atom(ctx, src);
-   if (atom != NULL)
-      return atom;
-
-   // Skip leading spaces.
-   src += strspn(src, " \v\t\r\n");
-   if (src[0] == '(') {
-      ++src;
-
-      s_list *list = new(ctx) s_list;
-      s_expression *expr;
-
-      while ((expr = read_expression(ctx, src)) != NULL) {
-	 list->subexpressions.push_tail(expr);
-      }
-      src += strspn(src, " \v\t\r\n");
-      if (src[0] != ')') {
-	 printf("Unclosed expression (check your parenthesis).\n");
-	 return NULL;
-      }
-      ++src;
-      return list;
-   }
-   return NULL;
-}
-
-void s_int::print()
-{
-   printf("%d", this->val);
-}
-
-void s_float::print()
-{
-   printf("%f", this->val);
-}
-
-void s_symbol::print()
-{
-   printf("%s", this->str);
-}
-
-void s_list::print()
-{
-   printf("(");
-   foreach_iter(exec_list_iterator, it, this->subexpressions) {
-      s_expression *expr = (s_expression*) it.get();
-      expr->print();
-      if (!expr->next->is_tail_sentinel())
-	 printf(" ");
-   }
-   printf(")");
-}
-
diff --git a/src/glsl/s_expression.h b/src/glsl/s_expression.h
deleted file mode 100644
index 7769626..0000000
--- a/src/glsl/s_expression.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#pragma once
-#ifndef S_EXPRESSION_H
-#define S_EXPRESSION_H
-
-#include "strtod.h"
-#include "list.h"
-
-#define SX_AS_(t,x) ((x) && ((s_expression*) x)->is_##t()) ? ((s_##t*) (x)) \
-                                                           : NULL
-#define SX_AS_LIST(x)   SX_AS_(list, x)
-#define SX_AS_SYMBOL(x) SX_AS_(symbol, x)
-#define SX_AS_NUMBER(x) SX_AS_(number, x)
-#define SX_AS_INT(x)    SX_AS_(int, x)
-
-/* For our purposes, S-Expressions are:
- * - <int>
- * - <float>
- * - symbol
- * - (expr1 expr2 ... exprN)     where exprN is an S-Expression
- *
- * Unlike LISP/Scheme, we do not support (foo . bar) pairs.
- */
-class s_expression : public exec_node
-{
-public:
-   /**
-    * Read an S-Expression from the given string.
-    * Advances the supplied pointer to just after the expression read.
-    *
-    * Any allocation will be performed with 'ctx' as the hieralloc owner.
-    */
-   static s_expression *read_expression(void *ctx, const char *&src);
-
-   /**
-    * Print out an S-Expression.  Useful for debugging.
-    */
-   virtual void print() = 0;
-
-   virtual bool is_list()   const { return false; }
-   virtual bool is_symbol() const { return false; }
-   virtual bool is_number() const { return false; }
-   virtual bool is_int()    const { return false; }
-
-protected:
-   s_expression() { }
-   virtual ~s_expression() { } // GCC error about accessible nonvirtual dctor
-};
-
-/* Atoms */
-
-class s_number : public s_expression
-{
-public:
-   bool is_number() const { return true; }
-
-   virtual float fvalue() = 0;
-
-protected:
-   s_number() { }
-};
-
-class s_int : public s_number
-{
-public:
-   s_int(int x) : val(x) { }
-
-   bool is_int() const { return true; }
-
-   float fvalue() { return float(this->val); }
-   int value() { return this->val; }
-
-   void print();
-
-private:
-   int val;
-};
-
-class s_float : public s_number
-{
-public:
-   s_float(float x) : val(x) { }
-
-   float fvalue() { return this->val; }
-
-   void print();
-
-private:
-   float val;
-};
-
-class s_symbol : public s_expression
-{
-public:
-   s_symbol(const char *, size_t);
-
-   bool is_symbol() const { return true; }
-
-   const char *value() { return this->str; }
-
-   void print();
-
-private:
-   char *str;
-};
-
-/* Lists of expressions: (expr1 ... exprN) */
-class s_list : public s_expression
-{
-public:
-   s_list();
-
-   virtual bool is_list() const { return true; }
-   unsigned length() const;
-
-   void print();
-
-   exec_list subexpressions;
-};
-
-#endif /* S_EXPRESSION_H */
diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
deleted file mode 100644
index 14728d0..0000000
--- a/src/glsl/strtod.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2010 VMware, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, 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 VMWARE 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.
- */
-
-
-#include <stdlib.h>
-
-#ifdef _GNU_SOURCE
-#include <locale.h>
-#ifdef __APPLE__
-#include <xlocale.h>
-#endif
-#endif
-
-#include "strtod.h"
-
-
-
-/**
- * Wrapper around strtod which uses the "C" locale so the decimal
- * point is always '.'
- */
-double
-glsl_strtod(const char *s, char **end)
-{
-#if 0 && defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
-   static locale_t loc = NULL;
-   if (!loc) {
-      loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-   }
-   return strtod_l(s, end, loc);
-#else
-   return strtod(s, end);
-#endif
-}
diff --git a/src/glsl/strtod.h b/src/glsl/strtod.h
deleted file mode 100644
index 0cf6409..0000000
--- a/src/glsl/strtod.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2010 VMware, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, 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 VMWARE 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.
- */
-
-
-#ifndef STRTOD_H
-#define STRTOD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern double
-glsl_strtod(const char *s, char **end);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/src/glsl/tests/array-01.glsl b/src/glsl/tests/array-01.glsl
deleted file mode 100644
index d14135f..0000000
--- a/src/glsl/tests/array-01.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* FAIL - array size type must be int */
-uniform vec4 [3.2] a;
diff --git a/src/glsl/tests/array-02.glsl b/src/glsl/tests/array-02.glsl
deleted file mode 100644
index d743617..0000000
--- a/src/glsl/tests/array-02.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* FAIL - array size type must be scalar */
-uniform vec4 [ivec4(3)] a;
diff --git a/src/glsl/tests/array-03.glsl b/src/glsl/tests/array-03.glsl
deleted file mode 100644
index 0026913..0000000
--- a/src/glsl/tests/array-03.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* PASS */
-uniform vec4 [3] a;
diff --git a/src/glsl/tests/array-04.glsl b/src/glsl/tests/array-04.glsl
deleted file mode 100644
index 70f434d..0000000
--- a/src/glsl/tests/array-04.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size type must be int */
-uniform vec4 a[3.2];
diff --git a/src/glsl/tests/array-05.glsl b/src/glsl/tests/array-05.glsl
deleted file mode 100644
index 1687040..0000000
--- a/src/glsl/tests/array-05.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size type must be scalar */
-uniform vec4 a[ivec4(3)];
diff --git a/src/glsl/tests/array-06.glsl b/src/glsl/tests/array-06.glsl
deleted file mode 100644
index 46b4379..0000000
--- a/src/glsl/tests/array-06.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* PASS */
-uniform vec4 a[3];
diff --git a/src/glsl/tests/array-07.glsl b/src/glsl/tests/array-07.glsl
deleted file mode 100644
index 161ffbf..0000000
--- a/src/glsl/tests/array-07.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size must be > 0 */
-uniform vec4 a[0];
diff --git a/src/glsl/tests/array-08.glsl b/src/glsl/tests/array-08.glsl
deleted file mode 100644
index 4bf0c6b..0000000
--- a/src/glsl/tests/array-08.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size must be > 0 */
-uniform vec4 a[-1];
diff --git a/src/glsl/tests/array-09.glsl b/src/glsl/tests/array-09.glsl
deleted file mode 100644
index cad6d0e..0000000
--- a/src/glsl/tests/array-09.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
-  vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-10.glsl b/src/glsl/tests/array-10.glsl
deleted file mode 100644
index 019aa21..0000000
--- a/src/glsl/tests/array-10.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - array constructors forbidden in GLSL 1.10
- *
- * This can also generate an error because the 'vec4[]' style syntax is
- * illegal in GLSL 1.10.
- */
-void main()
-{
-  vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-11.glsl b/src/glsl/tests/array-11.glsl
deleted file mode 100644
index 51d94e9..0000000
--- a/src/glsl/tests/array-11.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
-  vec4 a[] = vec4 [] (vec4(1.0), vec4(2.0));
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-12.glsl b/src/glsl/tests/array-12.glsl
deleted file mode 100644
index 7fc9579..0000000
--- a/src/glsl/tests/array-12.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-#version 120
-/* FAIL - array must have an implicit or explicit size */
-
-void main()
-{
-  vec4 a[];
-
-  a = vec4 [2] (vec4(1.0), vec4(2.0));
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-13.glsl b/src/glsl/tests/array-13.glsl
deleted file mode 100644
index cc7e29a..0000000
--- a/src/glsl/tests/array-13.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
-  vec4 a[2];
-
-  a = vec4 [] (vec4(1.0), vec4(2.0));
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/attribute-01.glsl b/src/glsl/tests/attribute-01.glsl
deleted file mode 100644
index 18e9e44..0000000
--- a/src/glsl/tests/attribute-01.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type int */
-attribute int i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-02.glsl b/src/glsl/tests/attribute-02.glsl
deleted file mode 100644
index 6b6df74..0000000
--- a/src/glsl/tests/attribute-02.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec2 */
-attribute ivec2 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-03.glsl b/src/glsl/tests/attribute-03.glsl
deleted file mode 100644
index 870de9e..0000000
--- a/src/glsl/tests/attribute-03.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec3 */
-attribute ivec3 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-04.glsl b/src/glsl/tests/attribute-04.glsl
deleted file mode 100644
index 14af2fc..0000000
--- a/src/glsl/tests/attribute-04.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec4 */
-attribute ivec4 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-05.glsl b/src/glsl/tests/attribute-05.glsl
deleted file mode 100644
index 18822c7..0000000
--- a/src/glsl/tests/attribute-05.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bool */
-attribute bool i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-06.glsl b/src/glsl/tests/attribute-06.glsl
deleted file mode 100644
index f18027b..0000000
--- a/src/glsl/tests/attribute-06.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec2 */
-attribute bvec2 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-07.glsl b/src/glsl/tests/attribute-07.glsl
deleted file mode 100644
index 0af13ba..0000000
--- a/src/glsl/tests/attribute-07.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec3 */
-attribute bvec3 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-08.glsl b/src/glsl/tests/attribute-08.glsl
deleted file mode 100644
index b069c04..0000000
--- a/src/glsl/tests/attribute-08.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec4 */
-attribute bvec4 i;
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-09.glsl b/src/glsl/tests/attribute-09.glsl
deleted file mode 100644
index 6a60724..0000000
--- a/src/glsl/tests/attribute-09.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have array type in GLSL 1.10 */
-attribute vec4 i[10];
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-10.glsl b/src/glsl/tests/attribute-10.glsl
deleted file mode 100644
index 6f5ef63..0000000
--- a/src/glsl/tests/attribute-10.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 120
-/* FAIL - attribute cannot have array type in GLSL 1.20 */
-attribute vec4 i[10];
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-11.glsl b/src/glsl/tests/attribute-11.glsl
deleted file mode 100644
index 47cb5a0..0000000
--- a/src/glsl/tests/attribute-11.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 130
-/* FAIL - attribute cannot have array type in GLSL 1.30 */
-attribute vec4 i[10];
-
-void main()
-{
-  gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/condition-01.glsl b/src/glsl/tests/condition-01.glsl
deleted file mode 100644
index d89c313..0000000
--- a/src/glsl/tests/condition-01.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - :? condition is not bool scalar */
-
-uniform bvec4 a;
-
-void main()
-{
-  gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-02.glsl b/src/glsl/tests/condition-02.glsl
deleted file mode 100644
index cbd0e18..0000000
--- a/src/glsl/tests/condition-02.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - :? condition is not bool scalar */
-
-uniform float a;
-
-void main()
-{
-  gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-03.glsl b/src/glsl/tests/condition-03.glsl
deleted file mode 100644
index 9af5d7a..0000000
--- a/src/glsl/tests/condition-03.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* PASS */
-
-uniform bool a;
-
-void main()
-{
-  gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-04.glsl b/src/glsl/tests/condition-04.glsl
deleted file mode 100644
index f440b7e..0000000
--- a/src/glsl/tests/condition-04.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - type of second two operands must match */
-
-uniform bool a;
-
-void main()
-{
-  gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/condition-05.glsl b/src/glsl/tests/condition-05.glsl
deleted file mode 100644
index 3dff18f..0000000
--- a/src/glsl/tests/condition-05.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-/* PASS */
-
-uniform bool a;
-uniform int b;
-
-void main()
-{
-  float x;
-
-  x = (a) ? 2.0 : b;
-  gl_Position = vec4(x);
-}
diff --git a/src/glsl/tests/constructor-01.glsl b/src/glsl/tests/constructor-01.glsl
deleted file mode 100644
index fdfaf89..0000000
--- a/src/glsl/tests/constructor-01.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* PASS */
-
-void main()
-{
-  gl_Position = vec4(1.0, 1.0, 1.0, 0.0);;
-}
diff --git a/src/glsl/tests/constructor-02.glsl b/src/glsl/tests/constructor-02.glsl
deleted file mode 100644
index 47acbe9..0000000
--- a/src/glsl/tests/constructor-02.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - cannot construct samplers */
-void main()
-{
-  int i;
-
-  i = sampler2D(0);
-}
diff --git a/src/glsl/tests/constructor-03.glsl b/src/glsl/tests/constructor-03.glsl
deleted file mode 100644
index 07ec225..0000000
--- a/src/glsl/tests/constructor-03.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-/* FAIL - cannot construct a matrix from a matrix in GLSL 1.10 */
-
-uniform mat2 a;
-
-void main()
-{
-  mat2 b;
-
-  b = mat2(a);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-04.glsl b/src/glsl/tests/constructor-04.glsl
deleted file mode 100644
index 19d5e01..0000000
--- a/src/glsl/tests/constructor-04.glsl
+++ /dev/null
@@ -1,14 +0,0 @@
-#version 120
-/* FAIL - matrix must be only parameter to matrix constructor */
-
-uniform mat2 a;
-uniform float x;
-
-void main()
-{
-  mat2 b;
-
-  b = mat2(a, x);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-05.glsl b/src/glsl/tests/constructor-05.glsl
deleted file mode 100644
index 9c74f75..0000000
--- a/src/glsl/tests/constructor-05.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* FAIL - too few components supplied to constructor */
-
-uniform vec2 a;
-uniform float x;
-
-void main()
-{
-  mat2 b;
-
-  b = mat2(a, x);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-06.glsl b/src/glsl/tests/constructor-06.glsl
deleted file mode 100644
index d77a5f9..0000000
--- a/src/glsl/tests/constructor-06.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat2 a;
-
-void main()
-{
-  mat2 b;
-
-  b = mat2(a);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-07.glsl b/src/glsl/tests/constructor-07.glsl
deleted file mode 100644
index 9232250..0000000
--- a/src/glsl/tests/constructor-07.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* PASS */
-
-uniform ivec2 a;
-uniform ivec2 b;
-
-void main()
-{
-  mat2 c;
-
-  c = mat2(a, b);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-08.glsl b/src/glsl/tests/constructor-08.glsl
deleted file mode 100644
index 27153f0..0000000
--- a/src/glsl/tests/constructor-08.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* PASS */
-
-uniform float a;
-uniform float b;
-
-void main()
-{
-  ivec2 c;
-
-  c = ivec2(a, b);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-09.glsl b/src/glsl/tests/constructor-09.glsl
deleted file mode 100644
index 1985699..0000000
--- a/src/glsl/tests/constructor-09.glsl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* PASS */
-
-uniform int a;
-uniform float b;
-uniform bool c;
-
-void main()
-{
-  float x;
-  int y;
-  bool z;
-
-  x = float(a);
-  x = float(b);
-  x = float(c);
-
-  y = int(a);
-  y = int(b);
-  y = int(c);
-
-  z = bool(a);
-  z = bool(b);
-  z = bool(c);
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/function-01.glsl b/src/glsl/tests/function-01.glsl
deleted file mode 100644
index 0eaa239..0000000
--- a/src/glsl/tests/function-01.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* FAIL - no function named 'foo' exists */
-
-vec4 bar(float x, float y, float z, float w)
-{
-  vec4 v;
-  v.x = x;
-  v.y = y;
-  v.z = z;
-  v.w = w;
-  return v;
-}
-
-void main()
-{
-  gl_Position = foo(1.0, 1.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/function-02.glsl b/src/glsl/tests/function-02.glsl
deleted file mode 100644
index 941fcc1..0000000
--- a/src/glsl/tests/function-02.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* FAIL - no version of 'foo' matches the call to 'foo' */
-
-vec4 foo(float x, float y, float z, float w)
-{
-  vec4 v;
-  v.x = x;
-  v.y = y;
-  v.z = z;
-  v.w = w;
-  return v;
-}
-
-void main()
-{
-  gl_Position = foo(1.0, 1.0, 1.0);
-}
diff --git a/src/glsl/tests/function-03.glsl b/src/glsl/tests/function-03.glsl
deleted file mode 100644
index b0da42f..0000000
--- a/src/glsl/tests/function-03.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* PASS */
-
-vec4 foo(in float x, in float y, float z, float w)
-{
-  vec4 v;
-  v.x = x;
-  v.y = y;
-  v.z = z;
-  v.w = w;
-  return v;
-}
-
-void main()
-{
-  gl_Position = foo(1.0, 1.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/function-04.glsl b/src/glsl/tests/function-04.glsl
deleted file mode 100644
index dfc0d2b..0000000
--- a/src/glsl/tests/function-04.glsl
+++ /dev/null
@@ -1,15 +0,0 @@
-/* FAIL - type mismatch in assignment */
-
-vec3 foo(float x, float y, float z)
-{
-  vec3 v;
-  v.x = x;
-  v.y = y;
-  v.z = z;
-  return v;
-}
-
-void main()
-{
-  gl_Position = foo(1.0, 1.0, 1.0);
-}
diff --git a/src/glsl/tests/function-05.glsl b/src/glsl/tests/function-05.glsl
deleted file mode 100644
index 43365bf..0000000
--- a/src/glsl/tests/function-05.glsl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* PASS */
-
-vec4 foo(in float x, in float y, float z, float w)
-{
-  vec4 v;
-  v.x = x;
-  v.y = y;
-  v.z = z;
-  v.w = w;
-  return v;
-}
-
-vec4 foo(in float x)
-{
-   vec4 v;
-   v.x = x;
-   v.y = x;
-   v.z = x;
-   v.w = x;
-}
-
-void main()
-{
-  gl_Position = foo(1.0, 1.0, 1.0, 0.0);
-  gl_Position = foo(2.0);
-}
diff --git a/src/glsl/tests/if-01.glsl b/src/glsl/tests/if-01.glsl
deleted file mode 100644
index ca9abd5..0000000
--- a/src/glsl/tests/if-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - if-statement condition is not bool scalar */
-
-uniform bvec4 a;
-
-void main()
-{
-  if (a)
-    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
-  else
-    gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-02.glsl b/src/glsl/tests/if-02.glsl
deleted file mode 100644
index 7adccea..0000000
--- a/src/glsl/tests/if-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - if-statement condition is not bool scalar */
-
-uniform float a;
-
-void main()
-{
-  if (a)
-    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
-  else
-    gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-03.glsl b/src/glsl/tests/if-03.glsl
deleted file mode 100644
index 179618c..0000000
--- a/src/glsl/tests/if-03.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-uniform bool a;
-
-void main()
-{
-  if (a)
-    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
-  else
-    gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-04.glsl b/src/glsl/tests/if-04.glsl
deleted file mode 100644
index 7b711fb..0000000
--- a/src/glsl/tests/if-04.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-uniform bvec4 a;
-
-void main()
-{
-  if (a.x)
-    gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
-  else
-    gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/matrix-01.glsl b/src/glsl/tests/matrix-01.glsl
deleted file mode 100644
index f46416c..0000000
--- a/src/glsl/tests/matrix-01.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat2x3 m;
-}
diff --git a/src/glsl/tests/matrix-02.glsl b/src/glsl/tests/matrix-02.glsl
deleted file mode 100644
index 0630722..0000000
--- a/src/glsl/tests/matrix-02.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat2x4 m;
-}
diff --git a/src/glsl/tests/matrix-03.glsl b/src/glsl/tests/matrix-03.glsl
deleted file mode 100644
index 925dc80..0000000
--- a/src/glsl/tests/matrix-03.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat3x2 m;
-}
diff --git a/src/glsl/tests/matrix-04.glsl b/src/glsl/tests/matrix-04.glsl
deleted file mode 100644
index 5275619..0000000
--- a/src/glsl/tests/matrix-04.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat3x4 m;
-}
diff --git a/src/glsl/tests/matrix-05.glsl b/src/glsl/tests/matrix-05.glsl
deleted file mode 100644
index 74e1fd2..0000000
--- a/src/glsl/tests/matrix-05.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat4x2 m;
-}
diff --git a/src/glsl/tests/matrix-06.glsl b/src/glsl/tests/matrix-06.glsl
deleted file mode 100644
index 0a512b8..0000000
--- a/src/glsl/tests/matrix-06.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
-    mat4x3 m;
-}
diff --git a/src/glsl/tests/matrix-07.glsl b/src/glsl/tests/matrix-07.glsl
deleted file mode 100644
index 0b59aa6..0000000
--- a/src/glsl/tests/matrix-07.glsl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* PASS */
-
-uniform mat2 a;
-uniform mat2 b;
-uniform mat2 c;
-uniform mat2 d;
-uniform mat3 e;
-uniform mat3 f;
-uniform mat3 g;
-uniform mat3 h;
-uniform mat4 i;
-uniform mat4 j;
-uniform mat4 k;
-uniform mat4 l;
-
-void main()
-{
-    mat2 x;
-    mat3 y;
-    mat4 z;
-
-    x = a * b + c / d;
-    y = e * f + g / h;
-    z = i * j + k / l;
-
-    gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-08.glsl b/src/glsl/tests/matrix-08.glsl
deleted file mode 100644
index 38138d2..0000000
--- a/src/glsl/tests/matrix-08.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat2x3 a;
-uniform mat3x2 b;
-uniform mat3x3 c;
-uniform mat3x3 d;
-
-void main()
-{
-    mat3x3 x;
-
-    /* Multiplying a 2 column, 3 row matrix with a 3 column, 2 row matrix
-     * results in a 3 column, 3 row matrix.
-     */
-    x = (a * b) + c / d;
-
-    gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-09.glsl b/src/glsl/tests/matrix-09.glsl
deleted file mode 100644
index 18afbca..0000000
--- a/src/glsl/tests/matrix-09.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - matrix-to-matrix constructors are not available in GLSL 1.10 */
-
-uniform mat3 a;
-
-void main()
-{
-    mat2 m;
-
-    m = mat2(a);
-    gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-10.glsl b/src/glsl/tests/matrix-10.glsl
deleted file mode 100644
index 20b5518..0000000
--- a/src/glsl/tests/matrix-10.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat3 a;
-
-void main()
-{
-    mat2 m;
-
-    m = mat2(a);
-    gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/parameters-01.glsl b/src/glsl/tests/parameters-01.glsl
deleted file mode 100644
index b485106..0000000
--- a/src/glsl/tests/parameters-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL: redefinition of a() */
-
-void a()
-{
-	;	
-}
-
-void a()
-{
-	;	
-}
diff --git a/src/glsl/tests/parameters-02.glsl b/src/glsl/tests/parameters-02.glsl
deleted file mode 100644
index 7ff5f59..0000000
--- a/src/glsl/tests/parameters-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-void a()
-{
-	;	
-}
-
-void a(float x)
-{
-	;	
-}
diff --git a/src/glsl/tests/parameters-03.glsl b/src/glsl/tests/parameters-03.glsl
deleted file mode 100644
index 7ec30f8..0000000
--- a/src/glsl/tests/parameters-03.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-/* FAIL - x is redeclared in the function body at the same scope as the
- *        parameter
- */
-void a(float x, float y)
-{
-	float x;
-
-	x = y;
-}
diff --git a/src/glsl/tests/qualifier-01.glsl b/src/glsl/tests/qualifier-01.glsl
deleted file mode 100644
index 54ec357..0000000
--- a/src/glsl/tests/qualifier-01.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* FAIL - inout only allowed in parameter list */
-inout vec4 foo;
diff --git a/src/glsl/tests/qualifier-02.glsl b/src/glsl/tests/qualifier-02.glsl
deleted file mode 100644
index b635d52..0000000
--- a/src/glsl/tests/qualifier-02.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - in only allowed in parameter list in GLSL 1.10 */
-in foo;
diff --git a/src/glsl/tests/qualifier-03.glsl b/src/glsl/tests/qualifier-03.glsl
deleted file mode 100644
index 7e44803..0000000
--- a/src/glsl/tests/qualifier-03.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - out only allowed in parameter list in GLSL 1.10 */
-out vec4 foo;
diff --git a/src/glsl/tests/qualifier-04.glsl b/src/glsl/tests/qualifier-04.glsl
deleted file mode 100644
index d03cafc..0000000
--- a/src/glsl/tests/qualifier-04.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* PASS */
-in vec4 foo;
diff --git a/src/glsl/tests/qualifier-05.glsl b/src/glsl/tests/qualifier-05.glsl
deleted file mode 100644
index 15281f3..0000000
--- a/src/glsl/tests/qualifier-05.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* PASS */
-out vec4 foo;
diff --git a/src/glsl/tests/qualifier-06.glsl b/src/glsl/tests/qualifier-06.glsl
deleted file mode 100644
index 1907a08..0000000
--- a/src/glsl/tests/qualifier-06.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - in only allowed in parameter list in GLSL 1.10 */
-void main()
-{
-  in vec4 foo;
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/qualifier-07.glsl b/src/glsl/tests/qualifier-07.glsl
deleted file mode 100644
index 12568a5..0000000
--- a/src/glsl/tests/qualifier-07.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - out only allowed in parameter list in GLSL 1.10 */
-void main()
-{
-  out vec4 foo;
-
-  gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/swiz-01.glsl b/src/glsl/tests/swiz-01.glsl
deleted file mode 100644
index 3268fa1..0000000
--- a/src/glsl/tests/swiz-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-#version 120
-
-void main()
-{
-	float a;
-	vec4 b;
-
-	b.x = 6.0;
-	a = b.x;
-}
diff --git a/src/glsl/tests/swiz-02.glsl b/src/glsl/tests/swiz-02.glsl
deleted file mode 100644
index e3f043c..0000000
--- a/src/glsl/tests/swiz-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL: assignment of a vec2 to a float */
-#version 120
-
-void main()
-{
-	float a;
-	vec4 b;
-
-	b.x = 6.0;
-	a = b.xy;
-}
diff --git a/src/glsl/tests/void-01.glsl b/src/glsl/tests/void-01.glsl
deleted file mode 100644
index 5719edc..0000000
--- a/src/glsl/tests/void-01.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - cannot declare a variable as having type `void' */
-void foo;
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
deleted file mode 100644
index 0386a14..0000000
--- a/src/mesa/main/compiler.h
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.5
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \file compiler.h
- * Compiler-related stuff.
- */
-
-
-#ifndef COMPILER_H
-#define COMPILER_H
-
-
-#include <assert.h>
-#include <ctype.h>
-#if defined(__alpha__) && defined(CCPML)
-#include <cpml.h> /* use Compaq's Fast Math Library on Alpha */
-#else
-#include <math.h>
-#endif
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#if defined(__linux__) && defined(__i386__)
-//#include <fpu_control.h>
-#endif
-#include <float.h>
-#include <stdarg.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * Get standard integer types
- */
-#if defined(_MSC_VER)
-   typedef __int8             int8_t;
-   typedef unsigned __int8    uint8_t;
-   typedef __int16            int16_t;
-   typedef unsigned __int16   uint16_t;
-   typedef __int32            int32_t;
-   typedef unsigned __int32   uint32_t;
-   typedef __int64            int64_t;
-   typedef unsigned __int64   uint64_t;
-
-#  if defined(_WIN64)
-     typedef __int64            intptr_t;
-     typedef unsigned __int64   uintptr_t;
-#  else
-     typedef __int32            intptr_t;
-     typedef unsigned __int32   uintptr_t;
-#  endif
-
-#  define INT64_C(__val) __val##i64
-#  define UINT64_C(__val) __val##ui64
-#else
-#  include <stdint.h>
-#endif
-
-
-/**
-  * Sun compilers define __i386 instead of the gcc-style __i386__
- */
-#ifdef __SUNPRO_C
-# if !defined(__i386__) && defined(__i386)
-#  define __i386__
-# elif !defined(__amd64__) && defined(__amd64)
-#  define __amd64__
-# elif !defined(__sparc__) && defined(__sparc)
-#  define __sparc__
-# endif
-# if !defined(__volatile)
-#  define __volatile volatile
-# endif
-#endif
-
-
-/**
- * finite macro.
- */
-#if defined(_MSC_VER)
-#  define finite _finite
-#elif defined(__WATCOMC__)
-#  define finite _finite
-#endif
-
-
-/**
- * Disable assorted warnings
- */
-#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
-#  if !defined(__GNUC__) /* mingw environment */
-#    pragma warning( disable : 4068 ) /* unknown pragma */
-#    pragma warning( disable : 4710 ) /* function 'foo' not inlined */
-#    pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
-#    pragma warning( disable : 4127 ) /* conditional expression is constant */
-#    if defined(MESA_MINWARN)
-#      pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-#      pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-#      pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-#      pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
-#      pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-#    endif
-#  endif
-#endif
-#if defined(__WATCOMC__)
-#  pragma disable_message(201) /* Disable unreachable code warnings */
-#endif
-
-
-
-/**
- * Function inlining
- */
-#if defined(__GNUC__)
-#  define INLINE __inline__
-#elif defined(__MSC__)
-#  define INLINE __inline
-#elif defined(_MSC_VER)
-#  define INLINE __inline
-#elif defined(__ICL)
-#  define INLINE __inline
-#elif defined(__INTEL_COMPILER)
-#  define INLINE inline
-#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
-#  define INLINE __inline
-#elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
-#  define INLINE inline
-#  define __inline inline
-#  define __inline__ inline
-#elif (__STDC_VERSION__ >= 199901L) /* C99 */
-#  define INLINE inline
-#else
-#  define INLINE
-#endif
-
-
-/**
- * PUBLIC/USED macros
- *
- * If we build the library with gcc's -fvisibility=hidden flag, we'll
- * use the PUBLIC macro to mark functions that are to be exported.
- *
- * We also need to define a USED attribute, so the optimizer doesn't 
- * inline a static function that we later use in an alias. - ajax
- */
-#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-#  define PUBLIC __attribute__((visibility("default")))
-#  define USED __attribute__((used))
-#else
-#  define PUBLIC
-#  define USED
-#endif
-
-
-/**
- * Some compilers don't like some of Mesa's const usage.  In those places use
- * CONST instead of const.  Pass -DNO_CONST to compilers where this matters.
- */
-#ifdef NO_CONST
-#  define CONST
-#else
-#  define CONST const
-#endif
-
-
-/**
- * __builtin_expect macros
- */
-#if !defined(__GNUC__)
-#  define __builtin_expect(x, y) x
-#endif
-
-#ifdef __GNUC__
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#else
-#define likely(x) !!(x)
-#define unlikely(x) !!(x)
-#endif
-
-/**
- * The __FUNCTION__ gcc variable is generally only used for debugging.
- * If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
- * Don't define it if using a newer Windows compiler.
- */
-#ifndef __FUNCTION__
-# if defined(__VMS)
-#  define __FUNCTION__ "VMS$NL:"
-# elif !defined(__GNUC__) && !defined(__xlC__) &&	\
-      (!defined(_MSC_VER) || _MSC_VER < 1300)
-#  if (__STDC_VERSION__ >= 199901L) /* C99 */ || \
-    (defined(__SUNPRO_C) && defined(__C99FEATURES__))
-#   define __FUNCTION__ __func__
-#  else
-#   define __FUNCTION__ "<unknown>"
-#  endif
-# endif
-#endif
-#ifndef __func__
-#  if (__STDC_VERSION__ >= 199901L) || \
-      (defined(__SUNPRO_C) && defined(__C99FEATURES__))
-       /* __func__ is part of C99 */
-#  elif defined(_MSC_VER)
-#    if _MSC_VER >= 1300
-#      define __func__ __FUNCTION__
-#    else
-#      define __func__ "<unknown>"
-#    endif
-#  endif
-#endif
-
-
-/**
- * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN, and CPU_TO_LE32.
- * Do not use these unless absolutely necessary!
- * Try to use a runtime test instead.
- * For now, only used by some DRI hardware drivers for color/texel packing.
- */
-#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
-#if defined(__linux__)
-#include <byteswap.h>
-#define CPU_TO_LE32( x )	bswap_32( x )
-#elif defined(__APPLE__)
-#include <CoreFoundation/CFByteOrder.h>
-#define CPU_TO_LE32( x )	CFSwapInt32HostToLittle( x )
-#elif (defined(_AIX) || defined(__blrts))
-static INLINE GLuint CPU_TO_LE32(GLuint x)
-{
-   return (((x & 0x000000ff) << 24) |
-           ((x & 0x0000ff00) <<  8) |
-           ((x & 0x00ff0000) >>  8) |
-           ((x & 0xff000000) >> 24));
-}
-#else /*__linux__ */
-#include <sys/endian.h>
-#define CPU_TO_LE32( x )	bswap32( x )
-#endif /*__linux__*/
-#define MESA_BIG_ENDIAN 1
-#else
-#define CPU_TO_LE32( x )	( x )
-#define MESA_LITTLE_ENDIAN 1
-#endif
-#define LE32_TO_CPU( x )	CPU_TO_LE32( x )
-
-
-
-#if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP)
-#define CAPI _cdecl
-#endif
-
-
-/**
- * Create a macro so that asm functions can be linked into compilers other
- * than GNU C
- */
-#ifndef _ASMAPI
-#if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/
-#define _ASMAPI __cdecl
-#else
-#define _ASMAPI
-#endif
-#ifdef	PTR_DECL_IN_FRONT
-#define	_ASMAPIP * _ASMAPI
-#else
-#define	_ASMAPIP _ASMAPI *
-#endif
-#endif
-
-#ifdef USE_X86_ASM
-#define _NORMAPI _ASMAPI
-#define _NORMAPIP _ASMAPIP
-#else
-#define _NORMAPI
-#define _NORMAPIP *
-#endif
-
-
-/* This is a macro on IRIX */
-#ifdef _P
-#undef _P
-#endif
-
-
-/* Turn off macro checking systems used by other libraries */
-#ifdef CHECK
-#undef CHECK
-#endif
-
-
-/**
- * ASSERT macro
- */
-#if !defined(_WIN32_WCE)
-#if defined(BUILD_FOR_SNAP) && defined(CHECKED)
-#  define ASSERT(X)   _CHECK(X) 
-#elif defined(DEBUG)
-#  define ASSERT(X)   assert(X)
-#else
-#  define ASSERT(X)
-#endif
-#endif
-
-#if (__GNUC__ >= 3)
-#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
-#else
-#define PRINTFLIKE(f, a)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-
-/**
- * LONGSTRING macro
- * gcc -pedantic warns about long string literals, LONGSTRING silences that.
- */
-#if !defined(__GNUC__)
-# define LONGSTRING
-#else
-# define LONGSTRING __extension__
-#endif
-
-
-#ifndef M_PI
-#define M_PI (3.1415926536)
-#endif
-
-#ifndef M_E
-#define M_E (2.7182818284590452354)
-#endif
-
-#ifndef M_LOG2E
-#define M_LOG2E     (1.4426950408889634074)
-#endif
-
-#ifndef ONE_DIV_LN2
-#define ONE_DIV_LN2 (1.442695040888963456)
-#endif
-
-#ifndef ONE_DIV_SQRT_LN2
-#define ONE_DIV_SQRT_LN2 (1.201122408786449815)
-#endif
-
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP 128
-#endif
-
-
-/**
- * USE_IEEE: Determine if we're using IEEE floating point
- */
-#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
-    defined(__s390x__) || defined(__powerpc__) || \
-    defined(__x86_64__) || \
-    defined(ia64) || defined(__ia64__) || \
-    defined(__hppa__) || defined(hpux) || \
-    defined(__mips) || defined(_MIPS_ARCH) || \
-    defined(__arm__) || \
-    defined(__sh__) || defined(__m32r__) || \
-    (defined(__sun) && defined(_IEEE_754)) || \
-    (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
-#define USE_IEEE
-#define IEEE_ONE 0x3f800000
-#endif
-
-
-/**
- * START/END_FAST_MATH macros:
- *
- * START_FAST_MATH: Set x86 FPU to faster, 32-bit precision mode (and save
- *                  original mode to a temporary).
- * END_FAST_MATH: Restore x86 FPU to original mode.
- */
-#if defined(__GNUC__) && defined(__i386__)
-/*
- * Set the x86 FPU control word to guarentee only 32 bits of precision
- * are stored in registers.  Allowing the FPU to store more introduces
- * differences between situations where numbers are pulled out of memory
- * vs. situations where the compiler is able to optimize register usage.
- *
- * In the worst case, we force the compiler to use a memory access to
- * truncate the float, by specifying the 'volatile' keyword.
- */
-/* Hardware default: All exceptions masked, extended double precision,
- * round to nearest (IEEE compliant):
- */
-#define DEFAULT_X86_FPU		0x037f
-/* All exceptions masked, single precision, round to nearest:
- */
-#define FAST_X86_FPU		0x003f
-/* The fldcw instruction will cause any pending FP exceptions to be
- * raised prior to entering the block, and we clear any pending
- * exceptions before exiting the block.  Hence, asm code has free
- * reign over the FPU while in the fast math block.
- */
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x)						\
-do {									\
-   static GLuint mask = DEFAULT_X86_FPU;				\
-   __asm__ ( "fnstcw %0" : "=m" (*&(x)) );				\
-   __asm__ ( "fldcw %0" : : "m" (mask) );				\
-} while (0)
-#else
-#define START_FAST_MATH(x)						\
-do {									\
-   static GLuint mask = FAST_X86_FPU;					\
-   __asm__ ( "fnstcw %0" : "=m" (*&(x)) );				\
-   __asm__ ( "fldcw %0" : : "m" (mask) );				\
-} while (0)
-#endif
-/* Restore original FPU mode, and clear any exceptions that may have
- * occurred in the FAST_MATH block.
- */
-#define END_FAST_MATH(x)						\
-do {									\
-   __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) );			\
-} while (0)
-
-#elif defined(__WATCOMC__) && defined(__386__)
-#define DEFAULT_X86_FPU		0x037f /* See GCC comments above */
-#define FAST_X86_FPU		0x003f /* See GCC comments above */
-void _watcom_start_fast_math(unsigned short *x,unsigned short *mask);
-#pragma aux _watcom_start_fast_math =                                   \
-   "fnstcw  word ptr [eax]"                                             \
-   "fldcw   word ptr [ecx]"                                             \
-   parm [eax] [ecx]                                                     \
-   modify exact [];
-void _watcom_end_fast_math(unsigned short *x);
-#pragma aux _watcom_end_fast_math =                                     \
-   "fnclex"                                                             \
-   "fldcw   word ptr [eax]"                                             \
-   parm [eax]                                                           \
-   modify exact [];
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x)                                              \
-do {                                                                    \
-   static GLushort mask = DEFAULT_X86_FPU;	                        \
-   _watcom_start_fast_math(&x,&mask);                                   \
-} while (0)
-#else
-#define START_FAST_MATH(x)                                              \
-do {                                                                    \
-   static GLushort mask = FAST_X86_FPU;                                 \
-   _watcom_start_fast_math(&x,&mask);                                   \
-} while (0)
-#endif
-#define END_FAST_MATH(x)  _watcom_end_fast_math(&x)
-
-#elif defined(_MSC_VER) && defined(_M_IX86)
-#define DEFAULT_X86_FPU		0x037f /* See GCC comments above */
-#define FAST_X86_FPU		0x003f /* See GCC comments above */
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x) do {\
-	static GLuint mask = DEFAULT_X86_FPU;\
-	__asm fnstcw word ptr [x]\
-	__asm fldcw word ptr [mask]\
-} while(0)
-#else
-#define START_FAST_MATH(x) do {\
-	static GLuint mask = FAST_X86_FPU;\
-	__asm fnstcw word ptr [x]\
-	__asm fldcw word ptr [mask]\
-} while(0)
-#endif
-#define END_FAST_MATH(x) do {\
-	__asm fnclex\
-	__asm fldcw word ptr [x]\
-} while(0)
-
-#else
-#define START_FAST_MATH(x)  x = 0
-#define END_FAST_MATH(x)  (void)(x)
-#endif
-
-
-#ifndef Elements
-#define Elements(x) (sizeof(x)/sizeof(*(x)))
-#endif
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* COMPILER_H */
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
deleted file mode 100644
index fffb1a7..0000000
--- a/src/mesa/main/config.h
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.5
- *
- * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
- * Copyright (C) 2008  VMware, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file config.h
- * Tunable configuration parameters.
- */
-
-#ifndef MESA_CONFIG_H_INCLUDED
-#define MESA_CONFIG_H_INCLUDED
-
-
-/**
- * \name OpenGL implementation limits
- */
-/*@{*/
-
-/** Maximum modelview matrix stack depth */
-#define MAX_MODELVIEW_STACK_DEPTH 32
-
-/** Maximum projection matrix stack depth */
-#define MAX_PROJECTION_STACK_DEPTH 32
-
-/** Maximum texture matrix stack depth */
-#define MAX_TEXTURE_STACK_DEPTH 10
-
-/** Maximum color matrix stack depth */
-#define MAX_COLOR_STACK_DEPTH 4
-
-/** Maximum attribute stack depth */
-#define MAX_ATTRIB_STACK_DEPTH 16
-
-/** Maximum client attribute stack depth */
-#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
-
-/** Maximum recursion depth of display list calls */
-#define MAX_LIST_NESTING 64
-
-/** Maximum number of lights */
-#define MAX_LIGHTS 8
-
-/** Maximum user-defined clipping planes */
-#define MAX_CLIP_PLANES 6
-
-/** Maximum pixel map lookup table size */
-#define MAX_PIXEL_MAP_TABLE 256
-
-/** Maximum number of auxillary color buffers */
-#define MAX_AUX_BUFFERS 1
-
-/** Maximum order (degree) of curves */
-#ifdef AMIGA
-#   define MAX_EVAL_ORDER 12
-#else
-#   define MAX_EVAL_ORDER 30
-#endif
-
-/** Maximum Name stack depth */
-#define MAX_NAME_STACK_DEPTH 64
-
-/** Minimum point size */
-#define MIN_POINT_SIZE 1.0
-/** Maximum point size */
-#define MAX_POINT_SIZE 60.0
-/** Point size granularity */
-#define POINT_SIZE_GRANULARITY 0.1
-
-/** Minimum line width */
-#define MIN_LINE_WIDTH 1.0
-/** Maximum line width */
-#define MAX_LINE_WIDTH 10.0
-/** Line width granularity */
-#define LINE_WIDTH_GRANULARITY 0.1
-
-/** Max texture palette / color table size */
-#define MAX_COLOR_TABLE_SIZE 256
-
-/** Max memory to allow for a single texture image (in megabytes) */
-#define MAX_TEXTURE_MBYTES 1024
-
-/** Number of 1D/2D texture mipmap levels */
-#define MAX_TEXTURE_LEVELS 15
-
-/** Number of 3D texture mipmap levels */
-#define MAX_3D_TEXTURE_LEVELS 15
-
-/** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */
-#define MAX_CUBE_TEXTURE_LEVELS 15
-
-/** Maximum rectangular texture size - GL_NV_texture_rectangle */
-#define MAX_TEXTURE_RECT_SIZE 16384
-
-/** Maximum number of layers in a 1D or 2D array texture - GL_MESA_texture_array */
-#define MAX_ARRAY_TEXTURE_LAYERS 64
-
-/**
- * Max number of texture coordinate units.  This mainly just applies to
- * the fixed-function vertex code.  This will be difficult to raise above
- * eight because of various vertex attribute bitvectors.
- */
-#define MAX_TEXTURE_COORD_UNITS 8
-
-/**
- * Max number of texture image units.  Also determines number of texture
- * samplers in shaders.
- */
-#define MAX_TEXTURE_IMAGE_UNITS 16
-
-/**
- * Larger of MAX_TEXTURE_COORD_UNITS and MAX_TEXTURE_IMAGE_UNITS.
- * This value is only used for dimensioning arrays.
- * Either MAX_TEXTURE_COORD_UNITS or MAX_TEXTURE_IMAGE_UNITS (or the
- * corresponding ctx->Const.MaxTextureCoord/ImageUnits fields) should be
- * used almost everywhere else.
- */
-#define MAX_TEXTURE_UNITS ((MAX_TEXTURE_COORD_UNITS > MAX_TEXTURE_IMAGE_UNITS) ? MAX_TEXTURE_COORD_UNITS : MAX_TEXTURE_IMAGE_UNITS)
-
-
-/** 
- * Maximum viewport/image width. Must accomodate all texture sizes too. 
- */
-
-#ifndef MAX_WIDTH
-#   define MAX_WIDTH 16384
-#endif
-/** Maximum viewport/image height */
-#ifndef MAX_HEIGHT
-#   define MAX_HEIGHT 16384
-#endif
-
-/* XXX: hack to prevent stack overflow on windows until all temporary arrays
- * [MAX_WIDTH] are allocated from the heap */
-#ifdef WIN32
-#undef MAX_TEXTURE_LEVELS
-#undef MAX_3D_TEXTURE_LEVELS
-#undef MAX_CUBE_TEXTURE_LEVELS
-#undef MAX_TEXTURE_RECT_SIZE
-#undef MAX_WIDTH
-#undef MAX_HEIGHT
-#define MAX_TEXTURE_LEVELS 13
-#define MAX_3D_TEXTURE_LEVELS 9
-#define MAX_CUBE_TEXTURE_LEVELS 13
-#define MAX_TEXTURE_RECT_SIZE 4096
-#define MAX_WIDTH 4096
-#define MAX_HEIGHT 4096
-#endif
-
-/** Maxmimum size for CVA.  May be overridden by the drivers.  */
-#define MAX_ARRAY_LOCK_SIZE 3000
-
-/** Subpixel precision for antialiasing, window coordinate snapping */
-#define SUB_PIXEL_BITS 4
-
-/** Size of histogram tables */
-#define HISTOGRAM_TABLE_SIZE 256
-
-/** Max convolution filter width */
-#define MAX_CONVOLUTION_WIDTH 9
-/** Max convolution filter height */
-#define MAX_CONVOLUTION_HEIGHT 9
-
-/** For GL_ARB_texture_compression */
-#define MAX_COMPRESSED_TEXTURE_FORMATS 25
-
-/** For GL_EXT_texture_filter_anisotropic */
-#define MAX_TEXTURE_MAX_ANISOTROPY 16.0
-
-/** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */
-#define MAX_TEXTURE_LOD_BIAS 14.0
-
-/** For any program target/extension */
-/*@{*/
-#define MAX_PROGRAM_INSTRUCTIONS       (16 * 1024)
-
-/**
- * Per-program constants (power of two)
- *
- * \c MAX_PROGRAM_LOCAL_PARAMS and \c MAX_UNIFORMS are just the assembly shader
- * and GLSL shader names for the same thing.  They should \b always have the
- * same value.  Each refers to the number of vec4 values supplied as
- * per-program parameters.
- */
-/*@{*/
-#define MAX_PROGRAM_LOCAL_PARAMS       1024
-#define MAX_UNIFORMS                   1024
-/*@}*/
-
-/**
- * Per-context constants (power of two)
- *
- * \note
- * This value should always be less than or equal to \c MAX_PROGRAM_LOCAL_PARAMS
- * and \c MAX_VERTEX_PROGRAM_PARAMS.  Otherwise some applications will make
- * incorrect assumptions.
- */
-#define MAX_PROGRAM_ENV_PARAMS         256
-
-#define MAX_PROGRAM_MATRICES           8
-#define MAX_PROGRAM_MATRIX_STACK_DEPTH 4
-#define MAX_PROGRAM_CALL_DEPTH         8
-#define MAX_PROGRAM_TEMPS              256
-#define MAX_PROGRAM_ADDRESS_REGS       2
-#define MAX_VARYING                    16    /**< number of float[4] vectors */
-#define MAX_SAMPLERS                   MAX_TEXTURE_IMAGE_UNITS
-#define MAX_PROGRAM_INPUTS             32
-#define MAX_PROGRAM_OUTPUTS            64
-/*@}*/
-
-/** For GL_ARB_vertex_program */
-/*@{*/
-#define MAX_VERTEX_PROGRAM_ADDRESS_REGS 1
-#define MAX_VERTEX_PROGRAM_PARAMS       MAX_UNIFORMS
-/*@}*/
-
-/** For GL_ARB_fragment_program */
-/*@{*/
-#define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0
-/*@}*/
-
-/** For GL_NV_vertex_program */
-/*@{*/
-#define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128
-#define MAX_NV_VERTEX_PROGRAM_TEMPS         12
-#define MAX_NV_VERTEX_PROGRAM_PARAMS        96
-#define MAX_NV_VERTEX_PROGRAM_INPUTS        16
-#define MAX_NV_VERTEX_PROGRAM_OUTPUTS       15
-/*@}*/
-
-/** For GL_NV_fragment_program */
-/*@{*/
-#define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 1024 /* 72 for GL_ARB_f_p */
-#define MAX_NV_FRAGMENT_PROGRAM_TEMPS         96
-#define MAX_NV_FRAGMENT_PROGRAM_PARAMS        64
-#define MAX_NV_FRAGMENT_PROGRAM_INPUTS        12
-#define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS        3
-#define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS    2
-/*@}*/
-
-
-/** For GL_ARB_vertex_shader */
-/*@{*/
-#define MAX_VERTEX_GENERIC_ATTRIBS 16
-#define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS
-#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_VERTEX_TEXTURE_IMAGE_UNITS + \
-					  MAX_TEXTURE_IMAGE_UNITS)
-/*@}*/
-
-
-/** For GL_ARB_draw_buffers */
-/*@{*/
-#define MAX_DRAW_BUFFERS 8
-/*@}*/
-
-
-/** For GL_EXT_framebuffer_object */
-/*@{*/
-#define MAX_COLOR_ATTACHMENTS 8
-/*@}*/
-
-/** For GL_ATI_envmap_bump - support bump mapping on first 8 units */
-#define SUPPORTED_ATI_BUMP_UNITS 0xff
-
-/** For GL_EXT_transform_feedback */
-#define MAX_FEEDBACK_ATTRIBS 32
-
-/** For GL_ARB_geometry_shader4 */
-/*@{*/
-#define MAX_GEOMETRY_TEXTURE_IMAGE_UNITS             8
-#define MAX_GEOMETRY_VARYING_COMPONENTS              32
-#define MAX_VERTEX_VARYING_COMPONENTS                32
-#define MAX_GEOMETRY_UNIFORM_COMPONENTS              512
-#define MAX_GEOMETRY_OUTPUT_VERTICES                 256
-#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS         1024
-/*@}*/
-
-
-/**
- * \name Mesa-specific parameters
- */
-/*@{*/
-
-
-/**
- * If non-zero use GLdouble for walking triangle edges, for better accuracy.
- */
-#define TRIANGLE_WALK_DOUBLE 0
-
-
-/**
- * Bits per depth buffer value (max is 32).
- */
-#ifndef DEFAULT_SOFTWARE_DEPTH_BITS
-#define DEFAULT_SOFTWARE_DEPTH_BITS 16
-#endif
-/** Depth buffer data type */
-#if DEFAULT_SOFTWARE_DEPTH_BITS <= 16
-#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
-#else
-#define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint
-#endif
-
-
-/**
- * Bits per stencil value: 8
- */
-#define STENCIL_BITS 8
-
-
-/**
- * Bits per color channel:  8, 16 or 32
- */
-#ifndef CHAN_BITS
-#define CHAN_BITS 8
-#endif
-
-
-/*
- * Color channel component order
- * 
- * \note Changes will almost certainly cause problems at this time.
- */
-#define RCOMP 0
-#define GCOMP 1
-#define BCOMP 2
-#define ACOMP 3
-
-
-/**
- * Maximum number of temporary vertices required for clipping.  
- *
- * Used in array_cache and tnl modules.
- */
-#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1)
-
-
-#endif /* MESA_CONFIG_H_INCLUDED */
diff --git a/src/mesa/main/core.h b/src/mesa/main/core.h
deleted file mode 100644
index 542d95b..0000000
--- a/src/mesa/main/core.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.9
- *
- * Copyright (C) 2010 LunarG Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE 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:
- *    Chia-I Wu <olv@lunarg.com>
- */
-
-
-/**
- * \file core.h
- * The public header of core mesa.
- *
- * This file is the (only) public header of core mesa.  It is supposed to be
- * used by GLX, WGL, and GLSL.  It is important that headers directly or
- * indirectly included here do not perform feature tests (#if FEATURE_xxx).
- */
-
-
-#ifndef CORE_H
-#define CORE_H
-
-
-#include "main/glheader.h"
-#include "main/compiler.h"
-#include "main/imports.h"
-#include "main/macros.h"
-
-#include "main/mtypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* for GLSL */
-#include "program/prog_parameter.h"
-#include "program/prog_uniform.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* CORE_H */
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
deleted file mode 100644
index 17aa897..0000000
--- a/src/mesa/main/debug.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.1
- *
- * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file debug.h
- * Debugging functions.
- * 
- * \if subset
- * (No-op)
- *
- * \endif
- */
-
-
-#ifndef _DEBUG_H
-#define _DEBUG_H
-
-#include "glheader.h"
-#include "mfeatures.h"
-
-struct gl_context;
-struct gl_texture_image;
-
-#if _HAVE_FULL_GL
-
-extern void _mesa_print_tri_caps( const char *name, GLuint flags );
-extern void _mesa_print_enable_flags( const char *msg, GLuint flags );
-extern void _mesa_print_state( const char *msg, GLuint state );
-extern void _mesa_print_info( void );
-extern void _mesa_init_debug( struct gl_context *ctx );
-
-#else
-
-/** No-op */
-#define _mesa_print_state( m, s ) ((void)0)
-
-/** No-op */
-#define _mesa_print_info() ((void)0)
-
-/** No-op */
-#define _mesa_init_debug( c ) ((void)0)
-
-#endif
-
-extern void
-_mesa_dump_texture(GLuint texture, GLuint writeImages);
-
-extern void
-_mesa_dump_textures(GLuint writeImages);
-
-extern void
-_mesa_dump_renderbuffers(GLboolean writeImages);
-
-extern void
-_mesa_dump_color_buffer(const char *filename);
-
-extern void
-_mesa_dump_depth_buffer(const char *filename);
-
-extern void
-_mesa_dump_stencil_buffer(const char *filename);
-
-extern void
-_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img);
-
-#endif
diff --git a/src/mesa/main/get.h b/src/mesa/main/get.h
deleted file mode 100644
index 99a004b..0000000
--- a/src/mesa/main/get.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * \file get.h
- * State query functions.
- */
-
-/*
- * Mesa 3-D graphics library
- * Version:  3.5
- *
- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef GET_H
-#define GET_H
-
-
-#include "glheader.h"
-
-
-extern void GLAPIENTRY
-_mesa_GetBooleanv( GLenum pname, GLboolean *params );
-
-extern void GLAPIENTRY
-_mesa_GetDoublev( GLenum pname, GLdouble *params );
-
-extern void GLAPIENTRY
-_mesa_GetFloatv( GLenum pname, GLfloat *params );
-
-extern void GLAPIENTRY
-_mesa_GetIntegerv( GLenum pname, GLint *params );
-
-extern void GLAPIENTRY
-_mesa_GetInteger64v( GLenum pname, GLint64 *params );
-
-extern void GLAPIENTRY
-_mesa_GetFixedv(GLenum pname, GLfixed *params);
-
-extern void GLAPIENTRY
-_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params );
-
-extern void GLAPIENTRY
-_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params );
-
-extern void GLAPIENTRY
-_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params );
-
-extern void GLAPIENTRY
-_mesa_GetPointerv( GLenum pname, GLvoid **params );
-
-extern const GLubyte * GLAPIENTRY
-_mesa_GetString( GLenum name );
-
-extern const GLubyte * GLAPIENTRY
-_mesa_GetStringi(GLenum name, GLuint index);
-
-extern GLenum GLAPIENTRY
-_mesa_GetError( void );
-
-#endif
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
deleted file mode 100644
index 71d07d5..0000000
--- a/src/mesa/main/glheader.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.5
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \file glheader.h
- * Wrapper for GL/gl.h and GL/glext.h
- */
-
-
-#ifndef GLHEADER_H
-#define GLHEADER_H
-
-
-#ifdef WGLAPI
-#undef WGLAPI
-#endif
-
-
-#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
-#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
-#    define WGLAPI __declspec(dllexport)
-#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-#    define WGLAPI __declspec(dllimport)
-#  else /* for use with static link lib build of Win32 edition only */
-#    define WGLAPI __declspec(dllimport)
-#  endif /* _STATIC_MESA support */
-#endif /* WIN32 / CYGWIN bracket */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include "GLES2/gl2.h"
-#include "GLES2/gl2ext.h"
-
-/**
- * GL_FIXED is defined in glext.h version 64 but these typedefs aren't (yet).
- */
-//typedef int GLfixed;
-typedef int GLclampx;
-typedef double GLdouble;
-typedef unsigned short GLhalfARB;
-typedef uint64_t GLuint64;
-typedef GLdouble GLclampd;
-typedef int GLsizeiptrARB;
-typedef GLuint64 GLuint64EXT;
-typedef int GLintptrARB;
-
-#define GLAPIENTRYP *
-
-#define GL_POLYGON            0x0009
-#define GL_GEOMETRY_SHADER    0x8DD9
-#define GL_SAMPLER_1D                     0x8B5D
-#define GL_SAMPLER_1D_SHADOW              0x8B61
-#define GL_SAMPLER_2D_SHADOW              0x8B62
-#define GL_SAMPLER_3D                     0x8B5F
-
-#define GL_SAMPLER_2D_RECT                0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64
-#define GL_SAMPLER_BUFFER                 0x8DC2
-#define GL_INT_SAMPLER_2D_RECT            0x8DCD
-#define GL_INT_SAMPLER_BUFFER             0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8
-
-#define GL_FLOAT_MAT2x3                   0x8B65
-#define GL_FLOAT_MAT2x4                   0x8B66
-#define GL_FLOAT_MAT3x2                   0x8B67
-#define GL_FLOAT_MAT3x4                   0x8B68
-#define GL_FLOAT_MAT4x2                   0x8B69
-#define GL_FLOAT_MAT4x3                   0x8B6A
-
-#define GL_SAMPLER_1D_ARRAY               0x8DC0
-#define GL_SAMPLER_2D_ARRAY               0x8DC1
-#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3
-#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
-#define GL_UNSIGNED_INT_VEC2              0x8DC6
-#define GL_UNSIGNED_INT_VEC3              0x8DC7
-#define GL_UNSIGNED_INT_VEC4              0x8DC8
-#define GL_INT_SAMPLER_1D                 0x8DC9
-#define GL_INT_SAMPLER_2D                 0x8DCA
-#define GL_INT_SAMPLER_3D                 0x8DCB
-#define GL_INT_SAMPLER_CUBE               0x8DCC
-#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE
-#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1
-#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
-
-#ifndef GL_OES_EGL_image
-typedef void *GLeglImageOES;
-#endif
-
-
-#ifndef GL_OES_point_size_array
-#define GL_POINT_SIZE_ARRAY_OES                                 0x8B9C
-#define GL_POINT_SIZE_ARRAY_TYPE_OES                            0x898A
-#define GL_POINT_SIZE_ARRAY_STRIDE_OES                          0x898B
-#define GL_POINT_SIZE_ARRAY_POINTER_OES                         0x898C
-#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES                  0x8B9F
-#endif
-
-
-#ifndef GL_OES_draw_texture
-#define GL_TEXTURE_CROP_RECT_OES  0x8B9D
-#endif
-
-
-#ifndef GL_PROGRAM_BINARY_LENGTH_OES
-#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
-#endif
-
-/* GLES 2.0 tokens */
-#ifndef GL_RGB565
-#define GL_RGB565 0x8D62
-#endif
-
-#ifndef GL_TEXTURE_GEN_STR_OES
-#define GL_TEXTURE_GEN_STR_OES                                  0x8D60
-#endif
-
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES                                    0x8B90
-#define GL_PALETTE4_RGBA8_OES                                   0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
-#define GL_PALETTE4_RGBA4_OES                                   0x8B93
-#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
-#define GL_PALETTE8_RGB8_OES                                    0x8B95
-#define GL_PALETTE8_RGBA8_OES                                   0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
-#define GL_PALETTE8_RGBA4_OES                                   0x8B98
-#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
-#endif
-
-#ifndef GL_OES_matrix_get
-#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES               0x898D
-#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES              0x898E
-#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES                 0x898F
-#endif
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_SHADER_BINARY_FORMATS            0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS        0x8DF9
-#define GL_SHADER_COMPILER                  0x8DFA
-#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
-#define GL_MAX_VARYING_VECTORS              0x8DFC
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
-#endif
-
-
-
-/**
- * Internal token to represent a GLSL shader program (a collection of
- * one or more shaders that get linked together).  Note that GLSL
- * shaders and shader programs share one name space (one hash table)
- * so we need a value that's different from any of the
- * GL_VERTEX/FRAGMENT/GEOMETRY_PROGRAM tokens.
- */
-#define GL_SHADER_PROGRAM_MESA 0x9999
-
-
-/**
- * Internal token for geometry programs.
- * Use the value for GL_GEOMETRY_PROGRAM_NV for now.
- */
-#define MESA_GEOMETRY_PROGRAM 0x8c26
-
-/* Several fields of struct gl_config can take these as values.  Since
- * GLX header files may not be available everywhere they need to be used,
- * redefine them here.
- */
-#define GLX_NONE                           0x8000
-#define GLX_SLOW_CONFIG                    0x8001
-#define GLX_TRUE_COLOR                     0x8002
-#define GLX_DIRECT_COLOR                   0x8003
-#define GLX_PSEUDO_COLOR                   0x8004
-#define GLX_STATIC_COLOR                   0x8005
-#define GLX_GRAY_SCALE                     0x8006
-#define GLX_STATIC_GRAY                    0x8007
-#define GLX_TRANSPARENT_RGB                0x8008
-#define GLX_TRANSPARENT_INDEX              0x8009
-#define GLX_NON_CONFORMANT_CONFIG          0x800D
-#define GLX_SWAP_EXCHANGE_OML              0x8061
-#define GLX_SWAP_COPY_OML                  0x8062
-#define GLX_SWAP_UNDEFINED_OML             0x8063
-
-#define GLX_DONT_CARE                      0xFFFFFFFF
-
-#endif /* GLHEADER_H */
diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h
deleted file mode 100644
index 4f916f9..0000000
--- a/src/mesa/main/hash.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * \file hash.h
- * Generic hash table. 
- */
-
-/*
- * Mesa 3-D graphics library
- * Version:  6.5.1
- *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef HASH_H
-#define HASH_H
-
-
-#include "glheader.h"
-
-
-extern struct _mesa_HashTable *_mesa_NewHashTable(void);
-
-extern void _mesa_DeleteHashTable(struct _mesa_HashTable *table);
-
-extern void *_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key);
-
-extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data);
-
-extern void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key);
-
-extern void
-_mesa_HashDeleteAll(struct _mesa_HashTable *table,
-                    void (*callback)(GLuint key, void *data, void *userData),
-                    void *userData);
-
-extern void
-_mesa_HashWalk(const struct _mesa_HashTable *table,
-               void (*callback)(GLuint key, void *data, void *userData),
-               void *userData);
-
-extern GLuint _mesa_HashFirstEntry(struct _mesa_HashTable *table);
-
-extern GLuint _mesa_HashNextEntry(const struct _mesa_HashTable *table, GLuint key);
-
-extern void _mesa_HashPrint(const struct _mesa_HashTable *table);
-
-extern GLuint _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys);
-
-extern void _mesa_test_hash_functions(void);
-
-
-#endif
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
deleted file mode 100644
index 991bbc0..0000000
--- a/src/mesa/main/imports.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.5
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \file imports.h
- * Standard C library function wrappers.
- *
- * This file provides wrappers for all the standard C library functions
- * like malloc(), free(), printf(), getenv(), etc.
- */
-
-
-#ifndef IMPORTS_H
-#define IMPORTS_H
-
-
-#include "compiler.h"
-#include "glheader.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**********************************************************************/
-/** Memory macros */
-/*@{*/
-
-/** Allocate \p BYTES bytes */
-#define MALLOC(BYTES)      malloc(BYTES)
-/** Allocate and zero \p BYTES bytes */
-#define CALLOC(BYTES)      calloc(1, BYTES)
-/** Allocate a structure of type \p T */
-#define MALLOC_STRUCT(T)   (struct T *) malloc(sizeof(struct T))
-/** Allocate and zero a structure of type \p T */
-#define CALLOC_STRUCT(T)   (struct T *) calloc(1, sizeof(struct T))
-/** Free memory */
-#define FREE(PTR)          free(PTR)
-
-/*@}*/
-
-
-/*
- * For GL_ARB_vertex_buffer_object we need to treat vertex array pointers
- * as offsets into buffer stores.  Since the vertex array pointer and
- * buffer store pointer are both pointers and we need to add them, we use
- * this macro.
- * Both pointers/offsets are expressed in bytes.
- */
-#define ADD_POINTERS(A, B)  ( (GLubyte *) (A) + (uintptr_t) (B) )
-
-
-/**
- * Sometimes we treat GLfloats as GLints.  On x86 systems, moving a float
- * as a int (thereby using integer registers instead of FP registers) is
- * a performance win.  Typically, this can be done with ordinary casts.
- * But with gcc's -fstrict-aliasing flag (which defaults to on in gcc 3.0)
- * these casts generate warnings.
- * The following union typedef is used to solve that.
- */
-typedef union { GLfloat f; GLint i; } fi_type;
-
-
-
-/**********************************************************************
- * Math macros
- */
-
-#define MAX_GLUSHORT	0xffff
-#define MAX_GLUINT	0xffffffff
-
-/* Degrees to radians conversion: */
-#define DEG2RAD (M_PI/180.0)
-
-
-/***
- *** SQRTF: single-precision square root
- ***/
-#if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */
-#  define SQRTF(X)  _mesa_sqrtf(X)
-#else
-#  define SQRTF(X)  (float) sqrt((float) (X))
-#endif
-
-
-/***
- *** INV_SQRTF: single-precision inverse square root
- ***/
-#if 0
-#define INV_SQRTF(X) _mesa_inv_sqrt(X)
-#else
-#define INV_SQRTF(X) (1.0F / SQRTF(X))  /* this is faster on a P4 */
-#endif
-
-
-/**
- * \name Work-arounds for platforms that lack C99 math functions
- */
-/*@{*/
-#if (!defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE < 600)) && !defined(_ISOC99_SOURCE) \
-   && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) \
-   && (!defined(_MSC_VER) || (_MSC_VER < 1400))
-/*#define acosf(f) ((float) acos(f))
-#define asinf(f) ((float) asin(f))
-#define atan2f(x,y) ((float) atan2(x,y))
-#define atanf(f) ((float) atan(f))
-#define cielf(f) ((float) ciel(f))
-#define cosf(f) ((float) cos(f))
-#define coshf(f) ((float) cosh(f))
-#define expf(f) ((float) exp(f))
-#define exp2f(f) ((float) exp2(f))
-#define floorf(f) ((float) floor(f))
-#define logf(f) ((float) log(f))
-#define log2f(f) ((float) log2(f))
-#define powf(x,y) ((float) pow(x,y))
-#define sinf(f) ((float) sin(f))
-#define sinhf(f) ((float) sinh(f))
-#define sqrtf(f) ((float) sqrt(f))
-#define tanf(f) ((float) tan(f))
-#define tanhf(f) ((float) tanh(f))
-#define acoshf(f) ((float) acosh(f))
-#define asinhf(f) ((float) asinh(f))
-#define atanhf(f) ((float) atanh(f))*/
-#endif
-
-#if defined(_MSC_VER)
-static INLINE float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
-static INLINE float exp2f(float x) { return powf(2.0f, x); }
-static INLINE float log2f(float x) { return logf(x) * 1.442695041f; }
-static INLINE float asinhf(float x) { return logf(x + sqrtf(x * x + 1.0f)); }
-static INLINE float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
-static INLINE float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
-static INLINE int isblank(int ch) { return ch == ' ' || ch == '\t'; }
-#define strtoll(p, e, b) _strtoi64(p, e, b)
-#endif
-/*@}*/
-
-/***
- *** LOG2: Log base 2 of float
- ***/
-#ifdef USE_IEEE
-#if 0
-/* This is pretty fast, but not accurate enough (only 2 fractional bits).
- * Based on code from http://www.stereopsis.com/log2.html
- */
-static INLINE GLfloat LOG2(GLfloat x)
-{
-   const GLfloat y = x * x * x * x;
-   const GLuint ix = *((GLuint *) &y);
-   const GLuint exp = (ix >> 23) & 0xFF;
-   const GLint log2 = ((GLint) exp) - 127;
-   return (GLfloat) log2 * (1.0 / 4.0);  /* 4, because of x^4 above */
-}
-#endif
-/* Pretty fast, and accurate.
- * Based on code from http://www.flipcode.com/totd/
- */
-static INLINE GLfloat LOG2(GLfloat val)
-{
-   fi_type num;
-   GLint log_2;
-   num.f = val;
-   log_2 = ((num.i >> 23) & 255) - 128;
-   num.i &= ~(255 << 23);
-   num.i += 127 << 23;
-   num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3;
-   return num.f + log_2;
-}
-#else
-/*
- * NOTE: log_base_2(x) = log(x) / log(2)
- * NOTE: 1.442695 = 1/log(2).
- */
-#define LOG2(x)  ((GLfloat) (log(x) * 1.442695F))
-#endif
-
-
-/***
- *** IS_INF_OR_NAN: test if float is infinite or NaN
- ***/
-#ifdef USE_IEEE
-static INLINE int IS_INF_OR_NAN( float x )
-{
-   fi_type tmp;
-   tmp.f = x;
-   return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31);
-}
-#elif defined(isfinite)
-#define IS_INF_OR_NAN(x)        (!isfinite(x))
-#elif defined(finite)
-#define IS_INF_OR_NAN(x)        (!finite(x))
-#elif defined(__VMS)
-#define IS_INF_OR_NAN(x)        (!finite(x))
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#define IS_INF_OR_NAN(x)        (!isfinite(x))
-#else
-#define IS_INF_OR_NAN(x)        (!finite(x))
-#endif
-
-
-/***
- *** IS_NEGATIVE: test if float is negative
- ***/
-#if defined(USE_IEEE)
-static INLINE int GET_FLOAT_BITS( float x )
-{
-   fi_type fi;
-   fi.f = x;
-   return fi.i;
-}
-#define IS_NEGATIVE(x) (GET_FLOAT_BITS(x) < 0)
-#else
-#define IS_NEGATIVE(x) (x < 0.0F)
-#endif
-
-
-/***
- *** DIFFERENT_SIGNS: test if two floats have opposite signs
- ***/
-#if defined(USE_IEEE)
-#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
-#else
-/* Could just use (x*y<0) except for the flatshading requirements.
- * Maybe there's a better way?
- */
-#define DIFFERENT_SIGNS(x,y) ((x) * (y) <= 0.0F && (x) - (y) != 0.0F)
-#endif
-
-
-/***
- *** CEILF: ceiling of float
- *** FLOORF: floor of float
- *** FABSF: absolute value of float
- *** LOGF: the natural logarithm (base e) of the value
- *** EXPF: raise e to the value
- *** LDEXPF: multiply value by an integral power of two
- *** FREXPF: extract mantissa and exponent from value
- ***/
-#if defined(__gnu_linux__)
-/* C99 functions */
-#define CEILF(x)   ceilf(x)
-#define FLOORF(x)  floorf(x)
-#define FABSF(x)   fabsf(x)
-#define LOGF(x)    logf(x)
-#define EXPF(x)    expf(x)
-#define LDEXPF(x,y)  ldexpf(x,y)
-#define FREXPF(x,y)  frexpf(x,y)
-#else
-#define CEILF(x)   ((GLfloat) ceil(x))
-#define FLOORF(x)  ((GLfloat) floor(x))
-#define FABSF(x)   ((GLfloat) fabs(x))
-#define LOGF(x)    ((GLfloat) log(x))
-#define EXPF(x)    ((GLfloat) exp(x))
-#define LDEXPF(x,y)  ((GLfloat) ldexp(x,y))
-#define FREXPF(x,y)  ((GLfloat) frexp(x,y))
-#endif
-
-
-/***
- *** IROUND: return (as an integer) float rounded to nearest integer
- ***/
-#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
-static INLINE int iround(float f)
-{
-   int r;
-   __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
-   return r;
-}
-#define IROUND(x)  iround(x)
-#elif defined(USE_X86_ASM) && defined(_MSC_VER)
-static INLINE int iround(float f)
-{
-   int r;
-   _asm {
-	 fld f
-	 fistp r
-	}
-   return r;
-}
-#define IROUND(x)  iround(x)
-#elif defined(__WATCOMC__) && defined(__386__)
-long iround(float f);
-#pragma aux iround =                    \
-	"push   eax"                        \
-	"fistp  dword ptr [esp]"            \
-	"pop    eax"                        \
-	parm [8087]                         \
-	value [eax]                         \
-	modify exact [eax];
-#define IROUND(x)  iround(x)
-#else
-#define IROUND(f)  ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
-#endif
-
-#define IROUND64(f)  ((GLint64) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
-
-/***
- *** IROUND_POS: return (as an integer) positive float rounded to nearest int
- ***/
-#ifdef DEBUG
-#define IROUND_POS(f) (assert((f) >= 0.0F), IROUND(f))
-#else
-#define IROUND_POS(f) (IROUND(f))
-#endif
-
-
-/***
- *** IFLOOR: return (as an integer) floor of float
- ***/
-#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
-/*
- * IEEE floor for computers that round to nearest or even.
- * 'f' must be between -4194304 and 4194303.
- * This floor operation is done by "(iround(f + .5) + iround(f - .5)) >> 1",
- * but uses some IEEE specific tricks for better speed.
- * Contributed by Josh Vanderhoof
- */
-static INLINE int ifloor(float f)
-{
-   int ai, bi;
-   double af, bf;
-   af = (3 << 22) + 0.5 + (double)f;
-   bf = (3 << 22) + 0.5 - (double)f;
-   /* GCC generates an extra fstp/fld without this. */
-   __asm__ ("fstps %0" : "=m" (ai) : "t" (af) : "st");
-   __asm__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st");
-   return (ai - bi) >> 1;
-}
-#define IFLOOR(x)  ifloor(x)
-#elif defined(USE_IEEE)
-static INLINE int ifloor(float f)
-{
-   int ai, bi;
-   double af, bf;
-   fi_type u;
-
-   af = (3 << 22) + 0.5 + (double)f;
-   bf = (3 << 22) + 0.5 - (double)f;
-   u.f = (float) af;  ai = u.i;
-   u.f = (float) bf;  bi = u.i;
-   return (ai - bi) >> 1;
-}
-#define IFLOOR(x)  ifloor(x)
-#else
-static INLINE int ifloor(float f)
-{
-   int i = IROUND(f);
-   return (i > f) ? i - 1 : i;
-}
-#define IFLOOR(x)  ifloor(x)
-#endif
-
-
-/***
- *** ICEIL: return (as an integer) ceiling of float
- ***/
-#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
-/*
- * IEEE ceil for computers that round to nearest or even.
- * 'f' must be between -4194304 and 4194303.
- * This ceil operation is done by "(iround(f + .5) + iround(f - .5) + 1) >> 1",
- * but uses some IEEE specific tricks for better speed.
- * Contributed by Josh Vanderhoof
- */
-static INLINE int iceil(float f)
-{
-   int ai, bi;
-   double af, bf;
-   af = (3 << 22) + 0.5 + (double)f;
-   bf = (3 << 22) + 0.5 - (double)f;
-   /* GCC generates an extra fstp/fld without this. */
-   __asm__ ("fstps %0" : "=m" (ai) : "t" (af) : "st");
-   __asm__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st");
-   return (ai - bi + 1) >> 1;
-}
-#define ICEIL(x)  iceil(x)
-#elif defined(USE_IEEE)
-static INLINE int iceil(float f)
-{
-   int ai, bi;
-   double af, bf;
-   fi_type u;
-   af = (3 << 22) + 0.5 + (double)f;
-   bf = (3 << 22) + 0.5 - (double)f;
-   u.f = (float) af; ai = u.i;
-   u.f = (float) bf; bi = u.i;
-   return (ai - bi + 1) >> 1;
-}
-#define ICEIL(x)  iceil(x)
-#else
-static INLINE int iceil(float f)
-{
-   int i = IROUND(f);
-   return (i < f) ? i + 1 : i;
-}
-#define ICEIL(x)  iceil(x)
-#endif
-
-
-/**
- * Is x a power of two?
- */
-static INLINE int
-_mesa_is_pow_two(int x)
-{
-   return !(x & (x - 1));
-}
-
-/**
- * Round given integer to next higer power of two
- * If X is zero result is undefined.
- *
- * Source for the fallback implementation is
- * Sean Eron Anderson's webpage "Bit Twiddling Hacks"
- * http://graphics.stanford.edu/~seander/bithacks.html
- *
- * When using builtin function have to do some work
- * for case when passed values 1 to prevent hiting
- * undefined result from __builtin_clz. Undefined
- * results would be different depending on optimization
- * level used for build.
- */
-static INLINE int32_t
-_mesa_next_pow_two_32(uint32_t x)
-{
-#if defined(__GNUC__) && \
-	((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
-	uint32_t y = (x != 1);
-	return (1 + y) << ((__builtin_clz(x - y) ^ 31) );
-#else
-	x--;
-	x |= x >> 1;
-	x |= x >> 2;
-	x |= x >> 4;
-	x |= x >> 8;
-	x |= x >> 16;
-	x++;
-	return x;
-#endif
-}
-
-static INLINE int64_t
-_mesa_next_pow_two_64(uint64_t x)
-{
-#if defined(__GNUC__) && \
-	((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
-	uint64_t y = (x != 1);
-	if (sizeof(x) == sizeof(long))
-		return (1 + y) << ((__builtin_clzl(x - y) ^ 63));
-	else
-		return (1 + y) << ((__builtin_clzll(x - y) ^ 63));
-#else
-	x--;
-	x |= x >> 1;
-	x |= x >> 2;
-	x |= x >> 4;
-	x |= x >> 8;
-	x |= x >> 16;
-	x |= x >> 32;
-	x++;
-	return x;
-#endif
-}
-
-
-/**
- * Return 1 if this is a little endian machine, 0 if big endian.
- */
-static INLINE GLboolean
-_mesa_little_endian(void)
-{
-   const GLuint ui = 1; /* intentionally not static */
-   return *((const GLubyte *) &ui);
-}
-
-
-
-/**********************************************************************
- * Functions
- */
-
-extern void *
-_mesa_align_malloc( size_t bytes, unsigned long alignment );
-
-extern void *
-_mesa_align_calloc( size_t bytes, unsigned long alignment );
-
-extern void
-_mesa_align_free( void *ptr );
-
-extern void *
-_mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize,
-                    unsigned long alignment);
-
-extern void *
-_mesa_exec_malloc( GLuint size );
-
-extern void 
-_mesa_exec_free( void *addr );
-
-extern void *
-_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize );
-
-extern void
-_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
-
-extern double
-_mesa_sqrtd(double x);
-
-extern float
-_mesa_sqrtf(float x);
-
-extern float
-_mesa_inv_sqrtf(float x);
-
-extern void
-_mesa_init_sqrt_table(void);
-
-extern int
-_mesa_ffs(int32_t i);
-
-extern int
-_mesa_ffsll(int64_t i);
-
-extern unsigned int
-_mesa_bitcount(unsigned int n);
-
-extern GLhalfARB
-_mesa_float_to_half(float f);
-
-extern float
-_mesa_half_to_float(GLhalfARB h);
-
-
-extern void *
-_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, 
-               int (*compar)(const void *, const void *) );
-
-extern char *
-_mesa_getenv( const char *var );
-
-extern char *
-_mesa_strdup( const char *s );
-
-extern float
-_mesa_strtof( const char *s, char **end );
-
-extern unsigned int
-_mesa_str_checksum(const char *str);
-
-extern int
-_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4);
-
-struct gl_context;
-
-extern void
-_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3);
-
-extern void
-_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
-
-extern void
-_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4);
-
-extern void
-_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
-
-
-#if defined(_MSC_VER) && !defined(snprintf)
-#define snprintf _snprintf
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* IMPORTS_H */
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
deleted file mode 100644
index b2ec0ba..0000000
--- a/src/mesa/main/macros.h
+++ /dev/null
@@ -1,722 +0,0 @@
-/**
- * \file macros.h
- * A collection of useful macros.
- */
-
-/*
- * Mesa 3-D graphics library
- * Version:  6.5.2
- *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef MACROS_H
-#define MACROS_H
-
-#include "imports.h"
-
-
-/**
- * \name Integer / float conversion for colors, normals, etc.
- */
-/*@{*/
-
-/** Convert GLubyte in [0,255] to GLfloat in [0.0,1.0] */
-extern GLfloat _mesa_ubyte_to_float_color_tab[256];
-#define UBYTE_TO_FLOAT(u) _mesa_ubyte_to_float_color_tab[(unsigned int)(u)]
-
-/** Convert GLfloat in [0.0,1.0] to GLubyte in [0,255] */
-#define FLOAT_TO_UBYTE(X)   ((GLubyte) (GLint) ((X) * 255.0F))
-
-
-/** Convert GLbyte in [-128,127] to GLfloat in [-1.0,1.0] */
-#define BYTE_TO_FLOAT(B)    ((2.0F * (B) + 1.0F) * (1.0F/255.0F))
-
-/** Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127] */
-#define FLOAT_TO_BYTE(X)    ( (((GLint) (255.0F * (X))) - 1) / 2 )
-
-
-/** Convert GLbyte in [-128,127] to GLfloat in [-1.0,1.0], texture/fb data */
-#define BYTE_TO_FLOAT_TEX(B)    ((B) == -128 ? -1.0F : (B) * (1.0F/127.0F))
-
-/** Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127], texture/fb data */
-#define FLOAT_TO_BYTE_TEX(X)    ( (GLint) (127.0F * (X)) )
-
-
-/** Convert GLushort in [0,65535] to GLfloat in [0.0,1.0] */
-#define USHORT_TO_FLOAT(S)  ((GLfloat) (S) * (1.0F / 65535.0F))
-
-/** Convert GLfloat in [0.0,1.0] to GLushort in [0, 65535] */
-#define FLOAT_TO_USHORT(X)   ((GLuint) ((X) * 65535.0F))
-
-
-/** Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0] */
-#define SHORT_TO_FLOAT(S)   ((2.0F * (S) + 1.0F) * (1.0F/65535.0F))
-
-/** Convert GLfloat in [-1.0,1.0] to GLshort in [-32768,32767] */
-#define FLOAT_TO_SHORT(X)   ( (((GLint) (65535.0F * (X))) - 1) / 2 )
-
-
-/** Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0], texture/fb data */
-#define SHORT_TO_FLOAT_TEX(S)    ((S) == -32768 ? -1.0F : (S) * (1.0F/32767.0F))
-
-/** Convert GLfloat in [-1.0,1.0] to GLshort in [-32768,32767], texture/fb data */
-#define FLOAT_TO_SHORT_TEX(X)    ( (GLint) (32767.0F * (X)) )
-
-
-/** Convert GLuint in [0,4294967295] to GLfloat in [0.0,1.0] */
-#define UINT_TO_FLOAT(U)    ((GLfloat) ((U) * (1.0F / 4294967295.0)))
-
-/** Convert GLfloat in [0.0,1.0] to GLuint in [0,4294967295] */
-#define FLOAT_TO_UINT(X)    ((GLuint) ((X) * 4294967295.0))
-
-
-/** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */
-#define INT_TO_FLOAT(I)     ((GLfloat) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0)))
-
-/** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647] */
-/* causes overflow:
-#define FLOAT_TO_INT(X)     ( (((GLint) (4294967294.0 * (X))) - 1) / 2 )
-*/
-/* a close approximation: */
-#define FLOAT_TO_INT(X)     ( (GLint) (2147483647.0 * (X)) )
-
-/** Convert GLfloat in [-1.0,1.0] to GLint64 in [-(1<<63),(1 << 63) -1] */
-#define FLOAT_TO_INT64(X)     ( (GLint64) (9223372036854775807.0 * (double)(X)) )
-
-
-/** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0], texture/fb data */
-#define INT_TO_FLOAT_TEX(I)    ((I) == -2147483648 ? -1.0F : (I) * (1.0F/2147483647.0))
-
-/** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647], texture/fb data */
-#define FLOAT_TO_INT_TEX(X)    ( (GLint) (2147483647.0 * (X)) )
-
-
-#define BYTE_TO_UBYTE(b)   ((GLubyte) ((b) < 0 ? 0 : (GLubyte) (b)))
-#define SHORT_TO_UBYTE(s)  ((GLubyte) ((s) < 0 ? 0 : (GLubyte) ((s) >> 7)))
-#define USHORT_TO_UBYTE(s) ((GLubyte) ((s) >> 8))
-#define INT_TO_UBYTE(i)    ((GLubyte) ((i) < 0 ? 0 : (GLubyte) ((i) >> 23)))
-#define UINT_TO_UBYTE(i)   ((GLubyte) ((i) >> 24))
-
-
-#define BYTE_TO_USHORT(b)  ((b) < 0 ? 0 : ((GLushort) (((b) * 65535) / 255)))
-#define UBYTE_TO_USHORT(b) (((GLushort) (b) << 8) | (GLushort) (b))
-#define SHORT_TO_USHORT(s) ((s) < 0 ? 0 : ((GLushort) (((s) * 65535 / 32767))))
-#define INT_TO_USHORT(i)   ((i) < 0 ? 0 : ((GLushort) ((i) >> 15)))
-#define UINT_TO_USHORT(i)  ((i) < 0 ? 0 : ((GLushort) ((i) >> 16)))
-#define UNCLAMPED_FLOAT_TO_USHORT(us, f)  \
-        us = ( (GLushort) IROUND( CLAMP((f), 0.0F, 1.0F) * 65535.0F) )
-#define CLAMPED_FLOAT_TO_USHORT(us, f)  \
-        us = ( (GLushort) IROUND( (f) * 65535.0F) )
-
-#define UNCLAMPED_FLOAT_TO_SHORT(s, f)  \
-        s = ( (GLshort) IROUND( CLAMP((f), -1.0F, 1.0F) * 32767.0F) )
-
-/***
- *** UNCLAMPED_FLOAT_TO_UBYTE: clamp float to [0,1] and map to ubyte in [0,255]
- *** CLAMPED_FLOAT_TO_UBYTE: map float known to be in [0,1] to ubyte in [0,255]
- ***/
-#if defined(USE_IEEE) && !defined(DEBUG)
-#define IEEE_0996 0x3f7f0000	/* 0.996 or so */
-/* This function/macro is sensitive to precision.  Test very carefully
- * if you change it!
- */
-#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F)					\
-        do {								\
-           fi_type __tmp;						\
-           __tmp.f = (F);						\
-           if (__tmp.i < 0)						\
-              UB = (GLubyte) 0;						\
-           else if (__tmp.i >= IEEE_0996)				\
-              UB = (GLubyte) 255;					\
-           else {							\
-              __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F;		\
-              UB = (GLubyte) __tmp.i;					\
-           }								\
-        } while (0)
-#define CLAMPED_FLOAT_TO_UBYTE(UB, F)					\
-        do {								\
-           fi_type __tmp;						\
-           __tmp.f = (F) * (255.0F/256.0F) + 32768.0F;			\
-           UB = (GLubyte) __tmp.i;					\
-        } while (0)
-#else
-#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \
-	ub = ((GLubyte) IROUND(CLAMP((f), 0.0F, 1.0F) * 255.0F))
-#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \
-	ub = ((GLubyte) IROUND((f) * 255.0F))
-#endif
-
-/*@}*/
-
-
-/** Stepping a GLfloat pointer by a byte stride */
-#define STRIDE_F(p, i)  (p = (GLfloat *)((GLubyte *)p + i))
-/** Stepping a GLuint pointer by a byte stride */
-#define STRIDE_UI(p, i)  (p = (GLuint *)((GLubyte *)p + i))
-/** Stepping a GLubyte[4] pointer by a byte stride */
-#define STRIDE_4UB(p, i)  (p = (GLubyte (*)[4])((GLubyte *)p + i))
-/** Stepping a GLfloat[4] pointer by a byte stride */
-#define STRIDE_4F(p, i)  (p = (GLfloat (*)[4])((GLubyte *)p + i))
-/** Stepping a GLchan[4] pointer by a byte stride */
-#define STRIDE_4CHAN(p, i)  (p = (GLchan (*)[4])((GLubyte *)p + i))
-/** Stepping a GLchan pointer by a byte stride */
-#define STRIDE_CHAN(p, i)  (p = (GLchan *)((GLubyte *)p + i))
-/** Stepping a \p t pointer by a byte stride */
-#define STRIDE_T(p, t, i)  (p = (t)((GLubyte *)p + i))
-
-
-/**********************************************************************/
-/** \name 4-element vector operations */
-/*@{*/
-
-/** Zero */
-#define ZERO_4V( DST )  (DST)[0] = (DST)[1] = (DST)[2] = (DST)[3] = 0
-
-/** Test for equality */
-#define TEST_EQ_4V(a,b)  ((a)[0] == (b)[0] &&   \
-              (a)[1] == (b)[1] &&   \
-              (a)[2] == (b)[2] &&   \
-              (a)[3] == (b)[3])
-
-/** Test for equality (unsigned bytes) */
-#if defined(__i386__)
-#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
-#else
-#define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC)
-#endif
-
-/** Copy a 4-element vector */
-#define COPY_4V( DST, SRC )         \
-do {                                \
-   (DST)[0] = (SRC)[0];             \
-   (DST)[1] = (SRC)[1];             \
-   (DST)[2] = (SRC)[2];             \
-   (DST)[3] = (SRC)[3];             \
-} while (0)
-
-/** Copy a 4-element vector with cast */
-#define COPY_4V_CAST( DST, SRC, CAST )  \
-do {                                    \
-   (DST)[0] = (CAST)(SRC)[0];           \
-   (DST)[1] = (CAST)(SRC)[1];           \
-   (DST)[2] = (CAST)(SRC)[2];           \
-   (DST)[3] = (CAST)(SRC)[3];           \
-} while (0)
-
-/** Copy a 4-element unsigned byte vector */
-#if defined(__i386__)
-#define COPY_4UBV(DST, SRC)                 \
-do {                                        \
-   *((GLuint*)(DST)) = *((GLuint*)(SRC));   \
-} while (0)
-#else
-/* The GLuint cast might fail if DST or SRC are not dword-aligned (RISC) */
-#define COPY_4UBV(DST, SRC)         \
-do {                                \
-   (DST)[0] = (SRC)[0];             \
-   (DST)[1] = (SRC)[1];             \
-   (DST)[2] = (SRC)[2];             \
-   (DST)[3] = (SRC)[3];             \
-} while (0)
-#endif
-
-/**
- * Copy a 4-element float vector
- * memcpy seems to be most efficient
- */
-#define COPY_4FV( DST, SRC )                  \
-do {                                          \
-   memcpy(DST, SRC, sizeof(GLfloat) * 4);     \
-} while (0)
-
-/** Copy \p SZ elements into a 4-element vector */
-#define COPY_SZ_4V(DST, SZ, SRC)  \
-do {                              \
-   switch (SZ) {                  \
-   case 4: (DST)[3] = (SRC)[3];   \
-   case 3: (DST)[2] = (SRC)[2];   \
-   case 2: (DST)[1] = (SRC)[1];   \
-   case 1: (DST)[0] = (SRC)[0];   \
-   }                              \
-} while(0)
-
-/** Copy \p SZ elements into a homegeneous (4-element) vector, giving
- * default values to the remaining */
-#define COPY_CLEAN_4V(DST, SZ, SRC)  \
-do {                                 \
-      ASSIGN_4V( DST, 0, 0, 0, 1 );  \
-      COPY_SZ_4V( DST, SZ, SRC );    \
-} while (0)
-
-/** Subtraction */
-#define SUB_4V( DST, SRCA, SRCB )           \
-do {                                        \
-      (DST)[0] = (SRCA)[0] - (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] - (SRCB)[1];     \
-      (DST)[2] = (SRCA)[2] - (SRCB)[2];     \
-      (DST)[3] = (SRCA)[3] - (SRCB)[3];     \
-} while (0)
-
-/** Addition */
-#define ADD_4V( DST, SRCA, SRCB )           \
-do {                                        \
-      (DST)[0] = (SRCA)[0] + (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] + (SRCB)[1];     \
-      (DST)[2] = (SRCA)[2] + (SRCB)[2];     \
-      (DST)[3] = (SRCA)[3] + (SRCB)[3];     \
-} while (0)
-
-/** Element-wise multiplication */
-#define SCALE_4V( DST, SRCA, SRCB )         \
-do {                                        \
-      (DST)[0] = (SRCA)[0] * (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] * (SRCB)[1];     \
-      (DST)[2] = (SRCA)[2] * (SRCB)[2];     \
-      (DST)[3] = (SRCA)[3] * (SRCB)[3];     \
-} while (0)
-
-/** In-place addition */
-#define ACC_4V( DST, SRC )          \
-do {                                \
-      (DST)[0] += (SRC)[0];         \
-      (DST)[1] += (SRC)[1];         \
-      (DST)[2] += (SRC)[2];         \
-      (DST)[3] += (SRC)[3];         \
-} while (0)
-
-/** Element-wise multiplication and addition */
-#define ACC_SCALE_4V( DST, SRCA, SRCB )     \
-do {                                        \
-      (DST)[0] += (SRCA)[0] * (SRCB)[0];    \
-      (DST)[1] += (SRCA)[1] * (SRCB)[1];    \
-      (DST)[2] += (SRCA)[2] * (SRCB)[2];    \
-      (DST)[3] += (SRCA)[3] * (SRCB)[3];    \
-} while (0)
-
-/** In-place scalar multiplication and addition */
-#define ACC_SCALE_SCALAR_4V( DST, S, SRCB ) \
-do {                                        \
-      (DST)[0] += S * (SRCB)[0];            \
-      (DST)[1] += S * (SRCB)[1];            \
-      (DST)[2] += S * (SRCB)[2];            \
-      (DST)[3] += S * (SRCB)[3];            \
-} while (0)
-
-/** Scalar multiplication */
-#define SCALE_SCALAR_4V( DST, S, SRCB ) \
-do {                                    \
-      (DST)[0] = S * (SRCB)[0];         \
-      (DST)[1] = S * (SRCB)[1];         \
-      (DST)[2] = S * (SRCB)[2];         \
-      (DST)[3] = S * (SRCB)[3];         \
-} while (0)
-
-/** In-place scalar multiplication */
-#define SELF_SCALE_SCALAR_4V( DST, S ) \
-do {                                   \
-      (DST)[0] *= S;                   \
-      (DST)[1] *= S;                   \
-      (DST)[2] *= S;                   \
-      (DST)[3] *= S;                   \
-} while (0)
-
-/** Assignment */
-#define ASSIGN_4V( V, V0, V1, V2, V3 )  \
-do {                                    \
-    V[0] = V0;                          \
-    V[1] = V1;                          \
-    V[2] = V2;                          \
-    V[3] = V3;                          \
-} while(0)
-
-/*@}*/
-
-
-/**********************************************************************/
-/** \name 3-element vector operations*/
-/*@{*/
-
-/** Zero */
-#define ZERO_3V( DST )  (DST)[0] = (DST)[1] = (DST)[2] = 0
-
-/** Test for equality */
-#define TEST_EQ_3V(a,b)  \
-   ((a)[0] == (b)[0] &&  \
-    (a)[1] == (b)[1] &&  \
-    (a)[2] == (b)[2])
-
-/** Copy a 3-element vector */
-#define COPY_3V( DST, SRC )         \
-do {                                \
-   (DST)[0] = (SRC)[0];             \
-   (DST)[1] = (SRC)[1];             \
-   (DST)[2] = (SRC)[2];             \
-} while (0)
-
-/** Copy a 3-element vector with cast */
-#define COPY_3V_CAST( DST, SRC, CAST )  \
-do {                                    \
-   (DST)[0] = (CAST)(SRC)[0];           \
-   (DST)[1] = (CAST)(SRC)[1];           \
-   (DST)[2] = (CAST)(SRC)[2];           \
-} while (0)
-
-/** Copy a 3-element float vector */
-#define COPY_3FV( DST, SRC )        \
-do {                                \
-   const GLfloat *_tmp = (SRC);     \
-   (DST)[0] = _tmp[0];              \
-   (DST)[1] = _tmp[1];              \
-   (DST)[2] = _tmp[2];              \
-} while (0)
-
-/** Subtraction */
-#define SUB_3V( DST, SRCA, SRCB )        \
-do {                                     \
-      (DST)[0] = (SRCA)[0] - (SRCB)[0];  \
-      (DST)[1] = (SRCA)[1] - (SRCB)[1];  \
-      (DST)[2] = (SRCA)[2] - (SRCB)[2];  \
-} while (0)
-
-/** Addition */
-#define ADD_3V( DST, SRCA, SRCB )       \
-do {                                    \
-      (DST)[0] = (SRCA)[0] + (SRCB)[0]; \
-      (DST)[1] = (SRCA)[1] + (SRCB)[1]; \
-      (DST)[2] = (SRCA)[2] + (SRCB)[2]; \
-} while (0)
-
-/** In-place scalar multiplication */
-#define SCALE_3V( DST, SRCA, SRCB )     \
-do {                                    \
-      (DST)[0] = (SRCA)[0] * (SRCB)[0]; \
-      (DST)[1] = (SRCA)[1] * (SRCB)[1]; \
-      (DST)[2] = (SRCA)[2] * (SRCB)[2]; \
-} while (0)
-
-/** In-place element-wise multiplication */
-#define SELF_SCALE_3V( DST, SRC )   \
-do {                                \
-      (DST)[0] *= (SRC)[0];         \
-      (DST)[1] *= (SRC)[1];         \
-      (DST)[2] *= (SRC)[2];         \
-} while (0)
-
-/** In-place addition */
-#define ACC_3V( DST, SRC )          \
-do {                                \
-      (DST)[0] += (SRC)[0];         \
-      (DST)[1] += (SRC)[1];         \
-      (DST)[2] += (SRC)[2];         \
-} while (0)
-
-/** Element-wise multiplication and addition */
-#define ACC_SCALE_3V( DST, SRCA, SRCB )     \
-do {                                        \
-      (DST)[0] += (SRCA)[0] * (SRCB)[0];    \
-      (DST)[1] += (SRCA)[1] * (SRCB)[1];    \
-      (DST)[2] += (SRCA)[2] * (SRCB)[2];    \
-} while (0)
-
-/** Scalar multiplication */
-#define SCALE_SCALAR_3V( DST, S, SRCB ) \
-do {                                    \
-      (DST)[0] = S * (SRCB)[0];         \
-      (DST)[1] = S * (SRCB)[1];         \
-      (DST)[2] = S * (SRCB)[2];         \
-} while (0)
-
-/** In-place scalar multiplication and addition */
-#define ACC_SCALE_SCALAR_3V( DST, S, SRCB ) \
-do {                                        \
-      (DST)[0] += S * (SRCB)[0];            \
-      (DST)[1] += S * (SRCB)[1];            \
-      (DST)[2] += S * (SRCB)[2];            \
-} while (0)
-
-/** In-place scalar multiplication */
-#define SELF_SCALE_SCALAR_3V( DST, S ) \
-do {                                   \
-      (DST)[0] *= S;                   \
-      (DST)[1] *= S;                   \
-      (DST)[2] *= S;                   \
-} while (0)
-
-/** In-place scalar addition */
-#define ACC_SCALAR_3V( DST, S )     \
-do {                                \
-      (DST)[0] += S;                \
-      (DST)[1] += S;                \
-      (DST)[2] += S;                \
-} while (0)
-
-/** Assignment */
-#define ASSIGN_3V( V, V0, V1, V2 )  \
-do {                                \
-    V[0] = V0;                      \
-    V[1] = V1;                      \
-    V[2] = V2;                      \
-} while(0)
-
-/*@}*/
-
-
-/**********************************************************************/
-/** \name 2-element vector operations*/
-/*@{*/
-
-/** Zero */
-#define ZERO_2V( DST )  (DST)[0] = (DST)[1] = 0
-
-/** Copy a 2-element vector */
-#define COPY_2V( DST, SRC )         \
-do {                        \
-   (DST)[0] = (SRC)[0];             \
-   (DST)[1] = (SRC)[1];             \
-} while (0)
-
-/** Copy a 2-element vector with cast */
-#define COPY_2V_CAST( DST, SRC, CAST )      \
-do {                        \
-   (DST)[0] = (CAST)(SRC)[0];           \
-   (DST)[1] = (CAST)(SRC)[1];           \
-} while (0)
-
-/** Copy a 2-element float vector */
-#define COPY_2FV( DST, SRC )            \
-do {                        \
-   const GLfloat *_tmp = (SRC);         \
-   (DST)[0] = _tmp[0];              \
-   (DST)[1] = _tmp[1];              \
-} while (0)
-
-/** Subtraction */
-#define SUB_2V( DST, SRCA, SRCB )       \
-do {                        \
-      (DST)[0] = (SRCA)[0] - (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] - (SRCB)[1];     \
-} while (0)
-
-/** Addition */
-#define ADD_2V( DST, SRCA, SRCB )       \
-do {                        \
-      (DST)[0] = (SRCA)[0] + (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] + (SRCB)[1];     \
-} while (0)
-
-/** In-place scalar multiplication */
-#define SCALE_2V( DST, SRCA, SRCB )     \
-do {                        \
-      (DST)[0] = (SRCA)[0] * (SRCB)[0];     \
-      (DST)[1] = (SRCA)[1] * (SRCB)[1];     \
-} while (0)
-
-/** In-place addition */
-#define ACC_2V( DST, SRC )          \
-do {                        \
-      (DST)[0] += (SRC)[0];         \
-      (DST)[1] += (SRC)[1];         \
-} while (0)
-
-/** Element-wise multiplication and addition */
-#define ACC_SCALE_2V( DST, SRCA, SRCB )     \
-do {                        \
-      (DST)[0] += (SRCA)[0] * (SRCB)[0];    \
-      (DST)[1] += (SRCA)[1] * (SRCB)[1];    \
-} while (0)
-
-/** Scalar multiplication */
-#define SCALE_SCALAR_2V( DST, S, SRCB )     \
-do {                        \
-      (DST)[0] = S * (SRCB)[0];         \
-      (DST)[1] = S * (SRCB)[1];         \
-} while (0)
-
-/** In-place scalar multiplication and addition */
-#define ACC_SCALE_SCALAR_2V( DST, S, SRCB ) \
-do {                        \
-      (DST)[0] += S * (SRCB)[0];        \
-      (DST)[1] += S * (SRCB)[1];        \
-} while (0)
-
-/** In-place scalar multiplication */
-#define SELF_SCALE_SCALAR_2V( DST, S )      \
-do {                        \
-      (DST)[0] *= S;                \
-      (DST)[1] *= S;                \
-} while (0)
-
-/** In-place scalar addition */
-#define ACC_SCALAR_2V( DST, S )         \
-do {                        \
-      (DST)[0] += S;                \
-      (DST)[1] += S;                \
-} while (0)
-
-/** Assign scalers to short vectors */
-#define ASSIGN_2V( V, V0, V1 )	\
-do {				\
-    V[0] = V0;			\
-    V[1] = V1;			\
-} while(0)
-
-/*@}*/
-
-
-/** \name Linear interpolation macros */
-/*@{*/
-
-/**
- * Linear interpolation
- *
- * \note \p OUT argument is evaluated twice!
- * \note Be wary of using *coord++ as an argument to any of these macros!
- */
-#define LINTERP(T, OUT, IN) ((OUT) + (T) * ((IN) - (OUT)))
-
-/* Can do better with integer math
- */
-#define INTERP_UB( t, dstub, outub, inub )  \
-do {                        \
-   GLfloat inf = UBYTE_TO_FLOAT( inub );    \
-   GLfloat outf = UBYTE_TO_FLOAT( outub );  \
-   GLfloat dstf = LINTERP( t, outf, inf );  \
-   UNCLAMPED_FLOAT_TO_UBYTE( dstub, dstf ); \
-} while (0)
-
-#define INTERP_CHAN( t, dstc, outc, inc )   \
-do {                        \
-   GLfloat inf = CHAN_TO_FLOAT( inc );      \
-   GLfloat outf = CHAN_TO_FLOAT( outc );    \
-   GLfloat dstf = LINTERP( t, outf, inf );  \
-   UNCLAMPED_FLOAT_TO_CHAN( dstc, dstf );   \
-} while (0)
-
-#define INTERP_UI( t, dstui, outui, inui )  \
-   dstui = (GLuint) (GLint) LINTERP( (t), (GLfloat) (outui), (GLfloat) (inui) )
-
-#define INTERP_F( t, dstf, outf, inf )      \
-   dstf = LINTERP( t, outf, inf )
-
-#define INTERP_4F( t, dst, out, in )        \
-do {                        \
-   dst[0] = LINTERP( (t), (out)[0], (in)[0] );  \
-   dst[1] = LINTERP( (t), (out)[1], (in)[1] );  \
-   dst[2] = LINTERP( (t), (out)[2], (in)[2] );  \
-   dst[3] = LINTERP( (t), (out)[3], (in)[3] );  \
-} while (0)
-
-#define INTERP_3F( t, dst, out, in )        \
-do {                        \
-   dst[0] = LINTERP( (t), (out)[0], (in)[0] );  \
-   dst[1] = LINTERP( (t), (out)[1], (in)[1] );  \
-   dst[2] = LINTERP( (t), (out)[2], (in)[2] );  \
-} while (0)
-
-#define INTERP_4CHAN( t, dst, out, in )         \
-do {                            \
-   INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \
-   INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \
-   INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \
-   INTERP_CHAN( (t), (dst)[3], (out)[3], (in)[3] ); \
-} while (0)
-
-#define INTERP_3CHAN( t, dst, out, in )         \
-do {                            \
-   INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \
-   INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \
-   INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \
-} while (0)
-
-#define INTERP_SZ( t, vec, to, out, in, sz )                \
-do {                                    \
-   switch (sz) {                            \
-   case 4: vec[to][3] = LINTERP( (t), (vec)[out][3], (vec)[in][3] );    \
-   case 3: vec[to][2] = LINTERP( (t), (vec)[out][2], (vec)[in][2] );    \
-   case 2: vec[to][1] = LINTERP( (t), (vec)[out][1], (vec)[in][1] );    \
-   case 1: vec[to][0] = LINTERP( (t), (vec)[out][0], (vec)[in][0] );    \
-   }                                    \
-} while(0)
-
-/*@}*/
-
-
-
-/** Clamp X to [MIN,MAX] */
-#define CLAMP( X, MIN, MAX )  ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
-
-/** Minimum of two values: */
-#define MIN2( A, B )   ( (A)<(B) ? (A) : (B) )
-
-/** Maximum of two values: */
-#define MAX2( A, B )   ( (A)>(B) ? (A) : (B) )
-
-/** Dot product of two 2-element vectors */
-#define DOT2( a, b )  ( (a)[0]*(b)[0] + (a)[1]*(b)[1] )
-
-/** Dot product of two 3-element vectors */
-#define DOT3( a, b )  ( (a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] )
-
-/** Dot product of two 4-element vectors */
-#define DOT4( a, b )  ( (a)[0]*(b)[0] + (a)[1]*(b)[1] + \
-            (a)[2]*(b)[2] + (a)[3]*(b)[3] )
-
-/** Dot product of two 4-element vectors */
-#define DOT4V(v,a,b,c,d) (v[0]*(a) + v[1]*(b) + v[2]*(c) + v[3]*(d))
-
-
-/** Cross product of two 3-element vectors */
-#define CROSS3(n, u, v)             \
-do {                        \
-   (n)[0] = (u)[1]*(v)[2] - (u)[2]*(v)[1];  \
-   (n)[1] = (u)[2]*(v)[0] - (u)[0]*(v)[2];  \
-   (n)[2] = (u)[0]*(v)[1] - (u)[1]*(v)[0];  \
-} while (0)
-
-
-/* Normalize a 3-element vector to unit length. */
-#define NORMALIZE_3FV( V )          \
-do {                        \
-   GLfloat len = (GLfloat) LEN_SQUARED_3FV(V);  \
-   if (len) {                   \
-      len = INV_SQRTF(len);         \
-      (V)[0] = (GLfloat) ((V)[0] * len);    \
-      (V)[1] = (GLfloat) ((V)[1] * len);    \
-      (V)[2] = (GLfloat) ((V)[2] * len);    \
-   }                        \
-} while(0)
-
-#define LEN_3FV( V ) (SQRTF((V)[0]*(V)[0]+(V)[1]*(V)[1]+(V)[2]*(V)[2]))
-#define LEN_2FV( V ) (SQRTF((V)[0]*(V)[0]+(V)[1]*(V)[1]))
-
-#define LEN_SQUARED_3FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1]+(V)[2]*(V)[2])
-#define LEN_SQUARED_2FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1])
-
-
-/** casts to silence warnings with some compilers */
-#define ENUM_TO_INT(E)     ((GLint)(E))
-#define ENUM_TO_FLOAT(E)   ((GLfloat)(GLint)(E))
-#define ENUM_TO_DOUBLE(E)  ((GLdouble)(GLint)(E))
-#define ENUM_TO_BOOLEAN(E) ((E) ? GL_TRUE : GL_FALSE)
-
-
-#endif
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
deleted file mode 100644
index 1b39f5f..0000000
--- a/src/mesa/main/mfeatures.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.1
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \file mfeatures.h
- * Flags to enable/disable specific parts of the API.
- */
-
-#ifndef FEATURES_H
-#define FEATURES_H
-
-
-#ifndef _HAVE_FULL_GL
-#define _HAVE_FULL_GL 1
-#endif
-
-/* assert that a feature is disabled and should never be used */
-#define ASSERT_NO_FEATURE() ASSERT(0)
-
-/**
- * A feature can be anything.  But most of them share certain characteristics.
- *
- * When a feature defines vtxfmt entries, they can be initialized and
- * installed by
- *   _MESA_INIT_<FEATURE>_VTXFMT
- *   _mesa_install_<feature>_vtxfmt
- *
- * When a feature defines dispatch entries, they are initialized by
- *   _mesa_init_<feature>_dispatch
- *
- * When a feature has states, they are initialized and freed by
- *   _mesa_init_<feature>
- *   _mesa_free_<feature>_data
- *
- * Except for states, the others compile to no-op when a feature is disabled.
- *
- * The GLAPIENTRYs and helper functions defined by a feature should also
- * compile to no-op when it is disabled.  But to save typings and to catch
- * bugs, some of them may be unavailable, or compile to ASSERT_NO_FEATURE()
- * when the feature is disabled.
- *
- * A feature following the conventions may be used without knowing if it is
- * enabled or not.
- */
-
-#ifndef FEATURE_ES1
-#define FEATURE_ES1 0
-#endif
-#ifndef FEATURE_ES2
-#define FEATURE_ES2 0
-#endif
-
-#define FEATURE_ES (FEATURE_ES1 || FEATURE_ES2)
-
-#ifndef FEATURE_GL
-#define FEATURE_GL !FEATURE_ES
-#endif
-
-#if defined(IN_DRI_DRIVER) || (FEATURE_GL + FEATURE_ES1 + FEATURE_ES2 > 1)
-#define FEATURE_remap_table               1
-#else
-#define FEATURE_remap_table               0
-#endif
-
-#define FEATURE_dispatch                  1
-#define FEATURE_texgen                    1
-#define FEATURE_userclip                  1
-
-#define FEATURE_accum                     FEATURE_GL
-#define FEATURE_arrayelt                  FEATURE_GL
-#define FEATURE_attrib_stack              FEATURE_GL
-/* this disables vtxfmt, api_loopback, and api_noop completely */
-#define FEATURE_beginend                  FEATURE_GL
-#define FEATURE_colortable                FEATURE_GL
-#define FEATURE_convolve                  FEATURE_GL
-#define FEATURE_dlist                     (FEATURE_GL && FEATURE_arrayelt && FEATURE_beginend)
-#define FEATURE_draw_read_buffer          FEATURE_GL
-#define FEATURE_drawpix                   FEATURE_GL
-#define FEATURE_evaluators                FEATURE_GL
-#define FEATURE_feedback                  FEATURE_GL
-#define FEATURE_pixel_transfer            FEATURE_GL
-#define FEATURE_queryobj                  FEATURE_GL
-#define FEATURE_rastpos                   FEATURE_GL
-#define FEATURE_texture_fxt1              FEATURE_GL
-#define FEATURE_texture_s3tc              FEATURE_GL
-
-#define FEATURE_extra_context_init        FEATURE_ES
-#define FEATURE_point_size_array          FEATURE_ES
-
-#define FEATURE_es2_glsl                  FEATURE_ES2
-
-#define FEATURE_ARB_fragment_program      1
-#define FEATURE_ARB_vertex_program        1
-#define FEATURE_ARB_vertex_shader         1
-#define FEATURE_ARB_fragment_shader       1
-#define FEATURE_ARB_shader_objects        (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
-#define FEATURE_ARB_shading_language_100  FEATURE_ARB_shader_objects
-#define FEATURE_ARB_geometry_shader4      FEATURE_ARB_shader_objects
-
-#define FEATURE_ARB_framebuffer_object    (FEATURE_GL && FEATURE_EXT_framebuffer_object)
-#define FEATURE_ARB_map_buffer_range      FEATURE_GL
-#define FEATURE_ARB_pixel_buffer_object   (FEATURE_GL && FEATURE_EXT_pixel_buffer_object)
-#define FEATURE_ARB_sync                  FEATURE_GL
-#define FEATURE_ARB_vertex_buffer_object  1
-
-#define FEATURE_EXT_framebuffer_blit      FEATURE_GL
-#define FEATURE_EXT_framebuffer_object    1
-#define FEATURE_EXT_pixel_buffer_object   1
-#define FEATURE_EXT_texture_sRGB          FEATURE_GL
-#define FEATURE_EXT_transform_feedback    FEATURE_GL
-
-#define FEATURE_APPLE_object_purgeable    FEATURE_GL
-#define FEATURE_ATI_fragment_shader       FEATURE_GL
-#define FEATURE_NV_fence                  FEATURE_GL
-#define FEATURE_NV_fragment_program       FEATURE_GL
-#define FEATURE_NV_vertex_program         FEATURE_GL
-
-#define FEATURE_OES_EGL_image             1
-#define FEATURE_OES_draw_texture          FEATURE_ES1
-#define FEATURE_OES_framebuffer_object    FEATURE_ES
-#define FEATURE_OES_mapbuffer             FEATURE_ES
-
-#endif /* FEATURES_H */
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
deleted file mode 100644
index 9aa1c52..0000000
--- a/src/mesa/main/mtypes.h
+++ /dev/null
@@ -1,3321 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.7
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file mtypes.h
- * Main Mesa data structures.
- *
- * Please try to mark derived values with a leading underscore ('_').
- */
-
-#ifndef MTYPES_H
-#define MTYPES_H
-
-
-#include "main/glheader.h"
-#include "main/config.h"
-#include "main/mfeatures.h"
-//#include "glapi/glapi.h"
-//#include "math/m_matrix.h"	/* GLmatrix */
-#include "main/simple_list.h"	/* struct simple_node */
-
-
-/**
- * Color channel data type.
- */
-#if CHAN_BITS == 8
-   typedef GLubyte GLchan;
-#define CHAN_MAX 255
-#define CHAN_MAXF 255.0F
-#define CHAN_TYPE GL_UNSIGNED_BYTE
-#elif CHAN_BITS == 16
-   typedef GLushort GLchan;
-#define CHAN_MAX 65535
-#define CHAN_MAXF 65535.0F
-#define CHAN_TYPE GL_UNSIGNED_SHORT
-#elif CHAN_BITS == 32
-   typedef GLfloat GLchan;
-#define CHAN_MAX 1.0
-#define CHAN_MAXF 1.0F
-#define CHAN_TYPE GL_FLOAT
-#else
-#error "illegal number of color channel bits"
-#endif
-
-
-/**
- * Stencil buffer data type.
- */
-#if STENCIL_BITS==8
-   typedef GLubyte GLstencil;
-#elif STENCIL_BITS==16
-   typedef GLushort GLstencil;
-#else
-#  error "illegal number of stencil bits"
-#endif
-
-
-/**
- * \name 64-bit extension of GLbitfield.
- */
-/*@{*/
-typedef GLuint64 GLbitfield64;
-
-#define BITFIELD64_ONE         1ULL
-#define BITFIELD64_ALLONES     ~0ULL
-
-/** Set a single bit */
-#define BITFIELD64_BIT(b)      (BITFIELD64_ONE << (b))
-
-/** Set a mask of the least significant \c b bits */
-#define BITFIELD64_MASK(b)     (((b) >= 64) ? BITFIELD64_ALLONES : \
-				(BITFIELD64_BIT(b) - 1))
-
-/**
- * Set all bits from l (low bit) to h (high bit), inclusive.
- *
- * \note \C BITFIELD_64_RANGE(0, 63) return 64 set bits.
- */
-#define BITFIELD64_RANGE(l, h) (BITFIELD64_MASK((h) + 1) & ~BITFIELD64_MASK(l))
-/*@}*/
-
-
-/**
- * \name Some forward type declarations
- */
-/*@{*/
-struct _mesa_HashTable;
-struct gl_attrib_node;
-struct gl_list_extensions;
-struct gl_meta_state;
-struct gl_pixelstore_attrib;
-struct gl_program_cache;
-struct gl_texture_format;
-struct gl_texture_image;
-struct gl_texture_object;
-struct gl_context;
-struct st_context;
-/*@}*/
-
-
-
-/**
- * Shader stages. Note that these will become 5 with tessellation.
- * These MUST have the same values as gallium's PIPE_SHADER_*
- */
-typedef enum
-{
-   MESA_SHADER_VERTEX = 0,
-   MESA_SHADER_FRAGMENT = 1,
-   MESA_SHADER_GEOMETRY = 2,
-   MESA_SHADER_TYPES = 3
-} gl_shader_type;
-
-
-
-/**
- * Indexes for vertex program attributes.
- * GL_NV_vertex_program aliases generic attributes over the conventional
- * attributes.  In GL_ARB_vertex_program shader the aliasing is optional.
- * In GL_ARB_vertex_shader / OpenGL 2.0 the aliasing is disallowed (the
- * generic attributes are distinct/separate).
- */
-typedef enum
-{
-   VERT_ATTRIB_POS = 0,
-   VERT_ATTRIB_WEIGHT = 1,
-   VERT_ATTRIB_NORMAL = 2,
-   VERT_ATTRIB_COLOR0 = 3,
-   VERT_ATTRIB_COLOR1 = 4,
-   VERT_ATTRIB_FOG = 5,
-   VERT_ATTRIB_COLOR_INDEX = 6,
-   VERT_ATTRIB_POINT_SIZE = 6,  /*alias*/
-   VERT_ATTRIB_EDGEFLAG = 7,
-   VERT_ATTRIB_TEX0 = 8,
-   VERT_ATTRIB_TEX1 = 9,
-   VERT_ATTRIB_TEX2 = 10,
-   VERT_ATTRIB_TEX3 = 11,
-   VERT_ATTRIB_TEX4 = 12,
-   VERT_ATTRIB_TEX5 = 13,
-   VERT_ATTRIB_TEX6 = 14,
-   VERT_ATTRIB_TEX7 = 15,
-   VERT_ATTRIB_GENERIC0 = 16,
-   VERT_ATTRIB_GENERIC1 = 17,
-   VERT_ATTRIB_GENERIC2 = 18,
-   VERT_ATTRIB_GENERIC3 = 19,
-   VERT_ATTRIB_GENERIC4 = 20,
-   VERT_ATTRIB_GENERIC5 = 21,
-   VERT_ATTRIB_GENERIC6 = 22,
-   VERT_ATTRIB_GENERIC7 = 23,
-   VERT_ATTRIB_GENERIC8 = 24,
-   VERT_ATTRIB_GENERIC9 = 25,
-   VERT_ATTRIB_GENERIC10 = 26,
-   VERT_ATTRIB_GENERIC11 = 27,
-   VERT_ATTRIB_GENERIC12 = 28,
-   VERT_ATTRIB_GENERIC13 = 29,
-   VERT_ATTRIB_GENERIC14 = 30,
-   VERT_ATTRIB_GENERIC15 = 31,
-   VERT_ATTRIB_MAX = 32
-} gl_vert_attrib;
-
-/**
- * Bitflags for vertex attributes.
- * These are used in bitfields in many places.
- */
-/*@{*/
-#define VERT_BIT_POS         (1 << VERT_ATTRIB_POS)
-#define VERT_BIT_WEIGHT      (1 << VERT_ATTRIB_WEIGHT)
-#define VERT_BIT_NORMAL      (1 << VERT_ATTRIB_NORMAL)
-#define VERT_BIT_COLOR0      (1 << VERT_ATTRIB_COLOR0)
-#define VERT_BIT_COLOR1      (1 << VERT_ATTRIB_COLOR1)
-#define VERT_BIT_FOG         (1 << VERT_ATTRIB_FOG)
-#define VERT_BIT_COLOR_INDEX (1 << VERT_ATTRIB_COLOR_INDEX)
-#define VERT_BIT_EDGEFLAG    (1 << VERT_ATTRIB_EDGEFLAG)
-#define VERT_BIT_TEX0        (1 << VERT_ATTRIB_TEX0)
-#define VERT_BIT_TEX1        (1 << VERT_ATTRIB_TEX1)
-#define VERT_BIT_TEX2        (1 << VERT_ATTRIB_TEX2)
-#define VERT_BIT_TEX3        (1 << VERT_ATTRIB_TEX3)
-#define VERT_BIT_TEX4        (1 << VERT_ATTRIB_TEX4)
-#define VERT_BIT_TEX5        (1 << VERT_ATTRIB_TEX5)
-#define VERT_BIT_TEX6        (1 << VERT_ATTRIB_TEX6)
-#define VERT_BIT_TEX7        (1 << VERT_ATTRIB_TEX7)
-#define VERT_BIT_GENERIC0    (1 << VERT_ATTRIB_GENERIC0)
-#define VERT_BIT_GENERIC1    (1 << VERT_ATTRIB_GENERIC1)
-#define VERT_BIT_GENERIC2    (1 << VERT_ATTRIB_GENERIC2)
-#define VERT_BIT_GENERIC3    (1 << VERT_ATTRIB_GENERIC3)
-#define VERT_BIT_GENERIC4    (1 << VERT_ATTRIB_GENERIC4)
-#define VERT_BIT_GENERIC5    (1 << VERT_ATTRIB_GENERIC5)
-#define VERT_BIT_GENERIC6    (1 << VERT_ATTRIB_GENERIC6)
-#define VERT_BIT_GENERIC7    (1 << VERT_ATTRIB_GENERIC7)
-#define VERT_BIT_GENERIC8    (1 << VERT_ATTRIB_GENERIC8)
-#define VERT_BIT_GENERIC9    (1 << VERT_ATTRIB_GENERIC9)
-#define VERT_BIT_GENERIC10   (1 << VERT_ATTRIB_GENERIC10)
-#define VERT_BIT_GENERIC11   (1 << VERT_ATTRIB_GENERIC11)
-#define VERT_BIT_GENERIC12   (1 << VERT_ATTRIB_GENERIC12)
-#define VERT_BIT_GENERIC13   (1 << VERT_ATTRIB_GENERIC13)
-#define VERT_BIT_GENERIC14   (1 << VERT_ATTRIB_GENERIC14)
-#define VERT_BIT_GENERIC15   (1 << VERT_ATTRIB_GENERIC15)
-
-#define VERT_BIT_TEX(u)  (1 << (VERT_ATTRIB_TEX0 + (u)))
-#define VERT_BIT_GENERIC(g)  (1 << (VERT_ATTRIB_GENERIC0 + (g)))
-/*@}*/
-
-
-/**
- * Indexes for vertex program result attributes
- */
-typedef enum
-{
-   VERT_RESULT_HPOS = 0,
-   VERT_RESULT_COL0 = 1,
-   VERT_RESULT_COL1 = 2,
-   VERT_RESULT_FOGC = 3,
-   VERT_RESULT_TEX0 = 4,
-   VERT_RESULT_TEX1 = 5,
-   VERT_RESULT_TEX2 = 6,
-   VERT_RESULT_TEX3 = 7,
-   VERT_RESULT_TEX4 = 8,
-   VERT_RESULT_TEX5 = 9,
-   VERT_RESULT_TEX6 = 10,
-   VERT_RESULT_TEX7 = 11,
-   VERT_RESULT_PSIZ = 12,
-   VERT_RESULT_BFC0 = 13,
-   VERT_RESULT_BFC1 = 14,
-   VERT_RESULT_EDGE = 15,
-   VERT_RESULT_VAR0 = 16,  /**< shader varying */
-   VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING)
-} gl_vert_result;
-
-
-/*********************************************/
-
-/**
- * Indexes for geometry program attributes.
- */
-typedef enum
-{
-   GEOM_ATTRIB_POSITION = 0,
-   GEOM_ATTRIB_COLOR0 = 1,
-   GEOM_ATTRIB_COLOR1 = 2,
-   GEOM_ATTRIB_SECONDARY_COLOR0 = 3,
-   GEOM_ATTRIB_SECONDARY_COLOR1 = 4,
-   GEOM_ATTRIB_FOG_FRAG_COORD = 5,
-   GEOM_ATTRIB_POINT_SIZE = 6,
-   GEOM_ATTRIB_CLIP_VERTEX = 7,
-   GEOM_ATTRIB_PRIMITIVE_ID = 8,
-   GEOM_ATTRIB_TEX_COORD = 9,
-
-   GEOM_ATTRIB_VAR0 = 16,
-   GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + MAX_VARYING)
-} gl_geom_attrib;
-
-/**
- * Bitflags for geometry attributes.
- * These are used in bitfields in many places.
- */
-/*@{*/
-#define GEOM_BIT_COLOR0      (1 << GEOM_ATTRIB_COLOR0)
-#define GEOM_BIT_COLOR1      (1 << GEOM_ATTRIB_COLOR1)
-#define GEOM_BIT_SCOLOR0     (1 << GEOM_ATTRIB_SECONDARY_COLOR0)
-#define GEOM_BIT_SCOLOR1     (1 << GEOM_ATTRIB_SECONDARY_COLOR1)
-#define GEOM_BIT_TEX_COORD   (1 << GEOM_ATTRIB_TEX_COORD)
-#define GEOM_BIT_FOG_COORD   (1 << GEOM_ATTRIB_FOG_FRAG_COORD)
-#define GEOM_BIT_POSITION    (1 << GEOM_ATTRIB_POSITION)
-#define GEOM_BIT_POINT_SIDE  (1 << GEOM_ATTRIB_POINT_SIZE)
-#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX)
-#define GEOM_BIT_PRIM_ID     (1 << GEOM_ATTRIB_PRIMITIVE_ID)
-#define GEOM_BIT_VAR0        (1 << GEOM_ATTRIB_VAR0)
-
-#define GEOM_BIT_VAR(g)  (1 << (GEOM_BIT_VAR0 + (g)))
-/*@}*/
-
-
-/**
- * Indexes for geometry program result attributes
- */
-/*@{*/
-typedef enum {
-   GEOM_RESULT_POS  = 0,
-   GEOM_RESULT_COL0  = 1,
-   GEOM_RESULT_COL1  = 2,
-   GEOM_RESULT_SCOL0 = 3,
-   GEOM_RESULT_SCOL1 = 4,
-   GEOM_RESULT_FOGC = 5,
-   GEOM_RESULT_TEX0 = 6,
-   GEOM_RESULT_TEX1 = 7,
-   GEOM_RESULT_TEX2 = 8,
-   GEOM_RESULT_TEX3 = 9,
-   GEOM_RESULT_TEX4 = 10,
-   GEOM_RESULT_TEX5 = 11,
-   GEOM_RESULT_TEX6 = 12,
-   GEOM_RESULT_TEX7 = 13,
-   GEOM_RESULT_PSIZ = 14,
-   GEOM_RESULT_CLPV = 15,
-   GEOM_RESULT_PRID = 16,
-   GEOM_RESULT_LAYR = 17,
-   GEOM_RESULT_VAR0 = 18,  /**< shader varying, should really be 16 */
-   /* ### we need to -2 because var0 is 18 instead 16 like in the others */
-   GEOM_RESULT_MAX  =  (GEOM_RESULT_VAR0 + MAX_VARYING - 2)
-} gl_geom_result;
-/*@}*/
-
-/**
- * Indexes for fragment program input attributes.
- */
-typedef enum
-{
-   FRAG_ATTRIB_WPOS = 0,
-   FRAG_ATTRIB_COL0 = 1,
-   FRAG_ATTRIB_COL1 = 2,
-   FRAG_ATTRIB_FOGC = 3,
-   FRAG_ATTRIB_TEX0 = 4,
-   FRAG_ATTRIB_TEX1 = 5,
-   FRAG_ATTRIB_TEX2 = 6,
-   FRAG_ATTRIB_TEX3 = 7,
-   FRAG_ATTRIB_TEX4 = 8,
-   FRAG_ATTRIB_TEX5 = 9,
-   FRAG_ATTRIB_TEX6 = 10,
-   FRAG_ATTRIB_TEX7 = 11,
-   FRAG_ATTRIB_FACE = 12,  /**< front/back face */
-   FRAG_ATTRIB_PNTC = 13,  /**< sprite/point coord */
-   FRAG_ATTRIB_VAR0 = 14,  /**< shader varying */
-   FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
-} gl_frag_attrib;
-
-/**
- * Bitflags for fragment program input attributes.
- */
-/*@{*/
-#define FRAG_BIT_WPOS  (1 << FRAG_ATTRIB_WPOS)
-#define FRAG_BIT_COL0  (1 << FRAG_ATTRIB_COL0)
-#define FRAG_BIT_COL1  (1 << FRAG_ATTRIB_COL1)
-#define FRAG_BIT_FOGC  (1 << FRAG_ATTRIB_FOGC)
-#define FRAG_BIT_FACE  (1 << FRAG_ATTRIB_FACE)
-#define FRAG_BIT_PNTC  (1 << FRAG_ATTRIB_PNTC)
-#define FRAG_BIT_TEX0  (1 << FRAG_ATTRIB_TEX0)
-#define FRAG_BIT_TEX1  (1 << FRAG_ATTRIB_TEX1)
-#define FRAG_BIT_TEX2  (1 << FRAG_ATTRIB_TEX2)
-#define FRAG_BIT_TEX3  (1 << FRAG_ATTRIB_TEX3)
-#define FRAG_BIT_TEX4  (1 << FRAG_ATTRIB_TEX4)
-#define FRAG_BIT_TEX5  (1 << FRAG_ATTRIB_TEX5)
-#define FRAG_BIT_TEX6  (1 << FRAG_ATTRIB_TEX6)
-#define FRAG_BIT_TEX7  (1 << FRAG_ATTRIB_TEX7)
-#define FRAG_BIT_VAR0  (1 << FRAG_ATTRIB_VAR0)
-
-#define FRAG_BIT_TEX(U)  (FRAG_BIT_TEX0 << (U))
-#define FRAG_BIT_VAR(V)  (FRAG_BIT_VAR0 << (V))
-
-#define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0|	\
-			   FRAG_BIT_TEX1|	\
-			   FRAG_BIT_TEX2|	\
-			   FRAG_BIT_TEX3|	\
-			   FRAG_BIT_TEX4|	\
-			   FRAG_BIT_TEX5|	\
-			   FRAG_BIT_TEX6|	\
-			   FRAG_BIT_TEX7)
-/*@}*/
-
-
-/**
- * Fragment program results
- */
-typedef enum
-{
-   FRAG_RESULT_DEPTH = 0,
-   FRAG_RESULT_STENCIL = 1,
-   FRAG_RESULT_COLOR = 2,
-   FRAG_RESULT_DATA0 = 3,
-   FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS)
-} gl_frag_result;
-
-
-/**
- * Indexes for all renderbuffers
- */
-typedef enum
-{
-   /* the four standard color buffers */
-   BUFFER_FRONT_LEFT,
-   BUFFER_BACK_LEFT,
-   BUFFER_FRONT_RIGHT,
-   BUFFER_BACK_RIGHT,
-   BUFFER_DEPTH,
-   BUFFER_STENCIL,
-   BUFFER_ACCUM,
-   /* optional aux buffer */
-   BUFFER_AUX0,
-   /* generic renderbuffers */
-   BUFFER_COLOR0,
-   BUFFER_COLOR1,
-   BUFFER_COLOR2,
-   BUFFER_COLOR3,
-   BUFFER_COLOR4,
-   BUFFER_COLOR5,
-   BUFFER_COLOR6,
-   BUFFER_COLOR7,
-   BUFFER_COUNT
-} gl_buffer_index;
-
-/**
- * Bit flags for all renderbuffers
- */
-#define BUFFER_BIT_FRONT_LEFT   (1 << BUFFER_FRONT_LEFT)
-#define BUFFER_BIT_BACK_LEFT    (1 << BUFFER_BACK_LEFT)
-#define BUFFER_BIT_FRONT_RIGHT  (1 << BUFFER_FRONT_RIGHT)
-#define BUFFER_BIT_BACK_RIGHT   (1 << BUFFER_BACK_RIGHT)
-#define BUFFER_BIT_AUX0         (1 << BUFFER_AUX0)
-#define BUFFER_BIT_AUX1         (1 << BUFFER_AUX1)
-#define BUFFER_BIT_AUX2         (1 << BUFFER_AUX2)
-#define BUFFER_BIT_AUX3         (1 << BUFFER_AUX3)
-#define BUFFER_BIT_DEPTH        (1 << BUFFER_DEPTH)
-#define BUFFER_BIT_STENCIL      (1 << BUFFER_STENCIL)
-#define BUFFER_BIT_ACCUM        (1 << BUFFER_ACCUM)
-#define BUFFER_BIT_COLOR0       (1 << BUFFER_COLOR0)
-#define BUFFER_BIT_COLOR1       (1 << BUFFER_COLOR1)
-#define BUFFER_BIT_COLOR2       (1 << BUFFER_COLOR2)
-#define BUFFER_BIT_COLOR3       (1 << BUFFER_COLOR3)
-#define BUFFER_BIT_COLOR4       (1 << BUFFER_COLOR4)
-#define BUFFER_BIT_COLOR5       (1 << BUFFER_COLOR5)
-#define BUFFER_BIT_COLOR6       (1 << BUFFER_COLOR6)
-#define BUFFER_BIT_COLOR7       (1 << BUFFER_COLOR7)
-
-/**
- * Mask of all the color buffer bits (but not accum).
- */
-#define BUFFER_BITS_COLOR  (BUFFER_BIT_FRONT_LEFT | \
-                            BUFFER_BIT_BACK_LEFT | \
-                            BUFFER_BIT_FRONT_RIGHT | \
-                            BUFFER_BIT_BACK_RIGHT | \
-                            BUFFER_BIT_AUX0 | \
-                            BUFFER_BIT_COLOR0 | \
-                            BUFFER_BIT_COLOR1 | \
-                            BUFFER_BIT_COLOR2 | \
-                            BUFFER_BIT_COLOR3 | \
-                            BUFFER_BIT_COLOR4 | \
-                            BUFFER_BIT_COLOR5 | \
-                            BUFFER_BIT_COLOR6 | \
-                            BUFFER_BIT_COLOR7)
-
-
-/**
- * Framebuffer configuration (aka visual / pixelformat)
- * Note: some of these fields should be boolean, but it appears that
- * code in drivers/dri/common/util.c requires int-sized fields.
- */
-struct gl_config
-{
-   GLboolean rgbMode;
-   GLboolean floatMode;
-   GLboolean colorIndexMode;  /* XXX is this used anywhere? */
-   GLuint doubleBufferMode;
-   GLuint stereoMode;
-
-   GLboolean haveAccumBuffer;
-   GLboolean haveDepthBuffer;
-   GLboolean haveStencilBuffer;
-
-   GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
-   GLuint redMask, greenMask, blueMask, alphaMask;
-   GLint rgbBits;		/* total bits for rgb */
-   GLint indexBits;		/* total bits for colorindex */
-
-   GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
-   GLint depthBits;
-   GLint stencilBits;
-
-   GLint numAuxBuffers;
-
-   GLint level;
-
-   /* EXT_visual_rating / GLX 1.2 */
-   GLint visualRating;
-
-   /* EXT_visual_info / GLX 1.2 */
-   GLint transparentPixel;
-   /*    colors are floats scaled to ints */
-   GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
-   GLint transparentIndex;
-
-   /* ARB_multisample / SGIS_multisample */
-   GLint sampleBuffers;
-   GLint samples;
-
-   /* SGIX_pbuffer / GLX 1.3 */
-   GLint maxPbufferWidth;
-   GLint maxPbufferHeight;
-   GLint maxPbufferPixels;
-   GLint optimalPbufferWidth;   /* Only for SGIX_pbuffer. */
-   GLint optimalPbufferHeight;  /* Only for SGIX_pbuffer. */
-
-   /* OML_swap_method */
-   GLint swapMethod;
-
-   /* EXT_texture_from_pixmap */
-   GLint bindToTextureRgb;
-   GLint bindToTextureRgba;
-   GLint bindToMipmapTexture;
-   GLint bindToTextureTargets;
-   GLint yInverted;
-};
-
-
-/**
- * Data structure for color tables
- */
-struct gl_color_table
-{
-   GLenum InternalFormat;      /**< The user-specified format */
-   GLenum _BaseFormat;         /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
-   GLuint Size;                /**< number of entries in table */
-   GLfloat *TableF;            /**< Color table, floating point values */
-   GLubyte *TableUB;           /**< Color table, ubyte values */
-   GLubyte RedSize;
-   GLubyte GreenSize;
-   GLubyte BlueSize;
-   GLubyte AlphaSize;
-   GLubyte LuminanceSize;
-   GLubyte IntensitySize;
-};
-
-
-/**
- * \name Bit flags used for updating material values.
- */
-/*@{*/
-#define MAT_ATTRIB_FRONT_AMBIENT           0 
-#define MAT_ATTRIB_BACK_AMBIENT            1
-#define MAT_ATTRIB_FRONT_DIFFUSE           2 
-#define MAT_ATTRIB_BACK_DIFFUSE            3
-#define MAT_ATTRIB_FRONT_SPECULAR          4 
-#define MAT_ATTRIB_BACK_SPECULAR           5
-#define MAT_ATTRIB_FRONT_EMISSION          6
-#define MAT_ATTRIB_BACK_EMISSION           7
-#define MAT_ATTRIB_FRONT_SHININESS         8
-#define MAT_ATTRIB_BACK_SHININESS          9
-#define MAT_ATTRIB_FRONT_INDEXES           10
-#define MAT_ATTRIB_BACK_INDEXES            11
-#define MAT_ATTRIB_MAX                     12
-
-#define MAT_ATTRIB_AMBIENT(f)  (MAT_ATTRIB_FRONT_AMBIENT+(f))  
-#define MAT_ATTRIB_DIFFUSE(f)  (MAT_ATTRIB_FRONT_DIFFUSE+(f))  
-#define MAT_ATTRIB_SPECULAR(f) (MAT_ATTRIB_FRONT_SPECULAR+(f)) 
-#define MAT_ATTRIB_EMISSION(f) (MAT_ATTRIB_FRONT_EMISSION+(f)) 
-#define MAT_ATTRIB_SHININESS(f)(MAT_ATTRIB_FRONT_SHININESS+(f))
-#define MAT_ATTRIB_INDEXES(f)  (MAT_ATTRIB_FRONT_INDEXES+(f))  
-
-#define MAT_INDEX_AMBIENT  0
-#define MAT_INDEX_DIFFUSE  1
-#define MAT_INDEX_SPECULAR 2
-
-#define MAT_BIT_FRONT_AMBIENT         (1<<MAT_ATTRIB_FRONT_AMBIENT)
-#define MAT_BIT_BACK_AMBIENT          (1<<MAT_ATTRIB_BACK_AMBIENT)
-#define MAT_BIT_FRONT_DIFFUSE         (1<<MAT_ATTRIB_FRONT_DIFFUSE)
-#define MAT_BIT_BACK_DIFFUSE          (1<<MAT_ATTRIB_BACK_DIFFUSE)
-#define MAT_BIT_FRONT_SPECULAR        (1<<MAT_ATTRIB_FRONT_SPECULAR)
-#define MAT_BIT_BACK_SPECULAR         (1<<MAT_ATTRIB_BACK_SPECULAR)
-#define MAT_BIT_FRONT_EMISSION        (1<<MAT_ATTRIB_FRONT_EMISSION)
-#define MAT_BIT_BACK_EMISSION         (1<<MAT_ATTRIB_BACK_EMISSION)
-#define MAT_BIT_FRONT_SHININESS       (1<<MAT_ATTRIB_FRONT_SHININESS)
-#define MAT_BIT_BACK_SHININESS        (1<<MAT_ATTRIB_BACK_SHININESS)
-#define MAT_BIT_FRONT_INDEXES         (1<<MAT_ATTRIB_FRONT_INDEXES)
-#define MAT_BIT_BACK_INDEXES          (1<<MAT_ATTRIB_BACK_INDEXES)
-
-
-#define FRONT_MATERIAL_BITS	(MAT_BIT_FRONT_EMISSION | 	\
-				 MAT_BIT_FRONT_AMBIENT |	\
-				 MAT_BIT_FRONT_DIFFUSE | 	\
-				 MAT_BIT_FRONT_SPECULAR |	\
-				 MAT_BIT_FRONT_SHININESS | 	\
-				 MAT_BIT_FRONT_INDEXES)
-
-#define BACK_MATERIAL_BITS	(MAT_BIT_BACK_EMISSION |	\
-				 MAT_BIT_BACK_AMBIENT |		\
-				 MAT_BIT_BACK_DIFFUSE |		\
-				 MAT_BIT_BACK_SPECULAR |	\
-				 MAT_BIT_BACK_SHININESS |	\
-				 MAT_BIT_BACK_INDEXES)
-
-#define ALL_MATERIAL_BITS	(FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS)
-/*@}*/
-
-
-#define EXP_TABLE_SIZE 512	/**< Specular exponent lookup table sizes */
-#define SHINE_TABLE_SIZE 256	/**< Material shininess lookup table sizes */
-
-/**
- * Material shininess lookup table.
- */
-struct gl_shine_tab
-{
-   struct gl_shine_tab *next, *prev;
-   GLfloat tab[SHINE_TABLE_SIZE+1];
-   GLfloat shininess;
-   GLuint refcount;
-};
-
-
-/**
- * Light source state.
- */
-struct gl_light
-{
-   struct gl_light *next;	/**< double linked list with sentinel */
-   struct gl_light *prev;
-
-   GLfloat Ambient[4];		/**< ambient color */
-   GLfloat Diffuse[4];		/**< diffuse color */
-   GLfloat Specular[4];		/**< specular color */
-   GLfloat EyePosition[4];	/**< position in eye coordinates */
-   GLfloat SpotDirection[4];	/**< spotlight direction in eye coordinates */
-   GLfloat SpotExponent;
-   GLfloat SpotCutoff;		/**< in degrees */
-   GLfloat _CosCutoffNeg;	/**< = cos(SpotCutoff) */
-   GLfloat _CosCutoff;		/**< = MAX(0, cos(SpotCutoff)) */
-   GLfloat ConstantAttenuation;
-   GLfloat LinearAttenuation;
-   GLfloat QuadraticAttenuation;
-   GLboolean Enabled;		/**< On/off flag */
-
-   /** 
-    * \name Derived fields
-    */
-   /*@{*/
-   GLbitfield _Flags;		/**< State */
-
-   GLfloat _Position[4];	/**< position in eye/obj coordinates */
-   GLfloat _VP_inf_norm[3];	/**< Norm direction to infinite light */
-   GLfloat _h_inf_norm[3];	/**< Norm( _VP_inf_norm + <0,0,1> ) */
-   GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */
-   GLfloat _VP_inf_spot_attenuation;
-
-   GLfloat _SpotExpTable[EXP_TABLE_SIZE][2];  /**< to replace a pow() call */
-   GLfloat _MatAmbient[2][3];	/**< material ambient * light ambient */
-   GLfloat _MatDiffuse[2][3];	/**< material diffuse * light diffuse */
-   GLfloat _MatSpecular[2][3];	/**< material spec * light specular */
-   GLfloat _dli;		/**< CI diffuse light intensity */
-   GLfloat _sli;		/**< CI specular light intensity */
-   /*@}*/
-};
-
-
-/**
- * Light model state.
- */
-struct gl_lightmodel
-{
-   GLfloat Ambient[4];		/**< ambient color */
-   GLboolean LocalViewer;	/**< Local (or infinite) view point? */
-   GLboolean TwoSide;		/**< Two (or one) sided lighting? */
-   GLenum ColorControl;		/**< either GL_SINGLE_COLOR
-				 *    or GL_SEPARATE_SPECULAR_COLOR */
-};
-
-
-/**
- * Material state.
- */
-struct gl_material
-{
-   GLfloat Attrib[MAT_ATTRIB_MAX][4];
-};
-
-
-/**
- * Accumulation buffer attribute group (GL_ACCUM_BUFFER_BIT)
- */
-struct gl_accum_attrib
-{
-   GLfloat ClearColor[4];	/**< Accumulation buffer clear color */
-};
-
-
-/**
- * Color buffer attribute group (GL_COLOR_BUFFER_BIT).
- */
-struct gl_colorbuffer_attrib
-{
-   GLuint ClearIndex;			/**< Index to use for glClear */
-   GLclampf ClearColor[4];		/**< Color to use for glClear */
-
-   GLuint IndexMask;			/**< Color index write mask */
-   GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */
-
-   GLenum DrawBuffer[MAX_DRAW_BUFFERS];	/**< Which buffer to draw into */
-
-   /** 
-    * \name alpha testing
-    */
-   /*@{*/
-   GLboolean AlphaEnabled;		/**< Alpha test enabled flag */
-   GLenum AlphaFunc;			/**< Alpha test function */
-   GLclampf AlphaRef;			/**< Alpha reference value */
-   /*@}*/
-
-   /** 
-    * \name Blending
-    */
-   /*@{*/
-   GLbitfield BlendEnabled;		/**< Per-buffer blend enable flags */
-   GLenum BlendSrcRGB;			/**< Blending source operator */
-   GLenum BlendDstRGB;			/**< Blending destination operator */
-   GLenum BlendSrcA;			/**< GL_INGR_blend_func_separate */
-   GLenum BlendDstA;			/**< GL_INGR_blend_func_separate */
-   GLenum BlendEquationRGB;		/**< Blending equation */
-   GLenum BlendEquationA;		/**< GL_EXT_blend_equation_separate */
-   GLfloat BlendColor[4];		/**< Blending color */
-   /*@}*/
-
-   /** 
-    * \name Logic op
-    */
-   /*@{*/
-   GLenum LogicOp;			/**< Logic operator */
-   GLboolean IndexLogicOpEnabled;	/**< Color index logic op enabled flag */
-   GLboolean ColorLogicOpEnabled;	/**< RGBA logic op enabled flag */
-   GLboolean _LogicOpEnabled;		/**< RGBA logic op + EXT_blend_logic_op enabled flag */
-   /*@}*/
-
-   GLboolean DitherFlag;		/**< Dither enable flag */
-
-   GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
-   GLenum ClampReadColor;     /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
-};
-
-
-/**
- * Current attribute group (GL_CURRENT_BIT).
- */
-struct gl_current_attrib
-{
-   /**
-    * \name Current vertex attributes.
-    * \note Values are valid only after FLUSH_VERTICES has been called.
-    * \note Index and Edgeflag current values are stored as floats in the 
-    * SIX and SEVEN attribute slots.
-    */
-   GLfloat Attrib[VERT_ATTRIB_MAX][4];	/**< Position, color, texcoords, etc */
-
-   /**
-    * \name Current raster position attributes (always valid).
-    * \note This set of attributes is very similar to the SWvertex struct.
-    */
-   /*@{*/
-   GLfloat RasterPos[4];
-   GLfloat RasterDistance;
-   GLfloat RasterColor[4];
-   GLfloat RasterSecondaryColor[4];
-   GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4];
-   GLboolean RasterPosValid;
-   /*@}*/
-};
-
-
-/**
- * Depth buffer attribute group (GL_DEPTH_BUFFER_BIT).
- */
-struct gl_depthbuffer_attrib
-{
-   GLenum Func;			/**< Function for depth buffer compare */
-   GLclampd Clear;		/**< Value to clear depth buffer to */
-   GLboolean Test;		/**< Depth buffering enabled flag */
-   GLboolean Mask;		/**< Depth buffer writable? */
-   GLboolean BoundsTest;        /**< GL_EXT_depth_bounds_test */
-   GLfloat BoundsMin, BoundsMax;/**< GL_EXT_depth_bounds_test */
-};
-
-
-/**
- * Evaluator attribute group (GL_EVAL_BIT).
- */
-struct gl_eval_attrib
-{
-   /**
-    * \name Enable bits 
-    */
-   /*@{*/
-   GLboolean Map1Color4;
-   GLboolean Map1Index;
-   GLboolean Map1Normal;
-   GLboolean Map1TextureCoord1;
-   GLboolean Map1TextureCoord2;
-   GLboolean Map1TextureCoord3;
-   GLboolean Map1TextureCoord4;
-   GLboolean Map1Vertex3;
-   GLboolean Map1Vertex4;
-   GLboolean Map1Attrib[16];  /* GL_NV_vertex_program */
-   GLboolean Map2Color4;
-   GLboolean Map2Index;
-   GLboolean Map2Normal;
-   GLboolean Map2TextureCoord1;
-   GLboolean Map2TextureCoord2;
-   GLboolean Map2TextureCoord3;
-   GLboolean Map2TextureCoord4;
-   GLboolean Map2Vertex3;
-   GLboolean Map2Vertex4;
-   GLboolean Map2Attrib[16];  /* GL_NV_vertex_program */
-   GLboolean AutoNormal;
-   /*@}*/
-   
-   /**
-    * \name Map Grid endpoints and divisions and calculated du values
-    */
-   /*@{*/
-   GLint MapGrid1un;
-   GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du;
-   GLint MapGrid2un, MapGrid2vn;
-   GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du;
-   GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv;
-   /*@}*/
-};
-
-
-/**
- * Fog attribute group (GL_FOG_BIT).
- */
-struct gl_fog_attrib
-{
-   GLboolean Enabled;		/**< Fog enabled flag */
-   GLfloat Color[4];		/**< Fog color */
-   GLfloat Density;		/**< Density >= 0.0 */
-   GLfloat Start;		/**< Start distance in eye coords */
-   GLfloat End;			/**< End distance in eye coords */
-   GLfloat Index;		/**< Fog index */
-   GLenum Mode;			/**< Fog mode */
-   GLboolean ColorSumEnabled;
-   GLenum FogCoordinateSource;  /**< GL_EXT_fog_coord */
-   GLfloat _Scale;		/**< (End == Start) ? 1.0 : 1.0 / (End - Start) */
-};
-
-
-/** 
- * Hint attribute group (GL_HINT_BIT).
- * 
- * Values are always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE.
- */
-struct gl_hint_attrib
-{
-   GLenum PerspectiveCorrection;
-   GLenum PointSmooth;
-   GLenum LineSmooth;
-   GLenum PolygonSmooth;
-   GLenum Fog;
-   GLenum ClipVolumeClipping;   /**< GL_EXT_clip_volume_hint */
-   GLenum TextureCompression;   /**< GL_ARB_texture_compression */
-   GLenum GenerateMipmap;       /**< GL_SGIS_generate_mipmap */
-   GLenum FragmentShaderDerivative; /**< GL_ARB_fragment_shader */
-};
-
-/**
- * Light state flags.
- */
-/*@{*/
-#define LIGHT_SPOT         0x1
-#define LIGHT_LOCAL_VIEWER 0x2
-#define LIGHT_POSITIONAL   0x4
-#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER)
-/*@}*/
-
-
-/**
- * Lighting attribute group (GL_LIGHT_BIT).
- */
-struct gl_light_attrib
-{
-   struct gl_light Light[MAX_LIGHTS];	/**< Array of light sources */
-   struct gl_lightmodel Model;		/**< Lighting model */
-
-   /**
-    * Must flush FLUSH_VERTICES before referencing:
-    */
-   /*@{*/
-   struct gl_material Material; 	/**< Includes front & back values */
-   /*@}*/
-
-   GLboolean Enabled;			/**< Lighting enabled flag */
-   GLenum ShadeModel;			/**< GL_FLAT or GL_SMOOTH */
-   GLenum ProvokingVertex;              /**< GL_EXT_provoking_vertex */
-   GLenum ColorMaterialFace;		/**< GL_FRONT, BACK or FRONT_AND_BACK */
-   GLenum ColorMaterialMode;		/**< GL_AMBIENT, GL_DIFFUSE, etc */
-   GLbitfield ColorMaterialBitmask;	/**< bitmask formed from Face and Mode */
-   GLboolean ColorMaterialEnabled;
-   GLenum ClampVertexColor;
-
-   struct gl_light EnabledList;         /**< List sentinel */
-
-   /** 
-    * Derived state for optimizations: 
-    */
-   /*@{*/
-   GLboolean _NeedEyeCoords;		
-   GLboolean _NeedVertices;		/**< Use fast shader? */
-   GLbitfield _Flags;		        /**< LIGHT_* flags, see above */
-   GLfloat _BaseColor[2][3];
-   /*@}*/
-};
-
-
-/**
- * Line attribute group (GL_LINE_BIT).
- */
-struct gl_line_attrib
-{
-   GLboolean SmoothFlag;	/**< GL_LINE_SMOOTH enabled? */
-   GLboolean StippleFlag;	/**< GL_LINE_STIPPLE enabled? */
-   GLushort StipplePattern;	/**< Stipple pattern */
-   GLint StippleFactor;		/**< Stipple repeat factor */
-   GLfloat Width;		/**< Line width */
-};
-
-
-/**
- * Display list attribute group (GL_LIST_BIT).
- */
-struct gl_list_attrib
-{
-   GLuint ListBase;
-};
-
-
-/**
- * Multisample attribute group (GL_MULTISAMPLE_BIT).
- */
-struct gl_multisample_attrib
-{
-   GLboolean Enabled;
-   GLboolean _Enabled;   /**< true if Enabled and multisample buffer */
-   GLboolean SampleAlphaToCoverage;
-   GLboolean SampleAlphaToOne;
-   GLboolean SampleCoverage;
-   GLfloat SampleCoverageValue;
-   GLboolean SampleCoverageInvert;
-};
-
-
-/**
- * A pixelmap (see glPixelMap)
- */
-struct gl_pixelmap
-{
-   GLint Size;
-   GLfloat Map[MAX_PIXEL_MAP_TABLE];
-   GLubyte Map8[MAX_PIXEL_MAP_TABLE];  /**< converted to 8-bit color */
-};
-
-
-/**
- * Collection of all pixelmaps
- */
-struct gl_pixelmaps
-{
-   struct gl_pixelmap RtoR;  /**< i.e. GL_PIXEL_MAP_R_TO_R */
-   struct gl_pixelmap GtoG;
-   struct gl_pixelmap BtoB;
-   struct gl_pixelmap AtoA;
-   struct gl_pixelmap ItoR;
-   struct gl_pixelmap ItoG;
-   struct gl_pixelmap ItoB;
-   struct gl_pixelmap ItoA;
-   struct gl_pixelmap ItoI;
-   struct gl_pixelmap StoS;
-};
-
-
-/**
- * Pixel attribute group (GL_PIXEL_MODE_BIT).
- */
-struct gl_pixel_attrib
-{
-   GLenum ReadBuffer;		/**< source buffer for glRead/CopyPixels() */
-
-   /*--- Begin Pixel Transfer State ---*/
-   /* Fields are in the order in which they're applied... */
-
-   /** Scale & Bias (index shift, offset) */
-   /*@{*/
-   GLfloat RedBias, RedScale;
-   GLfloat GreenBias, GreenScale;
-   GLfloat BlueBias, BlueScale;
-   GLfloat AlphaBias, AlphaScale;
-   GLfloat DepthBias, DepthScale;
-   GLint IndexShift, IndexOffset;
-   /*@}*/
-
-   /* Pixel Maps */
-   /* Note: actual pixel maps are not part of this attrib group */
-   GLboolean MapColorFlag;
-   GLboolean MapStencilFlag;
-
-   /*--- End Pixel Transfer State ---*/
-
-   /** glPixelZoom */
-   GLfloat ZoomX, ZoomY;
-
-   /** GL_SGI_texture_color_table */
-   GLfloat TextureColorTableScale[4]; /**< RGBA */
-   GLfloat TextureColorTableBias[4];  /**< RGBA */
-};
-
-
-/**
- * Point attribute group (GL_POINT_BIT).
- */
-struct gl_point_attrib
-{
-   GLboolean SmoothFlag;	/**< True if GL_POINT_SMOOTH is enabled */
-   GLfloat Size;		/**< User-specified point size */
-   GLfloat Params[3];		/**< GL_EXT_point_parameters */
-   GLfloat MinSize, MaxSize;	/**< GL_EXT_point_parameters */
-   GLfloat Threshold;		/**< GL_EXT_point_parameters */
-   GLboolean _Attenuated;	/**< True if Params != [1, 0, 0] */
-   GLboolean PointSprite;	/**< GL_NV/ARB_point_sprite */
-   GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/
-   GLenum SpriteRMode;		/**< GL_NV_point_sprite (only!) */
-   GLenum SpriteOrigin;		/**< GL_ARB_point_sprite */
-};
-
-
-/**
- * Polygon attribute group (GL_POLYGON_BIT).
- */
-struct gl_polygon_attrib
-{
-   GLenum FrontFace;		/**< Either GL_CW or GL_CCW */
-   GLenum FrontMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
-   GLenum BackMode;		/**< Either GL_POINT, GL_LINE or GL_FILL */
-   GLboolean _FrontBit;		/**< 0=GL_CCW, 1=GL_CW */
-   GLboolean CullFlag;		/**< Culling on/off flag */
-   GLboolean SmoothFlag;	/**< True if GL_POLYGON_SMOOTH is enabled */
-   GLboolean StippleFlag;	/**< True if GL_POLYGON_STIPPLE is enabled */
-   GLenum CullFaceMode;		/**< Culling mode GL_FRONT or GL_BACK */
-   GLfloat OffsetFactor;	/**< Polygon offset factor, from user */
-   GLfloat OffsetUnits;		/**< Polygon offset units, from user */
-   GLboolean OffsetPoint;	/**< Offset in GL_POINT mode */
-   GLboolean OffsetLine;	/**< Offset in GL_LINE mode */
-   GLboolean OffsetFill;	/**< Offset in GL_FILL mode */
-};
-
-
-/**
- * Scissor attributes (GL_SCISSOR_BIT).
- */
-struct gl_scissor_attrib
-{
-   GLboolean Enabled;		/**< Scissor test enabled? */
-   GLint X, Y;			/**< Lower left corner of box */
-   GLsizei Width, Height;	/**< Size of box */
-};
-
-
-/**
- * Stencil attribute group (GL_STENCIL_BUFFER_BIT).
- *
- * Three sets of stencil data are tracked so that OpenGL 2.0,
- * GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported
- * simultaneously.  In each of the stencil state arrays, element 0 corresponds
- * to GL_FRONT.  Element 1 corresponds to the OpenGL 2.0 /
- * GL_ATI_separate_stencil GL_BACK state.  Element 2 corresponds to the
- * GL_EXT_stencil_two_side GL_BACK state.
- *
- * The derived value \c _BackFace is either 1 or 2 depending on whether or
- * not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled.
- *
- * The derived value \c _TestTwoSide is set when the front-face and back-face
- * stencil state are different.
- */
-struct gl_stencil_attrib
-{
-   GLboolean Enabled;		/**< Enabled flag */
-   GLboolean TestTwoSide;	/**< GL_EXT_stencil_two_side */
-   GLubyte ActiveFace;		/**< GL_EXT_stencil_two_side (0 or 2) */
-   GLboolean _Enabled;          /**< Enabled and stencil buffer present */
-   GLboolean _TestTwoSide;
-   GLubyte _BackFace;           /**< Current back stencil state (1 or 2) */
-   GLenum Function[3];		/**< Stencil function */
-   GLenum FailFunc[3];		/**< Fail function */
-   GLenum ZPassFunc[3];		/**< Depth buffer pass function */
-   GLenum ZFailFunc[3];		/**< Depth buffer fail function */
-   GLint Ref[3];		/**< Reference value */
-   GLuint ValueMask[3];		/**< Value mask */
-   GLuint WriteMask[3];		/**< Write mask */
-   GLuint Clear;		/**< Clear value */
-};
-
-
-/**
- * An index for each type of texture object.  These correspond to the GL
- * texture target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc.
- * Note: the order is from highest priority to lowest priority.
- */
-typedef enum
-{
-   TEXTURE_2D_ARRAY_INDEX,
-   TEXTURE_1D_ARRAY_INDEX,
-   TEXTURE_CUBE_INDEX,
-   TEXTURE_3D_INDEX,
-   TEXTURE_RECT_INDEX,
-   TEXTURE_2D_INDEX,
-   TEXTURE_1D_INDEX,
-   NUM_TEXTURE_TARGETS
-} gl_texture_index;
-
-
-/**
- * Bit flags for each type of texture object
- * Used for Texture.Unit[]._ReallyEnabled flags.
- */
-/*@{*/
-#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX)
-#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX)
-#define TEXTURE_CUBE_BIT     (1 << TEXTURE_CUBE_INDEX)
-#define TEXTURE_3D_BIT       (1 << TEXTURE_3D_INDEX)
-#define TEXTURE_RECT_BIT     (1 << TEXTURE_RECT_INDEX)
-#define TEXTURE_2D_BIT       (1 << TEXTURE_2D_INDEX)
-#define TEXTURE_1D_BIT       (1 << TEXTURE_1D_INDEX)
-/*@}*/
-
-
-/**
- * TexGenEnabled flags.
- */
-/*@{*/
-#define S_BIT 1
-#define T_BIT 2
-#define R_BIT 4
-#define Q_BIT 8
-#define STR_BITS (S_BIT | T_BIT | R_BIT)
-/*@}*/
-
-
-/**
- * Bit flag versions of the corresponding GL_ constants.
- */
-/*@{*/
-#define TEXGEN_SPHERE_MAP        0x1
-#define TEXGEN_OBJ_LINEAR        0x2
-#define TEXGEN_EYE_LINEAR        0x4
-#define TEXGEN_REFLECTION_MAP_NV 0x8
-#define TEXGEN_NORMAL_MAP_NV     0x10
-
-#define TEXGEN_NEED_NORMALS      (TEXGEN_SPHERE_MAP        | \
-				  TEXGEN_REFLECTION_MAP_NV | \
-				  TEXGEN_NORMAL_MAP_NV)
-#define TEXGEN_NEED_EYE_COORD    (TEXGEN_SPHERE_MAP        | \
-				  TEXGEN_REFLECTION_MAP_NV | \
-				  TEXGEN_NORMAL_MAP_NV     | \
-				  TEXGEN_EYE_LINEAR)
-/*@}*/
-
-
-
-/** Tex-gen enabled for texture unit? */
-#define ENABLE_TEXGEN(unit) (1 << (unit))
-
-/** Non-identity texture matrix for texture unit? */
-#define ENABLE_TEXMAT(unit) (1 << (unit))
-
-
-/**
- * Texel fetch function prototype.  We use texel fetch functions to
- * extract RGBA, color indexes and depth components out of 1D, 2D and 3D
- * texture images.  These functions help to isolate us from the gritty
- * details of all the various texture image encodings.
- * 
- * \param texImage texture image.
- * \param col texel column.
- * \param row texel row.
- * \param img texel image level/layer.
- * \param texelOut output texel (up to 4 GLchans)
- */
-typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage,
-                                 GLint col, GLint row, GLint img,
-                                 GLchan *texelOut );
-
-/**
- * As above, but returns floats.
- * Used for depth component images and for upcoming signed/float
- * texture images.
- */
-typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage,
-                                 GLint col, GLint row, GLint img,
-                                 GLfloat *texelOut );
-
-
-typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage,
-                               GLint col, GLint row, GLint img,
-                               const void *texel);
-
-
-/**
- * Texture image state.  Describes the dimensions of a texture image,
- * the texel format and pointers to Texel Fetch functions.
- */
-struct gl_texture_image
-{
-   GLint InternalFormat;	/**< Internal format as given by the user */
-   GLenum _BaseFormat;		/**< Either GL_RGB, GL_RGBA, GL_ALPHA,
-				 *   GL_LUMINANCE, GL_LUMINANCE_ALPHA,
-				 *   GL_INTENSITY, GL_COLOR_INDEX,
-				 *   GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT
-                                 *   only. Used for choosing TexEnv arithmetic.
-				 */
-   GLuint TexFormat;            /**< The actual format: MESA_FORMAT_x */
-
-   GLuint Border;		/**< 0 or 1 */
-   GLuint Width;		/**< = 2^WidthLog2 + 2*Border */
-   GLuint Height;		/**< = 2^HeightLog2 + 2*Border */
-   GLuint Depth;		/**< = 2^DepthLog2 + 2*Border */
-   GLuint Width2;		/**< = Width - 2*Border */
-   GLuint Height2;		/**< = Height - 2*Border */
-   GLuint Depth2;		/**< = Depth - 2*Border */
-   GLuint WidthLog2;		/**< = log2(Width2) */
-   GLuint HeightLog2;		/**< = log2(Height2) */
-   GLuint DepthLog2;		/**< = log2(Depth2) */
-   GLuint MaxLog2;		/**< = MAX(WidthLog2, HeightLog2) */
-   GLfloat WidthScale;		/**< used for mipmap LOD computation */
-   GLfloat HeightScale;		/**< used for mipmap LOD computation */
-   GLfloat DepthScale;		/**< used for mipmap LOD computation */
-   GLboolean IsClientData;	/**< Data owned by client? */
-   GLboolean _IsPowerOfTwo;	/**< Are all dimensions powers of two? */
-
-   struct gl_texture_object *TexObject;  /**< Pointer back to parent object */
-
-   FetchTexelFuncC FetchTexelc;	/**< GLchan texel fetch function pointer */
-   FetchTexelFuncF FetchTexelf;	/**< Float texel fetch function pointer */
-
-   GLuint RowStride;		/**< Padded width in units of texels */
-   GLuint *ImageOffsets;        /**< if 3D texture: array [Depth] of offsets to
-                                     each 2D slice in 'Data', in texels */
-   GLvoid *Data;		/**< Image data, accessed via FetchTexel() */
-
-   /**
-    * \name For device driver:
-    */
-   /*@{*/
-   void *DriverData;		/**< Arbitrary device driver data */
-   /*@}*/
-};
-
-
-/**
- * Indexes for cube map faces.
- */
-typedef enum
-{
-   FACE_POS_X = 0,
-   FACE_NEG_X = 1,
-   FACE_POS_Y = 2,
-   FACE_NEG_Y = 3,
-   FACE_POS_Z = 4,
-   FACE_NEG_Z = 5,
-   MAX_FACES = 6
-} gl_face_index;
-
-
-///**
-// * Texture object state.  Contains the array of mipmap images, border color,
-// * wrap modes, filter modes, shadow/texcompare state, and the per-texture
-// * color palette.
-// */
-//struct gl_texture_object
-//{
-//   _glthread_Mutex Mutex;	/**< for thread safety */
-//   GLint RefCount;		/**< reference count */
-//   GLuint Name;			/**< the user-visible texture object ID */
-//   GLenum Target;               /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
-//   GLfloat Priority;		/**< in [0,1] */
-//   union {
-//      GLfloat f[4];
-//      GLuint ui[4];
-//      GLint i[4];
-//   } BorderColor;               /**< Interpreted according to texture format */
-//   GLenum WrapS;		/**< S-axis texture image wrap mode */
-//   GLenum WrapT;		/**< T-axis texture image wrap mode */
-//   GLenum WrapR;		/**< R-axis texture image wrap mode */
-//   GLenum MinFilter;		/**< minification filter */
-//   GLenum MagFilter;		/**< magnification filter */
-//   GLfloat MinLod;		/**< min lambda, OpenGL 1.2 */
-//   GLfloat MaxLod;		/**< max lambda, OpenGL 1.2 */
-//   GLfloat LodBias;		/**< OpenGL 1.4 */
-//   GLint BaseLevel;		/**< min mipmap level, OpenGL 1.2 */
-//   GLint MaxLevel;		/**< max mipmap level, OpenGL 1.2 */
-//   GLfloat MaxAnisotropy;	/**< GL_EXT_texture_filter_anisotropic */
-//   GLenum CompareMode;		/**< GL_ARB_shadow */
-//   GLenum CompareFunc;		/**< GL_ARB_shadow */
-//   GLfloat CompareFailValue;    /**< GL_ARB_shadow_ambient */
-//   GLenum DepthMode;		/**< GL_ARB_depth_texture */
-//   GLint _MaxLevel;		/**< actual max mipmap level (q in the spec) */
-//   GLfloat _MaxLambda;		/**< = _MaxLevel - BaseLevel (q - b in spec) */
-//   GLint CropRect[4];           /**< GL_OES_draw_texture */
-//   GLenum Swizzle[4];           /**< GL_EXT_texture_swizzle */
-//   GLuint _Swizzle;             /**< same as Swizzle, but SWIZZLE_* format */
-//   GLboolean GenerateMipmap;    /**< GL_SGIS_generate_mipmap */
-//   GLboolean _Complete;		/**< Is texture object complete? */
-//   GLboolean _RenderToTexture;  /**< Any rendering to this texture? */
-//   GLboolean Purgeable;         /**< Is the buffer purgeable under memory pressure? */
-//
-//   /** Actual texture images, indexed by [cube face] and [mipmap level] */
-//   struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
-//
-//   /** GL_EXT_paletted_texture */
-//   struct gl_color_table Palette;
-//
-//   /**
-//    * \name For device driver.
-//    * Note: instead of attaching driver data to this pointer, it's preferable
-//    * to instead use this struct as a base class for your own texture object
-//    * class.  Driver->NewTextureObject() can be used to implement the
-//    * allocation.
-//    */
-//   void *DriverData;	/**< Arbitrary device driver data */
-//};
-
-
-/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */
-#define MAX_COMBINER_TERMS 4
-
-
-/**
- * Texture combine environment state.
- */
-struct gl_tex_env_combine_state
-{
-   GLenum ModeRGB;       /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
-   GLenum ModeA;         /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
-   /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */
-   GLenum SourceRGB[MAX_COMBINER_TERMS];
-   GLenum SourceA[MAX_COMBINER_TERMS];
-   /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */
-   GLenum OperandRGB[MAX_COMBINER_TERMS];
-   GLenum OperandA[MAX_COMBINER_TERMS];
-   GLuint ScaleShiftRGB; /**< 0, 1 or 2 */
-   GLuint ScaleShiftA;   /**< 0, 1 or 2 */
-   GLuint _NumArgsRGB;   /**< Number of inputs used for the RGB combiner */
-   GLuint _NumArgsA;     /**< Number of inputs used for the A combiner */
-};
-
-
-/**
- * Texture coord generation state.
- */
-struct gl_texgen
-{
-   GLenum Mode;         /**< GL_EYE_LINEAR, GL_SPHERE_MAP, etc */
-   GLbitfield _ModeBit; /**< TEXGEN_x bit corresponding to Mode */
-   GLfloat ObjectPlane[4];
-   GLfloat EyePlane[4];
-};
-
-
-/**
- * Texture unit state.  Contains enable flags, texture environment/function/
- * combiners, texgen state, pointers to current texture objects and
- * post-filter color tables.
- */
-struct gl_texture_unit
-{
-   GLbitfield Enabled;          /**< bitmask of TEXTURE_*_BIT flags */
-   GLbitfield _ReallyEnabled;   /**< 0 or exactly one of TEXTURE_*_BIT flags */
-
-   GLenum EnvMode;              /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */
-   GLfloat EnvColor[4];
-
-   struct gl_texgen GenS;
-   struct gl_texgen GenT;
-   struct gl_texgen GenR;
-   struct gl_texgen GenQ;
-   GLbitfield TexGenEnabled;	/**< Bitwise-OR of [STRQ]_BIT values */
-   GLbitfield _GenFlags;	/**< Bitwise-OR of Gen[STRQ]._ModeBit */
-
-   GLfloat LodBias;		/**< for biasing mipmap levels */
-   GLenum BumpTarget;
-   GLfloat RotMatrix[4]; /* 2x2 matrix */
-
-   /** 
-    * \name GL_EXT_texture_env_combine 
-    */
-   struct gl_tex_env_combine_state Combine;
-
-   /**
-    * Derived state based on \c EnvMode and the \c BaseFormat of the
-    * currently enabled texture.
-    */
-   struct gl_tex_env_combine_state _EnvMode;
-
-   /**
-    * Currently enabled combiner state.  This will point to either
-    * \c Combine or \c _EnvMode.
-    */
-   struct gl_tex_env_combine_state *_CurrentCombine;
-
-   /** Current texture object pointers */
-   struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS];
-
-   /** Points to highest priority, complete and enabled texture object */
-   struct gl_texture_object *_Current;
-
-   /** GL_SGI_texture_color_table */
-   /*@{*/
-   struct gl_color_table ColorTable;
-   struct gl_color_table ProxyColorTable;
-   GLboolean ColorTableEnabled;
-   /*@}*/
-};
-
-
-/**
- * Texture attribute group (GL_TEXTURE_BIT).
- */
-struct gl_texture_attrib
-{
-   GLuint CurrentUnit;   /**< GL_ACTIVE_TEXTURE */
-   struct gl_texture_unit Unit[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
-
-   struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS];
-
-   /** GL_ARB_seamless_cubemap */
-   GLboolean CubeMapSeamless;
-
-   /** GL_EXT_shared_texture_palette */
-   GLboolean SharedPalette;
-   struct gl_color_table Palette;
-
-   /** Texture units/samplers used by vertex or fragment texturing */
-   GLbitfield _EnabledUnits;
-
-   /** Texture coord units/sets used for fragment texturing */
-   GLbitfield _EnabledCoordUnits;
-
-   /** Texture coord units that have texgen enabled */
-   GLbitfield _TexGenEnabled;
-
-   /** Texture coord units that have non-identity matrices */
-   GLbitfield _TexMatEnabled;
-
-   /** Bitwise-OR of all Texture.Unit[i]._GenFlags */
-   GLbitfield _GenFlags;
-};
-
-
-/**
- * Transformation attribute group (GL_TRANSFORM_BIT).
- */
-struct gl_transform_attrib
-{
-   GLenum MatrixMode;				/**< Matrix mode */
-   GLfloat EyeUserPlane[MAX_CLIP_PLANES][4];	/**< User clip planes */
-   GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4];	/**< derived */
-   GLbitfield ClipPlanesEnabled;                /**< on/off bitmask */
-   GLboolean Normalize;				/**< Normalize all normals? */
-   GLboolean RescaleNormals;			/**< GL_EXT_rescale_normal */
-   GLboolean RasterPositionUnclipped;           /**< GL_IBM_rasterpos_clip */
-   GLboolean DepthClamp;			/**< GL_ARB_depth_clamp */
-
-   GLfloat CullEyePos[4];
-   GLfloat CullObjPos[4];
-};
-
-
-/**
- * Viewport attribute group (GL_VIEWPORT_BIT).
- */
-//struct gl_viewport_attrib
-//{
-//   GLint X, Y;			/**< position */
-//   GLsizei Width, Height;	/**< size */
-//   GLfloat Near, Far;		/**< Depth buffer range */
-//   GLmatrix _WindowMap;		/**< Mapping transformation as a matrix. */
-//};
-
-
-///**
-// * GL_ARB_vertex/pixel_buffer_object buffer object
-// */
-//struct gl_buffer_object
-//{
-//   _glthread_Mutex Mutex;
-//   GLint RefCount;
-//   GLuint Name;
-//   GLenum Usage;        /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */
-//   GLsizeiptrARB Size;  /**< Size of buffer storage in bytes */
-//   GLubyte *Data;       /**< Location of storage either in RAM or VRAM. */
-//   /** Fields describing a mapped buffer */
-//   /*@{*/
-//   GLbitfield AccessFlags; /**< Mask of GL_MAP_x_BIT flags */
-//   GLvoid *Pointer;     /**< User-space address of mapping */
-//   GLintptr Offset;     /**< Mapped offset */
-//   GLsizeiptr Length;   /**< Mapped length */
-//   /*@}*/
-//   GLboolean Written;   /**< Ever written to? (for debugging) */
-//   GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
-//};
-
-
-/**
- * Client pixel packing/unpacking attributes
- */
-struct gl_pixelstore_attrib
-{
-   GLint Alignment;
-   GLint RowLength;
-   GLint SkipPixels;
-   GLint SkipRows;
-   GLint ImageHeight;
-   GLint SkipImages;
-   GLboolean SwapBytes;
-   GLboolean LsbFirst;
-   GLboolean ClientStorage; /**< GL_APPLE_client_storage */
-   GLboolean Invert;        /**< GL_MESA_pack_invert */
-   struct gl_buffer_object *BufferObj; /**< GL_ARB_pixel_buffer_object */
-};
-
-
-/**
- * Client vertex array attributes
- */
-struct gl_client_array
-{
-   GLint Size;                  /**< components per element (1,2,3,4) */
-   GLenum Type;                 /**< datatype: GL_FLOAT, GL_INT, etc */
-   GLenum Format;               /**< default: GL_RGBA, but may be GL_BGRA */
-   GLsizei Stride;		/**< user-specified stride */
-   GLsizei StrideB;		/**< actual stride in bytes */
-   const GLubyte *Ptr;          /**< Points to array data */
-   GLboolean Enabled;		/**< Enabled flag is a boolean */
-   GLboolean Normalized;        /**< GL_ARB_vertex_program */
-   GLboolean Integer;           /**< Integer-valued? */
-   GLuint _ElementSize;         /**< size of each element in bytes */
-
-   struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
-   GLuint _MaxElement;          /**< max element index into array buffer + 1 */
-};
-
-
-///**
-// * Collection of vertex arrays.  Defined by the GL_APPLE_vertex_array_object
-// * extension, but a nice encapsulation in any case.
-// */
-//struct gl_array_object
-//{
-//   /** Name of the array object as received from glGenVertexArrayAPPLE. */
-//   GLuint Name;
-//
-//   GLint RefCount;
-//   _glthread_Mutex Mutex;
-//   GLboolean VBOonly;  /**< require all arrays to live in VBOs? */
-//
-//   /** Conventional vertex arrays */
-//   /*@{*/
-//   struct gl_client_array Vertex;
-//   struct gl_client_array Weight;
-//   struct gl_client_array Normal;
-//   struct gl_client_array Color;
-//   struct gl_client_array SecondaryColor;
-//   struct gl_client_array FogCoord;
-//   struct gl_client_array Index;
-//   struct gl_client_array EdgeFlag;
-//   struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS];
-//   struct gl_client_array PointSize;
-//   /*@}*/
-//
-//   /**
-//    * Generic arrays for vertex programs/shaders.
-//    * For NV vertex programs, these attributes alias and take priority
-//    * over the conventional attribs above.  For ARB vertex programs and
-//    * GLSL vertex shaders, these attributes are separate.
-//    */
-//   struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
-//
-//   /** Mask of _NEW_ARRAY_* values indicating which arrays are enabled */
-//   GLbitfield _Enabled;
-//
-//   /**
-//    * Min of all enabled arrays' _MaxElement.  When arrays reside inside VBOs
-//    * we can determine the max legal (in bounds) glDrawElements array index.
-//    */
-//   GLuint _MaxElement;
-//};
-
-
-/**
- * Vertex array state
- */
-struct gl_array_attrib
-{
-   /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
-   struct gl_array_object *ArrayObj;
-
-   /** The default vertex array object */
-   struct gl_array_object *DefaultArrayObj;
-
-   /** Array objects (GL_ARB/APPLE_vertex_array_object) */
-   struct _mesa_HashTable *Objects;
-
-   GLint ActiveTexture;		/**< Client Active Texture */
-   GLuint LockFirst;            /**< GL_EXT_compiled_vertex_array */
-   GLuint LockCount;            /**< GL_EXT_compiled_vertex_array */
-
-   /** GL 3.1 (slightly different from GL_NV_primitive_restart) */
-   GLboolean PrimitiveRestart;
-   GLuint RestartIndex;
-
-   GLbitfield NewState;		/**< mask of _NEW_ARRAY_* values */
-
-   /* GL_ARB_vertex_buffer_object */
-   struct gl_buffer_object *ArrayBufferObj;
-   struct gl_buffer_object *ElementArrayBufferObj;
-};
-
-
-/**
- * Feedback buffer state
- */
-struct gl_feedback
-{
-   GLenum Type;
-   GLbitfield _Mask;    /**< FB_* bits */
-   GLfloat *Buffer;
-   GLuint BufferSize;
-   GLuint Count;
-};
-
-
-/**
- * Selection buffer state
- */
-struct gl_selection
-{
-   GLuint *Buffer;	/**< selection buffer */
-   GLuint BufferSize;	/**< size of the selection buffer */
-   GLuint BufferCount;	/**< number of values in the selection buffer */
-   GLuint Hits;		/**< number of records in the selection buffer */
-   GLuint NameStackDepth; /**< name stack depth */
-   GLuint NameStack[MAX_NAME_STACK_DEPTH]; /**< name stack */
-   GLboolean HitFlag;	/**< hit flag */
-   GLfloat HitMinZ;	/**< minimum hit depth */
-   GLfloat HitMaxZ;	/**< maximum hit depth */
-};
-
-
-/**
- * 1-D Evaluator control points
- */
-struct gl_1d_map
-{
-   GLuint Order;	/**< Number of control points */
-   GLfloat u1, u2, du;	/**< u1, u2, 1.0/(u2-u1) */
-   GLfloat *Points;	/**< Points to contiguous control points */
-};
-
-
-/**
- * 2-D Evaluator control points
- */
-struct gl_2d_map
-{
-   GLuint Uorder;		/**< Number of control points in U dimension */
-   GLuint Vorder;		/**< Number of control points in V dimension */
-   GLfloat u1, u2, du;
-   GLfloat v1, v2, dv;
-   GLfloat *Points;		/**< Points to contiguous control points */
-};
-
-
-/**
- * All evaluator control point state
- */
-struct gl_evaluators
-{
-   /** 
-    * \name 1-D maps
-    */
-   /*@{*/
-   struct gl_1d_map Map1Vertex3;
-   struct gl_1d_map Map1Vertex4;
-   struct gl_1d_map Map1Index;
-   struct gl_1d_map Map1Color4;
-   struct gl_1d_map Map1Normal;
-   struct gl_1d_map Map1Texture1;
-   struct gl_1d_map Map1Texture2;
-   struct gl_1d_map Map1Texture3;
-   struct gl_1d_map Map1Texture4;
-   struct gl_1d_map Map1Attrib[16];  /**< GL_NV_vertex_program */
-   /*@}*/
-
-   /** 
-    * \name 2-D maps 
-    */
-   /*@{*/
-   struct gl_2d_map Map2Vertex3;
-   struct gl_2d_map Map2Vertex4;
-   struct gl_2d_map Map2Index;
-   struct gl_2d_map Map2Color4;
-   struct gl_2d_map Map2Normal;
-   struct gl_2d_map Map2Texture1;
-   struct gl_2d_map Map2Texture2;
-   struct gl_2d_map Map2Texture3;
-   struct gl_2d_map Map2Texture4;
-   struct gl_2d_map Map2Attrib[16];  /**< GL_NV_vertex_program */
-   /*@}*/
-};
-
-
-/**
- * Names of the various vertex/fragment program register files, etc.
- *
- * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
- * All values should fit in a 4-bit field.
- *
- * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM,
- * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to
- * be "uniform" variables since they can only be set outside glBegin/End.
- * They're also all stored in the same Parameters array.
- */
-typedef enum
-{
-   PROGRAM_TEMPORARY,   /**< machine->Temporary[] */
-   PROGRAM_INPUT,       /**< machine->Inputs[] */
-   PROGRAM_OUTPUT,      /**< machine->Outputs[] */
-   PROGRAM_VARYING,     /**< machine->Inputs[]/Outputs[] */
-   PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
-   PROGRAM_ENV_PARAM,   /**< gl_program->Parameters[] */
-   PROGRAM_STATE_VAR,   /**< gl_program->Parameters[] */
-   PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */
-   PROGRAM_CONSTANT,    /**< gl_program->Parameters[] */
-   PROGRAM_UNIFORM,     /**< gl_program->Parameters[] */
-   PROGRAM_WRITE_ONLY,  /**< A dummy, write-only register */
-   PROGRAM_ADDRESS,     /**< machine->AddressReg */
-   PROGRAM_SAMPLER,     /**< for shader samplers, compile-time only */
-   PROGRAM_UNDEFINED,   /**< Invalid/TBD value */
-   PROGRAM_FILE_MAX
-} gl_register_file;
-
-
-/** Vertex and fragment instructions */
-struct prog_instruction;
-struct gl_program_parameter_list;
-struct gl_uniform_list;
-
-
-/**
- * Base class for any kind of program object
- */
-struct gl_program
-{
-   GLuint Id;
-   GLubyte *String;  /**< Null-terminated program text */
-   GLint RefCount;
-   GLenum Target;    /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */
-   GLenum Format;    /**< String encoding format */
-   GLboolean Resident;
-
-   struct prog_instruction *Instructions;
-
-   GLbitfield InputsRead;     /**< Bitmask of which input regs are read */
-   GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
-   GLbitfield InputFlags[MAX_PROGRAM_INPUTS];   /**< PROG_PARAM_BIT_x flags */
-   GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */
-   GLbitfield TexturesUsed[MAX_TEXTURE_UNITS];  /**< TEXTURE_x_BIT bitmask */
-   GLbitfield SamplersUsed;   /**< Bitfield of which samplers are used */
-   GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
-
-
-   /** Named parameters, constants, etc. from program text */
-   struct gl_program_parameter_list *Parameters;
-   /** Numbered local parameters */
-   GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4];
-
-   /** Vertex/fragment shader varying vars */
-   struct gl_program_parameter_list *Varying;
-   /** Vertex program user-defined attributes */
-   struct gl_program_parameter_list *Attributes;
-
-   /** Map from sampler unit to texture unit (set by glUniform1i()) */
-   GLubyte SamplerUnits[MAX_SAMPLERS];
-   /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
-   gl_texture_index SamplerTargets[MAX_SAMPLERS];
-
-   /** Bitmask of which register files are read/written with indirect
-    * addressing.  Mask of (1 << PROGRAM_x) bits.
-    */
-   GLbitfield IndirectRegisterFiles;
-
-   /** Logical counts */
-   /*@{*/
-   GLuint NumInstructions;
-   GLuint NumTemporaries;
-   GLuint NumParameters;
-   GLuint NumAttributes;
-   GLuint NumAddressRegs;
-   GLuint NumAluInstructions;
-   GLuint NumTexInstructions;
-   GLuint NumTexIndirections;
-   /*@}*/
-   /** Native, actual h/w counts */
-   /*@{*/
-   GLuint NumNativeInstructions;
-   GLuint NumNativeTemporaries;
-   GLuint NumNativeParameters;
-   GLuint NumNativeAttributes;
-   GLuint NumNativeAddressRegs;
-   GLuint NumNativeAluInstructions;
-   GLuint NumNativeTexInstructions;
-   GLuint NumNativeTexIndirections;
-   /*@}*/
-};
-
-
-/** Vertex program object */
-struct gl_vertex_program
-{
-   struct gl_program Base;   /**< base class */
-   GLboolean IsNVProgram;    /**< is this a GL_NV_vertex_program program? */
-   GLboolean IsPositionInvariant;
-};
-
-
-/** Geometry program object */
-struct gl_geometry_program
-{
-   struct gl_program Base;   /**< base class */
-
-   GLint VerticesOut;
-   GLenum InputType;  /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
-                           GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
-   GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
-};
-
-
-/** Fragment program object */
-struct gl_fragment_program
-{
-   struct gl_program Base;   /**< base class */
-   GLenum FogOption;
-   GLboolean UsesKill;          /**< shader uses KIL instruction */
-   GLboolean OriginUpperLeft;
-   GLboolean PixelCenterInteger;
-};
-
-
-/**
- * State common to vertex and fragment programs.
- */
-struct gl_program_state
-{
-   GLint ErrorPos;                       /* GL_PROGRAM_ERROR_POSITION_ARB/NV */
-   const char *ErrorString;              /* GL_PROGRAM_ERROR_STRING_ARB/NV */
-};
-
-
-/**
- * Context state for vertex programs.
- */
-struct gl_vertex_program_state
-{
-   GLboolean Enabled;            /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */
-   GLboolean _Enabled;           /**< Enabled and _valid_ user program? */
-   GLboolean PointSizeEnabled;   /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
-   GLboolean TwoSideEnabled;     /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
-   struct gl_vertex_program *Current;  /**< User-bound vertex program */
-
-   /** Currently enabled and valid vertex program (including internal
-    * programs, user-defined vertex programs and GLSL vertex shaders).
-    * This is the program we must use when rendering.
-    */
-   struct gl_vertex_program *_Current;
-
-   GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
-
-   /* For GL_NV_vertex_program only: */
-   GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4];
-   GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4];
-
-   /** Should fixed-function T&L be implemented with a vertex prog? */
-   GLboolean _MaintainTnlProgram;
-
-   /** Program to emulate fixed-function T&L (see above) */
-   struct gl_vertex_program *_TnlProgram;
-
-   /** Cache of fixed-function programs */
-   struct gl_program_cache *Cache;
-
-   GLboolean _Overriden;
-};
-
-
-/**
- * Context state for geometry programs.
- */
-struct gl_geometry_program_state
-{
-   GLboolean Enabled;               /**< GL_ARB_GEOMETRY_SHADER4 */
-   GLboolean _Enabled;              /**< Enabled and valid program? */
-   struct gl_geometry_program *Current;  /**< user-bound geometry program */
-
-   /** Currently enabled and valid program (including internal programs
-    * and compiled shader programs).
-    */
-   struct gl_geometry_program *_Current;
-
-   GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
-
-   /** Cache of fixed-function programs */
-   struct gl_program_cache *Cache;
-};
-
-/**
- * Context state for fragment programs.
- */
-struct gl_fragment_program_state
-{
-   GLboolean Enabled;     /**< User-set fragment program enable flag */
-   GLboolean _Enabled;    /**< Enabled and _valid_ user program? */
-   struct gl_fragment_program *Current;  /**< User-bound fragment program */
-
-   /** Currently enabled and valid fragment program (including internal
-    * programs, user-defined fragment programs and GLSL fragment shaders).
-    * This is the program we must use when rendering.
-    */
-   struct gl_fragment_program *_Current;
-
-   GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
-
-   /** Should fixed-function texturing be implemented with a fragment prog? */
-   GLboolean _MaintainTexEnvProgram;
-
-   /** Program to emulate fixed-function texture env/combine (see above) */
-   struct gl_fragment_program *_TexEnvProgram;
-
-   /** Cache of fixed-function programs */
-   struct gl_program_cache *Cache;
-};
-
-
-/**
- * ATI_fragment_shader runtime state
- */
-#define ATI_FS_INPUT_PRIMARY 0
-#define ATI_FS_INPUT_SECONDARY 1
-
-struct atifs_instruction;
-struct atifs_setupinst;
-
-/**
- * ATI fragment shader
- */
-struct ati_fragment_shader
-{
-   GLuint Id;
-   GLint RefCount;
-   struct atifs_instruction *Instructions[2];
-   struct atifs_setupinst *SetupInst[2];
-   GLfloat Constants[8][4];
-   GLbitfield LocalConstDef;  /**< Indicates which constants have been set */
-   GLubyte numArithInstr[2];
-   GLubyte regsAssigned[2];
-   GLubyte NumPasses;         /**< 1 or 2 */
-   GLubyte cur_pass;
-   GLubyte last_optype;
-   GLboolean interpinp1;
-   GLboolean isValid;
-   GLuint swizzlerq;
-};
-
-/**
- * Context state for GL_ATI_fragment_shader
- */
-struct gl_ati_fragment_shader_state
-{
-   GLboolean Enabled;
-   GLboolean _Enabled;                  /**< enabled and valid shader? */
-   GLboolean Compiling;
-   GLfloat GlobalConstants[8][4];
-   struct ati_fragment_shader *Current;
-};
-
-
-/**
- * Occlusion/timer query object.
- */
-struct gl_query_object
-{
-   GLenum Target;      /**< The query target, when active */
-   GLuint Id;          /**< hash table ID/name */
-   GLuint64EXT Result; /**< the counter */
-   GLboolean Active;   /**< inside Begin/EndQuery */
-   GLboolean Ready;    /**< result is ready? */
-};
-
-
-/**
- * Context state for query objects.
- */
-struct gl_query_state
-{
-   struct _mesa_HashTable *QueryObjects;
-   struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */
-   struct gl_query_object *CurrentTimerObject;     /* GL_EXT_timer_query */
-
-   /** GL_NV_conditional_render */
-   struct gl_query_object *CondRenderQuery;
-
-   /** GL_EXT_transform_feedback */
-   struct gl_query_object *PrimitivesGenerated;
-   struct gl_query_object *PrimitivesWritten;
-
-   /** GL_ARB_timer_query */
-   struct gl_query_object *TimeElapsed;
-
-   GLenum CondRenderMode;
-};
-
-
-/** Sync object state */
-struct gl_sync_object {
-   struct simple_node link;
-   GLenum Type;               /**< GL_SYNC_FENCE */
-   GLuint Name;               /**< Fence name */
-   GLint RefCount;            /**< Reference count */
-   GLboolean DeletePending;   /**< Object was deleted while there were still
-			       * live references (e.g., sync not yet finished)
-			       */
-   GLenum SyncCondition;
-   GLbitfield Flags;          /**< Flags passed to glFenceSync */
-   GLuint StatusFlag:1;       /**< Has the sync object been signaled? */
-};
-
-
-/** Set by #pragma directives */
-struct gl_sl_pragmas
-{
-   GLboolean IgnoreOptimize;  /**< ignore #pragma optimize(on/off) ? */
-   GLboolean IgnoreDebug;     /**< ignore #pragma debug(on/off) ? */
-   GLboolean Optimize;  /**< defaults on */
-   GLboolean Debug;     /**< defaults off */
-};
-
-
-/**
- * A GLSL vertex or fragment shader object.
- */
-struct gl_shader
-{
-   GLenum Type;  /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */
-   GLuint Name;  /**< AKA the handle */
-   GLint RefCount;  /**< Reference count */
-   GLboolean DeletePending;
-   GLboolean CompileStatus;
-   GLboolean Main;  /**< shader defines main() */
-   GLboolean UnresolvedRefs;
-   const GLchar *Source;  /**< Source code string */
-//   GLuint SourceChecksum;       /**< for debug/logging purposes */
-//   struct gl_program *Program;  /**< Post-compile assembly code */
-   GLchar *InfoLog;
-   struct gl_sl_pragmas Pragmas;
-
-   unsigned Version;       /**< GLSL version used for linking */
-
-   struct exec_list *ir;
-   struct glsl_symbol_table *symbols;
-   /** Shaders containing built-in functions that are used for linking. */
-   struct gl_shader *builtins_to_link[16];
-   unsigned num_builtins_to_link;
-   
-   struct Executable * executable;
-   void (*function)();     /**< the active function */
-   unsigned SamplersUsed;  /**< bitfield of samplers used by shader */
-};
-
-
-/**
- * A GLSL program object.
- * Basically a linked collection of vertex and fragment shaders.
- */
-struct gl_shader_program
-{
-   GLenum Type;  /**< Always GL_SHADER_PROGRAM (internal token) */
-   GLuint Name;  /**< aka handle or ID */
-   GLint RefCount;  /**< Reference count */
-   GLboolean DeletePending;
-
-   GLuint NumShaders;          /**< number of attached shaders */
-   struct gl_shader **Shaders; /**< List of attached the shaders */
-
-   /** User-defined attribute bindings (glBindAttribLocation) */
-   struct gl_program_parameter_list *Attributes;
-
-   /** Transform feedback varyings */
-//   struct {
-//      GLenum BufferMode;
-//      GLuint NumVarying;
-//      GLchar **VaryingNames;  /**< Array [NumVarying] of char * */
-//   } TransformFeedback;
-
-   /** Geometry shader state - copied into gl_geometry_program at link time */
-//   struct {
-//      GLint VerticesOut;
-//      GLenum InputType;  /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
-//                              GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
-//      GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
-//   } Geom;
-
-   /* post-link info: */
-//   struct gl_vertex_program *VertexProgram;     /**< Linked vertex program */
-//   struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */
-//   struct gl_geometry_program *GeometryProgram; /**< Linked geometry prog */
-   struct gl_uniform_list *Uniforms;
-   struct gl_program_parameter_list *Varying;
-   GLboolean LinkStatus;   /**< GL_LINK_STATUS */
-   GLboolean Validated;
-   GLboolean _Used;        /**< Ever used for drawing? */
-   GLchar *InfoLog;
-   unsigned Version;       /**< GLSL version used for linking */
-
-   /**
-    * Per-stage shaders resulting from the first stage of linking.
-    *
-    * Set of linked shaders for this program.  The array is accessed using the
-    * \c MESA_SHADER_* defines.  Entries for non-existent stages will be
-    * \c NULL.
-    */
-   struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES];
-   GLfloat (*ValuesUniform)[4]; /** < samplers are at ValuesUniform[gl_uniform_list::Slots + sampler.Pos]*/
-   GLfloat (*ValuesVertexInput)[4];    /**< actually a VertexInput */
-   GLfloat (*ValuesVertexOutput)[4];   /**< actually a VertexOutput */
-   void * InputOuputBase;              /**< allocation base for Values* */
-   
-   unsigned AttributeSlots;/**< [0,AttributeSlots-1] read by vertex shader */
-   unsigned VaryingSlots;  /**< [0,VaryingSlots-1] read by fragment shader */
-   unsigned UsesFragCoord : 1, UsesPointCoord : 1;
-};   
-
-
-#define GLSL_DUMP      0x1  /**< Dump shaders to stdout */
-#define GLSL_LOG       0x2  /**< Write shaders to files */
-#define GLSL_OPT       0x4  /**< Force optimizations (override pragmas) */
-#define GLSL_NO_OPT    0x8  /**< Force no optimizations (override pragmas) */
-#define GLSL_UNIFORMS 0x10  /**< Print glUniform calls */
-#define GLSL_NOP_VERT 0x20  /**< Force no-op vertex shaders */
-#define GLSL_NOP_FRAG 0x40  /**< Force no-op fragment shaders */
-#define GLSL_USE_PROG 0x80  /**< Log glUseProgram calls */
-
-
-/**
- * Context state for GLSL vertex/fragment shaders.
- */
-struct gl_shader_state
-{
-   /**
-    * Programs used for rendering
-    *
-    * There is a separate program set for each shader stage.  If
-    * GL_EXT_separate_shader_objects is not supported, each of these must point
-    * to \c NULL or to the same program.
-    */
-   struct gl_shader_program *CurrentVertexProgram;
-   struct gl_shader_program *CurrentGeometryProgram;
-   struct gl_shader_program *CurrentFragmentProgram;
-
-   /**
-    * Program used by glUniform calls.
-    *
-    * Explicitly set by \c glUseProgram and \c glActiveProgramEXT.
-    */
-   struct gl_shader_program *ActiveProgram;
-
-   void *MemPool;
-
-   GLbitfield Flags;                    /**< Mask of GLSL_x flags */
-};
-
-/**
- * Compiler options for a single GLSL shaders type
- */
-struct gl_shader_compiler_options
-{
-   /** Driver-selectable options: */
-   GLboolean EmitCondCodes;             /**< Use condition codes? */
-   GLboolean EmitNVTempInitialization;  /**< 0-fill NV temp registers */
-   /**
-    * Attempts to flatten all ir_if (OPCODE_IF) for GPUs that can't
-    * support control flow.
-    */
-   GLboolean EmitNoIfs;
-   GLboolean EmitNoLoops;
-   GLboolean EmitNoFunctions;
-   GLboolean EmitNoCont;                  /**< Emit CONT opcode? */
-   GLboolean EmitNoMainReturn;            /**< Emit CONT/RET opcodes? */
-   GLboolean EmitNoNoise;                 /**< Emit NOISE opcodes? */
-   GLboolean EmitNoPow;                   /**< Emit POW opcodes? */
-
-   /**
-    * \name Forms of indirect addressing the driver cannot do.
-    */
-   /*@{*/
-   GLboolean EmitNoIndirectInput;   /**< No indirect addressing of inputs */
-   GLboolean EmitNoIndirectOutput;  /**< No indirect addressing of outputs */
-   GLboolean EmitNoIndirectTemp;    /**< No indirect addressing of temps */
-   GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */
-   /*@}*/
-
-   GLuint MaxUnrollIterations;
-
-   struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
-};
-
-/**
- * Transform feedback object state
- */
-struct gl_transform_feedback_object
-{
-   GLuint Name;  /**< AKA the object ID */
-   GLint RefCount;
-   GLboolean Active;  /**< Is transform feedback enabled? */
-   GLboolean Paused;  /**< Is transform feedback paused? */
-
-   /** The feedback buffers */
-   GLuint BufferNames[MAX_FEEDBACK_ATTRIBS];
-   struct gl_buffer_object *Buffers[MAX_FEEDBACK_ATTRIBS];
-
-   /** Start of feedback data in dest buffer */
-   GLintptr Offset[MAX_FEEDBACK_ATTRIBS];
-   /** Max data to put into dest buffer (in bytes) */
-   GLsizeiptr Size[MAX_FEEDBACK_ATTRIBS];
-};
-
-
-/**
- * Context state for transform feedback.
- */
-struct gl_transform_feedback
-{
-   GLenum Mode;       /**< GL_POINTS, GL_LINES or GL_TRIANGLES */
-
-   GLboolean RasterDiscard;  /**< GL_RASTERIZER_DISCARD */
-
-   /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */
-   struct gl_buffer_object *CurrentBuffer;
-
-   /** The table of all transform feedback objects */
-   struct _mesa_HashTable *Objects;
-
-   /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */
-   struct gl_transform_feedback_object *CurrentObject;
-
-   /** The default xform-fb object (Name==0) */
-   struct gl_transform_feedback_object *DefaultObject;
-};
-
-
-
-///**
-// * State which can be shared by multiple contexts:
-// */
-//struct gl_shared_state
-//{
-//   _glthread_Mutex Mutex;		   /**< for thread safety */
-//   GLint RefCount;			   /**< Reference count */
-//   struct _mesa_HashTable *DisplayList;	   /**< Display lists hash table */
-//   struct _mesa_HashTable *TexObjects;	   /**< Texture objects hash table */
-//
-//   /** Default texture objects (shared by all texture units) */
-//   struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS];
-//
-//   /** Fallback texture used when a bound texture is incomplete */
-//   struct gl_texture_object *FallbackTex;
-//
-//   /**
-//    * \name Thread safety and statechange notification for texture
-//    * objects. 
-//    *
-//    * \todo Improve the granularity of locking.
-//    */
-//   /*@{*/
-//   _glthread_Mutex TexMutex;		/**< texobj thread safety */
-//   GLuint TextureStateStamp;	        /**< state notification for shared tex */
-//   /*@}*/
-//
-//   /** Default buffer object for vertex arrays that aren't in VBOs */
-//   struct gl_buffer_object *NullBufferObj;
-//
-//   /**
-//    * \name Vertex/geometry/fragment programs
-//    */
-//   /*@{*/
-//   struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */
-//   struct gl_vertex_program *DefaultVertexProgram;
-//   struct gl_fragment_program *DefaultFragmentProgram;
-//   struct gl_geometry_program *DefaultGeometryProgram;
-//   /*@}*/
-//
-//   /* GL_ATI_fragment_shader */
-//   struct _mesa_HashTable *ATIShaders;
-//   struct ati_fragment_shader *DefaultFragmentShader;
-//
-//   struct _mesa_HashTable *BufferObjects;
-//
-//   /** Table of both gl_shader and gl_shader_program objects */
-//   struct _mesa_HashTable *ShaderObjects;
-//
-//   /* GL_EXT_framebuffer_object */
-//   struct _mesa_HashTable *RenderBuffers;
-//   struct _mesa_HashTable *FrameBuffers;
-//
-//   /* GL_ARB_sync */
-//   struct simple_node SyncObjects;
-//
-//   void *DriverData;  /**< Device driver shared state */
-//};
-
-
-
-
-///**
-// * A renderbuffer stores colors or depth values or stencil values.
-// * A framebuffer object will have a collection of these.
-// * Data are read/written to the buffer with a handful of Get/Put functions.
-// *
-// * Instances of this object are allocated with the Driver's NewRenderbuffer
-// * hook.  Drivers will likely wrap this class inside a driver-specific
-// * class to simulate inheritance.
-// */
-//struct gl_renderbuffer
-//{
-//#define RB_MAGIC 0xaabbccdd
-//   int Magic; /** XXX TEMPORARY DEBUG INFO */
-//   _glthread_Mutex Mutex;		   /**< for thread safety */
-//   GLuint ClassID;        /**< Useful for drivers */
-//   GLuint Name;
-//   GLint RefCount;
-//   GLuint Width, Height;
-//   GLboolean Purgeable;   /**< Is the buffer purgeable under memory pressure? */
-//
-//   GLenum InternalFormat; /**< The user-specified format */
-//   GLenum _BaseFormat;    /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
-//                               GL_STENCIL_INDEX. */
-//   GLuint Format;         /**< The actual format: MESA_FORMAT_x */
-//
-//   GLubyte NumSamples;
-//
-//   GLenum DataType;      /**< Type of values passed to the Get/Put functions */
-//   GLvoid *Data;        /**< This may not be used by some kinds of RBs */
-//
-//   /* Used to wrap one renderbuffer around another: */
-//   struct gl_renderbuffer *Wrapped;
-//
-//   /* Delete this renderbuffer */
-//   void (*Delete)(struct gl_renderbuffer *rb);
-//
-//   /* Allocate new storage for this renderbuffer */
-//   GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb,
-//                             GLenum internalFormat,
-//                             GLuint width, GLuint height);
-//
-//   /* Lock/Unlock are called before/after calling the Get/Put functions.
-//    * Not sure this is the right place for these yet.
-//   void (*Lock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
-//   void (*Unlock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
-//    */
-//
-//   /* Return a pointer to the element/pixel at (x,y).
-//    * Should return NULL if the buffer memory can't be directly addressed.
-//    */
-//   void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb,
-//                       GLint x, GLint y);
-//
-//   /* Get/Read a row of values.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                  GLint x, GLint y, void *values);
-//
-//   /* Get/Read values at arbitrary locations.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                     const GLint x[], const GLint y[], void *values);
-//
-//   /* Put/Write a row of values.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                  GLint x, GLint y, const void *values, const GLubyte *mask);
-//
-//   /* Put/Write a row of RGB values.  This is a special-case routine that's
-//    * only used for RGBA renderbuffers when the source data is GL_RGB. That's
-//    * a common case for glDrawPixels and some triangle routines.
-//    * The values will be of format GL_RGB and type DataType.
-//    */
-//   void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                    GLint x, GLint y, const void *values, const GLubyte *mask);
-//
-//
-//   /* Put/Write a row of identical values.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                     GLint x, GLint y, const void *value, const GLubyte *mask);
-//
-//   /* Put/Write values at arbitrary locations.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
-//                     const GLint x[], const GLint y[], const void *values,
-//                     const GLubyte *mask);
-//   /* Put/Write identical values at arbitrary locations.
-//    * The values will be of format _BaseFormat and type DataType.
-//    */
-//   void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb,
-//                         GLuint count, const GLint x[], const GLint y[],
-//                         const void *value, const GLubyte *mask);
-//};
-
-
-/**
- * A renderbuffer attachment points to either a texture object (and specifies
- * a mipmap level, cube face or 3D texture slice) or points to a renderbuffer.
- */
-struct gl_renderbuffer_attachment
-{
-   GLenum Type;  /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */
-   GLboolean Complete;
-
-   /**
-    * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the
-    * application supplied renderbuffer object.
-    */
-   struct gl_renderbuffer *Renderbuffer;
-
-   /**
-    * If \c Type is \c GL_TEXTURE, this stores a pointer to the application
-    * supplied texture object.
-    */
-   struct gl_texture_object *Texture;
-   GLuint TextureLevel; /**< Attached mipmap level. */
-   GLuint CubeMapFace;  /**< 0 .. 5, for cube map textures. */
-   GLuint Zoffset;      /**< Slice for 3D textures,  or layer for both 1D
-                         * and 2D array textures */
-};
-
-
-///**
-// * A framebuffer is a collection of renderbuffers (color, depth, stencil, etc).
-// * In C++ terms, think of this as a base class from which device drivers
-// * will make derived classes.
-// */
-//struct gl_framebuffer
-//{
-//   _glthread_Mutex Mutex;  /**< for thread safety */
-//   /**
-//    * If zero, this is a window system framebuffer.  If non-zero, this
-//    * is a FBO framebuffer; note that for some devices (i.e. those with
-//    * a natural pixel coordinate system for FBOs that differs from the
-//    * OpenGL/Mesa coordinate system), this means that the viewport,
-//    * polygon face orientation, and polygon stipple will have to be inverted.
-//    */
-//   GLuint Name;
-//
-//   GLint RefCount;
-//   GLboolean DeletePending;
-//
-//   /**
-//    * The framebuffer's visual. Immutable if this is a window system buffer.
-//    * Computed from attachments if user-made FBO.
-//    */
-//   struct gl_config Visual;
-//
-//   GLboolean Initialized;
-//
-//   GLuint Width, Height;	/**< size of frame buffer in pixels */
-//
-//   /** \name  Drawing bounds (Intersection of buffer size and scissor box) */
-//   /*@{*/
-//   GLint _Xmin, _Xmax;  /**< inclusive */
-//   GLint _Ymin, _Ymax;  /**< exclusive */
-//   /*@}*/
-//
-//   /** \name  Derived Z buffer stuff */
-//   /*@{*/
-//   GLuint _DepthMax;	/**< Max depth buffer value */
-//   GLfloat _DepthMaxF;	/**< Float max depth buffer value */
-//   GLfloat _MRD;	/**< minimum resolvable difference in Z values */
-//   /*@}*/
-//
-//   /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
-//   GLenum _Status;
-//
-//   /** Integer color values */
-//   GLboolean _IntegerColor;
-//
-//   /** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
-//   struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT];
-//
-//   /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER
-//    * attribute group and GL_PIXEL attribute group, respectively.
-//    */
-//   GLenum ColorDrawBuffer[MAX_DRAW_BUFFERS];
-//   GLenum ColorReadBuffer;
-//
-//   /** Computed from ColorDraw/ReadBuffer above */
-//   GLuint _NumColorDrawBuffers;
-//   GLint _ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; /**< BUFFER_x or -1 */
-//   GLint _ColorReadBufferIndex; /* -1 = None */
-//   struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS];
-//   struct gl_renderbuffer *_ColorReadBuffer;
-//
-//   /** The Actual depth/stencil buffers to use.  May be wrappers around the
-//    * depth/stencil buffers attached above. */
-//   struct gl_renderbuffer *_DepthBuffer;
-//   struct gl_renderbuffer *_StencilBuffer;
-//
-//   /** Delete this framebuffer */
-//   void (*Delete)(struct gl_framebuffer *fb);
-//};
-
-
-/**
- * Limits for vertex and fragment programs/shaders.
- */
-struct gl_program_constants
-{
-   /* logical limits */
-   GLuint MaxInstructions;
-   GLuint MaxAluInstructions;
-   GLuint MaxTexInstructions;
-   GLuint MaxTexIndirections;
-   GLuint MaxAttribs;
-   GLuint MaxTemps;
-   GLuint MaxAddressRegs;
-   GLuint MaxParameters;
-   GLuint MaxLocalParams;
-   GLuint MaxEnvParams;
-   /* native/hardware limits */
-   GLuint MaxNativeInstructions;
-   GLuint MaxNativeAluInstructions;
-   GLuint MaxNativeTexInstructions;
-   GLuint MaxNativeTexIndirections;
-   GLuint MaxNativeAttribs;
-   GLuint MaxNativeTemps;
-   GLuint MaxNativeAddressRegs;
-   GLuint MaxNativeParameters;
-   /* For shaders */
-   GLuint MaxUniformComponents;
-   /* GL_ARB_geometry_shader4 */
-   GLuint MaxGeometryTextureImageUnits;
-   GLuint MaxGeometryVaryingComponents;
-   GLuint MaxVertexVaryingComponents;
-   GLuint MaxGeometryUniformComponents;
-   GLuint MaxGeometryOutputVertices;
-   GLuint MaxGeometryTotalOutputComponents;
-};
-
-
-/**
- * Constants which may be overridden by device driver during context creation
- * but are never changed after that.
- */
-struct gl_constants
-{
-   GLint MaxTextureMbytes;      /**< Max memory per image, in MB */
-   GLint MaxTextureLevels;      /**< Max mipmap levels. */ 
-   GLint Max3DTextureLevels;    /**< Max mipmap levels for 3D textures */
-   GLint MaxCubeTextureLevels;  /**< Max mipmap levels for cube textures */
-   GLint MaxArrayTextureLayers; /**< Max layers in array textures */
-   GLint MaxTextureRectSize;    /**< Max rectangle texture size, in pixes */
-   GLuint MaxTextureCoordUnits;
-   GLuint MaxTextureImageUnits;
-   GLuint MaxVertexTextureImageUnits;
-   GLuint MaxCombinedTextureImageUnits;
-   GLuint MaxTextureUnits;           /**< = MIN(CoordUnits, ImageUnits) */
-   GLfloat MaxTextureMaxAnisotropy;  /**< GL_EXT_texture_filter_anisotropic */
-   GLfloat MaxTextureLodBias;        /**< GL_EXT_texture_lod_bias */
-
-   GLuint MaxArrayLockSize;
-
-   GLint SubPixelBits;
-
-   GLfloat MinPointSize, MaxPointSize;	     /**< aliased */
-   GLfloat MinPointSizeAA, MaxPointSizeAA;   /**< antialiased */
-   GLfloat PointSizeGranularity;
-   GLfloat MinLineWidth, MaxLineWidth;       /**< aliased */
-   GLfloat MinLineWidthAA, MaxLineWidthAA;   /**< antialiased */
-   GLfloat LineWidthGranularity;
-
-   GLuint MaxColorTableSize;
-
-   GLuint MaxClipPlanes;
-   GLuint MaxLights;
-   GLfloat MaxShininess;                     /**< GL_NV_light_max_exponent */
-   GLfloat MaxSpotExponent;                  /**< GL_NV_light_max_exponent */
-
-   GLuint MaxViewportWidth, MaxViewportHeight;
-
-   struct gl_program_constants VertexProgram;   /**< GL_ARB_vertex_program */
-   struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */
-   struct gl_program_constants GeometryProgram;  /**< GL_ARB_geometry_shader4 */
-   GLuint MaxProgramMatrices;
-   GLuint MaxProgramMatrixStackDepth;
-
-   /** vertex array / buffer object bounds checking */
-   GLboolean CheckArrayBounds;
-
-   GLuint MaxDrawBuffers;    /**< GL_ARB_draw_buffers */
-
-   GLuint MaxColorAttachments;   /**< GL_EXT_framebuffer_object */
-   GLuint MaxRenderbufferSize;   /**< GL_EXT_framebuffer_object */
-   GLuint MaxSamples;            /**< GL_ARB_framebuffer_object */
-
-   GLuint MaxVarying;  /**< Number of float[4] varying parameters */
-
-//   GLuint GLSLVersion;  /**< GLSL version supported (ex: 120 = 1.20) */
-
-//   /** Which texture units support GL_ATI_envmap_bumpmap as targets */
-//   GLbitfield SupportedBumpUnits;
-//
-//   /**
-//    * Maximum amount of time, measured in nanseconds, that the server can wait.
-//    */
-//   GLuint64 MaxServerWaitTimeout;
-//
-//   /** GL_EXT_provoking_vertex */
-//   GLboolean QuadsFollowProvokingVertexConvention;
-//
-//   /** OpenGL version 3.0 */
-//   GLbitfield ContextFlags;  /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
-//
-//   /** OpenGL version 3.2 */
-//   GLbitfield ProfileMask;   /**< Mask of CONTEXT_x_PROFILE_BIT */
-//
-//   /** GL_EXT_transform_feedback */
-//   GLuint MaxTransformFeedbackSeparateAttribs;
-//   GLuint MaxTransformFeedbackSeparateComponents;
-//   GLuint MaxTransformFeedbackInterleavedComponents;
-//
-//   /** GL_EXT_gpu_shader4 */
-//   GLint MinProgramTexelOffset, MaxProgramTexelOffset;
-};
-
-
-/**
- * Enable flag for each OpenGL extension.  Different device drivers will
- * enable different extensions at runtime.
- */
-struct gl_extensions
-{
-   GLboolean dummy;  /* don't remove this! */
-   GLboolean ARB_blend_func_extended;
-   GLboolean ARB_copy_buffer;
-   GLboolean ARB_depth_buffer_float;
-   GLboolean ARB_depth_clamp;
-   GLboolean ARB_depth_texture;
-   GLboolean ARB_draw_buffers;
-   GLboolean ARB_draw_elements_base_vertex;
-   GLboolean ARB_draw_instanced;
-   GLboolean ARB_fragment_coord_conventions;
-   GLboolean ARB_fragment_program;
-   GLboolean ARB_fragment_program_shadow;
-   GLboolean ARB_fragment_shader;
-   GLboolean ARB_framebuffer_object;
-   GLboolean ARB_explicit_attrib_location;
-   GLboolean ARB_geometry_shader4;
-   GLboolean ARB_half_float_pixel;
-   GLboolean ARB_half_float_vertex;
-   GLboolean ARB_instanced_arrays;
-   GLboolean ARB_map_buffer_range;
-   GLboolean ARB_multisample;
-   GLboolean ARB_multitexture;
-   GLboolean ARB_occlusion_query;
-   GLboolean ARB_occlusion_query2;
-   GLboolean ARB_point_sprite;
-   GLboolean ARB_sampler_objects;
-   GLboolean ARB_seamless_cube_map;
-   GLboolean ARB_shader_objects;
-   GLboolean ARB_shader_stencil_export;
-   GLboolean ARB_shading_language_100;
-   GLboolean ARB_shadow;
-   GLboolean ARB_shadow_ambient;
-   GLboolean ARB_sync;
-   GLboolean ARB_texture_border_clamp;
-   GLboolean ARB_texture_buffer_object;
-   GLboolean ARB_texture_compression;
-   GLboolean ARB_texture_compression_rgtc;
-   GLboolean ARB_texture_cube_map;
-   GLboolean ARB_texture_env_combine;
-   GLboolean ARB_texture_env_crossbar;
-   GLboolean ARB_texture_env_dot3;
-   GLboolean ARB_texture_float;
-   GLboolean ARB_texture_mirrored_repeat;
-   GLboolean ARB_texture_multisample;
-   GLboolean ARB_texture_non_power_of_two;
-   GLboolean ARB_texture_rg;
-   GLboolean ARB_texture_rgb10_a2ui;
-   GLboolean ARB_timer_query;
-   GLboolean ARB_transform_feedback2;
-   GLboolean ARB_transpose_matrix;
-   GLboolean ARB_uniform_buffer_object;
-   GLboolean ARB_vertex_array_object;
-   GLboolean ARB_vertex_buffer_object;
-   GLboolean ARB_vertex_program;
-   GLboolean ARB_vertex_shader;
-   GLboolean ARB_vertex_type_2_10_10_10_rev;
-   GLboolean ARB_window_pos;
-   GLboolean EXT_abgr;
-   GLboolean EXT_bgra;
-   GLboolean EXT_blend_color;
-   GLboolean EXT_blend_equation_separate;
-   GLboolean EXT_blend_func_separate;
-   GLboolean EXT_blend_logic_op;
-   GLboolean EXT_blend_minmax;
-   GLboolean EXT_blend_subtract;
-   GLboolean EXT_clip_volume_hint;
-   GLboolean EXT_compiled_vertex_array;
-   GLboolean EXT_copy_texture;
-   GLboolean EXT_depth_bounds_test;
-   GLboolean EXT_draw_buffers2;
-   GLboolean EXT_draw_range_elements;
-   GLboolean EXT_fog_coord;
-   GLboolean EXT_framebuffer_blit;
-   GLboolean EXT_framebuffer_multisample;
-   GLboolean EXT_framebuffer_object;
-   GLboolean EXT_framebuffer_sRGB;
-   GLboolean EXT_gpu_program_parameters;
-   GLboolean EXT_gpu_shader4;
-   GLboolean EXT_multi_draw_arrays;
-   GLboolean EXT_paletted_texture;
-   GLboolean EXT_packed_depth_stencil;
-   GLboolean EXT_packed_float;
-   GLboolean EXT_packed_pixels;
-   GLboolean EXT_pixel_buffer_object;
-   GLboolean EXT_point_parameters;
-   GLboolean EXT_polygon_offset;
-   GLboolean EXT_provoking_vertex;
-   GLboolean EXT_rescale_normal;
-   GLboolean EXT_shadow_funcs;
-   GLboolean EXT_secondary_color;
-   GLboolean EXT_separate_shader_objects;
-   GLboolean EXT_separate_specular_color;
-   GLboolean EXT_shared_texture_palette;
-   GLboolean EXT_stencil_wrap;
-   GLboolean EXT_stencil_two_side;
-   GLboolean EXT_subtexture;
-   GLboolean EXT_texture;
-   GLboolean EXT_texture_object;
-   GLboolean EXT_texture3D;
-   GLboolean EXT_texture_array;
-   GLboolean EXT_texture_compression_s3tc;
-   GLboolean EXT_texture_env_add;
-   GLboolean EXT_texture_env_combine;
-   GLboolean EXT_texture_env_dot3;
-   GLboolean EXT_texture_filter_anisotropic;
-   GLboolean EXT_texture_integer;
-   GLboolean EXT_texture_lod_bias;
-   GLboolean EXT_texture_mirror_clamp;
-   GLboolean EXT_texture_shared_exponent;
-   GLboolean EXT_texture_sRGB;
-   GLboolean EXT_texture_swizzle;
-   GLboolean EXT_transform_feedback;
-   GLboolean EXT_timer_query;
-   GLboolean EXT_vertex_array;
-   GLboolean EXT_vertex_array_bgra;
-   GLboolean EXT_vertex_array_set;
-   /* vendor extensions */
-   GLboolean APPLE_client_storage;
-   GLboolean APPLE_packed_pixels;
-   GLboolean APPLE_vertex_array_object;
-   GLboolean APPLE_object_purgeable;
-   GLboolean ATI_envmap_bumpmap;
-   GLboolean ATI_texture_mirror_once;
-   GLboolean ATI_texture_env_combine3;
-   GLboolean ATI_fragment_shader;
-   GLboolean ATI_separate_stencil;
-   GLboolean IBM_rasterpos_clip;
-   GLboolean IBM_multimode_draw_arrays;
-   GLboolean MESA_pack_invert;
-   GLboolean MESA_resize_buffers;
-   GLboolean MESA_ycbcr_texture;
-   GLboolean MESA_texture_array;
-   GLboolean MESA_texture_signed_rgba;
-   GLboolean NV_blend_square;
-   GLboolean NV_conditional_render;
-   GLboolean NV_fragment_program;
-   GLboolean NV_fragment_program_option;
-   GLboolean NV_light_max_exponent;
-   GLboolean NV_point_sprite;
-   GLboolean NV_primitive_restart;
-   GLboolean NV_texgen_reflection;
-   GLboolean NV_texture_env_combine4;
-   GLboolean NV_texture_rectangle;
-   GLboolean NV_vertex_program;
-   GLboolean NV_vertex_program1_1;
-   GLboolean OES_read_format;
-   GLboolean SGI_texture_color_table;
-   GLboolean SGIS_generate_mipmap;
-   GLboolean SGIS_texture_edge_clamp;
-   GLboolean SGIS_texture_lod;
-   GLboolean TDFX_texture_compression_FXT1;
-   GLboolean S3_s3tc;
-   GLboolean OES_EGL_image;
-   GLboolean OES_draw_texture;
-   GLboolean EXT_texture_format_BGRA8888;
-   /** The extension string */
-   const GLubyte *String;
-   /** Number of supported extensions */
-   GLuint Count;
-};
-
-
-/**
- * A stack of matrices (projection, modelview, color, texture, etc).
- */
-//struct gl_matrix_stack
-//{
-//   GLmatrix *Top;      /**< points into Stack */
-//   GLmatrix *Stack;    /**< array [MaxDepth] of GLmatrix */
-//   GLuint Depth;       /**< 0 <= Depth < MaxDepth */
-//   GLuint MaxDepth;    /**< size of Stack[] array */
-//   GLuint DirtyFlag;   /**< _NEW_MODELVIEW or _NEW_PROJECTION, for example */
-//};
-
-
-/**
- * \name Bits for image transfer operations 
- * \sa __struct gl_contextRec::ImageTransferState.
- */
-/*@{*/
-#define IMAGE_SCALE_BIAS_BIT                      0x1
-#define IMAGE_SHIFT_OFFSET_BIT                    0x2
-#define IMAGE_MAP_COLOR_BIT                       0x4
-#define IMAGE_CLAMP_BIT                           0x800
-
-
-/** Pixel Transfer ops */
-#define IMAGE_BITS (IMAGE_SCALE_BIAS_BIT |			\
-		    IMAGE_SHIFT_OFFSET_BIT |			\
-		    IMAGE_MAP_COLOR_BIT)
-
-/**
- * \name Bits to indicate what state has changed.  
- *
- * 4 unused flags.
- */
-/*@{*/
-#define _NEW_MODELVIEW		0x1        /**< __struct gl_contextRec::ModelView */
-#define _NEW_PROJECTION		0x2        /**< __struct gl_contextRec::Projection */
-#define _NEW_TEXTURE_MATRIX	0x4        /**< __struct gl_contextRec::TextureMatrix */
-#define _NEW_ACCUM		0x10       /**< __struct gl_contextRec::Accum */
-#define _NEW_COLOR		0x20       /**< __struct gl_contextRec::Color */
-#define _NEW_DEPTH		0x40       /**< __struct gl_contextRec::Depth */
-#define _NEW_EVAL		0x80       /**< __struct gl_contextRec::Eval, __struct gl_contextRec::EvalMap */
-#define _NEW_FOG		0x100      /**< __struct gl_contextRec::Fog */
-#define _NEW_HINT		0x200      /**< __struct gl_contextRec::Hint */
-#define _NEW_LIGHT		0x400      /**< __struct gl_contextRec::Light */
-#define _NEW_LINE		0x800      /**< __struct gl_contextRec::Line */
-#define _NEW_PIXEL		0x1000     /**< __struct gl_contextRec::Pixel */
-#define _NEW_POINT		0x2000     /**< __struct gl_contextRec::Point */
-#define _NEW_POLYGON		0x4000     /**< __struct gl_contextRec::Polygon */
-#define _NEW_POLYGONSTIPPLE	0x8000     /**< __struct gl_contextRec::PolygonStipple */
-#define _NEW_SCISSOR		0x10000    /**< __struct gl_contextRec::Scissor */
-#define _NEW_STENCIL		0x20000    /**< __struct gl_contextRec::Stencil */
-#define _NEW_TEXTURE		0x40000    /**< __struct gl_contextRec::Texture */
-#define _NEW_TRANSFORM		0x80000    /**< __struct gl_contextRec::Transform */
-#define _NEW_VIEWPORT		0x100000   /**< __struct gl_contextRec::Viewport */
-#define _NEW_PACKUNPACK		0x200000   /**< __struct gl_contextRec::Pack, __struct gl_contextRec::Unpack */
-#define _NEW_ARRAY	        0x400000   /**< __struct gl_contextRec::Array */
-#define _NEW_RENDERMODE		0x800000   /**< __struct gl_contextRec::RenderMode, __struct gl_contextRec::Feedback, __struct gl_contextRec::Select */
-#define _NEW_BUFFERS            0x1000000  /**< __struct gl_contextRec::Visual, __struct gl_contextRec::DrawBuffer, */
-#define _NEW_MULTISAMPLE        0x2000000  /**< __struct gl_contextRec::Multisample */
-#define _NEW_TRACK_MATRIX       0x4000000  /**< __struct gl_contextRec::VertexProgram */
-#define _NEW_PROGRAM            0x8000000  /**< __struct gl_contextRec::VertexProgram */
-#define _NEW_CURRENT_ATTRIB     0x10000000  /**< __struct gl_contextRec::Current */
-#define _NEW_PROGRAM_CONSTANTS  0x20000000
-#define _NEW_BUFFER_OBJECT      0x40000000
-#define _NEW_ALL ~0
-/*@}*/
-
-
-/**
- * \name Bits to track array state changes 
- *
- * Also used to summarize array enabled.
- */
-/*@{*/
-#define _NEW_ARRAY_VERTEX           VERT_BIT_POS
-#define _NEW_ARRAY_WEIGHT           VERT_BIT_WEIGHT
-#define _NEW_ARRAY_NORMAL           VERT_BIT_NORMAL
-#define _NEW_ARRAY_COLOR0           VERT_BIT_COLOR0
-#define _NEW_ARRAY_COLOR1           VERT_BIT_COLOR1
-#define _NEW_ARRAY_FOGCOORD         VERT_BIT_FOG
-#define _NEW_ARRAY_INDEX            VERT_BIT_COLOR_INDEX
-#define _NEW_ARRAY_EDGEFLAG         VERT_BIT_EDGEFLAG
-#define _NEW_ARRAY_POINT_SIZE       VERT_BIT_COLOR_INDEX  /* aliased */
-#define _NEW_ARRAY_TEXCOORD_0       VERT_BIT_TEX0
-#define _NEW_ARRAY_TEXCOORD_1       VERT_BIT_TEX1
-#define _NEW_ARRAY_TEXCOORD_2       VERT_BIT_TEX2
-#define _NEW_ARRAY_TEXCOORD_3       VERT_BIT_TEX3
-#define _NEW_ARRAY_TEXCOORD_4       VERT_BIT_TEX4
-#define _NEW_ARRAY_TEXCOORD_5       VERT_BIT_TEX5
-#define _NEW_ARRAY_TEXCOORD_6       VERT_BIT_TEX6
-#define _NEW_ARRAY_TEXCOORD_7       VERT_BIT_TEX7
-#define _NEW_ARRAY_ATTRIB_0         VERT_BIT_GENERIC0  /* start at bit 16 */
-#define _NEW_ARRAY_ALL              0xffffffff
-
-
-#define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i))
-#define _NEW_ARRAY_ATTRIB(i) (_NEW_ARRAY_ATTRIB_0 << (i))
-/*@}*/
-
-
-
-/**
- * \name A bunch of flags that we think might be useful to drivers.
- * 
- * Set in the __struct gl_contextRec::_TriangleCaps bitfield.
- */
-/*@{*/
-#define DD_FLATSHADE                0x1
-#define DD_SEPARATE_SPECULAR        0x2
-#define DD_TRI_CULL_FRONT_BACK      0x4 /* special case on some hw */
-#define DD_TRI_LIGHT_TWOSIDE        0x8
-#define DD_TRI_UNFILLED             0x10
-#define DD_TRI_SMOOTH               0x20
-#define DD_TRI_STIPPLE              0x40
-#define DD_TRI_OFFSET               0x80
-#define DD_LINE_SMOOTH              0x100
-#define DD_LINE_STIPPLE             0x200
-#define DD_POINT_SMOOTH             0x400
-#define DD_POINT_ATTEN              0x800
-#define DD_TRI_TWOSTENCIL           0x1000
-/*@}*/
-
-
-/**
- * \name Define the state changes under which each of these bits might change
- */
-/*@{*/
-#define _DD_NEW_FLATSHADE                _NEW_LIGHT
-#define _DD_NEW_SEPARATE_SPECULAR        (_NEW_LIGHT | _NEW_FOG | _NEW_PROGRAM)
-#define _DD_NEW_TRI_CULL_FRONT_BACK      _NEW_POLYGON
-#define _DD_NEW_TRI_LIGHT_TWOSIDE        _NEW_LIGHT
-#define _DD_NEW_TRI_UNFILLED             _NEW_POLYGON
-#define _DD_NEW_TRI_SMOOTH               _NEW_POLYGON
-#define _DD_NEW_TRI_STIPPLE              _NEW_POLYGON
-#define _DD_NEW_TRI_OFFSET               _NEW_POLYGON
-#define _DD_NEW_LINE_SMOOTH              _NEW_LINE
-#define _DD_NEW_LINE_STIPPLE             _NEW_LINE
-#define _DD_NEW_LINE_WIDTH               _NEW_LINE
-#define _DD_NEW_POINT_SMOOTH             _NEW_POINT
-#define _DD_NEW_POINT_SIZE               _NEW_POINT
-#define _DD_NEW_POINT_ATTEN              _NEW_POINT
-/*@}*/
-
-
-/**
- * Composite state flags
- */
-/*@{*/
-#define _MESA_NEW_NEED_EYE_COORDS         (_NEW_LIGHT |		\
-                                           _NEW_TEXTURE |	\
-                                           _NEW_POINT |		\
-                                           _NEW_PROGRAM |	\
-                                           _NEW_MODELVIEW)
-
-#define _MESA_NEW_NEED_NORMALS            (_NEW_LIGHT |		\
-                                           _NEW_TEXTURE)
-
-#define _MESA_NEW_TRANSFER_STATE          (_NEW_PIXEL)
-/*@}*/
-
-
-
-
-/* This has to be included here. */
-//#include "dd.h"
-
-
-/**
- * Display list flags.
- * Strictly this is a tnl-private concept, but it doesn't seem
- * worthwhile adding a tnl private structure just to hold this one bit
- * of information:
- */
-#define DLIST_DANGLING_REFS     0x1 
-
-
-/** Opaque declaration of display list payload data type */
-union gl_dlist_node;
-
-
-/**
- * Provide a location where information about a display list can be
- * collected.  Could be extended with driverPrivate structures,
- * etc. in the future.
- */
-struct gl_display_list
-{
-   GLuint Name;
-   GLbitfield Flags;  /**< DLIST_x flags */
-   /** The dlist commands are in a linked list of nodes */
-   union gl_dlist_node *Head;
-};
-
-
-///**
-// * State used during display list compilation and execution.
-// */
-//struct gl_dlist_state
-//{
-//   GLuint CallDepth;		/**< Current recursion calling depth */
-//
-//   struct gl_display_list *CurrentList; /**< List currently being compiled */
-//   union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */
-//   GLuint CurrentPos;		/**< Index into current block of nodes */
-//
-//   GLvertexformat ListVtxfmt;
-//
-//   GLubyte ActiveAttribSize[VERT_ATTRIB_MAX];
-//   GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4];
-//   
-//   GLubyte ActiveMaterialSize[MAT_ATTRIB_MAX];
-//   GLfloat CurrentMaterial[MAT_ATTRIB_MAX][4];
-//
-//   GLubyte ActiveIndex;
-//   GLfloat CurrentIndex;
-//   
-//   GLubyte ActiveEdgeFlag;
-//   GLboolean CurrentEdgeFlag;
-//
-//   struct {
-//      /* State known to have been set by the currently-compiling display
-//       * list.  Used to eliminate some redundant state changes.
-//       */
-//      GLenum ShadeModel;
-//   } Current;
-//};
-
-/**
- * Enum for the OpenGL APIs we know about and may support.
- */
-typedef enum {
-   API_OPENGL,
-   API_OPENGLES,
-   API_OPENGLES2
-} gl_api;
-
-/**
- * Mesa rendering context.
- *
- * This is the central context data structure for Mesa.  Almost all
- * OpenGL state is contained in this structure.
- * Think of this as a base class from which device drivers will derive
- * sub classes.
- *
- * The struct gl_context typedef names this structure.
- */
-struct gl_context
-{
-   /** State possibly shared with other contexts in the address space */
-//   struct gl_shared_state *Shared;
-
-   /** \name API function pointer tables */
-   /*@{*/
-   gl_api API;
-//   struct _glapi_table *Save;	/**< Display list save functions */
-//   struct _glapi_table *Exec;	/**< Execute functions */
-//   struct _glapi_table *CurrentDispatch;  /**< == Save or Exec !! */
-   /*@}*/
-
-//   struct gl_config Visual;
-//   struct gl_framebuffer *DrawBuffer;	/**< buffer for writing */
-//   struct gl_framebuffer *ReadBuffer;	/**< buffer for reading */
-//   struct gl_framebuffer *WinSysDrawBuffer;  /**< set with MakeCurrent */
-//   struct gl_framebuffer *WinSysReadBuffer;  /**< set with MakeCurrent */
-
-   /**
-    * Device driver function pointer table
-    */
-//   struct dd_function_table Driver;
-
-//   void *DriverCtx;	/**< Points to device driver context/state */
-
-   /** Core/Driver constants */
-   struct gl_constants Const;
-
-//   /** \name The various 4x4 matrix stacks */
-//   /*@{*/
-//   struct gl_matrix_stack ModelviewMatrixStack;
-//   struct gl_matrix_stack ProjectionMatrixStack;
-//   struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS];
-//   struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES];
-//   struct gl_matrix_stack *CurrentStack; /**< Points to one of the above stacks */
-//   /*@}*/
-//
-//   /** Combined modelview and projection matrix */
-//   GLmatrix _ModelProjectMatrix;
-
-//   /** \name Display lists */
-//   struct gl_dlist_state ListState;
-
-//   GLboolean ExecuteFlag;	/**< Execute GL commands? */
-//   GLboolean CompileFlag;	/**< Compile GL commands into display list? */
-
-//   /** Extension information */
-   struct gl_extensions Extensions;
-//
-//   /** Version info */
-//   GLuint VersionMajor, VersionMinor;
-//   char *VersionString;
-//
-//   /** \name State attribute stack (for glPush/PopAttrib) */
-//   /*@{*/
-//   GLuint AttribStackDepth;
-//   struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH];
-//   /*@}*/
-
-//   /** \name Renderer attribute groups
-//    * 
-//    * We define a struct for each attribute group to make pushing and popping
-//    * attributes easy.  Also it's a good organization.
-//    */
-//   /*@{*/
-//   struct gl_accum_attrib	Accum;		/**< Accum buffer attributes */
-//   struct gl_colorbuffer_attrib	Color;		/**< Color buffer attributes */
-//   struct gl_current_attrib	Current;	/**< Current attributes */
-//   struct gl_depthbuffer_attrib	Depth;		/**< Depth buffer attributes */
-//   struct gl_eval_attrib	Eval;		/**< Eval attributes */
-//   struct gl_fog_attrib		Fog;		/**< Fog attributes */
-//   struct gl_hint_attrib	Hint;		/**< Hint attributes */
-//   struct gl_light_attrib	Light;		/**< Light attributes */
-//   struct gl_line_attrib	Line;		/**< Line attributes */
-//   struct gl_list_attrib	List;		/**< List attributes */
-//   struct gl_multisample_attrib Multisample;
-//   struct gl_pixel_attrib	Pixel;		/**< Pixel attributes */
-//   struct gl_point_attrib	Point;		/**< Point attributes */
-//   struct gl_polygon_attrib	Polygon;	/**< Polygon attributes */
-//   GLuint PolygonStipple[32];			/**< Polygon stipple */
-//   struct gl_scissor_attrib	Scissor;	/**< Scissor attributes */
-//   struct gl_stencil_attrib	Stencil;	/**< Stencil buffer attributes */
-//   struct gl_texture_attrib	Texture;	/**< Texture attributes */
-//   struct gl_transform_attrib	Transform;	/**< Transformation attributes */
-//   struct gl_viewport_attrib	Viewport;	/**< Viewport attributes */
-//   /*@}*/
-//
-//   /** \name Client attribute stack */
-//   /*@{*/
-//   GLuint ClientAttribStackDepth;
-//   struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
-//   /*@}*/
-//
-//   /** \name Client attribute groups */
-//   /*@{*/
-//   struct gl_array_attrib	Array;	/**< Vertex arrays */
-//   struct gl_pixelstore_attrib	Pack;	/**< Pixel packing */
-//   struct gl_pixelstore_attrib	Unpack;	/**< Pixel unpacking */
-//   struct gl_pixelstore_attrib	DefaultPacking;	/**< Default params */
-//   /*@}*/
-//
-//   /** \name Other assorted state (not pushed/popped on attribute stack) */
-//   /*@{*/
-//   struct gl_pixelmaps          PixelMaps;
-
-//   struct gl_evaluators EvalMap;   /**< All evaluators */
-//   struct gl_feedback   Feedback;  /**< Feedback */
-//   struct gl_selection  Select;    /**< Selection */
-
-//   struct gl_program_state Program;  /**< general program state */
-//   struct gl_vertex_program_state VertexProgram;
-//   struct gl_fragment_program_state FragmentProgram;
-//   struct gl_geometry_program_state GeometryProgram;
-//   struct gl_ati_fragment_shader_state ATIFragmentShader;
-
-//   struct gl_shader_state Shader; /**< GLSL shader object state */
-//   struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES];
-
-//   struct gl_query_state Query;  /**< occlusion, timer queries */
-
-//   struct gl_transform_feedback TransformFeedback;
-
-//   struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */
-//   struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */
-//   /*@}*/
-//
-//   struct gl_meta_state *Meta;  /**< for "meta" operations */
-//
-//   /* GL_EXT_framebuffer_object */
-//   struct gl_renderbuffer *CurrentRenderbuffer;
-//
-//   GLenum ErrorValue;        /**< Last error code */
-//
-//   /**
-//    * Recognize and silence repeated error debug messages in buggy apps.
-//    */
-//   const char *ErrorDebugFmtString;
-//   GLuint ErrorDebugCount;
-
-//   GLenum RenderMode;        /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
-//   GLbitfield NewState;      /**< bitwise-or of _NEW_* flags */
-
-//   GLboolean ViewportInitialized;  /**< has viewport size been initialized? */
-
-//   GLbitfield varying_vp_inputs;  /**< mask of VERT_BIT_* flags */
-//
-//   /** \name Derived state */
-//   /*@{*/
-//   /** Bitwise-or of DD_* flags.  Note that this bitfield may be used before
-//    * state validation so they need to always be current.
-//    */
-//   GLbitfield _TriangleCaps;
-//   GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
-//   GLfloat _EyeZDir[3];
-//   GLfloat _ModelViewInvScale;
-//   GLboolean _NeedEyeCoords;
-//   GLboolean _ForceEyeCoords; 
-//
-//   GLuint TextureStateTimestamp; /**< detect changes to shared state */
-
-//   struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */
-//   struct gl_shine_tab *_ShineTabList;  /**< MRU list of inactive shine tables */
-//   /**@}*/
-//
-//   struct gl_list_extensions *ListExt; /**< driver dlist extensions */
-//
-//   /** \name For debugging/development only */
-//   /*@{*/
-//   GLboolean FirstTimeCurrent;
-//   /*@}*/
-//
-//   /** Dither disable via MESA_NO_DITHER env var */
-//   GLboolean NoDither;
-//
-//   /** software compression/decompression supported or not */
-//   GLboolean Mesa_DXTn;
-//
-//   /** 
-//    * Use dp4 (rather than mul/mad) instructions for position
-//    * transformation?
-//    */
-//   GLboolean mvp_with_dp4;
-//
-//   /**
-//    * \name Hooks for module contexts.  
-//    *
-//    * These will eventually live in the driver or elsewhere.
-//    */
-//   /*@{*/
-//   void *swrast_context;
-//   void *swsetup_context;
-//   void *swtnl_context;
-//   void *swtnl_im;
-//   struct st_context *st;
-//   void *aelt_context;
-//   /*@}*/
-};
-
-
-/** The string names for GL_POINT, GL_LINE_LOOP, etc */
-extern const char *_mesa_prim_name[GL_POLYGON+4];
-
-
-#ifdef DEBUG
-extern int MESA_VERBOSE;
-extern int MESA_DEBUG_FLAGS;
-# define MESA_FUNCTION __FUNCTION__
-#else
-# define MESA_VERBOSE 0
-# define MESA_DEBUG_FLAGS 0
-# define MESA_FUNCTION "a function"
-# ifndef NDEBUG
-#  define NDEBUG
-# endif
-#endif
-
-
-/** The MESA_VERBOSE var is a bitmask of these flags */
-enum _verbose
-{
-   VERBOSE_VARRAY		= 0x0001,
-   VERBOSE_TEXTURE		= 0x0002,
-   VERBOSE_MATERIAL		= 0x0004,
-   VERBOSE_PIPELINE		= 0x0008,
-   VERBOSE_DRIVER		= 0x0010,
-   VERBOSE_STATE		= 0x0020,
-   VERBOSE_API			= 0x0040,
-   VERBOSE_DISPLAY_LIST		= 0x0100,
-   VERBOSE_LIGHTING		= 0x0200,
-   VERBOSE_PRIMS		= 0x0400,
-   VERBOSE_VERTS		= 0x0800,
-   VERBOSE_DISASSEM		= 0x1000,
-   VERBOSE_DRAW                 = 0x2000,
-   VERBOSE_SWAPBUFFERS          = 0x4000
-};
-
-
-/** The MESA_DEBUG_FLAGS var is a bitmask of these flags */
-enum _debug
-{
-   DEBUG_ALWAYS_FLUSH		= 0x1
-};
-
-
-
-#endif /* MTYPES_H */
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
deleted file mode 100644
index d9913cc..0000000
--- a/src/mesa/main/shaderobj.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdlib.h>
-#include <assert.h>
-
-#include <GLES2/gl2.h>
-
-#include "src/mesa/main/mtypes.h"
-#include "src/talloc/hieralloc.h"
-
-void _mesa_reference_shader(const void * ctx, struct gl_shader **ptr,
-                                          struct gl_shader *sh)
-{
-   *ptr = sh;
-}
-
-struct gl_shader * _mesa_new_shader(const void * ctx, GLuint name, GLenum type)
-{
-   assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER);
-   struct gl_shader * shader = (struct gl_shader *)_hieralloc_zero(ctx, sizeof(struct gl_shader), "zr:gl_shader");
-   if (shader) {
-      shader->Type = type;
-      shader->Name = name;
-      shader->RefCount = 1;
-   }
-   return shader;
-}
-
-void _mesa_delete_shader(const void * ctx, struct gl_shader *shader)
-{
-   if (!shader)
-      return;
-   if (shader->RefCount > 1) {
-      shader->DeletePending = GL_TRUE;
-      return;
-   }
-   hieralloc_free(shader);
-}
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
deleted file mode 100644
index 683b70b..0000000
--- a/src/mesa/main/shaderobj.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.5.3
- *
- * Copyright (C) 2004-2007  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef SHADEROBJ_H
-#define SHADEROBJ_H
-
-
-#include "main/compiler.h"
-#include "main/glheader.h"
-#include "main/mtypes.h"
-#include "program/ir_to_mesa.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/**
- * Internal functions
- */
-
-//extern void
-//_mesa_init_shader_state(struct gl_context * ctx);
-//
-//extern void
-//_mesa_free_shader_state(struct gl_context *ctx);
-//
-//
-extern void
-_mesa_reference_shader(const void * ctx, struct gl_shader **ptr,
-                       struct gl_shader *sh);
-//
-//extern struct gl_shader *
-//_mesa_lookup_shader(struct gl_context *ctx, GLuint name);
-//
-//extern struct gl_shader *
-//_mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller);
-//
-//
-//
-//extern void
-//_mesa_reference_shader_program(struct gl_context *ctx,
-//                               struct gl_shader_program **ptr,
-//                               struct gl_shader_program *shProg);
-//extern void
-//_mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader);
-
-extern struct gl_shader *
-_mesa_new_shader(const void * ctx, GLuint name, GLenum type);
-
-extern struct gl_shader *
-_mesa_delete_shader(const void * ctx, struct gl_shader * shader);
-
-//extern void
-//_mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog);
-//
-//extern struct gl_shader_program *
-//_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name);
-//
-//extern struct gl_shader_program *
-//_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
-//                                const char *caller);
-//
-//extern void
-//_mesa_clear_shader_program_data(struct gl_context *ctx,
-//                                struct gl_shader_program *shProg);
-//
-//extern void
-//_mesa_free_shader_program_data(struct gl_context *ctx,
-//                               struct gl_shader_program *shProg);
-//
-//
-//
-//extern void
-//_mesa_init_shader_object_functions(struct dd_function_table *driver);
-//
-//extern void
-//_mesa_init_shader_state(struct gl_context *ctx);
-//
-//extern void
-//_mesa_free_shader_state(struct gl_context *ctx);
-
-
-//static INLINE gl_shader_type
-//_mesa_shader_type_to_index(GLenum v)
-//{
-//   switch (v) {
-//   case GL_VERTEX_SHADER:
-//      return MESA_SHADER_VERTEX;
-//   case GL_FRAGMENT_SHADER:
-//      return MESA_SHADER_FRAGMENT;
-//   case GL_GEOMETRY_SHADER:
-//      return MESA_SHADER_GEOMETRY;
-//   default:
-//      ASSERT(0 && "bad value in _mesa_shader_type_to_index()");
-//      return MESA_SHADER_TYPES;
-//   }
-//}
-//
-//
-//static INLINE GLenum
-//_mesa_shader_index_to_type(GLuint i)
-//{
-//   static const GLenum enums[MESA_SHADER_TYPES] = {
-//      GL_VERTEX_SHADER,
-//      GL_FRAGMENT_SHADER,
-//      GL_GEOMETRY_SHADER ,
-//   };
-//   if (i >= MESA_SHADER_TYPES)
-//      return 0;
-//   else
-//      return enums[i];
-//}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SHADEROBJ_H */
diff --git a/src/mesa/main/simple_list.h b/src/mesa/main/simple_list.h
deleted file mode 100644
index ff7f888..0000000
--- a/src/mesa/main/simple_list.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * \file simple_list.h
- * Simple macros for type-safe, intrusive lists.
- *
- *  Intended to work with a list sentinal which is created as an empty
- *  list.  Insert & delete are O(1).
- *  
- * \author
- *  (C) 1997, Keith Whitwell
- */
-
-/*
- * Mesa 3-D graphics library
- * Version:  3.5
- *
- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef _SIMPLE_LIST_H
-#define _SIMPLE_LIST_H
-
-struct simple_node {
-   struct simple_node *next;
-   struct simple_node *prev;
-};
-
-/**
- * Remove an element from list.
- *
- * \param elem element to remove.
- */
-#define remove_from_list(elem)			\
-do {						\
-   (elem)->next->prev = (elem)->prev;		\
-   (elem)->prev->next = (elem)->next;		\
-} while (0)
-
-/**
- * Insert an element to the list head.
- *
- * \param list list.
- * \param elem element to insert.
- */
-#define insert_at_head(list, elem)		\
-do {						\
-   (elem)->prev = list;				\
-   (elem)->next = (list)->next;			\
-   (list)->next->prev = elem;			\
-   (list)->next = elem;				\
-} while(0)
-
-/**
- * Insert an element to the list tail.
- *
- * \param list list.
- * \param elem element to insert.
- */
-#define insert_at_tail(list, elem)		\
-do {						\
-   (elem)->next = list;				\
-   (elem)->prev = (list)->prev;			\
-   (list)->prev->next = elem;			\
-   (list)->prev = elem;				\
-} while(0)
-
-/**
- * Move an element to the list head.
- *
- * \param list list.
- * \param elem element to move.
- */
-#define move_to_head(list, elem)		\
-do {						\
-   remove_from_list(elem);			\
-   insert_at_head(list, elem);			\
-} while (0)
-
-/**
- * Move an element to the list tail.
- *
- * \param list list.
- * \param elem element to move.
- */
-#define move_to_tail(list, elem)		\
-do {						\
-   remove_from_list(elem);			\
-   insert_at_tail(list, elem);			\
-} while (0)
-
-/**
- * Make a empty list empty.
- *
- * \param sentinal list (sentinal element).
- */
-#define make_empty_list(sentinal)		\
-do {						\
-   (sentinal)->next = sentinal;			\
-   (sentinal)->prev = sentinal;			\
-} while (0)
-
-/**
- * Get list first element.
- *
- * \param list list.
- *
- * \return pointer to first element.
- */
-#define first_elem(list)       ((list)->next)
-
-/**
- * Get list last element.
- *
- * \param list list.
- *
- * \return pointer to last element.
- */
-#define last_elem(list)        ((list)->prev)
-
-/**
- * Get next element.
- *
- * \param elem element.
- *
- * \return pointer to next element.
- */
-#define next_elem(elem)        ((elem)->next)
-
-/**
- * Get previous element.
- *
- * \param elem element.
- *
- * \return pointer to previous element.
- */
-#define prev_elem(elem)        ((elem)->prev)
-
-/**
- * Test whether element is at end of the list.
- * 
- * \param list list.
- * \param elem element.
- * 
- * \return non-zero if element is at end of list, or zero otherwise.
- */
-#define at_end(list, elem)     ((elem) == (list))
-
-/**
- * Test if a list is empty.
- * 
- * \param list list.
- * 
- * \return non-zero if list empty, or zero otherwise.
- */
-#define is_empty_list(list)    ((list)->next == (list))
-
-/**
- * Walk through the elements of a list.
- *
- * \param ptr pointer to the current element.
- * \param list list.
- *
- * \note It should be followed by a { } block or a single statement, as in a \c
- * for loop.
- */
-#define foreach(ptr, list)     \
-        for( ptr=(list)->next ;  ptr!=list ;  ptr=(ptr)->next )
-
-/**
- * Walk through the elements of a list.
- *
- * Same as #foreach but lets you unlink the current value during a list
- * traversal.  Useful for freeing a list, element by element.
- * 
- * \param ptr pointer to the current element.
- * \param t temporary pointer.
- * \param list list.
- *
- * \note It should be followed by a { } block or a single statement, as in a \c
- * for loop.
- */
-#define foreach_s(ptr, t, list)   \
-        for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next)
-
-#endif
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
deleted file mode 100644
index c726428..0000000
--- a/src/mesa/main/version.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.10
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef VERSION_H
-#define VERSION_H
-
-
-struct gl_context;
-
-
-/* Mesa version */
-#define MESA_MAJOR 7
-#define MESA_MINOR 10
-#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.10"
-
-/* To make version comparison easy */
-#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#define MESA_VERSION_CODE MESA_VERSION(MESA_MAJOR, MESA_MINOR, MESA_PATCH)
-
-
-/* OpenGL API version */
-#define OPENGL_MAJOR 2
-#define OPENGL_MINOR 1
-#define OPENGL_PATCH 0
-#define OPENGL_VERSION_STRING "2.1"
-
-/* To make version comparison easy */
-#define OPENGL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#define OPENGL_VERSION_CODE OPENGL_VERSION(OPENGL_MAJOR, OPENGL_MINOR, OPENGL_PATCH)
-
-
-extern void
-_mesa_compute_version(struct gl_context *ctx);
-
-
-#endif /* VERSION_H */
diff --git a/src/mesa/program/hash_table.c b/src/mesa/program/hash_table.c
deleted file mode 100644
index f7ef366..0000000
--- a/src/mesa/program/hash_table.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file hash_table.c
- * \brief Implementation of a generic, opaque hash table data type.
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-
-#include "main/imports.h"
-#include "main/simple_list.h"
-#include "hash_table.h"
-
-struct node {
-   struct node *next;
-   struct node *prev;
-};
-
-struct hash_table {
-    hash_func_t    hash;
-    hash_compare_func_t  compare;
-
-    unsigned num_buckets;
-    struct node buckets[1];
-};
-
-
-struct hash_node {
-    struct node link;
-    const void *key;
-    void *data;
-};
-
-
-struct hash_table *
-hash_table_ctor(unsigned num_buckets, hash_func_t hash,
-                hash_compare_func_t compare)
-{
-    struct hash_table *ht;
-    unsigned i;
-
-
-    if (num_buckets < 16) {
-        num_buckets = 16;
-    }
-
-    ht = malloc(sizeof(*ht) + ((num_buckets - 1) 
-				     * sizeof(ht->buckets[0])));
-    if (ht != NULL) {
-        ht->hash = hash;
-        ht->compare = compare;
-        ht->num_buckets = num_buckets;
-
-        for (i = 0; i < num_buckets; i++) {
-            make_empty_list(& ht->buckets[i]);
-        }
-    }
-
-    return ht;
-}
-
-
-void
-hash_table_dtor(struct hash_table *ht)
-{
-   hash_table_clear(ht);
-   free(ht);
-}
-
-
-void
-hash_table_clear(struct hash_table *ht)
-{
-   struct node *node;
-   struct node *temp;
-   unsigned i;
-
-
-   for (i = 0; i < ht->num_buckets; i++) {
-      foreach_s(node, temp, & ht->buckets[i]) {
-	 remove_from_list(node);
-	 free(node);
-      }
-
-      assert(is_empty_list(& ht->buckets[i]));
-   }
-}
-
-
-void *
-hash_table_find(struct hash_table *ht, const void *key)
-{
-    const unsigned hash_value = (*ht->hash)(key);
-    const unsigned bucket = hash_value % ht->num_buckets;
-    struct node *node;
-
-    foreach(node, & ht->buckets[bucket]) {
-       struct hash_node *hn = (struct hash_node *) node;
-
-       if ((*ht->compare)(hn->key, key) == 0) {
-	  return hn->data;
-       }
-    }
-
-    return NULL;
-}
-
-
-void
-hash_table_insert(struct hash_table *ht, void *data, const void *key)
-{
-    const unsigned hash_value = (*ht->hash)(key);
-    const unsigned bucket = hash_value % ht->num_buckets;
-    struct hash_node *node;
-
-    node = calloc(1, sizeof(*node));
-
-    node->data = data;
-    node->key = key;
-
-    insert_at_head(& ht->buckets[bucket], & node->link);
-}
-
-void
-hash_table_remove(struct hash_table *ht, const void *key)
-{
-    const unsigned hash_value = (*ht->hash)(key);
-    const unsigned bucket = hash_value % ht->num_buckets;
-    struct node *node;
-
-    foreach(node, & ht->buckets[bucket]) {
-       struct hash_node *hn = (struct hash_node *) node;
-
-       if ((*ht->compare)(hn->key, key) == 0) {
-	  remove_from_list(node);
-	  free(node);
-	  return;
-       }
-    }
-}
-
-unsigned
-hash_table_string_hash(const void *key)
-{
-    const char *str = (const char *) key;
-    unsigned hash = 5381;
-
-
-    while (*str != '\0') {
-        hash = (hash * 33) + *str;
-        str++;
-    }
-
-    return hash;
-}
-
-
-unsigned
-hash_table_pointer_hash(const void *key)
-{
-   return (unsigned)((uintptr_t) key / sizeof(void *));
-}
-
-
-int
-hash_table_pointer_compare(const void *key1, const void *key2)
-{
-   return key1 == key2 ? 0 : 1;
-}
diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h
deleted file mode 100644
index f1c4fdc..0000000
--- a/src/mesa/program/hash_table.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-/**
- * \file hash_table.h
- * \brief Implementation of a generic, opaque hash table data type.
- *
- * \author Ian Romanick <ian.d.romanick@intel.com>
- */
-
-#ifndef HASH_TABLE_H
-#define HASH_TABLE_H
-
-struct hash_table;
-
-typedef unsigned (*hash_func_t)(const void *key);
-typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Hash table constructor
- *
- * Creates a hash table with the specified number of buckets.  The supplied
- * \c hash and \c compare routines are used when adding elements to the table
- * and when searching for elements in the table.
- *
- * \param num_buckets  Number of buckets (bins) in the hash table.
- * \param hash         Function used to compute hash value of input keys.
- * \param compare      Function used to compare keys.
- */
-extern struct hash_table *hash_table_ctor(unsigned num_buckets,
-    hash_func_t hash, hash_compare_func_t compare);
-
-
-/**
- * Release all memory associated with a hash table
- *
- * \warning
- * This function cannot release memory occupied either by keys or data.
- */
-extern void hash_table_dtor(struct hash_table *ht);
-
-
-/**
- * Flush all entries from a hash table
- *
- * \param ht  Table to be cleared of its entries.
- */
-extern void hash_table_clear(struct hash_table *ht);
-
-
-/**
- * Search a hash table for a specific element
- *
- * \param ht   Table to be searched
- * \param key  Key of the desired element
- *
- * \return
- * The \c data value supplied to \c hash_table_insert when the element with
- * the matching key was added.  If no matching key exists in the table,
- * \c NULL is returned.
- */
-extern void *hash_table_find(struct hash_table *ht, const void *key);
-
-
-/**
- * Add an element to a hash table
- */
-extern void hash_table_insert(struct hash_table *ht, void *data,
-    const void *key);
-
-/**
- * Remove a specific element from a hash table.
- */
-extern void hash_table_remove(struct hash_table *ht, const void *key);
-
-/**
- * Compute hash value of a string
- *
- * Computes the hash value of a string using the DJB2 algorithm developed by
- * Professor Daniel J. Bernstein.  It was published on comp.lang.c once upon
- * a time.  I was unable to find the original posting in the archives.
- *
- * \param key  Pointer to a NUL terminated string to be hashed.
- *
- * \sa hash_table_string_compare
- */
-extern unsigned hash_table_string_hash(const void *key);
-
-
-/**
- * Compare two strings used as keys
- *
- * This is just a macro wrapper around \c strcmp.
- *
- * \sa hash_table_string_hash
- */
-#define hash_table_string_compare ((hash_compare_func_t) strcmp)
-
-
-/**
- * Compute hash value of a pointer
- *
- * \param key  Pointer to be used as a hash key
- *
- * \note
- * The memory pointed to by \c key is \b never accessed.  The value of \c key
- * itself is used as the hash key
- *
- * \sa hash_table_pointer_compare
- */
-unsigned
-hash_table_pointer_hash(const void *key);
-
-
-/**
- * Compare two pointers used as keys
- *
- * \sa hash_table_pointer_hash
- */
-int
-hash_table_pointer_compare(const void *key1, const void *key2);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* HASH_TABLE_H */
diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
deleted file mode 100644
index 7197615..0000000
--- a/src/mesa/program/ir_to_mesa.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "main/config.h"
-#include "main/mtypes.h"
-
-void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
-void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
-GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/mesa/program/prog_parameter.cpp b/src/mesa/program/prog_parameter.cpp
deleted file mode 100644
index d673d5f..0000000
--- a/src/mesa/program/prog_parameter.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// all allocations need to use hieralloc
-#include "prog_parameter.h"
-
-#include "src/glsl/ir.h"
-
-extern GLint _mesa_add_parameter(struct gl_program_parameter_list * paramList,
-                                    const char * name)
-{
-   int index = _mesa_get_parameter(paramList, name);
-   if (index >= 0)
-      return index;
-      
-   paramList->NumParameters++;
-   if (paramList->NumParameters > paramList->Size) {
-      paramList->Size = paramList->NumParameters + 4;
-      paramList->Parameters = hieralloc_realloc(paramList, paramList->Parameters,
-                              gl_program_parameter, paramList->Size);
-   }
-
-   gl_program_parameter * param = paramList->Parameters + paramList->NumParameters - 1;
-   memset(param, 0, sizeof(*param));
-   param->Name = hieralloc_strdup(paramList, name);
-   param->BindLocation = -1;
-   param->Location = -1;
-
-   return paramList->NumParameters - 1;
-}
-
-extern GLint _mesa_get_parameter(const struct gl_program_parameter_list * paramList,
-                                    const char * name)
-{
-   for (unsigned i = 0; i < paramList->NumParameters; i++)
-      if (!strcmp(name, paramList->Parameters[i].Name))
-         return i;
-   return -1;
-}
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
deleted file mode 100644
index 608b835..0000000
--- a/src/mesa/program/prog_parameter.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.3
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file prog_parameter.c
- * Program parameter lists and functions.
- * \author Brian Paul
- */
-
-#ifndef PROG_PARAMETER_H
-#define PROG_PARAMETER_H
-
-#include "main/mtypes.h"
-#include "prog_statevars.h"
-
-
-/**
- * Program parameter flags
- */
-/*@{*/
-#define PROG_PARAM_BIT_CENTROID   0x1  /**< for varying vars (GLSL 1.20) */
-#define PROG_PARAM_BIT_INVARIANT  0x2  /**< for varying vars (GLSL 1.20) */
-#define PROG_PARAM_BIT_FLAT       0x4  /**< for varying vars (GLSL 1.30) */
-#define PROG_PARAM_BIT_LINEAR     0x8  /**< for varying vars (GLSL 1.30) */
-#define PROG_PARAM_BIT_CYL_WRAP  0x10  /**< XXX gallium debug */
-/*@}*/
-
-
-
-/**
- * Program parameter.
- * Used by shaders/programs for uniforms, constants, varying vars, etc.
- */
-struct gl_program_parameter
-{
-   const char *Name;        /**< Null-terminated string */
-   //gl_register_file Type;   /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */
-   //GLenum DataType;         /**< GL_FLOAT, GL_FLOAT_VEC2, etc */
-   /**
-    * Number of components (1..4), or more.
-    * If the number of components is greater than 4,
-    * this parameter is part of a larger uniform like a GLSL matrix or array.
-    * The next program parameter's Size will be Size-4 of this parameter.
-    */
-   //GLuint Size;
-   GLuint Slots;            /**< how many float[4] slots occupied */
-   // location starts from 0, such that VERT_ATTRIB_GENERIC0 = 0
-   // since there are no predefined vertex attribs in es20
-   // for varyings BindLocation is vertex output location
-   // and Loctation is fragment input location
-   GLint BindLocation;  /**< requested by BindAttribLocation for attributes */
-   GLint Location;          /**< actual location assigned after linking */
-   //GLboolean Initialized;   /**< debug: Has the ParameterValue[] been set? */
-   //GLbitfield Flags;        /**< Bitmask of PROG_PARAM_*_BIT */
-   /**
-    * A sequence of STATE_* tokens and integers to identify GL state.
-    */
-   //gl_state_index StateIndexes[STATE_LENGTH];
-};
-
-
-/**
- * List of gl_program_parameter instances.
- */
-struct gl_program_parameter_list
-{
-   GLuint Size;           /**< allocated size of Parameters, ParameterValues */
-   GLuint NumParameters;  /**< number of parameters in arrays */
-   struct gl_program_parameter *Parameters; /**< Array [Size] */
-   //GLfloat (*ParameterValues)[4];        /**< Array [Size] of GLfloat[4] */
-   //GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes
-   //                            might invalidate ParameterValues[] */
-};
-
-#ifdef __cplusplus
-extern "C" {
-class ir_variable;
-#else
-typedef struct ir_variable ir_variable;
-#endif
-
-// returns index in paramList or -1
-GLint _mesa_add_parameter(struct gl_program_parameter_list * paramList,
-                           const char * name);
-                                                  
-GLint _mesa_get_parameter(const struct gl_program_parameter_list * paramList,
-                           const char * name);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PROG_PARAMETER_H */
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
deleted file mode 100644
index 009ebde..0000000
--- a/src/mesa/program/prog_statevars.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.1
- *
- * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef PROG_STATEVARS_H
-#define PROG_STATEVARS_H
-
-#include "main/mtypes.h"
-
-
-/**
- * Number of STATE_* values we need to address any GL state.
- * Used to dimension arrays.
- */
-#define STATE_LENGTH 5
-
-
-/**
- * Used for describing GL state referenced from inside ARB vertex and
- * fragment programs.
- * A string such as "state.light[0].ambient" gets translated into a
- * sequence of tokens such as [ STATE_LIGHT, 0, STATE_AMBIENT ].
- *
- * For state that's an array, like STATE_CLIPPLANE, the 2nd token [1] should
- * always be the array index.
- */
-typedef enum gl_state_index_ {
-   STATE_MATERIAL = 100,  /* start at 100 so small ints are seen as ints */
-
-   STATE_LIGHT,
-   STATE_LIGHTMODEL_AMBIENT,
-   STATE_LIGHTMODEL_SCENECOLOR,
-   STATE_LIGHTPROD,
-
-   STATE_TEXGEN,
-
-   STATE_FOG_COLOR,
-   STATE_FOG_PARAMS,
-
-   STATE_CLIPPLANE,
-
-   STATE_POINT_SIZE,
-   STATE_POINT_ATTENUATION,
-
-   STATE_MODELVIEW_MATRIX,
-   STATE_PROJECTION_MATRIX,
-   STATE_MVP_MATRIX,
-   STATE_TEXTURE_MATRIX,
-   STATE_PROGRAM_MATRIX,
-   STATE_MATRIX_INVERSE,
-   STATE_MATRIX_TRANSPOSE,
-   STATE_MATRIX_INVTRANS,
-
-   STATE_AMBIENT,
-   STATE_DIFFUSE,
-   STATE_SPECULAR,
-   STATE_EMISSION,
-   STATE_SHININESS,
-   STATE_HALF_VECTOR,
-
-   STATE_POSITION,       /**< xyzw = position */
-   STATE_ATTENUATION,    /**< xyz = attenuation, w = spot exponent */
-   STATE_SPOT_DIRECTION, /**< xyz = direction, w = cos(cutoff) */
-   STATE_SPOT_CUTOFF,    /**< x = cutoff, yzw = undefined */
-
-   STATE_TEXGEN_EYE_S,
-   STATE_TEXGEN_EYE_T,
-   STATE_TEXGEN_EYE_R,
-   STATE_TEXGEN_EYE_Q,
-   STATE_TEXGEN_OBJECT_S,
-   STATE_TEXGEN_OBJECT_T,
-   STATE_TEXGEN_OBJECT_R,
-   STATE_TEXGEN_OBJECT_Q,
-
-   STATE_TEXENV_COLOR,
-
-   STATE_DEPTH_RANGE,
-
-   STATE_VERTEX_PROGRAM,
-   STATE_FRAGMENT_PROGRAM,
-
-   STATE_ENV,
-   STATE_LOCAL,
-
-   STATE_INTERNAL,		/* Mesa additions */
-   STATE_CURRENT_ATTRIB,        /* ctx->Current vertex attrib value */
-   STATE_NORMAL_SCALE,
-   STATE_TEXRECT_SCALE,
-   STATE_FOG_PARAMS_OPTIMIZED,  /* for faster fog calc */
-   STATE_POINT_SIZE_CLAMPED,    /* includes implementation dependent size clamp */
-   STATE_POINT_SIZE_IMPL_CLAMP, /* for implementation clamp only in vs */
-   STATE_LIGHT_SPOT_DIR_NORMALIZED,   /* pre-normalized spot dir */
-   STATE_LIGHT_POSITION,              /* object vs eye space */
-   STATE_LIGHT_POSITION_NORMALIZED,   /* object vs eye space */
-   STATE_LIGHT_HALF_VECTOR,           /* object vs eye space */
-   STATE_PT_SCALE,              /**< Pixel transfer RGBA scale */
-   STATE_PT_BIAS,               /**< Pixel transfer RGBA bias */
-   STATE_SHADOW_AMBIENT,        /**< ARB_shadow_ambient fail value; token[2] is texture unit index */
-   STATE_FB_SIZE,               /**< (width-1, height-1, 0, 0) */
-   STATE_FB_WPOS_Y_TRANSFORM,   /**< (1, 0, -1, height-1) if a FBO is bound, (-1, height-1, 1, 0) otherwise */
-   STATE_ROT_MATRIX_0,          /**< ATI_envmap_bumpmap, rot matrix row 0 */
-   STATE_ROT_MATRIX_1,          /**< ATI_envmap_bumpmap, rot matrix row 1 */
-   STATE_INTERNAL_DRIVER	/* first available state index for drivers (must be last) */
-} gl_state_index;
-
-
-
-extern void
-_mesa_load_state_parameters(struct gl_context *ctx,
-                            struct gl_program_parameter_list *paramList);
-
-
-extern GLbitfield
-_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]);
-
-
-extern char *
-_mesa_program_state_string(const gl_state_index state[STATE_LENGTH]);
-
-
-extern void
-_mesa_load_tracked_matrices(struct gl_context *ctx);
-
-
-#endif /* PROG_STATEVARS_H */
diff --git a/src/mesa/program/prog_uniform.h b/src/mesa/program/prog_uniform.h
deleted file mode 100644
index c6c92b0..0000000
--- a/src/mesa/program/prog_uniform.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  7.1
- *
- * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file prog_uniform.c
- * Shader uniform functions.
- * \author Brian Paul
- */
-
-#ifndef PROG_UNIFORM_H
-#define PROG_UNIFORM_H
-
-#include "main/glheader.h"
-
-
-/**
- * Shader program uniform variable.
- * The glGetUniformLocation() and glUniform() commands will use this
- * information.
- * Note that a uniform such as "binormal" might be used in both the
- * vertex shader and the fragment shader.  When glUniform() is called to
- * set the uniform's value, it must be updated in both the vertex and
- * fragment shaders.  The uniform may be in different locations in the
- * two shaders so we keep track of that here.
- */
-struct gl_uniform
-{
-   const char *Name;        /**< Null-terminated string */
-   //GLint VertPos;
-   //GLint FragPos;
-   //GLint GeomPos;
-   GLint Pos;
-   GLboolean Initialized;   /**< For debug.  Has this uniform been set? */
-   const struct glsl_type *Type;
-};
-
-
-/**
- * List of gl_uniforms
- */
-struct gl_uniform_list
-{
-   GLuint Size;                 /**< allocated size of Uniforms array */
-   GLuint NumUniforms;          /**< number of uniforms in the array */
-   GLuint Slots;                /**< number of float[4] slots non-sampler uniforms occupy */
-   GLuint SamplerSlots;         /**< number of float[4] slots samplers occupy */
-   struct gl_uniform *Uniforms; /**< Array [Size] */
-};
-
-
-extern struct gl_uniform_list *
-_mesa_new_uniform_list(void);
-
-extern void
-_mesa_free_uniform_list(struct gl_uniform_list *list);
-
-extern struct gl_uniform *
-_mesa_append_uniform(struct gl_uniform_list *list,
-                     const char *name, GLenum target, GLuint progPos);
-
-extern GLint
-_mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name);
-
-extern GLint
-_mesa_longest_uniform_name(const struct gl_uniform_list *list);
-
-extern void
-_mesa_print_uniforms(const struct gl_uniform_list *list);
-
-
-#endif /* PROG_UNIFORM_H */
diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c
deleted file mode 100644
index 004f1f8..0000000
--- a/src/mesa/program/symbol_table.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#include "main/imports.h"
-#include "symbol_table.h"
-#include "hash_table.h"
-
-struct symbol {
-    /**
-     * Link to the next symbol in the table with the same name
-     *
-     * The linked list of symbols with the same name is ordered by scope
-     * from inner-most to outer-most.
-     */
-    struct symbol *next_with_same_name;
-
-
-    /**
-     * Link to the next symbol in the table with the same scope
-     *
-     * The linked list of symbols with the same scope is unordered.  Symbols
-     * in this list my have unique names.
-     */
-    struct symbol *next_with_same_scope;
-
-
-    /**
-     * Header information for the list of symbols with the same name.
-     */
-    struct symbol_header *hdr;
-
-
-    /**
-     * Name space of the symbol
-     *
-     * Name space are arbitrary user assigned integers.  No two symbols can
-     * exist in the same name space at the same scope level.
-     */
-    int name_space;
-
-    /** Scope depth where this symbol was defined. */
-    unsigned depth;
-
-    /**
-     * Arbitrary user supplied data.
-     */
-    void *data;
-};
-
-
-/**
- */
-struct symbol_header {
-    /** Linkage in list of all headers in a given symbol table. */
-    struct symbol_header *next;
-
-    /** Symbol name. */
-    char *name;
-
-    /** Linked list of symbols with the same name. */
-    struct symbol *symbols;
-};
-
-
-/**
- * Element of the scope stack.
- */
-struct scope_level {
-    /** Link to next (inner) scope level. */
-    struct scope_level *next;
-    
-    /** Linked list of symbols with the same scope. */
-    struct symbol *symbols;
-};
-
-
-/**
- *
- */
-struct _mesa_symbol_table {
-    /** Hash table containing all symbols in the symbol table. */
-    struct hash_table *ht;
-
-    /** Top of scope stack. */
-    struct scope_level *current_scope;
-
-    /** List of all symbol headers in the table. */
-    struct symbol_header *hdr;
-
-    /** Current scope depth. */
-    unsigned depth;
-};
-
-
-struct _mesa_symbol_table_iterator {
-    /**
-     * Name space of symbols returned by this iterator.
-     */
-    int name_space;
-
-
-    /**
-     * Currently iterated symbol
-     *
-     * The next call to \c _mesa_symbol_table_iterator_get will return this
-     * value.  It will also update this value to the value that should be
-     * returned by the next call.
-     */
-    struct symbol *curr;
-};
-
-
-static void
-check_symbol_table(struct _mesa_symbol_table *table)
-{
-#if 1
-    struct scope_level *scope;
-
-    for (scope = table->current_scope; scope != NULL; scope = scope->next) {
-        struct symbol *sym;
-
-        for (sym = scope->symbols
-             ; sym != NULL
-             ; sym = sym->next_with_same_name) {
-            const struct symbol_header *const hdr = sym->hdr;
-            struct symbol *sym2;
-
-            for (sym2 = hdr->symbols
-                 ; sym2 != NULL
-                 ; sym2 = sym2->next_with_same_name) {
-                assert(sym2->hdr == hdr);
-            }
-        }
-    }
-#endif
-}
-
-void
-_mesa_symbol_table_pop_scope(struct _mesa_symbol_table *table)
-{
-    struct scope_level *const scope = table->current_scope;
-    struct symbol *sym = scope->symbols;
-
-    table->current_scope = scope->next;
-    table->depth--;
-
-    free(scope);
-
-    while (sym != NULL) {
-        struct symbol *const next = sym->next_with_same_scope;
-        struct symbol_header *const hdr = sym->hdr;
-
-        assert(hdr->symbols == sym);
-
-        hdr->symbols = sym->next_with_same_name;
-
-        free(sym);
-
-        sym = next;
-    }
-
-    check_symbol_table(table);
-}
-
-
-void
-_mesa_symbol_table_push_scope(struct _mesa_symbol_table *table)
-{
-    struct scope_level *const scope = calloc(1, sizeof(*scope));
-    
-    scope->next = table->current_scope;
-    table->current_scope = scope;
-    table->depth++;
-}
-
-
-static struct symbol_header *
-find_symbol(struct _mesa_symbol_table *table, const char *name)
-{
-    return (struct symbol_header *) hash_table_find(table->ht, name);
-}
-
-
-struct _mesa_symbol_table_iterator *
-_mesa_symbol_table_iterator_ctor(struct _mesa_symbol_table *table,
-                                 int name_space, const char *name)
-{
-    struct _mesa_symbol_table_iterator *iter = calloc(1, sizeof(*iter));
-    struct symbol_header *const hdr = find_symbol(table, name);
-    
-    iter->name_space = name_space;
-
-    if (hdr != NULL) {
-        struct symbol *sym;
-
-        for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
-            assert(sym->hdr == hdr);
-
-            if ((name_space == -1) || (sym->name_space == name_space)) {
-                iter->curr = sym;
-                break;
-            }
-        }
-    }
-
-    return iter;
-}
-
-
-void
-_mesa_symbol_table_iterator_dtor(struct _mesa_symbol_table_iterator *iter)
-{
-    free(iter);
-}
-
-
-void *
-_mesa_symbol_table_iterator_get(struct _mesa_symbol_table_iterator *iter)
-{
-    return (iter->curr == NULL) ? NULL : iter->curr->data;
-}
-
-
-int
-_mesa_symbol_table_iterator_next(struct _mesa_symbol_table_iterator *iter)
-{
-    struct symbol_header *hdr;
-
-    if (iter->curr == NULL) {
-        return 0;
-    }
-
-    hdr = iter->curr->hdr;
-    iter->curr = iter->curr->next_with_same_name;
-
-    while (iter->curr != NULL) {
-        assert(iter->curr->hdr == hdr);
-
-        if ((iter->name_space == -1)
-            || (iter->curr->name_space == iter->name_space)) {
-            return 1;
-        }
-
-        iter->curr = iter->curr->next_with_same_name;
-    }
-
-    return 0;
-}
-
-
-/**
- * Determine the scope "distance" of a symbol from the current scope
- *
- * \return
- * A non-negative number for the number of scopes between the current scope
- * and the scope where a symbol was defined.  A value of zero means the current
- * scope.  A negative number if the symbol does not exist.
- */
-int
-_mesa_symbol_table_symbol_scope(struct _mesa_symbol_table *table,
-				int name_space, const char *name)
-{
-    struct symbol_header *const hdr = find_symbol(table, name);
-    struct symbol *sym;
-
-    if (hdr != NULL) {
-       for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
-	  assert(sym->hdr == hdr);
-
-	  if ((name_space == -1) || (sym->name_space == name_space)) {
-	     assert(sym->depth <= table->depth);
-	     return sym->depth - table->depth;
-	  }
-       }
-    }
-
-    return -1;
-}
-
-
-void *
-_mesa_symbol_table_find_symbol(struct _mesa_symbol_table *table,
-                               int name_space, const char *name)
-{
-    struct symbol_header *const hdr = find_symbol(table, name);
-
-    if (hdr != NULL) {
-        struct symbol *sym;
-
-
-        for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
-            assert(sym->hdr == hdr);
-
-            if ((name_space == -1) || (sym->name_space == name_space)) {
-                return sym->data;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-
-int
-_mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
-                              int name_space, const char *name,
-                              void *declaration)
-{
-    struct symbol_header *hdr;
-    struct symbol *sym;
-
-    check_symbol_table(table);
-
-    hdr = find_symbol(table, name);
-
-    check_symbol_table(table);
-
-    if (hdr == NULL) {
-       hdr = calloc(1, sizeof(*hdr));
-       hdr->name = strdup(name);
-
-       hash_table_insert(table->ht, hdr, hdr->name);
-       hdr->next = table->hdr;
-       table->hdr = hdr;
-    }
-
-    check_symbol_table(table);
-
-    /* If the symbol already exists in this namespace at this scope, it cannot
-     * be added to the table.
-     */
-    for (sym = hdr->symbols
-	 ; (sym != NULL) && (sym->name_space != name_space)
-	 ; sym = sym->next_with_same_name) {
-       /* empty */
-    }
-
-    if (sym && (sym->depth == table->depth))
-       return -1;
-
-    sym = calloc(1, sizeof(*sym));
-    sym->next_with_same_name = hdr->symbols;
-    sym->next_with_same_scope = table->current_scope->symbols;
-    sym->hdr = hdr;
-    sym->name_space = name_space;
-    sym->data = declaration;
-    sym->depth = table->depth;
-
-    assert(sym->hdr == hdr);
-
-    hdr->symbols = sym;
-    table->current_scope->symbols = sym;
-
-    check_symbol_table(table);
-    return 0;
-}
-
-
-int
-_mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *table,
-				     int name_space, const char *name,
-				     void *declaration)
-{
-    struct symbol_header *hdr;
-    struct symbol *sym;
-    struct symbol *curr;
-    struct scope_level *top_scope;
-
-    check_symbol_table(table);
-
-    hdr = find_symbol(table, name);
-
-    check_symbol_table(table);
-
-    if (hdr == NULL) {
-        hdr = calloc(1, sizeof(*hdr));
-        hdr->name = strdup(name);
-
-        hash_table_insert(table->ht, hdr, hdr->name);
-        hdr->next = table->hdr;
-        table->hdr = hdr;
-    }
-
-    check_symbol_table(table);
-
-    /* If the symbol already exists in this namespace at this scope, it cannot
-     * be added to the table.
-     */
-    for (sym = hdr->symbols
-	 ; (sym != NULL) && (sym->name_space != name_space)
-	 ; sym = sym->next_with_same_name) {
-       /* empty */
-    }
-
-    if (sym && sym->depth == 0)
-       return -1;
-
-    /* Find the top-level scope */
-    for (top_scope = table->current_scope
-	 ; top_scope->next != NULL
-	 ; top_scope = top_scope->next) {
-       /* empty */
-    }
-
-    sym = calloc(1, sizeof(*sym));
-    sym->next_with_same_scope = top_scope->symbols;
-    sym->hdr = hdr;
-    sym->name_space = name_space;
-    sym->data = declaration;
-
-    assert(sym->hdr == hdr);
-
-    /* Since next_with_same_name is ordered by scope, we need to append the
-     * new symbol to the _end_ of the list.
-     */
-    if (hdr->symbols == NULL) {
-       hdr->symbols = sym;
-    } else {
-       for (curr = hdr->symbols
-	    ; curr->next_with_same_name != NULL
-	    ; curr = curr->next_with_same_name) {
-	  /* empty */
-       }
-       curr->next_with_same_name = sym;
-    }
-    top_scope->symbols = sym;
-
-    check_symbol_table(table);
-    return 0;
-}
-
-
-
-struct _mesa_symbol_table *
-_mesa_symbol_table_ctor(void)
-{
-    struct _mesa_symbol_table *table = calloc(1, sizeof(*table));
-
-    if (table != NULL) {
-       table->ht = hash_table_ctor(32, hash_table_string_hash,
-				   hash_table_string_compare);
-
-       _mesa_symbol_table_push_scope(table);
-    }
-
-    return table;
-}
-
-
-void
-_mesa_symbol_table_dtor(struct _mesa_symbol_table *table)
-{
-   struct symbol_header *hdr;
-   struct symbol_header *next;
-
-   while (table->current_scope != NULL) {
-      _mesa_symbol_table_pop_scope(table);
-   }
-
-   for (hdr = table->hdr; hdr != NULL; hdr = next) {
-       next = hdr->next;
-       free(hdr->name);
-       free(hdr);
-   }
-
-   hash_table_dtor(table->ht);
-   free(table);
-}
diff --git a/src/mesa/program/symbol_table.h b/src/mesa/program/symbol_table.h
deleted file mode 100644
index f9d9164..0000000
--- a/src/mesa/program/symbol_table.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#ifndef MESA_SYMBOL_TABLE_H
-#define MESA_SYMBOL_TABLE_H
-
-struct _mesa_symbol_table;
-struct _mesa_symbol_table_iterator;
-
-extern void _mesa_symbol_table_push_scope(struct _mesa_symbol_table *table);
-
-extern void _mesa_symbol_table_pop_scope(struct _mesa_symbol_table *table);
-
-extern int _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *symtab,
-    int name_space, const char *name, void *declaration);
-
-extern int _mesa_symbol_table_add_global_symbol(
-    struct _mesa_symbol_table *symtab, int name_space, const char *name,
-    void *declaration);
-
-extern int _mesa_symbol_table_symbol_scope(struct _mesa_symbol_table *table,
-    int name_space, const char *name);
-
-extern void *_mesa_symbol_table_find_symbol(
-    struct _mesa_symbol_table *symtab, int name_space, const char *name);
-
-extern struct _mesa_symbol_table *_mesa_symbol_table_ctor(void);
-
-extern void _mesa_symbol_table_dtor(struct _mesa_symbol_table *);
-
-extern struct _mesa_symbol_table_iterator *_mesa_symbol_table_iterator_ctor(
-    struct _mesa_symbol_table *table, int name_space, const char *name);
-
-extern void _mesa_symbol_table_iterator_dtor(
-    struct _mesa_symbol_table_iterator *);
-
-extern void *_mesa_symbol_table_iterator_get(
-    struct _mesa_symbol_table_iterator *iter);
-
-extern int _mesa_symbol_table_iterator_next(
-    struct _mesa_symbol_table_iterator *iter);
-
-#endif /* MESA_SYMBOL_TABLE_H */
diff --git a/src/pixelflinger2/buffer.cpp b/src/pixelflinger2/buffer.cpp
deleted file mode 100644
index fe45740..0000000
--- a/src/pixelflinger2/buffer.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "src/pixelflinger2/pixelflinger2.h"
-
-#include <string.h>
-#include <stdio.h>
-
-void SetShaderVerifyFunctions(GGLInterface *);
-
-static void DepthFunc(GGLInterface * iface, GLenum func)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_NEVER > func || GL_ALWAYS < func)
-      return gglError(GL_INVALID_ENUM);
-   ctx->state.bufferState.depthFunc = func & 0x7;
-   SetShaderVerifyFunctions(iface);
-}
-
-static void StencilFuncSeparate(GGLInterface * iface, GLenum face, GLenum func, GLint ref, GLuint mask)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_FRONT > face || GL_FRONT_AND_BACK < face)
-      return gglError(GL_INVALID_ENUM);
-   if (GL_NEVER > func || GL_ALWAYS < func)
-      return gglError(GL_INVALID_ENUM);
-   mask &= 0xff;
-   ref = MAX2(MIN2(ref, 0xff), 0);
-   ref &= mask;
-   if (GL_FRONT == face || GL_FRONT_AND_BACK == face) {
-      ctx->state.frontStencil.ref = ref;
-      ctx->state.frontStencil.mask = mask;
-      ctx->state.frontStencil.func = func & 0x7;
-   }
-   if (GL_BACK == face || GL_FRONT_AND_BACK == face) {
-      ctx->state.backStencil.ref = ref;
-      ctx->state.backStencil.mask = mask;
-      ctx->state.backStencil.func = func & 0x7;
-   }
-   SetShaderVerifyFunctions(iface);
-}
-
-static unsigned StencilOpEnum(GLenum func, unsigned oldValue)
-{
-   switch (func) {
-   case GL_ZERO:
-      return 0;
-   case GL_KEEP: // fall through
-   case GL_REPLACE: // fall through
-   case GL_INCR: // fall through
-   case GL_DECR:
-      return func - GL_KEEP + 1;
-      break;
-   case GL_INVERT:
-      return 5;
-   case GL_INCR_WRAP:
-      return 6;
-   case GL_DECR_WRAP:
-      return 7;
-   default:
-      gglError(GL_INVALID_ENUM);
-      return oldValue;
-   }
-}
-
-static void StencilOpSeparate(GGLInterface * iface, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_FRONT > face || GL_FRONT_AND_BACK < face)
-      return gglError(GL_INVALID_ENUM);
-   if (GL_FRONT == face || GL_FRONT_AND_BACK == face) {
-      ctx->state.frontStencil.sFail = StencilOpEnum(sfail, ctx->state.frontStencil.sFail);
-      ctx->state.frontStencil.dFail = StencilOpEnum(dpfail, ctx->state.frontStencil.dFail);
-      ctx->state.frontStencil.dPass = StencilOpEnum(dppass, ctx->state.frontStencil.dPass);
-   }
-   if (GL_BACK == face || GL_FRONT_AND_BACK == face) {
-      ctx->state.backStencil.sFail = StencilOpEnum(sfail, ctx->state.backStencil.sFail);
-      ctx->state.backStencil.dFail = StencilOpEnum(dpfail, ctx->state.backStencil.dFail);
-      ctx->state.backStencil.dPass = StencilOpEnum(dppass, ctx->state.backStencil.dPass);
-   }
-   SetShaderVerifyFunctions(iface);
-}
-
-static void StencilSelect(const GGLInterface * iface, GLenum face)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_FRONT == face) {
-      ctx->activeStencil.face = 0;
-      ctx->activeStencil.ref = ctx->state.frontStencil.ref;
-      ctx->activeStencil.mask = ctx->state.frontStencil.mask;
-   } else if (GL_BACK == face) {
-      ctx->activeStencil.face = 1;
-      ctx->activeStencil.ref = ctx->state.backStencil.ref;
-      ctx->activeStencil.mask = ctx->state.backStencil.mask;
-   }
-}
-
-static void ClearStencil(GGLInterface * iface, GLint s)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->clearState.stencil = 0x01010101 * ((unsigned &)s & 0xff);
-}
-
-static void ClearColor(GGLInterface * iface, GLclampf r, GLclampf g, GLclampf b, GLclampf a)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   r = MAX2(MIN2(r, 1.0f), 0);
-   g = MAX2(MIN2(g, 1.0f), 0);
-   b = MAX2(MIN2(b, 1.0f), 0);
-   a = MAX2(MIN2(a, 1.0f), 0);
-   ctx->clearState.color = (unsigned(a * 255) << 24) | (unsigned(b * 255) << 16) |
-                           (unsigned(g * 255) << 8) | unsigned(r * 255);
-}
-
-static void ClearDepthf(GGLInterface * iface, GLclampf d)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   // assuming ieee 754 32 bit float and 32 bit 2's complement int
-   assert(sizeof(d) == sizeof(ctx->clearState.depth));
-   ctx->clearState.depth = (int &)d; // bit reinterpretation
-   if (0x80000000 & ctx->clearState.depth) // smaller negative float has bigger int representation, so flip
-      ctx->clearState.depth ^= 0x7fffffff; // since -FLT_MAX is close to -1 when bitcasted
-}
-
-static void Clear(const GGLInterface * iface, GLbitfield buf)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-
-   // TODO DXL scissor test
-   if (GL_COLOR_BUFFER_BIT & buf && ctx->frameSurface.data) {
-      if (GGL_PIXEL_FORMAT_RGBA_8888 == ctx->frameSurface.format) {
-         unsigned * const end = (unsigned *)ctx->frameSurface.data +
-                                ctx->frameSurface.width * ctx->frameSurface.height;
-         const unsigned color = ctx->clearState.color;
-         for (unsigned * start = (unsigned *)ctx->frameSurface.data; start < end; start++)
-            *start = color;
-      } else if (GGL_PIXEL_FORMAT_RGB_565 == ctx->frameSurface.format) {
-         short * const end = (short *)ctx->frameSurface.data +
-                             ctx->frameSurface.width * ctx->frameSurface.height;
-         unsigned r = ctx->clearState.color & 0xf8, g = ctx->clearState.color & 0xfc00,
-                      b = ctx->clearState.color & 0xf80000;
-         const short color = (b >> 19) | (g >> 5) | (r >> 3);
-         for (short * start = (short *)ctx->frameSurface.data; start < end; start++)
-            *start = color;
-      } else
-         assert(0);
-   }
-   if (GL_DEPTH_BUFFER_BIT & buf && ctx->depthSurface.data) {
-      assert(GGL_PIXEL_FORMAT_Z_32 == ctx->depthSurface.format);
-      unsigned * const end = (unsigned *)ctx->depthSurface.data +
-                             ctx->depthSurface.width * ctx->depthSurface.height;
-      const unsigned depth = ctx->clearState.depth;
-      for (unsigned * start = (unsigned *)ctx->depthSurface.data; start < end; start++)
-         *start = depth;
-   }
-   if (GL_STENCIL_BUFFER_BIT & buf && ctx->stencilSurface.data) {
-      assert(GGL_PIXEL_FORMAT_S_8 == ctx->stencilSurface.format);
-      unsigned * const end = (unsigned *)((unsigned char *)ctx->stencilSurface.data +
-                                          ctx->stencilSurface.width * ctx->stencilSurface.height);
-      unsigned * start = (unsigned *)ctx->stencilSurface.data;
-      const unsigned stencil = ctx->clearState.stencil;
-      for (start; start < end; start++)
-         *start = stencil;
-      start--;
-      for (unsigned char * i = (unsigned char *)start; i < (unsigned char *)end; i++)
-         *i = stencil & 0xff;
-   }
-}
-
-static void SetBuffer(GGLInterface * iface, const GLenum type, GGLSurface * surface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   bool changed = false;
-   if (GL_COLOR_BUFFER_BIT == type) {
-      if (surface) {
-         ctx->frameSurface = *surface;
-         changed |= ctx->frameSurface.format ^ surface->format;
-         switch (surface->format) {
-         case GGL_PIXEL_FORMAT_RGBA_8888:
-         case GGL_PIXEL_FORMAT_RGB_565:
-            break;
-         case GGL_PIXEL_FORMAT_RGBX_8888:
-         default:
-            ALOGD("pf2: SetBuffer 0x%.04X format=0x%.02X \n", type, surface ? surface->format : 0);
-            assert(0);
-         }
-      } else {
-         memset(&ctx->frameSurface, 0, sizeof(ctx->frameSurface));
-         changed = true;
-      }
-      ctx->state.bufferState.colorFormat = ctx->frameSurface.format;
-   } else if (GL_DEPTH_BUFFER_BIT == type) {
-      if (surface) {
-         ctx->depthSurface = *surface;
-         changed |= ctx->depthSurface.format ^ surface->format;
-         assert(GGL_PIXEL_FORMAT_Z_32 == ctx->depthSurface.format);
-      } else {
-         memset(&ctx->depthSurface, 0, sizeof(ctx->depthSurface));
-         changed = true;
-      }
-      ctx->state.bufferState.depthFormat = ctx->depthSurface.format;
-   } else if (GL_STENCIL_BUFFER_BIT == type) {
-      if (surface) {
-         ctx->stencilSurface = *surface;
-         changed |= ctx->stencilSurface.format ^ surface->format;
-         assert(GGL_PIXEL_FORMAT_S_8 == ctx->stencilSurface.format);
-      } else {
-         memset(&ctx->stencilSurface, 0, sizeof(ctx->stencilSurface));
-         changed = true;
-      }
-      ctx->state.bufferState.stencilFormat = ctx->stencilSurface.format;
-   } else
-      gglError(GL_INVALID_ENUM);
-   if (changed) {
-      SetShaderVerifyFunctions(iface);
-   }
-}
-
-void InitializeBufferFunctions(GGLInterface * iface)
-{
-   iface->DepthFunc = DepthFunc;
-   iface->StencilFuncSeparate = StencilFuncSeparate;
-   iface->StencilOpSeparate = StencilOpSeparate;
-   iface->StencilSelect = StencilSelect;
-   iface->ClearStencil = ClearStencil;
-   iface->ClearColor = ClearColor;
-   iface->ClearDepthf = ClearDepthf;
-   iface->Clear = Clear;
-   iface->SetBuffer = SetBuffer;
-}
diff --git a/src/pixelflinger2/format.cpp b/src/pixelflinger2/format.cpp
deleted file mode 100644
index a7348ad..0000000
--- a/src/pixelflinger2/format.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <pixelflinger2/pixelflinger2_format.h>
-
-static GGLFormat const gPixelFormatInfos[] =
-{   //          Alpha    Red     Green   Blue
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  4, 32, {{32,24,   8, 0,  16, 8,  24,16 }}, GGL_RGBA },   // PIXEL_FORMAT_RGBA_8888
-    {  4, 24, {{ 0, 0,   8, 0,  16, 8,  24,16 }}, GGL_RGB  },   // PIXEL_FORMAT_RGBX_8888
-    {0},//{  3, 24, {{ 0, 0,   8, 0,  16, 8,  24,16 }}, GGL_RGB  },   // PIXEL_FORMAT_RGB_888
-    {  2, 16, {{ 0, 0,  16,11,  11, 5,   5, 0 }}, GGL_RGB  },   // PIXEL_FORMAT_RGB_565
-    {  4, 32, {{32,24,  24,16,  16, 8,   8, 0 }}, GGL_RGBA },   // PIXEL_FORMAT_BGRA_8888
-    {  2, 16, {{ 1, 0,  16,11,  11, 6,   6, 1 }}, GGL_RGBA },   // PIXEL_FORMAT_RGBA_5551
-    {  2, 16, {{ 4, 0,  16,12,  12, 8,   8, 4 }}, GGL_RGBA },   // PIXEL_FORMAT_RGBA_4444
-    {  1,  8, {{ 8, 0,   0, 0,   0, 0,   0, 0 }}, GGL_ALPHA},   // PIXEL_FORMAT_A8
-    {  1,  8, {{ 0, 0,   8, 0,   8, 0,   8, 0 }}, GGL_LUMINANCE},//PIXEL_FORMAT_L8
-    {  2, 16, {{16, 8,   8, 0,   8, 0,   8, 0 }}, GGL_LUMINANCE_ALPHA},// PIXEL_FORMAT_LA_88
-    {  1,  8, {{ 0, 0,   8, 5,   5, 2,   2, 0 }}, GGL_RGB  },   // PIXEL_FORMAT_RGB_332
-
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-
-    {  2, 16, {{  0, 0, 16, 0,   0, 0,   0, 0 }}, GGL_DEPTH_COMPONENT},
-    {  1,  8, {{  8, 0,  0, 0,   0, 0,   0, 0 }}, GGL_STENCIL_INDEX  },
-    {  4, 24, {{  0, 0, 24, 0,   0, 0,   0, 0 }}, GGL_DEPTH_COMPONENT},
-    {  4,  8, {{ 32,24,  0, 0,   0, 0,   0, 0 }}, GGL_STENCIL_INDEX  },
-    {  4,  8, {{  0, 0, 32, 0,   0, 0,   0, 0 }}, GGL_STENCIL_INDEX  }, // PIXEL_FORMAT_Z32
-
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-    {  0,  0, {{ 0, 0,   0, 0,   0, 0,   0, 0 }},        0 },   // PIXEL_FORMAT_NONE
-
-};
-
-const GGLFormat* gglGetPixelFormatTable(size_t* numEntries)
-{
-    if (numEntries) {
-        *numEntries = sizeof(gPixelFormatInfos)/sizeof(GGLFormat);
-    }
-    return gPixelFormatInfos;
-}
\ No newline at end of file
diff --git a/src/pixelflinger2/llvm_helper.h b/src/pixelflinger2/llvm_helper.h
deleted file mode 100644
index bb589bb..0000000
--- a/src/pixelflinger2/llvm_helper.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- **
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_LLVM_HELPER_H_
-#define _PIXELFLINGER2_LLVM_HELPER_H_
-
-#include <stack>
-#include <stdio.h>
-#include <llvm/IR/IRBuilder.h>
-
-using namespace llvm;
-
-static const char * name(const char * str)
-{
-   return str;
-}
-
-static Value * minIntScalar(IRBuilder<> &builder, Value * in1, Value * in2)
-{
-   Value * cmp = builder.CreateICmpSLT(in1, in2);
-   return builder.CreateSelect(cmp, in1, in2);
-}
-
-static Value * maxIntScalar(IRBuilder<> &builder, Value * in1, Value * in2)
-{
-   Value * cmp = builder.CreateICmpSGT(in1, in2);
-   return builder.CreateSelect(cmp, in1, in2);
-}
-
-static Constant * constFloat(IRBuilder<> & builder, float x)
-{
-   return ConstantFP::get(builder.getContext(), APFloat(x));
-}
-
-static VectorType * intVecType(IRBuilder<> & builder)
-{
-   return VectorType::get(Type::getInt32Ty(builder.getContext()), 4);
-}
-
-static VectorType * floatVecType(IRBuilder<> & builder)
-{
-   return VectorType::get(Type::getFloatTy(builder.getContext()), 4);
-}
-
-static Value * constIntVec(IRBuilder<> & builder, int x, int y, int z, int w)
-{
-   std::vector<Constant *> vec(4);
-   vec[0] = builder.getInt32(x);
-   vec[1] = builder.getInt32(y);
-   vec[2] = builder.getInt32(z);
-   vec[3] = builder.getInt32(w);
-
-   llvm::ArrayRef<llvm::Constant*> ConstantArray(vec);
-   return ConstantVector::get(ConstantArray);
-}
-
-static Value * intVec(IRBuilder<> & builder, Value * x, Value * y, Value * z, Value * w)
-{
-   Value * res = Constant::getNullValue(intVecType(builder));
-   res = builder.CreateInsertElement(res, x, builder.getInt32(0), name("vecx"));
-   res = builder.CreateInsertElement(res, y, builder.getInt32(1), name("vecy"));
-   res = builder.CreateInsertElement(res, z, builder.getInt32(2), name("vecz"));
-   if (w)
-      res = builder.CreateInsertElement(res, w, builder.getInt32(3), name("vecw"));
-   return res;
-}
-
-static Value * constFloatVec(IRBuilder<> & builder, float x, float y, float z, float w)
-{
-   std::vector<Constant *> vec(4);
-   vec[0] = constFloat(builder, x);
-   vec[1] = constFloat(builder, y);
-   vec[2] = constFloat(builder, z);
-   vec[3] = constFloat(builder, w);
-
-   llvm::ArrayRef<llvm::Constant*> ConstantArray(vec);
-   return ConstantVector::get(ConstantArray);
-}
-
-static std::vector<Value *> extractVector(IRBuilder<> & builder, Value *vec)
-{
-   const VectorType * type = (const VectorType *)vec->getType();
-   std::vector<Value*> elems(4);
-   assert(type->getNumElements() <= 4);
-   for (unsigned i = 0; i < type->getNumElements(); i++)
-      elems[i] = builder.CreateExtractElement(vec, builder.getInt32(i), name("xtract"));
-   return elems;
-}
-
-static Value * intVecMax(IRBuilder<> & builder, Value * in1, Value * in2)
-{
-   std::vector<Value *> vec1 = extractVector(builder, in1);
-   std::vector<Value *> vec2 = extractVector(builder, in2);
-   for (unsigned i = 0; i < 4; i++) {
-      Value * cmp = builder.CreateICmpSGT(vec1[i], vec2[i], name("iVecSelCmp"));
-      vec1[i] = builder.CreateSelect(cmp, vec1[i], vec2[i], name("iVecSel"));
-   }
-   return intVec(builder, vec1[0], vec1[1], vec1[2], vec1[3]);
-}
-
-static Value * intVecMin(IRBuilder<> & builder, Value * in1, Value * in2)
-{
-   std::vector<Value *> vec1 = extractVector(builder, in1);
-   std::vector<Value *> vec2 = extractVector(builder, in2);
-   for (unsigned i = 0; i < 4; i++) {
-      Value * cmp = builder.CreateICmpSLT(vec1[i], vec2[i], name("iVecSelCmp"));
-      vec1[i] = builder.CreateSelect(cmp, vec1[i], vec2[i], name("iVecSel"));
-   }
-   return intVec(builder, vec1[0], vec1[1], vec1[2], vec1[3]);
-}
-
-// <4 x i32> [0, 255] to <4 x float> [0.0, 1.0]
-static Value * intColorVecToFloatColorVec(IRBuilder<> & builder, Value * vec)
-{
-   vec = builder.CreateUIToFP(vec, floatVecType(builder));
-   return builder.CreateFMul(vec, constFloatVec(builder, 1 / 255.0f,  1 / 255.0f,
-                             1 / 255.0f, 1 / 255.0f));
-}
-
-class CondBranch
-{
-   IRBuilder<> & m_builder;
-   std::stack<BasicBlock *> m_ifStack;
-
-   struct Loop {
-      BasicBlock *begin;
-      BasicBlock *end;
-   };
-   std::stack<Loop> m_loopStack;
-
-   CondBranch();
-
-public:
-   CondBranch(IRBuilder<> & builder) : m_builder(builder) {}
-   ~CondBranch() {
-      assert(m_ifStack.empty());
-      assert(m_loopStack.empty());
-   }
-
-   void ifCond(Value * cmp, const char * trueBlock = "ifT", const char * falseBlock = "ifF") {
-      Function * function = m_builder.GetInsertBlock()->getParent();
-      BasicBlock * ifthen = BasicBlock::Create(m_builder.getContext(), name(trueBlock), function, NULL);
-      BasicBlock * ifend = BasicBlock::Create(m_builder.getContext(), name(falseBlock), function, NULL);
-      m_builder.CreateCondBr(cmp, ifthen, ifend);
-      m_builder.SetInsertPoint(ifthen);
-      m_ifStack.push(ifend);
-   }
-
-   void elseop() {
-      assert(!m_ifStack.empty());
-      BasicBlock *ifend = BasicBlock::Create(m_builder.getContext(), name("else_end"), m_builder.GetInsertBlock()->getParent(),0);
-      if (!m_builder.GetInsertBlock()->getTerminator()) // ret void is a block terminator
-         m_builder.CreateBr(ifend); // branch is also a block terminator
-      else {
-         debug_printf("Instructions::elseop block alread has terminator \n");
-         m_builder.GetInsertBlock()->getTerminator()->dump();
-         assert(0);
-      }
-      m_builder.SetInsertPoint(m_ifStack.top());
-      m_builder.GetInsertBlock()->setName(name("else_then"));
-      m_ifStack.pop();
-      m_ifStack.push(ifend);
-   }
-
-   void endif() {
-      assert(!m_ifStack.empty());
-      if (!m_builder.GetInsertBlock()->getTerminator()) // ret void is a block terminator
-         m_builder.CreateBr(m_ifStack.top()); // branch is also a block terminator
-      else {
-         debug_printf("Instructions::endif block alread has terminator");
-         m_builder.GetInsertBlock()->getTerminator()->dump();
-         assert(0);
-      }
-      m_builder.SetInsertPoint(m_ifStack.top());
-      m_ifStack.pop();
-   }
-
-   void beginLoop() {
-      Function * function = m_builder.GetInsertBlock()->getParent();
-      BasicBlock *begin = BasicBlock::Create(m_builder.getContext(), name("loop"), function,0);
-      BasicBlock *end = BasicBlock::Create(m_builder.getContext(), name("endloop"), function,0);
-
-      m_builder.CreateBr(begin);
-      Loop loop;
-      loop.begin = begin;
-      loop.end   = end;
-      m_builder.SetInsertPoint(begin);
-      m_loopStack.push(loop);
-   }
-
-   void endLoop() {
-      assert(!m_loopStack.empty());
-      Loop loop = m_loopStack.top();
-      m_builder.CreateBr(loop.begin);
-      loop.end->moveAfter(m_builder.GetInsertBlock());
-      m_builder.SetInsertPoint(loop.end);
-      m_loopStack.pop();
-   }
-
-   void brk() {
-      assert(!m_loopStack.empty());
-      BasicBlock *unr = BasicBlock::Create(m_builder.getContext(), name("unreachable"), m_builder.GetInsertBlock()->getParent(),0);
-      m_builder.CreateBr(m_loopStack.top().end);
-      m_builder.SetInsertPoint(unr);
-   }
-};
-
-#endif // #ifndef _PIXELFLINGER2_LLVM_HELPER_H_
diff --git a/src/pixelflinger2/llvm_scanline.cpp b/src/pixelflinger2/llvm_scanline.cpp
deleted file mode 100644
index 6acc3a5..0000000
--- a/src/pixelflinger2/llvm_scanline.cpp
+++ /dev/null
@@ -1,740 +0,0 @@
-/**
- **
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "src/pixelflinger2/pixelflinger2.h"
-#include "src/pixelflinger2/llvm_helper.h"
-#include "src/mesa/main/mtypes.h"
-
-#include <llvm/IR/Module.h>
-
-//#undef ALOGD
-//#define ALOGD(...)
-
-using namespace llvm;
-
-static void StencilOp(IRBuilder<> &builder, const unsigned char op,
-                      Value * sPtr, Value * sRef)
-{
-   CondBranch condBranch(builder);
-   Value * s = builder.CreateLoad(sPtr, "stenciOpS");
-   switch (op) {
-   case 0 : // GL_ZERO
-      builder.CreateStore(builder.getInt8(0), sPtr);
-      break;
-   case 1 : // GL_KEEP
-      builder.CreateStore(s, sPtr);
-      break;
-   case 2 : // GL_REPLACE
-      builder.CreateStore(sRef, sPtr);
-      break;
-   case 3 : // GL_INCR
-      condBranch.ifCond(builder.CreateICmpEQ(s, builder.getInt8(255)));
-      builder.CreateStore(s, sPtr);
-      condBranch.elseop();
-      builder.CreateStore(builder.CreateAdd(s, builder.getInt8(1)), sPtr);
-      condBranch.endif();
-      break;
-   case 4 : // GL_DECR
-      condBranch.ifCond(builder.CreateICmpEQ(s, builder.getInt8(0)));
-      builder.CreateStore(s, sPtr);
-      condBranch.elseop();
-      builder.CreateStore(builder.CreateSub(s, builder.getInt8(1)), sPtr);
-      condBranch.endif();
-      break;
-   case 5 : // GL_INVERT
-      builder.CreateStore(builder.CreateNot(s), sPtr);
-      break;
-   case 6 : // GL_INCR_WRAP
-      builder.CreateStore(builder.CreateAdd(s, builder.getInt8(1)), sPtr);
-      break;
-   case 7 : // GL_DECR_WRAP
-      builder.CreateStore(builder.CreateSub(s, builder.getInt8(1)), sPtr);
-      break;
-   default:
-      assert(0);
-      break;
-   }
-}
-
-static Value * StencilOp(IRBuilder<> & builder, Value * face,
-                         const unsigned char frontOp, const unsigned char backOp,
-                         Value * sPtr, Value * sRef)
-{
-   CondBranch condBranch(builder);
-   if (frontOp != backOp)
-      condBranch.ifCond(builder.CreateICmpEQ(face, builder.getInt8(0)));
-
-   StencilOp(builder, frontOp, sPtr, sRef);
-
-   if (frontOp != backOp) {
-      condBranch.elseop();
-      StencilOp(builder, backOp, sPtr, sRef);
-      condBranch.endif();
-   }
-   return builder.CreateLoad(sPtr);
-}
-
-static void StencilFunc(IRBuilder<> & builder, const unsigned char func,
-                        Value * s, Value * sRef, Value * sCmpPtr)
-{
-   switch (func) {
-   case GL_NEVER & 0x7:
-      builder.CreateStore(builder.getFalse(), sCmpPtr);
-      break;
-   case GL_LESS & 0x7:
-      builder.CreateStore(builder.CreateICmpULT(sRef, s), sCmpPtr);
-      break;
-   case GL_EQUAL & 0x7:
-      builder.CreateStore(builder.CreateICmpEQ(sRef, s), sCmpPtr);
-      break;
-   case GL_LEQUAL & 0x7:
-      builder.CreateStore(builder.CreateICmpULE(sRef, s), sCmpPtr);
-      break;
-   case GL_GREATER & 0x7:
-      builder.CreateStore(builder.CreateICmpUGT(sRef, s), sCmpPtr);
-      break;
-   case GL_NOTEQUAL & 0x7:
-      builder.CreateStore(builder.CreateICmpNE(sRef, s), sCmpPtr);
-      break;
-   case GL_GEQUAL & 0x7:
-      builder.CreateStore(builder.CreateICmpUGE(sRef, s), sCmpPtr);
-      break;
-   case GL_ALWAYS & 0x7:
-      builder.CreateStore(builder.getTrue(), sCmpPtr);
-      break;
-   default:
-      assert(0);
-      break;
-   }
-}
-
-static Value * BlendFactor(const unsigned mode, Value * src, Value * dst,
-                           Value * constant, Value * one, Value * zero,
-                           Value * srcA, Value * dstA, Value * constantA,
-                           Value * sOne, const bool isVector, IRBuilder<> & builder)
-{
-   Value * factor = NULL;
-   switch (mode) {
-   case GGLBlendState::GGL_ZERO:
-      factor = zero;
-      break;
-   case GGLBlendState::GGL_ONE:
-      factor = one;
-      break;
-   case GGLBlendState::GGL_SRC_COLOR:
-      factor = src;
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_SRC_COLOR:
-      factor = builder.CreateSub(one, src);
-      break;
-   case GGLBlendState::GGL_DST_COLOR:
-      factor = dst;
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_DST_COLOR:
-      factor = builder.CreateSub(one, dst);
-      break;
-   case GGLBlendState::GGL_SRC_ALPHA:
-      factor = srcA;
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_SRC_ALPHA:
-      factor = builder.CreateSub(sOne, srcA);
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   case GGLBlendState::GGL_DST_ALPHA:
-      factor = dstA;
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_DST_ALPHA:
-      factor = builder.CreateSub(sOne, dstA);
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   case GGLBlendState::GGL_SRC_ALPHA_SATURATE:
-      // valid only for source color and alpha
-      factor = minIntScalar(builder, srcA, builder.CreateSub(sOne, dstA));
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, sOne);
-      else
-         factor = sOne; // when it's used for source alpha, it's just 1
-      break;
-   case GGLBlendState::GGL_CONSTANT_COLOR:
-      factor = constant;
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_CONSTANT_COLOR:
-      factor = builder.CreateSub(one, constant);
-      break;
-   case GGLBlendState::GGL_CONSTANT_ALPHA:
-      factor = constantA;
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   case GGLBlendState::GGL_ONE_MINUS_CONSTANT_ALPHA:
-      factor = builder.CreateSub(sOne, constantA);
-      if (isVector)
-         factor = intVec(builder, factor, factor, factor, factor);
-      break;
-   default:
-      assert(0);
-      break;
-   }
-   return factor;
-}
-
-static Value * Saturate(IRBuilder<> & builder, Value * intVector)
-{
-   intVector = intVecMax(builder, intVector, constIntVec(builder, 0,0,0,0));
-   return intVecMin(builder, intVector, constIntVec(builder, 255,255,255,255));
-}
-
-// src is int32x4 [0,255] rgba vector, and combines them into int32
-// RGB_565 channel order is weird
-static Value * IntVectorToScreenColor(IRBuilder<> & builder, const GGLPixelFormat format, Value * src)
-{
-   if (GGL_PIXEL_FORMAT_RGBA_8888 == format) {
-      src = builder.CreateShl(src, constIntVec(builder, 0, 8, 16, 24));
-      std::vector<Value *> comps = extractVector(builder, src);
-      comps[0] = builder.CreateOr(comps[0], comps[1]);
-      comps[0] = builder.CreateOr(comps[0], comps[2]);
-      comps[0] = builder.CreateOr(comps[0], comps[3]);
-      return comps[0];
-   } else if (GGL_PIXEL_FORMAT_RGB_565 == format) {
-      src = builder.CreateAnd(src, constIntVec(builder, 0xf8, 0xfc, 0xf8, 0));
-      std::vector<Value *> comps = extractVector(builder, src);
-      // channel order is weird
-      for (unsigned i = 0; i < 4; i++)
-         comps[i] = builder.CreateTrunc(comps[i], builder.getInt16Ty());
-      comps[2] = builder.CreateLShr(comps[2], 3);
-      comps[1] = builder.CreateShl(comps[1], 3);
-      comps[0] = builder.CreateShl(comps[0], 8);
-
-      comps[0] = builder.CreateOr(comps[0], comps[1]);
-      comps[0] = builder.CreateOr(comps[0], comps[2]);
-      return comps[0];
-   } else if (GGL_PIXEL_FORMAT_UNKNOWN == format)
-      return builder.getInt32(0);
-   else
-      assert(0);
-   return NULL;
-}
-
-// src is int32 or int16, return is int32x4 [0,255] rgba
-// RGB_565 channel order is weird
-static Value * ScreenColorToIntVector(IRBuilder<> & builder, const GGLPixelFormat format, Value * src)
-{
-   src = builder.CreateZExt(src, builder.getInt32Ty());
-   Value * dst = intVec(builder, src, src, src, src);
-   if (GGL_PIXEL_FORMAT_RGBA_8888 == format) {
-      dst = builder.CreateLShr(dst, constIntVec(builder, 0, 8, 16, 24));
-      dst = builder.CreateAnd(dst, constIntVec(builder, 0xff, 0xff, 0xff, 0xff));
-   } else if (GGL_PIXEL_FORMAT_RGB_565 == format) {
-      // channel order is weird
-      dst = builder.CreateAnd(dst, constIntVec(builder, 0xf800, 0x7e0, 0x1f, 0));
-      dst = builder.CreateLShr(dst, constIntVec(builder, 8, 3, 0, 0));
-      dst = builder.CreateShl(dst, constIntVec(builder, 0, 0, 3, 0));
-      dst = builder.CreateOr(dst, constIntVec(builder, 0, 0, 0, 0xff));
-   } else if (GGL_PIXEL_FORMAT_UNKNOWN == format)
-      ALOGD("pf2: ScreenColorToIntVector GGL_PIXEL_FORMAT_UNKNOWN"); // not set yet, do nothing
-   else
-      assert(0);
-   return dst;
-}
-
-// src is <4 x float> approx [0,1]; dst is <4 x i32> [0,255] from frame buffer; return is i32
-Value * GenerateFSBlend(const GGLState * gglCtx, const GGLPixelFormat format, /*const RegDesc * regDesc,*/
-                        IRBuilder<> & builder, Value * src, Value * dst)
-{
-   Type * const intType = builder.getInt32Ty();
-
-   // TODO cast the outputs pointer type to int for writing to minimize bandwidth
-   if (!gglCtx->blendState.enable) {
-//        if (regDesc->IsInt32Color())
-//        {
-//            debug_printf("GenerateFixedFS dst is already scalar fixed0 \n");
-//            src = builder.CreateExtractElement(src, builder.getInt32(0));
-//            src = builder.CreateBitCast(src, intType); // it's already RGBA int32
-//        }
-//        else if (regDesc->IsVectorType(Float))
-//        {
-      src = builder.CreateFMul(src, constFloatVec(builder,255,255,255,255));
-      src = builder.CreateFPToSI(src, intVecType(builder));
-      src = Saturate(builder, src);
-      src = IntVectorToScreenColor(builder, format, src);
-//        }
-//        else if (regDesc->IsVectorType(Fixed8))
-//        {
-//            src = builder.CreateBitCast(src, instr->GetIntVectorType());
-//            src = Saturate(instr, src);
-//            src = IntVectorToColor(instr, storage, src);
-//        }
-//        else if (regDesc->IsVectorType(Fixed16))
-//        {
-//            src = builder.CreateBitCast(src, instr->GetIntVectorType());
-//            src = builder.CreateAShr(src, constIntVec(builder,8,8,8,8));
-//            src = Saturate(instr, src);
-//            src = IntVectorToColor(instr, storage, src);
-//        }
-//        else
-//            assert(0);
-      return src;
-   }
-   // blending, so convert src to <4 x i32>
-//    if (regDesc->IsInt32Color())
-//    {
-//        src = builder.CreateExtractElement(src, builder.getInt32(0));
-//        src = builder.CreateBitCast(src, intType); // it's already RGBA int32
-//
-//        Value * channels = Constant::getNullValue(instr->GetIntVectorType());
-//        channels = builder.CreateInsertElement(channels, src, builder.getInt32(0));
-//        channels = builder.CreateInsertElement(channels, src, builder.getInt32(1));
-//        channels = builder.CreateInsertElement(channels, src, builder.getInt32(2));
-//        channels = builder.CreateInsertElement(channels, src, builder.getInt32(3));
-//        channels = builder.CreateLShr(channels, constIntVec(builder,0, 8, 16, 24));
-//        channels = builder.CreateAnd(channels, constIntVec(builder,0xff, 0xff, 0xff, 0xff));
-//        src = channels;
-//    }
-//    else if (regDesc->IsVectorType(Fixed8)) // it's already int32x4 RGBA
-//        src = builder.CreateBitCast(src, instr->GetIntVectorType());
-//    else if (regDesc->IsVectorType(Fixed16))
-//    {
-//        src = builder.CreateBitCast(src, instr->GetIntVectorType());
-//        // TODO DXL consider shl dst by 8 and ashr by 16 in the end for more precision
-//        src = builder.CreateAShr(src, constIntVec(builder,8,8,8,8));
-//    }
-//    else if (regDesc->IsVectorType(Float))
-//    {
-   src = builder.CreateFMul(src, constFloatVec(builder,255,255,255,255));
-   src = builder.CreateFPToSI(src, intVecType(builder));
-//    }
-//    else
-//        assert(0);
-
-   Value * const one = constIntVec(builder,255,255,255,255);
-   Value * const zero = constIntVec(builder,0,0,0,0);
-   Value * const sOne = builder.getInt32(255);
-   Value * const sZero = builder.getInt32(0);
-
-#if USE_LLVM_SCANLINE
-   Value * constant = constIntVec(builder,gglCtx->blendState.color[0],
-                                  gglCtx->blendState.color[1],
-                                  gglCtx->blendState.color[2],
-                                  gglCtx->blendState.color[3]);
-#else
-   Value * constant = NULL;
-   assert(0);
-#endif
-
-   Value * srcA = extractVector(builder,src)[3];
-   Value * dstA = extractVector(builder,dst)[3];
-   Value * constantA = extractVector(builder,constant)[3];
-
-   Value * sf = BlendFactor(gglCtx->blendState.scf, src, dst,
-                            constant, one, zero, srcA, dstA,
-                            constantA, sOne, true, builder);
-   if (gglCtx->blendState.scf != gglCtx->blendState.saf) {
-      Value * sfA = BlendFactor(gglCtx->blendState.saf, srcA, dstA,
-                                constantA, sOne, sZero, srcA, dstA,
-                                constantA, sOne, false, builder);
-      sf = builder.CreateInsertElement(sf, sfA, builder.getInt32(3),
-                                       name("sfAStore"));
-   }
-
-   Value * df = BlendFactor(gglCtx->blendState.dcf, src, dst,
-                            constant, one, zero, srcA, dstA,
-                            constantA, sOne, true, builder);
-   if (gglCtx->blendState.dcf != gglCtx->blendState.daf) {
-      Value * dfA = BlendFactor(gglCtx->blendState.daf, srcA, dstA,
-                                constantA, sOne, sZero, srcA, dstA,
-                                constantA, sOne, false, builder);
-      df = builder.CreateInsertElement(df, dfA, builder.getInt32(3),
-                                       name("dfAStore"));
-   }
-
-   // this is factor *= 256 / 255; factors have a chance of constant folding
-   sf = builder.CreateAdd(sf, builder.CreateLShr(sf, constIntVec(builder,7,7,7,7)));
-   df = builder.CreateAdd(df, builder.CreateLShr(df, constIntVec(builder,7,7,7,7)));
-
-   src = builder.CreateMul(src, sf);
-   dst = builder.CreateMul(dst, df);
-
-   Value * res = NULL;
-   switch (gglCtx->blendState.ce + GL_FUNC_ADD) {
-   case GL_FUNC_ADD:
-      res = builder.CreateAdd(src, dst);
-      break;
-   case GL_FUNC_SUBTRACT:
-      res = builder.CreateSub(src, dst);
-      break;
-   case GL_FUNC_REVERSE_SUBTRACT:
-      res = builder.CreateSub(dst, src);
-      break;
-   default:
-      assert(0);
-      break;
-   }
-   if (gglCtx->blendState.ce != gglCtx->blendState.ae) {
-      srcA = extractVector(builder,src)[3];
-      dstA = extractVector(builder,dst)[3];
-      Value * resA = NULL;
-      switch (gglCtx->blendState.ae + GL_FUNC_ADD) {
-      case GL_FUNC_ADD:
-         resA = builder.CreateAdd(srcA, dstA);
-         break;
-      case GL_FUNC_SUBTRACT:
-         resA = builder.CreateSub(srcA, dstA);
-         break;
-      case GL_FUNC_REVERSE_SUBTRACT:
-         resA = builder.CreateSub(dstA, srcA);
-         break;
-      default:
-         assert(0);
-         break;
-      }
-      res = builder.CreateInsertElement(res, resA, builder.getInt32(3),
-                                        name("resAStore"));
-   }
-
-   res = builder.CreateAShr(res, constIntVec(builder,8,8,8,8));
-   res = Saturate(builder, res);
-   res = IntVectorToScreenColor(builder, format, res);
-   return res;
-}
-
-static FunctionType * ScanLineFunctionType(IRBuilder<> & builder)
-{
-   std::vector<Type*> funcArgs;
-   VectorType * vectorType = floatVecType(builder);
-   PointerType * vectorPtr = PointerType::get(vectorType, 0);
-   Type * intType = builder.getInt32Ty();
-   PointerType * intPointerType = PointerType::get(intType, 0);
-   PointerType * bytePointerType = PointerType::get(builder.getInt8Ty(), 0);
-
-   funcArgs.push_back(vectorPtr); // start
-   funcArgs.push_back(vectorPtr); // step
-   funcArgs.push_back(vectorPtr); // constants
-   funcArgs.push_back(intPointerType); // frame
-   funcArgs.push_back(intPointerType); // depth
-   funcArgs.push_back(bytePointerType); // stencil
-   funcArgs.push_back(bytePointerType); // stencil state
-   funcArgs.push_back(intType); // count
-
-   FunctionType *functionType = FunctionType::get(/*Result=*/builder.getVoidTy(),
-                                                  llvm::ArrayRef<Type*>(funcArgs),
-                                                  /*isVarArg=*/false);
-
-   return functionType;
-}
-
-// generated scanline function parameters are VertexOutput * start, VertexOutput * step,
-// unsigned * frame, int * depth, unsigned char * stencil,
-// GGLActiveStencilState * stencilState, unsigned count
-void GenerateScanLine(const GGLState * gglCtx, const gl_shader_program * program, Module * mod,
-                      const char * shaderName, const char * scanlineName)
-{
-   IRBuilder<> builder(mod->getContext());
-//   debug_printf("GenerateScanLine %s \n", scanlineName);
-
-   Type * intType = builder.getInt32Ty();
-   PointerType * intPointerType = PointerType::get(intType, 0);
-   Type * byteType = builder.getInt8Ty();
-   PointerType * bytePointerType = PointerType::get(byteType, 0);
-
-   Function * func = mod->getFunction(scanlineName);
-   if (func)
-      return;
-
-   func = llvm::cast<Function>(mod->getOrInsertFunction(scanlineName,
-                               ScanLineFunctionType(builder)));
-
-   BasicBlock *label_entry = BasicBlock::Create(builder.getContext(), "entry", func, 0);
-   builder.SetInsertPoint(label_entry);
-   CondBranch condBranch(builder);
-
-   Function::arg_iterator args = func->arg_begin();
-   Value * start = args++;
-   start->setName("start");
-   Value * step = args++;
-   step->setName("step");
-   Value * constants = args++;
-   constants->setName("constants");
-
-   // need alloc to be able to assign to it by using store
-   Value * framePtr = builder.CreateAlloca(intPointerType);
-   builder.CreateStore(args++, framePtr);
-   Value * depthPtr = builder.CreateAlloca(intPointerType);
-   builder.CreateStore(args++, depthPtr);
-   Value * stencilPtr = builder.CreateAlloca(bytePointerType);
-   builder.CreateStore(args++, stencilPtr);
-   Value * stencilState = args++;
-   stencilState->setName("stencilState");
-   Value * countPtr = builder.CreateAlloca(intType);
-   builder.CreateStore(args++, countPtr);
-
-   Value * sFace = NULL, * sRef = NULL, *sMask = NULL, * sFunc = NULL;
-   if (gglCtx->bufferState.stencilTest) {
-      sFace = builder.CreateLoad(builder.CreateConstInBoundsGEP1_32(stencilState, 0), "sFace");
-      if (gglCtx->frontStencil.ref == gglCtx->backStencil.ref)
-         sRef = builder.getInt8(gglCtx->frontStencil.ref);
-      else
-         sRef = builder.CreateLoad(builder.CreateConstInBoundsGEP1_32(stencilState, 1), "sRef");
-      if (gglCtx->frontStencil.mask == gglCtx->backStencil.mask)
-         sMask = builder.getInt8(gglCtx->frontStencil.mask);
-      else
-         sMask = builder.CreateLoad(builder.CreateConstInBoundsGEP1_32(stencilState, 2), "sMask");
-      if (gglCtx->frontStencil.func == gglCtx->backStencil.func)
-         sFunc = builder.getInt8(gglCtx->frontStencil.func);
-      else
-         sFunc = builder.CreateLoad(builder.CreateConstInBoundsGEP1_32(stencilState, 3), "sFunc");
-   }
-
-   condBranch.beginLoop(); // while (count > 0)
-
-   assert(framePtr && gglCtx);
-   // get values
-   Value * frame = NULL;
-   if (GGL_PIXEL_FORMAT_RGBA_8888 == gglCtx->bufferState.colorFormat)
-      frame = builder.CreateLoad(framePtr);
-   else if (GGL_PIXEL_FORMAT_RGB_565 == gglCtx->bufferState.colorFormat) {
-      frame = builder.CreateLoad(framePtr);
-      frame = builder.CreateBitCast(frame, PointerType::get(builder.getInt16Ty(), 0));
-   } else if (GGL_PIXEL_FORMAT_UNKNOWN == gglCtx->bufferState.colorFormat)
-      frame = builder.CreateLoad(framePtr); // color buffer not set yet
-   else
-      assert(0);
-
-   frame->setName("frame");
-   Value * depth = NULL, * stencil = NULL;
-   if (gglCtx->bufferState.depthTest) {
-      assert(GGL_PIXEL_FORMAT_Z_32 == gglCtx->bufferState.depthFormat);
-      depth = builder.CreateLoad(depthPtr);
-      depth->setName("depth");
-   }
-
-   Value * count = builder.CreateLoad(countPtr);
-   count->setName("count");
-
-   Value * cmp = builder.CreateICmpEQ(count, builder.getInt32(0));
-   condBranch.ifCond(cmp, "if_break_loop"); // if (count == 0)
-   condBranch.brk(); // break;
-   condBranch.endif();
-
-   Value * sCmpPtr = NULL, * sCmp = NULL, * sPtr = NULL, * s = NULL;
-   if (gglCtx->bufferState.stencilTest) {
-      stencil = builder.CreateLoad(stencilPtr);
-      stencil->setName("stencil");
-
-      // temporaries to load/store value
-      sCmpPtr = builder.CreateAlloca(builder.getInt1Ty());
-      sCmpPtr->setName("sCmpPtr");
-      sPtr = builder.CreateAlloca(byteType);
-      sPtr->setName("sPtr");
-
-      s = builder.CreateLoad(stencil);
-      s = builder.CreateAnd(s, sMask);
-      builder.CreateStore(s, sPtr);
-
-      if (gglCtx->frontStencil.func != gglCtx->backStencil.func)
-         condBranch.ifCond(builder.CreateICmpEQ(sFace, builder.getInt8(0)));
-
-      StencilFunc(builder, gglCtx->frontStencil.func, s, sRef, sCmpPtr);
-
-      if (gglCtx->frontStencil.func != gglCtx->backStencil.func) {
-         condBranch.elseop();
-         StencilFunc(builder, gglCtx->backStencil.func, s, sRef, sCmpPtr);
-         condBranch.endif();
-      }
-
-      sCmp = builder.CreateLoad(sCmpPtr);
-   } else
-      sCmp = ConstantInt::getTrue(mod->getContext());
-   sCmp->setName("sCmp");
-
-   Value * depthZ = NULL, * zPtr = NULL, * z = NULL, * zCmp = NULL;
-   if (gglCtx->bufferState.depthTest) {
-      depthZ  = builder.CreateLoad(depth, "depthZ"); // z stored in buffer
-      zPtr = builder.CreateAlloca(intType); // temp store for modifying incoming z
-      zPtr->setName("zPtr");
-
-      // modified incoming z
-      z = builder.CreateBitCast(start, intPointerType);
-      z = builder.CreateConstInBoundsGEP1_32(z, (GGL_FS_INPUT_OFFSET +
-                                             GGL_FS_INPUT_FRAGCOORD_INDEX) * 4 + 2);
-      z = builder.CreateLoad(z, "z");
-
-      builder.CreateStore(z, zPtr);
-
-      Value * zNegative = builder.CreateICmpSLT(z, builder.getInt32(0));
-      condBranch.ifCond(zNegative);
-      // if (0x80000000 & z) z ^= 0x7fffffff since smaller -ve float means bigger -ve int
-      z = builder.CreateXor(z, builder.getInt32(0x7fffffff));
-      builder.CreateStore(z, zPtr);
-
-      condBranch.endif();
-
-      z = builder.CreateLoad(zPtr, "z");
-
-      switch (0x200 | gglCtx->bufferState.depthFunc) {
-      case GL_NEVER:
-         zCmp = ConstantInt::getFalse(mod->getContext());
-         break;
-      case GL_LESS:
-         zCmp = builder.CreateICmpSLT(z, depthZ);
-         break;
-      case GL_EQUAL:
-         zCmp = builder.CreateICmpEQ(z, depthZ);
-         break;
-      case GL_LEQUAL:
-         zCmp = builder.CreateICmpSLE(z, depthZ);
-         break;
-      case GL_GREATER:
-         zCmp = builder.CreateICmpSGT(z, depthZ);
-         break;
-      case GL_NOTEQUAL:
-         zCmp = builder.CreateICmpNE(z, depthZ);
-         break;
-      case GL_GEQUAL:
-         zCmp = builder.CreateICmpSGE(z, depthZ);
-         break;
-      case GL_ALWAYS:
-         zCmp = ConstantInt::getTrue(mod->getContext());
-         break;
-      default:
-         assert(0);
-         break;
-      }
-   } else // no depth test means always pass
-      zCmp = ConstantInt::getTrue(mod->getContext());
-   zCmp->setName("zCmp");
-
-   condBranch.ifCond(sCmp, "if_sCmp", "sCmp_fail");
-   condBranch.ifCond(zCmp, "if_zCmp", "zCmp_fail");
-
-   Value * inputs = start;
-   Value * outputs = start;
-
-   Value * fsOutputs = builder.CreateConstInBoundsGEP1_32(start,
-                       offsetof(VertexOutput,fragColor)/sizeof(Vector4));
-
-   Function * fsFunction = mod->getFunction(shaderName);
-   assert(fsFunction);
-   CallInst *call = builder.CreateCall3(fsFunction,inputs, outputs, constants);
-   call->setCallingConv(CallingConv::C);
-   call->setTailCall(false);
-
-   Value * dst = Constant::getNullValue(intVecType(builder));
-   if (gglCtx->blendState.enable && (0 != gglCtx->blendState.dcf || 0 != gglCtx->blendState.daf)) {
-      Value * frameColor = builder.CreateLoad(frame, "frameColor");
-      dst = ScreenColorToIntVector(builder, gglCtx->bufferState.colorFormat, frameColor);
-   }
-
-   Value * src = builder.CreateConstInBoundsGEP1_32(fsOutputs, 0);
-   src = builder.CreateLoad(src);
-
-   Value * color = GenerateFSBlend(gglCtx, gglCtx->bufferState.colorFormat,/*&prog->outputRegDesc,*/ builder, src, dst);
-   builder.CreateStore(color, frame);
-   // TODO DXL depthmask check
-   if (gglCtx->bufferState.depthTest) {
-      z = builder.CreateBitCast(z, intType);
-      builder.CreateStore(z, depth); // store z
-   }
-
-   if (gglCtx->bufferState.stencilTest)
-      builder.CreateStore(StencilOp(builder, sFace, gglCtx->frontStencil.dPass,
-                                    gglCtx->backStencil.dPass, sPtr, sRef), stencil);
-
-   condBranch.elseop(); // failed z test
-
-   if (gglCtx->bufferState.stencilTest)
-      builder.CreateStore(StencilOp(builder, sFace, gglCtx->frontStencil.dFail,
-                                    gglCtx->backStencil.dFail, sPtr, sRef), stencil);
-   condBranch.endif();
-   condBranch.elseop(); // failed s test
-
-   if (gglCtx->bufferState.stencilTest)
-      builder.CreateStore(StencilOp(builder, sFace, gglCtx->frontStencil.sFail,
-                                    gglCtx->backStencil.sFail, sPtr, sRef), stencil);
-
-   condBranch.endif();
-   assert(frame);
-   frame = builder.CreateConstInBoundsGEP1_32(frame, 1); // frame++
-   // frame may have been casted to short* from int*, so cast back
-   frame = builder.CreateBitCast(frame, PointerType::get(builder.getInt32Ty(), 0));
-   builder.CreateStore(frame, framePtr);
-   if (gglCtx->bufferState.depthTest) {
-      depth = builder.CreateConstInBoundsGEP1_32(depth, 1); // depth++
-      builder.CreateStore(depth, depthPtr);
-   }
-   if (gglCtx->bufferState.stencilTest) {
-      stencil = builder.CreateConstInBoundsGEP1_32(stencil, 1); // stencil++
-      builder.CreateStore(stencil, stencilPtr);
-   }
-   Value * vPtr = NULL, * v = NULL, * dx = NULL;
-   if (program->UsesFragCoord) {
-      vPtr = builder.CreateConstInBoundsGEP1_32(start, GGL_FS_INPUT_OFFSET +
-             GGL_FS_INPUT_FRAGCOORD_INDEX);
-      v = builder.CreateLoad(vPtr);
-      dx = builder.CreateConstInBoundsGEP1_32(step, GGL_FS_INPUT_OFFSET +
-                                              GGL_FS_INPUT_FRAGCOORD_INDEX);
-      dx = builder.CreateLoad(dx);
-      v = builder.CreateFAdd(v, dx);
-      builder.CreateStore(v, vPtr);
-   } else if (gglCtx->bufferState.depthTest) {
-      Type * floatType = builder.getFloatTy();
-      PointerType * floatPointerType = PointerType::get(floatType, 0);
-      vPtr = builder.CreateBitCast(start, floatPointerType);
-      vPtr = builder.CreateConstInBoundsGEP1_32(vPtr,
-             (GGL_FS_INPUT_OFFSET + GGL_FS_INPUT_FRAGCOORD_INDEX) * 4 + 2);
-      v = builder.CreateLoad(vPtr);
-      dx = builder.CreateBitCast(step, floatPointerType);
-      dx = builder.CreateConstInBoundsGEP1_32(dx,
-                                              (GGL_FS_INPUT_OFFSET + GGL_FS_INPUT_FRAGCOORD_INDEX) * 4 + 2);
-      dx = builder.CreateLoad(dx);
-      v = builder.CreateFAdd(v, dx);
-      builder.CreateStore(v, vPtr);
-   }
-
-   if (program->UsesPointCoord) {
-      vPtr = builder.CreateConstInBoundsGEP1_32(start, GGL_FS_INPUT_OFFSET +
-             GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX);
-      v = builder.CreateLoad(vPtr);
-      dx = builder.CreateConstInBoundsGEP1_32(step, GGL_FS_INPUT_OFFSET +
-                                              GGL_FS_INPUT_FRONTFACINGPOINTCOORD_INDEX);
-      dx = builder.CreateLoad(dx);
-      v = builder.CreateFAdd(v, dx);
-      builder.CreateStore(v, vPtr);
-   }
-
-   for (unsigned i = 0; i < program->VaryingSlots; ++i) {
-      vPtr = builder.CreateConstInBoundsGEP1_32(start, offsetof(VertexOutput,varyings)/sizeof(Vector4) + i);
-      v = builder.CreateLoad(vPtr);
-      dx = builder.CreateConstInBoundsGEP1_32(step, GGL_FS_INPUT_OFFSET +
-                                              GGL_FS_INPUT_VARYINGS_INDEX + i);
-      dx = builder.CreateLoad(dx);
-      v = builder.CreateFAdd(v, dx);
-      builder.CreateStore(v, vPtr);
-   }
-
-   count = builder.CreateSub(count, builder.getInt32(1));
-   builder.CreateStore(count, countPtr); // count--;
-
-   condBranch.endLoop();
-
-   builder.CreateRetVoid();
-}
diff --git a/src/pixelflinger2/llvm_texture.cpp b/src/pixelflinger2/llvm_texture.cpp
deleted file mode 100644
index 8e9fd02..0000000
--- a/src/pixelflinger2/llvm_texture.cpp
+++ /dev/null
@@ -1,531 +0,0 @@
-/**
- **
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include <stack>
-
-#include "src/pixelflinger2/pixelflinger2.h"
-
-#include <llvm/IR/IRBuilder.h>
-#include <llvm/IR/Module.h>
-
-#include "src/pixelflinger2/llvm_helper.h"
-
-using namespace llvm;
-
-// texture data is int pointer to surface (will cast to short for 16bpp), index is linear texel index,
-// format is GGLPixelFormat for surface, return type is <4 x i32> rgba
-static Value * pointSample(IRBuilder<> & builder, Value * textureData, Value * index, const GGLPixelFormat format)
-{
-   Value * texel = NULL;
-   switch (format) {
-   case GGL_PIXEL_FORMAT_RGBA_8888:
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel");
-      break;
-   case GGL_PIXEL_FORMAT_RGBX_8888:
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel");
-      texel = builder.CreateOr(texel, builder.getInt32(0xff000000));
-      break;
-   case GGL_PIXEL_FORMAT_RGB_565: {
-      textureData = builder.CreateBitCast(textureData, PointerType::get(builder.getInt16Ty(), 0));
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel565");
-      texel = builder.CreateZExt(texel, Type::getInt32Ty(builder.getContext()));
-
-      Value * b = builder.CreateAnd(texel, builder.getInt32(0x1f));
-      b = builder.CreateShl(b, builder.getInt32(3));
-      b = builder.CreateOr(b, builder.CreateLShr(b, builder.getInt32(5)));
-
-      Value * g = builder.CreateAnd(texel, builder.getInt32(0x7e0));
-      g = builder.CreateShl(g, builder.getInt32(5));
-      g = builder.CreateOr(g, builder.CreateLShr(g, builder.getInt32(6)));
-      g = builder.CreateAnd(g, builder.getInt32(0xff00));
-
-      Value * r = builder.CreateAnd(texel, builder.getInt32(0xF800));
-      r = builder.CreateShl(r, builder.getInt32(8));
-      r = builder.CreateOr(r, builder.CreateLShr(r, builder.getInt32(5)));
-      r = builder.CreateAnd(r, builder.getInt32(0xff0000));
-
-      texel = builder.CreateOr(r, builder.CreateOr(g, b));
-      texel = builder.CreateOr(texel, builder.getInt32(0xff000000), name("texel"));
-      break;
-   }
-   case GGL_PIXEL_FORMAT_A_8: {
-      textureData = builder.CreateBitCast(textureData, PointerType::get(builder.getInt8Ty(),0));
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel_a8");
-      texel = builder.CreateZExt(texel, builder.getInt32Ty());
-      texel = builder.CreateShl(texel, builder.getInt32(24));
-      break;
-   }
-   case GGL_PIXEL_FORMAT_L_8: {
-      textureData = builder.CreateBitCast(textureData, PointerType::get(builder.getInt8Ty(),0));
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel_l8");
-      texel = builder.CreateZExt(texel, builder.getInt32Ty());
-      texel = builder.CreateOr(texel, builder.CreateShl(texel, 8));
-      texel = builder.CreateOr(texel, builder.CreateShl(texel, 8));
-      texel = builder.CreateOr(texel, builder.getInt32(0xff000000));
-      break;
-   }
-   case GGL_PIXEL_FORMAT_LA_88: {
-      textureData = builder.CreateBitCast(textureData, PointerType::get(builder.getInt16Ty(),0));
-      textureData = builder.CreateGEP(textureData, index);
-      texel = builder.CreateLoad(textureData, "texel_la8");
-      texel = builder.CreateZExt(texel, builder.getInt32Ty());
-      Value * alpha = builder.CreateAnd(texel, builder.getInt32(0xff00));
-      texel = builder.CreateAnd(texel, builder.getInt32(0xff));
-      texel = builder.CreateOr(texel, builder.CreateShl(texel, 8));
-      texel = builder.CreateOr(texel, builder.CreateShl(texel, 8));
-      texel = builder.CreateOr(texel, builder.CreateShl(alpha, 16));
-      break;
-   }
-   case GGL_PIXEL_FORMAT_UNKNOWN: // usually means texture not set yet
-      ALOGD("pf2: pointSample: unknown format, default to 0xffff00ff \n");
-      texel = builder.getInt32(0xffff00ff);
-      break;
-   default:
-      assert(0);
-      break;
-   }
-   Value * channels = Constant::getNullValue(intVecType(builder));
-
-//   if (dstDesc && dstDesc->IsInt32Color()) {
-//      channels = builder.CreateInsertElement(channels, texel, builder.getInt32(0));
-//      channels = builder.CreateBitCast(channels, floatVecType(builder));
-//      return channels;
-//   } else if (!dstDesc || dstDesc->IsVectorType()) {
-   channels = builder.CreateInsertElement(channels, texel, builder.getInt32(0));
-   channels = builder.CreateInsertElement(channels, texel, builder.getInt32(1));
-   channels = builder.CreateInsertElement(channels, texel, builder.getInt32(2));
-   channels = builder.CreateInsertElement(channels, texel, builder.getInt32(3));
-//      if (dstDesc && dstDesc->IsVectorType(Fixed8)) {
-//         channels = builder.CreateLShr(channels, constIntVec(builder, 0, 8, 16, 24));
-//         channels = builder.CreateAnd(channels, constIntVec(builder, 0xff, 0xff, 0xff, 0xff));
-//         channels = builder.CreateBitCast(channels, floatVecType(builder));
-//      } else if (dstDesc && dstDesc->IsVectorType(Fixed16)) {
-//         channels = builder.CreateShl(channels, constIntVec(builder, 8, 0, 0, 0));
-//         channels = builder.CreateLShr(channels, constIntVec(builder, 0, 0, 8, 16));
-//         channels = builder.CreateAnd(channels, constIntVec(builder, 0xff00, 0xff00, 0xff00, 0xff00));
-//         channels = builder.CreateBitCast(channels, floatVecType(builder));
-//      } else if (!dstDesc || dstDesc->IsVectorType(Float)) { // no analysis done in vertex shader, so use default float [0,1] output
-   channels = builder.CreateLShr(channels, constIntVec(builder, 0, 8, 16, 24));
-   channels = builder.CreateAnd(channels, constIntVec(builder, 0xff, 0xff, 0xff, 0xff));
-//   channels = builder.CreateUIToFP(channels, floatVecType(builder));
-//   channels = builder.CreateFMul(channels, constFloatVec(builder, 1 / 255.0f,  1 / 255.0f,
-//                                 1 / 255.0f, 1 / 255.0f));
-//      } else
-//         assert(0);
-//   } else
-//      assert(0);
-
-   return channels;
-}
-
-static const unsigned SHIFT = 16;
-
-// w  = width - 1, h = height - 1; similar to pointSample; returns <4 x i32> rgba
-static Value * linearSample(IRBuilder<> & builder, Value * textureData, Value * indexOffset,
-                            Value * x0, Value * y0, Value * xLerp, Value * yLerp,
-                            Value * w, Value * h,  Value * width, Value * height,
-                            const GGLPixelFormat format/*, const RegDesc * dstDesc*/)
-{
-   // TODO: linear filtering needs to be fixed for texcoord outside of [0,1]
-   Value * x1 = builder.CreateAdd(x0, builder.getInt32(1));
-   x1 = minIntScalar(builder, x1, w);
-   Value * y1 = builder.CreateAdd(y0, builder.getInt32(1));
-   y1 = minIntScalar(builder, y1, h);
-
-//   RegDesc regDesc;
-//   regDesc.SetVectorType(Fixed8);
-
-   Value * index = builder.CreateMul(y0, width);
-   index = builder.CreateAdd(index, x0);
-   index = builder.CreateAdd(index, indexOffset);
-   Value * s0 = pointSample(builder, textureData, index, format/*, &regDesc*/);
-//   s0 = builder.CreateBitCast(s0, intVecType(builder));
-
-   index = builder.CreateMul(y0, width);
-   index = builder.CreateAdd(index, x1);
-   index = builder.CreateAdd(index, indexOffset);
-   Value * s1 = pointSample(builder, textureData, index, format/*, &regDesc*/);
-//   s1 = builder.CreateBitCast(s1, intVecType(builder));
-
-   index = builder.CreateMul(y1, width);
-   index = builder.CreateAdd(index, x1);
-   index = builder.CreateAdd(index, indexOffset);
-   Value * s2 = pointSample(builder, textureData, index, format/*, &regDesc*/);
-//   s2 = builder.CreateBitCast(s2, intVecType(builder));
-
-   index = builder.CreateMul(y1, width);
-   index = builder.CreateAdd(index, x0);
-   index = builder.CreateAdd(index, indexOffset);
-   Value * s3 = pointSample(builder, textureData, index, format/*, &regDesc*/);
-//   s3 = builder.CreateBitCast(s3, intVecType(builder));
-
-   Value * xLerpVec = intVec(builder, xLerp, xLerp, xLerp, xLerp);
-
-   Value * h0 = builder.CreateMul(builder.CreateSub(s1, s0), xLerpVec);
-   // arithmetic shift right, since it's the result of subtraction, which could be negative
-   h0 = builder.CreateAShr(h0, constIntVec(builder, SHIFT, SHIFT, SHIFT, SHIFT));
-   h0 = builder.CreateAdd(h0, s0);
-
-   Value * h1 = builder.CreateMul(builder.CreateSub(s2, s3), xLerpVec);
-   h1 = builder.CreateAShr(h1, constIntVec(builder, SHIFT, SHIFT, SHIFT, SHIFT));
-   h1 = builder.CreateAdd(h1, s3);
-
-   Value * sample = builder.CreateMul(builder.CreateSub(h1, h0),
-                                      intVec(builder, yLerp, yLerp, yLerp, yLerp));
-   sample = builder.CreateAShr(sample, constIntVec(builder, SHIFT, SHIFT, SHIFT, SHIFT));
-   sample = builder.CreateAdd(sample, h0);
-
-   return sample;
-//   if (!dstDesc || dstDesc->IsVectorType(Float)) {
-//      sample = builder.CreateUIToFP(sample, floatVecType(builder));
-//      return builder.CreateFMul(sample, constFloatVec(builder, 1 / 255.0f,  1 / 255.0f,
-//                                1 / 255.0f, 1 / 255.0f));
-//   } else if (dstDesc && dstDesc->IsVectorType(Fixed16)) {
-//      sample = builder.CreateShl(sample, constIntVec(builder, 8, 8, 8, 8));
-//      return builder.CreateBitCast(sample, floatVecType(builder));
-//   } else if (dstDesc && dstDesc->IsVectorType(Fixed8))
-//      return builder.CreateBitCast(sample, floatVecType(builder));
-//   else if (dstDesc && dstDesc->IsInt32Color()) {
-//      sample = builder.CreateShl(sample, constIntVec(builder, 0, 8, 16, 24));
-//      std::vector<llvm::Value*> samples = extractVector(sample);
-//      samples[0] = builder.CreateOr(samples[0], samples[1]);
-//      samples[0] = builder.CreateOr(samples[0], samples[2]);
-//      samples[0] = builder.CreateOr(samples[0], samples[3]);
-//      sample = builder.CreateInsertElement(sample, samples[0], builder.getInt32(0));
-//      return builder.CreateBitCast(sample, floatVecType(builder));
-//   } else
-//      assert(0);
-}
-
-// dim is size - 1, since [0.0f,1.0f]->[0, size - 1]
-static Value * texcoordWrap(IRBuilder<> & builder, const unsigned wrap,
-                            /*const ChannelType type,*/ Value * r, Value * size, Value * dim,
-                            Value ** texelLerp)
-{
-   Type * intType = Type::getInt32Ty(builder.getContext());
-   Value * tc = NULL;
-   Value * odd = NULL;
-//   if (Float == type) {
-   // convert float to fixed16 so that 16LSB are the remainder, and bit 16 is one
-   // mantissa is the amount between two texels, used for linear interpolation
-   tc = ConstantFP::get(builder.getContext(), APFloat(float(1 << SHIFT)));
-   tc = builder.CreateFMul(tc, r);
-   tc = builder.CreateFPToSI(tc, intType);
-//   } else if (Fixed16 == type) {
-//      assert(16 == SHIFT);
-//      tc = builder.CreateBitCast(r, Type::getInt32Ty(builder.getContext()));
-//   } else
-//      assert(0);
-
-   odd = builder.CreateAnd(tc, builder.getInt32(1 << SHIFT), name("tc_odd"));
-
-   if (0 == wrap || 2 == wrap) // just the mantissa for wrap and mirrored
-      tc = builder.CreateAnd(tc, builder.getInt32((1 << SHIFT) - 1));
-
-   tc = builder.CreateMul(tc, dim);
-
-   *texelLerp = builder.CreateAnd(tc, builder.getInt32((1 << SHIFT) - 1));
-
-   tc = builder.CreateLShr(tc, builder.getInt32(SHIFT));
-
-   if (0 == wrap) // GL_REPEAT
-   { } else if (1 == wrap) { // GL_CLAMP_TO_EDGE
-      tc = maxIntScalar(builder, tc, builder.getInt32(0));
-      tc = minIntScalar(builder, tc, dim);
-   } else if (2 == wrap) { // GL_MIRRORER_REPEAT
-      Value * tcPtr = builder.CreateAlloca(intType);
-      builder.CreateStore(tc, tcPtr);
-      odd = builder.CreateICmpNE(odd, builder.getInt32(0));
-
-      CondBranch condBranch(builder);
-      condBranch.ifCond(odd);
-
-      tc = builder.CreateSub(dim, tc, name("tc_mirrored"));
-      builder.CreateStore(tc, tcPtr);
-
-      condBranch.endif();
-
-      tc = builder.CreateLoad(tcPtr);
-   } else
-      assert(0);
-
-   return tc;
-}
-
-Value * tex2D(IRBuilder<> & builder, Value * in1, const unsigned sampler,
-              /*const RegDesc * in1Desc, const RegDesc * dstDesc,*/
-              const GGLState * gglCtx)
-{
-   Type * intType = builder.getInt32Ty();
-   PointerType * intPointerType = PointerType::get(intType, 0);
-
-   llvm::Module * module = builder.GetInsertBlock()->getParent()->getParent();
-   std::vector<Value * > texcoords = extractVector(builder, in1);
-
-   Value * textureDimensions = module->getGlobalVariable(_PF2_TEXTURE_DIMENSIONS_NAME_);
-   if (!textureDimensions)
-      textureDimensions = new GlobalVariable(*module, intType, true,
-                                             GlobalValue::ExternalLinkage,
-                                             NULL, _PF2_TEXTURE_DIMENSIONS_NAME_);
-   Value * textureWidth = builder.CreateConstInBoundsGEP1_32(textureDimensions,
-                          sampler * 2);
-   textureWidth = builder.CreateLoad(textureWidth, name("textureWidth"));
-   Value * textureHeight = builder.CreateConstInBoundsGEP1_32(textureDimensions,
-                           sampler * 2 + 1);
-   textureHeight = builder.CreateLoad(textureHeight, name("textureHeight"));
-   Value * textureW = builder.CreateSub(textureWidth, builder.getInt32(1));
-   Value * textureH = builder.CreateSub(textureHeight, builder.getInt32(1));
-//   ChannelType sType = Float, tType = Float;
-//   if (in1Desc) {
-//      sType = in1Desc->channels[0];
-//      tType = in1Desc->channels[1];
-//   }
-
-   Value * xLerp = NULL, * yLerp = NULL;
-   Value * x = texcoordWrap(builder, gglCtx->textureState.textures[sampler].wrapS,
-                            /*sType, */texcoords[0], textureWidth, textureW, &xLerp);
-   Value * y = texcoordWrap(builder, gglCtx->textureState.textures[sampler].wrapT,
-                            /*tType, */texcoords[1], textureHeight, textureH, &yLerp);
-
-   Value * index = builder.CreateMul(y, textureWidth);
-   index = builder.CreateAdd(index, x);
-
-   Value * textureData = module->getGlobalVariable(_PF2_TEXTURE_DATA_NAME_);
-   if (!textureData)
-      textureData = new GlobalVariable(*module, intPointerType,
-                                       true, GlobalValue::ExternalLinkage,
-                                       NULL, _PF2_TEXTURE_DATA_NAME_);
-
-   textureData = builder.CreateConstInBoundsGEP1_32(textureData, sampler);
-   textureData = builder.CreateLoad(textureData);
-
-   if (0 == gglCtx->textureState.textures[sampler].minFilter &&
-         0 == gglCtx->textureState.textures[sampler].magFilter) { // GL_NEAREST
-      Value * ret = pointSample(builder, textureData, index,
-                                gglCtx->textureState.textures[sampler].format/*, dstDesc*/);
-      return intColorVecToFloatColorVec(builder, ret);
-   } else if (1 == gglCtx->textureState.textures[sampler].minFilter &&
-              1 == gglCtx->textureState.textures[sampler].magFilter) { // GL_LINEAR
-      Value * ret = linearSample(builder, textureData, builder.getInt32(0), x, y, xLerp, yLerp,
-                                 textureW, textureH,  textureWidth, textureHeight,
-                                 gglCtx->textureState.textures[sampler].format/*, dstDesc*/);
-      return intColorVecToFloatColorVec(builder, ret);
-   } else
-      assert(!"unsupported texture filter");
-   return NULL;
-}
-
-// only positive float; used in cube map since major axis is positive
-static Value * FCmpGT(IRBuilder<> & builder, Value * lhs, Value * rhs)
-{
-   Type * const intType = Type::getInt32Ty(builder.getContext());
-   lhs = builder.CreateBitCast(lhs, intType);
-   rhs = builder.CreateBitCast(rhs, intType);
-   return builder.CreateICmpUGT(lhs, rhs);
-}
-
-static Value * FPositive(IRBuilder<> & builder, Value * val)
-{
-   // float cmp faster here
-   return builder.CreateFCmpOGE(val, Constant::getNullValue(builder.getFloatTy()));
-   //val = builder.CreateBitCast(val, Type::getInt32Ty(builder.getContext()));
-   //return builder.CreateICmpSGE(val, storage->constantInt(0));
-   //val = builder.CreateAnd(val, storage->constantInt(0x80000000));
-   //return builder.CreateICmpNE(val, storage->constantInt(0));
-}
-
-static Value * Fabs(IRBuilder<> & builder, Value * val)
-{
-   val = builder.CreateBitCast(val, builder.getInt32Ty());
-   val = builder.CreateAnd(val, builder.getInt32(~0x80000000));
-   return builder.CreateBitCast(val, builder.getFloatTy());
-   //return builder.CreateICmpSGE(val, storage->constantInt(0));
-}
-
-Value * texCube(IRBuilder<> & builder, Value * in1, const unsigned sampler,
-                /*const RegDesc * in1Desc, const RegDesc * dstDesc,*/
-                const GGLState * gglCtx)
-{
-//   if (in1Desc) // the major axis determination code is only float for now
-//      assert(in1Desc->IsVectorType(Float));
-
-   Type * const intType = builder.getInt32Ty();
-   PointerType * const intPointerType = PointerType::get(intType, 0);
-   Type * const floatType = builder.getFloatTy();
-
-   Constant * const float1 = constFloat(builder, 1.0f);
-   Constant * const float0_5 = constFloat(builder, 0.5f);
-
-   Module * module = builder.GetInsertBlock()->getParent()->getParent();
-   std::vector<Value * > texcoords = extractVector(builder, in1);
-
-   Value * textureDimensions = module->getGlobalVariable(_PF2_TEXTURE_DIMENSIONS_NAME_);
-   if (!textureDimensions)
-      textureDimensions = new GlobalVariable(*module, intType, true,
-                                             GlobalValue::ExternalLinkage,
-                                             NULL, _PF2_TEXTURE_DIMENSIONS_NAME_);
-   Value * textureWidth = builder.CreateConstInBoundsGEP1_32(textureDimensions,
-                          sampler * 2);
-   textureWidth = builder.CreateLoad(textureWidth, name("textureWidth"));
-   Value * textureHeight = builder.CreateConstInBoundsGEP1_32(textureDimensions,
-                           sampler * 2 + 1);
-   textureHeight = builder.CreateLoad(textureHeight, name("textureHeight"));
-   Value * textureW = builder.CreateSub(textureWidth, builder.getInt32(1));
-   Value * textureH = builder.CreateSub(textureHeight, builder.getInt32(1));
-
-   Value * mx = Fabs(builder, texcoords[0]), * my = Fabs(builder, texcoords[1]);
-   Value * mz = Fabs(builder, texcoords[2]);
-   Value * sPtr = builder.CreateAlloca(floatType);
-   Value * tPtr = builder.CreateAlloca(floatType);
-   Value * maPtr = builder.CreateAlloca(floatType);
-   Value * facePtr = builder.CreateAlloca(intType);
-
-   Value * mxGmyCmp = FCmpGT(builder, mx, my);
-   Value * mxGmzCmp = FCmpGT(builder, mx, mz);
-
-   CondBranch condBranch(builder);
-   condBranch.ifCond(builder.CreateAnd(mxGmyCmp, mxGmzCmp)); // if (mx > my && mx > mz)
-//   m_storage->setCurrentBlock(currentBlock(), false);
-   {
-      condBranch.ifCond(FPositive(builder, texcoords[0]));
-//      m_storage->setCurrentBlock(currentBlock(), false);
-      {
-         builder.CreateStore(builder.CreateFNeg(texcoords[2]), sPtr);
-         builder.CreateStore(builder.CreateFNeg(texcoords[1]), tPtr);
-         builder.CreateStore(builder.getInt32(0), facePtr);
-      }
-      condBranch.elseop();
-//      m_storage->setCurrentBlock(currentBlock(), false);
-      {
-         builder.CreateStore((texcoords[2]), sPtr);
-         builder.CreateStore(builder.CreateFNeg(texcoords[1]), tPtr);
-         builder.CreateStore(builder.getInt32(1), facePtr);
-      }
-      condBranch.endif(); // end if (x >= 0)
-//      m_storage->setCurrentBlock(currentBlock(), false);
-
-      builder.CreateStore(mx, maPtr);
-   }
-   condBranch.elseop(); // !(mx > my && mx > mz)
-//   m_storage->setCurrentBlock(currentBlock(), false);
-   {
-      Value * myGmxCmp = FCmpGT(builder, my, mx);
-      Value * myGmzCmp = FCmpGT(builder, my, mz);
-      condBranch.ifCond(builder.CreateAnd(myGmxCmp, myGmzCmp)); // my > mx && my > mz
-//      m_storage->setCurrentBlock(currentBlock(), false);
-      {
-         condBranch.ifCond(FPositive(builder, texcoords[1]));
-//         m_storage->setCurrentBlock(currentBlock(), false);
-         {
-            builder.CreateStore((texcoords[0]), sPtr);
-            builder.CreateStore((texcoords[2]), tPtr);
-            builder.CreateStore(builder.getInt32(2), facePtr);
-         }
-         condBranch.elseop();
-//         m_storage->setCurrentBlock(currentBlock(), false);
-         {
-            builder.CreateStore(texcoords[0], sPtr);
-            builder.CreateStore(builder.CreateFNeg(texcoords[2]), tPtr);
-            builder.CreateStore(builder.getInt32(3), facePtr);
-         }
-         condBranch.endif();
-//         m_storage->setCurrentBlock(currentBlock(), false);
-
-         builder.CreateStore(my, maPtr);
-      }
-      condBranch.elseop(); // !(my > mx && my > mz)
-//      m_storage->setCurrentBlock(currentBlock(), false);
-      {
-         //ifCond(builder.CreateFCmpOGE(texcoords[2], float0, name("zPositive")));
-         condBranch.ifCond(FPositive(builder, texcoords[2]));
-//         m_storage->setCurrentBlock(currentBlock(), false);
-         {
-            builder.CreateStore((texcoords[0]), sPtr);
-            builder.CreateStore(builder.CreateFNeg(texcoords[1]), tPtr);
-            builder.CreateStore(builder.getInt32(4), facePtr);
-         }
-         condBranch.elseop();
-//        m_storage->setCurrentBlock(currentBlock(), false);
-         {
-            builder.CreateStore(builder.CreateFNeg(texcoords[0]), sPtr);
-            builder.CreateStore(builder.CreateFNeg(texcoords[1]), tPtr);
-            builder.CreateStore(builder.getInt32(5), facePtr);
-         }
-         condBranch.endif(); // end if (x >= 0)
-//         m_storage->setCurrentBlock(currentBlock(), false);
-
-         builder.CreateStore(mz, maPtr);
-      }
-      condBranch.endif();
-//      m_storage->setCurrentBlock(currentBlock(), false);
-   }
-   condBranch.endif();
-//   m_storage->setCurrentBlock(currentBlock(), false);
-
-
-   Value * s = builder.CreateLoad(sPtr);
-   Value * t = builder.CreateLoad(tPtr);
-   Value * ma = builder.CreateLoad(maPtr);
-   Value * face = builder.CreateLoad(facePtr);
-
-   s = builder.CreateFDiv(s, ma);
-   s = builder.CreateFAdd(s, float1);
-   s = builder.CreateFMul(s, float0_5);
-
-   t = builder.CreateFDiv(t, ma);
-   t = builder.CreateFAdd(t, float1);
-   t = builder.CreateFMul(t, float0_5);
-
-//   ChannelType sType = Float, tType = Float;
-   Value * xLerp = NULL, * yLerp = NULL;
-   Value * x = texcoordWrap(builder, gglCtx->textureState.textures[sampler].wrapS,
-                            /*sType, */s, textureWidth, textureW, &xLerp);
-   Value * y = texcoordWrap(builder, gglCtx->textureState.textures[sampler].wrapT,
-                            /*tType, */t, textureHeight, textureH, &yLerp);
-   Value * indexOffset = builder.CreateMul(builder.CreateMul(textureHeight, textureWidth), face);
-   Value * index = builder.CreateAdd(builder.CreateMul(y, textureWidth), x);
-
-   Value * textureData = module->getGlobalVariable(_PF2_TEXTURE_DATA_NAME_);
-   if (!textureData)
-      textureData = new GlobalVariable(*module, intPointerType,
-                                       true, GlobalValue::ExternalLinkage,
-                                       NULL, _PF2_TEXTURE_DATA_NAME_);
-
-   textureData = builder.CreateConstInBoundsGEP1_32(textureData, sampler);
-   textureData = builder.CreateLoad(textureData);
-
-   if (0 == gglCtx->textureState.textures[sampler].minFilter &&
-         0 == gglCtx->textureState.textures[sampler].magFilter) { // GL_NEAREST
-      textureData = pointSample(builder, textureData, builder.CreateAdd(indexOffset, index),
-                                gglCtx->textureState.textures[sampler].format/*, dstDesc*/);
-      return intColorVecToFloatColorVec(builder, textureData);
-
-   } else if (1 == gglCtx->textureState.textures[sampler].minFilter &&
-              1 == gglCtx->textureState.textures[sampler].magFilter) { // GL_LINEAR
-      textureData = linearSample(builder, textureData, indexOffset, x, y, xLerp, yLerp,
-                                 textureW, textureH,  textureWidth, textureHeight,
-                                 gglCtx->textureState.textures[sampler].format/*, dstDesc*/);
-      return intColorVecToFloatColorVec(builder, textureData);
-   } else
-      assert(!"unsupported texture filter");
-   return NULL;
-}
diff --git a/src/pixelflinger2/pixelflinger2.cpp b/src/pixelflinger2/pixelflinger2.cpp
deleted file mode 100644
index 3504dab..0000000
--- a/src/pixelflinger2/pixelflinger2.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "pixelflinger2.h"
-
-#include "src/talloc/hieralloc.h"
-#include <string>
-
-void gglError(unsigned error)
-{
-   std::string str;
-   if (GL_NO_ERROR == error)
-      return;
-   ALOGD("\n*\n*\n pf2: gglError 0x%.4X \n*\n*\n", error);
-   assert(0);
-}
-
-static void DepthRangef(GGLInterface * iface, GLclampf zNear, GLclampf zFar)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->viewport.n = VectorComp_t_CTR((zNear + zFar) / 2);
-   ctx->viewport.f = VectorComp_t_CTR((zFar - zNear) / 2);
-}
-
-static void Viewport(GGLInterface * iface, GLint x, GLint y, GLsizei width, GLsizei height)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->viewport.x = VectorComp_t_CTR(x + width / 2);
-   ctx->viewport.y = VectorComp_t_CTR(y + height / 2);
-   ctx->viewport.w = VectorComp_t_CTR(width / 2);
-   ctx->viewport.h = VectorComp_t_CTR(height / 2);
-}
-
-static void CullFace(GGLInterface * iface, GLenum mode)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_FRONT > mode || GL_FRONT_AND_BACK < mode)
-      gglError(GL_INVALID_ENUM);
-   else
-      ctx->cullState.cullFace = mode - GL_FRONT;
-}
-
-static void FrontFace(GGLInterface * iface, GLenum mode)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_CW > mode || GL_CCW < mode)
-      gglError(GL_INVALID_ENUM);
-   else
-      ctx->cullState.frontFace = mode - GL_CW;
-}
-
-static void BlendColor(GGLInterface * iface, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->state.blendState.color[0] = MIN2(MAX2(red * 255, 0.0f), 255.0f);
-   ctx->state.blendState.color[1] = MIN2(MAX2(green * 255, 0.0f), 255.0f);
-   ctx->state.blendState.color[2] = MIN2(MAX2(blue * 255, 0.0f), 255.0f);
-   ctx->state.blendState.color[3] = MIN2(MAX2(alpha * 255, 0.0f), 255.0f);
-   SetShaderVerifyFunctions(iface);
-}
-
-static void BlendEquationSeparate(GGLInterface * iface, GLenum modeRGB, GLenum modeAlpha)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_FUNC_ADD != modeRGB && (GL_FUNC_SUBTRACT > modeRGB ||
-                                  GL_FUNC_REVERSE_SUBTRACT < modeRGB))
-      return gglError(GL_INVALID_ENUM);
-   if (GL_FUNC_ADD != modeRGB && (GL_FUNC_SUBTRACT > modeRGB ||
-                                  GL_FUNC_REVERSE_SUBTRACT < modeRGB))
-      return gglError(GL_INVALID_ENUM);
-   ctx->state.blendState.ce = (GGLBlendState::GGLBlendFunc)(modeRGB - GL_FUNC_ADD);
-   ctx->state.blendState.ae = (GGLBlendState::GGLBlendFunc)(modeAlpha - GL_FUNC_ADD);
-   SetShaderVerifyFunctions(iface);
-}
-
-static inline GGLBlendState::GGLBlendFactor GLBlendFactor(const GLenum factor)
-{
-#define SWITCH_LINE(c) case c: return GGLBlendState::G##c;
-   switch (factor)
-   {
-      SWITCH_LINE(GL_ZERO);
-      SWITCH_LINE(GL_ONE);
-      SWITCH_LINE(GL_SRC_COLOR);
-      SWITCH_LINE(GL_ONE_MINUS_SRC_COLOR);
-      SWITCH_LINE(GL_DST_COLOR);
-      SWITCH_LINE(GL_ONE_MINUS_DST_COLOR);
-      SWITCH_LINE(GL_SRC_ALPHA);
-      SWITCH_LINE(GL_ONE_MINUS_SRC_ALPHA);
-      SWITCH_LINE(GL_DST_ALPHA);
-      SWITCH_LINE(GL_ONE_MINUS_DST_ALPHA);
-      SWITCH_LINE(GL_SRC_ALPHA_SATURATE);
-      SWITCH_LINE(GL_CONSTANT_COLOR);
-      SWITCH_LINE(GL_ONE_MINUS_CONSTANT_COLOR);
-      SWITCH_LINE(GL_CONSTANT_ALPHA);
-      SWITCH_LINE(GL_ONE_MINUS_CONSTANT_ALPHA);
-      default: assert(0); return GGLBlendState::GGL_ZERO;
-   }
-#undef SWITCH_LINE
-}
-
-static void BlendFuncSeparate(GGLInterface * iface, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (GL_ZERO != srcRGB && GL_ONE != srcRGB &&
-         (GL_SRC_COLOR > srcRGB || GL_SRC_ALPHA_SATURATE < srcRGB) &&
-         (GL_CONSTANT_COLOR > srcRGB || GL_ONE_MINUS_CONSTANT_ALPHA < srcRGB))
-      return gglError(GL_INVALID_ENUM);
-   if (GL_ZERO != srcAlpha && GL_ONE != srcAlpha &&
-         (GL_SRC_COLOR > srcAlpha || GL_SRC_ALPHA_SATURATE < srcAlpha) &&
-         (GL_CONSTANT_COLOR > dstRGB || GL_ONE_MINUS_CONSTANT_ALPHA < dstRGB))
-      return gglError(GL_INVALID_ENUM);
-   if (GL_ZERO != dstRGB && GL_ONE != dstRGB &&
-         (GL_SRC_COLOR > dstRGB || GL_ONE_MINUS_DST_COLOR < dstRGB) && // GL_SRC_ALPHA_SATURATE only for source
-         (GL_CONSTANT_COLOR > dstRGB || GL_ONE_MINUS_CONSTANT_ALPHA < dstRGB))
-      return gglError(GL_INVALID_ENUM);
-   if (GL_ZERO != dstAlpha && GL_ONE != dstAlpha &&
-         (GL_SRC_COLOR > dstAlpha || GL_ONE_MINUS_DST_COLOR < dstAlpha) &&
-         (GL_CONSTANT_COLOR > dstRGB || GL_ONE_MINUS_CONSTANT_ALPHA < dstRGB))
-      return gglError(GL_INVALID_ENUM);
-   if (srcAlpha == GL_SRC_ALPHA_SATURATE) // it's just 1 instead of min(sa, 1 - da) for alpha channel
-      srcAlpha = GL_ONE;
-   // in c++ it's templated function for color and alpha,
-   // so it requires setting srcAlpha to GL_ONE to run template again only for alpha
-   ctx->state.blendState.scf = GLBlendFactor(srcRGB);
-   ctx->state.blendState.saf = GLBlendFactor(srcAlpha);
-   ctx->state.blendState.dcf = GLBlendFactor(dstRGB);
-   ctx->state.blendState.daf = GLBlendFactor(dstAlpha);
-   SetShaderVerifyFunctions(iface);
-
-}
-
-static void EnableDisable(GGLInterface * iface, GLenum cap, GLboolean enable)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   bool changed = false;
-   switch (cap) {
-   case GL_BLEND:
-      changed |= ctx->state.blendState.enable ^ enable;
-      ctx->state.blendState.enable = enable;
-      break;
-   case GL_CULL_FACE:
-      changed |= ctx->cullState.enable ^ enable;
-      ctx->cullState.enable = enable;
-      break;
-   case GL_DEPTH_TEST:
-      changed |= ctx->state.bufferState.depthTest ^ enable;
-      ctx->state.bufferState.depthTest = enable;
-      break;
-   case GL_STENCIL_TEST:
-      changed |= ctx->state.bufferState.stencilTest ^ enable;
-      ctx->state.bufferState.stencilTest = enable;
-      break;
-   case GL_DITHER:
-//      ALOGD("pf2: EnableDisable GL_DITHER \n");
-      break;
-   case GL_SCISSOR_TEST:
-//      ALOGD("pf2: EnableDisable GL_SCISSOR_TEST \n");
-      break;
-   case GL_TEXTURE_2D:
-//      ALOGD("pf2: EnableDisable GL_SCISSOR_TEST %d", enable);
-      break;
-   default:
-      ALOGD("pf2: EnableDisable 0x%.4X causes GL_INVALID_ENUM (maybe not implemented or ES 1.0) \n", cap);
-//      gglError(GL_INVALID_ENUM);
-      assert(0);
-      break;
-   }
-   if (changed)
-      SetShaderVerifyFunctions(iface);
-}
-
-void InitializeGGLState(GGLInterface * iface)
-{
-#if USE_DUAL_THREAD
-   reinterpret_cast<GGLContext *>(iface)->worker = GGLContext::Worker();
-#endif
-   iface->DepthRangef = DepthRangef;
-   iface->Viewport = Viewport;
-   iface->CullFace = CullFace;
-   iface->FrontFace = FrontFace;
-   iface->BlendColor = BlendColor;
-   iface->BlendEquationSeparate = BlendEquationSeparate;
-   iface->BlendFuncSeparate = BlendFuncSeparate;
-   iface->EnableDisable = EnableDisable;
-
-   InitializeBufferFunctions(iface);
-   InitializeRasterFunctions(iface);
-   InitializeScanLineFunctions(iface);
-   InitializeShaderFunctions(iface);
-   InitializeTextureFunctions(iface);
-
-   iface->EnableDisable(iface, GL_DEPTH_TEST, false);
-   iface->DepthFunc(iface, GL_LESS);
-   iface->ClearColor(iface, 0, 0, 0, 0);
-   iface->ClearDepthf(iface, 1.0f);
-
-   iface->EnableDisable(iface, GL_STENCIL_TEST, false);
-   iface->StencilFuncSeparate(iface, GL_FRONT_AND_BACK, GL_ALWAYS, 0, 0xff);
-   iface->StencilOpSeparate(iface, GL_FRONT_AND_BACK, GL_KEEP, GL_KEEP, GL_KEEP);
-
-   iface->FrontFace(iface, GL_CCW);
-   iface->CullFace(iface, GL_BACK);
-   iface->EnableDisable(iface, GL_CULL_FACE, false);
-
-   iface->EnableDisable(iface, GL_BLEND, false);
-   iface->BlendColor(iface, 0, 0, 0, 0);
-   iface->BlendEquationSeparate(iface, GL_FUNC_ADD, GL_FUNC_ADD);
-   iface->BlendFuncSeparate(iface, GL_ONE, GL_ZERO, GL_ONE, GL_ZERO);
-
-   for (unsigned i = 0; i < GGL_MAXCOMBINEDTEXTUREIMAGEUNITS; i++)
-      iface->SetSampler(iface, i, NULL);
-
-   iface->SetBuffer(iface, GL_COLOR_BUFFER_BIT, NULL);
-   iface->SetBuffer(iface, GL_DEPTH_BUFFER_BIT, NULL);
-   iface->SetBuffer(iface, GL_STENCIL_BUFFER_BIT, NULL);
-
-   SetShaderVerifyFunctions(iface);
-}
-
-GGLInterface * CreateGGLInterface()
-{
-   GGLContext * const ctx = (GGLContext *)calloc(1, sizeof(GGLContext));
-   if (!ctx)
-      return NULL;
-   assert((void *)ctx == (void *)&ctx->interface);
-
-   //_glapi_set_context(ctx->glCtx);
-   //_mesa_init_constants(&Const);
-
-   puts("InitializeGGLState");
-   InitializeGGLState(&ctx->interface);
-   return &ctx->interface;
-}
-
-void UninitializeGGLState(GGLInterface * iface)
-{
-#if USE_DUAL_THREAD
-   reinterpret_cast<GGLContext *>(iface)->worker.~Worker();
-#endif
-   DestroyShaderFunctions(iface);
-
-#if USE_LLVM_TEXTURE_SAMPLER
-   puts("USE_LLVM_TEXTURE_SAMPLER");
-#endif
-#if USE_LLVM_SCANLINE
-   puts("USE_LLVM_SCANLINE");
-#endif
-#if USE_LLVM_EXECUTIONENGINE
-   puts("USE_LLVM_EXECUTIONENGINE");
-#endif
-#if USE_DUAL_THREAD
-   puts("USE_DUAL_THREAD");
-#endif
-   hieralloc_report_brief(NULL, stdout);
-}
-
-void DestroyGGLInterface(GGLInterface * iface)
-{
-   GGLContext * const ctx = reinterpret_cast<GGLContext *>(iface);
-   UninitializeGGLState(iface);
-   free(ctx);
-}
diff --git a/src/pixelflinger2/pixelflinger2.h b/src/pixelflinger2/pixelflinger2.h
deleted file mode 100644
index 3be7fd9..0000000
--- a/src/pixelflinger2/pixelflinger2.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#ifndef _PIXELFLINGER2_H_
-#define _PIXELFLINGER2_H_
-
-#define USE_LLVM_TEXTURE_SAMPLER 1
-#define USE_LLVM_SCANLINE 1
-#ifndef USE_LLVM_EXECUTIONENGINE
-#define USE_LLVM_EXECUTIONENGINE 0 // 1 to use llvm::Execution, 0 to use libBCC, requires modifying makefile
-#endif
-#define USE_DUAL_THREAD 1
-
-#define debug_printf printf
-
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
-
-#ifdef __arm__
-#include <cutils/log.h>
-
-#ifndef __location__
-#define __HIERALLOC_STRING_0__(s)   #s
-#define __HIERALLOC_STRING_1__(s)   __HIERALLOC_STRING_0__(s)
-#define __HIERALLOC_STRING_2__      __HIERALLOC_STRING_1__(__LINE__)
-#define __location__                __FILE__ ":" __HIERALLOC_STRING_2__
-#endif
-#undef assert
-#define assert(EXPR) { do { if (!(EXPR)) {ALOGD("\n*\n*\n*\n* assert fail: '"#EXPR"' at "__location__"\n*\n*\n*"); exit(EXIT_FAILURE); } } while (false); }
-
-#else // #ifdef __arm__
-
-#ifndef ALOGD
-#define ALOGD printf
-#endif //#include <stdio.h>
-
-#endif // #ifdef __arm__
-
-#include "pixelflinger2/pixelflinger2_interface.h"
-
-#include <string.h>
-
-#ifndef MIN2
-#  define MIN2(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX2
-#  define MAX2(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
-namespace bcc
-{
-class BCCContext;
-};
-
-#if !USE_LLVM_SCANLINE
-typedef int BlendComp_t;
-#endif
-
-#if USE_DUAL_THREAD
-#include <pthread.h>
-#endif
-
-typedef void (*ShaderFunction_t)(const void*,void*,const void*);
-
-#define GGL_GET_CONTEXT(context, interface) GGLContext * context = (GGLContext *)interface;
-#define GGL_GET_CONST_CONTEXT(context, interface) const GGLContext * context = \
-    (const GGLContext *)interface; (void)context;
-
-struct GGLContext {
-   GGLInterface interface; // must be first member so that GGLContext * == GGLInterface *
-
-   GGLSurface frameSurface;
-   GGLSurface depthSurface;
-   GGLSurface stencilSurface;
-
-   bcc::BCCContext * bccCtx;
-
-   struct {
-      int depth; // assuming ieee 754 32 bit float and 32 bit 2's complement int; z_32
-      unsigned color; // clear value; rgba_8888
-      unsigned stencil; // s_8; repeated to clear 4 pixels at a time
-   } clearState;
-
-   gl_shader_program * CurrentProgram;
-
-   mutable GGLActiveStencil activeStencil; // after primitive assembly, call StencilSelect
-
-   GGLState state; // states affecting jit
-
-#if USE_DUAL_THREAD
-   mutable struct Worker {
-      const GGLInterface * iface;
-      unsigned startY, endY, varyingCount;
-      VertexOutput bV, cV, bDx, cDx;
-      int width, height;
-      bool assignedWork; // only used by main; worker uses assignCond & quit
-      bool quit;
-
-      pthread_cond_t assignCond;
-      pthread_mutex_t assignLock; // held by worker execpt for during cond_wait assign
-      pthread_cond_t finishCond;
-      pthread_mutex_t finishLock; // held by main except for during cond_wait finish
-      pthread_t thread;
-
-      Worker() : assignedWork(false), quit(false), thread(0)
-      {
-         pthread_cond_init(&assignCond, NULL);
-         pthread_cond_init(&finishCond, NULL);
-         pthread_mutex_init(&assignLock, NULL);
-         pthread_mutex_init(&finishLock, NULL);
-         pthread_mutex_lock(&finishLock);
-         // actual thread is created later in raster.cpp
-      }
-      ~Worker()
-      {
-         if (0 != thread)
-         {
-            pthread_mutex_lock(&assignLock);
-            quit = true;
-            pthread_cond_signal(&assignCond); // signal thread to quit
-            pthread_mutex_unlock(&assignLock);
-            pthread_join(thread, NULL);
-         }
-         pthread_mutex_unlock(&finishLock);
-
-         pthread_cond_destroy(&assignCond);
-         pthread_cond_destroy(&finishCond);
-         pthread_mutex_destroy(&assignLock);
-         pthread_mutex_destroy(&finishLock);
-      }
-   } worker;
-#endif
-
-   // called by ShaderUse to set to proper rendering functions
-   void (* PickScanLine)(GGLInterface * iface);
-   void (* PickRaster)(GGLInterface * iface);
-
-   // viewport params are transformed so that Zw = Zd * f + n
-   // and Xw/Yw = x/y + Xd/Yd * w/h
-   struct {
-      VectorComp_t x, y, w, h, n, f;
-   } viewport; // should be moved into libAgl2
-
-   struct { // should be moved into libAgl2
-unsigned enable :
-      1;
-unsigned frontFace :
-      1; // GL_CW = 0, GL_CCW, actual value is GLenum - GL_CW
-unsigned cullFace :
-      2; // GL_FRONT = 0, GL_BACK, GL_FRONT_AND_BACK, value = GLenum - GL_FRONT
-   } cullState;
-};
-
-#define _PF2_TEXTURE_DATA_NAME_ "gl_PF2TEXTURE_DATA" /* sampler data pointers used by LLVM */
-#define _PF2_TEXTURE_DIMENSIONS_NAME_ "gl_PF2TEXTURE_DIMENSIONS" /* sampler dimensions used by LLVM */
-
-void gglError(unsigned error); // not implmented, just an assert
-
-void InitializeGGLState(GGLInterface * iface); // should be private
-void UninitializeGGLState(GGLInterface * iface); // should be private
-
-// they just set the function pointers
-void InitializeBufferFunctions(GGLInterface * iface);
-void InitializeRasterFunctions(GGLInterface * iface);
-void InitializeScanLineFunctions(GGLInterface * iface);
-void InitializeTextureFunctions(GGLInterface * iface);
-
-void InitializeShaderFunctions(GGLInterface * iface); // set function pointers and create needed objects
-void SetShaderVerifyFunctions(GGLInterface * iface); // called by state change functions
-void DestroyShaderFunctions(GGLInterface * iface); // destroy needed objects
-// actual gl_shader and gl_shader_program is created and destroyed by Shader(Program)Create/Delete,
-
-#endif // #ifndef _PIXELFLINGER2_H_
diff --git a/src/pixelflinger2/raster.cpp b/src/pixelflinger2/raster.cpp
deleted file mode 100644
index e8abd79..0000000
--- a/src/pixelflinger2/raster.cpp
+++ /dev/null
@@ -1,584 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "pixelflinger2.h"
-#include "src/mesa/main/mtypes.h"
-#include "src/mesa/program/prog_parameter.h"
-#include "src/mesa/program/prog_uniform.h"
-#include "src/glsl/glsl_types.h"
-
-//#undef ALOGD
-//#define ALOGD(...)
-
-static inline void LerpVector4(const Vector4 * a, const Vector4 * b,
-                               const VectorComp_t x, Vector4 * d) __attribute__((always_inline));
-static inline void LerpVector4(const Vector4 * a, const Vector4 * b,
-                               const VectorComp_t x, Vector4 * d)
-{
-   assert(a != d && b != d);
-   //d = (b - a) * x + a;
-   (*d) = (*b);
-   (*d) -= (*a);
-   (*d) *= x;
-   (*d) += (*a);
-}
-
-static inline void InterpolateVertex(const VertexOutput * a, const VertexOutput * b, const VectorComp_t x,
-                                     VertexOutput * v, const unsigned varyingCount)
-{
-   LerpVector4(&a->position, &b->position, x, &v->position);
-   for (unsigned i = 0; i < varyingCount; i++)
-      LerpVector4(a->varyings + i, b->varyings + i, x, v->varyings + i);
-   LerpVector4(&a->frontFacingPointCoord, &b->frontFacingPointCoord,
-               x, &v->frontFacingPointCoord); // gl_PointCoord
-   v->frontFacingPointCoord.y = a->frontFacingPointCoord.y; // gl_FrontFacing not interpolated
-
-}
-
-void GGLProcessVertex(const gl_shader_program * program, const VertexInput * input,
-                      VertexOutput * output, const float (*constants)[4])
-{
-   ShaderFunction_t function = (ShaderFunction_t)program->_LinkedShaders[MESA_SHADER_VERTEX]->function;
-   function(input, output, constants);
-}
-
-static void ProcessVertex(const GGLInterface * iface, const VertexInput * input,
-                          VertexOutput * output)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-
-//#if !USE_LLVM_TEXTURE_SAMPLER
-//    extern const GGLContext * textureGGLContext;
-//    textureGGLContext = ctx;
-//#endif
-//
-
-//   memcpy(ctx->glCtx->CurrentProgram->ValuesVertexInput, input, sizeof(*input));
-//   ctx->glCtx->CurrentProgram->_LinkedShaders[MESA_SHADER_VERTEX]->function();
-//   memcpy(output, ctx->glCtx->CurrentProgram->ValuesVertexOutput, sizeof(*output));
-
-   GGLProcessVertex(ctx->CurrentProgram, input, output, ctx->CurrentProgram->ValuesUniform);
-//   const Vector4 * constants = (Vector4 *)
-//    ctx->glCtx->Shader.CurrentProgram->VertexProgram->Parameters->ParameterValues;
-//	ctx->glCtx->Shader.CurrentProgram->GLVMVP->function(input, output, constants);
-//
-//#if !USE_LLVM_TEXTURE_SAMPLER
-//    textureGGLContext = NULL;
-//#endif
-}
-
-#if USE_DUAL_THREAD
-static void * RasterTrapezoidWorker(void * threadArgs)
-{
-   GGLContext::Worker * args = (GGLContext::Worker *)threadArgs;
-   VertexOutput clip0, clip1, * left, * right;
-
-   pthread_mutex_lock(&args->finishLock);
-   pthread_mutex_lock(&args->assignLock);
-   pthread_cond_signal(&args->finishCond);
-   pthread_mutex_unlock(&args->finishLock);
-
-   while (true) {
-      pthread_cond_wait(&args->assignCond, &args->assignLock);
-      if (args->quit)
-      {
-         pthread_mutex_unlock(&args->assignLock);
-         break;
-      }
-      else
-          assert(args->assignedWork);
-
-      for (unsigned y = args->startY; y <= args->endY; y += 2) {
-         do {
-            if (args->bV.position.x < 0) {
-               if (args->cV.position.x < 0)
-                  break;
-               InterpolateVertex(&args->bV, &args->cV, -args->bV.position.x /
-                                 (args->cV.position.x - args->bV.position.x),
-                                 &clip0, args->varyingCount);
-               left = &clip0;
-            } else
-               left = &args->bV;
-            if ((int)args->cV.position.x >= (int)args->width) {
-               if (args->bV.position.x >= (int)args->width)
-                  break;
-               InterpolateVertex(&args->bV, &args->cV, (args->width - 1 - args->bV.position.x) /
-                                 (args->cV.position.x - args->bV.position.x),
-                                 &clip1, args->varyingCount);
-               right = &clip1;
-            } else
-               right = &args->cV;
-            args->iface->ScanLine(args->iface, left, right);
-         } while (false);
-         for (unsigned i = 0; i < args->varyingCount; i++) {
-            args->bV.varyings[i] += args->bDx.varyings[i];
-            args->cV.varyings[i] += args->cDx.varyings[i];
-         }
-         args->bV.position += args->bDx.position;
-         args->cV.position += args->cDx.position;
-         args->bV.frontFacingPointCoord += args->bDx.frontFacingPointCoord;
-         args->cV.frontFacingPointCoord += args->cDx.frontFacingPointCoord;
-      }
-
-      pthread_mutex_lock(&args->finishLock);
-      pthread_cond_signal(&args->finishCond);
-      pthread_mutex_unlock(&args->finishLock);
-   }
-   pthread_exit(NULL);
-   return NULL;
-}
-#endif
-
-static void RasterTrapezoid(const GGLInterface * iface, const VertexOutput * tl,
-                            const VertexOutput * tr, const VertexOutput * bl,
-                            const VertexOutput * br)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-
-   assert(tl->position.x <= tr->position.x && bl->position.x <= br->position.x);
-   assert(tl->position.y <= bl->position.y && tr->position.y <= br->position.y);
-   assert(fabs(tl->position.y - tr->position.y) < 1 && fabs(bl->position.y - br->position.y) < 1);
-
-   const unsigned width = ctx->frameSurface.width, height = ctx->frameSurface.height;
-   const unsigned varyingCount = ctx->CurrentProgram->VaryingSlots;
-
-
-   // tlv-trv and blv-brv are parallel and horizontal
-   VertexOutput tlv(*tl), trv(*tr), blv(*bl), brv(*br);
-   VertexOutput tmp;
-
-   // vertically clip
-
-   if ((int)tlv.position.y < 0) {
-      InterpolateVertex(&tlv, &blv, (0 - tlv.position.y) / (blv.position.y - tlv.position.y),
-                        &tmp, varyingCount);
-      tlv = tmp;
-   }
-   if ((int)trv.position.y < 0) {
-      InterpolateVertex(&trv, &brv, (0 - trv.position.y) / (brv.position.y - trv.position.y),
-                        &tmp, varyingCount);
-      trv = tmp;
-   }
-   if ((int)blv.position.y >= (int)height) {
-      InterpolateVertex(&tlv, &blv, (height - 1 - tlv.position.y) / (blv.position.y - tlv.position.y),
-                        &tmp, varyingCount);
-      blv = tmp;
-   }
-   if ((int)brv.position.y >= (int)height) {
-      InterpolateVertex(&trv, &brv, (height - 1 - trv.position.y) / (brv.position.y - trv.position.y),
-                        &tmp, varyingCount);
-      brv = tmp;
-   }
-
-//   // horizontally clip
-//   if ((int)tlv.position.x < 0) {
-//      InterpolateVertex(&tlv, &trv, (0 - tlv.position.x) / (trv.position.x - tlv.position.x),
-//                        &tmp, varyingCount);
-//      tlv = tmp;
-//   }
-//   if ((int)blv.position.x < 0) {
-//      InterpolateVertex(&blv, &brv, (0 - blv.position.x) / (brv.position.x - blv.position.x),
-//                        &tmp, varyingCount);
-//      blv = tmp;
-//   }
-//   if ((int)trv.position.x >= (int)width) {
-//      InterpolateVertex(&tlv, &trv, (width - 1 - tlv.position.x) / (trv.position.x - tlv.position.x),
-//                        &tmp, varyingCount);
-//      trv = tmp;
-//   }
-//   if ((int)brv.position.x >= (int)width) {
-//      InterpolateVertex(&blv, &brv, (width - 1 - blv.position.x) / (brv.position.x - blv.position.x),
-//                        &tmp, varyingCount);
-//      brv = tmp;
-//   }
-
-   const unsigned int startY = tlv.position.y;
-   const unsigned int endY = blv.position.y;
-
-   if (endY < startY)
-      return;
-
-   const VectorComp_t yDistInv = VectorComp_t_CTR(1.0f / (endY - startY));
-
-   // bV and cV are left and right vertices on a horizontal line in quad
-   // bDx and cDx are iterators from tlv to blv, trv to brv for bV and cV
-
-   VertexOutput bV(tlv), cV(trv);
-   VertexOutput bDx(blv), cDx(brv);
-
-   for (unsigned i = 0; i < varyingCount; i++) {
-      bDx.varyings[i] -= tlv.varyings[i];
-      bDx.varyings[i] *= yDistInv;
-
-      cDx.varyings[i] -= trv.varyings[i];
-      cDx.varyings[i] *= yDistInv;
-   }
-
-   bDx.position -= tlv.position;
-   bDx.position *= yDistInv;
-
-   cDx.position -= trv.position;
-   cDx.position *= yDistInv;
-
-   bDx.frontFacingPointCoord -= tlv.frontFacingPointCoord; // gl_PointCoord
-   bDx.frontFacingPointCoord *= yDistInv;
-   bDx.frontFacingPointCoord.y = VectorComp_t_Zero; // gl_FrontFacing not interpolated
-   cDx.frontFacingPointCoord -= trv.frontFacingPointCoord; // gl_PointCoord
-   cDx.frontFacingPointCoord *= yDistInv;
-   cDx.frontFacingPointCoord.y = VectorComp_t_Zero; // gl_FrontFacing not interpolated
-
-#if USE_DUAL_THREAD
-   GGLContext::Worker & args = ctx->worker;
-   if (!ctx->worker.thread) {
-      pthread_attr_t attr;
-      pthread_attr_init(&attr);
-      pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
-      int rc = pthread_create(&ctx->worker.thread, &attr, RasterTrapezoidWorker, &args);
-      assert(!rc);
-      // wait for worker to start
-      pthread_cond_wait(&args.finishCond, &args.finishLock);
-   }
-   args.startY = startY + 1;
-   args.endY = endY;
-   if (args.startY <= args.endY) {
-      pthread_mutex_lock(&args.assignLock);
-
-      args.bV = bV;
-      args.cV = cV;
-      for (unsigned i = 0; i < varyingCount; i++) {
-         args.bV.varyings[i] += bDx.varyings[i];
-         bDx.varyings[i] += bDx.varyings[i];
-         args.cV.varyings[i] += cDx.varyings[i];
-         cDx.varyings[i] += cDx.varyings[i];
-      }
-      args.bV.position += bDx.position;
-      bDx.position += bDx.position;
-      args.cV.position += cDx.position;
-      cDx.position += cDx.position;
-      args.bV.frontFacingPointCoord += bDx.frontFacingPointCoord;
-      bDx.frontFacingPointCoord += bDx.frontFacingPointCoord;
-      args.cV.frontFacingPointCoord += cDx.frontFacingPointCoord;
-      cDx.frontFacingPointCoord += cDx.frontFacingPointCoord;
-      args.iface = iface;
-      args.bDx = bDx;
-      args.cDx = cDx;
-      args.varyingCount = varyingCount;
-      args.width = width;
-      args.height = height;
-      args.assignedWork = true;
-
-      pthread_cond_signal(&args.assignCond);
-      pthread_mutex_unlock(&args.assignLock);
-   }
-#endif
-
-   VertexOutput * left, * right;
-   VertexOutput clip0, clip1;
-
-   for (unsigned y = startY; y <= endY; y += 1 + USE_DUAL_THREAD) {
-      do {
-         if (bV.position.x < 0) {
-            if (cV.position.x < 0)
-               break;
-            InterpolateVertex(&bV, &cV, -bV.position.x / (cV.position.x - bV.position.x),
-                              &clip0, varyingCount);
-            left = &clip0;
-         } else
-            left = &bV;
-         if ((int)cV.position.x >= (int)width) {
-            if (bV.position.x >= (int)width)
-               break;
-            InterpolateVertex(&bV, &cV, (width - 1 - bV.position.x) / (cV.position.x - bV.position.x),
-                              &clip1, varyingCount);
-            right = &clip1;
-         } else
-            right = &cV;
-         iface->ScanLine(iface, left, right);
-      } while (false);
-      for (unsigned i = 0; i < varyingCount; i++) {
-         bV.varyings[i] += bDx.varyings[i];
-         cV.varyings[i] += cDx.varyings[i];
-      }
-      bV.position += bDx.position;
-      cV.position += cDx.position;
-      bV.frontFacingPointCoord += bDx.frontFacingPointCoord;
-      cV.frontFacingPointCoord += cDx.frontFacingPointCoord;
-   }
-
-#if USE_DUAL_THREAD
-   if (args.assignedWork)
-   {
-      pthread_cond_wait(&args.finishCond, &args.finishLock);
-      args.assignedWork = false;
-   }
-#endif
-}
-
-static void RasterTriangle(const GGLInterface * iface, const VertexOutput * v1,
-                           const VertexOutput * v2, const VertexOutput * v3)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   const unsigned varyingCount = ctx->CurrentProgram->VaryingSlots;
-   const unsigned height = ctx->frameSurface.height;
-   const VertexOutput * a = v1, * b = v2, * d = v3;
-   //abc is a triangle, bcd is another triangle, they share bc as horizontal edge
-   //c is between a and d, xy is screen coord
-
-   //first sort 3 vertices by MIN y first
-   if (v2->position.y < v1->position.y) {
-      a = v2;
-      b = v1;
-   }
-   if (v3->position.y < a->position.y) {
-      d = b;
-      b = a;
-      a = v3;
-   } else if (v3->position.y < b->position.y) {
-      d = b;
-      b = v3;
-   }
-
-   assert(a->position.y <= b->position.y && b->position.y <= d->position.y);
-
-   VertexOutput cVertex;
-   const VertexOutput* c = &cVertex;
-
-   const VectorComp_t cLerp = (b->position.y - a->position.y) /
-                              MAX2(VectorComp_t_One, (d->position.y - a->position.y));
-   // create 4th vertex, same y as b to form two triangles/trapezoids sharing horizontal edge
-   InterpolateVertex(a, d, cLerp, &cVertex, varyingCount);
-
-   if (c->position.x < b->position.x) {
-      const VertexOutput * tmp = c;
-      c = b;
-      b = tmp;
-   }
-
-   if ((int)a->position.y < (int)height && (int)b->position.y >= 0)
-      RasterTrapezoid(iface, a, a, b, c);
-   //b->position.y += VectorComp_t_One;
-   //c->position.y += VectorComp_t_One;
-   if ((int)b->position.y < (int)height && (int)d->position.y >= 0)
-      RasterTrapezoid(iface, b, c, d, d);
-}
-
-static void DrawTriangle(const GGLInterface * iface, const VertexInput * vin1,
-                         const VertexInput * vin2, const VertexInput * vin3)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-
-   VertexOutput vouts[3];
-   memset(vouts, 0, sizeof(vouts));
-   VertexOutput * v1 = vouts + 0, * v2 = vouts + 1, * v3 = vouts + 2;
-
-//   ALOGD("pf2: DrawTriangle");
-
-//   if (!strstr(program->Shaders[MESA_SHADER_FRAGMENT]->Source,
-//               "gl_FragColor = color * texture2D(sampler, outTexCoords).a;"))
-//      return;
-
-//   for (unsigned i = 0; i < program->NumShaders; i++)
-//      if (program->Shaders[i]->Source)
-//         ALOGD("%s", program->Shaders[i]->Source);
-
-//   if (!strstr(program->Shaders[MESA_SHADER_FRAGMENT]->Source, ").a;"))
-//      return;
-
-//   ALOGD("%s", program->Shaders[MESA_SHADER_VERTEX]->Source);
-//   ALOGD("%s", program->Shaders[MESA_SHADER_FRAGMENT]->Source);
-
-//   for (unsigned i = 0; i < program->Attributes->NumParameters; i++) {
-//      const gl_program_parameter & attribute = program->Attributes->Parameters[i];
-//      ALOGD("attribute '%s': location=%d slots=%d \n", attribute.Name, attribute.Location, attribute.Slots);
-//   }
-//   for (unsigned i = 0; i < program->Varying->NumParameters; i++) {
-//      const gl_program_parameter & varying = program->Varying->Parameters[i];
-//      ALOGD("varying '%s': vs_location=%d fs_location=%d \n", varying.Name, varying.BindLocation, varying.Location);
-//   }
-//   for (unsigned i = 0; i < program->Uniforms->NumUniforms; i++) {
-//      const gl_uniform & uniform = program->Uniforms->Uniforms[i];
-//      ALOGD("uniform '%s': location=%d type=%s \n", uniform.Name, uniform.Pos, uniform.Type->name);
-//   }
-
-//   __attribute__ ((aligned (16)))
-//   static const float matrix[16] = {
-//      1,0,0,0,
-//      0,1,0,0,
-//      0,0,1,0,
-//      0,0,0,1
-//   };
-//
-//   iface->ShaderUniformMatrix((gl_shader_program *)program, 4, 4, 0, 1, GL_FALSE, matrix);
-
-   iface->ProcessVertex(iface, vin1, v1);
-   iface->ProcessVertex(iface, vin2, v2);
-   iface->ProcessVertex(iface, vin3, v3);
-
-//   __attribute__ ((aligned (16)))
-//   static const float matrix[16] = {
-//      2,0,0,0,
-//      0,-2,0,0,
-//      0,0,-1,0,
-//      -1,1,0,1
-//   };
-
-
-//   float * matrix = program->ValuesUniform[0];
-//   for (unsigned i = 0; i < 4; i++)
-//      ALOGD("pf2: DrawTriangle %.2f \t %.2f \t %.2f \t %.2f \n", matrix[i * 4 + 0],
-//           matrix[i * 4 + 1], matrix[i * 4 + 2], matrix[i * 4 + 3]);
-////   ALOGD("color %.02f %.02f %.02f %.02f", program->ValuesUniform[4][0], program->ValuesUniform[4][1],
-////        program->ValuesUniform[4][2], program->ValuesUniform[4][3]);
-//   ALOGD("vin1 position %.02f %.02f %.02f %.02f", vin1->attributes[1].x, vin1->attributes[1].y,
-//        vin1->attributes[1].z, vin1->attributes[1].w);
-//   ALOGD("vin2 position %.02f %.02f %.02f %.02f", vin2->attributes[1].x, vin2->attributes[1].y,
-//        vin2->attributes[1].z, vin2->attributes[1].w);
-//   ALOGD("vin3 position %.02f %.02f %.02f %.02f", vin3->attributes[1].x, vin3->attributes[1].y,
-//        vin3->attributes[1].z, vin3->attributes[1].w);
-
-//   GGLProcessVertex(program, vin1, v1, (const float (*)[4])matrix);
-//   GGLProcessVertex(program, vin2, v2, (const float (*)[4])matrix);
-//   GGLProcessVertex(program, vin3, v3, (const float (*)[4])matrix);
-
-//   ALOGD("pf2: DrawTriangle processed %.02f %.02f %.2f %.2f \t %.02f %.02f %.2f %.2f \t %.02f %.02f %.2f %.2f",
-//        v1->position.x, v1->position.y, v1->position.z, v1->position.w,
-//        v2->position.x, v2->position.y, v2->position.z, v2->position.w,
-//        v3->position.x, v3->position.y, v3->position.z, v3->position.w);
-
-   v1->position /= v1->position.w;
-   v2->position /= v2->position.w;
-   v3->position /= v3->position.w;
-
-//   ALOGD("pf2: DrawTriangle divided %.02f,%.02f \t %.02f,%.02f \t %.02f,%.02f", v1->position.x, v1->position.y,
-//      v2->position.x, v2->position.y, v3->position.x, v3->position.y);
-
-   iface->ViewportTransform(iface, &v1->position);
-   iface->ViewportTransform(iface, &v2->position);
-   iface->ViewportTransform(iface, &v3->position);
-
-//   if (strstr(program->Shaders[MESA_SHADER_FRAGMENT]->Source,
-//              "gl_FragColor = color * texture2D(sampler, outTexCoords).a;")) {
-////      ALOGD("%s", program->Shaders[MESA_SHADER_FRAGMENT]->Source);
-//      v1->position = vin1->attributes[0];
-//      v2->position = vin2->attributes[0];
-//      v3->position = vin3->attributes[0];
-//
-//      v1->varyings[0] = vin1->attributes[1];
-//      v2->varyings[0] = vin2->attributes[1];
-//      v3->varyings[0] = vin3->attributes[1];
-//   }
-
-//   ALOGD("pf2: DrawTriangle transformed %.0f,%.0f \t %.0f,%.0f \t %.0f,%.0f", v1->position.x, v1->position.y,
-//        v2->position.x, v2->position.y, v3->position.x, v3->position.y);
-
-//   ALOGD("pf2: DrawTriangle varying %.02f %.02f %.2f %.2f \t %.02f %.02f %.2f %.2f \t %.02f %.02f %.2f %.2f",
-//        v1->varyings[0].x, v1->varyings[0].y, v1->varyings[0].z, v1->varyings[0].w,
-//        v2->varyings[0].x, v2->varyings[0].y, v2->varyings[0].z, v2->varyings[0].w,
-//        v3->varyings[0].x, v3->varyings[0].y, v3->varyings[0].z, v3->varyings[0].w);
-
-   VectorComp_t area;
-   area = v1->position.x * v2->position.y - v2->position.x * v1->position.y;
-   area += v2->position.x * v3->position.y - v3->position.x * v2->position.y;
-   area += v3->position.x * v1->position.y - v1->position.x * v3->position.y;
-   area *= 0.5f;
-
-   if (GL_CCW == ctx->cullState.frontFace + GL_CW)
-      (unsigned &)area ^= 0x80000000;
-
-   if (false && ctx->cullState.enable) { // TODO: turn off for now
-      switch (ctx->cullState.cullFace + GL_FRONT) {
-      case GL_FRONT:
-         if (!((unsigned &)area & 0x80000000)) // +ve, front facing
-            return;
-         break;
-      case GL_BACK:
-         if ((unsigned &)area & 0x80000000) // -ve, back facing
-            return;
-         break;
-      case GL_FRONT_AND_BACK:
-         return;
-      default:
-         assert(0);
-      }
-   }
-
-   v1->frontFacingPointCoord.y = v2->frontFacingPointCoord.y =
-                                    v3->frontFacingPointCoord.y = !((unsigned &)area & 0x80000000) ?
-                                                                  VectorComp_t_One : VectorComp_t_Zero;
-
-   iface->StencilSelect(iface, ((unsigned &)area & 0x80000000) ? GL_BACK : GL_FRONT);
-
-//    if (0)
-//    {
-//        GGLContext * ctx =(GGLContext *)iface;
-//        for (unsigned sampler = 0; sampler < GGL_MAXCOMBINEDTEXTUREIMAGEUNITS; sampler++)
-//        {
-//            if (!((1 << sampler) & ctx->glCtx->Shader.CurrentProgram->FragmentProgram->SamplersUsed))
-//                continue;
-//            const GGLTexture * texture = ctx->textureState.textures + sampler;
-//            int level = texture->width * texture->height / (area * 2) - 4;
-//            assert(texture->levels);
-//            ctx->textureState.textureData[sampler] = texture->levels[0];
-//            ctx->textureState.textureDimensions[sampler * 2] = texture->width;
-//            ctx->textureState.textureDimensions[sampler * 2 + 1] = texture->height;
-//            for (unsigned i = 1; i < texture->levelCount && i <= level; i++)
-//            {
-//                ctx->textureState.textureData[sampler] = texture->levels[i];
-//                ctx->textureState.textureDimensions[sampler * 2] += 1;
-//                ctx->textureState.textureDimensions[sampler * 2] /= 2;
-//                ctx->textureState.textureDimensions[sampler * 2 + 1] += 1;
-//                ctx->textureState.textureDimensions[sampler * 2 + 1] /= 2;
-//            }
-//        }
-//    }
-
-   // TODO DXL view frustum clipping
-   iface->RasterTriangle(iface, v1, v2, v3);
-
-//   ALOGD("pf2: DrawTriangle end");
-
-}
-
-static void PickRaster(GGLInterface * iface)
-{
-   iface->ProcessVertex = ProcessVertex;
-   iface->DrawTriangle = DrawTriangle;
-   iface->RasterTriangle = RasterTriangle;
-   iface->RasterTrapezoid = RasterTrapezoid;
-}
-
-static void ViewportTransform(const GGLInterface * iface, Vector4 * v)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   v->x = v->x * ctx->viewport.w + ctx->viewport.x;
-   v->y *= -1;
-   v->y = v->y * ctx->viewport.h + ctx->viewport.y;
-   v->z = v->z * ctx->viewport.f + ctx->viewport.n;
-}
-
-
-void InitializeRasterFunctions(GGLInterface * iface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->PickRaster = PickRaster;
-   iface->ViewportTransform = ViewportTransform;
-}
diff --git a/src/pixelflinger2/scanline.cpp b/src/pixelflinger2/scanline.cpp
deleted file mode 100644
index 4184b0e..0000000
--- a/src/pixelflinger2/scanline.cpp
+++ /dev/null
@@ -1,613 +0,0 @@
-/**
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- **     http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "src/pixelflinger2/pixelflinger2.h"
-#include "src/pixelflinger2/texture.h"
-#include "src/mesa/main/mtypes.h"
-
-#if !USE_LLVM_SCANLINE
-
-static void Saturate(Vec4<BlendComp_t> * color)
-{
-   color->r = MIN2(MAX2(color->r, 0), 255);
-   color->g = MIN2(MAX2(color->g, 0), 255);
-   color->b = MIN2(MAX2(color->b, 0), 255);
-   color->a = MIN2(MAX2(color->a, 0), 255);
-}
-
-static inline void RGBAIntToRGBAIntx4(unsigned rgba, Vec4<BlendComp_t> * color) __attribute__((always_inline));
-static inline void RGBAIntToRGBAIntx4(unsigned rgba, Vec4<BlendComp_t> * color)
-{
-   color->r = rgba & 0xff;
-   color->g = (rgba >>= 8) & 0xff;
-   color->b = (rgba >>= 8) & 0xff;
-   color->a = (rgba >>= 8);
-}
-
-static inline void RGBAFloatx4ToRGBAIntx4(Vector4 * v, Vec4<BlendComp_t> * color)
-{
-   color->r = v->r * 255;
-   color->g = v->g * 255;
-   color->b = v->b * 255;
-   color->a = v->a * 255;
-}
-
-static inline unsigned RGBAIntx4ToRGBAInt(const Vec4<BlendComp_t> * color);
-static inline unsigned RGBAIntx4ToRGBAInt(const Vec4<BlendComp_t> * color)
-{
-   return color->r | (color->g << 8) | (color->b << 16) | (color->a << 24);
-}
-
-
-
-//static inline Pixel Vector4ToPixelRGBA(const Vector4 * color) __attribute__((always_inline));
-//static inline Pixel Vector4ToPixelRGBA(const Vector4 * color)
-//{
-//    Pixel pixel;
-//#if defined(__ARM_HAVE_NEON) && USE_NEON
-//    int32x4_t  c = vcvtq_s32_f32(vmulq_n_f32(color->f4, 255.0f));
-//    c = vminq_s32(c, vdupq_n_s32(255));
-//    c = vmaxq_s32(c, vdupq_n_s32(0));
-//    pixel.channels[0] = (unsigned char)vgetq_lane_s32(c, 0);
-//    pixel.channels[1] = (unsigned char)vgetq_lane_s32(c, 1);
-//    pixel.channels[2] = (unsigned char)vgetq_lane_s32(c, 2);
-//    pixel.channels[3] = (unsigned char)vgetq_lane_s32(c, 3);
-//#else
-//    pixel.channels[0] = (unsigned char)MIN2(MAX2((short)(color->r * 255), 0), 255);
-//	pixel.channels[1] = (unsigned char)MIN2(MAX2((short)(color->g * 255), 0), 255);
-//	pixel.channels[2] = (unsigned char)MIN2(MAX2((short)(color->b * 255), 0), 255);
-//	pixel.channels[3] = (unsigned char)MIN2(MAX2((short)(color->a * 255), 0), 255);
-//#endif //#if USE_FIXED_POINT
-//	return pixel;
-//}
-
-template<typename T>
-static inline void BlendFactor(const unsigned mode, T & factor, const T & src,
-                               const T & dst, const T & constant, const T & one,
-                               const T & zero, const BlendComp_t & srcA, const BlendComp_t & dstA,
-                               const BlendComp_t & constantA, const BlendComp_t & sOne) __attribute__((always_inline));
-template<typename T>
-static inline void BlendFactor(const unsigned mode, T & factor, const T & src,
-                               const T & dst, const T & constant, const T & one,
-                               const T & zero, const BlendComp_t & srcA, const BlendComp_t & dstA,
-                               const BlendComp_t & constantA, const BlendComp_t & sOne)
-{
-   switch (mode) {
-   case 0: // GL_ZERO
-      factor = zero;
-      return;
-   case 1: // GL_ONE
-      factor = one;
-      return;
-   case 2: // GL_SRC_COLOR:
-      factor = src;
-      return;
-   case 3: // GL_ONE_MINUS_SRC_COLOR:
-      factor = one;
-      factor -= src;
-      return;
-   case 4: // GL_DST_COLOR:
-      factor = dst;
-      return;
-   case 5: // GL_ONE_MINUS_DST_COLOR:
-      factor = one;
-      factor -= dst;
-      return;
-   case 6: // GL_SRC_ALPHA:
-      factor = srcA;
-      return;
-   case 7: // GL_ONE_MINUS_SRC_ALPHA:
-      factor = sOne - srcA;
-      return;
-   case 8: // GL_DST_ALPHA:
-      factor = dstA;
-      return;
-   case 9: // GL_ONE_MINUS_DST_ALPHA:
-      factor = sOne - dstA;
-      return;
-   case 10: // GL_SRC_ALPHA_SATURATE: // valid only for source color; src alpha = 1
-      factor = MIN2(srcA, sOne - dstA);
-      return;
-   case 11: // GL_CONSTANT_COLOR:
-      factor = constant;
-      return;
-   case 12: // GL_ONE_MINUS_CONSTANT_COLOR:
-      factor = one;
-      factor -= constant;
-      return;
-   case 13: // GL_CONSTANT_ALPHA:
-      factor = constantA;
-      return;
-   case 14: // GL_ONE_MINUS_CONSTANT_ALPHA:
-      factor = sOne - constantA;
-      return;
-   default:
-      assert(0);
-      return;
-   }
-}
-
-unsigned char StencilOp(const unsigned op, unsigned char s, const unsigned char ref)
-{
-   switch (op) {
-   case 0: // GL_ZERO
-      return 0;
-   case 1: // GL_KEEP
-      return s;
-   case 2: // GL_REPLACE
-      return ref;
-   case 3: // GL_INCR
-      if (s < 255)
-         return ++s;
-      return s;
-   case 4: // GL_DECR
-      if (s > 0)
-         return --s;
-      return 0;
-   case 5: // GL_INVERT
-      return ~s;
-   case 6: // GL_INCR_WRAP
-      return ++s;
-   case 7: // GL_DECR_WRAP
-      return --s;
-   default:
-      assert(0);
-      return s;
-   }
-}
-
-#endif // #if !USE_LLVM_SCANLINE
-
-#ifdef USE_LLVM_SCANLINE
-typedef void (* ScanLineFunction_t)(VertexOutput * start, VertexOutput * step,
-                                    const float (*constants)[4], void * frame,
-                                    int * depth, unsigned char * stencil,
-                                    GGLActiveStencil *, unsigned count);
-#endif
-
-void GGLScanLine(const gl_shader_program * program, const GGLPixelFormat colorFormat,
-                 void * frameBuffer, int * depthBuffer, unsigned char * stencilBuffer,
-                 unsigned bufferWidth, unsigned bufferHeight, GGLActiveStencil * activeStencil,
-                 const VertexOutput_t * start, const VertexOutput_t * end, const float (*constants)[4])
-{
-#if !USE_LLVM_SCANLINE
-   assert(!"only for USE_LLVM_SCANLINE");
-#endif
-
-//   ALOGD("pf2: GGLScanLine program=%p format=0x%.2X frameBuffer=%p depthBuffer=%p stencilBuffer=%p ",
-//      program, colorFormat, frameBuffer, depthBuffer, stencilBuffer);
-
-   const unsigned int varyingCount = program->VaryingSlots;
-   const unsigned y = start->position.y, startX = start->position.x,
-                      endX = end->position.x;
-
-   assert(bufferWidth > startX && bufferWidth > endX);
-   assert(bufferHeight > y);
-
-   char * frame = (char *)frameBuffer;
-   if (GGL_PIXEL_FORMAT_RGBA_8888 == colorFormat)
-      frame += (y * bufferWidth + startX) * 4;
-   else if (GGL_PIXEL_FORMAT_RGB_565 == colorFormat)
-      frame += (y * bufferWidth + startX) * 2;
-   else 
-      assert(0);
-   const VectorComp_t div = VectorComp_t_CTR(1 / (float)(endX - startX));
-
-   //memcpy(ctx->glCtx->CurrentProgram->ValuesVertexOutput, start, sizeof(*start));
-   // shader symbols are mapped to gl_shader_program_Values*
-   //VertexOutput & vertex(*(VertexOutput*)ctx->glCtx->CurrentProgram->ValuesVertexOutput);
-   VertexOutput vertex(*start);
-   VertexOutput vertexDx(*end);
-
-   vertexDx.position -= start->position;
-   vertexDx.position *= div;
-   //printf("vertexDx.position.z=%.8g \n", vertexDx.position.z);
-   for (unsigned i = 0; i < varyingCount; i++) {
-      vertexDx.varyings[i] -= start->varyings[i];
-      vertexDx.varyings[i] *= div;
-   }
-   vertexDx.frontFacingPointCoord -= start->frontFacingPointCoord;
-   vertexDx.frontFacingPointCoord *= div; // gl_PointCoord, only zw
-   vertexDx.frontFacingPointCoord.y = 0; // gl_FrontFacing not interpolated
-
-   int * depth = depthBuffer + y * bufferWidth + startX;
-   unsigned char * stencil = stencilBuffer + y * bufferWidth + startX;
-
-   // TODO DXL consider inverting gl_FragCoord.y
-   ScanLineFunction_t scanLineFunction = (ScanLineFunction_t)
-                                         program->_LinkedShaders[MESA_SHADER_FRAGMENT]->function;
-//   ALOGD("pf2 GGLScanLine scanline=%p start=%p constants=%p", scanLineFunction, &vertex, constants);
-   if (endX >= startX)
-      scanLineFunction(&vertex, &vertexDx, constants, frame, depth, stencil, activeStencil, endX - startX + 1);
-
-//   ALOGD("pf2: GGLScanLine end");
-
-}
-
-template <bool StencilTest, bool DepthTest, bool DepthWrite, bool BlendEnable>
-void ScanLine(const GGLInterface * iface, const VertexOutput * start, const VertexOutput * end)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   GGLScanLine(ctx->CurrentProgram, ctx->frameSurface.format, ctx->frameSurface.data,
-               (int *)ctx->depthSurface.data, (unsigned char *)ctx->stencilSurface.data,
-               ctx->frameSurface.width, ctx->frameSurface.height, &ctx->activeStencil,
-               start, end, ctx->CurrentProgram->ValuesUniform);
-//   GGL_GET_CONST_CONTEXT(ctx, iface);
-//   //    assert((unsigned)start->position.y == (unsigned)end->position.y);
-//   //
-//   //    assert(GGL_PIXEL_FORMAT_RGBA_8888 == ctx->frameSurface.format);
-//   //    assert(GGL_PIXEL_FORMAT_Z_32 == ctx->depthSurface.format);
-//   //    assert(ctx->frameSurface.width == ctx->depthSurface.width);
-//   //    assert(ctx->frameSurface.height == ctx->depthSurface.height);
-//
-//   const unsigned int varyingCount = ctx->glCtx->CurrentProgram->VaryingSlots;
-//   const unsigned y = start->position.y, startX = start->position.x,
-//                      endX = end->position.x;
-//
-//   //assert(ctx->frameSurface.width > startX && ctx->frameSurface.width > endX);
-//   //assert(ctx->frameSurface.height > y);
-//
-//   unsigned * frame = (unsigned *)ctx->frameSurface.data
-//                      + y * ctx->frameSurface.width + startX;
-//   const VectorComp_t div = VectorComp_t_CTR(1 / (float)(endX - startX));
-//
-//   //memcpy(ctx->glCtx->CurrentProgram->ValuesVertexOutput, start, sizeof(*start));
-//   // shader symbols are mapped to gl_shader_program_Values*
-//   //VertexOutput & vertex(*(VertexOutput*)ctx->glCtx->CurrentProgram->ValuesVertexOutput);
-//   VertexOutput vertex(*start);
-//   VertexOutput vertexDx(*end);
-//
-//   vertexDx.position -= start->position;
-//   vertexDx.position *= div;
-//   //printf("vertexDx.position.z=%.8g \n", vertexDx.position.z);
-//   for (unsigned i = 0; i < varyingCount; i++) {
-//      vertexDx.varyings[i] -= start->varyings[i];
-//      vertexDx.varyings[i] *= div;
-//   }
-//   vertexDx.frontFacingPointCoord -= start->frontFacingPointCoord;
-//   vertexDx.frontFacingPointCoord *= div; // gl_PointCoord, only zw
-//   vertexDx.frontFacingPointCoord.y = 0; // gl_FrontFacing not interpolated
-//
-//#if USE_FORCED_FIXEDPOINT
-//   for (unsigned j = 0; j < 4; j++) {
-//      for (unsigned i = 0; i < varyingCount; i++) {
-//         vertex.varyings[i].i[j] = vertex.varyings[i].f[j] * 65536;
-//         vertexDx.varyings[i].i[j] = vertexDx.varyings[i].f[j] * 65536;
-//      }
-//      vertex.position.i[j] = vertex.position.f[j] * 65536;
-//      vertexDx.position.i[j] = vertexDx.position.f[j] * 65536;
-//      vertex.frontFacingPointCoord.i[j] = vertex.frontFacingPointCoord.f[j] * 65536;
-//   }
-//#endif
-//
-//   int * depth = (int *)ctx->depthSurface.data + y * ctx->frameSurface.width + startX;
-//   unsigned char * stencil = (unsigned char *)ctx->stencilSurface.data + y * ctx->frameSurface.width + startX;
-//
-//#if !USE_LLVM_TEXTURE_SAMPLER
-//   extern const GGLContext * textureGGLContext;
-//   textureGGLContext = ctx;
-//#endif
-//
-//   // TODO DXL consider inverting gl_FragCoord.y
-//
-//#if USE_LLVM_SCANLINE
-//   ScanLineFunction_t scanLineFunction = (ScanLineFunction_t)
-//                                         ctx->glCtx->CurrentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->function;
-//   if (endX >= startX) {
-//      scanLineFunction(&vertex, &vertexDx, ctx->glCtx->CurrentProgram->ValuesUniform, frame, depth, stencil, &ctx->activeStencil, endX - startX + 1);
-//   }
-//#else
-//
-//   int z;
-//   bool sCmp = true; // default passed, unless failed by stencil test
-//   unsigned char s; // masked stored stencil value
-//   const unsigned char sMask = ctx->activeStencil.mask;
-//   const unsigned char sRef = ctx->activeStencil.ref;
-//   const unsigned sFunc = ctx->activeStencil.face ? 0x200 | ctx->backStencil.func :
-//                          0x200 | ctx->frontStencil.func;
-//   const unsigned ssFail = ctx->activeStencil.face ? ctx->backStencil.sFail :
-//                           ctx->frontStencil.sFail;
-//   const unsigned sdFail = ctx->activeStencil.face ? ctx->backStencil.dFail :
-//                           ctx->frontStencil.dFail;
-//   const unsigned sdPass = ctx->activeStencil.face ? ctx->backStencil.dPass :
-//                           ctx->frontStencil.dPass;
-//
-//   for (unsigned x = startX; x <= endX; x++) {
-//      //assert(abs((int)(vertex.position.x) - (int)x) < 2);
-//      //assert((unsigned)vertex.position.y == y);
-//      if (StencilTest) {
-//         s = *stencil & sMask;
-//         switch (sFunc) {
-//         case GL_NEVER:
-//            sCmp = false;
-//            break;
-//         case GL_LESS:
-//            sCmp = sRef < s;
-//            break;
-//         case GL_EQUAL:
-//            sCmp = sRef == s;
-//            break;
-//         case GL_LEQUAL:
-//            sCmp = sRef <= s;
-//            break;
-//         case GL_GREATER:
-//            sCmp = sRef > s;
-//            break;
-//         case GL_NOTEQUAL:
-//            sCmp = sRef != s;
-//            break;
-//         case GL_GEQUAL:
-//            sCmp = sRef >= s;
-//            break;
-//         case GL_ALWAYS:
-//            sCmp = true;
-//            break;
-//         default:
-//            assert(0);
-//            break;
-//         }
-//      }
-//
-//      if (!StencilTest || sCmp) {
-//         z = vertex.position.i[2];
-//         if (z & 0x80000000)  // negative float has leading 1
-//            z ^= 0x7fffffff;  // bigger negative is smaller
-//         bool zCmp = true;
-//         if (DepthTest) {
-//            switch (0x200 | ctx->state.bufferState.depthFunc) {
-//            case GL_NEVER:
-//               zCmp = false;
-//               break;
-//            case GL_LESS:
-//               zCmp = z < *depth;
-//               break;
-//            case GL_EQUAL:
-//               zCmp = z == *depth;
-//               break;
-//            case GL_LEQUAL:
-//               zCmp = z <= *depth;
-//               break;
-//            case GL_GREATER:
-//               zCmp = z > *depth;
-//               break;
-//            case GL_NOTEQUAL:
-//               zCmp = z != *depth;
-//               break;
-//            case GL_GEQUAL:
-//               zCmp = z >= *depth;
-//               break;
-//            case GL_ALWAYS:
-//               zCmp = true;
-//               break;
-//            default:
-//               assert(0);
-//               break;
-//            }
-//         }
-//         if (!DepthTest || zCmp) {
-//            float * varying = (float *)ctx->glCtx->CurrentProgram->ValuesVertexOutput;
-//            ShaderFunction_t function = (ShaderFunction_t)ctx->glCtx->CurrentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->function;
-//            function(&vertex, &vertex, ctx->glCtx->CurrentProgram->ValuesUniform);
-//            //ctx->glCtx->CurrentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->function();
-//            if (BlendEnable) {
-//               BlendComp_t sOne = 255, sZero = 0;
-//               Vec4<BlendComp_t> one = sOne, zero = sZero;
-//
-//               Vec4<BlendComp_t> src;
-////                    if (outputRegDesc.IsInt32Color())
-////                        RGBAIntToRGBAIntx4(vertex.fragColor[0].u[0], &src);
-////                    else if (outputRegDesc.IsVectorType(Float))
-//               RGBAFloatx4ToRGBAIntx4(&vertex.fragColor[0], &src);
-////                    else if (outputRegDesc.IsVectorType(Fixed8))
-////                    {
-////                        src.u[0] = vertex.fragColor[0].u[0];
-////                        src.u[1] = vertex.fragColor[0].u[1];
-////                        src.u[2] = vertex.fragColor[0].u[2];
-////                        src.u[3] = vertex.fragColor[0].u[3];
-////                    }
-////                    else
-////                        assert(0);
-//
-//               Vec4<BlendComp_t> dst;
-//               unsigned dc = *frame;
-//               dst.r = dc & 255;
-//               dst.g = (dc >>= 8) & 255;
-//               dst.b = (dc >>= 8) & 255;
-//               dst.a = (dc >>= 8) & 255;
-//
-//               Vec4<BlendComp_t> sf, df;
-//               Vec4<BlendComp_t> blendStateColor(ctx->state.blendState.color[0], ctx->state.blendState.color[1],
-//                                                 ctx->state.blendState.color[2], ctx->state.blendState.color[3]);
-//
-//               BlendFactor(ctx->state.blendState.scf, sf, src, dst,
-//                           blendStateColor, one, zero, src.a, dst.a,
-//                           blendStateColor.a, sOne);
-//               if (ctx->state.blendState.scf != ctx->state.blendState.saf)
-//                  BlendFactor(ctx->state.blendState.saf, sf.a, src.a, dst.a,
-//                              blendStateColor.a, sOne, sZero, src.a, dst.a,
-//                              blendStateColor.a, sOne);
-//               BlendFactor(ctx->state.blendState.dcf, df, src, dst,
-//                           blendStateColor, one, zero, src.a, dst.a,
-//                           blendStateColor.a, sOne);
-//               if (ctx->state.blendState.dcf != ctx->state.blendState.daf)
-//                  BlendFactor(ctx->state.blendState.daf, df.a, src.a, dst.a,
-//                              blendStateColor.a, sOne, sZero, src.a, dst.a,
-//                              blendStateColor.a, sOne);
-//
-//               Vec4<BlendComp_t> sfs(sf), dfs(df);
-//               sfs.LShr(7);
-//               sf += sfs;
-//               dfs.LShr(7);
-//               df += dfs;
-//
-//               src *= sf;
-//               dst *= df;
-//               Vec4<BlendComp_t> res(src);
-//               switch (ctx->state.blendState.ce + GL_FUNC_ADD) {
-//               case GL_FUNC_ADD:
-//                  res += dst;
-//                  break;
-//               case GL_FUNC_SUBTRACT:
-//                  res -= dst;
-//                  break;
-//               case GL_FUNC_REVERSE_SUBTRACT:
-//                  res = dst;
-//                  res -= src;
-//                  break;
-//               default:
-//                  assert(0);
-//                  break;
-//               }
-//               if (ctx->state.blendState.ce != ctx->state.blendState.ae)
-//                  switch (ctx->state.blendState.ce + GL_FUNC_ADD) {
-//                  case GL_FUNC_ADD:
-//                     res.a = src.a + dst.a;
-//                     break;
-//                  case GL_FUNC_SUBTRACT:
-//                     res.a = src.a - dst.a;
-//                     break;
-//                  case GL_FUNC_REVERSE_SUBTRACT:
-//                     res.a = dst.a - src.a;
-//                     break;
-//                  default:
-//                     assert(0);
-//                     break;
-//                  }
-//
-//               res.AShr(8);
-//               Saturate(&res);
-//               *frame = RGBAIntx4ToRGBAInt(&res);
-//            } else {
-////                    if (outputRegDesc.IsInt32Color())
-////                        *frame = vertex.fragColor[0].u[0];
-////                    else if (outputRegDesc.IsVectorType(Float))
-//               {
-//                  Vec4<BlendComp_t> src;
-//                  RGBAFloatx4ToRGBAIntx4(&vertex.fragColor[0], &src);
-//                  Saturate(&src);
-//                  *frame = RGBAIntx4ToRGBAInt(&src);
-//               }
-////                    else if (outputRegDesc.IsVectorType(Fixed16))
-////                    {
-////                        Vec4<BlendComp_t> & src = (Vec4<BlendComp_t> &)vertex.fragColor[0];
-////                        src.r = (src.r * 255 >> 16);
-////                        src.g = (src.g * 255 >> 16);
-////                        src.b = (src.b * 255 >> 16);
-////                        src.a = (src.a * 255 >> 16);
-////                        Saturate(&src);
-////                        *frame = RGBAIntx4ToRGBAInt(&src);
-////                    }
-////                    else if (outputRegDesc.IsVectorType(Fixed8))
-////                    {
-////                        Vec4<BlendComp_t> & src = (Vec4<BlendComp_t> &)vertex.fragColor[0];
-////                        Saturate(&src);
-////                        *frame = RGBAIntx4ToRGBAInt(&src);
-////                    }
-////                    else
-////                        assert(0);
-//            }
-//
-//            if (DepthWrite)
-//               *depth = z;
-//            if (StencilTest)
-//               *stencil = StencilOp(sdPass, s, sRef);
-//         } else if (StencilTest)
-//            *stencil = StencilOp(sdFail, s, sRef);
-//      } else if (StencilTest)
-//         *stencil = StencilOp(ssFail, s, sRef);
-//
-//      frame++;
-//      depth++;
-//      stencil++;
-//
-//#if USE_FORCED_FIXEDPOINT
-//      for (unsigned j = 0; j < 4; j++) {
-//         if (ctx->glCtx->Shader.CurrentProgram->FragmentProgram->UsesFragCoord)
-//            vertex.position.i[j] += vertexDx.position.i[j];
-//         for (unsigned i = 0; i < varyingCount; i++)
-//            vertex.varyings[i].i[j] += vertexDx.varyings[i].i[j];
-//      }
-//      vertex.position.i[2] += vertexDx.position.i[2];
-//      if (ctx->glCtx->Shader.CurrentProgram->FragmentProgram->UsesPointCoord) {
-//         vertex.frontFacingPointCoord.i[2] = vertexDx.frontFacingPointCoord.i[2];
-//         vertex.frontFacingPointCoord.i[3] = vertexDx.frontFacingPointCoord.i[3];
-//      }
-//#else
-//   if (ctx->glCtx->CurrentProgram->UsesFragCoord)
-//      vertex.position += vertexDx.position;
-//   else if (ctx->state.bufferState.depthTest)
-//      vertex.position.z += vertexDx.position.z;
-//
-//   for (unsigned i = 0; i < varyingCount; i++)
-//      vertex.varyings[i] += vertexDx.varyings[i];
-//   if (ctx->glCtx->CurrentProgram->UsesPointCoord) {
-//      vertex.frontFacingPointCoord.z += vertexDx.frontFacingPointCoord.z;
-//      vertex.frontFacingPointCoord.w += vertexDx.frontFacingPointCoord.w;
-//   }
-//#endif // #if USE_FORCED_FIXEDPOINT
-//   }
-//
-//#endif // #if USE_LLVM_SCANLINE
-//
-//#if !USE_LLVM_TEXTURE_SAMPLER
-//   textureGGLContext = NULL;
-//#endif
-}
-
-static void PickScanLine(GGLInterface * iface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-
-   ctx->interface.ScanLine = NULL;
-   if (ctx->state.bufferState.stencilTest) {
-      if (ctx->state.bufferState.depthTest) {
-         if (ctx->state.blendState.enable)
-            ctx->interface.ScanLine = ScanLine<true, true, true, true>;
-         else
-            ctx->interface.ScanLine = ScanLine<true, true, true, false>;
-      } else {
-         if (ctx->state.blendState.enable)
-            ctx->interface.ScanLine = ScanLine<true, false, false, true>;
-         else
-            ctx->interface.ScanLine = ScanLine<true, false, false, false>;
-      }
-   } else {
-      if (ctx->state.bufferState.depthTest) {
-         if (ctx->state.blendState.enable)
-            ctx->interface.ScanLine = ScanLine<false, true, true, true>;
-         else
-            ctx->interface.ScanLine = ScanLine<false, true, true, false>;
-      } else {
-         if (ctx->state.blendState.enable)
-            ctx->interface.ScanLine = ScanLine<false, false, false, true>;
-         else
-            ctx->interface.ScanLine = ScanLine<false, false, false, false>;
-      }
-   }
-
-   assert(ctx->interface.ScanLine);
-}
-
-void InitializeScanLineFunctions(GGLInterface * iface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   ctx->PickScanLine = PickScanLine;
-}
diff --git a/src/pixelflinger2/shader.cpp b/src/pixelflinger2/shader.cpp
deleted file mode 100644
index 837c703..0000000
--- a/src/pixelflinger2/shader.cpp
+++ /dev/null
@@ -1,1006 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "src/pixelflinger2/pixelflinger2.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <map>
-
-#include <llvm/IR/LLVMContext.h>
-#include <llvm/IR/Module.h>
-#include <llvm/Support/raw_ostream.h>
-#include <dlfcn.h>
-
-#include <bcc/BCCContext.h>
-#include <bcc/Compiler.h>
-#include <bcc/ExecutionEngine/ObjectLoader.h>
-#include <bcc/ExecutionEngine/SymbolResolvers.h>
-#include <bcc/Script.h>
-#include <bcc/Source.h>
-#include <bcc/Support/Initialization.h>
-#include <bcc/Support/TargetCompilerConfigs.h>
-
-
-#include "src/talloc/hieralloc.h"
-#include "src/mesa/main/shaderobj.h"
-#include "src/mesa/program/prog_parameter.h"
-#include "src/mesa/program/prog_uniform.h"
-#include "src/glsl/glsl_types.h"
-#include "src/glsl/ir_to_llvm.h"
-#include "src/glsl/ir_print_visitor.h"
-
-//#undef ALOGD
-//#define ALOGD(...)
-
-static void InitializeGLContext(struct gl_context *ctx)
-{
-   memset(ctx, 0, sizeof(*ctx));
-   ctx->API = API_OPENGLES2;
-   ctx->Extensions.ARB_draw_buffers = GL_TRUE;
-   ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
-   ctx->Extensions.EXT_texture_array = GL_TRUE;
-   ctx->Extensions.NV_texture_rectangle = GL_TRUE;
-
-   /* 1.10 minimums. */
-   ctx->Const.MaxLights = 8;
-   ctx->Const.MaxClipPlanes = 8;
-   ctx->Const.MaxTextureUnits = 2;
-
-   /* More than the 1.10 minimum to appease parser tests taken from
-    * apps that (hopefully) already checked the number of coords.
-    */
-   ctx->Const.MaxTextureCoordUnits = 4;
-
-   ctx->Const.VertexProgram.MaxAttribs = 16;
-   ctx->Const.VertexProgram.MaxUniformComponents = 512;
-   ctx->Const.MaxVarying = 8;
-   ctx->Const.MaxVertexTextureImageUnits = 0;
-   ctx->Const.MaxCombinedTextureImageUnits = 2;
-   ctx->Const.MaxTextureImageUnits = 2;
-   ctx->Const.FragmentProgram.MaxUniformComponents = 64;
-
-   ctx->Const.MaxDrawBuffers = 2;
-}
-
-void * llvmCtx = NULL;
-static const struct GLContext {
-   const gl_context * ctx;
-   GLContext() {
-      ctx = hieralloc_zero(NULL, gl_context);
-//      ctx = (const gl_context*)calloc(1,sizeof(gl_context));
-      InitializeGLContext(const_cast<gl_context *>(ctx));
-      llvmCtx = new llvm::LLVMContext();
-   }
-   ~GLContext() {
-      _mesa_glsl_release_types(); // TODO: find when to release to minize memory
-      _mesa_glsl_release_functions(); // the IR has pointers to types
-      hieralloc_free(const_cast<gl_context *>(ctx));
-//      free(const_cast<gl_context *>(ctx));
-      ctx = NULL;
-      delete (llvm::LLVMContext *)llvmCtx;
-   }
-} glContext;
-
-extern "C" void GLContextDctr()
-{
-   _mesa_glsl_release_types(); // TODO: find when to release to minize memory
-   _mesa_glsl_release_functions();
-   //glContext.~GLContext();
-}
-
-struct ShaderKey {
-   struct ScanLineKey {
-      GGLStencilState frontStencil, backStencil;
-      GGLBufferState bufferState;
-      GGLBlendState blendState;
-   } scanLineKey;
-   GGLPixelFormat textureFormats[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS];
-   unsigned char textureParameters[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS]; // wrap and filter
-   bool operator <(const ShaderKey & rhs) const {
-      return memcmp(this, &rhs, sizeof(*this)) < 0;
-   }
-};
-
-struct Instance {
-   bcc::Script * script;
-   llvm::SmallVector<char, 1024> resultObj;
-   bcc::ObjectLoader * exec;
-   void (* function)();
-   ~Instance() {
-      delete script;
-      delete exec;
-   }
-};
-
-struct Executable { // codegen info
-   std::map<ShaderKey, Instance *> instances;
-};
-
-bool do_mat_op_to_vec(exec_list *instructions);
-
-extern void link_shaders(const struct gl_context *ctx, struct gl_shader_program *prog);
-
-extern "C" void compile_shader(const struct gl_context *ctx, struct gl_shader *shader);
-
-gl_shader * GGLShaderCreate(GLenum type)
-{
-   return _mesa_new_shader(NULL, 0, type);
-}
-
-static gl_shader * ShaderCreate(const GGLInterface * iface, GLenum type)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (GL_VERTEX_SHADER != type && GL_FRAGMENT_SHADER != type) {
-      gglError(GL_INVALID_ENUM);
-      return NULL;
-   }
-   gl_shader * shader = _mesa_new_shader(NULL, 0, type);
-   if (!shader)
-      gglError(GL_OUT_OF_MEMORY);
-   assert(1 == shader->RefCount);
-   return shader;
-}
-
-void GGLShaderSource(gl_shader_t * shader, GLsizei count, const char ** string, const int * length)
-{
-   hieralloc_free(const_cast<GLchar *>(shader->Source));
-   for (unsigned i = 0; i < count; i++) {
-      int len = strlen(string[i]);
-      if (length && length[i] >= 0)
-         len = length[i];
-      shader->Source = hieralloc_strndup_append(const_cast<GLchar *>(shader->Source), string[i], len);
-   }
-//   ALOGD("pf2: GGLShaderSource: \n '%s' \n", shader->Source);
-}
-
-GLboolean GGLShaderCompile(gl_shader * shader, const char * glsl, const char ** infoLog)
-{
-   if (glsl)
-      shader->Source = glsl;
-   assert(shader->Source);
-   compile_shader(glContext.ctx, shader);
-   if (glsl)
-      shader->Source = NULL;
-   if (infoLog)
-      *infoLog = shader->InfoLog;
-   return shader->CompileStatus;
-}
-
-static GLboolean ShaderCompile(const GGLInterface * iface, gl_shader * shader,
-                               const char * glsl, const char ** infoLog)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (!glsl && !shader->Source) {
-      gglError(GL_INVALID_VALUE);
-      assert(0);
-      return GL_FALSE;
-   }
-   return GGLShaderCompile(shader, glsl, infoLog);
-}
-
-void GGLShaderDelete(gl_shader * shader)
-{
-   if (shader && shader->executable) {
-      for (std::map<ShaderKey, Instance *>::iterator it=shader->executable->instances.begin();
-            it != shader->executable->instances.end(); it++)
-         (*it).second->~Instance();
-      shader->executable->instances.~map();
-   }
-   _mesa_delete_shader(NULL, shader);
-}
-
-static void ShaderDelete(const GGLInterface * iface, gl_shader * shader)
-{
-   GGLShaderDelete(shader);
-}
-
-gl_shader_program * GGLShaderProgramCreate()
-{
-   gl_shader_program * program = hieralloc_zero(NULL, struct gl_shader_program);
-   if (!program)
-      return NULL;
-   program->Attributes = hieralloc_zero(program, gl_program_parameter_list);
-   if (!program->Attributes) {
-      hieralloc_free(program);
-      return NULL;
-   }
-   program->Varying = hieralloc_zero(program, gl_program_parameter_list);
-   if (!program->Varying) {
-      hieralloc_free(program);
-      return NULL;
-   }
-   return program;
-}
-
-static gl_shader_program * ShaderProgramCreate(const GGLInterface * iface)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   gl_shader_program * program = GGLShaderProgramCreate();
-   if (!program)
-      gglError(GL_OUT_OF_MEMORY);
-   return program;
-}
-
-unsigned GGLShaderAttach(gl_shader_program * program, gl_shader * shader)
-{
-   for (unsigned i = 0; i < program->NumShaders; i++)
-      if (program->Shaders[i]->Type == shader->Type || program->Shaders[i] == shader)
-         return GL_INVALID_OPERATION;
-
-   program->Shaders = (gl_shader **)hieralloc_realloc
-                      (program, program->Shaders, gl_shader *, program->NumShaders + 1);
-   if (!program->Shaders) {
-      assert(0);
-      return GL_OUT_OF_MEMORY;
-   }
-   program->Shaders[program->NumShaders] = shader;
-   program->NumShaders++;
-   shader->RefCount++;
-   return GL_NO_ERROR;
-}
-
-static void ShaderAttach(const GGLInterface * iface, gl_shader_program * program,
-                         gl_shader * shader)
-{
-   unsigned error = GGLShaderAttach(program, shader);
-   if (GL_NO_ERROR != error)
-      gglError(error);
-}
-
-GLboolean GGLShaderProgramLink(gl_shader_program * program, const char ** infoLog)
-{
-   link_shaders(glContext.ctx, program);
-   if (infoLog)
-      *infoLog = program->InfoLog;
-   if (!program->LinkStatus)
-      return program->LinkStatus;
-   ALOGD("slots: attribute=%d varying=%d uniforms=%d \n", program->AttributeSlots, program->VaryingSlots, program->Uniforms->Slots);
-//   for (unsigned i = 0; i < program->Attributes->NumParameters; i++) {
-//      const gl_program_parameter & attribute = program->Attributes->Parameters[i];
-//      ALOGD("attribute '%s': location=%d slots=%d \n", attribute.Name, attribute.Location, attribute.Slots);
-//   }
-//   for (unsigned i = 0; i < program->Varying->NumParameters; i++) {
-//      const gl_program_parameter & varying = program->Varying->Parameters[i];
-//      ALOGD("varying '%s': vs_location=%d fs_location=%d \n", varying.Name, varying.BindLocation, varying.Location);
-//   }
-   for (unsigned i = 0; i < program->Uniforms->NumUniforms; i++) {
-      const gl_uniform & uniform = program->Uniforms->Uniforms[i];
-      ALOGD("uniform '%s': location=%d type=%s \n", uniform.Name, uniform.Pos, uniform.Type->name);
-   }
-   return program->LinkStatus;
-}
-
-static GLboolean ShaderProgramLink(gl_shader_program * program, const char ** infoLog)
-{
-   return GGLShaderProgramLink(program, infoLog);
-}
-
-static void GetShaderKey(const GGLState * ctx, const gl_shader * shader, ShaderKey * key)
-{
-   memset(key, 0, sizeof(*key));
-   if (GL_FRAGMENT_SHADER == shader->Type) {
-      key->scanLineKey.frontStencil = ctx->frontStencil;
-      key->scanLineKey.backStencil = ctx->backStencil;
-      key->scanLineKey.bufferState = ctx->bufferState;
-      key->scanLineKey.blendState = ctx->blendState;
-   }
-
-   for (unsigned i = 0; i < GGL_MAXCOMBINEDTEXTUREIMAGEUNITS; i++)
-      if (shader->SamplersUsed & (1 << i)) {
-         const GGLTexture & texture = ctx->textureState.textures[i];
-         key->textureFormats[i] = texture.format;
-         assert((1 << 2) > texture.wrapS);
-         key->textureParameters[i] |= texture.wrapS;
-         assert((1 << 2) > texture.wrapT);
-         key->textureParameters[i] |= texture.wrapT << 2;
-         assert((1 << 3) > texture.minFilter);
-         key->textureParameters[i] |= texture.minFilter << (2 + 2);
-         assert((1 << 1) > texture.magFilter);
-         key->textureParameters[i] |= texture.magFilter << (2 + 2 + 3);
-      }
-}
-
-static inline char HexDigit(unsigned char d)
-{
-   return (d > 9 ? d + 'A' - 10 : d + '0');
-}
-
-static const unsigned SHADER_KEY_STRING_LEN = GGL_MAXCOMBINEDTEXTUREIMAGEUNITS * 4 + 2;
-
-static void GetShaderKeyString(const GLenum type, const ShaderKey * key,
-                               char * buffer, const unsigned bufferSize)
-{
-   assert(1 == sizeof(char));
-   assert(0xff >= GGL_PIXEL_FORMAT_COUNT);
-   assert(SHADER_KEY_STRING_LEN <= bufferSize);
-   char * str = buffer;
-   if (GL_VERTEX_SHADER == type)
-      *str++ = 'v';
-   else if (GL_FRAGMENT_SHADER == type)
-      *str++ = 'f';
-   else
-      assert(0);
-   for (unsigned i = 0; i < GGL_MAXCOMBINEDTEXTUREIMAGEUNITS; i++) {
-      *str++ = HexDigit(key->textureFormats[i] / 16);
-      *str++ = HexDigit(key->textureFormats[i] % 16);
-      *str++ = HexDigit(key->textureParameters[i] / 16);
-      *str++ = HexDigit(key->textureParameters[i] % 16);
-   }
-   *str++ = '\0';
-}
-
-static const unsigned SCANLINE_KEY_STRING_LEN = 2 * sizeof(ShaderKey::ScanLineKey) + 3 + SHADER_KEY_STRING_LEN;
-
-static char * GetScanlineKeyString(const ShaderKey * key, char * buffer,
-                                   const unsigned bufferSize)
-{
-   assert(1 == sizeof(char));
-   assert(0xff >= GGL_PIXEL_FORMAT_COUNT);
-   assert(SCANLINE_KEY_STRING_LEN <= bufferSize);
-   char * str = buffer;
-   *str++ = 's';
-   const unsigned char * start = (const unsigned char *)&key->scanLineKey;
-   const unsigned char * const end = start + sizeof(key->scanLineKey);
-   for (; start < end; start++) {
-      *str++ = HexDigit(*start / 16);
-      *str++ = HexDigit(*start % 16);
-   }
-   GetShaderKeyString(GL_FRAGMENT_SHADER, key, str, bufferSize - (str - buffer));
-   return buffer;
-}
-
-struct SymbolLookupContext {
-   const GGLState * gglCtx;
-   const gl_shader_program * program;
-   const gl_shader * shader;
-};
-
-static void* SymbolLookup(void* pContext, const char* name)
-{
-   SymbolLookupContext * ctx = (SymbolLookupContext *)pContext;
-   const GGLState * gglCtx = ctx->gglCtx;
-   const void * symbol = (void*)dlsym(RTLD_DEFAULT, name);
-   if (NULL == symbol) {
-      if (!strcmp(_PF2_TEXTURE_DATA_NAME_, name))
-         symbol = (void *)gglCtx->textureState.textureData;
-      else if (!strcmp(_PF2_TEXTURE_DIMENSIONS_NAME_, name))
-         symbol = (void *)gglCtx->textureState.textureDimensions;
-      else // attributes, varyings and uniforms are mapped to locations in pointers
-      {
-         ALOGD("pf2: SymbolLookup unknown symbol: '%s'", name);
-         assert(0);
-      }
-   }
-//   printf("symbolLookup '%s'=%p \n", name, symbol);
-   assert(symbol);
-   return (void *)symbol;
-}
-
-static void CodeGen(Instance * instance, const char * mainName, gl_shader * shader,
-                    gl_shader_program * program, const GGLState * gglCtx)
-{
-   bcc::Compiler compiler;
-   bcc::Compiler::ErrorCode compile_result;
-   llvm::raw_svector_ostream out(instance->resultObj);
-
-//   instance->module->dump();
-
-   compile_result = compiler.config(bcc::DefaultCompilerConfig());
-   if (compile_result != bcc::Compiler::kSuccess) {
-      ALOGD("failed config compiler (%s)", bcc::Compiler::GetErrorString(compile_result));
-      assert(0);
-      return;
-   }
-
-   compiler.enableLTO(/* pEnable */false); // Disable LTO passes execution.
-
-   compile_result = compiler.compile(*instance->script, out);
-   if (compile_result != bcc::Compiler::kSuccess) {
-      ALOGD("failed to compile (%s)", bcc::Compiler::GetErrorString(compile_result));
-      assert(0);
-      return;
-   }
-
-   SymbolLookupContext ctx = {gglCtx, program, shader};
-   bcc::LookupFunctionSymbolResolver<void*> resolver(SymbolLookup, &ctx);
-
-   instance->exec = bcc::ObjectLoader::Load(instance->resultObj.begin(), instance->resultObj.size(),
-                                            /* pName */"glsl", resolver, /* pEnableGDBDebug */false);
-
-   if (!instance->exec) {
-      ALOGD("failed to load the result object");
-      assert(0);
-      return;
-   }
-
-   instance->function = reinterpret_cast<void (*)()>(instance->exec->getSymbolAddress(mainName));
-   assert(instance->function);
-   if (!instance->function) {
-      ALOGD("Could not find '%s'\n", mainName);
-   }
-//   else
-//      printf("bcc_compile %s=%p \n", mainName, instance->function);
-
-//   assert(0);
-}
-
-void GenerateScanLine(const GGLState * gglCtx, const gl_shader_program * program, llvm::Module * mod,
-                      const char * shaderName, const char * scanlineName);
-
-void GGLShaderUse(void * bccCtx, const GGLState * gglState, gl_shader_program * program)
-{
-//   ALOGD("%s", program->Shaders[MESA_SHADER_FRAGMENT]->Source);
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (!program->_LinkedShaders[i])
-         continue;
-      gl_shader * shader = program->_LinkedShaders[i];
-      shader->function = NULL;
-      if (!shader->executable) {
-         shader->executable = hieralloc_zero(shader, Executable);
-         shader->executable->instances = std::map<ShaderKey, Instance *>();
-      }
-
-      ShaderKey shaderKey;
-      GetShaderKey(gglState, shader, &shaderKey);
-      Instance * instance = shader->executable->instances[shaderKey];
-      bcc::BCCContext * compilerCtx = reinterpret_cast<bcc::BCCContext *>(bccCtx);
-      if (!instance) {
-//         puts("begin jit new shader");
-         instance = hieralloc_zero(shader->executable, Instance);
-
-         llvm::Module * module = new llvm::Module("glsl", compilerCtx->getLLVMContext());
-
-         char shaderName [SHADER_KEY_STRING_LEN] = {0};
-         GetShaderKeyString(shader->Type, &shaderKey, shaderName, sizeof shaderName / sizeof *shaderName);
-
-         char mainName [SHADER_KEY_STRING_LEN + 6] = {"main"};
-         strcat(mainName, shaderName);
-
-         do_mat_op_to_vec(shader->ir); // TODO: move these passes to link?
-//#ifdef __arm__
-//         static const char fileName[] = "/data/pf2.txt";
-//         FILE * file = freopen(fileName, "w", stdout);
-//         assert(file);
-//         *stdout = *file;
-//         std::ios_base::sync_with_stdio(true);
-//#endif
-//         _mesa_print_ir(shader->ir, NULL);
-//#ifdef __arm__
-//         fclose(file);
-//         file = fopen(fileName, "r");
-//         assert(file);
-//         static char str[256];
-//         while (!feof(file)) {
-//            fgets(str, sizeof(str) - 1, file);
-//            str[sizeof(str) - 1] = 0;
-//            ALOGD("%s", str);
-//         }
-//         fclose(file);
-//#endif
-         if (!glsl_ir_to_llvm_module(shader->ir, module, gglState, shaderName)) {
-            assert(0);
-            delete module;
-         }
-         bcc::Source * source = bcc::Source::CreateFromModule(*compilerCtx, *module);
-         if (!source) {
-            delete module;
-            assert(0);
-         }
-         instance->script = new bcc::Script(*source);
-         if (!instance->script) {
-            delete source;
-            assert(0);
-         }
-//#ifdef __arm__
-//         static const char fileName[] = "/data/pf2.txt";
-//         FILE * file = freopen(fileName, "w", stderr);
-//         assert(file);
-//         *stderr = *file;
-//         std::ios_base::sync_with_stdio(true);
-//#endif
-
-//         if (strstr(program->Shaders[MESA_SHADER_FRAGMENT]->Source,
-//                    "gl_FragColor = color * texture2D(sampler, outTexCoords).a;")) {
-//            if (i == MESA_SHADER_VERTEX) {
-//               for (unsigned i = 0; i < program->Attributes->NumParameters; i++) {
-//                  const gl_program_parameter & attribute = program->Attributes->Parameters[i];
-//                  ALOGD("attribute '%s': location=%d slots=%d \n", attribute.Name, attribute.Location, attribute.Slots);
-//               }
-//               for (unsigned i = 0; i < program->Varying->NumParameters; i++) {
-//                  const gl_program_parameter & varying = program->Varying->Parameters[i];
-//                  ALOGD("varying '%s': vs_location=%d fs_location=%d \n", varying.Name, varying.BindLocation, varying.Location);
-//               }
-//               ALOGD("%s", program->Shaders[MESA_SHADER_VERTEX]->Source);
-//               module->dump();
-//            }
-//         }
-
-//#ifdef __arm__
-//         fputs("end of bcc disassembly", stderr);
-//         fclose(stderr);
-//
-//         file = fopen(fileName, "r");
-//         assert(file);
-//         fseek(file , 0 , SEEK_END);
-//         long lSize = ftell(file);
-//         rewind(file);
-//         assert(0 <= lSize);
-//         static char str[256];
-//         while (!feof(file)) {
-//            fgets(str, sizeof(str) - 1, file);
-//            str[sizeof(str) - 1] = 0;
-//            ALOGD("%s", str);
-//         }
-//         fclose(file);
-//#endif
-
-#if USE_LLVM_SCANLINE
-         if (GL_FRAGMENT_SHADER == shader->Type) {
-            char scanlineName [SCANLINE_KEY_STRING_LEN] = {0};
-            GetScanlineKeyString(&shaderKey, scanlineName, sizeof scanlineName / sizeof *scanlineName);
-            GenerateScanLine(gglState, program, module, mainName, scanlineName);
-            CodeGen(instance, scanlineName, shader, program, gglState);
-         } else
-#endif
-            CodeGen(instance, mainName, shader, program, gglState);
-
-         shader->executable->instances[shaderKey] = instance;
-//         debug_printf("jit new shader '%s'(%p) \n", mainName, instance->function);
-      } else
-//         debug_printf("use cached shader %p \n", instance->function);
-         ;
-
-      shader->function  = instance->function;
-   }
-//   puts("pf2: GGLShaderUse end");
-
-//   assert(0);
-}
-
-static void ShaderUse(GGLInterface * iface, gl_shader_program * program)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   // so drawing calls will do nothing until ShaderUse with a program
-   SetShaderVerifyFunctions(iface);
-   if (!program) {
-      ctx->CurrentProgram = NULL;
-      return;
-   }
-
-   GGLShaderUse(ctx->bccCtx, &ctx->state, program);
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
-      if (!program->_LinkedShaders[i])
-         continue;
-      if (!program->_LinkedShaders[i]->function)
-         continue;
-      if (GL_VERTEX_SHADER == program->_LinkedShaders[i]->Type)
-         ctx->PickRaster(iface);
-      else if (GL_FRAGMENT_SHADER == program->_LinkedShaders[i]->Type)
-         ctx->PickScanLine(iface);
-      else
-         assert(0);
-   }
-   ctx->CurrentProgram = program;
-}
-
-unsigned GGLShaderDetach(gl_shader_program * program, gl_shader * shader)
-{
-   for (unsigned i = 0; i < program->NumShaders; i++)
-      if (program->Shaders[i] == shader) {
-         program->NumShaders--;
-         // just swap end to deleted shader
-         program->Shaders[i] = program->Shaders[program->NumShaders];
-         shader->RefCount--;
-         if (1 == shader->RefCount && shader->DeletePending)
-            GGLShaderDelete(shader);
-         return GL_NO_ERROR;
-      }
-   return (GL_INVALID_OPERATION);
-}
-
-static void ShaderDetach(const GGLInterface * iface, gl_shader_program * program,
-                         gl_shader * shader)
-{
-   unsigned error = GGLShaderDetach(program, shader);
-   if (GL_NO_ERROR != error)
-      gglError(error);
-}
-
-void GGLShaderProgramDelete(gl_shader_program * program)
-{
-   for (unsigned i = 0; i < program->NumShaders; i++) {
-      GGLShaderDelete(program->Shaders[i]); // actually just mark for delete
-      GGLShaderDetach(program, program->Shaders[i]); // detach will delete if ref == 1
-      i--; // GGLShaderDetach just swaps end to detached shader
-   }
-
-   for (unsigned i = 0; i < MESA_SHADER_TYPES; i++)
-      GGLShaderDelete(program->_LinkedShaders[i]);
-
-   hieralloc_free(program);
-}
-
-static void ShaderProgramDelete(GGLInterface * iface, gl_shader_program * program)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram == program) {
-      ctx->CurrentProgram = NULL;
-      SetShaderVerifyFunctions(iface);
-   }
-   GGLShaderProgramDelete(program);
-}
-
-void GGLShaderGetiv(const gl_shader_t * shader, const GLenum pname, GLint * params)
-{
-   switch (pname) {
-   case GL_SHADER_TYPE:
-      *params = shader->Type;
-      break;
-   case GL_DELETE_STATUS:
-      *params = shader->DeletePending;
-      break;
-   case GL_COMPILE_STATUS:
-      *params = shader->CompileStatus;
-      break;
-   case GL_INFO_LOG_LENGTH:
-      *params = shader->InfoLog ? strlen(shader->InfoLog) + 1 : 0;
-      break;
-   case GL_SHADER_SOURCE_LENGTH:
-      *params = shader->Source ? strlen(shader->Source) + 1 : 0;
-      break;
-   default:
-      assert(0);
-      break;
-   }
-}
-
-void GGLShaderGetInfoLog(const gl_shader_t * shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
-   unsigned len = 0;
-   infolog[0] = 0;
-   if (shader->InfoLog)
-   {
-      len = strlen(shader->InfoLog);
-      strncpy(infolog, shader->InfoLog, bufsize);
-      infolog[bufsize] = 0;
-   }
-   if (length)
-      *length = strlen(infolog);
-}
-
-void GGLShaderProgramGetiv(const gl_shader_program_t * program, const GLenum pname, GLint * params)
-{
-   switch (pname) {
-   case GL_DELETE_STATUS:
-      *params = program->DeletePending;
-      break;
-   case GL_LINK_STATUS:
-      *params = program->LinkStatus;
-      break;
-   case GL_VALIDATE_STATUS:
-      *params = program->LinkStatus;
-      break;
-   case GL_INFO_LOG_LENGTH:
-      *params = program->InfoLog ? strlen(program->InfoLog) + 1 : 0;
-      break;
-   case GL_ATTACHED_SHADERS:
-      *params = program->NumShaders;
-      break;
-   case GL_ACTIVE_ATTRIBUTES:
-      *params = program->AttributeSlots;
-      break;
-   case GL_ACTIVE_UNIFORMS:
-      *params = program->Uniforms->Slots;
-      break;
-   case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:
-   case GL_ACTIVE_UNIFORM_MAX_LENGTH:
-      printf("pf2:GGLShaderProgramGetiv not implemented: %d \n", pname);
-   default:
-      assert(0);
-      break;
-   }
-}
-
-void GGLShaderProgramGetInfoLog(const gl_shader_program_t * program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
-   unsigned len = 0;
-   infolog[0] = 0;
-   if (program->InfoLog)
-   {
-      len = strlen(program->InfoLog);
-      strncpy(infolog, program->InfoLog, bufsize);
-      infolog[bufsize] = 0;
-   }
-   if (length)
-      *length = strlen(infolog);
-}
-
-void GGLShaderAttributeBind(const gl_shader_program * program, GLuint index, const GLchar * name)
-{
-   int i = _mesa_add_parameter(program->Attributes, name);
-   program->Attributes->Parameters[i].BindLocation = index;
-}
-
-GLint GGLShaderAttributeLocation(const gl_shader_program * program, const char * name)
-{
-   int i = _mesa_get_parameter(program->Attributes, name);
-   if (i >= 0)
-      return program->Attributes->Parameters[i].Location;
-   return -1;
-}
-
-GLint GGLShaderVaryingLocation(const gl_shader_program_t * program,
-                               const char * name, GLint * vertexOutputLocation)
-{
-   for (unsigned int i = 0; i < program->Varying->NumParameters; i++)
-      if (!strcmp(program->Varying->Parameters[i].Name, name)) {
-         if (vertexOutputLocation)
-            *vertexOutputLocation = program->Varying->Parameters[i].BindLocation;
-         return program->Varying->Parameters[i].Location;
-      }
-   return -1;
-}
-
-GLint GGLShaderUniformLocation(const gl_shader_program * program,
-                               const char * name)
-{
-   for (unsigned i = 0; i < program->Uniforms->NumUniforms; i++)
-      if (!strcmp(program->Uniforms->Uniforms[i].Name, name))
-         return i;
-   return -1;
-}
-
-void GGLShaderUniformGetfv(gl_shader_program * program, GLint location, GLfloat * params)
-{
-   assert(0 <= location && program->Uniforms->NumUniforms > location);
-   int index = program->Uniforms->Uniforms[location].Pos;
-   assert(0 <= index && program->Uniforms->Slots > index);
-   memcpy(params, program->ValuesUniform + index, sizeof(*program->ValuesUniform));
-}
-
-void GGLShaderUniformGetiv(gl_shader_program * program, GLint location, GLint * params)
-{
-   assert(0 <= location && program->Uniforms->NumUniforms > location);
-   int index = program->Uniforms->Uniforms[location].Pos;
-   assert(0 <= index && program->Uniforms->Slots > index);
-   const float * uniform = program->ValuesUniform[index];
-   params[0] = uniform[0];
-   params[1] = uniform[1];
-   params[2] = uniform[2];
-   params[3] = uniform[3];
-}
-
-void GGLShaderUniformGetSamplers(const gl_shader_program_t * program,
-                                 int sampler2tmu[GGL_MAXCOMBINEDTEXTUREIMAGEUNITS])
-{
-//   ALOGD("%s", program->Shaders[MESA_SHADER_FRAGMENT]->Source);
-//   for (unsigned i = 0; i < program->Uniforms->Slots + program->Uniforms->SamplerSlots; i++)
-//      ALOGD("%d: %.2f \t %.2f \t %.2f \t %.2f", i, program->ValuesUniform[i][0], program->ValuesUniform[i][1],
-//           program->ValuesUniform[i][2], program->ValuesUniform[i][3]);
-   for (unsigned i = 0; i < GGL_MAXCOMBINEDTEXTUREIMAGEUNITS; i++)
-      sampler2tmu[i] = -1;
-   for (unsigned i = 0; i < program->Uniforms->NumUniforms; i++) {
-      const gl_uniform & uniform = program->Uniforms->Uniforms[i];
-      if (uniform.Type->is_sampler()) {
-//         ALOGD("%d uniform.Pos=%d tmu=%d", program->Uniforms->Slots, uniform.Pos, (int)program->ValuesUniform[program->Uniforms->Slots + uniform.Pos][0]);
-         sampler2tmu[uniform.Pos] = program->ValuesUniform[program->Uniforms->Slots + uniform.Pos][0];
-      } else if (uniform.Type->is_array() && uniform.Type->fields.array->is_sampler())
-         assert(0);
-   }
-}
-
-GLint GGLShaderUniform(gl_shader_program * program, GLint location, GLsizei count,
-                       const GLvoid *values, GLenum type)
-{
-//   ALOGD("pf2: GGLShaderUniform location=%d count=%d type=0x%.4X", location, count, type);
-   // TODO: sampler uniform and type checking
-   if (!program) {
-      //gglError(GL_INVALID_OPERATION);
-      return -2;
-   }
-   if (-1 == location)
-      return -1;
-   assert(0 <= location && program->Uniforms->NumUniforms > location);
-   const gl_uniform & uniform = program->Uniforms->Uniforms[location];
-   int start = -1;
-   if (uniform.Type->is_sampler())
-   {
-      start = uniform.Pos + program->Uniforms->Slots;
-      assert(GL_INT == type && 1 == count);
-      program->ValuesUniform[start][0] = *(float *)values;
-      return uniform.Pos;
-   }
-   else if (uniform.Type->is_array() && uniform.Type->fields.array->is_sampler()) {
-      assert(0); // not implemented
-   } else
-      start = uniform.Pos;
-   int slots = 0, elems = 0;
-   switch (type) {
-   case GL_INT:
-   case GL_FLOAT:
-   case  GL_BOOL:
-      slots = count;
-      elems = 1;
-      break;
-   case GL_FLOAT_VEC2: // fall through
-   case  GL_INT_VEC2: // fall through
-   case  GL_BOOL_VEC2:
-      slots = count;
-      elems = 2;
-      break;
-   case  GL_INT_VEC3: // fall through
-   case  GL_BOOL_VEC3: // fall through
-   case  GL_FLOAT_VEC3: // fall through
-      slots = count;
-      elems = 3;
-      break;
-   case  GL_INT_VEC4: // fall through
-   case  GL_FLOAT_VEC4: // fall through
-   case  GL_BOOL_VEC4: // fall through
-      slots = count;
-      elems = 4;
-      break;
-   default:
-      assert(0);
-   }
-//   ALOGD("pf2: GGLShaderUniform start=%d slots=%d elems=%d", start, slots, elems);
-   if (0 > start)
-      assert(0);
-   if (start + slots > program->Uniforms->Slots)
-      assert(0);
-   for (int i = 0; i < slots; i++)
-      memcpy(program->ValuesUniform + start + i, values, elems * sizeof(float));
-//   ALOGD("pf2: GGLShaderUniform copied");
-   return -2;
-}
-
-void GGLShaderUniformMatrix(gl_shader_program * program, GLint cols, GLint rows,
-                            GLint location, GLsizei count, GLboolean transpose, const GLfloat *values)
-{
-   if (location == -1)
-      return;
-   assert(!transpose);
-   assert(cols == rows);
-   assert(0 <= location && program->Uniforms->NumUniforms > location);
-   int start = program->Uniforms->Uniforms[location].Pos;
-   unsigned slots = cols * count;
-   if (start < 0 || start + slots > program->Uniforms->Slots)
-      return gglError(GL_INVALID_OPERATION);
-   for (unsigned i = 0; i < slots; i++) {
-      float * column = program->ValuesUniform[start + i];
-      for (unsigned j = 0; j < rows; j++)
-         column[j] = values[i * 4 + j];
-   }
-
-//   if (!strstr(program->Shaders[MESA_SHADER_FRAGMENT]->Source,
-//               "gl_FragColor = color * texture2D(sampler, outTexCoords).a;"))
-//      return;
-//
-//   ALOGD("pf2: GGLShaderUniformMatrix location=%d cols=%d count=%d", location, cols, count);
-//
-//   for (unsigned i = 0; i < 4; i++)
-//      ALOGD("pf2: GGLShaderUniformMatrix %.2f \t %.2f \t %.2f \t %.2f \n", values[i * 4 + 0],
-//           values[i * 4 + 1], values[i * 4 + 2], values[i * 4 + 3]);
-
-}
-
-static void ShaderVerifyProcessVertex(const GGLInterface * iface, const VertexInput * input,
-                                      VertexOutput * output)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram) {
-      ShaderUse(const_cast<GGLInterface *>(iface), ctx->CurrentProgram);
-      if (ShaderVerifyProcessVertex != iface->ProcessVertex)
-         iface->ProcessVertex(iface, input, output);
-   }
-}
-
-static void ShaderVerifyDrawTriangle(const GGLInterface * iface, const VertexInput * v0,
-                                     const VertexInput * v1, const VertexInput * v2)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram) {
-      ShaderUse(const_cast<GGLInterface *>(iface), ctx->CurrentProgram);
-      if (ShaderVerifyDrawTriangle != iface->DrawTriangle)
-         iface->DrawTriangle(iface, v0, v1, v2);
-   }
-}
-
-static void ShaderVerifyRasterTriangle(const GGLInterface * iface, const VertexOutput * v1,
-                                       const VertexOutput * v2, const VertexOutput * v3)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram) {
-      ShaderUse(const_cast<GGLInterface *>(iface), ctx->CurrentProgram);
-      if (ShaderVerifyRasterTriangle != iface->RasterTriangle)
-         iface->RasterTriangle(iface, v1, v2, v3);
-   }
-}
-
-static void ShaderVerifyRasterTrapezoid(const GGLInterface * iface, const VertexOutput * tl,
-                                        const VertexOutput * tr, const VertexOutput * bl,
-                                        const VertexOutput * br)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram) {
-      ShaderUse(const_cast<GGLInterface *>(iface), ctx->CurrentProgram);
-      if (ShaderVerifyRasterTrapezoid != iface->RasterTrapezoid)
-         iface->RasterTrapezoid(iface, tl, tr, bl, br);
-   }
-}
-
-static void ShaderVerifyScanLine(const GGLInterface * iface, const VertexOutput * v1,
-                                 const VertexOutput * v2)
-{
-   GGL_GET_CONST_CONTEXT(ctx, iface);
-   if (ctx->CurrentProgram) {
-      ShaderUse(const_cast<GGLInterface *>(iface), ctx->CurrentProgram);
-      if (ShaderVerifyScanLine != iface->ScanLine)
-         iface->ScanLine(iface, v1, v2);
-   }
-}
-
-// called after state changes so that drawing calls will trigger JIT
-void SetShaderVerifyFunctions(struct GGLInterface * iface)
-{
-   iface->ProcessVertex = ShaderVerifyProcessVertex;
-   iface->DrawTriangle = ShaderVerifyDrawTriangle;
-   iface->RasterTriangle = ShaderVerifyRasterTriangle;
-   iface->RasterTrapezoid = ShaderVerifyRasterTrapezoid;
-   iface->ScanLine = ShaderVerifyScanLine;
-}
-
-void InitializeShaderFunctions(struct GGLInterface * iface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   bcc::init::Initialize();
-
-   ctx->bccCtx = new bcc::BCCContext();
-
-   iface->ShaderCreate = ShaderCreate;
-   iface->ShaderSource = GGLShaderSource;
-   iface->ShaderCompile = ShaderCompile;
-   iface->ShaderDelete = ShaderDelete;
-   iface->ShaderProgramCreate = ShaderProgramCreate;
-   iface->ShaderAttach = ShaderAttach;
-   iface->ShaderDetach = ShaderDetach;
-   iface->ShaderProgramLink = ShaderProgramLink;
-   iface->ShaderUse = ShaderUse;
-   iface->ShaderProgramDelete = ShaderProgramDelete;
-   iface->ShaderGetiv = GGLShaderGetiv;
-   iface->ShaderGetInfoLog = GGLShaderGetInfoLog;
-   iface->ShaderProgramGetiv = GGLShaderProgramGetiv;
-   iface->ShaderProgramGetInfoLog = GGLShaderProgramGetInfoLog;
-   iface->ShaderAttributeBind = GGLShaderAttributeBind;
-   iface->ShaderAttributeLocation = GGLShaderAttributeLocation;
-   iface->ShaderVaryingLocation = GGLShaderVaryingLocation;
-   iface->ShaderUniformLocation = GGLShaderUniformLocation;
-   iface->ShaderUniformGetfv = GGLShaderUniformGetfv;
-   iface->ShaderUniformGetiv = GGLShaderUniformGetiv;
-   iface->ShaderUniformGetSamplers = GGLShaderUniformGetSamplers;
-   iface->ShaderUniform = GGLShaderUniform;
-   iface->ShaderUniformMatrix = GGLShaderUniformMatrix;
-}
-
-void DestroyShaderFunctions(GGLInterface * iface)
-{
-   GGL_GET_CONTEXT(ctx, iface);
-   _mesa_glsl_release_types();
-   _mesa_glsl_release_functions();
-   delete ctx->bccCtx;
-   ctx->bccCtx = NULL;
-}
diff --git a/src/pixelflinger2/texture.cpp b/src/pixelflinger2/texture.cpp
deleted file mode 100644
index 0925f4e..0000000
--- a/src/pixelflinger2/texture.cpp
+++ /dev/null
@@ -1,426 +0,0 @@
-/** 
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License"); 
- ** you may not use this file except in compliance with the License. 
- ** You may obtain a copy of the License at 
- **
- **     http://www.apache.org/licenses/LICENSE-2.0 
- **
- ** Unless required by applicable law or agreed to in writing, software 
- ** distributed under the License is distributed on an "AS IS" BASIS, 
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- ** See the License for the specific language governing permissions and 
- ** limitations under the License.
- */
-
-#include "texture.h"
-
-#include <assert.h>
-#include <string.h>
-#include <math.h>
-
-#include "pixelflinger2.h"
-
-#if USE_LLVM_EXECUTIONENGINE
-#include <llvm/Module.h>
-#include <llvm/ExecutionEngine/JIT.h>
-#include <llvm/DerivedTypes.h>
-#endif
-
-#if !USE_LLVM_TEXTURE_SAMPLER
-
-const struct GGLContext * textureGGLContext;
-
-union Pixel { unsigned char channels[4]; unsigned int val; };
-
-static inline void PixelRGBAToVector4 (const Pixel *pixel, Vector4 * color)  __attribute__((always_inline));
-static inline void PixelRGBAToVector4 (const Pixel *pixel, Vector4 * color)
-{
-#if defined(__ARM_HAVE_NEON) && USE_NEON
-    int32x4_t c;
-    c = vsetq_lane_s32(pixel->channels[0], c, 0);
-    c = vsetq_lane_s32(pixel->channels[1], c, 1);
-    c = vsetq_lane_s32(pixel->channels[2], c, 2);
-    c = vsetq_lane_s32(pixel->channels[3], c, 3);
-    color->f4 = vcvtq_f32_s32(c);
-    color->f4 = vmulq_n_f32(color->f4, 1 / 255.0f);
-#else
-	color->r = (float)pixel->channels[0] / 255;
-	color->g = (float)pixel->channels[1] / 255;
-	color->b = (float)pixel->channels[2] / 255;
-	color->a = (float)pixel->channels[3] / 255;
-#endif
-}
-
-static inline void RGBAToVector4(const unsigned int rgba, Vector4 * color)
-{
-	PixelRGBAToVector4((const Pixel *)&rgba, color);
-}
-
-static inline void Lerp(Vec4<int> * a, Vec4<int> * b, int x, Vec4<int> * d)
-{
-    for (unsigned i = 0; i < 4; i++)
-    {
-        int r = b->i[i] - a->i[i], s = a->i[i];
-        d->i[i] = (r * x >> 16) + s;
-    }
-}
-
-static inline void ToIntVec(Vec4<int> * a)
-{
-    a->u[3] = a->u[0] >> 24;
-    a->u[2] = (a->u[0] >> 16) & 0xff;
-    a->u[1] = (a->u[0] >> 8) & 0xff;
-    a->u[0] &= 0xff;
-}
-
-template<GGLPixelFormat format>
-static void PointSample(unsigned sample[4], const unsigned * data, const unsigned index)
-{
-    if (GGL_PIXEL_FORMAT_RGBA_8888 == format)
-        *sample = *(data + index);
-    else if (GGL_PIXEL_FORMAT_RGBX_8888 == format)
-    {
-        *sample = *(data + index);
-        *sample |= 0xff000000;
-    }
-    else if (GGL_PIXEL_FORMAT_RGB_565 == format)
-    {
-        sample[0] = *((const unsigned short *)data + index);
-        sample[1] = (sample[0] & 0x7e0) << 5;
-        sample[2] = (sample[0] & 0xf800) << 8;
-        sample[0] = (sample[0] & 0x1f) << 3;
-        
-        sample[0] |= sample[0] >> 5;
-        sample[1] = (sample[1] | (sample[1] >> 6)) & 0xff00;
-        sample[2] = (sample[2] | (sample[2] >> 5)) & 0xff0000;
-        
-        sample[0] |= sample[1];
-        sample[0] |= sample[2];
-        sample[0] |= 0xff000000;
-    }
-    else if (GGL_PIXEL_FORMAT_UNKNOWN == format)
-        sample[0] = 0xff00ffff;
-    else 
-        assert(0);
-}
-
-static unsigned texcoordWrap(const unsigned wrap, float r, const unsigned size,
-                                    unsigned * lerp)
-{
-    const unsigned shift = 16;
-    unsigned odd = 0;
-    int tc;    
-
-    tc = r * (1 << shift);
-    
-    odd = tc & (1 << shift);
-    if (0 == wrap || 2 == wrap) // REPEAT or MIRRORED
-        tc &= (1 << shift) - 1; // only take mantissa
-    tc *= size - 1;
-    // TODO DXL linear filtering needs to be fixed for texcoord outside of [0,1]
-    *lerp = tc & ((1 << shift) - 1);
-    tc >>= shift;
-     
-    if (0 == wrap) // GL_REPEAT
-    { }
-    else if (1 == wrap) // GL_CLAMP_TO_EDGE
-        tc = MIN2(size - 1, MAX2(0, tc));
-    else if (2 == wrap)
-        tc = odd ? size - 1 - tc : tc;
-    else
-        assert(0);
-    return tc;
-}
-
-template<GGLPixelFormat format, ChannelType output, unsigned minMag, unsigned wrapS, unsigned wrapT>
-static void tex2d(unsigned sample[4], const float tex_coord[4], const unsigned sampler)
-{
-   const unsigned * data = (const unsigned *)textureGGLContext->textureState.textureData[sampler];
-   const unsigned width = textureGGLContext->textureState.textureDimensions[sampler * 2];
-	const unsigned height = textureGGLContext->textureState.textureDimensions[sampler * 2 + 1];
-    unsigned xLerp = 0, yLerp = 0;
-    const unsigned x0 = texcoordWrap(wrapS, tex_coord[0], width, &xLerp);
-    const unsigned y0 = texcoordWrap(wrapT, tex_coord[1], height, &yLerp);
-    
-    if (0 == minMag)
-    {
-        PointSample<format>(sample, data, y0 * width + x0);
-        sample[1] = (sample[0] & 0xff00) >> 8;
-        sample[2] = (sample[0] & 0xff0000) >> 16;
-        sample[3] = (sample[0] & 0xff000000) >> 24;
-        sample[0] &= 0xff;
-    }
-    else if (1 == minMag)
-    {
-        const unsigned x1 = MIN2(width - 1, x0 + 1), y1 = MIN2(height - 1, y0 + 1);
-        Vec4<int> samples[4] = {0};
-        PointSample<format>((unsigned *)(samples + 0), data, y0 * width + x0);
-        ToIntVec(samples + 0);
-        PointSample<format>((unsigned *)(samples + 1), data, y0 * width + x1);
-        ToIntVec(samples + 1);
-        PointSample<format>((unsigned *)(samples + 2), data, y1 * width + x1);
-        ToIntVec(samples + 2);
-        PointSample<format>((unsigned *)(samples + 3), data, y1 * width + x0);
-        ToIntVec(samples + 3);
-        
-        Lerp(samples + 0, samples + 1, xLerp, samples + 0);
-        Lerp(samples + 3, samples + 2, xLerp, samples + 3);
-        Lerp(samples + 0, samples + 3, yLerp, (Vec4<int> *)sample);
-    }
-    else
-        assert(0);
-    
-    if (Fixed0 == output) // i32 non vector
-        sample[0] = (sample[3] << 24) | (sample[2] << 16) | (sample[1] << 8) | sample[0];
-    else if (Fixed8 == output) // 4 x i32
-        ; // do nothing
-    else if (Fixed16 == output) // 4 x i32
-    {
-        sample[0] <<= 8; sample[1] <<= 8; sample[2] <<= 8; sample[3] <<= 8;
-    }
-    else if (Float == output) // 4 x float
-    {
-        float * fsample = (float *)sample;
-        fsample[0] = sample[0] / 255.0f; fsample[1] = sample[1] / 255.0f;
-        fsample[2] = sample[2] / 255.0f; fsample[3] = sample[3] / 255.0f;
-    }
-}
-
-template<GGLPixelFormat format, ChannelType output, unsigned minMag, unsigned wrapS, unsigned wrapT>
-void texcube(unsigned sample[4], const float tex_coord[4], const unsigned sampler)
-{
-    float mx = fabs(tex_coord[0]), my = fabs(tex_coord[1]), mz = fabs(tex_coord[2]);
-    float s = 0, t = 0, ma = 0;
-    unsigned face = 0;
-    if (mx > my && mx > mz)
-    {
-        if (tex_coord[0] >= 0)
-        {
-            s = -tex_coord[2];
-            t = -tex_coord[1];
-            face = 0;
-        }
-        else
-        {
-            s = tex_coord[2];
-            t = -tex_coord[1];
-            face = 1;
-        }
-        ma = mx;
-    }
-    else if (my > mx && my > mz)
-    {
-        if (tex_coord[1] >= 0)
-        {
-            s = tex_coord[0];
-            t = tex_coord[2];
-            face = 2;
-        }
-        else
-        {
-            s = tex_coord[0];
-            t = -tex_coord[2];
-            face = 3;
-        }
-        ma = my;
-    }
-    else
-    {
-        if (tex_coord[2] >= 0)
-        {
-            s = tex_coord[0];
-            t = -tex_coord[1];
-            face = 4;
-        }
-        else
-        {
-            s = -tex_coord[0];
-            t = -tex_coord[2];
-            face = 5;
-        }
-        ma = mz;
-    }
-    
-    s = (s / ma + 1) * 0.5f;
-    t = (t / ma + 1) * 0.5f;
-   
-    const unsigned * data = (const unsigned *)textureGGLContext->textureState.textureData[sampler];
-    const unsigned width = textureGGLContext->textureState.textureDimensions[sampler * 2];
-	const unsigned height = textureGGLContext->textureState.textureDimensions[sampler * 2 + 1];
-    unsigned xLerp = 0, yLerp = 0;
-    const unsigned x0 = texcoordWrap(wrapS, s, width, &xLerp);
-    const unsigned y0 = texcoordWrap(wrapT, t, height, &yLerp);
-    
-    if (0 == minMag)
-    {
-        PointSample<format>(sample, data, y0 * width + x0);
-        sample[1] = (sample[0] & 0xff00) >> 8;
-        sample[2] = (sample[0] & 0xff0000) >> 16;
-        sample[3] = (sample[0] & 0xff000000) >> 24;
-        sample[0] &= 0xff;
-    }
-    else if (1 == minMag)
-    {
-        const unsigned x1 = MIN2(width - 1, x0 + 1), y1 = MIN2(height - 1, y0 + 1);
-        Vec4<int> samples[4] = {0};
-        PointSample<format>((unsigned *)(samples + 0), data, face * width * height + y0 * width + x0);
-        ToIntVec(samples + 0);
-        PointSample<format>((unsigned *)(samples + 1), data, face * width * height + y0 * width + x1);
-        ToIntVec(samples + 1);
-        PointSample<format>((unsigned *)(samples + 2), data, face * width * height + y1 * width + x1);
-        ToIntVec(samples + 2);
-        PointSample<format>((unsigned *)(samples + 3), data, face * width * height + y1 * width + x0);
-        ToIntVec(samples + 3);
-        
-        Lerp(samples + 0, samples + 1, xLerp, samples + 0);
-        Lerp(samples + 3, samples + 2, xLerp, samples + 3);
-        Lerp(samples + 0, samples + 3, yLerp, (Vec4<int> *)sample);
-    }
-    else
-        assert(0);
-    
-    if (Fixed0 == output) // i32 non vector
-        sample[0] = (sample[3] << 24) | (sample[2] << 16) | (sample[1] << 8) | sample[0];
-    else if (Fixed8 == output) // 4 x i32
-        ; // do nothing
-    else if (Fixed16 == output) // 4 x i32
-    {
-        sample[0] <<= 8; sample[1] <<= 8; sample[2] <<= 8; sample[3] <<= 8;
-    }
-    else if (Float == output) // 4 x float
-    {
-        float * fsample = (float *)sample;
-        fsample[0] = sample[0] / 255.0f; fsample[1] = sample[1] / 255.0f;
-        fsample[2] = sample[2] / 255.0f; fsample[3] = sample[3] / 255.0f;
-    }
-    
-}
-
-#define TEXTURE_FUNCTION_ENTRY(target,format,output,filter,wrapS,wrapT) \
-{ #target"_"#format"_"#output"_"#filter"_"#wrapS"_"#wrapT, \
-target<GGL_PIXEL_FORMAT_##format, output, filter, wrapS, wrapT> },
-
-#define TEXTURE_FUNCTION_ENTRY_WRAPT(target,format,output,minMag,wrapS) \
-TEXTURE_FUNCTION_ENTRY(target,format,output,minMag,wrapS,0) \
-TEXTURE_FUNCTION_ENTRY(target,format,output,minMag,wrapS,1) \
-TEXTURE_FUNCTION_ENTRY(target,format,output,minMag,wrapS,2)
-
-#define TEXTURE_FUNCTION_ENTRY_WRAPS(target,format,output,minMag) \
-TEXTURE_FUNCTION_ENTRY_WRAPT(target,format,output,minMag,0) \
-TEXTURE_FUNCTION_ENTRY_WRAPT(target,format,output,minMag,1) \
-TEXTURE_FUNCTION_ENTRY_WRAPT(target,format,output,minMag,2)
-
-#define TEXTURE_FUNCTION_ENTRY_FILTER(target,format,output) \
-TEXTURE_FUNCTION_ENTRY_WRAPS(target,format,output,0) \
-TEXTURE_FUNCTION_ENTRY_WRAPS(target,format,output,1)
-
-#define TEXTURE_FUNCTION_ENTRY_OUTPUT(target,format) \
-TEXTURE_FUNCTION_ENTRY_FILTER(target,format,Float) \
-TEXTURE_FUNCTION_ENTRY_FILTER(target,format,Fixed16) \
-TEXTURE_FUNCTION_ENTRY_FILTER(target,format,Fixed8) \
-TEXTURE_FUNCTION_ENTRY_FILTER(target,format,Fixed0)
-
-#define TEXTURE_FUNCTION_ENTRY_FORMAT(target) \
-TEXTURE_FUNCTION_ENTRY_OUTPUT(target,RGBA_8888) \
-TEXTURE_FUNCTION_ENTRY_OUTPUT(target,RGBX_8888) \
-TEXTURE_FUNCTION_ENTRY_OUTPUT(target,RGB_565) \
-TEXTURE_FUNCTION_ENTRY_OUTPUT(target,UNKNOWN)
-
-#define TEXTURE_FUNCTION_ENTRIES \
-TEXTURE_FUNCTION_ENTRY_FORMAT(tex2d) \
-TEXTURE_FUNCTION_ENTRY_FORMAT(texcube)
-
-static struct TextureFunctionMapping
-{
-    const char * name;
-    void (* function)(unsigned sample[4], const float tex_coord[4], const unsigned int tex_id);
-} textureFunctionMapping [] = { TEXTURE_FUNCTION_ENTRIES };
-
-
-#undef TEXTURE_FUNCTION_ENTRY
-
-#endif //#if !USE_LLVM_TEXTURE_SAMPLER
-
-#if USE_LLVM_EXECUTIONENGINE && !USE_LLVM_TEXTURE_SAMPLER
-
-void DeclareTextureFunctions(llvm::Module * mod)
-{
-	llvm::LLVMContext & llvm_ctx = mod->getContext();
-    
-    std::vector<const llvm::Type*> funcArgs;
-    llvm::VectorType *vectorType = llvm::VectorType::get(llvm::Type::getFloatTy(llvm_ctx), 4);
-    llvm::PointerType * vectorPtr = llvm::PointerType::get(vectorType, 0);
-	
-    funcArgs.push_back(vectorPtr);
-	funcArgs.push_back(vectorPtr);
-	funcArgs.push_back(llvm::Type::getInt32Ty(llvm_ctx));
-	// void function(float[4], const float[4], unsigned)
-	
-    llvm::FunctionType *functionType = llvm::FunctionType::get(llvm::Type::getVoidTy(llvm_ctx),
-                                                   funcArgs,
-                                                   false);
-	    
-    for (unsigned i = 0; i < sizeof(textureFunctionMapping) / sizeof(*textureFunctionMapping); i++)
-    {
-        llvm::Function * func = llvm::cast<llvm::Function>(
-        mod->getOrInsertFunction(textureFunctionMapping[i].name, functionType));
-        func->setLinkage(llvm::GlobalValue::ExternalLinkage);
-        func->setCallingConv(llvm::CallingConv::C);
-    }
-}
-
-void AddTextureFunctionMappings(llvm::Module * mod, llvm::ExecutionEngine * ee)
-{
-    if (mod->getFunction("tex2d_soa"))
-        assert(0);//ee->addGlobalMapping(func, (void *)tex2d_soa);
-    
-    for (unsigned i = 0; i < sizeof(textureFunctionMapping) / sizeof(*textureFunctionMapping); i++)
-    {
-        llvm::Function * function = mod->getFunction(textureFunctionMapping[i].name);
-        if (function)
-            ee->updateGlobalMapping(function, (void *)textureFunctionMapping[i].function);
-    }
-}
-#endif // #if USE_LLVM_EXECUTIONENGINE && !USE_LLVM_TEXTURE_SAMPLER
-
-static void SetSampler(GGLInterface * iface, const unsigned sampler, GGLTexture * texture)
-{
-    assert(GGL_MAXCOMBINEDTEXTUREIMAGEUNITS > sampler);
-    GGL_GET_CONTEXT(ctx, iface);
-    if (!texture)
-        SetShaderVerifyFunctions(iface);
-    else if (ctx->state.textureState.textures[sampler].format != texture->format)
-        SetShaderVerifyFunctions(iface);
-    else if (ctx->state.textureState.textures[sampler].wrapS != texture->wrapS)
-        SetShaderVerifyFunctions(iface);
-    else if (ctx->state.textureState.textures[sampler].wrapT != texture->wrapT)
-        SetShaderVerifyFunctions(iface);
-    else if (ctx->state.textureState.textures[sampler].minFilter != texture->minFilter)
-        SetShaderVerifyFunctions(iface);
-    else if (ctx->state.textureState.textures[sampler].magFilter != texture->magFilter)
-        SetShaderVerifyFunctions(iface);
-             
-    if (texture)
-    {
-        ctx->state.textureState.textures[sampler] = *texture; // shallow copy, data pointed to must remain valid 
-        //ctx->state.textureState.textureData[sampler] = texture->levels[0];
-        ctx->state.textureState.textureData[sampler] = texture->levels;
-        ctx->state.textureState.textureDimensions[sampler * 2] = texture->width;
-        ctx->state.textureState.textureDimensions[sampler * 2 + 1] = texture->height;
-    }
-    else
-    {
-        memset(ctx->state.textureState.textures + sampler, 0, sizeof(ctx->state.textureState.textures[sampler]));
-        ctx->state.textureState.textureData[sampler] = NULL;
-        ctx->state.textureState.textureDimensions[sampler * 2] = 0;
-        ctx->state.textureState.textureDimensions[sampler * 2 + 1] = 0;
-    }
-}
-
-void InitializeTextureFunctions(GGLInterface * iface)
-{
-    iface->SetSampler = SetSampler;
-}
\ No newline at end of file
diff --git a/src/pixelflinger2/texture.h b/src/pixelflinger2/texture.h
deleted file mode 100644
index a2b5407..0000000
--- a/src/pixelflinger2/texture.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/** 
- **
- ** Copyright 2010, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License"); 
- ** you may not use this file except in compliance with the License. 
- ** You may obtain a copy of the License at 
- **
- **     http://www.apache.org/licenses/LICENSE-2.0 
- **
- ** Unless required by applicable law or agreed to in writing, software 
- ** distributed under the License is distributed on an "AS IS" BASIS, 
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- ** See the License for the specific language governing permissions and 
- ** limitations under the License.
- */
-
-#ifndef _TEXTURE_H_
-#define _TEXTURE_H_
-
-#if !USE_LLVM_TEXTURE_SAMPLER
-
-namespace llvm 
-{
-    class Module;
-    class ExecutionEngine;
-};
-
-extern const struct GGLContext * textureGGLContext; // for getting wrap mode, dimensions, data
-
-void DeclareTextureFunctions(llvm::Module * mod);
-void AddTextureFunctionMappings(llvm::Module * mod, llvm::ExecutionEngine * ee);
-
-#include "pixelflinger2/pixelflinger2_format.h"
-
-template<GGLPixelFormat format>
-void tex2d_int32(unsigned sample[4], const float tex_coord[4], const unsigned sampler);
-
-#endif // #if !USE_LLVM_TEXTURE_SAMPLER
-
-void InitializeTextureFunctions(struct GGLInterface * iface);
-
-#endif // #ifndef _TEXTURE_H_
\ No newline at end of file
diff --git a/src/talloc/hieralloc.c b/src/talloc/hieralloc.c
deleted file mode 100644
index ba6e6f7..0000000
--- a/src/talloc/hieralloc.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Similar core function to LGPL licensed talloc from Samba
- */
-#define CHECK_ALLOCATION 0
-
-#include "hieralloc.h"
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#if CHECK_ALLOCATION
-#include <set>
-#endif
-
-typedef struct hieralloc_header
-{
-	unsigned beginMagic;
-	struct hieralloc_header * parent;
-	struct hieralloc_header * nextSibling, * prevSibling;
-	struct hieralloc_header * child;
-	const char * name;
-	unsigned size, childCount, refCount;
-	int (* destructor)(void *);
-	unsigned endMagic;
-} hieralloc_header_t;
-
-#define BEGIN_MAGIC() (13377331)
-#define END_MAGIC(header) ((unsigned)((const hieralloc_header_t *)header + 1) % 0x10000 | 0x13370000)
-
-static hieralloc_header_t hieralloc_global_header = {BEGIN_MAGIC(), 0, 0, 0, 0, "hieralloc_hieralloc_global_header", 0, 0 ,1, 0, 0x13370000};
-
-#if CHECK_ALLOCATION
-static std::set<void *> allocations;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-   
-// Returns 1 if it's a valid header
-static inline int check_header(const hieralloc_header_t * header)
-{
-   if (BEGIN_MAGIC() != header->beginMagic)
-      printf("*** hieralloc check_header fail: %p ***\n", header + 1); 
-	assert(BEGIN_MAGIC() == header->beginMagic);
-	if (&hieralloc_global_header == header)
-	{
-      assert(0x13370000 == header->endMagic);
-      return 1;
-   }
-	assert(END_MAGIC(header) == header->endMagic);
-   assert(!header->nextSibling || header->nextSibling->prevSibling == header);
-   assert(!header->nextSibling || header->nextSibling->parent == header->parent);
-   assert(!header->prevSibling || header->prevSibling->nextSibling == header);
-   assert(!header->prevSibling || header->prevSibling->parent == header->parent);
-	return 1;
-}
-
-static inline hieralloc_header_t * get_header(const void *ptr)
-{
-	hieralloc_header_t * header = (hieralloc_header_t *)(ptr) - 1;
-	check_header(header);
-	return header;
-}
-
-static void check_children(hieralloc_header_t * header)
-{
-   check_header(header);
-   unsigned childCount = 0;
-   hieralloc_header_t * child = header->child;
-   while (child)
-   {
-      childCount++;
-      check_children(child);
-      child = child->nextSibling;
-   }
-   assert(childCount == header->childCount);
-}
-
-
-// attach to parent and siblings
-static void add_to_parent(hieralloc_header_t * parent, hieralloc_header_t * header)
-{
-	assert(NULL == header->parent);
-	assert(NULL == header->prevSibling);
-	assert(NULL == header->nextSibling);
-
-	if (parent->child)
-   {
-//      hieralloc_header_t * child = parent->child;
-//      while (child)
-//      {
-//         assert(child != header);
-//         child = child->nextSibling;
-//      }
-		parent->child->prevSibling = header;
-   }
-	header->nextSibling = parent->child;
-	header->prevSibling = NULL;
-	header->parent = parent;
-	parent->child = header;
-	parent->childCount++;
-   
-   assert(!header->nextSibling || header->nextSibling->prevSibling == header);
-   assert(!header->nextSibling || header->nextSibling->parent == header->parent);
-   assert(!header->prevSibling || header->prevSibling->nextSibling == header);
-   assert(!header->prevSibling || header->prevSibling->parent == header->parent);
-}
-
-// detach from parent and siblings
-static void remove_from_parent(hieralloc_header_t * header)
-{
-   hieralloc_header_t * parent = header->parent;
-	hieralloc_header_t * sibling = header->prevSibling;
-   assert(!header->nextSibling || header->nextSibling->prevSibling == header);
-   assert(!header->nextSibling || header->nextSibling->parent == header->parent);
-   assert(!header->prevSibling || header->prevSibling->nextSibling == header);
-   assert(!header->prevSibling || header->prevSibling->parent == header->parent);
-	if (sibling)
-	{
-      if (sibling->nextSibling != header)
-      {
-         printf("&sibling->nextSibling=%p &header=%p \n", &sibling->nextSibling, &header);
-			printf("sibling->nextSibling=%p header=%p \n", sibling->nextSibling, header);
-      }
-		sibling->nextSibling = header->nextSibling;
-		if (header->nextSibling)
-			header->nextSibling->prevSibling = sibling;
-		header->prevSibling = NULL;
-		header->nextSibling = NULL;
-	}
-	else
-	{
-      assert(parent->child == header);
-		parent->child = header->nextSibling;
-		if (header->nextSibling)
-			header->nextSibling->prevSibling = NULL;
-		header->nextSibling = NULL;
-	}
-	header->parent = NULL;
-	parent->childCount--;
-}
-
-// allocate memory and attach to parent context and siblings
-void * hieralloc_allocate(const void * context, unsigned size, const char * name)
-{
-	hieralloc_header_t * ptr = (hieralloc_header_t *)malloc(size + sizeof(hieralloc_header_t));
-	assert(ptr);
-	memset(ptr, 0xcd, sizeof(*ptr));
-	ptr->beginMagic = BEGIN_MAGIC();
-   ptr->parent = ptr->child = ptr->prevSibling = ptr->nextSibling = NULL;
-	ptr->name = name;
-	ptr->size = size;
-	ptr->childCount = 0;
-	ptr->refCount = 1;
-   ptr->destructor = NULL;
-	ptr->endMagic = END_MAGIC(ptr);
-
-	hieralloc_header_t * parent = NULL;
-	if (!context)
-		parent = &hieralloc_global_header;
-	else
-		parent = get_header(context);
-	add_to_parent(parent, ptr);
-#if CHECK_ALLOCATION
-   assert(allocations.find(ptr + 1) == allocations.end());
-   allocations.insert(ptr + 1);
-#endif
-	return ptr + 1;
-}
-
-// (re)allocate memory and attach to parent context and siblings
-void * hieralloc_reallocate(const void * context, void * ptr, unsigned size, const char * name)
-{
-	if (NULL == ptr)
-		return hieralloc_allocate(context, size, name);
-#if CHECK_ALLOCATION
-   assert(allocations.find(ptr) != allocations.end());
-#endif
-	if (NULL == context)
-		context = &hieralloc_global_header + 1;
-
-	hieralloc_header_t * header = get_header(ptr);
-	hieralloc_header_t * parent = header->parent;
-
-	if (get_header(context) != get_header(ptr)->parent)
-	{
-		remove_from_parent(header);
-		parent = get_header(context);
-		add_to_parent(parent, header);
-	}
-
-	header = (hieralloc_header_t *)realloc(header, size + sizeof(hieralloc_header_t));
-	assert(header);
-	header->size = size;
-	header->name = name;
-	if (ptr == (header + 1))
-		return ptr; // realloc didn't move allocation
-   
-   header->beginMagic = BEGIN_MAGIC();
-	header->endMagic = END_MAGIC(header);
-   if (header->nextSibling)
-      header->nextSibling->prevSibling = header;
-	if (header->prevSibling)
-		header->prevSibling->nextSibling = header;
-	else
-		parent->child = header;
-
-	hieralloc_header_t * child = header->child;
-	while (child)
-	{
-		child->parent = header;
-		child = child->nextSibling;
-	}
-#if CHECK_ALLOCATION
-   allocations.erase(ptr);
-   assert(allocations.find(header + 1) == allocations.end());
-   allocations.insert(header + 1);
-#endif
-	return header + 1;
-}
-
-// calls destructor if set, and frees children.
-// if destructor returns -1, then do nothing and return -1.
-int hieralloc_free(void * ptr)
-{
-   if (!ptr)
-		return 0;
-
-   hieralloc_header_t * header = get_header(ptr);
-   
-	header->refCount--;
-	if (header->refCount > 0)
-		return -1;
-
-	if (header->destructor)
-		if (header->destructor(ptr))
-			return -1;
-
-   int ret = 0;
-   
-	//* TODO: implement reference and steal first
-	hieralloc_header_t * child = header->child;
-	while (child)
-	{
-		hieralloc_header_t * current = child;
-		assert(!current->prevSibling);
-      child = child->nextSibling;
-		if (hieralloc_free(current + 1))
-		{
-			ret = -1;
-			remove_from_parent(current);
-			add_to_parent(header->parent, current);
-         assert(0); // shouldn't happen since reference is always 1
-		}
-      
-	}
-   
-	if (ret)
-		return -1;
-
-   assert(0 == header->childCount);
-   assert(!header->child);
-	remove_from_parent(header);
-   memset(header, 0xfe, header->size + sizeof(*header));
-#if CHECK_ALLOCATION
-   assert(allocations.find(ptr) != allocations.end());
-   allocations.erase(ptr);
-   // don't free yet to force allocations to new addresses for checking double freeing
-#else
-   free(header); 
-#endif
-	return 0;
-}
-
-// not implemented from talloc_reference
-void * hieralloc_reference(const void * ref_ctx, const void * ptr)
-{
-   return (void *)ptr;
-}
-
-// not implemented from talloc_unlink
-int hieralloc_unlink(const void * ctx, void *ptr)
-{
-	if (!ptr)
-		return -1;
-	//assert(get_header(ptr)->refCount > 0);
-	//get_header(ptr)->refCount--;
-	return 0;
-}
-
-// moves allocation to new parent context; maintain children but update siblings
-// returns ptr on success
-void * hieralloc_steal(const void * new_ctx, const void * ptr)
-{
-	hieralloc_header_t * header = get_header(ptr);
-	remove_from_parent(header);
-	add_to_parent(get_header(new_ctx), header);
-	return (void *)ptr;
-}
-
-// creates 0 allocation to be used as parent context
-void * hieralloc_init(const char * name)
-{
-	return hieralloc_allocate(NULL, 0, name);
-}
-
-// returns global context
-void * hieralloc_autofree_context()
-{
-	return &hieralloc_global_header + 1;
-}
-
-// sets destructor to be called before freeing; dctor return -1 aborts free
-void hieralloc_set_destructor(const void * ptr, int (* destructor)(void *))
-{
-	get_header(ptr)->destructor = destructor;
-}
-
-// gets parent context of allocated memory
-void * hieralloc_parent(const void * ptr)
-{
-	const hieralloc_header_t * header = get_header(ptr);
-	return header->parent + 1;
-}
-
-// allocate and zero memory
-void * _hieralloc_zero(const void * ctx, unsigned size, const char * name)
-{
-	void *p = hieralloc_allocate(ctx, size, name);
-	if (p)
-		memset(p, 0, size);
-	return p;
-}
-
-// allocate and copy
-char * hieralloc_strndup(const void * ctx, const char * str, unsigned len)
-{
-	if (!str)
-		return NULL;
-	
-    const char *p = (const char *)memchr(str, '\0', len);
-    len = (p ? p - str : len);
-    char * ret = (char *)hieralloc_allocate(ctx, len + 1, str);
-	if (!ret)
-		return NULL;
-	memcpy(ret, str, len);
-	ret[len] = 0;
-   get_header(ret)->name = ret;
-	return ret;
-}
-
-// allocate and copy
-char * hieralloc_strdup(const void * ctx, const char * str)
-{
-	if (!str)
-		return NULL;
-	return hieralloc_strndup(ctx, str, strlen(str));
-}
-
-static char * _hieralloc_strlendup_append(char * str, unsigned len,
-        const char * append, unsigned appendLen)
-{
-	//char * ret = hieralloc_allocate(str, sizeof(char) * (len + appendLen + 1), str);
-	//memcpy(ret, str, len);
-	hieralloc_header_t * header = get_header(str);
-	char * ret = (char *)hieralloc_reallocate(header->parent + 1, str, sizeof(char) * (len + appendLen + 1), str);
-	if (!ret)
-		return NULL;
-	memcpy(ret + len, append, appendLen);
-	ret[len + appendLen] = 0;
-	get_header(ret)->name = ret;
-	return ret;
-}
-
-// reallocate and append
-char * hieralloc_strdup_append(char * str, const char * append)
-{
-	if (!str)
-		return hieralloc_strdup(NULL, append);
-	if (!append)
-		return str;
-	return _hieralloc_strlendup_append(str, strlen(str), append, strlen(append));
-}
-
-// reallocate and append
-char * hieralloc_strndup_append(char * str, const char * append, unsigned len)
-{
-	if (!str)
-		return hieralloc_strdup(NULL, append);
-	if (!append)
-		return str;
-    const char *p = (const char *)memchr(append, '\0', len);
-    len = (p ? p - append : len);
-	return _hieralloc_strlendup_append(str, strlen(str), append, len);
-}
-
-// allocate and vsprintf
-char * hieralloc_vasprintf(const void * ctx, const char * fmt, va_list va)
-{
-	va_list va2;
-	va_copy(va2, va);
-	char c = 0;
-	int len = vsnprintf(&c, 1, fmt, va2); // count how many chars would be printed
-	va_end(va2);
-
-	assert(len >= 0); // some vsnprintf may return -1
-	if (len < 0)
-		return NULL;
-
-	char * ret = (char *)hieralloc_allocate(ctx, len + 1, fmt);
-	if (!ret)
-		return NULL;
-
-	va_copy(va2, va);
-	vsnprintf(ret, len + 1, fmt, va2);
-	va_end(va2);
-
-	get_header(ret)->name = ret;
-	return ret;
-}
-
-// allocate and sprintf
-char * hieralloc_asprintf(const void * ctx, const char * fmt, ...)
-{
-	va_list va;
-	va_start(va, fmt);
-	char * ret = hieralloc_vasprintf(ctx, fmt, va);
-	va_end(va);
-	return ret;
-}
-
-// reallocate and append vsprintf
-char * hieralloc_vasprintf_append(char * str, const char * fmt, va_list va)
-{
-	if (!str)
-		return hieralloc_vasprintf(NULL, fmt, va);
-	
-   int len = strlen(str);
-   va_list va2;
-	va_copy(va2, va);
-	char c = 0;
-	int appendLen = vsnprintf(&c, 1, fmt, va2); // count how many chars would be printed
-	va_end(va2);
-
-	assert(appendLen >= 0); // some vsnprintf may return -1
-	if (appendLen < 0)
-		return str;
-	str = (char *)hieralloc_reallocate(NULL, str, sizeof(char) * (len + appendLen + 1), str);
-	if (!str)
-		return NULL;
-
-	va_copy(va2, va);
-	vsnprintf(str + len, appendLen + 1, fmt, va2);
-	va_end(va2);
-
-	get_header(str)->name = str;
-	return str;
-}
-
-// reallocate and append sprintf
-char * hieralloc_asprintf_append(char * str, const char * fmt, ...)
-{
-	va_list va;
-	va_start(va, fmt);
-	str = hieralloc_vasprintf_append(str, fmt, va);
-	va_end(va);
-	return str;
-}
-
-static void _hieralloc_report(const hieralloc_header_t * header, FILE * file, unsigned tab)
-{
-	unsigned i = 0;
-	for (i = 0; i < tab; i++)
-		fputc(' ', file);
-	check_header(header);
-	fprintf(file, "%p: child=%d ref=%d size=%d dctor=%p name='%.256s' \n", header + 1,
-	        header->childCount, header->refCount, header->size, header->destructor, header->name);
-	const hieralloc_header_t * child = header->child;
-	while (child)
-	{
-		_hieralloc_report(child, file, tab + 2);
-		child = child->nextSibling;
-	}
-
-}
-
-// report self and child allocations
-void hieralloc_report(const void * ptr, FILE * file)
-{
-	if (NULL == ptr)
-		ptr = &hieralloc_global_header + 1;
-	fputs("hieralloc_report: \n", file);
-	_hieralloc_report(get_header(ptr), file, 0);
-}
-
-static void _hieralloc_report_brief(const hieralloc_header_t * header, FILE * file, unsigned * data)
-{
-	check_header(header);
-	data[0]++;
-	data[1] += header->size;
-	data[2] += header->childCount;
-	data[3] += header->refCount;
-	const hieralloc_header_t * child = header->child;
-	while (child)
-	{
-		_hieralloc_report_brief(child, file, data);
-		child = child->nextSibling;
-	}
-}
-
-void hieralloc_report_brief(const void * ptr, FILE * file)
-{
-	if (NULL == ptr)
-		ptr = &hieralloc_global_header + 1;
-	unsigned data [4] = {0};
-	_hieralloc_report_brief(get_header(ptr), file, data);
-	fprintf(file, "hieralloc_report %p total: count=%d size=%d child=%d ref=%d \n",
-		ptr, data[0], data[1], data[2], data[3]);
-}
-
-void hieralloc_report_lineage(const void * ptr, FILE * file, int tab)
-{
-   const hieralloc_header_t * header = get_header(ptr);
-   if (header->parent)
-      hieralloc_report_lineage(header->parent + 1, file, tab + 2);
-   for (tab; tab >=0; tab--)
-      fputc(' ', file);
-   fprintf(file, "hieralloc_report_lineage %p: size=%d child=%d ref=%d name='%s' parent=%p \n",
-      ptr, header->size, header->childCount, header->refCount, header->name, header->parent ? header->parent + 1 : NULL);
-}
-
-int hieralloc_find(const void * top, const void * ptr, FILE * file, int tab)
-{
-   int found = 0;
-   if (NULL == top)
-      top = &hieralloc_global_header + 1;
-   if (0 == tab && file)
-      fputs("hieralloc_find start \n", file);
-   if (top == ptr)
-   {
-      if (file)
-         fprintf(file, "hieralloc_found %p \n", ptr);
-      found++;
-   }
-   const hieralloc_header_t * start = get_header(top);
-   const hieralloc_header_t * child = start->child;
-	while (child)
-	{
-		found += hieralloc_find(child + 1, ptr, file, tab + 2);
-		child = child->nextSibling;
-	}
-   if (0 == tab && file)
-      fprintf(file, "hieralloc_find end found=%d \n", found);
-   return found;
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/src/talloc/hieralloc.h b/src/talloc/hieralloc.h
deleted file mode 100644
index 796a947..0000000
--- a/src/talloc/hieralloc.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Similar core function to LGPL licensed talloc from Samba
- */
-
-#ifndef _HIERALLOC_H_
-#define _HIERALLOC_H_
-
-#include <stdio.h>
-#include <stdarg.h>
-
-// allow __LINE__ to be stringified
-#ifndef __location__
-#define __HIERALLOC_STRING_0__(s)   #s
-#define __HIERALLOC_STRING_1__(s)   __HIERALLOC_STRING_0__(s)
-#define __HIERALLOC_STRING_2__      __HIERALLOC_STRING_1__(__LINE__)
-#define __location__                __FILE__ ":" __HIERALLOC_STRING_2__
-#endif
-
-#define hieralloc(ctx, type) (type *)hieralloc_allocate(ctx, sizeof(type), #type)
-#define hieralloc_size(ctx, size) hieralloc_allocate(ctx, size, "sz:"__location__)
-#define hieralloc_new(ctx) hieralloc_allocate(ctx, 0, "nw:" __location__)
-#define hieralloc_zero(ctx, type) (type *)_hieralloc_zero(ctx, sizeof(type), "zr:"#type)
-#define hieralloc_zero_size(ctx, size) _hieralloc_zero(ctx, size, "zrsz:"__location__)
-#define hieralloc_array(ctx, type, count) (type *)hieralloc_allocate(ctx, sizeof(type) * count, "ar:"#type)
-#define hieralloc_realloc(ctx, p, type, count) (type *)hieralloc_reallocate(ctx, p, sizeof(type) * count, "re:"#type)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-// allocate memory and attach to parent context and siblings
-void * hieralloc_allocate(const void * context, unsigned size, const char * name);
-
-// (re)allocate memory and attach to parent context and siblings
-void * hieralloc_reallocate(const void * context, void * ptr, unsigned size, const char * name);
-
-// calls destructor if set, and frees children.
-// if destructor returns -1, then do nothing and return -1.
-int hieralloc_free(void * ptr);
-
-// creates 0 allocation to be used as parent context
-void * hieralloc_init(const char * name);
-
-// returns global context
-void * hieralloc_autofree_context();
-
-// sets destructor to be called before freeing; dctor return -1 aborts free
-void hieralloc_set_destructor(const void * ptr, int (* destructor)(void *));
-
-// gets parent context of allocated memory
-void * hieralloc_parent(const void * ptr);
-
-// moves allocation to new parent context; maintain children but update siblings
-// returns ptr on success
-void * hieralloc_steal(const void * new_ctx, const void * ptr);
-
-// not implemented from talloc_reference
-void * hieralloc_reference(const void * ref_ctx, const void * ptr);
-
-// not implemented from talloc_unlink
-int hieralloc_unlink(const void * ctx, void * ptr);
-
-// allocate and zero memory
-void * _hieralloc_zero(const void * ctx, unsigned size, const char * name);
-
-// allocate and copy 
-char * hieralloc_strdup(const void * ctx, const char * str);
-
-// allocate and copy
-char * hieralloc_strndup(const void * ctx, const char * str, unsigned len);
-
-// reallocate and append
-char * hieralloc_strdup_append(char * str, const char * append);
-
-// reallocate and append
-char * hieralloc_strndup_append(char * str, const char * append, unsigned len);
-
-// allocate and vsprintf
-char * hieralloc_vasprintf(const void * ctx, const char * fmt, va_list va);
-
-// allocate and sprintf
-char * hieralloc_asprintf(const void * ctx, const char * fmt, ...);
-
-// reallocate and append vsprintf
-char * hieralloc_vasprintf_append(char * str, const char * fmt, va_list va);
-
-// reallocate and append sprintf
-char * hieralloc_asprintf_append(char * str, const char * fmt, ...);
-
-// report self and child allocations
-void hieralloc_report(const void * ptr, FILE * file);
-
-void hieralloc_report_brief(const void * ptr, FILE * file);
-
-void hieralloc_report_lineage(const void * ptr, FILE * file, int tab);
-
-int hieralloc_find(const void * top, const void * ptr, FILE * file, int tab);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif