summaryrefslogtreecommitdiff
path: root/dist/Mesa/src/glsl
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-09-05 14:07:04 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-09-05 14:07:04 +0000
commit821893da535a9c114e427454fe97ee8db13dafbd (patch)
tree5fac22b58520a25347ff8fada5894ca5c8a9b10c /dist/Mesa/src/glsl
parentd0da870fb1db8146fc38e88a1f9b10c37890c46c (diff)
Merge Mesa 9.2.0
Diffstat (limited to 'dist/Mesa/src/glsl')
-rw-r--r--dist/Mesa/src/glsl/.dir-locals.el3
-rw-r--r--dist/Mesa/src/glsl/Makefile214
-rw-r--r--dist/Mesa/src/glsl/Makefile.template50
-rw-r--r--dist/Mesa/src/glsl/SConscript101
-rw-r--r--dist/Mesa/src/glsl/ast.h403
-rw-r--r--dist/Mesa/src/glsl/ast_function.cpp927
-rw-r--r--dist/Mesa/src/glsl/ast_to_hir.cpp1957
-rw-r--r--dist/Mesa/src/glsl/ast_type.cpp157
-rw-r--r--dist/Mesa/src/glsl/autogen.sh12
-rw-r--r--dist/Mesa/src/glsl/builtin_function.cpp16065
-rw-r--r--dist/Mesa/src/glsl/builtin_stubs.cpp38
-rw-r--r--dist/Mesa/src/glsl/builtin_types.h302
-rw-r--r--dist/Mesa/src/glsl/builtin_variables.h110
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/abs41
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/acos22
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/acosh21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/all16
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/any16
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/asin109
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/asinh21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/atan128
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/atanh37
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/ceil21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/clamp148
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/cos21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/cosh30
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/cross9
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/dFdx21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/dFdy21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/degrees21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/distance31
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/dot25
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/equal73
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/exp21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/exp221
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/faceforward37
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/floor21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/fract22
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/ftransform9
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/fwidth29
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/greaterThan55
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/greaterThanEqual55
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/inversesqrt21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/length21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/lessThan55
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/lessThanEqual55
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/log21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/log221
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/matrixCompMult91
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/max127
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/min127
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/mix88
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/mod43
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/modf37
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/noise118
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/noise261
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/noise373
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/noise497
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/normalize21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/not16
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/notEqual73
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/outerProduct92
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/pow25
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/radians21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/reflect58
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/refract102
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/round21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/roundEven21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/sign42
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/sin21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/sinh30
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/smoothstep100
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/sqrt21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/step68
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/tan21
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/tanh42
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/transpose139
-rw-r--r--dist/Mesa/src/glsl/builtins/ir/trunc21
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/100.frag300
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/100.vert300
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/130.frag934
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/130.vert1025
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag47
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert46
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.frag7
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.vert7
-rw-r--r--dist/Mesa/src/glsl/builtins/profiles/OES_texture_3D.frag1
-rw-r--r--dist/Mesa/src/glsl/builtins/tools/generate_builtins.py79
-rw-r--r--dist/Mesa/src/glsl/builtins/tools/texture_builtins.py164
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp-lex.c739
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp-lex.l85
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp-parse.c2456
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp-parse.h151
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp-parse.y378
-rw-r--r--dist/Mesa/src/glsl/glcpp/glcpp.c60
-rw-r--r--dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c4
-rw-r--r--dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected7
-rw-r--r--dist/Mesa/src/glsl/glcpp/tests/glcpp-test25
-rw-r--r--dist/Mesa/src/glsl/glsl_lexer.cpp2632
-rw-r--r--dist/Mesa/src/glsl/glsl_lexer.ll405
-rw-r--r--dist/Mesa/src/glsl/glsl_parser.cpp6775
-rw-r--r--dist/Mesa/src/glsl/glsl_parser.h568
-rw-r--r--dist/Mesa/src/glsl/glsl_parser.yy3272
-rw-r--r--dist/Mesa/src/glsl/glsl_parser_extras.cpp769
-rw-r--r--dist/Mesa/src/glsl/glsl_parser_extras.h172
-rw-r--r--dist/Mesa/src/glsl/glsl_symbol_table.cpp118
-rw-r--r--dist/Mesa/src/glsl/glsl_types.cpp535
-rw-r--r--dist/Mesa/src/glsl/glsl_types.h183
-rw-r--r--dist/Mesa/src/glsl/ir.cpp382
-rw-r--r--dist/Mesa/src/glsl/ir.h614
-rw-r--r--dist/Mesa/src/glsl/ir_clone.cpp55
-rw-r--r--dist/Mesa/src/glsl/ir_constant_expression.cpp1316
-rw-r--r--dist/Mesa/src/glsl/ir_function.cpp64
-rw-r--r--dist/Mesa/src/glsl/ir_function_detect_recursion.cpp7
-rw-r--r--dist/Mesa/src/glsl/ir_hierarchical_visitor.h3
-rw-r--r--dist/Mesa/src/glsl/ir_hv_accept.cpp30
-rw-r--r--dist/Mesa/src/glsl/ir_optimization.h70
-rw-r--r--dist/Mesa/src/glsl/ir_print_visitor.cpp52
-rw-r--r--dist/Mesa/src/glsl/ir_print_visitor.h4
-rw-r--r--dist/Mesa/src/glsl/ir_reader.cpp232
-rw-r--r--dist/Mesa/src/glsl/ir_rvalue_visitor.cpp133
-rw-r--r--dist/Mesa/src/glsl/ir_set_program_inouts.cpp121
-rw-r--r--dist/Mesa/src/glsl/ir_validate.cpp246
-rw-r--r--dist/Mesa/src/glsl/ir_variable.cpp857
-rw-r--r--dist/Mesa/src/glsl/link_functions.cpp12
-rw-r--r--dist/Mesa/src/glsl/linker.cpp1292
-rw-r--r--dist/Mesa/src/glsl/linker.h140
-rw-r--r--dist/Mesa/src/glsl/loop_analysis.cpp44
-rw-r--r--dist/Mesa/src/glsl/loop_analysis.h25
-rw-r--r--dist/Mesa/src/glsl/lower_if_to_cond_assign.cpp144
-rw-r--r--dist/Mesa/src/glsl/lower_instructions.cpp182
-rw-r--r--dist/Mesa/src/glsl/lower_jumps.cpp323
-rw-r--r--dist/Mesa/src/glsl/lower_variable_index_to_cond_assign.cpp127
-rw-r--r--dist/Mesa/src/glsl/lower_vec_index_to_cond_assign.cpp187
-rw-r--r--dist/Mesa/src/glsl/lower_vec_index_to_swizzle.cpp37
-rw-r--r--dist/Mesa/src/glsl/main.cpp138
-rw-r--r--dist/Mesa/src/glsl/opt_constant_folding.cpp19
-rw-r--r--dist/Mesa/src/glsl/opt_constant_propagation.cpp31
-rw-r--r--dist/Mesa/src/glsl/opt_constant_variable.cpp22
-rw-r--r--dist/Mesa/src/glsl/opt_copy_propagation.cpp9
-rw-r--r--dist/Mesa/src/glsl/opt_copy_propagation_elements.cpp35
-rw-r--r--dist/Mesa/src/glsl/opt_dead_code_local.cpp159
-rw-r--r--dist/Mesa/src/glsl/opt_dead_functions.cpp7
-rw-r--r--dist/Mesa/src/glsl/opt_discard_simplification.cpp204
-rw-r--r--dist/Mesa/src/glsl/opt_function_inlining.cpp74
-rw-r--r--dist/Mesa/src/glsl/opt_if_simplification.cpp40
-rw-r--r--dist/Mesa/src/glsl/opt_redundant_jumps.cpp4
-rw-r--r--dist/Mesa/src/glsl/opt_structure_splitting.cpp58
-rw-r--r--dist/Mesa/src/glsl/opt_tree_grafting.cpp62
-rw-r--r--dist/Mesa/src/glsl/program.h27
-rw-r--r--dist/Mesa/src/glsl/ralloc.c58
-rw-r--r--dist/Mesa/src/glsl/s_expression.cpp36
152 files changed, 18793 insertions, 34485 deletions
diff --git a/dist/Mesa/src/glsl/.dir-locals.el b/dist/Mesa/src/glsl/.dir-locals.el
deleted file mode 100644
index be19e29a5..000000000
--- a/dist/Mesa/src/glsl/.dir-locals.el
+++ /dev/null
@@ -1,3 +0,0 @@
-((c-mode . ((c-basic-offset . 3)))
- (c++-mode . ((c-basic-offset . 3)))
-)
diff --git a/dist/Mesa/src/glsl/Makefile b/dist/Mesa/src/glsl/Makefile
deleted file mode 100644
index d1422c2a4..000000000
--- a/dist/Mesa/src/glsl/Makefile
+++ /dev/null
@@ -1,214 +0,0 @@
-
-#src/glsl/pp/Makefile
-
-TOP = ../..
-
-include $(TOP)/configs/current
-
-LIBNAME = glsl
-
-LIBGLCPP_SOURCES = \
- glcpp/glcpp-lex.c \
- glcpp/glcpp-parse.c \
- glcpp/pp.c
-
-GLCPP_SOURCES = \
- $(LIBGLCPP_SOURCES) \
- ralloc.c \
- glcpp/glcpp.c
-
-C_SOURCES = \
- strtod.c \
- ralloc.c \
- $(LIBGLCPP_SOURCES)
-
-CXX_SOURCES = \
- ast_expr.cpp \
- ast_function.cpp \
- ast_to_hir.cpp \
- ast_type.cpp \
- glsl_lexer.cpp \
- glsl_parser.cpp \
- glsl_parser_extras.cpp \
- glsl_types.cpp \
- glsl_symbol_table.cpp \
- hir_field_selection.cpp \
- ir_basic_block.cpp \
- ir_clone.cpp \
- ir_constant_expression.cpp \
- ir.cpp \
- ir_expression_flattening.cpp \
- ir_function_can_inline.cpp \
- ir_function_detect_recursion.cpp \
- ir_function.cpp \
- ir_hierarchical_visitor.cpp \
- ir_hv_accept.cpp \
- ir_import_prototypes.cpp \
- ir_print_visitor.cpp \
- ir_reader.cpp \
- ir_rvalue_visitor.cpp \
- ir_set_program_inouts.cpp \
- ir_validate.cpp \
- ir_variable.cpp \
- ir_variable_refcount.cpp \
- linker.cpp \
- link_functions.cpp \
- loop_analysis.cpp \
- loop_controls.cpp \
- loop_unroll.cpp \
- lower_discard.cpp \
- lower_if_to_cond_assign.cpp \
- lower_instructions.cpp \
- lower_jumps.cpp \
- lower_mat_op_to_vec.cpp \
- lower_noise.cpp \
- lower_texture_projection.cpp \
- lower_variable_index_to_cond_assign.cpp \
- lower_vec_index_to_cond_assign.cpp \
- lower_vec_index_to_swizzle.cpp \
- lower_vector.cpp \
- opt_algebraic.cpp \
- opt_constant_folding.cpp \
- opt_constant_propagation.cpp \
- opt_constant_variable.cpp \
- opt_copy_propagation.cpp \
- opt_copy_propagation_elements.cpp \
- opt_dead_code.cpp \
- opt_dead_code_local.cpp \
- opt_dead_functions.cpp \
- opt_discard_simplification.cpp \
- opt_function_inlining.cpp \
- opt_if_simplification.cpp \
- opt_noop_swizzle.cpp \
- opt_redundant_jumps.cpp \
- opt_structure_splitting.cpp \
- opt_swizzle_swizzle.cpp \
- opt_tree_grafting.cpp \
- s_expression.cpp
-
-LIBS = \
- $(TOP)/src/glsl/libglsl.a
-
-APPS = glsl_compiler glcpp/glcpp
-
-GLSL2_C_SOURCES = \
- ../mesa/program/hash_table.c \
- ../mesa/program/symbol_table.c
-GLSL2_CXX_SOURCES = \
- main.cpp
-
-GLSL2_OBJECTS = \
- $(GLSL2_C_SOURCES:.c=.o) \
- $(GLSL2_CXX_SOURCES:.cpp=.o)
-
-### Basic defines ###
-
-DEFINES += \
- $(LIBRARY_DEFINES) \
- $(API_DEFINES)
-
-GLCPP_OBJECTS = \
- $(GLCPP_SOURCES:.c=.o) \
- ../mesa/program/hash_table.o
-
-OBJECTS = \
- $(C_SOURCES:.c=.o) \
- $(CXX_SOURCES:.cpp=.o)
-
-DRICORE_OBJ_DIR = obj-visible
-OBJECTS_DRICORE = $(addprefix $(DRICORE_OBJ_DIR)/,$(OBJECTS))
-
-INCLUDES = \
- -I. \
- -I../mesa \
- -I../mapi \
- -I../../include \
- $(LIBRARY_INCLUDES)
-
-ALL_SOURCES = \
- $(C_SOURCES) \
- $(CXX_SOURCES) \
- $(GLSL2_CXX_SOURCES) \
- $(GLSL2_C_SOURCES)
-
-##### TARGETS #####
-
-default: depend lib$(LIBNAME).a $(APPS) $(DRICORE_GLSL_LIBS)
-
-$(TOP)/$(LIB_DIR)/libglsl.so: $(OBJECTS_DRICORE) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
- $(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
- -cplusplus -noprefix \
- -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/$@.dylib \
- $(OBJECTS_DRICORE) builtin_function.o
-
-lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
- $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o
-
-depend: $(ALL_SOURCES) Makefile
- rm -f depend
- touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null
-
-# Remove .o and backup files
-clean: clean-dricore
- rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o builtin_stubs.o builtin_compiler
- -rm -f $(APPS)
-
-clean-dricore:
- -rm -f $(OBJECTS_DRICORE) $(TOP)/$(LIB_DIR)/libglsl.so libglsl.so
-
-ifneq (,$(DRICORE_GLSL_LIBS))
-DRICORE_INSTALL_TARGET = install-dricore
-endif
-
-# Dummy target
-install: $(DRICORE_INSTALL_TARGET)
- @echo -n ""
-
-install-dricore: default
- $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(DRICORE_GLSL_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-
-##### RULES #####
-
-glsl_compiler: $(GLSL2_OBJECTS) libglsl.a builtin_stubs.o
- $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) builtin_stubs.o $(LIBS) -o $@
-
-glcpp: glcpp/glcpp
-glcpp/glcpp: $(GLCPP_OBJECTS)
- $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@
-
-.cpp.o:
- $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-$(DRICORE_OBJ_DIR)/%.o : %.cpp
- @mkdir -p $(dir $@)
- $(CXX) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DEFINES) $< -o $@
-
-$(DRICORE_OBJ_DIR)/%.o : %.c
- @mkdir -p $(dir $@)
- $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@
-
-glsl_lexer.cpp: glsl_lexer.ll
- $(FLEX) --nounistd -o$@ $<
-
-glsl_parser.cpp: glsl_parser.yy
- $(BISON) -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $<
-
-glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
- $(FLEX) --nounistd -o$@ $<
-
-glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
- $(BISON) -v -o "$@" --defines=glcpp/glcpp-parse.h $<
-
-builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o
- $(APP_CXX) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@
-
-builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler
- @echo Regenerating builtin_function.cpp...
- $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
-
--include depend
diff --git a/dist/Mesa/src/glsl/Makefile.template b/dist/Mesa/src/glsl/Makefile.template
deleted file mode 100644
index 974987a0a..000000000
--- a/dist/Mesa/src/glsl/Makefile.template
+++ /dev/null
@@ -1,50 +0,0 @@
-# src/glsl/Makefile.template
-
-# Template makefile for glsl libraries.
-#
-# Usage:
-# The minimum that the including makefile needs to define
-# is TOP, LIBNAME and one of of the *_SOURCES.
-#
-# Optional defines:
-# LIBRARY_INCLUDES are appended to the list of includes directories.
-# LIBRARY_DEFINES is not used for makedepend, but for compilation.
-
-
-### Basic defines ###
-
-OBJECTS = $(C_SOURCES:.c=.o)
-
-INCLUDES = \
- -I. \
- $(LIBRARY_INCLUDES)
-
-
-##### TARGETS #####
-
-default: depend lib$(LIBNAME).a
-
-lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template
- $(MKLIB) -o $(LIBNAME) -static $(OBJECTS)
-
-depend: $(C_SOURCES)
- rm -f depend
- touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) 2> /dev/null
-
-# Remove .o and backup files
-clean:
- rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak
-
-# Dummy target
-install:
- @echo -n ""
-
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
-
--include depend
-
diff --git a/dist/Mesa/src/glsl/SConscript b/dist/Mesa/src/glsl/SConscript
index ea104abb8..c4ab97c1e 100644
--- a/dist/Mesa/src/glsl/SConscript
+++ b/dist/Mesa/src/glsl/SConscript
@@ -14,10 +14,10 @@ env.Prepend(CPPPATH = [
'#src/glsl/glcpp',
])
-# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path
-env.Append(CPPPATH = [Dir('.').abspath])
+# Make glcpp-parse.h and glsl_parser.h reachable from the include path.
+env.Append(CPPPATH = [Dir('.').abspath, Dir('glcpp').abspath])
-env.Append(YACCFLAGS = '-d')
+env.Append(YACCFLAGS = '-d -p "glcpp_parser_"')
parser_env = env.Clone()
parser_env.Append(YACCFLAGS = [
@@ -25,80 +25,30 @@ parser_env.Append(YACCFLAGS = [
'-p', '_mesa_glsl_',
])
+# without this line scons will expect "glsl_parser.hpp" instead of
+# "glsl_parser.h", causing glsl_parser.cpp to be regenerated every time
+parser_env['YACCHXXFILESUFFIX'] = '.h'
+
glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l')
glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y')
glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll')
glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy')
+# common generated sources
glsl_sources = [
glcpp_lexer,
glcpp_parser[0],
- 'glcpp/pp.c',
- 'ast_expr.cpp',
- 'ast_function.cpp',
- 'ast_to_hir.cpp',
- 'ast_type.cpp',
glsl_lexer,
glsl_parser[0],
- 'glsl_parser_extras.cpp',
- 'glsl_types.cpp',
- 'glsl_symbol_table.cpp',
- 'hir_field_selection.cpp',
- 'ir_basic_block.cpp',
- 'ir_clone.cpp',
- 'ir_constant_expression.cpp',
- 'ir.cpp',
- 'ir_expression_flattening.cpp',
- 'ir_function_can_inline.cpp',
- 'ir_function_detect_recursion.cpp',
- 'ir_function.cpp',
- 'ir_hierarchical_visitor.cpp',
- 'ir_hv_accept.cpp',
- 'ir_import_prototypes.cpp',
- 'ir_print_visitor.cpp',
- 'ir_reader.cpp',
- 'ir_rvalue_visitor.cpp',
- 'ir_set_program_inouts.cpp',
- 'ir_validate.cpp',
- 'ir_variable.cpp',
- 'ir_variable_refcount.cpp',
- 'linker.cpp',
- 'link_functions.cpp',
- 'loop_analysis.cpp',
- 'loop_controls.cpp',
- 'loop_unroll.cpp',
- 'lower_discard.cpp',
- 'lower_if_to_cond_assign.cpp',
- 'lower_instructions.cpp',
- 'lower_jumps.cpp',
- 'lower_mat_op_to_vec.cpp',
- 'lower_noise.cpp',
- 'lower_variable_index_to_cond_assign.cpp',
- 'lower_vec_index_to_cond_assign.cpp',
- 'lower_vec_index_to_swizzle.cpp',
- 'lower_vector.cpp',
- 'opt_algebraic.cpp',
- 'opt_constant_folding.cpp',
- 'opt_constant_propagation.cpp',
- 'opt_constant_variable.cpp',
- 'opt_copy_propagation.cpp',
- 'opt_copy_propagation_elements.cpp',
- 'opt_dead_code.cpp',
- 'opt_dead_code_local.cpp',
- 'opt_dead_functions.cpp',
- 'opt_discard_simplification.cpp',
- 'opt_function_inlining.cpp',
- 'opt_if_simplification.cpp',
- 'opt_noop_swizzle.cpp',
- 'opt_redundant_jumps.cpp',
- 'opt_structure_splitting.cpp',
- 'opt_swizzle_swizzle.cpp',
- 'opt_tree_grafting.cpp',
- 'ralloc.c',
- 's_expression.cpp',
- 'strtod.c',
]
+# parse Makefile.sources
+source_lists = env.ParseSourceList('Makefile.sources')
+
+# add non-generated sources
+for l in ('LIBGLCPP_FILES', 'LIBGLSL_FILES'):
+ glsl_sources += source_lists[l]
+
if env['msvc']:
env.Prepend(CPPPATH = ['#/src/getopt'])
env.PrependUnique(LIBS = [getopt])
@@ -107,20 +57,29 @@ if env['crosscompile'] and not env['embedded']:
Import('builtin_glsl_function')
else:
# Copy these files to avoid generation object files into src/mesa/program
+ env.Prepend(CPPPATH = ['#src/mesa/main'])
+ env.Command('hash_table.c', '#src/mesa/main/hash_table.c', Copy('$TARGET', '$SOURCE'))
+ env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
+ # Copy these files to avoid generation object files into src/mesa/program
env.Prepend(CPPPATH = ['#src/mesa/program'])
- env.Command('hash_table.c', '#src/mesa/program/hash_table.c', Copy('$TARGET', '$SOURCE'))
+ env.Command('prog_hash_table.c', '#src/mesa/program/prog_hash_table.c', Copy('$TARGET', '$SOURCE'))
env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE'))
- main_obj = env.StaticObject('main.cpp')
+ compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_FILES'])
mesa_objs = env.StaticObject([
'hash_table.c',
+ 'imports.c',
+ 'prog_hash_table.c',
'symbol_table.c',
])
+ compiler_objs += mesa_objs
+
builtin_compiler = env.Program(
- target = 'builtin_compiler',
- source = main_obj + glsl_sources + ['builtin_stubs.cpp'] + mesa_objs,
+ target = 'builtin_compiler/builtin_compiler',
+ source = compiler_objs + glsl_sources + \
+ source_lists['BUILTIN_COMPILER_CXX_FILES'],
)
# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll
@@ -134,7 +93,7 @@ else:
command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
)
- env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', 'builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
+ env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', '#src/glsl/builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
Export('builtin_glsl_function')
@@ -171,7 +130,7 @@ env.Prepend(LIBS = [glsl])
glsl2 = env.Program(
target = 'glsl2',
- source = main_obj + mesa_objs,
+ source = compiler_objs,
)
env.Alias('glsl2', glsl2)
diff --git a/dist/Mesa/src/glsl/ast.h b/dist/Mesa/src/glsl/ast.h
index 532347df4..e129d5d88 100644
--- a/dist/Mesa/src/glsl/ast.h
+++ b/dist/Mesa/src/glsl/ast.h
@@ -189,7 +189,8 @@ enum ast_operators {
ast_float_constant,
ast_bool_constant,
- ast_sequence
+ ast_sequence,
+ ast_aggregate
};
/**
@@ -206,7 +207,8 @@ public:
subexpressions[0] = NULL;
subexpressions[1] = NULL;
subexpressions[2] = NULL;
- primary_expression.identifier = (char *) identifier;
+ primary_expression.identifier = identifier;
+ this->non_lvalue_description = NULL;
}
static const char *operator_string(enum ast_operators op);
@@ -221,7 +223,7 @@ public:
ast_expression *subexpressions[3];
union {
- char *identifier;
+ const char *identifier;
int int_constant;
float float_constant;
unsigned uint_constant;
@@ -234,6 +236,18 @@ public:
* \c ast_function_call
*/
exec_list expressions;
+
+ /**
+ * For things that can't be l-values, this describes what it is.
+ *
+ * This text is used by the code that generates IR for assignments to
+ * detect and emit useful messages for assignments to some things that
+ * can't be l-values. For example, pre- or post-incerement expressions.
+ *
+ * \note
+ * This pointer may be \c NULL.
+ */
+ const char *non_lvalue_description;
};
class ast_expression_bin : public ast_expression {
@@ -279,6 +293,30 @@ private:
bool cons;
};
+/**
+ * C-style aggregate initialization class
+ *
+ * Represents C-style initializers of vectors, matrices, arrays, and
+ * structures. E.g., vec3 pos = {1.0, 0.0, -1.0} is equivalent to
+ * vec3 pos = vec3(1.0, 0.0, -1.0).
+ *
+ * Specified in GLSL 4.20 and GL_ARB_shading_language_420pack.
+ *
+ * \sa _mesa_ast_set_aggregate_type
+ */
+class ast_aggregate_initializer : public ast_expression {
+public:
+ ast_aggregate_initializer()
+ : ast_expression(ast_aggregate, NULL, NULL, NULL),
+ constructor_type(NULL)
+ {
+ /* empty */
+ }
+
+ ast_type_specifier *constructor_type;
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+};
/**
* Number of possible operators for an ast_expression
@@ -304,13 +342,13 @@ public:
class ast_declaration : public ast_node {
public:
- ast_declaration(char *identifier, int is_array, ast_expression *array_size,
+ ast_declaration(const char *identifier, bool is_array, ast_expression *array_size,
ast_expression *initializer);
virtual void print(void) const;
- char *identifier;
+ const char *identifier;
- int is_array;
+ bool is_array;
ast_expression *array_size;
ast_expression *initializer;
@@ -325,6 +363,25 @@ enum {
};
struct ast_type_qualifier {
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *node;
+
+ node = rzalloc_size(ctx, size);
+ assert(node != NULL);
+
+ return node;
+ }
+
+ /* If the user *does* call delete, that's OK, we will just
+ * ralloc_free in that case. */
+ static void operator delete(void *table)
+ {
+ ralloc_free(table);
+ }
+
union {
struct {
unsigned invariant:1;
@@ -350,6 +407,17 @@ struct ast_type_qualifier {
* qualifier is used.
*/
unsigned explicit_location:1;
+ /**
+ * Flag set if GL_ARB_explicit_attrib_location "index" layout
+ * qualifier is used.
+ */
+ unsigned explicit_index:1;
+
+ /**
+ * Flag set if GL_ARB_shading_language_420pack "binding" layout
+ * qualifier is used.
+ */
+ unsigned explicit_binding:1;
/** \name Layout qualifiers for GL_AMD_conservative_depth */
/** \{ */
@@ -358,6 +426,15 @@ struct ast_type_qualifier {
unsigned depth_less:1;
unsigned depth_unchanged:1;
/** \} */
+
+ /** \name Layout qualifiers for GL_ARB_uniform_buffer_object */
+ /** \{ */
+ unsigned std140:1;
+ unsigned shared:1;
+ unsigned packed:1;
+ unsigned column_major:1;
+ unsigned row_major:1;
+ /** \} */
}
/** \brief Set of flags, accessed by name. */
q;
@@ -366,6 +443,9 @@ struct ast_type_qualifier {
unsigned i;
} flags;
+ /** Precision of the type (highp/medium/lowp). */
+ unsigned precision:2;
+
/**
* Location specified via GL_ARB_explicit_attrib_location layout
*
@@ -373,6 +453,21 @@ struct ast_type_qualifier {
* This field is only valid if \c explicit_location is set.
*/
int location;
+ /**
+ * Index specified via GL_ARB_explicit_attrib_location layout
+ *
+ * \note
+ * This field is only valid if \c explicit_index is set.
+ */
+ int index;
+
+ /**
+ * Binding specified via GL_ARB_shading_language_420pack's "binding" keyword.
+ *
+ * \note
+ * This field is only valid if \c explicit_binding is set.
+ */
+ int binding;
/**
* Return true if and only if an interpolation qualifier is present.
@@ -380,6 +475,21 @@ struct ast_type_qualifier {
bool has_interpolation() const;
/**
+ * Return whether a layout qualifier is present.
+ */
+ bool has_layout() const;
+
+ /**
+ * Return whether a storage qualifier is present.
+ */
+ bool has_storage() const;
+
+ /**
+ * Return whether an auxiliary storage qualifier is present.
+ */
+ bool has_auxiliary_storage() const;
+
+ /**
* \brief Return string representation of interpolation qualifier.
*
* If an interpolation qualifier is present, then return that qualifier's
@@ -390,97 +500,76 @@ struct ast_type_qualifier {
* returned string is undefined but not null.
*/
const char *interpolation_string() const;
+
+ bool merge_qualifier(YYLTYPE *loc,
+ _mesa_glsl_parse_state *state,
+ ast_type_qualifier q);
};
+class ast_declarator_list;
+
class ast_struct_specifier : public ast_node {
public:
- ast_struct_specifier(char *identifier, ast_node *declarator_list);
+ /**
+ * \brief Make a shallow copy of an ast_struct_specifier.
+ *
+ * Use only if the objects are allocated from the same context and will not
+ * be modified. Zeros the inherited ast_node's fields.
+ */
+ ast_struct_specifier(const ast_struct_specifier& that):
+ ast_node(), name(that.name), declarations(that.declarations),
+ is_declaration(that.is_declaration)
+ {
+ /* empty */
+ }
+
+ ast_struct_specifier(const char *identifier,
+ ast_declarator_list *declarator_list);
virtual void print(void) const;
virtual ir_rvalue *hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
- char *name;
+ const char *name;
+ /* List of ast_declarator_list * */
exec_list declarations;
+ bool is_declaration;
};
-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);
+ /**
+ * \brief Make a shallow copy of an ast_type_specifier, specifying array
+ * fields.
+ *
+ * Use only if the objects are allocated from the same context and will not
+ * be modified. Zeros the inherited ast_node's fields.
+ */
+ ast_type_specifier(const ast_type_specifier *that, bool is_array,
+ ast_expression *array_size)
+ : ast_node(), type_name(that->type_name), structure(that->structure),
+ is_array(is_array), array_size(array_size),
+ default_precision(that->default_precision)
+ {
+ /* empty */
+ }
/** 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_none),
- is_precision_statement(false)
+ : type_name(name), structure(NULL),
+ is_array(false), array_size(NULL),
+ default_precision(ast_precision_none)
{
/* 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_none),
- is_precision_statement(false)
+ : type_name(s->name), structure(s),
+ is_array(false), array_size(NULL),
+ default_precision(ast_precision_none)
{
/* empty */
}
@@ -493,17 +582,14 @@ public:
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;
+ bool is_array;
ast_expression *array_size;
- unsigned precision:2;
-
- bool is_precision_statement;
+ /** For precision statements, this is the given precision; otherwise none. */
+ unsigned default_precision:2;
};
@@ -512,6 +598,10 @@ public:
virtual void print(void) const;
bool has_qualifiers() const;
+ const struct glsl_type *glsl_type(const char **name,
+ struct _mesa_glsl_parse_state *state)
+ const;
+
ast_type_qualifier qualifier;
ast_type_specifier *specifier;
};
@@ -526,6 +616,7 @@ public:
struct _mesa_glsl_parse_state *state);
ast_fully_specified_type *type;
+ /** List of 'ast_declaration *' */
exec_list declarations;
/**
@@ -541,11 +632,15 @@ public:
class ast_parameter_declarator : public ast_node {
public:
- ast_parameter_declarator()
+ ast_parameter_declarator() :
+ type(NULL),
+ identifier(NULL),
+ is_array(false),
+ array_size(NULL),
+ formal_parameter(false),
+ is_void(false)
{
- this->identifier = NULL;
- this->is_array = false;
- this->array_size = 0;
+ /* empty */
}
virtual void print(void) const;
@@ -554,8 +649,8 @@ public:
struct _mesa_glsl_parse_state *state);
ast_fully_specified_type *type;
- char *identifier;
- int is_array;
+ const char *identifier;
+ bool is_array;
ast_expression *array_size;
static void parameters_to_hir(exec_list *ast_parameters,
@@ -585,7 +680,7 @@ public:
struct _mesa_glsl_parse_state *state);
ast_fully_specified_type *return_type;
- char *identifier;
+ const char *identifier;
exec_list parameters;
@@ -628,13 +723,78 @@ public:
class ast_case_label : public ast_node {
public:
+ ast_case_label(ast_expression *test_value);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
/**
- * An expression of NULL means 'default'.
+ * An test value of NULL means 'default'.
*/
- ast_expression *expression;
+ ast_expression *test_value;
+};
+
+
+class ast_case_label_list : public ast_node {
+public:
+ ast_case_label_list(void);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ /**
+ * A list of case labels.
+ */
+ exec_list labels;
+};
+
+
+class ast_case_statement : public ast_node {
+public:
+ ast_case_statement(ast_case_label_list *labels);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_case_label_list *labels;
+
+ /**
+ * A list of statements.
+ */
+ exec_list stmts;
+};
+
+
+class ast_case_statement_list : public ast_node {
+public:
+ ast_case_statement_list(void);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ /**
+ * A list of cases.
+ */
+ exec_list cases;
};
+
+class ast_switch_body : public ast_node {
+public:
+ ast_switch_body(ast_case_statement_list *stmts);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_case_statement_list *stmts;
+};
+
+
class ast_selection_statement : public ast_node {
public:
ast_selection_statement(ast_expression *condition,
@@ -653,8 +813,18 @@ public:
class ast_switch_statement : public ast_node {
public:
- ast_expression *expression;
- exec_list statements;
+ ast_switch_statement(ast_expression *test_expression,
+ ast_node *body);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_expression *test_expression;
+ ast_node *body;
+
+protected:
+ void test_to_hir(exec_list *, struct _mesa_glsl_parse_state *);
};
class ast_iteration_statement : public ast_node {
@@ -719,6 +889,46 @@ public:
ast_function *prototype;
ast_compound_statement *body;
};
+
+class ast_interface_block : public ast_node {
+public:
+ ast_interface_block(ast_type_qualifier layout,
+ const char *instance_name,
+ ast_expression *array_size)
+ : layout(layout), block_name(NULL), instance_name(instance_name),
+ array_size(array_size)
+ {
+ /* empty */
+ }
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_type_qualifier layout;
+ const char *block_name;
+
+ /**
+ * Declared name of the block instance, if specified.
+ *
+ * If the block does not have an instance name, this field will be
+ * \c NULL.
+ */
+ const char *instance_name;
+
+ /** List of ast_declarator_list * */
+ exec_list declarations;
+
+ /**
+ * Declared array size of the block instance
+ *
+ * If the block is not declared as an array, this field will be \c NULL.
+ *
+ * \note
+ * A block can only be an array if it also has an instance name. If this
+ * field is not \c NULL, ::instance_name must also not be \c NULL.
+ */
+ ast_expression *array_size;
+};
/*@}*/
extern void
@@ -729,7 +939,22 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
struct _mesa_glsl_parse_state *state);
+extern ir_rvalue *
+_mesa_ast_array_index_to_hir(void *mem_ctx,
+ struct _mesa_glsl_parse_state *state,
+ ir_rvalue *array, ir_rvalue *idx,
+ YYLTYPE &loc, YYLTYPE &idx_loc);
+
+extern void
+_mesa_ast_set_aggregate_type(const ast_type_specifier *type,
+ ast_expression *expr,
+ _mesa_glsl_parse_state *state);
+
void
emit_function(_mesa_glsl_parse_state *state, ir_function *f);
+extern void
+check_builtin_array_max_size(const char *name, unsigned size,
+ YYLTYPE loc, struct _mesa_glsl_parse_state *state);
+
#endif /* AST_H */
diff --git a/dist/Mesa/src/glsl/ast_function.cpp b/dist/Mesa/src/glsl/ast_function.cpp
index ed401b12e..e34c1ddba 100644
--- a/dist/Mesa/src/glsl/ast_function.cpp
+++ b/dist/Mesa/src/glsl/ast_function.cpp
@@ -83,7 +83,7 @@ prototype_string(const glsl_type *return_type, const char *name,
const char *comma = "";
foreach_list(node, parameters) {
- const ir_instruction *const param = (ir_instruction *) node;
+ const ir_variable *const param = (ir_variable *) node;
ralloc_asprintf_append(&str, "%s%s", comma, param->type->name);
comma = ", ";
@@ -93,244 +93,393 @@ prototype_string(const glsl_type *return_type, const char *name,
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)
+/**
+ * Verify that 'out' and 'inout' actual parameters are lvalues. Also, verify
+ * that 'const_in' formal parameters (an extension in our IR) correspond to
+ * ir_constant actual parameters.
+ */
+static bool
+verify_parameter_modes(_mesa_glsl_parse_state *state,
+ ir_function_signature *sig,
+ exec_list &actual_ir_parameters,
+ exec_list &actual_ast_parameters)
{
- void *ctx = state;
- ir_function *f = state->symbols->get_function(name);
- ir_function_signature *sig;
+ exec_node *actual_ir_node = actual_ir_parameters.head;
+ exec_node *actual_ast_node = actual_ast_parameters.head;
- sig = f ? f->matching_signature(actual_parameters) : NULL;
+ foreach_list(formal_node, &sig->parameters) {
+ /* The lists must be the same length. */
+ assert(!actual_ir_node->is_tail_sentinel());
+ assert(!actual_ast_node->is_tail_sentinel());
- /* 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.
+ const ir_variable *const formal = (ir_variable *) formal_node;
+ const ir_rvalue *const actual = (ir_rvalue *) actual_ir_node;
+ const ast_expression *const actual_ast =
+ exec_node_data(ast_expression, actual_ast_node, link);
+
+ /* FIXME: 'loc' is incorrect (as of 2011-01-21). It is always
+ * FIXME: 0:0(0).
*/
- 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, f);
- }
+ YYLTYPE loc = actual_ast->get_location();
+
+ /* Verify that 'const_in' parameters are ir_constants. */
+ if (formal->mode == ir_var_const_in &&
+ actual->ir_type != ir_type_constant) {
+ _mesa_glsl_error(&loc, state,
+ "parameter `in %s' must be a constant expression",
+ formal->name);
+ return false;
+ }
- f->add_signature(sig->clone_prototype(f, NULL));
- break;
+ /* Verify that 'out' and 'inout' actual parameters are lvalues. */
+ if (formal->mode == ir_var_function_out
+ || formal->mode == ir_var_function_inout) {
+ const char *mode = NULL;
+ switch (formal->mode) {
+ case ir_var_function_out: mode = "out"; break;
+ case ir_var_function_inout: mode = "inout"; break;
+ default: assert(false); break;
+ }
+
+ /* This AST-based check catches errors like f(i++). The IR-based
+ * is_lvalue() is insufficient because the actual parameter at the
+ * IR-level is just a temporary value, which is an l-value.
+ */
+ if (actual_ast->non_lvalue_description != NULL) {
+ _mesa_glsl_error(&loc, state,
+ "function parameter '%s %s' references a %s",
+ mode, formal->name,
+ actual_ast->non_lvalue_description);
+ return false;
+ }
+
+ ir_variable *var = actual->variable_referenced();
+ if (var)
+ var->assigned = true;
+
+ if (var && var->read_only) {
+ _mesa_glsl_error(&loc, state,
+ "function parameter '%s %s' references the "
+ "read-only variable '%s'",
+ mode, formal->name,
+ actual->variable_referenced()->name);
+ return false;
+ } else if (!actual->is_lvalue()) {
+ /* Even though ir_binop_vector_extract is not an l-value, let it
+ * slop through. generate_call will handle it correctly.
+ */
+ ir_expression *const expr = ((ir_rvalue *) actual)->as_expression();
+ if (expr == NULL
+ || expr->operation != ir_binop_vector_extract
+ || !expr->operands[0]->is_lvalue()) {
+ _mesa_glsl_error(&loc, state,
+ "function parameter '%s %s' is not an lvalue",
+ mode, formal->name);
+ return false;
+ }
}
}
+
+ actual_ir_node = actual_ir_node->next;
+ actual_ast_node = actual_ast_node->next;
}
+ return true;
+}
- exec_list post_call_conversions;
+static void
+fix_parameter(void *mem_ctx, ir_rvalue *actual, const glsl_type *formal_type,
+ exec_list *before_instructions, exec_list *after_instructions,
+ bool parameter_is_inout)
+{
+ ir_expression *const expr = actual->as_expression();
- 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.
- *
- * Also, validate that 'const_in' formal parameters (an extension of our
- * IR) correspond to ir_constant actual parameters.
- *
- * Also, perform implicit conversion of arguments. Note: to implicitly
- * convert out parameters, we need to place them in a temporary
- * variable, and do the conversion after the call takes place. Since we
- * haven't emitted the call yet, we'll place the post-call conversions
- * in a temporary exec_list, and emit them later.
+ /* If the types match exactly and the parameter is not a vector-extract,
+ * nothing needs to be done to fix the parameter.
+ */
+ if (formal_type == actual->type
+ && (expr == NULL || expr->operation != ir_binop_vector_extract))
+ return;
+
+ /* To convert an out parameter, we need to create a temporary variable to
+ * hold the value before conversion, and then perform the conversion after
+ * the function call returns.
+ *
+ * This has the effect of transforming code like this:
+ *
+ * void f(out int x);
+ * float value;
+ * f(value);
+ *
+ * Into IR that's equivalent to this:
+ *
+ * void f(out int x);
+ * float value;
+ * int out_parameter_conversion;
+ * f(out_parameter_conversion);
+ * value = float(out_parameter_conversion);
+ *
+ * If the parameter is an ir_expression of ir_binop_vector_extract,
+ * additional conversion is needed in the post-call re-write.
+ */
+ ir_variable *tmp =
+ new(mem_ctx) ir_variable(formal_type, "inout_tmp", ir_var_temporary);
+
+ before_instructions->push_tail(tmp);
+
+ /* If the parameter is an inout parameter, copy the value of the actual
+ * parameter to the new temporary. Note that no type conversion is allowed
+ * here because inout parameters must match types exactly.
+ */
+ if (parameter_is_inout) {
+ /* Inout parameters should never require conversion, since that would
+ * require an implicit conversion to exist both to and from the formal
+ * parameter type, and there are no bidirectional implicit conversions.
*/
- exec_list_iterator actual_iter = actual_parameters->iterator();
- exec_list_iterator formal_iter = sig->parameters.iterator();
+ assert (actual->type == formal_type);
- while (actual_iter.has_next()) {
- ir_rvalue *actual = (ir_rvalue *) actual_iter.get();
- ir_variable *formal = (ir_variable *) formal_iter.get();
+ ir_dereference_variable *const deref_tmp_1 =
+ new(mem_ctx) ir_dereference_variable(tmp);
+ ir_assignment *const assignment =
+ new(mem_ctx) ir_assignment(deref_tmp_1, actual);
+ before_instructions->push_tail(assignment);
+ }
- assert(actual != NULL);
- assert(formal != NULL);
+ /* Replace the parameter in the call with a dereference of the new
+ * temporary.
+ */
+ ir_dereference_variable *const deref_tmp_2 =
+ new(mem_ctx) ir_dereference_variable(tmp);
+ actual->replace_with(deref_tmp_2);
- if (formal->mode == ir_var_const_in && !actual->as_constant()) {
- _mesa_glsl_error(loc, state,
- "parameter `%s' must be a constant expression",
- formal->name);
- }
- if ((formal->mode == ir_var_out)
- || (formal->mode == ir_var_inout)) {
- const char *mode = NULL;
- switch (formal->mode) {
- case ir_var_out: mode = "out"; break;
- case ir_var_inout: mode = "inout"; break;
- default: assert(false); break;
- }
- /* FIXME: 'loc' is incorrect (as of 2011-01-21). It is always
- * FIXME: 0:0(0).
- */
- if (actual->variable_referenced()
- && actual->variable_referenced()->read_only) {
- _mesa_glsl_error(loc, state,
- "function parameter '%s %s' references the "
- "read-only variable '%s'",
- mode, formal->name,
- actual->variable_referenced()->name);
-
- } else if (!actual->is_lvalue()) {
- _mesa_glsl_error(loc, state,
- "function parameter '%s %s' is not an lvalue",
- mode, formal->name);
- }
- }
+ /* Copy the temporary variable to the actual parameter with optional
+ * type conversion applied.
+ */
+ ir_rvalue *rhs = new(mem_ctx) ir_dereference_variable(tmp);
+ if (actual->type != formal_type)
+ rhs = convert_component(rhs, actual->type);
+
+ ir_rvalue *lhs = actual;
+ if (expr != NULL && expr->operation == ir_binop_vector_extract) {
+ rhs = new(mem_ctx) ir_expression(ir_triop_vector_insert,
+ expr->operands[0]->type,
+ expr->operands[0]->clone(mem_ctx, NULL),
+ rhs,
+ expr->operands[1]->clone(mem_ctx, NULL));
+ lhs = expr->operands[0]->clone(mem_ctx, NULL);
+ }
- if (formal->type->is_numeric() || formal->type->is_boolean()) {
- switch (formal->mode) {
- case ir_var_in: {
- ir_rvalue *converted
- = convert_component(actual, formal->type);
- actual->replace_with(converted);
- break;
- }
- case ir_var_out:
- if (actual->type != formal->type) {
- /* To convert an out parameter, we need to create a
- * temporary variable to hold the value before conversion,
- * and then perform the conversion after the function call
- * returns.
- *
- * This has the effect of transforming code like this:
- *
- * void f(out int x);
- * float value;
- * f(value);
- *
- * Into IR that's equivalent to this:
- *
- * void f(out int x);
- * float value;
- * int out_parameter_conversion;
- * f(out_parameter_conversion);
- * value = float(out_parameter_conversion);
- */
- ir_variable *tmp =
- new(ctx) ir_variable(formal->type,
- "out_parameter_conversion",
- ir_var_temporary);
- instructions->push_tail(tmp);
- ir_dereference_variable *deref_tmp_1
- = new(ctx) ir_dereference_variable(tmp);
- ir_dereference_variable *deref_tmp_2
- = new(ctx) ir_dereference_variable(tmp);
- ir_rvalue *converted_tmp
- = convert_component(deref_tmp_1, actual->type);
- ir_assignment *assignment
- = new(ctx) ir_assignment(actual, converted_tmp);
- post_call_conversions.push_tail(assignment);
- actual->replace_with(deref_tmp_2);
- }
- break;
- case ir_var_inout:
- /* Inout parameters should never require conversion, since that
- * would require an implicit conversion to exist both to and
- * from the formal parameter type, and there are no
- * bidirectional implicit conversions.
- */
- assert (actual->type == formal->type);
- break;
- default:
- assert (!"Illegal formal parameter mode");
- break;
- }
+ ir_assignment *const assignment_2 = new(mem_ctx) ir_assignment(lhs, rhs);
+ after_instructions->push_tail(assignment_2);
+}
+
+/**
+ * If a function call is generated, \c call_ir will point to it on exit.
+ * Otherwise \c call_ir will be set to \c NULL.
+ */
+static ir_rvalue *
+generate_call(exec_list *instructions, ir_function_signature *sig,
+ exec_list *actual_parameters,
+ ir_call **call_ir,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+ exec_list post_call_conversions;
+
+ *call_ir = NULL;
+
+ /* Perform implicit conversion of arguments. For out parameters, we need
+ * to place them in a temporary variable and do the conversion after the
+ * call takes place. Since we haven't emitted the call yet, we'll place
+ * the post-call conversions in a temporary exec_list, and emit them later.
+ */
+ 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->type->is_numeric() || formal->type->is_boolean()) {
+ switch (formal->mode) {
+ case ir_var_const_in:
+ case ir_var_function_in: {
+ ir_rvalue *converted
+ = convert_component(actual, formal->type);
+ actual->replace_with(converted);
+ break;
+ }
+ case ir_var_function_out:
+ case ir_var_function_inout:
+ fix_parameter(ctx, actual, formal->type,
+ instructions, &post_call_conversions,
+ formal->mode == ir_var_function_inout);
+ break;
+ default:
+ assert (!"Illegal formal parameter mode");
+ break;
}
+ }
+
+ actual_iter.next();
+ formal_iter.next();
+ }
- actual_iter.next();
- formal_iter.next();
+ /* If the function call is a constant expression, don't generate any
+ * instructions; just generate an ir_constant.
+ *
+ * Function calls were first allowed to be constant expressions in GLSL
+ * 1.20 and GLSL ES 3.00.
+ */
+ if (state->is_version(120, 300)) {
+ ir_constant *value = sig->constant_expression_value(actual_parameters, NULL);
+ if (value != NULL) {
+ return value;
}
+ }
- /* 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.
- *
- * Also insert any out parameter conversions after the call.
- */
- ir_call *call = new(ctx) ir_call(sig, actual_parameters);
- ir_dereference_variable *deref;
- if (!sig->return_type->is_void()) {
- /* If the function call is a constant expression, don't
- * generate the instructions to call it; just generate an
- * ir_constant representing the constant value.
- *
- * Function calls can only be constant expressions starting
- * in GLSL 1.20.
- */
- if (state->language_version >= 120) {
- ir_constant *const_val = call->constant_expression_value();
- if (const_val) {
- return const_val;
- }
- }
+ ir_dereference_variable *deref = NULL;
+ if (!sig->return_type->is_void()) {
+ /* Create a new temporary to hold the return value. */
+ ir_variable *var;
- ir_variable *var;
+ var = new(ctx) ir_variable(sig->return_type,
+ ralloc_asprintf(ctx, "%s_retval",
+ sig->function_name()),
+ ir_var_temporary);
+ instructions->push_tail(var);
- var = new(ctx) ir_variable(sig->return_type,
- ralloc_asprintf(ctx, "%s_retval",
- sig->function_name()),
- ir_var_temporary);
- instructions->push_tail(var);
+ deref = new(ctx) ir_dereference_variable(var);
+ }
+ ir_call *call = new(ctx) ir_call(sig, deref, actual_parameters);
+ instructions->push_tail(call);
- deref = new(ctx) ir_dereference_variable(var);
- ir_assignment *assign = new(ctx) ir_assignment(deref, call, NULL);
- instructions->push_tail(assign);
+ /* Also emit any necessary out-parameter conversions. */
+ instructions->append_list(&post_call_conversions);
- deref = new(ctx) ir_dereference_variable(var);
- } else {
- instructions->push_tail(call);
- deref = NULL;
+ return deref ? deref->clone(ctx, NULL) : NULL;
+}
+
+/**
+ * Given a function name and parameter list, find the matching signature.
+ */
+static ir_function_signature *
+match_function_by_name(const char *name,
+ exec_list *actual_parameters,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+ ir_function *f = state->symbols->get_function(name);
+ ir_function_signature *local_sig = NULL;
+ ir_function_signature *sig = NULL;
+
+ /* Is the function hidden by a record type constructor? */
+ if (state->symbols->get_type(name))
+ goto done; /* no match */
+
+ /* Is the function hidden by a variable (impossible in 1.10)? */
+ if (!state->symbols->separate_function_namespace
+ && state->symbols->get_variable(name))
+ goto done; /* no match */
+
+ if (f != NULL) {
+ /* Look for a match in the local shader. If exact, we're done. */
+ bool is_exact = false;
+ sig = local_sig = f->matching_signature(actual_parameters, &is_exact);
+ if (is_exact)
+ goto done;
+
+ if (!state->es_shader && f->has_user_signature()) {
+ /* In desktop GL, the presence of a user-defined signature hides any
+ * built-in signatures, so we must ignore them. In contrast, in ES2
+ * user-defined signatures add new overloads, so we must proceed.
+ */
+ goto done;
}
- instructions->append_list(&post_call_conversions);
- return deref;
- } else {
- char *str = prototype_string(NULL, name, actual_parameters);
+ }
- _mesa_glsl_error(loc, state, "no matching function for call to `%s'",
- str);
- ralloc_free(str);
+ /* Local shader has no exact candidates; check the built-ins. */
+ _mesa_glsl_initialize_functions(state);
+ for (unsigned i = 0; i < state->num_builtins_to_link; i++) {
+ ir_function *builtin =
+ state->builtins_to_link[i]->symbols->get_function(name);
+ if (builtin == NULL)
+ continue;
+
+ bool is_exact = false;
+ ir_function_signature *builtin_sig =
+ builtin->matching_signature(actual_parameters, &is_exact);
+
+ if (builtin_sig == NULL)
+ continue;
+
+ /* If the built-in signature is exact, we can stop. */
+ if (is_exact) {
+ sig = builtin_sig;
+ goto done;
+ }
- const char *prefix = "candidates are: ";
+ if (sig == NULL) {
+ /* We found an inexact match, which is better than nothing. However,
+ * we should keep searching for an exact match.
+ */
+ sig = builtin_sig;
+ }
+ }
- for (int i = -1; i < (int) 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;
+done:
+ if (sig != NULL) {
+ /* If the match is from a linked built-in shader, import the prototype. */
+ if (sig != local_sig) {
+ if (f == NULL) {
+ f = new(ctx) ir_function(name);
+ state->symbols->add_global_function(f);
+ emit_function(state, f);
+ }
+ f->add_signature(sig->clone_prototype(f, NULL));
+ }
+ }
+ return sig;
+}
- foreach_list (node, &f->signatures) {
- ir_function_signature *sig = (ir_function_signature *) node;
+/**
+ * Raise a "no matching function" error, listing all possible overloads the
+ * compiler considered so developers can figure out what went wrong.
+ */
+static void
+no_matching_function_error(const char *name,
+ YYLTYPE *loc,
+ exec_list *actual_parameters,
+ _mesa_glsl_parse_state *state)
+{
+ char *str = prototype_string(NULL, name, actual_parameters);
+ _mesa_glsl_error(loc, state, "no matching function for call to `%s'", str);
+ ralloc_free(str);
- str = prototype_string(sig->return_type, f->name, &sig->parameters);
- _mesa_glsl_error(loc, state, "%s%s", prefix, str);
- ralloc_free(str);
+ const char *prefix = "candidates are: ";
- prefix = " ";
- }
+ for (int i = -1; i < (int) state->num_builtins_to_link; i++) {
+ glsl_symbol_table *syms = i >= 0 ? state->builtins_to_link[i]->symbols
+ : state->symbols;
+ ir_function *f = syms->get_function(name);
+ if (f == NULL)
+ continue;
- }
+ foreach_list (node, &f->signatures) {
+ ir_function_signature *sig = (ir_function_signature *) node;
- return ir_call::get_error_instruction(ctx);
+ str = prototype_string(sig->return_type, f->name, &sig->parameters);
+ _mesa_glsl_error(loc, state, "%s%s", prefix, str);
+ ralloc_free(str);
+
+ prefix = " ";
+ }
}
}
-
/**
* Perform automatic type conversion of constructor parameters
*
@@ -351,17 +500,35 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
assert(a <= GLSL_TYPE_BOOL);
assert(b <= GLSL_TYPE_BOOL);
- if ((a == b) || (src->type->is_integer() && desired_type->is_integer()))
+ if (a == b)
return src;
switch (a) {
case GLSL_TYPE_UINT:
+ switch (b) {
+ case GLSL_TYPE_INT:
+ result = new(ctx) ir_expression(ir_unop_i2u, src);
+ break;
+ case GLSL_TYPE_FLOAT:
+ result = new(ctx) ir_expression(ir_unop_f2u, src);
+ break;
+ case GLSL_TYPE_BOOL:
+ result = new(ctx) ir_expression(ir_unop_i2u,
+ new(ctx) ir_expression(ir_unop_b2i, src));
+ break;
+ }
+ break;
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);
+ switch (b) {
+ case GLSL_TYPE_UINT:
+ result = new(ctx) ir_expression(ir_unop_u2i, src);
+ break;
+ case GLSL_TYPE_FLOAT:
+ result = new(ctx) ir_expression(ir_unop_f2i, src);
+ break;
+ case GLSL_TYPE_BOOL:
+ result = new(ctx) ir_expression(ir_unop_b2i, src);
+ break;
}
break;
case GLSL_TYPE_FLOAT:
@@ -380,6 +547,9 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_BOOL:
switch (b) {
case GLSL_TYPE_UINT:
+ result = new(ctx) ir_expression(ir_unop_i2b,
+ new(ctx) ir_expression(ir_unop_u2i, src));
+ break;
case GLSL_TYPE_INT:
result = new(ctx) ir_expression(ir_unop_i2b, desired_type, src, NULL);
break;
@@ -391,6 +561,7 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
}
assert(result != NULL);
+ assert(result->type == desired_type);
/* Try constant folding; it may fold in the conversion we just added. */
ir_constant *const constant = result->constant_expression_value();
@@ -439,6 +610,120 @@ dereference_component(ir_rvalue *src, unsigned component)
static ir_rvalue *
+process_vec_mat_constructor(exec_list *instructions,
+ const glsl_type *constructor_type,
+ YYLTYPE *loc, exec_list *parameters,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+
+ /* The ARB_shading_language_420pack spec says:
+ *
+ * "If an initializer is a list of initializers enclosed in curly braces,
+ * the variable being declared must be a vector, a matrix, an array, or a
+ * structure.
+ *
+ * int i = { 1 }; // illegal, i is not an aggregate"
+ */
+ if (constructor_type->vector_elements <= 1) {
+ _mesa_glsl_error(loc, state, "Aggregates can only initialize vectors, "
+ "matrices, arrays, and structs");
+ return ir_rvalue::error_value(ctx);
+ }
+
+ exec_list actual_parameters;
+ const unsigned parameter_count =
+ process_parameters(instructions, &actual_parameters, parameters, state);
+
+ if (parameter_count == 0
+ || (constructor_type->is_vector() &&
+ constructor_type->vector_elements != parameter_count)
+ || (constructor_type->is_matrix() &&
+ constructor_type->matrix_columns != parameter_count)) {
+ _mesa_glsl_error(loc, state, "%s constructor must have %u parameters",
+ constructor_type->is_vector() ? "vector" : "matrix",
+ constructor_type->vector_elements);
+ return ir_rvalue::error_value(ctx);
+ }
+
+ 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!). See
+ * the spec quote above. */
+ if (constructor_type->is_float()) {
+ const glsl_type *desired_type =
+ glsl_type::get_instance(GLSL_TYPE_FLOAT,
+ ir->type->vector_elements,
+ ir->type->matrix_columns);
+ if (result->type->can_implicitly_convert_to(desired_type)) {
+ /* Even though convert_component() implements the constructor
+ * conversion rules (not the implicit conversion rules), its safe
+ * to use it here because we already checked that the implicit
+ * conversion is legal.
+ */
+ result = convert_component(ir, desired_type);
+ }
+ }
+
+ if (constructor_type->is_matrix()) {
+ if (result->type != constructor_type->column_type()) {
+ _mesa_glsl_error(loc, state, "type error in matrix constructor: "
+ "expected: %s, found %s",
+ constructor_type->column_type()->name,
+ result->type->name);
+ return ir_rvalue::error_value(ctx);
+ }
+ } else if (result->type != constructor_type->get_scalar_type()) {
+ _mesa_glsl_error(loc, state, "type error in vector constructor: "
+ "expected: %s, found %s",
+ constructor_type->get_scalar_type()->name,
+ result->type->name);
+ return ir_rvalue::error_value(ctx);
+ }
+
+ /* 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, "vec_mat_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);
+}
+
+
+static ir_rvalue *
process_array_constructor(exec_list *instructions,
const glsl_type *constructor_type,
YYLTYPE *loc, exec_list *parameters,
@@ -477,9 +762,9 @@ process_array_constructor(exec_list *instructions,
_mesa_glsl_error(loc, state, "array constructor must have %s %u "
"parameter%s",
- (constructor_type->length != 0) ? "at least" : "exactly",
+ (constructor_type->length == 0) ? "at least" : "exactly",
min_param, (min_param <= 1) ? "" : "s");
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(ctx);
}
if (constructor_type->length == 0) {
@@ -519,6 +804,7 @@ process_array_constructor(exec_list *instructions,
"expected: %s, found %s",
constructor_type->element_type()->name,
result->type->name);
+ return ir_rvalue::error_value(ctx);
}
/* Attempt to convert the parameter to a constant valued expression.
@@ -1088,6 +1374,63 @@ emit_inline_record_constructor(const glsl_type *type,
}
+static ir_rvalue *
+process_record_constructor(exec_list *instructions,
+ const glsl_type *constructor_type,
+ YYLTYPE *loc, exec_list *parameters,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+ exec_list actual_parameters;
+
+ process_parameters(instructions, &actual_parameters,
+ parameters, state);
+
+ exec_node *node = actual_parameters.head;
+ for (unsigned i = 0; i < constructor_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'",
+ constructor_type->name);
+ return ir_rvalue::error_value(ctx);
+ }
+
+ if (apply_implicit_conversion(constructor_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)",
+ constructor_type->name,
+ constructor_type->fields.structure[i].name,
+ ir->type->name,
+ constructor_type->fields.structure[i].type->name);
+ return ir_rvalue::error_value(ctx);;
+ }
+
+ node = node->next;
+ }
+
+ if (!node->is_tail_sentinel()) {
+ _mesa_glsl_error(loc, state, "too many parameters in constructor "
+ "for `%s'", constructor_type->name);
+ return ir_rvalue::error_value(ctx);
+ }
+
+ ir_rvalue *const constant =
+ constant_record_constructor(constructor_type, &actual_parameters,
+ state);
+
+ return (constant != NULL)
+ ? constant
+ : emit_inline_record_constructor(constructor_type, instructions,
+ &actual_parameters, state);
+}
+
+
ir_rvalue *
ast_function_expression::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
@@ -1116,7 +1459,7 @@ ast_function_expression::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state, "unknown type `%s' (structure name "
"may be shadowed by a variable with the same name)",
type->type_name);
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(ctx);
}
@@ -1125,14 +1468,13 @@ ast_function_expression::hir(exec_list *instructions,
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);
+ return ir_rvalue::error_value(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);
+ if (!state->check_version(120, 300, &loc,
+ "array constructors forbidden")) {
+ return ir_rvalue::error_value(ctx);
}
return process_array_constructor(instructions, constructor_type,
@@ -1140,67 +1482,28 @@ ast_function_expression::hir(exec_list *instructions,
}
- /* 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.
+ /* There are two kinds of constructor calls. Constructors for arrays and
+ * structures must have the exact number of arguments with matching types
+ * in the correct order. These constructors follow essentially the same
+ * type matching rules as functions.
+ *
+ * Constructors for built-in language types, such as mat4 and vec2, are
+ * free form. The only requirements are that the parameters must provide
+ * enough values of the correct scalar type and that no arguments are
+ * given past the last used argument.
+ *
+ * When using the C-style initializer syntax from GLSL 4.20, constructors
+ * must have the exact number of arguments with matching types in the
+ * correct order.
*/
if (constructor_type->is_record()) {
- exec_list actual_parameters;
-
- process_parameters(instructions, &actual_parameters,
- &this->expressions, state);
-
- exec_node *node = actual_parameters.head;
- for (unsigned i = 0; i < constructor_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'",
- constructor_type->name);
- return ir_call::get_error_instruction(ctx);
- }
-
- if (apply_implicit_conversion(constructor_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)",
- constructor_type->name,
- constructor_type->fields.structure[i].name,
- ir->type->name,
- constructor_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'", constructor_type->name);
- return ir_call::get_error_instruction(ctx);
- }
-
- ir_rvalue *const constant =
- constant_record_constructor(constructor_type, &actual_parameters,
- state);
-
- return (constant != NULL)
- ? constant
- : emit_inline_record_constructor(constructor_type, instructions,
- &actual_parameters, state);
+ return process_record_constructor(instructions, constructor_type,
+ &loc, &this->expressions,
+ state);
}
if (!constructor_type->is_numeric() && !constructor_type->is_boolean())
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(ctx);
/* Total number of components of the type being constructed. */
const unsigned type_components = constructor_type->components();
@@ -1227,14 +1530,14 @@ ast_function_expression::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state, "too many parameters to `%s' "
"constructor",
constructor_type->name);
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(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);
+ return ir_rvalue::error_value(ctx);
}
/* Count the number of matrix and nonmatrix parameters. This
@@ -1254,12 +1557,12 @@ ast_function_expression::hir(exec_list *instructions,
* "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);
+ if (matrix_parameters > 0
+ && constructor_type->is_matrix()
+ && !state->check_version(120, 100, &loc,
+ "cannot construct `%s' from a matrix",
+ constructor_type->name)) {
+ return ir_rvalue::error_value(ctx);
}
/* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec:
@@ -1273,7 +1576,7 @@ ast_function_expression::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state, "for matrix `%s' constructor, "
"matrix must be only parameter",
constructor_type->name);
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(ctx);
}
/* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec:
@@ -1287,7 +1590,7 @@ ast_function_expression::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state, "too few components to construct "
"`%s'",
constructor_type->name);
- return ir_call::get_error_instruction(ctx);
+ return ir_rvalue::error_value(ctx);
}
/* Later, we cast each parameter to the same base type as the
@@ -1368,16 +1671,66 @@ ast_function_expression::hir(exec_list *instructions,
}
} else {
const ast_expression *id = subexpressions[0];
+ const char *func_name = id->primary_expression.identifier;
YYLTYPE loc = id->get_location();
exec_list actual_parameters;
process_parameters(instructions, &actual_parameters, &this->expressions,
state);
- return match_function_by_name(instructions,
- id->primary_expression.identifier, & loc,
- &actual_parameters, state);
+ ir_function_signature *sig =
+ match_function_by_name(func_name, &actual_parameters, state);
+
+ ir_call *call = NULL;
+ ir_rvalue *value = NULL;
+ if (sig == NULL) {
+ no_matching_function_error(func_name, &loc, &actual_parameters, state);
+ value = ir_rvalue::error_value(ctx);
+ } else if (!verify_parameter_modes(state, sig, actual_parameters, this->expressions)) {
+ /* an error has already been emitted */
+ value = ir_rvalue::error_value(ctx);
+ } else {
+ value = generate_call(instructions, sig, &actual_parameters,
+ &call, state);
+ }
+
+ return value;
+ }
+
+ return ir_rvalue::error_value(ctx);
+}
+
+ir_rvalue *
+ast_aggregate_initializer::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+ YYLTYPE loc = this->get_location();
+ const char *name;
+
+ if (!this->constructor_type) {
+ _mesa_glsl_error(&loc, state, "type of C-style initializer unknown");
+ return ir_rvalue::error_value(ctx);
+ }
+ const glsl_type *const constructor_type =
+ this->constructor_type->glsl_type(&name, state);
+
+ if (!state->ARB_shading_language_420pack_enable) {
+ _mesa_glsl_error(&loc, state, "C-style initialization requires the "
+ "GL_ARB_shading_language_420pack extension");
+ return ir_rvalue::error_value(ctx);
+ }
+
+ if (this->constructor_type->is_array) {
+ return process_array_constructor(instructions, constructor_type, &loc,
+ &this->expressions, state);
+ }
+
+ if (this->constructor_type->structure) {
+ return process_record_constructor(instructions, constructor_type, &loc,
+ &this->expressions, state);
}
- return ir_call::get_error_instruction(ctx);
+ return process_vec_mat_constructor(instructions, constructor_type, &loc,
+ &this->expressions, state);
}
diff --git a/dist/Mesa/src/glsl/ast_to_hir.cpp b/dist/Mesa/src/glsl/ast_to_hir.cpp
index 1650978a1..6164f76c9 100644
--- a/dist/Mesa/src/glsl/ast_to_hir.cpp
+++ b/dist/Mesa/src/glsl/ast_to_hir.cpp
@@ -54,15 +54,19 @@
#include "glsl_parser_extras.h"
#include "ast.h"
#include "glsl_types.h"
+#include "program/hash_table.h"
#include "ir.h"
+static void
+detect_conflicting_assignments(struct _mesa_glsl_parse_state *state,
+ exec_list *instructions);
+
void
_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
{
_mesa_glsl_initialize_variables(instructions, state);
- _mesa_glsl_initialize_functions(state);
- state->symbols->language_version = state->language_version;
+ state->symbols->separate_function_namespace = state->language_version == 110;
state->current_function = NULL;
@@ -87,8 +91,27 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
ast->hir(instructions, state);
detect_recursion_unlinked(state, instructions);
+ detect_conflicting_assignments(state, instructions);
state->toplevel_ir = NULL;
+
+ /* Move all of the variable declarations to the front of the IR list, and
+ * reverse the order. This has the (intended!) side effect that vertex
+ * shader inputs and fragment shader outputs will appear in the IR in the
+ * same order that they appeared in the shader code. This results in the
+ * locations being assigned in the declared order. Many (arguably buggy)
+ * applications depend on this behavior, and it matches what nearly all
+ * other drivers do.
+ */
+ foreach_list_safe(node, instructions) {
+ ir_variable *const var = ((ir_instruction *) node)->as_variable();
+
+ if (var == NULL)
+ continue;
+
+ var->remove();
+ instructions->push_head(var);
+ }
}
@@ -116,7 +139,7 @@ apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from,
/* 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)
+ if (!state->is_version(120, 0))
return false;
/* From page 27 (page 33 of the PDF) of the GLSL 1.50 spec:
@@ -385,8 +408,7 @@ bit_logic_result_type(const struct glsl_type *type_a,
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");
+ if (!state->check_bitwise_operations_allowed(loc)) {
return glsl_type::error_type;
}
@@ -441,10 +463,7 @@ modulus_result_type(const struct glsl_type *type_a,
const struct glsl_type *type_b,
struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
{
- if (state->language_version < 130) {
- _mesa_glsl_error(loc, state,
- "operator '%%' is reserved in %s",
- state->version_string);
+ if (!state->check_version(130, 300, loc, "operator '%%' is reserved")) {
return glsl_type::error_type;
}
@@ -453,9 +472,17 @@ modulus_result_type(const struct glsl_type *type_a,
* 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");
+ if (!type_a->is_integer()) {
+ _mesa_glsl_error(loc, state, "LHS of operator %% must be an integer.");
+ return glsl_type::error_type;
+ }
+ if (!type_b->is_integer()) {
+ _mesa_glsl_error(loc, state, "RHS of operator %% must be an integer.");
+ return glsl_type::error_type;
+ }
+ if (type_a->base_type != type_b->base_type) {
+ _mesa_glsl_error(loc, state,
+ "operands of %% must have the same base type");
return glsl_type::error_type;
}
@@ -540,8 +567,7 @@ shift_result_type(const struct glsl_type *type_a,
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");
+ if (!state->check_bitwise_operations_allowed(loc)) {
return glsl_type::error_type;
}
@@ -657,29 +683,65 @@ mark_whole_array_access(ir_rvalue *access)
ir_rvalue *
do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
+ const char *non_lvalue_description,
ir_rvalue *lhs, ir_rvalue *rhs, bool is_initializer,
YYLTYPE lhs_loc)
{
void *ctx = state;
bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
+ /* If the assignment LHS comes back as an ir_binop_vector_extract
+ * expression, move it to the RHS as an ir_triop_vector_insert.
+ */
+ if (lhs->ir_type == ir_type_expression) {
+ ir_expression *const expr = lhs->as_expression();
+
+ if (unlikely(expr->operation == ir_binop_vector_extract)) {
+ ir_rvalue *new_rhs =
+ validate_assignment(state, lhs->type, rhs, is_initializer);
+
+ if (new_rhs == NULL) {
+ _mesa_glsl_error(& lhs_loc, state, "type mismatch");
+ return lhs;
+ } else {
+ rhs = new(ctx) ir_expression(ir_triop_vector_insert,
+ expr->operands[0]->type,
+ expr->operands[0],
+ new_rhs,
+ expr->operands[1]);
+ lhs = expr->operands[0]->clone(ctx, NULL);
+ }
+ }
+ }
+
+ ir_variable *lhs_var = lhs->variable_referenced();
+ if (lhs_var)
+ lhs_var->assigned = true;
+
if (!error_emitted) {
- if (lhs->variable_referenced() != NULL
- && lhs->variable_referenced()->read_only) {
+ if (non_lvalue_description != NULL) {
+ _mesa_glsl_error(&lhs_loc, state,
+ "assignment to %s",
+ non_lvalue_description);
+ error_emitted = true;
+ } else if (lhs->variable_referenced() != NULL
+ && lhs->variable_referenced()->read_only) {
_mesa_glsl_error(&lhs_loc, state,
"assignment to read-only variable '%s'",
lhs->variable_referenced()->name);
error_emitted = true;
- } else if (state->language_version <= 110 && lhs->type->is_array()) {
+ } else if (lhs->type->is_array() &&
+ !state->check_version(120, 300, &lhs_loc,
+ "whole array assignment forbidden")) {
/* From page 32 (page 38 of the PDF) of the GLSL 1.10 spec:
*
* "Other binary or unary expressions, non-dereferenced
* arrays, function names, swizzles with repeated fields,
* and constants cannot be l-values."
+ *
+ * The restriction on arrays is lifted in GLSL 1.20 and GLSL ES 3.00.
*/
- _mesa_glsl_error(&lhs_loc, state, "whole array assignment is not "
- "allowed in GLSL 1.10 or GLSL ES 1.00.");
error_emitted = true;
} else if (!lhs->is_lvalue()) {
_mesa_glsl_error(& lhs_loc, state, "non-lvalue in assignment");
@@ -737,13 +799,11 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
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));
+ instructions->push_tail(new(ctx) ir_assignment(deref_var, rhs));
deref_var = new(ctx) ir_dereference_variable(var);
if (!error_emitted)
- instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL));
+ instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var));
return new(ctx) ir_dereference_variable(var);
}
@@ -760,12 +820,7 @@ get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue)
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;
+ lvalue));
return new(ctx) ir_dereference_variable(var);
}
@@ -844,14 +899,11 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
case GLSL_TYPE_ERROR:
case GLSL_TYPE_VOID:
case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_INTERFACE:
/* 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)
@@ -894,7 +946,7 @@ get_scalar_boolean_operand(exec_list *instructions,
* If name refers to a builtin array whose maximum allowed size is less than
* size, report an error and return true. Otherwise return false.
*/
-static bool
+void
check_builtin_array_max_size(const char *name, unsigned size,
YYLTYPE loc, struct _mesa_glsl_parse_state *state)
{
@@ -908,9 +960,43 @@ check_builtin_array_max_size(const char *name, unsigned size,
_mesa_glsl_error(&loc, state, "`gl_TexCoord' array size cannot "
"be larger than gl_MaxTextureCoords (%u)\n",
state->Const.MaxTextureCoords);
- return true;
+ } else if (strcmp("gl_ClipDistance", name) == 0
+ && size > state->Const.MaxClipPlanes) {
+ /* From section 7.1 (Vertex Shader Special Variables) of the
+ * GLSL 1.30 spec:
+ *
+ * "The gl_ClipDistance array is predeclared as unsized and
+ * must be sized by the shader either redeclaring it with a
+ * size or indexing it only with integral constant
+ * expressions. ... The size can be at most
+ * gl_MaxClipDistances."
+ */
+ _mesa_glsl_error(&loc, state, "`gl_ClipDistance' array size cannot "
+ "be larger than gl_MaxClipDistances (%u)\n",
+ state->Const.MaxClipPlanes);
+ }
+}
+
+/**
+ * Create the constant 1, of a which is appropriate for incrementing and
+ * decrementing values of the given GLSL type. For example, if type is vec4,
+ * this creates a constant value of 1.0 having type float.
+ *
+ * If the given type is invalid for increment and decrement operators, return
+ * a floating point 1--the error will be detected later.
+ */
+static ir_rvalue *
+constant_one_for_inc_dec(void *ctx, const glsl_type *type)
+{
+ switch (type->base_type) {
+ case GLSL_TYPE_UINT:
+ return new(ctx) ir_constant((unsigned) 1);
+ case GLSL_TYPE_INT:
+ return new(ctx) ir_constant(1);
+ default:
+ case GLSL_TYPE_FLOAT:
+ return new(ctx) ir_constant(1.0f);
}
- return false;
}
ir_rvalue *
@@ -982,11 +1068,17 @@ ast_expression::hir(exec_list *instructions,
loc = this->get_location();
switch (this->oper) {
+ case ast_aggregate:
+ assert(!"ast_aggregate: Should never get here.");
+ break;
+
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], false,
+ result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
+ op[0], op[1], false,
this->subexpressions[0]->get_location());
error_emitted = result->type->is_error();
break;
@@ -1044,9 +1136,7 @@ ast_expression::hir(exec_list *instructions,
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));
+ if (!state->check_bitwise_operations_allowed(&loc)) {
error_emitted = true;
}
@@ -1100,10 +1190,9 @@ ast_expression::hir(exec_list *instructions,
_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");
+ } else if ((op[0]->type->is_array() || op[1]->type->is_array()) &&
+ !state->check_version(120, 300, &loc,
+ "array comparisons forbidden")) {
error_emitted = true;
}
@@ -1130,8 +1219,7 @@ ast_expression::hir(exec_list *instructions,
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");
+ if (!state->check_bitwise_operations_allowed(&loc)) {
error_emitted = true;
}
@@ -1151,15 +1239,9 @@ ast_expression::hir(exec_list *instructions,
op[1] = get_scalar_boolean_operand(&rhs_instructions, state, this, 1,
"RHS", &error_emitted);
- ir_constant *op0_const = op[0]->constant_expression_value();
- if (op0_const) {
- if (op0_const->value.b[0]) {
- instructions->append_list(&rhs_instructions);
- result = op[1];
- } else {
- result = op0_const;
- }
- type = glsl_type::bool_type;
+ if (rhs_instructions.is_empty()) {
+ result = new(ctx) ir_expression(ir_binop_logic_and, op[0], op[1]);
+ type = result->type;
} else {
ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
"and_tmp",
@@ -1172,12 +1254,12 @@ ast_expression::hir(exec_list *instructions,
stmt->then_instructions.append_list(&rhs_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);
+ new(ctx) ir_assignment(then_deref, op[1]);
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);
+ new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false));
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -1193,14 +1275,9 @@ ast_expression::hir(exec_list *instructions,
op[1] = get_scalar_boolean_operand(&rhs_instructions, state, this, 1,
"RHS", &error_emitted);
- ir_constant *op0_const = op[0]->constant_expression_value();
- if (op0_const) {
- if (op0_const->value.b[0]) {
- result = op0_const;
- } else {
- result = op[1];
- }
- type = glsl_type::bool_type;
+ if (rhs_instructions.is_empty()) {
+ result = new(ctx) ir_expression(ir_binop_logic_or, op[0], op[1]);
+ type = result->type;
} else {
ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type,
"or_tmp",
@@ -1212,13 +1289,13 @@ ast_expression::hir(exec_list *instructions,
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);
+ new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true));
stmt->then_instructions.push_tail(then_assign);
stmt->else_instructions.append_list(&rhs_instructions);
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);
+ new(ctx) ir_assignment(else_deref, op[1]);
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -1266,6 +1343,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = (op[0]->type->is_error());
@@ -1291,6 +1369,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = type->is_error();
@@ -1305,8 +1384,9 @@ ast_expression::hir(exec_list *instructions,
&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, false,
+ result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
break;
@@ -1321,8 +1401,9 @@ ast_expression::hir(exec_list *instructions,
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, false,
+ result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
break;
@@ -1376,9 +1457,10 @@ ast_expression::hir(exec_list *instructions,
* "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.");
+ if (type->is_array() &&
+ !state->check_version(120, 300, &loc,
+ "Second and third operands of ?: operator "
+ "cannot be arrays")) {
error_emitted = true;
}
@@ -1402,14 +1484,14 @@ ast_expression::hir(exec_list *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);
+ new(ctx) ir_assignment(then_deref, op[1]);
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);
+ new(ctx) ir_assignment(else_deref, op[2]);
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -1419,11 +1501,11 @@ ast_expression::hir(exec_list *instructions,
case ast_pre_inc:
case ast_pre_dec: {
+ this->non_lvalue_description = (this->oper == ast_pre_inc)
+ ? "pre-increment operation" : "pre-decrement operation";
+
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);
+ op[1] = constant_one_for_inc_dec(ctx, op[0]->type);
type = arithmetic_result_type(op[0], op[1], false, state, & loc);
@@ -1432,6 +1514,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = op[0]->type->is_error();
@@ -1440,11 +1523,10 @@ ast_expression::hir(exec_list *instructions,
case ast_post_inc:
case ast_post_dec: {
+ this->non_lvalue_description = (this->oper == ast_post_inc)
+ ? "post-increment operation" : "post-decrement operation";
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);
+ op[1] = constant_one_for_inc_dec(ctx, op[0]->type);
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
@@ -1460,6 +1542,7 @@ ast_expression::hir(exec_list *instructions,
result = get_lvalue_copy(instructions, op[0]->clone(ctx, NULL));
(void)do_assignment(instructions, state,
+ this->subexpressions[0]->non_lvalue_description,
op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
@@ -1477,160 +1560,11 @@ ast_expression::hir(exec_list *instructions,
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;
-
+ result = _mesa_ast_array_index_to_hir(ctx, state, op[0], op[1],
+ loc, index_loc);
- 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");
+ if (result->type->is_error())
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;
-
- /* Check whether this access will, as a side effect, implicitly
- * cause the size of a built-in array to be too large.
- */
- if (check_builtin_array_max_size(v->name, idx+1, loc, state))
- error_emitted = true;
- }
- }
- } 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() - 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;
break;
}
@@ -1650,14 +1584,14 @@ ast_expression::hir(exec_list *instructions,
ir_variable *var =
state->symbols->get_variable(this->primary_expression.identifier);
- result = new(ctx) ir_dereference_variable(var);
-
if (var != NULL) {
var->used = true;
+ result = new(ctx) ir_dereference_variable(var);
} else {
_mesa_glsl_error(& loc, state, "`%s' undeclared",
this->primary_expression.identifier);
+ result = ir_rvalue::error_value(ctx);
error_emitted = true;
}
break;
@@ -1790,7 +1724,20 @@ process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
{
unsigned length = 0;
- /* FINISHME: Reject delcarations of multidimensional arrays. */
+ if (base == NULL)
+ return glsl_type::error_type;
+
+ /* From page 19 (page 25) of the GLSL 1.20 spec:
+ *
+ * "Only one-dimensional arrays may be declared."
+ */
+ if (base->is_array()) {
+ _mesa_glsl_error(loc, state,
+ "invalid array of `%s' (only one-dimensional arrays "
+ "may be declared)",
+ base->name);
+ return glsl_type::error_type;
+ }
if (array_size != NULL) {
exec_list dummy_instructions;
@@ -1824,15 +1771,10 @@ process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
}
}
}
- } 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 *array_type = glsl_type::get_array_instance(base, length);
+ return array_type != NULL ? array_type : glsl_type::error_type;
}
@@ -1853,12 +1795,176 @@ ast_type_specifier::glsl_type(const char **name,
return type;
}
+const glsl_type *
+ast_fully_specified_type::glsl_type(const char **name,
+ struct _mesa_glsl_parse_state *state) const
+{
+ const struct glsl_type *type = this->specifier->glsl_type(name, state);
+
+ if (type == NULL)
+ return NULL;
+
+ if (type->base_type == GLSL_TYPE_FLOAT
+ && state->es_shader
+ && state->target == fragment_shader
+ && this->qualifier.precision == ast_precision_none
+ && state->symbols->get_variable("#default precision") == NULL) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(&loc, state,
+ "no precision specified this scope for type `%s'",
+ type->name);
+ }
+
+ return type;
+}
+
+/**
+ * Determine whether a toplevel variable declaration declares a varying. This
+ * function operates by examining the variable's mode and the shader target,
+ * so it correctly identifies linkage variables regardless of whether they are
+ * declared using the deprecated "varying" syntax or the new "in/out" syntax.
+ *
+ * Passing a non-toplevel variable declaration (e.g. a function parameter) to
+ * this function will produce undefined results.
+ */
+static bool
+is_varying_var(ir_variable *var, _mesa_glsl_parser_targets target)
+{
+ switch (target) {
+ case vertex_shader:
+ return var->mode == ir_var_shader_out;
+ case fragment_shader:
+ return var->mode == ir_var_shader_in;
+ default:
+ return var->mode == ir_var_shader_out || var->mode == ir_var_shader_in;
+ }
+}
+
+
+/**
+ * Matrix layout qualifiers are only allowed on certain types
+ */
+static void
+validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state,
+ YYLTYPE *loc,
+ const glsl_type *type,
+ ir_variable *var)
+{
+ if (var && !var->is_in_uniform_block()) {
+ /* Layout qualifiers may only apply to interface blocks and fields in
+ * them.
+ */
+ _mesa_glsl_error(loc, state,
+ "uniform block layout qualifiers row_major and "
+ "column_major may not be applied to variables "
+ "outside of uniform blocks");
+ } else if (!type->is_matrix()) {
+ /* The OpenGL ES 3.0 conformance tests did not originally allow
+ * matrix layout qualifiers on non-matrices. However, the OpenGL
+ * 4.4 and OpenGL ES 3.0 (revision TBD) specifications were
+ * amended to specifically allow these layouts on all types. Emit
+ * a warning so that people know their code may not be portable.
+ */
+ _mesa_glsl_warning(loc, state,
+ "uniform block layout qualifiers row_major and "
+ "column_major applied to non-matrix types may "
+ "be rejected by older compilers");
+ } else if (type->is_record()) {
+ /* We allow 'layout(row_major)' on structure types because it's the only
+ * way to get row-major layouts on matrices contained in structures.
+ */
+ _mesa_glsl_warning(loc, state,
+ "uniform block layout qualifiers row_major and "
+ "column_major applied to structure types is not "
+ "strictly conformant and may be rejected by other "
+ "compilers");
+ }
+}
+
+static bool
+validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
+ YYLTYPE *loc,
+ ir_variable *var,
+ const ast_type_qualifier *qual)
+{
+ if (var->mode != ir_var_uniform) {
+ _mesa_glsl_error(loc, state,
+ "the \"binding\" qualifier only applies to uniforms.\n");
+ return false;
+ }
+
+ if (qual->binding < 0) {
+ _mesa_glsl_error(loc, state, "binding values must be >= 0.\n");
+ return false;
+ }
+
+ const struct gl_context *const ctx = state->ctx;
+ unsigned elements = var->type->is_array() ? var->type->length : 1;
+ unsigned max_index = qual->binding + elements - 1;
+
+ if (var->type->is_interface()) {
+ /* UBOs. From page 60 of the GLSL 4.20 specification:
+ * "If the binding point for any uniform block instance is less than zero,
+ * or greater than or equal to the implementation-dependent maximum
+ * number of uniform buffer bindings, a compilation error will occur.
+ * When the binding identifier is used with a uniform block instanced as
+ * an array of size N, all elements of the array from binding through
+ * binding + N – 1 must be within this range."
+ *
+ * The implementation-dependent maximum is GL_MAX_UNIFORM_BUFFER_BINDINGS.
+ */
+ if (max_index >= ctx->Const.MaxUniformBufferBindings) {
+ _mesa_glsl_error(loc, state, "layout(binding = %d) for %d UBOs exceeds "
+ "the maximum number of UBO binding points (%d).\n",
+ qual->binding, elements,
+ ctx->Const.MaxUniformBufferBindings);
+ return false;
+ }
+ } else if (var->type->is_sampler() ||
+ (var->type->is_array() && var->type->fields.array->is_sampler())) {
+ /* Samplers. From page 63 of the GLSL 4.20 specification:
+ * "If the binding is less than zero, or greater than or equal to the
+ * implementation-dependent maximum supported number of units, a
+ * compilation error will occur. When the binding identifier is used
+ * with an array of size N, all elements of the array from binding
+ * through binding + N - 1 must be within this range."
+ */
+ unsigned limit;
+ switch (state->target) {
+ case vertex_shader:
+ limit = ctx->Const.VertexProgram.MaxTextureImageUnits;
+ break;
+ case geometry_shader:
+ limit = ctx->Const.GeometryProgram.MaxTextureImageUnits;
+ break;
+ case fragment_shader:
+ limit = ctx->Const.FragmentProgram.MaxTextureImageUnits;
+ break;
+ }
+
+ if (max_index >= limit) {
+ _mesa_glsl_error(loc, state, "layout(binding = %d) for %d samplers "
+ "exceeds the maximum number of texture image units "
+ "(%d).\n", qual->binding, elements, limit);
+
+ return false;
+ }
+ } else {
+ _mesa_glsl_error(loc, state,
+ "the \"binding\" qualifier only applies to uniform "
+ "blocks, samplers, or arrays of samplers.\n");
+ return false;
+ }
+
+ return true;
+}
static void
apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
ir_variable *var,
struct _mesa_glsl_parse_state *state,
- YYLTYPE *loc)
+ YYLTYPE *loc,
+ bool is_parameter)
{
if (qual->flags.q.invariant) {
if (var->used) {
@@ -1887,64 +1993,121 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
_mesa_glsl_shader_target_name(state->target));
}
- /* From page 25 (page 31 of the PDF) of the GLSL 1.10 spec:
+ /* Section 6.1.1 (Function Calling Conventions) of the GLSL 1.10 spec says:
+ *
+ * "However, the const qualifier cannot be used with out or inout."
+ *
+ * The same section of the GLSL 4.40 spec further clarifies this saying:
*
- * "The varying qualifier can be used only with the data types
- * float, vec2, vec3, vec4, mat2, mat3, and mat4, or arrays of
- * these."
+ * "The const qualifier cannot be used with out or inout, or a
+ * compile-time error results."
*/
- 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 (is_parameter && qual->flags.q.constant && qual->flags.q.out) {
+ _mesa_glsl_error(loc, state,
+ "`const' may not be applied to `out' or `inout' "
+ "function parameters");
}
/* 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
+ var->mode = ir_var_function_inout;
+ else if (qual->flags.q.in)
+ var->mode = is_parameter ? ir_var_function_in : ir_var_shader_in;
+ else if (qual->flags.q.attribute
|| (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;
+ var->mode = ir_var_shader_in;
+ else if (qual->flags.q.out)
+ var->mode = is_parameter ? ir_var_function_out : ir_var_shader_out;
+ else if (qual->flags.q.varying && (state->target == vertex_shader))
+ var->mode = ir_var_shader_out;
else if (qual->flags.q.uniform)
var->mode = ir_var_uniform;
+ if (!is_parameter && is_varying_var(var, state->target)) {
+ /* This variable is being used to link data between shader stages (in
+ * pre-glsl-1.30 parlance, it's a "varying"). Check that it has a type
+ * that is allowed for such purposes.
+ *
+ * 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."
+ *
+ * This was relaxed in GLSL version 1.30 and GLSL ES version 3.00. From
+ * page 31 (page 37 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "Fragment inputs can only be signed and unsigned integers and
+ * integer vectors, float, floating-point vectors, matrices, or
+ * arrays of these. Structures cannot be input.
+ *
+ * Similar text exists in the section on vertex shader outputs.
+ *
+ * Similar text exists in the GLSL ES 3.00 spec, except that the GLSL ES
+ * 3.00 spec allows structs as well. Varying structs are also allowed
+ * in GLSL 1.50.
+ */
+ switch (var->type->get_scalar_type()->base_type) {
+ case GLSL_TYPE_FLOAT:
+ /* Ok in all GLSL versions */
+ break;
+ case GLSL_TYPE_UINT:
+ case GLSL_TYPE_INT:
+ if (state->is_version(130, 300))
+ break;
+ _mesa_glsl_error(loc, state,
+ "varying variables must be of base type float in %s",
+ state->get_version_string());
+ break;
+ case GLSL_TYPE_STRUCT:
+ if (state->is_version(150, 300))
+ break;
+ _mesa_glsl_error(loc, state,
+ "varying variables may not be of type struct");
+ break;
+ default:
+ _mesa_glsl_error(loc, state, "illegal type for a varying variable");
+ break;
+ }
+ }
+
if (state->all_invariant && (state->current_function == NULL)) {
switch (state->target) {
case vertex_shader:
- if (var->mode == ir_var_out)
+ if (var->mode == ir_var_shader_out)
var->invariant = true;
break;
case geometry_shader:
- if ((var->mode == ir_var_in) || (var->mode == ir_var_out))
+ if ((var->mode == ir_var_shader_in)
+ || (var->mode == ir_var_shader_out))
var->invariant = true;
break;
case fragment_shader:
- if (var->mode == ir_var_in)
+ if (var->mode == ir_var_shader_in)
var->invariant = true;
break;
}
}
if (qual->flags.q.flat)
- var->interpolation = ir_var_flat;
+ var->interpolation = INTERP_QUALIFIER_FLAT;
else if (qual->flags.q.noperspective)
- var->interpolation = ir_var_noperspective;
+ var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+ else if (qual->flags.q.smooth)
+ var->interpolation = INTERP_QUALIFIER_SMOOTH;
else
- var->interpolation = ir_var_smooth;
+ var->interpolation = INTERP_QUALIFIER_NONE;
+
+ if (var->interpolation != INTERP_QUALIFIER_NONE &&
+ !(state->target == vertex_shader && var->mode == ir_var_shader_out) &&
+ !(state->target == fragment_shader && var->mode == ir_var_shader_in)) {
+ _mesa_glsl_error(loc, state,
+ "interpolation qualifier `%s' can only be applied to "
+ "vertex shader outputs and fragment shader inputs.",
+ var->interpolation_string());
+ }
var->pixel_center_integer = qual->flags.q.pixel_center_integer;
var->origin_upper_left = qual->flags.q.origin_upper_left;
@@ -1972,7 +2135,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
*/
switch (state->target) {
case vertex_shader:
- if (!global_scope || (var->mode != ir_var_in)) {
+ if (!global_scope || (var->mode != ir_var_shader_in)) {
fail = true;
string = "input";
}
@@ -1985,7 +2148,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
break;
case fragment_shader:
- if (!global_scope || (var->mode != ir_var_out)) {
+ if (!global_scope || (var->mode != ir_var_shader_out)) {
fail = true;
string = "output";
}
@@ -2015,14 +2178,36 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
} else {
var->location = qual->location;
}
+
+ if (qual->flags.q.explicit_index) {
+ /* From the GLSL 4.30 specification, section 4.4.2 (Output
+ * Layout Qualifiers):
+ *
+ * "It is also a compile-time error if a fragment shader
+ * sets a layout index to less than 0 or greater than 1."
+ *
+ * Older specifications don't mandate a behavior; we take
+ * this as a clarification and always generate the error.
+ */
+ if (qual->index < 0 || qual->index > 1) {
+ _mesa_glsl_error(loc, state,
+ "explicit index may only be 0 or 1\n");
+ } else {
+ var->explicit_index = true;
+ var->index = qual->index;
+ }
+ }
}
+ } else if (qual->flags.q.explicit_index) {
+ _mesa_glsl_error(loc, state,
+ "explicit index requires explicit location\n");
}
- /* Does the declaration use the 'layout' keyword?
- */
- const bool uses_layout = qual->flags.q.pixel_center_integer
- || qual->flags.q.origin_upper_left
- || qual->flags.q.explicit_location;
+ if (qual->flags.q.explicit_binding &&
+ validate_binding_qualifier(state, loc, var, qual)) {
+ var->explicit_binding = true;
+ var->binding = qual->binding;
+ }
/* Does the declaration use the deprecated 'attribute' or 'varying'
* keywords?
@@ -2040,6 +2225,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
* The following extension do not allow the deprecated keywords:
*
* GL_AMD_conservative_depth
+ * GL_ARB_conservative_depth
* GL_ARB_gpu_shader5
* GL_ARB_separate_shader_objects
* GL_ARB_tesselation_shader
@@ -2052,7 +2238,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
const bool relaxed_layout_qualifier_checking =
state->ARB_fragment_coord_conventions_enable;
- if (uses_layout && uses_deprecated_qualifier) {
+ if (qual->has_layout() && uses_deprecated_qualifier) {
if (relaxed_layout_qualifier_checking) {
_mesa_glsl_warning(loc, state,
"`layout' qualifier may not be used with "
@@ -2072,9 +2258,11 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
+ qual->flags.q.depth_less
+ qual->flags.q.depth_unchanged;
if (depth_layout_count > 0
- && !state->AMD_conservative_depth_enable) {
+ && !state->AMD_conservative_depth_enable
+ && !state->ARB_conservative_depth_enable) {
_mesa_glsl_error(loc, state,
- "extension GL_AMD_conservative_depth must be enabled "
+ "extension GL_AMD_conservative_depth or "
+ "GL_ARB_conservative_depth must be enabled "
"to use depth layout qualifiers");
} else if (depth_layout_count > 0
&& strcmp(var->name, "gl_FragDepth") != 0) {
@@ -2097,6 +2285,19 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
var->depth_layout = ir_depth_layout_unchanged;
else
var->depth_layout = ir_depth_layout_none;
+
+ if (qual->flags.q.std140 ||
+ qual->flags.q.packed ||
+ qual->flags.q.shared) {
+ _mesa_glsl_error(loc, state,
+ "uniform block layout qualifiers std140, packed, and "
+ "shared can only be applied to uniform blocks, not "
+ "members");
+ }
+
+ if (qual->flags.q.row_major || qual->flags.q.column_major) {
+ validate_matrix_layout_for_type(state, loc, var->type, var);
+ }
}
/**
@@ -2175,7 +2376,7 @@ get_variable_being_redeclared(ir_variable *var, ast_declaration *decl,
* * gl_Color
* * gl_SecondaryColor
*/
- } else if (state->language_version >= 130
+ } else if (state->is_version(130, 0)
&& (strcmp(var->name, "gl_FrontColor") == 0
|| strcmp(var->name, "gl_BackColor") == 0
|| strcmp(var->name, "gl_FrontSecondaryColor") == 0
@@ -2187,7 +2388,8 @@ get_variable_being_redeclared(ir_variable *var, ast_declaration *decl,
earlier->interpolation = var->interpolation;
/* Layout qualifiers for gl_FragDepth. */
- } else if (state->AMD_conservative_depth_enable
+ } else if ((state->AMD_conservative_depth_enable ||
+ state->ARB_conservative_depth_enable)
&& strcmp(var->name, "gl_FragDepth") == 0
&& earlier->type == var->type
&& earlier->mode == var->mode) {
@@ -2241,10 +2443,9 @@ process_initializer(ir_variable *var, ast_declaration *decl,
* 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->mode == ir_var_uniform) {
+ state->check_version(120, 0, &initializer_loc,
+ "cannot initialize uniforms");
}
if (var->type->is_sampler()) {
@@ -2252,7 +2453,7 @@ process_initializer(ir_variable *var, ast_declaration *decl,
"cannot initialize samplers");
}
- if ((var->mode == ir_var_in) && (state->current_function == NULL)) {
+ if ((var->mode == ir_var_shader_in) && (state->current_function == NULL)) {
_mesa_glsl_error(& initializer_loc, state,
"cannot initialize %s shader input / %s",
_mesa_glsl_shader_target_name(state->target),
@@ -2275,17 +2476,25 @@ process_initializer(ir_variable *var, ast_declaration *decl,
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",
- (type->qualifier.flags.q.constant)
- ? "const" : "uniform",
- decl->identifier);
- if (var->type->is_numeric()) {
- /* Reduce cascading errors. */
- var->constant_value = ir_constant::zero(state, var->type);
- }
- } else {
+ /* If ARB_shading_language_420pack is enabled, initializers of
+ * const-qualified local variables do not have to be constant
+ * expressions. Const-qualified global variables must still be
+ * initialized with constant expressions.
+ */
+ if (!state->ARB_shading_language_420pack_enable
+ || state->current_function == NULL) {
+ _mesa_glsl_error(& initializer_loc, state,
+ "initializer of %s variable `%s' must be a "
+ "constant expression",
+ (type->qualifier.flags.q.constant)
+ ? "const" : "uniform",
+ decl->identifier);
+ if (var->type->is_numeric()) {
+ /* Reduce cascading errors. */
+ var->constant_value = ir_constant::zero(state, var->type);
+ }
+ }
+ } else {
rhs = constant_value;
var->constant_value = constant_value;
}
@@ -2311,12 +2520,16 @@ process_initializer(ir_variable *var, ast_declaration *decl,
const glsl_type *initializer_type;
if (!type->qualifier.flags.q.uniform) {
result = do_assignment(initializer_instructions, state,
+ NULL,
lhs, rhs, true,
type->get_location());
initializer_type = result->type;
} else
initializer_type = rhs->type;
+ var->constant_initializer = rhs->constant_expression_value();
+ var->has_initializer = true;
+
/* If the declared variable is an unsized array, it must inherrit
* its full type from the initializer. A declaration such as
*
@@ -2387,12 +2600,12 @@ ast_declarator_list::hir(exec_list *instructions,
"Undeclared variable `%s' cannot be marked "
"invariant\n", decl->identifier);
} else if ((state->target == vertex_shader)
- && (earlier->mode != ir_var_out)) {
+ && (earlier->mode != ir_var_shader_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)) {
+ && (earlier->mode != ir_var_shader_in)) {
_mesa_glsl_error(& loc, state,
"`%s' cannot be marked invariant, fragment shader "
"inputs only\n", decl->identifier);
@@ -2419,16 +2632,58 @@ ast_declarator_list::hir(exec_list *instructions,
*/
(void) this->type->specifier->hir(instructions, state);
- decl_type = this->type->specifier->glsl_type(& type_name, state);
+ decl_type = this->type->glsl_type(& type_name, state);
if (this->declarations.is_empty()) {
- if (decl_type != NULL) {
- /* Warn if this empty declaration is not for declaring a structure.
- */
- if (this->type->specifier->structure == NULL) {
- _mesa_glsl_warning(&loc, state, "empty declaration");
- }
+ /* If there is no structure involved in the program text, there are two
+ * possible scenarios:
+ *
+ * - The program text contained something like 'vec4;'. This is an
+ * empty declaration. It is valid but weird. Emit a warning.
+ *
+ * - The program text contained something like 'S;' and 'S' is not the
+ * name of a known structure type. This is both invalid and weird.
+ * Emit an error.
+ *
+ * - The program text contained something like 'mediump float;'
+ * when the programmer probably meant 'precision mediump
+ * float;' Emit a warning with a description of what they
+ * probably meant to do.
+ *
+ * Note that if decl_type is NULL and there is a structure involved,
+ * there must have been some sort of error with the structure. In this
+ * case we assume that an error was already generated on this line of
+ * code for the structure. There is no need to generate an additional,
+ * confusing error.
+ */
+ assert(this->type->specifier->structure == NULL || decl_type != NULL
+ || state->error);
+
+ if (decl_type == NULL) {
+ _mesa_glsl_error(&loc, state,
+ "invalid type `%s' in empty declaration",
+ type_name);
+ } else if (this->type->qualifier.precision != ast_precision_none) {
+ if (this->type->specifier->structure != NULL) {
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers can't be applied "
+ "to structures");
+ } else {
+ static const char *const precision_names[] = {
+ "highp",
+ "highp",
+ "mediump",
+ "lowp"
+ };
+
+ _mesa_glsl_warning(&loc, state,
+ "empty declaration with precision qualifier, "
+ "to set the default precision, use "
+ "`precision %s %s;'",
+ precision_names[this->type->qualifier.precision],
+ type_name);
+ }
} else {
- _mesa_glsl_error(& loc, state, "incomplete declaration");
+ _mesa_glsl_warning(&loc, state, "empty declaration");
}
}
@@ -2456,6 +2711,8 @@ ast_declarator_list::hir(exec_list *instructions,
if (decl->is_array) {
var_type = process_array_type(&loc, decl_type, decl->array_size,
state);
+ if (var_type->is_error())
+ continue;
} else {
var_type = decl_type;
}
@@ -2470,41 +2727,38 @@ ast_declarator_list::hir(exec_list *instructions,
*
* Local variables can only use the qualifier const."
*
- * This is relaxed in GLSL 1.30. It is also relaxed by any extension
- * that adds the 'layout' keyword.
+ * This is relaxed in GLSL 1.30 and GLSL ES 3.00. It is also relaxed by
+ * any extension that adds the 'layout' keyword.
*/
- if ((state->language_version < 130)
+ if (!state->is_version(130, 300)
&& !state->ARB_explicit_attrib_location_enable
&& !state->ARB_fragment_coord_conventions_enable) {
if (this->type->qualifier.flags.q.out) {
_mesa_glsl_error(& loc, state,
"`out' qualifier in declaration of `%s' "
"only valid for function parameters in %s.",
- decl->identifier, state->version_string);
+ decl->identifier, state->get_version_string());
}
if (this->type->qualifier.flags.q.in) {
_mesa_glsl_error(& loc, state,
"`in' qualifier in declaration of `%s' "
"only valid for function parameters in %s.",
- decl->identifier, state->version_string);
+ decl->identifier, state->get_version_string());
}
/* FINISHME: Test for other invalid qualifiers. */
}
apply_type_qualifier_to_variable(& this->type->qualifier, var, state,
- & loc);
+ & loc, false);
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
- */
+ if ((state->target == vertex_shader) &&
+ var->mode != ir_var_shader_out) {
_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)) {
+ var->mode != ir_var_shader_in) {
/* FINISHME: Note that this doesn't work for invariant on
* a function signature inval
*/
@@ -2541,7 +2795,7 @@ ast_declarator_list::hir(exec_list *instructions,
"global scope%s",
mode, var->name, extra);
}
- } else if (var->mode == ir_var_in) {
+ } else if (var->mode == ir_var_shader_in) {
var->read_only = true;
if (state->target == vertex_shader) {
@@ -2565,6 +2819,13 @@ ast_declarator_list::hir(exec_list *instructions,
* "The attribute qualifier can be used only with float,
* floating-point vectors, and matrices. Attribute variables
* cannot be declared as arrays or structures."
+ *
+ * From page 33 (page 39 of the PDF) of the GLSL ES 3.00 spec:
+ *
+ * "Vertex shader inputs can only be float, floating-point
+ * vectors, matrices, signed and unsigned integers and integer
+ * vectors. Vertex shader inputs cannot be arrays or
+ * structures."
*/
const glsl_type *check_type = var->type->is_array()
? var->type->fields.array : var->type;
@@ -2574,7 +2835,7 @@ ast_declarator_list::hir(exec_list *instructions,
break;
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
- if (state->language_version > 120)
+ if (state->is_version(120, 300))
break;
/* FALLTHROUGH */
default:
@@ -2586,32 +2847,55 @@ ast_declarator_list::hir(exec_list *instructions,
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");
+ if (!error_emitted && var->type->is_array() &&
+ !state->check_version(150, 0, &loc,
+ "vertex shader input / attribute "
+ "cannot have array type")) {
error_emitted = true;
}
}
}
- /* Integer vertex outputs must be qualified with 'flat'.
+ /* Integer fragment inputs must be qualified with 'flat'. In GLSL ES,
+ * so must integer vertex outputs.
*
- * From section 4.3.6 of the GLSL 1.30 spec:
- * "If a vertex output is a signed or unsigned integer or integer
- * vector, then it must be qualified with the interpolation qualifier
+ * From section 4.3.4 ("Inputs") of the GLSL 1.50 spec:
+ * "Fragment shader inputs that are signed or unsigned integers or
+ * integer vectors must be qualified with the interpolation qualifier
* flat."
+ *
+ * From section 4.3.4 ("Input Variables") of the GLSL 3.00 ES spec:
+ * "Fragment shader inputs that are, or contain, signed or unsigned
+ * integers or integer vectors must be qualified with the
+ * interpolation qualifier flat."
+ *
+ * From section 4.3.6 ("Output Variables") of the GLSL 3.00 ES spec:
+ * "Vertex shader outputs that are, or contain, signed or unsigned
+ * integers or integer vectors must be qualified with the
+ * interpolation qualifier flat."
+ *
+ * Note that prior to GLSL 1.50, this requirement applied to vertex
+ * outputs rather than fragment inputs. That creates problems in the
+ * presence of geometry shaders, so we adopt the GLSL 1.50 rule for all
+ * desktop GL shaders. For GLSL ES shaders, we follow the spec and
+ * apply the restriction to both vertex outputs and fragment inputs.
+ *
+ * Note also that the desktop GLSL specs are missing the text "or
+ * contain"; this is presumably an oversight, since there is no
+ * reasonable way to interpolate a fragment shader input that contains
+ * an integer.
*/
- if (state->language_version >= 130
- && state->target == vertex_shader
- && state->current_function == NULL
- && var->type->is_integer()
- && var->mode == ir_var_out
- && var->interpolation != ir_var_flat) {
-
- _mesa_glsl_error(&loc, state, "If a vertex output is an integer, "
- "then it must be qualified with 'flat'");
+ if (state->is_version(130, 300) &&
+ var->type->contains_integer() &&
+ var->interpolation != INTERP_QUALIFIER_FLAT &&
+ ((state->target == fragment_shader && var->mode == ir_var_shader_in)
+ || (state->target == vertex_shader && var->mode == ir_var_shader_out
+ && state->es_shader))) {
+ const char *var_type = (state->target == vertex_shader) ?
+ "vertex output" : "fragment input";
+ _mesa_glsl_error(&loc, state, "If a %s is (or contains) "
+ "an integer, then it must be qualified with 'flat'",
+ var_type);
}
@@ -2622,8 +2906,10 @@ ast_declarator_list::hir(exec_list *instructions,
* "interpolation qualifiers may only precede the qualifiers in,
* centroid in, out, or centroid out in a declaration. They do not apply
* to the deprecated storage qualifiers varying or centroid varying."
+ *
+ * These deprecated storage qualifiers do not exist in GLSL ES 3.00.
*/
- if (state->language_version >= 130
+ if (state->is_version(130, 0)
&& this->type->qualifier.has_interpolation()
&& this->type->qualifier.flags.q.varying) {
@@ -2648,8 +2934,14 @@ ast_declarator_list::hir(exec_list *instructions,
* "Outputs from a vertex shader (out) and inputs to a fragment
* shader (in) can be further qualified with one or more of these
* interpolation qualifiers"
+ *
+ * From page 31 (page 37 of the PDF) of the GLSL ES 3.00 spec:
+ * "These interpolation qualifiers may only precede the qualifiers
+ * in, centroid in, out, or centroid out in a declaration. They do
+ * not apply to inputs into a vertex shader or outputs from a
+ * fragment shader."
*/
- if (state->language_version >= 130
+ if (state->is_version(130, 300)
&& this->type->qualifier.has_interpolation()) {
const char *i = this->type->qualifier.interpolation_string();
@@ -2678,8 +2970,12 @@ ast_declarator_list::hir(exec_list *instructions,
/* From section 4.3.4 of the GLSL 1.30 spec:
* "It is an error to use centroid in in a vertex shader."
+ *
+ * From section 4.3.4 of the GLSL ES 3.00 spec:
+ * "It is an error to use centroid in or interpolation qualifiers in
+ * a vertex shader input."
*/
- if (state->language_version >= 130
+ if (state->is_version(130, 300)
&& this->type->qualifier.flags.q.centroid
&& this->type->qualifier.flags.q.in
&& state->target == vertex_shader) {
@@ -2688,16 +2984,25 @@ ast_declarator_list::hir(exec_list *instructions,
"'centroid in' cannot be used in a vertex shader");
}
+ /* Section 4.3.6 of the GLSL 1.30 specification states:
+ * "It is an error to use centroid out in a fragment shader."
+ *
+ * The GL_ARB_shading_language_420pack extension specification states:
+ * "It is an error to use auxiliary storage qualifiers or interpolation
+ * qualifiers on an output in a fragment shader."
+ */
+ if (state->target == fragment_shader &&
+ this->type->qualifier.flags.q.out &&
+ this->type->qualifier.has_auxiliary_storage()) {
+ _mesa_glsl_error(&loc, state,
+ "auxiliary storage qualifiers cannot be used on "
+ "fragment shader outputs");
+ }
/* Precision qualifiers exists only in GLSL versions 1.00 and >= 1.30.
*/
- if (this->type->specifier->precision != ast_precision_none
- && state->language_version != 100
- && state->language_version < 130) {
-
- _mesa_glsl_error(&loc, state,
- "precision qualifiers are supported only in GLSL ES "
- "1.00, and GLSL 1.30 and later");
+ if (this->type->qualifier.precision != ast_precision_none) {
+ state->check_precision_qualifiers_allowed(&loc);
}
@@ -2714,9 +3019,10 @@ ast_declarator_list::hir(exec_list *instructions,
* From page 87 of the GLSL ES spec:
* "RESOLUTION: Allow sampler types to take a precision qualifier."
*/
- if (this->type->specifier->precision != ast_precision_none
+ if (this->type->qualifier.precision != ast_precision_none
&& !var->type->is_float()
&& !var->type->is_integer()
+ && !var->type->is_record()
&& !(var->type->is_sampler() && state->es_shader)
&& !(var->type->is_array()
&& (var->type->fields.array->is_float()
@@ -2766,6 +3072,33 @@ ast_declarator_list::hir(exec_list *instructions,
decl->identifier);
}
+ if (state->es_shader) {
+ const glsl_type *const t = (earlier == NULL)
+ ? var->type : earlier->type;
+
+ if (t->is_array() && t->length == 0)
+ /* Section 10.17 of the GLSL ES 1.00 specification states that
+ * unsized array declarations have been removed from the language.
+ * Arrays that are sized using an initializer are still explicitly
+ * sized. However, GLSL ES 1.00 does not allow array
+ * initializers. That is only allowed in GLSL ES 3.00.
+ *
+ * Section 4.1.9 (Arrays) of the GLSL ES 3.00 spec says:
+ *
+ * "An array type can also be formed without specifying a size
+ * if the definition includes an initializer:
+ *
+ * float x[] = float[2] (1.0, 2.0); // declares an array of size 2
+ * float y[] = float[] (1.0, 2.0, 3.0); // declares an array of size 3
+ *
+ * float a[5];
+ * float b[] = a;"
+ */
+ _mesa_glsl_error(& loc, state,
+ "unsized array declarations are not allowed in "
+ "GLSL ES");
+ }
+
/* If the declaration is not a redeclaration, there are a few additional
* semantic checks that must be applied. In addition, variable that was
* created for the declaration should be added to the IR stream.
@@ -2781,6 +3114,18 @@ ast_declarator_list::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state,
"identifier `%s' uses reserved `gl_' prefix",
decl->identifier);
+ else if (strstr(decl->identifier, "__")) {
+ /* From page 14 (page 20 of the PDF) of the GLSL 1.10
+ * spec:
+ *
+ * "In addition, all identifiers containing two
+ * consecutive underscores (__) are reserved as
+ * possible future keywords."
+ */
+ _mesa_glsl_error(& loc, state,
+ "identifier `%s' uses reserved `__' string",
+ 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
@@ -2836,7 +3181,7 @@ ast_parameter_declarator::hir(exec_list *instructions,
const char *name = NULL;
YYLTYPE loc = this->get_location();
- type = this->type->specifier->glsl_type(& name, state);
+ type = this->type->glsl_type(& name, state);
if (type == NULL) {
if (name != NULL) {
@@ -2885,19 +3230,21 @@ ast_parameter_declarator::hir(exec_list *instructions,
type = process_array_type(&loc, type, this->array_size, state);
}
- if (type->array_size() == 0) {
+ if (!type->is_error() && 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);
+ ir_variable *var = new(ctx)
+ ir_variable(type, this->identifier, ir_var_function_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);
+ apply_type_qualifier_to_variable(& this->type->qualifier, var, state, & loc,
+ true);
/* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec:
*
@@ -2905,7 +3252,7 @@ ast_parameter_declarator::hir(exec_list *instructions,
* as out or inout function parameters, nor can they be assigned
* into."
*/
- if ((var->mode == ir_var_inout || var->mode == ir_var_out)
+ if ((var->mode == ir_var_function_inout || var->mode == ir_var_function_out)
&& type->contains_sampler()) {
_mesa_glsl_error(&loc, state, "out and inout parameters cannot contain samplers");
type = glsl_type::error_type;
@@ -2925,9 +3272,10 @@ ast_parameter_declarator::hir(exec_list *instructions,
* So for GLSL 1.10, passing an array as an out or inout parameter is not
* allowed. This restriction is removed in GLSL 1.20, and in GLSL ES.
*/
- if ((var->mode == ir_var_inout || var->mode == ir_var_out)
- && type->is_array() && state->language_version == 110) {
- _mesa_glsl_error(&loc, state, "Arrays cannot be out or inout parameters in GLSL 1.10");
+ if ((var->mode == ir_var_function_inout || var->mode == ir_var_function_out)
+ && type->is_array()
+ && !state->check_version(120, 100, &loc,
+ "Arrays cannot be out or inout parameters")) {
type = glsl_type::error_type;
}
@@ -2992,6 +3340,12 @@ ast_function::hir(exec_list *instructions,
const char *const name = identifier;
+ /* New functions are always added to the top-level IR instruction stream,
+ * so this instruction list pointer is ignored. See also emit_function
+ * (called below).
+ */
+ (void) instructions;
+
/* From page 21 (page 27 of the PDF) of the GLSL 1.20 spec,
*
* "Function declarations (prototypes) cannot occur inside of functions;
@@ -3004,7 +3358,8 @@ ast_function::hir(exec_list *instructions,
*
* Note that this language does not appear in GLSL 1.10.
*/
- if ((state->current_function != NULL) && (state->language_version != 110)) {
+ if ((state->current_function != NULL) &&
+ state->is_version(120, 100)) {
YYLTYPE loc = this->get_location();
_mesa_glsl_error(&loc, state,
"declaration of function `%s' not allowed within "
@@ -3033,7 +3388,7 @@ ast_function::hir(exec_list *instructions,
const char *return_type_name;
const glsl_type *return_type =
- this->return_type->specifier->glsl_type(& return_type_name, state);
+ this->return_type->glsl_type(& return_type_name, state);
if (!return_type) {
YYLTYPE loc = this->get_location();
@@ -3052,6 +3407,18 @@ ast_function::hir(exec_list *instructions,
"function `%s' return type has qualifiers", name);
}
+ /* Section 6.1 (Function Definitions) of the GLSL 1.20 spec says:
+ *
+ * "Arrays are allowed as arguments and as the return type. In both
+ * cases, the array must be explicitly sized."
+ */
+ if (return_type->is_array() && return_type->length == 0) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(& loc, state,
+ "function `%s' return type array must be explicitly "
+ "sized", name);
+ }
+
/* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec:
*
* "[Sampler types] can only be declared as function parameters
@@ -3087,10 +3454,17 @@ ast_function::hir(exec_list *instructions,
"match prototype", name);
}
- if (is_definition && sig->is_defined) {
- YYLTYPE loc = this->get_location();
-
- _mesa_glsl_error(& loc, state, "function `%s' redefined", name);
+ if (sig->is_defined) {
+ if (is_definition) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(& loc, state, "function `%s' redefined", name);
+ } else {
+ /* We just encountered a prototype that exactly matches a
+ * function that's already been defined. This is redundant,
+ * and we should ignore it.
+ */
+ return NULL;
+ }
}
}
} else {
@@ -3209,7 +3583,7 @@ ast_jump_statement::hir(exec_list *instructions,
assert(state->current_function);
if (opt_return_value) {
- ir_rvalue *const ret = opt_return_value->hir(instructions, state);
+ ir_rvalue *ret = opt_return_value->hir(instructions, state);
/* The value of the return type can be NULL if the shader says
* 'return foo();' and foo() is a function that returns void.
@@ -3221,17 +3595,46 @@ ast_jump_statement::hir(exec_list *instructions,
const glsl_type *const ret_type =
(ret == NULL) ? glsl_type::void_type : ret->type;
- /* Implicit conversions are not allowed for return values. */
- if (state->current_function->return_type != ret_type) {
+ /* Implicit conversions are not allowed for return values prior to
+ * ARB_shading_language_420pack.
+ */
+ 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);
- }
+ if (state->ARB_shading_language_420pack_enable) {
+ if (!apply_implicit_conversion(state->current_function->return_type,
+ ret, state)) {
+ _mesa_glsl_error(& loc, state,
+ "Could not implicitly convert return value "
+ "to %s, in function `%s'",
+ state->current_function->return_type->name,
+ state->current_function->function_name());
+ }
+ } else {
+ _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);
+ }
+ } else if (state->current_function->return_type->base_type ==
+ GLSL_TYPE_VOID) {
+ YYLTYPE loc = this->get_location();
+
+ /* The ARB_shading_language_420pack, GLSL ES 3.0, and GLSL 4.20
+ * specs add a clarification:
+ *
+ * "A void function can only use return without a return argument, even if
+ * the return argument has void type. Return statements only accept values:
+ *
+ * void func1() { }
+ * void func2() { return func1(); } // illegal return statement"
+ */
+ _mesa_glsl_error(& loc, state,
+ "void functions can only use `return' without a "
+ "return argument");
+ }
inst = new(ctx) ir_return(ret);
} else {
@@ -3264,34 +3667,47 @@ ast_jump_statement::hir(exec_list *instructions,
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) {
+ if (mode == ast_continue &&
+ state->loop_nesting_ast == 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();
+ "continue may only appear in a loop");
+ } else if (mode == ast_break &&
+ state->loop_nesting_ast == NULL &&
+ state->switch_state.switch_nesting_ast == NULL) {
+ YYLTYPE loc = this->get_location();
- /* Inline the for loop expression again, since we don't know
- * where near the end of the loop body the normal copy of it
+ _mesa_glsl_error(& loc, state,
+ "break may only appear in a loop or a switch");
+ } else {
+ /* For a 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 (state->loop_nesting_ast != NULL &&
+ mode == ast_continue &&
+ state->loop_nesting_ast->rest_expression) {
+ state->loop_nesting_ast->rest_expression->hir(instructions,
+ state);
}
- if (loop != NULL) {
- ir_loop_jump *const jump =
+ if (state->switch_state.is_switch_innermost &&
+ mode == ast_break) {
+ /* Force break out of switch by setting is_break switch state.
+ */
+ ir_variable *const is_break_var = state->switch_state.is_break_var;
+ ir_dereference_variable *const deref_is_break_var =
+ new(ctx) ir_dereference_variable(is_break_var);
+ ir_constant *const true_val = new(ctx) ir_constant(true);
+ ir_assignment *const set_break_var =
+ new(ctx) ir_assignment(deref_is_break_var, true_val);
+
+ instructions->push_tail(set_break_var);
+ }
+ else {
+ ir_loop_jump *const jump =
new(ctx) ir_loop_jump((mode == ast_break)
? ir_loop_jump::jump_break
: ir_loop_jump::jump_continue);
@@ -3354,6 +3770,256 @@ ast_selection_statement::hir(exec_list *instructions,
}
+ir_rvalue *
+ast_switch_statement::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+
+ ir_rvalue *const test_expression =
+ this->test_expression->hir(instructions, state);
+
+ /* From page 66 (page 55 of the PDF) of the GLSL 1.50 spec:
+ *
+ * "The type of init-expression in a switch statement must be a
+ * scalar integer."
+ */
+ if (!test_expression->type->is_scalar() ||
+ !test_expression->type->is_integer()) {
+ YYLTYPE loc = this->test_expression->get_location();
+
+ _mesa_glsl_error(& loc,
+ state,
+ "switch-statement expression must be scalar "
+ "integer");
+ }
+
+ /* Track the switch-statement nesting in a stack-like manner.
+ */
+ struct glsl_switch_state saved = state->switch_state;
+
+ state->switch_state.is_switch_innermost = true;
+ state->switch_state.switch_nesting_ast = this;
+ state->switch_state.labels_ht = hash_table_ctor(0, hash_table_pointer_hash,
+ hash_table_pointer_compare);
+ state->switch_state.previous_default = NULL;
+
+ /* Initalize is_fallthru state to false.
+ */
+ ir_rvalue *const is_fallthru_val = new (ctx) ir_constant(false);
+ state->switch_state.is_fallthru_var =
+ new(ctx) ir_variable(glsl_type::bool_type,
+ "switch_is_fallthru_tmp",
+ ir_var_temporary);
+ instructions->push_tail(state->switch_state.is_fallthru_var);
+
+ ir_dereference_variable *deref_is_fallthru_var =
+ new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var);
+ instructions->push_tail(new(ctx) ir_assignment(deref_is_fallthru_var,
+ is_fallthru_val));
+
+ /* Initalize is_break state to false.
+ */
+ ir_rvalue *const is_break_val = new (ctx) ir_constant(false);
+ state->switch_state.is_break_var = new(ctx) ir_variable(glsl_type::bool_type,
+ "switch_is_break_tmp",
+ ir_var_temporary);
+ instructions->push_tail(state->switch_state.is_break_var);
+
+ ir_dereference_variable *deref_is_break_var =
+ new(ctx) ir_dereference_variable(state->switch_state.is_break_var);
+ instructions->push_tail(new(ctx) ir_assignment(deref_is_break_var,
+ is_break_val));
+
+ /* Cache test expression.
+ */
+ test_to_hir(instructions, state);
+
+ /* Emit code for body of switch stmt.
+ */
+ body->hir(instructions, state);
+
+ hash_table_dtor(state->switch_state.labels_ht);
+
+ state->switch_state = saved;
+
+ /* Switch statements do not have r-values. */
+ return NULL;
+}
+
+
+void
+ast_switch_statement::test_to_hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+
+ /* Cache value of test expression. */
+ ir_rvalue *const test_val =
+ test_expression->hir(instructions,
+ state);
+
+ state->switch_state.test_var = new(ctx) ir_variable(test_val->type,
+ "switch_test_tmp",
+ ir_var_temporary);
+ ir_dereference_variable *deref_test_var =
+ new(ctx) ir_dereference_variable(state->switch_state.test_var);
+
+ instructions->push_tail(state->switch_state.test_var);
+ instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val));
+}
+
+
+ir_rvalue *
+ast_switch_body::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ if (stmts != NULL)
+ stmts->hir(instructions, state);
+
+ /* Switch bodies do not have r-values. */
+ return NULL;
+}
+
+ir_rvalue *
+ast_case_statement_list::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ foreach_list_typed (ast_case_statement, case_stmt, link, & this->cases)
+ case_stmt->hir(instructions, state);
+
+ /* Case statements do not have r-values. */
+ return NULL;
+}
+
+ir_rvalue *
+ast_case_statement::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ labels->hir(instructions, state);
+
+ /* Conditionally set fallthru state based on break state. */
+ ir_constant *const false_val = new(state) ir_constant(false);
+ ir_dereference_variable *const deref_is_fallthru_var =
+ new(state) ir_dereference_variable(state->switch_state.is_fallthru_var);
+ ir_dereference_variable *const deref_is_break_var =
+ new(state) ir_dereference_variable(state->switch_state.is_break_var);
+ ir_assignment *const reset_fallthru_on_break =
+ new(state) ir_assignment(deref_is_fallthru_var,
+ false_val,
+ deref_is_break_var);
+ instructions->push_tail(reset_fallthru_on_break);
+
+ /* Guard case statements depending on fallthru state. */
+ ir_dereference_variable *const deref_fallthru_guard =
+ new(state) ir_dereference_variable(state->switch_state.is_fallthru_var);
+ ir_if *const test_fallthru = new(state) ir_if(deref_fallthru_guard);
+
+ foreach_list_typed (ast_node, stmt, link, & this->stmts)
+ stmt->hir(& test_fallthru->then_instructions, state);
+
+ instructions->push_tail(test_fallthru);
+
+ /* Case statements do not have r-values. */
+ return NULL;
+}
+
+
+ir_rvalue *
+ast_case_label_list::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ foreach_list_typed (ast_case_label, label, link, & this->labels)
+ label->hir(instructions, state);
+
+ /* Case labels do not have r-values. */
+ return NULL;
+}
+
+ir_rvalue *
+ast_case_label::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+
+ ir_dereference_variable *deref_fallthru_var =
+ new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var);
+
+ ir_rvalue *const true_val = new(ctx) ir_constant(true);
+
+ /* If not default case, ... */
+ if (this->test_value != NULL) {
+ /* Conditionally set fallthru state based on
+ * comparison of cached test expression value to case label.
+ */
+ ir_rvalue *const label_rval = this->test_value->hir(instructions, state);
+ ir_constant *label_const = label_rval->constant_expression_value();
+
+ if (!label_const) {
+ YYLTYPE loc = this->test_value->get_location();
+
+ _mesa_glsl_error(& loc, state,
+ "switch statement case label must be a "
+ "constant expression");
+
+ /* Stuff a dummy value in to allow processing to continue. */
+ label_const = new(ctx) ir_constant(0);
+ } else {
+ ast_expression *previous_label = (ast_expression *)
+ hash_table_find(state->switch_state.labels_ht,
+ (void *)(uintptr_t)label_const->value.u[0]);
+
+ if (previous_label) {
+ YYLTYPE loc = this->test_value->get_location();
+ _mesa_glsl_error(& loc, state,
+ "duplicate case value");
+
+ loc = previous_label->get_location();
+ _mesa_glsl_error(& loc, state,
+ "this is the previous case label");
+ } else {
+ hash_table_insert(state->switch_state.labels_ht,
+ this->test_value,
+ (void *)(uintptr_t)label_const->value.u[0]);
+ }
+ }
+
+ ir_dereference_variable *deref_test_var =
+ new(ctx) ir_dereference_variable(state->switch_state.test_var);
+
+ ir_rvalue *const test_cond = new(ctx) ir_expression(ir_binop_all_equal,
+ label_const,
+ deref_test_var);
+
+ ir_assignment *set_fallthru_on_test =
+ new(ctx) ir_assignment(deref_fallthru_var,
+ true_val,
+ test_cond);
+
+ instructions->push_tail(set_fallthru_on_test);
+ } else { /* default case */
+ if (state->switch_state.previous_default) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(& loc, state,
+ "multiple default labels in one switch");
+
+ loc = state->switch_state.previous_default->get_location();
+ _mesa_glsl_error(& loc, state,
+ "this is the first default label");
+ }
+ state->switch_state.previous_default = this;
+
+ /* Set falltrhu state. */
+ ir_assignment *set_fallthru =
+ new(ctx) ir_assignment(deref_fallthru_var, true_val);
+
+ instructions->push_tail(set_fallthru);
+ }
+
+ /* Case statements do not have r-values. */
+ return NULL;
+}
+
void
ast_iteration_statement::condition_to_hir(ir_loop *stmt,
struct _mesa_glsl_parse_state *state)
@@ -3375,8 +4041,7 @@ ast_iteration_statement::condition_to_hir(ir_loop *stmt,
* 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);
+ new(ctx) ir_expression(ir_unop_logic_not, cond);
ir_if *const if_stmt = new(ctx) ir_if(not_cond);
@@ -3407,13 +4072,16 @@ ast_iteration_statement::hir(exec_list *instructions,
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;
+ /* Track the current loop nesting. */
+ ast_iteration_statement *nesting_ast = state->loop_nesting_ast;
- state->loop_or_switch_nesting = stmt;
- state->loop_or_switch_nesting_ast = this;
+ state->loop_nesting_ast = this;
+
+ /* Likewise, indicate that following code is closest to a loop,
+ * NOT closest to a switch.
+ */
+ bool saved_is_switch_innermost = state->switch_state.is_switch_innermost;
+ state->switch_state.is_switch_innermost = false;
if (mode != ast_do_while)
condition_to_hir(stmt, state);
@@ -3430,10 +4098,9 @@ ast_iteration_statement::hir(exec_list *instructions,
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;
+ /* Restore previous nesting before returning. */
+ state->loop_nesting_ast = nesting_ast;
+ state->switch_state.is_switch_innermost = saved_is_switch_innermost;
/* Loops do not have r-values.
*/
@@ -3441,30 +4108,54 @@ ast_iteration_statement::hir(exec_list *instructions,
}
+/**
+ * Determine if the given type is valid for establishing a default precision
+ * qualifier.
+ *
+ * From GLSL ES 3.00 section 4.5.4 ("Default Precision Qualifiers"):
+ *
+ * "The precision statement
+ *
+ * precision precision-qualifier type;
+ *
+ * can be used to establish a default precision qualifier. The type field
+ * can be either int or float or any of the sampler types, and the
+ * precision-qualifier can be lowp, mediump, or highp."
+ *
+ * GLSL ES 1.00 has similar language. GLSL 1.30 doesn't allow precision
+ * qualifiers on sampler types, but this seems like an oversight (since the
+ * intention of including these in GLSL 1.30 is to allow compatibility with ES
+ * shaders). So we allow int, float, and all sampler types regardless of GLSL
+ * version.
+ */
+static bool
+is_valid_default_precision_type(const struct glsl_type *const type)
+{
+ if (type == NULL)
+ return false;
+
+ switch (type->base_type) {
+ case GLSL_TYPE_INT:
+ case GLSL_TYPE_FLOAT:
+ /* "int" and "float" are valid, but vectors and matrices are not. */
+ return type->vector_elements == 1 && type->matrix_columns == 1;
+ case GLSL_TYPE_SAMPLER:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
ir_rvalue *
ast_type_specifier::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
- if (!this->is_precision_statement && this->structure == NULL)
+ if (this->default_precision == ast_precision_none && this->structure == NULL)
return NULL;
YYLTYPE loc = this->get_location();
- if (this->precision != ast_precision_none
- && state->language_version != 100
- && state->language_version < 130) {
- _mesa_glsl_error(&loc, state,
- "precision qualifiers exist only in "
- "GLSL ES 1.00, and GLSL 1.30 and later");
- return NULL;
- }
- if (this->precision != ast_precision_none
- && this->structure != NULL) {
- _mesa_glsl_error(&loc, state,
- "precision qualifiers do not apply to structures");
- return NULL;
- }
-
/* If this is a precision statement, check that the type to which it is
* applied is either float or int.
*
@@ -3475,64 +4166,137 @@ ast_type_specifier::hir(exec_list *instructions,
* field can be either int or float [...]. Any other types or
* qualifiers will result in an error.
*/
- if (this->is_precision_statement) {
- assert(this->precision != ast_precision_none);
- assert(this->structure == NULL); /* The check for structures was
- * performed above. */
+ if (this->default_precision != ast_precision_none) {
+ if (!state->check_precision_qualifiers_allowed(&loc))
+ return NULL;
+
+ if (this->structure != NULL) {
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers do not apply to structures");
+ return NULL;
+ }
+
if (this->is_array) {
_mesa_glsl_error(&loc, state,
"default precision statements do not apply to "
"arrays");
return NULL;
}
- if (this->type_specifier != ast_float
- && this->type_specifier != ast_int) {
+
+ const struct glsl_type *const type =
+ state->symbols->get_type(this->type_name);
+ if (!is_valid_default_precision_type(type)) {
_mesa_glsl_error(&loc, state,
"default precision statements apply only to types "
- "float and int");
+ "float, int, and sampler types");
return NULL;
}
+ if (type->base_type == GLSL_TYPE_FLOAT
+ && state->es_shader
+ && state->target == fragment_shader) {
+ /* Section 4.5.3 (Default Precision Qualifiers) of the GLSL ES 1.00
+ * spec says:
+ *
+ * "The fragment language has no default precision qualifier for
+ * floating point types."
+ *
+ * As a result, we have to track whether or not default precision has
+ * been specified for float in GLSL ES fragment shaders.
+ *
+ * Earlier in that same section, the spec says:
+ *
+ * "Non-precision qualified declarations will use the precision
+ * qualifier specified in the most recent precision statement
+ * that is still in scope. The precision statement has the same
+ * scoping rules as variable declarations. If it is declared
+ * inside a compound statement, its effect stops at the end of
+ * the innermost statement it was declared in. Precision
+ * statements in nested scopes override precision statements in
+ * outer scopes. Multiple precision statements for the same basic
+ * type can appear inside the same scope, with later statements
+ * overriding earlier statements within that scope."
+ *
+ * Default precision specifications follow the same scope rules as
+ * variables. So, we can track the state of the default float
+ * precision in the symbol table, and the rules will just work. This
+ * is a slight abuse of the symbol table, but it has the semantics
+ * that we want.
+ */
+ ir_variable *const junk =
+ new(state) ir_variable(type, "#default precision",
+ ir_var_temporary);
+
+ state->symbols->add_variable(junk);
+ }
+
/* FINISHME: Translate precision statements into IR. */
return NULL;
}
- if (this->structure != NULL)
+ /* _mesa_ast_set_aggregate_type() sets the <structure> field so that
+ * process_record_constructor() can do type-checking on C-style initializer
+ * expressions of structs, but ast_struct_specifier should only be translated
+ * to HIR if it is declaring the type of a structure.
+ *
+ * The ->is_declaration field is false for initializers of variables
+ * declared separately from the struct's type definition.
+ *
+ * struct S { ... }; (is_declaration = true)
+ * struct T { ... } t = { ... }; (is_declaration = true)
+ * S s = { ... }; (is_declaration = false)
+ */
+ if (this->structure != NULL && this->structure->is_declaration)
return this->structure->hir(instructions, state);
return NULL;
}
-ir_rvalue *
-ast_struct_specifier::hir(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+/**
+ * Process a structure or interface block tree into an array of structure fields
+ *
+ * After parsing, where there are some syntax differnces, structures and
+ * interface blocks are almost identical. They are similar enough that the
+ * AST for each can be processed the same way into a set of
+ * \c glsl_struct_field to describe the members.
+ *
+ * \return
+ * The number of fields processed. A pointer to the array structure fields is
+ * stored in \c *fields_ret.
+ */
+unsigned
+ast_process_structure_or_interface_block(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ exec_list *declarations,
+ YYLTYPE &loc,
+ glsl_struct_field **fields_ret,
+ bool is_interface,
+ bool block_row_major)
{
unsigned decl_count = 0;
- /* Make an initial pass over the list of structure fields to determine how
+ /* Make an initial pass over the list of 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_typed (ast_declarator_list, decl_list, link, declarations) {
foreach_list_const (decl_ptr, & decl_list->declarations) {
decl_count++;
}
}
- /* Allocate storage for the structure fields and process the field
+ /* Allocate storage for the 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.
+ * other structure definitions or in interface blocks are processed.
*/
glsl_struct_field *const fields = ralloc_array(state, glsl_struct_field,
decl_count);
unsigned i = 0;
- foreach_list_typed (ast_declarator_list, decl_list, link,
- &this->declarations) {
+ foreach_list_typed (ast_declarator_list, decl_list, link, declarations) {
const char *type_name;
decl_list->type->specifier->hir(instructions, state);
@@ -3541,35 +4305,135 @@ ast_struct_specifier::hir(exec_list *instructions,
* 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);
+ decl_list->type->glsl_type(& type_name, state);
foreach_list_typed (ast_declaration, decl, link,
&decl_list->declarations) {
- const struct glsl_type *field_type = decl_type;
+ /* From the GL_ARB_uniform_buffer_object spec:
+ *
+ * "Sampler types are not allowed inside of uniform
+ * blocks. All other types, arrays, and structures
+ * allowed for uniforms are allowed within a uniform
+ * block."
+ *
+ * It should be impossible for decl_type to be NULL here. Cases that
+ * might naturally lead to decl_type being NULL, especially for the
+ * is_interface case, will have resulted in compilation having
+ * already halted due to a syntax error.
+ */
+ const struct glsl_type *field_type =
+ decl_type != NULL ? decl_type : glsl_type::error_type;
+
+ if (is_interface && field_type->contains_sampler()) {
+ YYLTYPE loc = decl_list->get_location();
+ _mesa_glsl_error(&loc, state,
+ "Uniform in non-default uniform block contains sampler\n");
+ }
+
+ const struct ast_type_qualifier *const qual =
+ & decl_list->type->qualifier;
+ if (qual->flags.q.std140 ||
+ qual->flags.q.packed ||
+ qual->flags.q.shared) {
+ _mesa_glsl_error(&loc, state,
+ "uniform block layout qualifiers std140, packed, and "
+ "shared can only be applied to uniform blocks, not "
+ "members");
+ }
+
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].type = field_type;
fields[i].name = decl->identifier;
+
+ if (qual->flags.q.row_major || qual->flags.q.column_major) {
+ if (!qual->flags.q.uniform) {
+ _mesa_glsl_error(&loc, state,
+ "row_major and column_major can only be "
+ "applied to uniform interface blocks");
+ } else
+ validate_matrix_layout_for_type(state, &loc, field_type, NULL);
+ }
+
+ if (qual->flags.q.uniform && qual->has_interpolation()) {
+ _mesa_glsl_error(&loc, state,
+ "interpolation qualifiers cannot be used "
+ "with uniform interface blocks");
+ }
+
+ if (field_type->is_matrix() ||
+ (field_type->is_array() && field_type->fields.array->is_matrix())) {
+ fields[i].row_major = block_row_major;
+ if (qual->flags.q.row_major)
+ fields[i].row_major = true;
+ else if (qual->flags.q.column_major)
+ fields[i].row_major = false;
+ }
+
i++;
}
}
assert(i == decl_count);
+ *fields_ret = fields;
+ return decl_count;
+}
+
+
+ir_rvalue *
+ast_struct_specifier::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ YYLTYPE loc = this->get_location();
+
+ /* Section 4.1.8 (Structures) of the GLSL 1.10 spec says:
+ *
+ * "Anonymous structures are not supported; so embedded structures must
+ * have a declarator. A name given to an embedded struct is scoped at
+ * the same level as the struct it is embedded in."
+ *
+ * The same section of the GLSL 1.20 spec says:
+ *
+ * "Anonymous structures are not supported. Embedded structures are not
+ * supported.
+ *
+ * struct S { float f; };
+ * struct T {
+ * S; // Error: anonymous structures disallowed
+ * struct { ... }; // Error: embedded structures disallowed
+ * S s; // Okay: nested structures with name are allowed
+ * };"
+ *
+ * The GLSL ES 1.00 and 3.00 specs have similar langauge and examples. So,
+ * we allow embedded structures in 1.10 only.
+ */
+ if (state->language_version != 110 && state->struct_specifier_depth != 0)
+ _mesa_glsl_error(&loc, state,
+ "embedded structure declartions are not allowed");
+
+ state->struct_specifier_depth++;
+
+ glsl_struct_field *fields;
+ unsigned decl_count =
+ ast_process_structure_or_interface_block(instructions,
+ state,
+ &this->declarations,
+ loc,
+ &fields,
+ false,
+ false);
+
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 {
@@ -3583,7 +4447,192 @@ ast_struct_specifier::hir(exec_list *instructions,
}
}
+ state->struct_specifier_depth--;
+
/* Structure type definitions do not have r-values.
*/
return NULL;
}
+
+ir_rvalue *
+ast_interface_block::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ YYLTYPE loc = this->get_location();
+
+ /* The ast_interface_block has a list of ast_declarator_lists. We
+ * need to turn those into ir_variables with an association
+ * with this uniform block.
+ */
+ enum glsl_interface_packing packing;
+ if (this->layout.flags.q.shared) {
+ packing = GLSL_INTERFACE_PACKING_SHARED;
+ } else if (this->layout.flags.q.packed) {
+ packing = GLSL_INTERFACE_PACKING_PACKED;
+ } else {
+ /* The default layout is std140.
+ */
+ packing = GLSL_INTERFACE_PACKING_STD140;
+ }
+
+ bool block_row_major = this->layout.flags.q.row_major;
+ exec_list declared_variables;
+ glsl_struct_field *fields;
+ unsigned int num_variables =
+ ast_process_structure_or_interface_block(&declared_variables,
+ state,
+ &this->declarations,
+ loc,
+ &fields,
+ true,
+ block_row_major);
+
+ ir_variable_mode var_mode;
+ const char *iface_type_name;
+ if (this->layout.flags.q.in) {
+ var_mode = ir_var_shader_in;
+ iface_type_name = "in";
+ } else if (this->layout.flags.q.out) {
+ var_mode = ir_var_shader_out;
+ iface_type_name = "out";
+ } else if (this->layout.flags.q.uniform) {
+ var_mode = ir_var_uniform;
+ iface_type_name = "uniform";
+ } else {
+ var_mode = ir_var_auto;
+ iface_type_name = "UNKNOWN";
+ assert(!"interface block layout qualifier not found!");
+ }
+
+ const glsl_type *block_type =
+ glsl_type::get_interface_instance(fields,
+ num_variables,
+ packing,
+ this->block_name);
+
+ if (!state->symbols->add_interface(block_type->name, block_type, var_mode)) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(&loc, state, "Interface block `%s' with type `%s' "
+ "already taken in the current scope.\n",
+ this->block_name, iface_type_name);
+ }
+
+ /* Since interface blocks cannot contain statements, it should be
+ * impossible for the block to generate any instructions.
+ */
+ assert(declared_variables.is_empty());
+
+ /* Page 39 (page 45 of the PDF) of section 4.3.7 in the GLSL ES 3.00 spec
+ * says:
+ *
+ * "If an instance name (instance-name) is used, then it puts all the
+ * members inside a scope within its own name space, accessed with the
+ * field selector ( . ) operator (analogously to structures)."
+ */
+ if (this->instance_name) {
+ ir_variable *var;
+
+ if (this->array_size != NULL) {
+ const glsl_type *block_array_type =
+ process_array_type(&loc, block_type, this->array_size, state);
+
+ var = new(state) ir_variable(block_array_type,
+ this->instance_name,
+ var_mode);
+ } else {
+ var = new(state) ir_variable(block_type,
+ this->instance_name,
+ var_mode);
+ }
+
+ var->interface_type = block_type;
+ state->symbols->add_variable(var);
+ instructions->push_tail(var);
+ } else {
+ /* In order to have an array size, the block must also be declared with
+ * an instane name.
+ */
+ assert(this->array_size == NULL);
+
+ for (unsigned i = 0; i < num_variables; i++) {
+ ir_variable *var =
+ new(state) ir_variable(fields[i].type,
+ ralloc_strdup(state, fields[i].name),
+ var_mode);
+ var->interface_type = block_type;
+
+ /* Propagate the "binding" keyword into this UBO's fields;
+ * the UBO declaration itself doesn't get an ir_variable unless it
+ * has an instance name. This is ugly.
+ */
+ var->explicit_binding = this->layout.flags.q.explicit_binding;
+ var->binding = this->layout.binding;
+
+ state->symbols->add_variable(var);
+ instructions->push_tail(var);
+ }
+ }
+
+ return NULL;
+}
+
+static void
+detect_conflicting_assignments(struct _mesa_glsl_parse_state *state,
+ exec_list *instructions)
+{
+ bool gl_FragColor_assigned = false;
+ bool gl_FragData_assigned = false;
+ bool user_defined_fs_output_assigned = false;
+ ir_variable *user_defined_fs_output = NULL;
+
+ /* It would be nice to have proper location information. */
+ YYLTYPE loc;
+ memset(&loc, 0, sizeof(loc));
+
+ foreach_list(node, instructions) {
+ ir_variable *var = ((ir_instruction *)node)->as_variable();
+
+ if (!var || !var->assigned)
+ continue;
+
+ if (strcmp(var->name, "gl_FragColor") == 0)
+ gl_FragColor_assigned = true;
+ else if (strcmp(var->name, "gl_FragData") == 0)
+ gl_FragData_assigned = true;
+ else if (strncmp(var->name, "gl_", 3) != 0) {
+ if (state->target == fragment_shader &&
+ var->mode == ir_var_shader_out) {
+ user_defined_fs_output_assigned = true;
+ user_defined_fs_output = var;
+ }
+ }
+ }
+
+ /* From the GLSL 1.30 spec:
+ *
+ * "If a shader statically assigns a value to gl_FragColor, it
+ * may not assign a value to any element of gl_FragData. If a
+ * shader statically writes a value to any element of
+ * gl_FragData, it may not assign a value to
+ * gl_FragColor. That is, a shader may assign values to either
+ * gl_FragColor or gl_FragData, but not both. Multiple shaders
+ * linked together must also consistently write just one of
+ * these variables. Similarly, if user declared output
+ * variables are in use (statically assigned to), then the
+ * built-in variables gl_FragColor and gl_FragData may not be
+ * assigned to. These incorrect usages all generate compile
+ * time errors."
+ */
+ if (gl_FragColor_assigned && gl_FragData_assigned) {
+ _mesa_glsl_error(&loc, state, "fragment shader writes to both "
+ "`gl_FragColor' and `gl_FragData'\n");
+ } else if (gl_FragColor_assigned && user_defined_fs_output_assigned) {
+ _mesa_glsl_error(&loc, state, "fragment shader writes to both "
+ "`gl_FragColor' and `%s'\n",
+ user_defined_fs_output->name);
+ } else if (gl_FragData_assigned && user_defined_fs_output_assigned) {
+ _mesa_glsl_error(&loc, state, "fragment shader writes to both "
+ "`gl_FragData' and `%s'\n",
+ user_defined_fs_output->name);
+ }
+}
diff --git a/dist/Mesa/src/glsl/ast_type.cpp b/dist/Mesa/src/glsl/ast_type.cpp
index c680ae5f6..7bb1f64da 100644
--- a/dist/Mesa/src/glsl/ast_type.cpp
+++ b/dist/Mesa/src/glsl/ast_type.cpp
@@ -22,14 +22,11 @@
*/
#include "ast.h"
-extern "C" {
-#include "program/symbol_table.h"
-}
void
ast_type_specifier::print(void) const
{
- if (type_specifier == ast_struct) {
+ if (structure) {
structure->print();
} else {
printf("%s ", type_name);
@@ -46,71 +43,6 @@ ast_type_specifier::print(void) const
}
}
-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_none),
- is_precision_statement(false)
-{
- 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
{
@@ -124,6 +56,42 @@ bool ast_type_qualifier::has_interpolation() const
|| this->flags.q.noperspective;
}
+bool
+ast_type_qualifier::has_layout() const
+{
+ return this->flags.q.origin_upper_left
+ || this->flags.q.pixel_center_integer
+ || this->flags.q.depth_any
+ || this->flags.q.depth_greater
+ || this->flags.q.depth_less
+ || this->flags.q.depth_unchanged
+ || this->flags.q.std140
+ || this->flags.q.shared
+ || this->flags.q.column_major
+ || this->flags.q.row_major
+ || this->flags.q.packed
+ || this->flags.q.explicit_location
+ || this->flags.q.explicit_index
+ || this->flags.q.explicit_binding;
+}
+
+bool
+ast_type_qualifier::has_storage() const
+{
+ return this->flags.q.constant
+ || this->flags.q.attribute
+ || this->flags.q.varying
+ || this->flags.q.in
+ || this->flags.q.out
+ || this->flags.q.uniform;
+}
+
+bool
+ast_type_qualifier::has_auxiliary_storage() const
+{
+ return this->flags.q.centroid;
+}
+
const char*
ast_type_qualifier::interpolation_string() const
{
@@ -136,3 +104,54 @@ ast_type_qualifier::interpolation_string() const
else
return NULL;
}
+
+bool
+ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
+ _mesa_glsl_parse_state *state,
+ ast_type_qualifier q)
+{
+ ast_type_qualifier ubo_mat_mask;
+ ubo_mat_mask.flags.i = 0;
+ ubo_mat_mask.flags.q.row_major = 1;
+ ubo_mat_mask.flags.q.column_major = 1;
+
+ ast_type_qualifier ubo_layout_mask;
+ ubo_layout_mask.flags.i = 0;
+ ubo_layout_mask.flags.q.std140 = 1;
+ ubo_layout_mask.flags.q.packed = 1;
+ ubo_layout_mask.flags.q.shared = 1;
+
+ /* Uniform block layout qualifiers get to overwrite each
+ * other (rightmost having priority), while all other
+ * qualifiers currently don't allow duplicates.
+ */
+
+ if ((this->flags.i & q.flags.i & ~(ubo_mat_mask.flags.i |
+ ubo_layout_mask.flags.i)) != 0) {
+ _mesa_glsl_error(loc, state,
+ "duplicate layout qualifiers used\n");
+ return false;
+ }
+
+ if ((q.flags.i & ubo_mat_mask.flags.i) != 0)
+ this->flags.i &= ~ubo_mat_mask.flags.i;
+ if ((q.flags.i & ubo_layout_mask.flags.i) != 0)
+ this->flags.i &= ~ubo_layout_mask.flags.i;
+
+ this->flags.i |= q.flags.i;
+
+ if (q.flags.q.explicit_location)
+ this->location = q.location;
+
+ if (q.flags.q.explicit_index)
+ this->index = q.index;
+
+ if (q.flags.q.explicit_binding)
+ this->binding = q.binding;
+
+ if (q.precision != ast_precision_none)
+ this->precision = q.precision;
+
+ return true;
+}
+
diff --git a/dist/Mesa/src/glsl/autogen.sh b/dist/Mesa/src/glsl/autogen.sh
deleted file mode 100644
index 904cd6746..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtin_function.cpp b/dist/Mesa/src/glsl/builtin_function.cpp
deleted file mode 100644
index 1aa46eed4..000000000
--- a/dist/Mesa/src/glsl/builtin_function.cpp
+++ /dev/null
@@ -1,16065 +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/core.h" /* for struct gl_shader */
-#include "glsl_parser_extras.h"
-#include "ir_reader.h"
-#include "program.h"
-#include "ast.h"
-
-extern "C" struct gl_shader *
-_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
-
-gl_shader *
-read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
-{
- struct gl_context fakeCtx;
- fakeCtx.API = API_OPENGL;
- fakeCtx.Const.GLSLVersion = 130;
- fakeCtx.Extensions.ARB_ES2_compatibility = true;
- gl_shader *sh = _mesa_new_shader(NULL, 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);
- ralloc_free(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"
- " (signature int\n"
- " (parameters\n"
- " (declare (in) int arg0))\n"
- " ((return (expression int abs (var_ref arg0)))))\n"
- "\n"
- " (signature ivec2\n"
- " (parameters\n"
- " (declare (in) ivec2 arg0))\n"
- " ((return (expression ivec2 abs (var_ref arg0)))))\n"
- "\n"
- " (signature ivec3\n"
- " (parameters\n"
- " (declare (in) ivec3 arg0))\n"
- " ((return (expression ivec3 abs (var_ref arg0)))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) ivec4 arg0))\n"
- " ((return (expression ivec4 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"
- " (constant float (1.5707964))\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.5707964))\n"
- " (expression float *\n"
- " (expression float abs (var_ref x))\n"
- " (expression float +\n"
- " (constant float (-0.21460183))\n"
- " (expression float *\n"
- " (expression float abs (var_ref x))\n"
- " (expression float +\n"
- " (constant float (0.086566724))\n"
- " (expression float *\n"
- " (expression float abs (var_ref x))\n"
- " (constant float (-0.03102955))\n"
- " ))))))))))))\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"
- " (constant float (1.5707964))\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.5707964))\n"
- " (expression vec2 *\n"
- " (expression vec2 abs (var_ref x))\n"
- " (expression vec2 +\n"
- " (constant float (-0.21460183))\n"
- " (expression vec2 *\n"
- " (expression vec2 abs (var_ref x))\n"
- " (expression vec2 +\n"
- " (constant float (0.086566724))\n"
- " (expression vec2 *\n"
- " (expression vec2 abs (var_ref x))\n"
- " (constant float (-0.03102955))\n"
- " ))))))))))))\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"
- " (constant float (1.5707964))\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.5707964))\n"
- " (expression vec3 *\n"
- " (expression vec3 abs (var_ref x))\n"
- " (expression vec3 +\n"
- " (constant float (-0.21460183))\n"
- " (expression vec3 *\n"
- " (expression vec3 abs (var_ref x))\n"
- " (expression vec3 +\n"
- " (constant float (0.086566724))\n"
- " (expression vec3 *\n"
- " (expression vec3 abs (var_ref x))\n"
- " (constant float (-0.03102955))\n"
- " ))))))))))))\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"
- " (constant float (1.5707964))\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.5707964))\n"
- " (expression vec4 *\n"
- " (expression vec4 abs (var_ref x))\n"
- " (expression vec4 +\n"
- " (constant float (-0.21460183))\n"
- " (expression vec4 *\n"
- " (expression vec4 abs (var_ref x))\n"
- " (expression vec4 +\n"
- " (constant float (0.086566724))\n"
- " (expression vec4 *\n"
- " (expression vec4 abs (var_ref x))\n"
- " (constant float (-0.03102955))\n"
- " ))))))))))))\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 >\n"
- " (expression float abs (var_ref x))\n"
- " (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) (\n"
- " (assign (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 (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))\n"
- " ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))\n"
- " )\n"
- " (\n"
- " ))\n"
- " )\n"
- " (\n"
- " (declare () float sgn)\n"
- " (assign (x) (var_ref sgn) (expression float sign (var_ref y)))\n"
- " (assign (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 (x) (var_ref r)\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (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 (x) (var_ref r)\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (y) (var_ref r)\n"
- " (call atan ((swiz y (var_ref y))\n"
- " (swiz y (var_ref x)))))\n"
- " (assign (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 (x) (var_ref r)\n"
- " (call atan ((swiz x (var_ref y))\n"
- " (swiz x (var_ref x)))))\n"
- " (assign (y) (var_ref r)\n"
- " (call atan ((swiz y (var_ref y))\n"
- " (swiz y (var_ref x)))))\n"
- " (assign (z) (var_ref r)\n"
- " (call atan ((swiz z (var_ref y))\n"
- " (swiz z (var_ref x)))))\n"
- " (assign (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (x) (var_ref t) (expression float trunc (var_ref x)))\n"
- " (assign (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 (xy) (var_ref t) (expression vec2 trunc (var_ref x)))\n"
- " (assign (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 (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))\n"
- " (assign (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 (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (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 (x) (var_ref t) (var_ref a))\n"
- " (assign (y) (var_ref t) (var_ref b))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n"
- "\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (y) (var_ref t) (var_ref b))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n"
- "\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (y) (var_ref t) (var_ref b))\n"
- " (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
- " (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n"
- "\n"
- " (assign (x) (var_ref t) (var_ref a))\n"
- " (assign (y) (var_ref t) (var_ref b))\n"
- " (assign (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 (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )\n"
- "\n"
- " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (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 (x) (var_ref _r) (var_ref _x))\n"
- " (assign (y) (var_ref _r) (var_ref _y))\n"
- " (assign (z) (var_ref _r) (var_ref _z))\n"
- " (assign (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 (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )\n"
- "\n"
- " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n"
- "\n"
- " (assign (x) (var_ref _r) (var_ref _x))\n"
- " (assign (y) (var_ref _r) (var_ref _y))\n"
- " (assign (z) (var_ref _r) (var_ref _z))\n"
- " (assign (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 (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )\n"
- "\n"
- " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n"
- "\n"
- " (assign (x) (var_ref _r) (var_ref _x))\n"
- " (assign (y) (var_ref _r) (var_ref _y))\n"
- " (assign (z) (var_ref _r) (var_ref _z))\n"
- " (assign (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 (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n"
- "\n"
- " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))\n"
- " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (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 (x) (var_ref _r) (var_ref _x))\n"
- " (assign (y) (var_ref _r) (var_ref _y))\n"
- " (assign (z) (var_ref _r) (var_ref _z))\n"
- " (assign (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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (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 arg0)\n"
- " (declare (in) vec2 arg1))\n"
- " ((return (expression vec2 pow (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 pow (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 pow (var_ref arg0) (var_ref arg1)))))\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.0174532925))))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 arg0))\n"
- " ((return (expression vec2 * (var_ref arg0) (constant float (0.0174532925))))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 arg0))\n"
- " ((return (expression vec3 * (var_ref arg0) (constant float (0.0174532925))))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 arg0))\n"
- " ((return (expression vec4 * (var_ref arg0) (constant float (0.0174532925))))))\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 (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 (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 (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 (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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow1DGradARB[] =
- "((function shadow1DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow1DProjGradARB[] =
- "((function shadow1DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow2DGradARB[] =
- "((function shadow2DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow2DProjGradARB[] =
- "((function shadow2DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow2DRectGradARB[] =
- "((function shadow2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_shadow2DRectProjGradARB[] =
- "((function shadow2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\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"
- " ((return (expression float sin (var_ref angle)))))\n"
- "\n"
- " (signature vec2\n"
- " (parameters\n"
- " (declare (in) vec2 angle))\n"
- " ((return (expression vec2 sin (var_ref angle)))))\n"
- "\n"
- " (signature vec3\n"
- " (parameters\n"
- " (declare (in) vec3 angle))\n"
- " ((return (expression vec3 sin (var_ref angle)))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) vec4 angle))\n"
- " ((return (expression vec4 sin (var_ref angle)))))\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 (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 (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 (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 (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 (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 (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 (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
- " (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
- " (assign (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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texelFetchOffset[] =
- "((function texelFetchOffset\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) int P) \n"
- " (declare (in) int lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (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 vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isamplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usamplerCube sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) samplerCubeShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DArrayShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) samplerCubeShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DArrayShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) (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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture1DGradARB[] =
- "((function texture1DGradARB\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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture1DProjGradARB[] =
- "((function texture1DProjGradARB\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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture2DGradARB[] =
- "((function texture2DGradARB\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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture2DProjGradARB[] =
- "((function texture2DProjGradARB\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture2DRectGradARB[] =
- "((function texture2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture2DRectProjGradARB[] =
- "((function texture2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture3DGradARB[] =
- "((function texture3DGradARB\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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_texture3DProjGradARB[] =
- "((function texture3DProjGradARB\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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureCubeGradARB[] =
- "((function textureCubeGradARB\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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\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 vec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) samplerCubeShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DArrayShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureGradOffset[] =
- "((function textureGradOffset\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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DArrayShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec3 dPdx) \n"
- " (declare (in) vec3 dPdy) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) 1 (swiz w (var_ref P)) ((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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 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 vec4 (var_ref sampler) (var_ref P) 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 ivec4 (var_ref sampler) (var_ref P) 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 uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureLodOffset[] =
- "((function textureLodOffset\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureOffset[] =
- "((function textureOffset\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) float P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1DArray sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2DArray sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DArrayShadow sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureProjGradOffset[] =
- "((function textureProjGradOffset\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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float dPdx) \n"
- " (declare (in) float dPdy) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) vec2 dPdx) \n"
- " (declare (in) vec2 dPdy) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz x (var_ref P)) 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 ivec4 (var_ref sampler) (swiz x (var_ref P)) 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 uvec4 (var_ref sampler) (swiz x (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xy (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xy (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xy (var_ref P)) 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 vec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 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 uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureProjLodOffset[] =
- "((function textureProjLodOffset\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) int offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (txl uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (in) float lod) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
- "\n"
- "))\n"
- ""
-;
-static const char builtin_textureProjOffset[] =
- "((function textureProjOffset\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler1D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec3 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler2D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature ivec4\n"
- " (parameters\n"
- " (declare (in) isampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature uvec4\n"
- " (parameters\n"
- " (declare (in) usampler3D sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec3 offset) )\n"
- " ((return (tex uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) int offset) )\n"
- " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec2 offset) )\n"
- " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
- "\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1D sampler)\n"
- " (declare (in) vec2 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (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 (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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 (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (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 (const_in) ivec3 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) int offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
- "\n"
- " (signature float\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P) \n"
- " (declare (const_in) ivec2 offset) \n"
- " (declare (in) float bias) )\n"
- " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (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',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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','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','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','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','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','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','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
-'(','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','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
-'(','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_texelFetchOffset,
- 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_textureGradOffset,
- builtin_textureLod,
- builtin_textureLodOffset,
- builtin_textureOffset,
- builtin_textureProj,
- builtin_textureProjGrad,
- builtin_textureProjGradOffset,
- builtin_textureProjLod,
- builtin_textureProjLodOffset,
- 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',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','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',')',' ','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','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','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','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','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','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','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',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
-'(','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','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
-'(','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','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','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',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','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',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','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',')',' ','(','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','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
-'(','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_texelFetchOffset,
- 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_textureGradOffset,
- builtin_textureLod,
- builtin_textureLodOffset,
- builtin_textureOffset,
- builtin_textureProj,
- builtin_textureProjGrad,
- builtin_textureProjGradOffset,
- builtin_textureProjLod,
- builtin_textureProjLodOffset,
- builtin_transpose,
- builtin_trunc,
-};
-static const char prototypes_for_ARB_shader_texture_lod_frag[] =
- "(\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 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 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 textureCubeLod\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) samplerCube sampler)\n"
- " (declare (in) vec3 coord)\n"
- " (declare (in) float lod))\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 texture1DGradARB\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"
- " ()))\n"
- "(function texture1DProjGradARB\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"
- " ())\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"
- " ()))\n"
- "(function texture2DGradARB\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"
- " ()))\n"
- "(function texture2DProjGradARB\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"
- " ())\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"
- " ()))\n"
- "(function texture3DGradARB\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"
- " ()))\n"
- "(function texture3DProjGradARB\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"
- " ()))\n"
- "(function textureCubeGradARB\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"
- " ()))\n"
- "(function shadow1DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) float dPdx)\n"
- " (declare (in) float dPdy))\n"
- " ()))\n"
- "(function shadow1DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) float dPdx)\n"
- " (declare (in) float dPdy))\n"
- " ()))\n"
- "(function shadow2DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function texture2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec2 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function texture2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ())\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ())))"
-;
-static const char *functions_for_ARB_shader_texture_lod_frag [] = {
- builtin_shadow1DGradARB,
- builtin_shadow1DLod,
- builtin_shadow1DProjGradARB,
- builtin_shadow1DProjLod,
- builtin_shadow2DGradARB,
- builtin_shadow2DLod,
- builtin_shadow2DProjGradARB,
- builtin_shadow2DProjLod,
- builtin_shadow2DRectGradARB,
- builtin_shadow2DRectProjGradARB,
- builtin_texture1DGradARB,
- builtin_texture1DLod,
- builtin_texture1DProjGradARB,
- builtin_texture1DProjLod,
- builtin_texture2DGradARB,
- builtin_texture2DLod,
- builtin_texture2DProjGradARB,
- builtin_texture2DProjLod,
- builtin_texture2DRectGradARB,
- builtin_texture2DRectProjGradARB,
- builtin_texture3DGradARB,
- builtin_texture3DLod,
- builtin_texture3DProjGradARB,
- builtin_texture3DProjLod,
- builtin_textureCubeGradARB,
- builtin_textureCubeLod,
-};
-static const char prototypes_for_ARB_shader_texture_lod_vert[] =
- "(\n"
- "(function texture1DGradARB\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"
- " ()))\n"
- "(function texture1DProjGradARB\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"
- " ())\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"
- " ()))\n"
- "(function texture2DGradARB\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"
- " ()))\n"
- "(function texture2DProjGradARB\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"
- " ())\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"
- " ()))\n"
- "(function texture3DGradARB\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"
- " ()))\n"
- "(function texture3DProjGradARB\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"
- " ()))\n"
- "(function textureCubeGradARB\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"
- " ()))\n"
- "(function shadow1DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) float dPdx)\n"
- " (declare (in) float dPdy))\n"
- " ()))\n"
- "(function shadow1DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler1DShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) float dPdx)\n"
- " (declare (in) float dPdy))\n"
- " ()))\n"
- "(function shadow2DGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function texture2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec2 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function texture2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ())\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRect sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DRectGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec3 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ()))\n"
- "(function shadow2DRectProjGradARB\n"
- " (signature vec4\n"
- " (parameters\n"
- " (declare (in) sampler2DRectShadow sampler)\n"
- " (declare (in) vec4 P)\n"
- " (declare (in) vec2 dPdx)\n"
- " (declare (in) vec2 dPdy))\n"
- " ())))"
-;
-static const char *functions_for_ARB_shader_texture_lod_vert [] = {
- builtin_shadow1DGradARB,
- builtin_shadow1DProjGradARB,
- builtin_shadow2DGradARB,
- builtin_shadow2DProjGradARB,
- builtin_shadow2DRectGradARB,
- builtin_shadow2DRectProjGradARB,
- builtin_texture1DGradARB,
- builtin_texture1DProjGradARB,
- builtin_texture2DGradARB,
- builtin_texture2DProjGradARB,
- builtin_texture2DRectGradARB,
- builtin_texture2DRectProjGradARB,
- builtin_texture3DGradARB,
- builtin_texture3DProjGradARB,
- builtin_textureCubeGradARB,
-};
-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 const char prototypes_for_OES_texture_3D_frag[] =
- "(\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"
- " ())))"
-;
-static const char *functions_for_OES_texture_3D_frag [] = {
- builtin_texture3D,
- builtin_texture3DProj,
-};
-static const char prototypes_for_OES_texture_3D_vert[] =
- "(\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"
- " ())))"
-;
-static const char *functions_for_OES_texture_3D_vert [] = {
- builtin_texture3D,
- builtin_texture3DLod,
- builtin_texture3DProj,
- builtin_texture3DProjLod,
-};
-static gl_shader *builtin_profiles[16];
-
-void *builtin_mem_ctx = NULL;
-
-void
-_mesa_glsl_release_functions(void)
-{
- ralloc_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,
- int profile_index,
- const char *prototypes,
- const char **functions,
- int count)
-{
- gl_shader *sh = builtin_profiles[profile_index];
-
- if (sh == NULL) {
- sh = read_builtins(GL_VERTEX_SHADER, prototypes, functions, count);
- ralloc_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(struct _mesa_glsl_parse_state *state)
-{
- if (builtin_mem_ctx == NULL) {
- builtin_mem_ctx = ralloc_context(NULL); // "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, 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, 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, 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, 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, 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, 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, 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, 7,
- prototypes_for_130_vert,
- functions_for_130_vert,
- Elements(functions_for_130_vert));
- }
-
- if (state->target == fragment_shader && state->ARB_shader_texture_lod_enable) {
- _mesa_read_profile(state, 8,
- prototypes_for_ARB_shader_texture_lod_frag,
- functions_for_ARB_shader_texture_lod_frag,
- Elements(functions_for_ARB_shader_texture_lod_frag));
- }
-
- if (state->target == vertex_shader && state->ARB_shader_texture_lod_enable) {
- _mesa_read_profile(state, 9,
- prototypes_for_ARB_shader_texture_lod_vert,
- functions_for_ARB_shader_texture_lod_vert,
- Elements(functions_for_ARB_shader_texture_lod_vert));
- }
-
- if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
- _mesa_read_profile(state, 10,
- 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, 11,
- 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, 12,
- 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, 13,
- prototypes_for_EXT_texture_array_vert,
- functions_for_EXT_texture_array_vert,
- Elements(functions_for_EXT_texture_array_vert));
- }
-
- if (state->target == fragment_shader && state->OES_texture_3D_enable) {
- _mesa_read_profile(state, 14,
- prototypes_for_OES_texture_3D_frag,
- functions_for_OES_texture_3D_frag,
- Elements(functions_for_OES_texture_3D_frag));
- }
-
- if (state->target == vertex_shader && state->OES_texture_3D_enable) {
- _mesa_read_profile(state, 15,
- prototypes_for_OES_texture_3D_vert,
- functions_for_OES_texture_3D_vert,
- Elements(functions_for_OES_texture_3D_vert));
- }
-
-}
diff --git a/dist/Mesa/src/glsl/builtin_stubs.cpp b/dist/Mesa/src/glsl/builtin_stubs.cpp
deleted file mode 100644
index 00b329491..000000000
--- a/dist/Mesa/src/glsl/builtin_stubs.cpp
+++ /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.
- */
-
-#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(_mesa_glsl_parse_state *state)
-{
-}
diff --git a/dist/Mesa/src/glsl/builtin_types.h b/dist/Mesa/src/glsl/builtin_types.h
deleted file mode 100644
index 58b9a8127..000000000
--- a/dist/Mesa/src/glsl/builtin_types.h
+++ /dev/null
@@ -1,302 +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 glsl_type::_sampler3D_type =
- glsl_type(GL_SAMPLER_3D, GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
- "sampler3D");
-
-const glsl_type *const glsl_type::error_type = & glsl_type::_error_type;
-const glsl_type *const glsl_type::void_type = & glsl_type::_void_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"),
-};
-/*@}*/
-
-/** \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/dist/Mesa/src/glsl/builtin_variables.h b/dist/Mesa/src/glsl/builtin_variables.h
deleted file mode 100644
index 9b4f5d9e3..000000000
--- a/dist/Mesa/src/glsl/builtin_variables.h
+++ /dev/null
@@ -1,110 +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"},
-
- /* Mesa-internal ATI_envmap_bumpmap state. */
- { ir_var_uniform, -1, "vec2", "gl_MESABumpRotMatrix0"},
- { ir_var_uniform, -1, "vec2", "gl_MESABumpRotMatrix1"},
- { ir_var_uniform, -1, "vec4", "gl_MESAFogParamsOptimized"},
-};
-
diff --git a/dist/Mesa/src/glsl/builtins/ir/abs b/dist/Mesa/src/glsl/builtins/ir/abs
deleted file mode 100644
index d07d1d99e..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/abs
+++ /dev/null
@@ -1,41 +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)))))
-
- (signature int
- (parameters
- (declare (in) int arg0))
- ((return (expression int abs (var_ref arg0)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0))
- ((return (expression ivec2 abs (var_ref arg0)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0))
- ((return (expression ivec3 abs (var_ref arg0)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0))
- ((return (expression ivec4 abs (var_ref arg0)))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/acos b/dist/Mesa/src/glsl/builtins/ir/acos
deleted file mode 100644
index d1cfebeff..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/acosh b/dist/Mesa/src/glsl/builtins/ir/acosh
deleted file mode 100644
index 5518e7575..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/all b/dist/Mesa/src/glsl/builtins/ir/all
deleted file mode 100644
index 2cac0dfb6..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/any b/dist/Mesa/src/glsl/builtins/ir/any
deleted file mode 100644
index cc6038a31..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/asin b/dist/Mesa/src/glsl/builtins/ir/asin
deleted file mode 100644
index 45d9e6729..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/asin
+++ /dev/null
@@ -1,109 +0,0 @@
-((function asin
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float *
- (expression float sign (var_ref x))
- (expression float -
- (constant float (1.5707964))
- (expression float *
- (expression float sqrt
- (expression float -
- (constant float (1.0))
- (expression float abs (var_ref x))))
- (expression float +
- (constant float (1.5707964))
- (expression float *
- (expression float abs (var_ref x))
- (expression float +
- (constant float (-0.21460183))
- (expression float *
- (expression float abs (var_ref x))
- (expression float +
- (constant float (0.086566724))
- (expression float *
- (expression float abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 *
- (expression vec2 sign (var_ref x))
- (expression vec2 -
- (constant float (1.5707964))
- (expression vec2 *
- (expression vec2 sqrt
- (expression vec2 -
- (constant float (1.0))
- (expression vec2 abs (var_ref x))))
- (expression vec2 +
- (constant float (1.5707964))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (expression vec2 +
- (constant float (-0.21460183))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (expression vec2 +
- (constant float (0.086566724))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 *
- (expression vec3 sign (var_ref x))
- (expression vec3 -
- (constant float (1.5707964))
- (expression vec3 *
- (expression vec3 sqrt
- (expression vec3 -
- (constant float (1.0))
- (expression vec3 abs (var_ref x))))
- (expression vec3 +
- (constant float (1.5707964))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (expression vec3 +
- (constant float (-0.21460183))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (expression vec3 +
- (constant float (0.086566724))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 *
- (expression vec4 sign (var_ref x))
- (expression vec4 -
- (constant float (1.5707964))
- (expression vec4 *
- (expression vec4 sqrt
- (expression vec4 -
- (constant float (1.0))
- (expression vec4 abs (var_ref x))))
- (expression vec4 +
- (constant float (1.5707964))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (expression vec4 +
- (constant float (-0.21460183))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (expression vec4 +
- (constant float (0.086566724))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/asinh b/dist/Mesa/src/glsl/builtins/ir/asinh
deleted file mode 100644
index cdc2c20e7..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/atan b/dist/Mesa/src/glsl/builtins/ir/atan
deleted file mode 100644
index 7b5ea13c6..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/atan
+++ /dev/null
@@ -1,128 +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))
- (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) (
- (assign (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 (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
- ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
- )
- (
- ))
- )
- (
- (declare () float sgn)
- (assign (x) (var_ref sgn) (expression float sign (var_ref y)))
- (assign (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 (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (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 (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (y) (var_ref r)
- (call atan ((swiz y (var_ref y))
- (swiz y (var_ref x)))))
- (assign (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 (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (y) (var_ref r)
- (call atan ((swiz y (var_ref y))
- (swiz y (var_ref x)))))
- (assign (z) (var_ref r)
- (call atan ((swiz z (var_ref y))
- (swiz z (var_ref x)))))
- (assign (w) (var_ref r)
- (call atan ((swiz w (var_ref y))
- (swiz w (var_ref x)))))
- (return (var_ref r)))))
-
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/atanh b/dist/Mesa/src/glsl/builtins/ir/atanh
deleted file mode 100644
index 5559e9740..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/ceil b/dist/Mesa/src/glsl/builtins/ir/ceil
deleted file mode 100644
index a26a77504..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/clamp b/dist/Mesa/src/glsl/builtins/ir/clamp
deleted file mode 100644
index 2bdc466b2..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/cos b/dist/Mesa/src/glsl/builtins/ir/cos
deleted file mode 100644
index 88f266ecc..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/cosh b/dist/Mesa/src/glsl/builtins/ir/cosh
deleted file mode 100644
index 45e0ae427..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/cross b/dist/Mesa/src/glsl/builtins/ir/cross
deleted file mode 100644
index 02991fe42..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/dFdx b/dist/Mesa/src/glsl/builtins/ir/dFdx
deleted file mode 100644
index 30594d33c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/dFdy b/dist/Mesa/src/glsl/builtins/ir/dFdy
deleted file mode 100644
index fb5798d3c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/degrees b/dist/Mesa/src/glsl/builtins/ir/degrees
deleted file mode 100644
index dc0d7b9e2..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/distance b/dist/Mesa/src/glsl/builtins/ir/distance
deleted file mode 100644
index c249f8c99..000000000
--- a/dist/Mesa/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 (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 (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 (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/dist/Mesa/src/glsl/builtins/ir/dot b/dist/Mesa/src/glsl/builtins/ir/dot
deleted file mode 100644
index 1f27f3235..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/equal b/dist/Mesa/src/glsl/builtins/ir/equal
deleted file mode 100644
index a414b3e53..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/exp b/dist/Mesa/src/glsl/builtins/ir/exp
deleted file mode 100644
index a73bd6a7f..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/exp2 b/dist/Mesa/src/glsl/builtins/ir/exp2
deleted file mode 100644
index a842d3fe6..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/faceforward b/dist/Mesa/src/glsl/builtins/ir/faceforward
deleted file mode 100644
index 35b79571c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/floor b/dist/Mesa/src/glsl/builtins/ir/floor
deleted file mode 100644
index 8dd805279..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/fract b/dist/Mesa/src/glsl/builtins/ir/fract
deleted file mode 100644
index 3f0763d1b..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/ftransform b/dist/Mesa/src/glsl/builtins/ir/ftransform
deleted file mode 100644
index 9ca63dc1e..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/fwidth b/dist/Mesa/src/glsl/builtins/ir/fwidth
deleted file mode 100644
index 385e05d6a..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/greaterThan b/dist/Mesa/src/glsl/builtins/ir/greaterThan
deleted file mode 100644
index 18af86528..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/greaterThanEqual b/dist/Mesa/src/glsl/builtins/ir/greaterThanEqual
deleted file mode 100644
index 6d3bc892c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/inversesqrt b/dist/Mesa/src/glsl/builtins/ir/inversesqrt
deleted file mode 100644
index 5b66d2b36..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/length b/dist/Mesa/src/glsl/builtins/ir/length
deleted file mode 100644
index b72334ee8..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/lessThan b/dist/Mesa/src/glsl/builtins/ir/lessThan
deleted file mode 100644
index 8401fe9db..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/lessThanEqual b/dist/Mesa/src/glsl/builtins/ir/lessThanEqual
deleted file mode 100644
index c1cdd3fb6..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/log b/dist/Mesa/src/glsl/builtins/ir/log
deleted file mode 100644
index d168abb5a..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/log2 b/dist/Mesa/src/glsl/builtins/ir/log2
deleted file mode 100644
index b96c6276f..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/matrixCompMult b/dist/Mesa/src/glsl/builtins/ir/matrixCompMult
deleted file mode 100644
index 2400f11af..000000000
--- a/dist/Mesa/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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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/dist/Mesa/src/glsl/builtins/ir/max b/dist/Mesa/src/glsl/builtins/ir/max
deleted file mode 100644
index 2b5a02868..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/min b/dist/Mesa/src/glsl/builtins/ir/min
deleted file mode 100644
index 2deef1118..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/mix b/dist/Mesa/src/glsl/builtins/ir/mix
deleted file mode 100644
index a31f0fa70..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/mod b/dist/Mesa/src/glsl/builtins/ir/mod
deleted file mode 100644
index aeaea240e..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/modf b/dist/Mesa/src/glsl/builtins/ir/modf
deleted file mode 100644
index f4f631567..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/modf
+++ /dev/null
@@ -1,37 +0,0 @@
-((function modf
- (signature float
- (parameters
- (declare (in) float x)
- (declare (out) float i))
- ((declare () float t)
- (assign (x) (var_ref t) (expression float trunc (var_ref x)))
- (assign (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 (xy) (var_ref t) (expression vec2 trunc (var_ref x)))
- (assign (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 (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))
- (assign (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 (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))
- (assign (xyzw) (var_ref i) (var_ref t))
- (return (expression vec4 - (var_ref x) (var_ref t)))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/noise1 b/dist/Mesa/src/glsl/builtins/ir/noise1
deleted file mode 100644
index 115505610..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/noise2 b/dist/Mesa/src/glsl/builtins/ir/noise2
deleted file mode 100644
index d3366145f..000000000
--- a/dist/Mesa/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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (return (var_ref t))
- ))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/noise3 b/dist/Mesa/src/glsl/builtins/ir/noise3
deleted file mode 100644
index 1d8aa3f30..000000000
--- a/dist/Mesa/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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (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 (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (z) (var_ref t) (var_ref c))
- (return (var_ref t))
- ))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/noise4 b/dist/Mesa/src/glsl/builtins/ir/noise4
deleted file mode 100644
index d0894fd5e..000000000
--- a/dist/Mesa/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 (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (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 (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (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 (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (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 (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (w) (var_ref _r) (var_ref _w))
- (return (var_ref _r))
- ))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/normalize b/dist/Mesa/src/glsl/builtins/ir/normalize
deleted file mode 100644
index 0de0db0b6..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/not b/dist/Mesa/src/glsl/builtins/ir/not
deleted file mode 100644
index b696b0655..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/notEqual b/dist/Mesa/src/glsl/builtins/ir/notEqual
deleted file mode 100644
index abaf1914c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/outerProduct b/dist/Mesa/src/glsl/builtins/ir/outerProduct
deleted file mode 100644
index 0e3f375bb..000000000
--- a/dist/Mesa/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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (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 (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
- (assign (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 (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
- (assign (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 (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
- (assign (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/dist/Mesa/src/glsl/builtins/ir/pow b/dist/Mesa/src/glsl/builtins/ir/pow
deleted file mode 100644
index a61bc4418..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/pow
+++ /dev/null
@@ -1,25 +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 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/radians b/dist/Mesa/src/glsl/builtins/ir/radians
deleted file mode 100644
index a419101cf..000000000
--- a/dist/Mesa/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.0174532925))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 * (var_ref arg0) (constant float (0.0174532925))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 * (var_ref arg0) (constant float (0.0174532925))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 * (var_ref arg0) (constant float (0.0174532925))))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/reflect b/dist/Mesa/src/glsl/builtins/ir/reflect
deleted file mode 100644
index 1fa394e3c..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/refract b/dist/Mesa/src/glsl/builtins/ir/refract
deleted file mode 100644
index 60899f01c..000000000
--- a/dist/Mesa/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 (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 (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 (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 (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/dist/Mesa/src/glsl/builtins/ir/round b/dist/Mesa/src/glsl/builtins/ir/round
deleted file mode 100644
index d0d425bd6..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/roundEven b/dist/Mesa/src/glsl/builtins/ir/roundEven
deleted file mode 100644
index a9c99b6f4..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/sign b/dist/Mesa/src/glsl/builtins/ir/sign
deleted file mode 100644
index 1f51718da..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/sin b/dist/Mesa/src/glsl/builtins/ir/sin
deleted file mode 100644
index e6009d8ef..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/sin
+++ /dev/null
@@ -1,21 +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))
- ((return (expression vec2 sin (var_ref angle)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 angle))
- ((return (expression vec3 sin (var_ref angle)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 angle))
- ((return (expression vec4 sin (var_ref angle)))))
-))
diff --git a/dist/Mesa/src/glsl/builtins/ir/sinh b/dist/Mesa/src/glsl/builtins/ir/sinh
deleted file mode 100644
index 7ad4f58e2..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/smoothstep b/dist/Mesa/src/glsl/builtins/ir/smoothstep
deleted file mode 100644
index 94c98b29e..000000000
--- a/dist/Mesa/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 (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 (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 (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 (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 (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 (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 (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/dist/Mesa/src/glsl/builtins/ir/sqrt b/dist/Mesa/src/glsl/builtins/ir/sqrt
deleted file mode 100644
index 0302d164a..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/step b/dist/Mesa/src/glsl/builtins/ir/step
deleted file mode 100644
index efcd7bc80..000000000
--- a/dist/Mesa/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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
- (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (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 (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
- (assign (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/dist/Mesa/src/glsl/builtins/ir/tan b/dist/Mesa/src/glsl/builtins/ir/tan
deleted file mode 100644
index 997986318..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/tanh b/dist/Mesa/src/glsl/builtins/ir/tanh
deleted file mode 100644
index 3b7271bf7..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/ir/transpose b/dist/Mesa/src/glsl/builtins/ir/transpose
deleted file mode 100644
index 043327d23..000000000
--- a/dist/Mesa/src/glsl/builtins/ir/transpose
+++ /dev/null
@@ -1,139 +0,0 @@
-((function transpose
- (signature mat2
- (parameters
- (declare (in) mat2 m))
- ((declare () mat2 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (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 (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
- (assign (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/dist/Mesa/src/glsl/builtins/ir/trunc b/dist/Mesa/src/glsl/builtins/ir/trunc
deleted file mode 100644
index d320a2a77..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/profiles/100.frag b/dist/Mesa/src/glsl/builtins/profiles/100.frag
deleted file mode 100644
index df4c7f042..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/profiles/100.vert b/dist/Mesa/src/glsl/builtins/profiles/100.vert
deleted file mode 100644
index e5d96f1db..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/profiles/130.frag b/dist/Mesa/src/glsl/builtins/profiles/130.frag
index 0e3c7ac41..d0233b8a2 100644
--- a/dist/Mesa/src/glsl/builtins/profiles/130.frag
+++ b/dist/Mesa/src/glsl/builtins/profiles/130.frag
@@ -1,534 +1,4 @@
#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);
-ivec3 textureSize(isampler2DArray sampler, int lod);
-ivec3 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);
@@ -561,28 +31,6 @@ 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);
@@ -605,62 +53,6 @@ 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);
-
-/* 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);
@@ -687,315 +79,48 @@ uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-/* 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);
-
-/* 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);
+/* textureProjOffsetOffset - bias variants */
+ vec4 textureProjOffset( sampler1D sampler, vec2 P, int offset, float bias);
+ivec4 textureProjOffset(isampler1D sampler, vec2 P, int offset, float bias);
+uvec4 textureProjOffset(usampler1D sampler, vec2 P, int offset, float bias);
+ vec4 textureProjOffset( sampler1D sampler, vec4 P, int offset, float bias);
+ivec4 textureProjOffset(isampler1D sampler, vec4 P, int offset, float bias);
+uvec4 textureProjOffset(usampler1D sampler, vec4 P, int offset, float bias);
- vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset);
-ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset);
-uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset);
+ vec4 textureProjOffset( sampler2D sampler, vec3 P, ivec2 offset, float bias);
+ivec4 textureProjOffset(isampler2D sampler, vec3 P, ivec2 offset, float bias);
+uvec4 textureProjOffset(usampler2D sampler, vec3 P, ivec2 offset, float bias);
+ vec4 textureProjOffset( sampler2D sampler, vec4 P, ivec2 offset, float bias);
+ivec4 textureProjOffset(isampler2D sampler, vec4 P, ivec2 offset, float bias);
+uvec4 textureProjOffset(usampler2D sampler, vec4 P, ivec2 offset, float bias);
-float textureProj(sampler1DShadow sampler, vec4 P, int offset);
-float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset);
+ vec4 textureProjOffset( sampler3D sampler, vec4 P, ivec3 offset, float bias);
+ivec4 textureProjOffset(isampler3D sampler, vec4 P, ivec3 offset, float bias);
+uvec4 textureProjOffset(usampler3D sampler, vec4 P, ivec3 offset, float bias);
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
+float textureProjOffset(sampler1DShadow s, vec4 P, int offset, float bias);
+float textureProjOffset(sampler2DShadow s, vec4 P, ivec2 offset, float bias);
/*
* 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
@@ -1014,26 +139,3 @@ 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/dist/Mesa/src/glsl/builtins/profiles/130.vert b/dist/Mesa/src/glsl/builtins/profiles/130.vert
index f85b27f8f..99d127eb8 100644
--- a/dist/Mesa/src/glsl/builtins/profiles/130.vert
+++ b/dist/Mesa/src/glsl/builtins/profiles/130.vert
@@ -1,1027 +1,2 @@
#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);
-ivec3 textureSize(isampler2DArray sampler, int lod);
-ivec3 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/* 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);
-
-/*
- * 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/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag b/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag
index c15e2a10a..26e84d0f5 100644
--- a/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag
+++ b/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag
@@ -15,50 +15,3 @@ 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);
-
-/* New anisotropic texture functions, providing explicit derivatives: */
-vec4 texture1DGradARB (sampler1D sampler,
- float P, float dPdx, float dPdy);
-vec4 texture1DProjGradARB (sampler1D sampler,
- vec2 P, float dPdx, float dPdy);
-vec4 texture1DProjGradARB (sampler1D sampler,
- vec4 P, float dPdx, float dPdy);
-
-vec4 texture2DGradARB (sampler2D sampler,
- vec2 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DProjGradARB (sampler2D sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DProjGradARB (sampler2D sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-vec4 texture3DGradARB (sampler3D sampler,
- vec3 P, vec3 dPdx, vec3 dPdy);
-vec4 texture3DProjGradARB (sampler3D sampler,
- vec4 P, vec3 dPdx, vec3 dPdy);
-
-vec4 textureCubeGradARB (samplerCube sampler,
- vec3 P, vec3 dPdx, vec3 dPdy);
-
-vec4 shadow1DGradARB (sampler1DShadow sampler,
- vec3 P, float dPdx, float dPdy);
-vec4 shadow1DProjGradARB (sampler1DShadow sampler,
- vec4 P, float dPdx, float dPdy);
-
-vec4 shadow2DGradARB (sampler2DShadow sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 shadow2DProjGradARB (sampler2DShadow sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-#ifdef GL_ARB_texture_rectangle
-vec4 texture2DRectGradARB (sampler2DRect sampler,
- vec2 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DRectProjGradARB(sampler2DRect sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DRectProjGradARB(sampler2DRect sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-vec4 shadow2DRectGradARB (sampler2DRectShadow sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 shadow2DRectProjGradARB (sampler2DRectShadow sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-#endif
diff --git a/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert b/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert
deleted file mode 100644
index edfed26fc..000000000
--- a/dist/Mesa/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert
+++ /dev/null
@@ -1,46 +0,0 @@
-/* New anisotropic texture functions, providing explicit derivatives: */
-vec4 texture1DGradARB (sampler1D sampler,
- float P, float dPdx, float dPdy);
-vec4 texture1DProjGradARB (sampler1D sampler,
- vec2 P, float dPdx, float dPdy);
-vec4 texture1DProjGradARB (sampler1D sampler,
- vec4 P, float dPdx, float dPdy);
-
-vec4 texture2DGradARB (sampler2D sampler,
- vec2 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DProjGradARB (sampler2D sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DProjGradARB (sampler2D sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-vec4 texture3DGradARB (sampler3D sampler,
- vec3 P, vec3 dPdx, vec3 dPdy);
-vec4 texture3DProjGradARB (sampler3D sampler,
- vec4 P, vec3 dPdx, vec3 dPdy);
-
-vec4 textureCubeGradARB (samplerCube sampler,
- vec3 P, vec3 dPdx, vec3 dPdy);
-
-vec4 shadow1DGradARB (sampler1DShadow sampler,
- vec3 P, float dPdx, float dPdy);
-vec4 shadow1DProjGradARB (sampler1DShadow sampler,
- vec4 P, float dPdx, float dPdy);
-
-vec4 shadow2DGradARB (sampler2DShadow sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 shadow2DProjGradARB (sampler2DShadow sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-#ifdef GL_ARB_texture_rectangle
-vec4 texture2DRectGradARB (sampler2DRect sampler,
- vec2 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DRectProjGradARB(sampler2DRect sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 texture2DRectProjGradARB(sampler2DRect sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-
-vec4 shadow2DRectGradARB (sampler2DRectShadow sampler,
- vec3 P, vec2 dPdx, vec2 dPdy);
-vec4 shadow2DRectProjGradARB (sampler2DRectShadow sampler,
- vec4 P, vec2 dPdx, vec2 dPdy);
-#endif
diff --git a/dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.frag b/dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.frag
deleted file mode 100644
index 8938aa3e9..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.vert b/dist/Mesa/src/glsl/builtins/profiles/ARB_texture_rectangle.vert
deleted file mode 100644
index 8938aa3e9..000000000
--- a/dist/Mesa/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/dist/Mesa/src/glsl/builtins/profiles/OES_texture_3D.frag b/dist/Mesa/src/glsl/builtins/profiles/OES_texture_3D.frag
index b6ebd6a31..c2c3339b9 100644
--- a/dist/Mesa/src/glsl/builtins/profiles/OES_texture_3D.frag
+++ b/dist/Mesa/src/glsl/builtins/profiles/OES_texture_3D.frag
@@ -1,5 +1,6 @@
#version 100
#extension GL_OES_texture_3D : enable
+precision highp float;
vec4 texture3D (sampler3D sampler, vec3 coord);
vec4 texture3DProj (sampler3D sampler, vec4 coord);
diff --git a/dist/Mesa/src/glsl/builtins/tools/generate_builtins.py b/dist/Mesa/src/glsl/builtins/tools/generate_builtins.py
index 17d528c21..85bd5dddc 100644
--- a/dist/Mesa/src/glsl/builtins/tools/generate_builtins.py
+++ b/dist/Mesa/src/glsl/builtins/tools/generate_builtins.py
@@ -24,15 +24,28 @@ compiler = argv[1]
# 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'), '*')):
+ for filename in glob(path.join(path.join(builtins_dir, 'ir'), '*.ir')):
+ function_name = path.basename(filename).split('.')[0]
with open(filename) as f:
- fs[path.basename(filename)] = f.read()
+ fs[function_name] = f.read()
+
+def read_glsl_files(fs):
+ for filename in glob(path.join(path.join(builtins_dir, 'glsl'), '*.glsl')):
+ function_name = path.basename(filename).split('.')[0]
+ (output, returncode) = run_compiler([filename])
+ if (returncode):
+ sys.stderr.write("Failed to compile builtin: " + filename + "\n")
+ sys.stderr.write("Result:\n")
+ sys.stderr.write(output)
+ else:
+ fs[function_name] = output;
# Return a dictionary containing all builtin definitions (even generated)
def get_builtin_definitions():
fs = {}
generate_texture_functions(fs)
read_ir_files(fs)
+ read_glsl_files(fs)
return fs
def stringify(s):
@@ -58,10 +71,18 @@ def write_function_definitions():
print stringify(v), ';'
def run_compiler(args):
- command = [compiler, '--dump-lir'] + args
+ command = [compiler, '--dump-hir'] + args
p = Popen(command, 1, stdout=PIPE, shell=False)
output = p.communicate()[0]
+ if (p.returncode):
+ sys.stderr.write("Failed to compile builtins with command:\n")
+ for arg in command:
+ sys.stderr.write(arg + " ")
+ sys.stderr.write("\n")
+ sys.stderr.write("Result:\n")
+ sys.stderr.write(output)
+
# 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)
@@ -69,6 +90,10 @@ def run_compiler(args):
# Also toss any duplicate newlines
output = output.replace('\n\n', '\n')
+ # Kill any global variable declarations. We don't want them.
+ kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE)
+ output = kill_globals.sub('', output)
+
return (output, p.returncode)
def write_profile(filename, profile):
@@ -78,10 +103,6 @@ def write_profile(filename, profile):
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)
-
print 'static const char prototypes_for_' + profile + '[] ='
print stringify(proto_ir), ';'
@@ -103,8 +124,13 @@ def write_profiles():
write_profile(filename, profile)
def get_profile_list():
+ profile_files = []
+ for extension in ['glsl', 'frag', 'vert']:
+ path_glob = path.join(
+ path.join(builtins_dir, 'profiles'), '*.' + extension)
+ profile_files.extend(glob(path_glob))
profiles = []
- for pfile in sorted(glob(path.join(path.join(builtins_dir, 'profiles'), '*'))):
+ for pfile in sorted(profile_files):
profiles.append((pfile, path.basename(pfile).replace('.', '_')))
return profiles
@@ -147,17 +173,26 @@ gl_shader *
read_builtins(GLenum target, const char *protos, const char **functions, unsigned count)
{
struct gl_context fakeCtx;
- fakeCtx.API = API_OPENGL;
- fakeCtx.Const.GLSLVersion = 130;
+ fakeCtx.API = API_OPENGL_COMPAT;
+ fakeCtx.Const.GLSLVersion = 150;
fakeCtx.Extensions.ARB_ES2_compatibility = true;
+ fakeCtx.Extensions.ARB_ES3_compatibility = true;
+ fakeCtx.Const.ForceGLSLExtensionsWarn = false;
gl_shader *sh = _mesa_new_shader(NULL, 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->language_version = 150;
+ st->symbols->separate_function_namespace = false;
st->ARB_texture_rectangle_enable = true;
st->EXT_texture_array_enable = true;
+ st->OES_EGL_image_external_enable = true;
+ st->ARB_shader_bit_encoding_enable = true;
+ st->ARB_texture_cube_map_array_enable = true;
+ st->ARB_shading_language_packing_enable = true;
+ st->ARB_texture_multisample_enable = true;
+ st->ARB_texture_query_lod_enable = true;
+ st->ARB_gpu_shader5_enable = true;
_mesa_glsl_initialize_types(st);
sh->ir = new(sh) exec_list;
@@ -196,7 +231,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
print 'static gl_shader *builtin_profiles[%d];' % len(profiles)
print """
-void *builtin_mem_ctx = NULL;
+static void *builtin_mem_ctx = NULL;
void
_mesa_glsl_release_functions(void)
@@ -228,12 +263,14 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
void
_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
{
+ /* If we've already initialized the built-ins, bail early. */
+ if (state->num_builtins_to_link > 0)
+ return;
+
if (builtin_mem_ctx == NULL) {
builtin_mem_ctx = ralloc_context(NULL); // "GLSL built-in functions"
memset(&builtin_profiles, 0, sizeof(builtin_profiles));
}
-
- state->num_builtins_to_link = 0;
"""
i = 0
@@ -242,10 +279,16 @@ _mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
check = 'state->target == vertex_shader && '
elif profile.endswith('_frag'):
check = 'state->target == fragment_shader && '
-
- version = re.sub(r'_(vert|frag)$', '', profile)
- if version.isdigit():
+ else:
+ check = ''
+
+ version = re.sub(r'_(glsl|vert|frag)$', '', profile)
+ if version[0].isdigit():
+ is_es = version.endswith('es')
+ if is_es:
+ version = version[:-2]
check += 'state->language_version == ' + version
+ check += ' && {0}state->es_shader'.format('' if is_es else '!')
else: # an extension name
check += 'state->' + version + '_enable'
diff --git a/dist/Mesa/src/glsl/builtins/tools/texture_builtins.py b/dist/Mesa/src/glsl/builtins/tools/texture_builtins.py
index a4054caac..6ef20d556 100644
--- a/dist/Mesa/src/glsl/builtins/tools/texture_builtins.py
+++ b/dist/Mesa/src/glsl/builtins/tools/texture_builtins.py
@@ -23,70 +23,101 @@ def get_sampler_dim(sampler_type):
sampler_dim = int(sampler_type[0])
elif sampler_type.startswith("Cube"):
sampler_dim = 3
+ elif sampler_type == "ExternalOES":
+ sampler_dim = 2
+ elif sampler_type == "Buffer":
+ sampler_dim = 1
else:
assert False ("coord_dim: invalid sampler_type: " + sampler_type)
return sampler_dim
# Get the coordinate dimension for a given sampler type.
# Array samplers also get +1 here since the layer is really an extra coordinate
-def get_coord_dim(sampler_type):
+def get_coord_dim(sampler_type, tex_inst):
coord_dim = get_sampler_dim(sampler_type)
- if sampler_type.find("Array") != -1:
+ if sampler_type.find("Array") != -1 and tex_inst != "lod":
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):
+def get_extra_dim(sampler_type, use_proj, unused_fields, tex_inst):
extra_dim = unused_fields
- if sampler_type.find("Shadow") != -1:
+ if sampler_type == "CubeArrayShadow":
+ return 0
+ if sampler_type.find("Shadow") != -1 and tex_inst != "lod":
extra_dim += 1
if use_proj:
extra_dim += 1
return extra_dim
+def get_txs_dim(sampler_type, tex_inst):
+ if sampler_type.startswith("CubeArray"):
+ return 3
+ if sampler_type.startswith("Cube"):
+ return 2
+ return get_coord_dim(sampler_type, tex_inst)
+
+def has_lod(sampler_type):
+ if 'Buffer' in sampler_type: return False
+ if 'Rect' in sampler_type: return False
+ if 'MS' in sampler_type: return False
+ return True
+
def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
- coord_dim = get_coord_dim(sampler_type)
- extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields)
- offset_dim = get_sampler_dim(sampler_type)
+ coord_dim = get_coord_dim(sampler_type, tex_inst)
+ extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields, tex_inst)
+ sampler_dim = get_sampler_dim(sampler_type)
if variant & Single:
return_type = "float"
+ elif tex_inst == "txs":
+ return_type = vec_type("i", get_txs_dim(sampler_type, tex_inst))
+ elif tex_inst == "lod":
+ return_type = "vec2"
else:
return_type = g + "vec4"
# Print parameters
print " (signature", return_type
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)",
+ print " (declare (in) " + g + "sampler" + sampler_type + " sampler)",
+ if tex_inst != "txs":
+ print "\n (declare (in) " + vec_type("i" if tex_inst in ['txf','txf_ms'] else "", coord_dim + extra_dim) + " P)",
if tex_inst == "txl":
print "\n (declare (in) float lod)",
- elif tex_inst == "txf":
+ elif tex_inst in ['txf', 'txs'] and has_lod(sampler_type):
print "\n (declare (in) int lod)",
+ elif tex_inst == "txf_ms":
+ print "\n (declare (in) int sample)",
elif tex_inst == "txd":
- grad_type = vec_type("", coord_dim)
+ grad_type = vec_type("", sampler_dim)
print "\n (declare (in) " + grad_type + " dPdx)",
print "\n (declare (in) " + grad_type + " dPdy)",
+ if sampler_type == "CubeArrayShadow" and tex_inst == "tex":
+ print "\n (declare (in) float compare)",
if variant & Offset:
- print "\n (declare (const_in) " + vec_type("i", offset_dim) + " offset)",
+ print "\n (declare (const_in) " + vec_type("i", sampler_dim) + " offset)",
if tex_inst == "txb":
print "\n (declare (in) float bias)",
print ")\n ((return (" + tex_inst, return_type, "(var_ref sampler)",
- # Coordinate
- if extra_dim > 0:
- print "(swiz " + "xyzw"[:coord_dim] + " (var_ref P))",
- else:
- print "(var_ref P)",
+ if tex_inst != "txs":
+ # Coordinate
+ if extra_dim > 0:
+ print "(swiz " + "xyzw"[:coord_dim] + " (var_ref P))",
+ else:
+ print "(var_ref P)",
- if variant & Offset:
- print "(var_ref offset)",
- else:
- print "0",
+ if tex_inst not in ['txf_ms', 'txs', 'lod']:
+ # Coordinate offset
+ if variant & Offset:
+ print "(var_ref offset)",
+ else:
+ print "0",
- if tex_inst != "txf":
+ if tex_inst not in ['txf', 'txf_ms', 'txs', 'lod']:
# Projective divisor
if variant & Proj:
print "(swiz " + "xyzw"[coord_dim + extra_dim-1] + " (var_ref P))",
@@ -94,7 +125,9 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
print "1",
# Shadow comparitor
- if sampler_type == "2DArrayShadow": # a special case:
+ if sampler_type == "CubeArrayShadow": # a special case
+ print "(var_ref compare)",
+ elif sampler_type == "2DArrayShadow" or sampler_type == "CubeShadow": # 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))",
@@ -104,7 +137,14 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
# Bias/explicit LOD/gradient:
if tex_inst == "txb":
print "(var_ref bias)",
- elif tex_inst == "txl" or tex_inst == "txf":
+ elif tex_inst in ['txs', 'txf', 'txf_ms']:
+ if has_lod(sampler_type):
+ print "(var_ref lod)",
+ elif tex_inst == 'txf_ms':
+ print "(var_ref sample)",
+ else:
+ print "(constant int (0))",
+ elif tex_inst == "txl":
print "(var_ref lod)",
elif tex_inst == "txd":
print "((var_ref dPdx) (var_ref dPdy))",
@@ -130,6 +170,27 @@ def end_function(fs, name):
#
# Takes a dictionary as an argument.
def generate_texture_functions(fs):
+ start_function("textureSize")
+ generate_fiu_sigs("txs", "1D")
+ generate_fiu_sigs("txs", "2D")
+ generate_fiu_sigs("txs", "3D")
+ generate_fiu_sigs("txs", "Cube")
+ generate_fiu_sigs("txs", "1DArray")
+ generate_fiu_sigs("txs", "2DArray")
+ generate_sigs("", "txs", "1DShadow")
+ generate_sigs("", "txs", "2DShadow")
+ generate_sigs("", "txs", "CubeShadow")
+ generate_sigs("", "txs", "1DArrayShadow")
+ generate_sigs("", "txs", "2DArrayShadow")
+ generate_fiu_sigs("txs", "2DRect")
+ generate_sigs("", "txs", "2DRectShadow")
+ generate_fiu_sigs("txs", "Buffer")
+ generate_fiu_sigs("txs", "CubeArray")
+ generate_sigs("", "txs", "CubeArrayShadow")
+ generate_fiu_sigs("txs", "2DMS")
+ generate_fiu_sigs("txs", "2DMSArray")
+ end_function(fs, "textureSize")
+
start_function("texture")
generate_fiu_sigs("tex", "1D")
generate_fiu_sigs("tex", "2D")
@@ -142,6 +203,11 @@ def generate_texture_functions(fs):
generate_sigs("", "tex", "CubeShadow", Single);
generate_sigs("", "tex", "1DArrayShadow", Single);
generate_sigs("", "tex", "2DArrayShadow", Single);
+ generate_fiu_sigs("tex", "2DRect")
+ generate_sigs("", "tex", "2DRectShadow", Single);
+ # ARB_texture_cube_map_array extension
+ generate_fiu_sigs("tex", "CubeArray")
+ generate_sigs("", "tex", "CubeArrayShadow", Single);
generate_fiu_sigs("txb", "1D")
generate_fiu_sigs("txb", "2D")
@@ -149,6 +215,7 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txb", "Cube")
generate_fiu_sigs("txb", "1DArray")
generate_fiu_sigs("txb", "2DArray")
+ generate_fiu_sigs("txb", "CubeArray")
generate_sigs("", "txb", "1DShadow", Single, 1);
generate_sigs("", "txb", "2DShadow", Single);
generate_sigs("", "txb", "CubeShadow", Single);
@@ -164,6 +231,9 @@ def generate_texture_functions(fs):
generate_fiu_sigs("tex", "3D", Proj)
generate_sigs("", "tex", "1DShadow", Proj | Single, 1);
generate_sigs("", "tex", "2DShadow", Proj | Single);
+ generate_fiu_sigs("tex", "2DRect", Proj)
+ generate_fiu_sigs("tex", "2DRect", Proj, 1)
+ generate_sigs("", "tex", "2DRectShadow", Proj | Single);
generate_fiu_sigs("txb", "1D", Proj)
generate_fiu_sigs("txb", "1D", Proj, 2)
@@ -184,6 +254,8 @@ def generate_texture_functions(fs):
generate_sigs("", "txl", "1DShadow", Single, 1);
generate_sigs("", "txl", "2DShadow", Single);
generate_sigs("", "txl", "1DArrayShadow", Single);
+ # ARB_texture_cube_map_array extension
+ generate_fiu_sigs("txl", "CubeArray")
end_function(fs, "textureLod")
start_function("textureLodOffset")
@@ -201,6 +273,8 @@ def generate_texture_functions(fs):
generate_fiu_sigs("tex", "1D", Offset)
generate_fiu_sigs("tex", "2D", Offset)
generate_fiu_sigs("tex", "3D", Offset)
+ generate_fiu_sigs("tex", "2DRect", Offset)
+ generate_sigs("", "tex", "2DRectShadow", Offset | Single);
generate_fiu_sigs("tex", "1DArray", Offset)
generate_fiu_sigs("tex", "2DArray", Offset)
generate_sigs("", "tex", "1DShadow", Offset | Single, 1);
@@ -221,14 +295,19 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txf", "1D")
generate_fiu_sigs("txf", "2D")
generate_fiu_sigs("txf", "3D")
+ generate_fiu_sigs("txf", "2DRect")
generate_fiu_sigs("txf", "1DArray")
generate_fiu_sigs("txf", "2DArray")
+ generate_fiu_sigs("txf", "Buffer")
+ generate_fiu_sigs("txf_ms", "2DMS")
+ generate_fiu_sigs("txf_ms", "2DMSArray")
end_function(fs, "texelFetch")
start_function("texelFetchOffset")
generate_fiu_sigs("txf", "1D", Offset)
generate_fiu_sigs("txf", "2D", Offset)
generate_fiu_sigs("txf", "3D", Offset)
+ generate_fiu_sigs("txf", "2DRect", Offset)
generate_fiu_sigs("txf", "1DArray", Offset)
generate_fiu_sigs("txf", "2DArray", Offset)
end_function(fs, "texelFetchOffset")
@@ -239,6 +318,9 @@ def generate_texture_functions(fs):
generate_fiu_sigs("tex", "2D", Proj | Offset)
generate_fiu_sigs("tex", "2D", Proj | Offset, 1)
generate_fiu_sigs("tex", "3D", Proj | Offset)
+ generate_fiu_sigs("tex", "2DRect", Proj | Offset)
+ generate_fiu_sigs("tex", "2DRect", Proj | Offset, 1)
+ generate_sigs("", "tex", "2DRectShadow", Proj | Offset | Single);
generate_sigs("", "tex", "1DShadow", Proj | Offset | Single, 1);
generate_sigs("", "tex", "2DShadow", Proj | Offset | Single);
@@ -278,18 +360,23 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txd", "Cube")
generate_fiu_sigs("txd", "1DArray")
generate_fiu_sigs("txd", "2DArray")
+ generate_fiu_sigs("txd", "2DRect")
+ generate_sigs("", "txd", "2DRectShadow", Single);
generate_sigs("", "txd", "1DShadow", Single, 1);
generate_sigs("", "txd", "2DShadow", Single);
generate_sigs("", "txd", "CubeShadow", Single);
generate_sigs("", "txd", "1DArrayShadow", Single);
generate_sigs("", "txd", "2DArrayShadow", Single);
+ # ARB_texture_cube_map_array extension
+ generate_fiu_sigs("txd", "CubeArray")
end_function(fs, "textureGrad")
start_function("textureGradOffset")
generate_fiu_sigs("txd", "1D", Offset)
generate_fiu_sigs("txd", "2D", Offset)
generate_fiu_sigs("txd", "3D", Offset)
- generate_fiu_sigs("txd", "Cube", Offset)
+ generate_fiu_sigs("txd", "2DRect", Offset)
+ generate_sigs("", "txd", "2DRectShadow", Offset | Single);
generate_fiu_sigs("txd", "1DArray", Offset)
generate_fiu_sigs("txd", "2DArray", Offset)
generate_sigs("", "txd", "1DShadow", Offset | Single, 1);
@@ -304,6 +391,9 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txd", "2D", Proj)
generate_fiu_sigs("txd", "2D", Proj, 1)
generate_fiu_sigs("txd", "3D", Proj)
+ generate_fiu_sigs("txd", "2DRect", Proj)
+ generate_fiu_sigs("txd", "2DRect", Proj, 1)
+ generate_sigs("", "txd", "2DRectShadow", Proj | Single);
generate_sigs("", "txd", "1DShadow", Proj | Single, 1);
generate_sigs("", "txd", "2DShadow", Proj | Single);
end_function(fs, "textureProjGrad")
@@ -314,6 +404,9 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txd", "2D", Proj | Offset)
generate_fiu_sigs("txd", "2D", Proj | Offset, 1)
generate_fiu_sigs("txd", "3D", Proj | Offset)
+ generate_fiu_sigs("txd", "2DRect", Proj | Offset)
+ generate_fiu_sigs("txd", "2DRect", Proj | Offset, 1)
+ generate_sigs("", "txd", "2DRectShadow", Proj | Offset | Single);
generate_sigs("", "txd", "1DShadow", Proj | Offset | Single, 1);
generate_sigs("", "txd", "2DShadow", Proj | Offset | Single);
end_function(fs, "textureProjGradOffset")
@@ -458,6 +551,8 @@ def generate_texture_functions(fs):
start_function("texture2D")
generate_sigs("", "tex", "2D")
generate_sigs("", "txb", "2D")
+ # OES_EGL_image_external
+ generate_sigs("", "tex", "ExternalOES")
end_function(fs, "texture2D")
start_function("texture2DLod")
@@ -469,6 +564,9 @@ def generate_texture_functions(fs):
generate_sigs("", "tex", "2D", Proj, 1)
generate_sigs("", "txb", "2D", Proj)
generate_sigs("", "txb", "2D", Proj, 1)
+ # OES_EGL_image_external
+ generate_sigs("", "tex", "ExternalOES", Proj)
+ generate_sigs("", "tex", "ExternalOES", Proj, 1)
end_function(fs, "texture2DProj")
start_function("texture2DProjLod")
@@ -539,6 +637,22 @@ def generate_texture_functions(fs):
generate_sigs("", "txl", "2DShadow", Proj)
end_function(fs, "shadow2DProjLod")
+ start_function("textureQueryLOD")
+ generate_fiu_sigs("lod", "1D")
+ generate_fiu_sigs("lod", "2D")
+ generate_fiu_sigs("lod", "3D")
+ generate_fiu_sigs("lod", "Cube")
+ generate_fiu_sigs("lod", "1DArray")
+ generate_fiu_sigs("lod", "2DArray")
+ generate_fiu_sigs("lod", "CubeArray")
+ generate_sigs("", "lod", "1DShadow")
+ generate_sigs("", "lod", "2DShadow")
+ generate_sigs("", "lod", "CubeShadow")
+ generate_sigs("", "lod", "1DArrayShadow")
+ generate_sigs("", "lod", "2DArrayShadow")
+ generate_sigs("", "lod", "CubeArrayShadow")
+ end_function(fs, "textureQueryLOD")
+
sys.stdout = sys.__stdout__
return fs
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp-lex.c b/dist/Mesa/src/glsl/glcpp/glcpp-lex.c
index 6f1d9ebbf..577d5d53c 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp-lex.c
+++ b/dist/Mesa/src/glsl/glcpp/glcpp-lex.c
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 36
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -54,7 +54,6 @@ 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
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -170,6 +171,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -192,11 +198,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#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
@@ -214,7 +215,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t 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
@@ -293,7 +294,7 @@ static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t 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 );
+YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner );
void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -325,7 +326,7 @@ void glcpp_free (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
-#define glcpp_wrap(n) 1
+#define glcpp_wrap(yyscanner) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -358,43 +359,24 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[125] =
+static yyconst flex_int16_t yy_accept[150] =
{ 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, 3, 43, 4, 43, 5, 43, 42,
- 43, 18, 43, 18, 43, 18, 43, 39, 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, 26, 39, 37,
-
- 39, 14, 37, 39, 15, 16, 37, 39, 17, 19,
- 12, 22, 36, 37, 39, 21, 19, 13,16404, 11,
- 9, 8, 8212, 10
- } ;
-
-static yyconst flex_int16_t yy_accept[155] =
- { 0,
- 1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
- 3, 4, 6, 8, 10, 11, 13, 14, 16, 18,
- 20, 23, 26, 28, 30, 32, 35, 38, 40, 42,
- 44, 46, 48, 50, 52, 54, 56, 58, 59, 60,
- 61, 62, 63, 64, 65, 67, 69, 70, 72, 74,
- 75, 76, 77, 78, 79, 81, 83, 84, 85, 86,
- 87, 87, 87, 87, 87, 87, 87, 87, 88, 89,
- 90, 91, 92, 93, 93, 93, 93, 93, 94, 96,
- 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
- 98, 100, 102, 102, 102, 102, 102, 102, 102, 103,
-
- 103, 103, 103, 103, 103, 103, 105, 105, 106, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 109,
- 109, 110, 111, 111, 112, 112, 112, 112, 113, 113,
- 116, 117, 118, 118, 119, 119, 119, 119, 120, 120,
- 120, 121, 121, 122, 123, 123, 123, 123, 124, 124,
- 124, 125, 125, 125
+ 0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
+ 0, 0, 44, 39, 40, 41, 43, 38, 43, 38,
+ 38, 38, 25, 24, 38, 38, 38, 37, 37, 38,
+ 40, 23, 3, 4, 5, 42, 17, 17, 17, 21,
+ 39, 40, 32, 35, 33, 2, 1, 25, 25, 0,
+ 24, 24, 27, 29, 31, 30, 28, 37, 37, 34,
+ 40, 23, 23, 0, 0, 0, 0, 0, 0, 0,
+ 3, 4, 5, 6, 5, 7, 0, 0, 0, 0,
+ 20, 21, 1, 26, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 26, 37, 0, 0, 0,
+
+ 0, 0, 0, 13, 0, 0, 0, 0, 0, 0,
+ 37, 0, 0, 15, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 37, 0, 14, 16, 18, 0, 11,
+ 0, 10, 0, 22, 0, 36, 0, 18, 0, 12,
+ 0, 0, 19, 0, 9, 0, 0, 8, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -431,159 +413,148 @@ static yyconst flex_int32_t yy_ec[256] =
static yyconst flex_int32_t yy_meta[40] =
{ 0,
- 1, 2, 3, 4, 4, 4, 4, 4, 5, 6,
- 4, 7, 7, 7, 4, 4, 4, 8, 8, 8,
- 8, 8, 9, 8, 8, 8, 8, 8, 8, 9,
- 8, 8, 8, 8, 8, 8, 8, 8, 4
+ 1, 1, 2, 1, 1, 1, 1, 1, 3, 4,
+ 1, 5, 5, 5, 1, 1, 1, 5, 6, 6,
+ 6, 5, 7, 5, 5, 6, 6, 6, 6, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 1
} ;
-static yyconst flex_int16_t yy_base[168] =
+static yyconst flex_int16_t yy_base[164] =
{ 0,
- 0, 38, 0, 0, 38, 39, 328, 327, 326, 44,
- 328, 0, 325, 332, 332, 310, 319, 332, 316, 41,
- 41, 44, 44, 307, 49, 321, 44, 282, 61, 79,
- 317, 332, 72, 332, 332, 67, 68, 0, 317, 332,
- 332, 332, 332, 0, 34, 0, 105, 0, 0, 332,
- 332, 332, 332, 332, 317, 73, 332, 82, 311, 310,
- 291, 61, 289, 286, 279, 281, 286, 306, 332, 90,
- 332, 94, 332, 84, 85, 108, 48, 0, 88, 95,
- 283, 86, 284, 273, 270, 91, 274, 281, 279, 268,
- 0, 124, 273, 274, 274, 270, 265, 271, 332, 267,
-
- 264, 262, 259, 260, 249, 125, 245, 332, 332, 241,
- 229, 231, 223, 209, 222, 194, 197, 194, 130, 196,
- 332, 0, 181, 332, 189, 131, 191, 332, 181, 210,
- 162, 0, 136, 332, 134, 0, 130, 155, 111, 138,
- 332, 153, 0, 332, 125, 41, 156, 332, 34, 136,
- 332, 159, 332, 173, 182, 191, 200, 209, 218, 227,
- 236, 245, 254, 263, 272, 280, 285
+ 0, 38, 0, 0, 38, 39, 321, 320, 319, 44,
+ 50, 0, 321, 319, 317, 325, 325, 302, 311, 325,
+ 308, 80, 80, 83, 83, 299, 88, 0, 290, 274,
+ 100, 118, 309, 325, 104, 325, 325, 106, 107, 302,
+ 309, 307, 325, 325, 325, 325, 0, 113, 325, 0,
+ 115, 325, 325, 325, 325, 325, 325, 0, 283, 325,
+ 111, 301, 300, 281, 110, 279, 276, 269, 271, 276,
+ 296, 325, 149, 325, 153, 325, 130, 120, 151, 15,
+ 325, 289, 0, 74, 270, 271, 96, 272, 261, 258,
+ 135, 262, 269, 267, 256, 325, 258, 260, 261, 261,
+
+ 257, 252, 258, 325, 257, 257, 255, 252, 253, 242,
+ 245, 231, 0, 325, 228, 219, 216, 213, 208, 216,
+ 148, 151, 147, 150, 148, 325, 325, 0, 137, 325,
+ 145, 167, 146, 325, 136, 0, 164, 0, 135, 325,
+ 0, 131, 155, 108, 0, 135, 91, 109, 325, 178,
+ 186, 194, 202, 206, 214, 222, 228, 236, 240, 247,
+ 255, 259, 267
} ;
-static yyconst flex_int16_t yy_def[168] =
+static yyconst flex_int16_t yy_def[164] =
{ 0,
- 153, 1, 154, 154, 155, 155, 156, 156, 157, 157,
- 153, 158, 153, 153, 153, 153, 153, 153, 153, 153,
- 158, 158, 153, 153, 153, 159, 159, 153, 153, 153,
- 160, 153, 161, 153, 153, 153, 153, 158, 153, 153,
- 153, 153, 153, 162, 21, 158, 158, 22, 158, 153,
- 153, 153, 153, 153, 159, 159, 153, 153, 30, 30,
- 153, 153, 153, 153, 153, 153, 153, 160, 153, 161,
- 153, 161, 153, 153, 153, 153, 153, 162, 47, 159,
- 153, 153, 153, 153, 153, 163, 153, 153, 153, 153,
- 158, 159, 153, 153, 153, 153, 153, 153, 153, 153,
-
- 153, 153, 153, 153, 153, 159, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 159, 153,
- 153, 164, 153, 153, 153, 153, 153, 153, 153, 159,
- 153, 164, 153, 153, 153, 165, 153, 166, 153, 153,
- 153, 153, 165, 153, 167, 153, 153, 153, 167, 153,
- 153, 153, 0, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153
+ 149, 1, 150, 150, 151, 151, 152, 152, 153, 153,
+ 149, 11, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 154, 154, 149,
+ 149, 149, 155, 149, 156, 149, 149, 149, 149, 157,
+ 149, 149, 149, 149, 149, 149, 158, 149, 149, 159,
+ 149, 149, 149, 149, 149, 149, 149, 154, 154, 149,
+ 149, 32, 32, 149, 149, 149, 149, 149, 149, 149,
+ 155, 149, 156, 149, 156, 149, 149, 149, 149, 149,
+ 149, 157, 158, 159, 154, 149, 149, 149, 149, 149,
+ 160, 149, 149, 149, 149, 149, 154, 149, 149, 149,
+
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 154, 149, 161, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 154, 149, 149, 149, 162, 149, 149,
+ 149, 149, 149, 149, 149, 154, 149, 162, 149, 149,
+ 163, 149, 149, 149, 163, 149, 149, 149, 0, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149
} ;
-static yyconst flex_int16_t yy_nxt[372] =
+static yyconst flex_int16_t yy_nxt[365] =
{ 0,
- 12, 13, 14, 15, 16, 17, 18, 19, 18, 18,
- 20, 21, 22, 22, 23, 24, 25, 26, 26, 26,
- 26, 26, 27, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 28, 29,
- 32, 32, 148, 30, 38, 36, 14, 33, 33, 37,
- 43, 44, 45, 45, 38, 48, 48, 48, 50, 51,
- 46, 47, 58, 49, 53, 54, 59, 56, 74, 76,
- 136, 38, 75, 38, 71, 82, 46, 83, 47, 49,
- 60, 72, 73, 58, 41, 74, 76, 59, 82, 75,
- 83, 77, 71, 84, 63, 38, 71, 80, 85, 153,
-
- 153, 61, 62, 72, 73, 63, 64, 91, 77, 76,
- 65, 63, 94, 100, 66, 67, 79, 79, 79, 95,
- 101, 92, 79, 91, 38, 38, 79, 79, 79, 79,
- 38, 77, 126, 148, 63, 140, 141, 150, 151, 140,
- 141, 146, 135, 135, 135, 142, 142, 142, 119, 147,
- 147, 147, 130, 106, 140, 141, 138, 150, 151, 144,
- 150, 151, 139, 138, 142, 142, 142, 152, 152, 152,
- 152, 152, 152, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 38,
- 38, 137, 136, 134, 133, 38, 38, 38, 55, 131,
- 129, 128, 127, 126, 55, 55, 55, 68, 68, 68,
- 68, 68, 125, 68, 68, 68, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 78, 78, 124, 78, 78,
- 78, 78, 78, 78, 99, 99, 99, 99, 99, 99,
- 123, 122, 99, 132, 132, 121, 132, 132, 132, 132,
- 132, 132, 143, 143, 120, 143, 143, 143, 143, 143,
- 143, 145, 118, 117, 116, 115, 114, 145, 145, 149,
- 113, 149, 149, 149, 112, 111, 110, 109, 108, 107,
-
- 105, 104, 103, 102, 98, 97, 96, 93, 69, 90,
- 89, 88, 87, 86, 81, 153, 153, 38, 39, 69,
- 57, 38, 52, 42, 41, 40, 39, 153, 14, 15,
- 15, 11, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153
+ 14, 15, 16, 17, 18, 19, 20, 21, 20, 20,
+ 22, 23, 24, 24, 25, 26, 27, 28, 28, 28,
+ 28, 28, 29, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 30, 31,
+ 34, 34, 87, 32, 88, 38, 16, 35, 35, 39,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 17, 46,
+ 47, 48, 48, 96, 51, 51, 51, 53, 54, 49,
+
+ 50, 61, 52, 56, 57, 62, 74, 77, 79, 96,
+ 148, 78, 61, 75, 76, 49, 62, 50, 52, 63,
+ 141, 79, 99, 44, 48, 48, 51, 51, 51, 100,
+ 80, 77, 49, 66, 52, 78, 148, 87, 147, 88,
+ 64, 65, 89, 80, 66, 67, 66, 90, 49, 68,
+ 52, 74, 79, 69, 70, 74, 143, 105, 149, 149,
+ 146, 144, 75, 76, 106, 143, 142, 141, 132, 140,
+ 139, 137, 136, 135, 80, 134, 133, 66, 17, 17,
+ 17, 17, 17, 17, 17, 17, 33, 33, 33, 33,
+ 33, 33, 33, 33, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 37, 37, 37, 37, 37, 37, 37, 37,
+ 58, 58, 58, 58, 71, 71, 71, 132, 71, 71,
+ 71, 71, 73, 73, 73, 73, 73, 73, 73, 73,
+ 82, 131, 82, 82, 82, 82, 83, 130, 83, 83,
+ 83, 83, 83, 83, 84, 129, 84, 104, 104, 104,
+ 104, 128, 127, 104, 104, 126, 126, 126, 126, 138,
+ 125, 138, 138, 138, 138, 138, 138, 145, 124, 145,
+ 145, 145, 145, 145, 145, 123, 122, 121, 120, 119,
+ 118, 117, 116, 115, 114, 113, 112, 111, 110, 109,
+ 108, 107, 103, 102, 101, 98, 97, 81, 72, 95,
+
+ 94, 93, 92, 91, 86, 149, 149, 85, 42, 41,
+ 81, 72, 60, 59, 55, 45, 44, 43, 42, 41,
+ 149, 16, 17, 17, 13, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149
} ;
-static yyconst flex_int16_t yy_chk[372] =
+static yyconst flex_int16_t yy_chk[365] =
{ 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, 149, 2, 27, 10, 10, 5, 6, 10,
- 20, 20, 21, 21, 45, 22, 22, 22, 23, 23,
- 21, 21, 29, 22, 25, 25, 29, 27, 36, 37,
- 146, 45, 36, 56, 33, 77, 21, 77, 21, 22,
- 30, 33, 33, 58, 30, 74, 75, 58, 62, 74,
- 62, 37, 70, 62, 37, 80, 72, 56, 62, 70,
-
- 70, 30, 30, 72, 72, 30, 30, 79, 75, 76,
- 30, 75, 82, 86, 30, 30, 47, 47, 47, 82,
- 86, 80, 47, 79, 92, 106, 47, 47, 47, 47,
- 119, 76, 126, 145, 76, 135, 135, 150, 150, 140,
- 140, 139, 126, 126, 126, 135, 135, 135, 106, 140,
- 140, 140, 119, 92, 142, 142, 138, 147, 147, 137,
- 152, 152, 133, 131, 142, 142, 142, 147, 147, 147,
- 152, 152, 152, 154, 154, 154, 154, 154, 154, 154,
- 154, 154, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 156, 156, 156, 156, 156, 156, 156, 156, 156,
-
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 158,
- 130, 129, 127, 125, 123, 158, 158, 158, 159, 120,
- 118, 117, 116, 115, 159, 159, 159, 160, 160, 160,
- 160, 160, 114, 160, 160, 160, 161, 161, 161, 161,
- 161, 161, 161, 161, 161, 162, 162, 113, 162, 162,
- 162, 162, 162, 162, 163, 163, 163, 163, 163, 163,
- 112, 111, 163, 164, 164, 110, 164, 164, 164, 164,
- 164, 164, 165, 165, 107, 165, 165, 165, 165, 165,
- 165, 166, 105, 104, 103, 102, 101, 166, 166, 167,
- 100, 167, 167, 167, 98, 97, 96, 95, 94, 93,
-
- 90, 89, 88, 87, 85, 84, 83, 81, 68, 67,
- 66, 65, 64, 63, 61, 60, 59, 55, 39, 31,
- 28, 26, 24, 19, 17, 16, 13, 11, 9, 8,
- 7, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153
+ 5, 6, 80, 2, 80, 10, 10, 5, 6, 10,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 22,
+ 22, 23, 23, 84, 24, 24, 24, 25, 25, 23,
+
+ 23, 31, 24, 27, 27, 31, 35, 38, 39, 84,
+ 148, 38, 61, 35, 35, 23, 61, 23, 24, 32,
+ 147, 78, 87, 32, 48, 48, 51, 51, 51, 87,
+ 39, 77, 48, 39, 51, 77, 146, 65, 144, 65,
+ 32, 32, 65, 78, 32, 32, 78, 65, 48, 32,
+ 51, 73, 79, 32, 32, 75, 143, 91, 73, 73,
+ 142, 139, 75, 75, 91, 137, 135, 133, 132, 131,
+ 129, 125, 124, 123, 79, 122, 121, 79, 150, 150,
+ 150, 150, 150, 150, 150, 150, 151, 151, 151, 151,
+ 151, 151, 151, 151, 152, 152, 152, 152, 152, 152,
+
+ 152, 152, 153, 153, 153, 153, 153, 153, 153, 153,
+ 154, 154, 154, 154, 155, 155, 155, 120, 155, 155,
+ 155, 155, 156, 156, 156, 156, 156, 156, 156, 156,
+ 157, 119, 157, 157, 157, 157, 158, 118, 158, 158,
+ 158, 158, 158, 158, 159, 117, 159, 160, 160, 160,
+ 160, 116, 115, 160, 160, 161, 161, 161, 161, 162,
+ 112, 162, 162, 162, 162, 162, 162, 163, 111, 163,
+ 163, 163, 163, 163, 163, 110, 109, 108, 107, 106,
+ 105, 103, 102, 101, 100, 99, 98, 97, 95, 94,
+ 93, 92, 90, 89, 88, 86, 85, 82, 71, 70,
+
+ 69, 68, 67, 66, 64, 63, 62, 59, 42, 41,
+ 40, 33, 30, 29, 26, 21, 19, 18, 15, 14,
+ 13, 9, 8, 7, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149
} ;
-#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; \
-}
-
+/* 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
@@ -630,12 +601,18 @@ 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_ACTION \
+ do { \
+ if (parser->has_new_line_number) \
+ yylineno = parser->new_line_number; \
+ if (parser->has_new_source_number) \
+ yylloc->source = parser->new_source_number; \
+ yylloc->first_column = yycolumn + 1; \
+ yylloc->first_line = yylineno; \
+ yycolumn += yyleng; \
+ parser->has_new_line_number = 0; \
+ parser->has_new_source_number = 0; \
+ } while(0);
#define YY_USER_INIT \
do { \
@@ -644,13 +621,28 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
yylloc->source = 0; \
} while(0)
-#line 648 "glcpp/glcpp-lex.c"
+/* The OTHER class is simply a catch-all for things that the CPP
+parser just doesn't care about. Since flex regular expressions that
+match longer strings take priority over those matching shorter
+strings, we have to be careful to avoid OTHER matching and hiding
+something that CPP does care about. So we simply exclude all
+characters that appear in any other expressions. */
+#line 631 "glcpp/glcpp-lex.c"
#define INITIAL 0
#define DONE 1
#define COMMENT 2
#define UNREACHABLE 3
#define SKIP 4
+#define DEFINE 5
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
#define YY_EXTRA_TYPE glcpp_parser_t *
@@ -667,8 +659,8 @@ struct yyguts_t
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;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -682,17 +674,6 @@ struct yyguts_t
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;
@@ -736,7 +717,7 @@ FILE *glcpp_get_out (yyscan_t yyscanner );
void glcpp_set_out (FILE * out_str ,yyscan_t yyscanner );
-int glcpp_get_leng (yyscan_t yyscanner );
+yy_size_t glcpp_get_leng (yyscan_t yyscanner );
char *glcpp_get_text (yyscan_t yyscanner );
@@ -744,6 +725,10 @@ int glcpp_get_lineno (yyscan_t yyscanner );
void glcpp_set_lineno (int line_number ,yyscan_t yyscanner );
+int glcpp_get_column (yyscan_t yyscanner );
+
+void glcpp_set_column (int column_no ,yyscan_t yyscanner );
+
YYSTYPE * glcpp_get_lval (yyscan_t yyscanner );
void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -800,7 +785,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#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,
@@ -811,7 +796,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -899,7 +884,7 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 80 "glcpp/glcpp-lex.l"
+#line 94 "glcpp/glcpp-lex.l"
/* Implicitly switch between SKIP and INITIAL (non-skipping);
* don't switch if some other state was explicitly set.
@@ -914,7 +899,7 @@ YY_DECL
}
/* Single-line comments */
-#line 918 "glcpp/glcpp-lex.c"
+#line 903 "glcpp/glcpp-lex.c"
yylval = yylval_param;
@@ -928,12 +913,6 @@ YY_DECL
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 */
@@ -966,64 +945,30 @@ YY_DECL
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)];
+ 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 >= 154 )
+ if ( yy_current_state >= 150 )
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 != 153 );
+ while ( yy_current_state != 149 );
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
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;
- }
- 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_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
@@ -1031,43 +976,50 @@ 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 94 "glcpp/glcpp-lex.l"
+#line 108 "glcpp/glcpp-lex.l"
{
}
YY_BREAK
/* Multi-line comments */
case 2:
YY_RULE_SETUP
-#line 98 "glcpp/glcpp-lex.l"
+#line 112 "glcpp/glcpp-lex.l"
{ yy_push_state(COMMENT, yyscanner); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 99 "glcpp/glcpp-lex.l"
+#line 113 "glcpp/glcpp-lex.l"
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 100 "glcpp/glcpp-lex.l"
+#line 114 "glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; return NEWLINE; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 101 "glcpp/glcpp-lex.l"
+#line 115 "glcpp/glcpp-lex.l"
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 102 "glcpp/glcpp-lex.l"
+#line 116 "glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; return NEWLINE; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 103 "glcpp/glcpp-lex.l"
+#line 117 "glcpp/glcpp-lex.l"
{
yy_pop_state(yyscanner);
if (yyextra->space_tokens)
@@ -1076,7 +1028,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 109 "glcpp/glcpp-lex.l"
+#line 123 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
yyextra->space_tokens = 0;
@@ -1087,7 +1039,7 @@ YY_RULE_SETUP
* Simply pass them through to the main compiler's lexer/parser. */
case 9:
YY_RULE_SETUP
-#line 117 "glcpp/glcpp-lex.l"
+#line 131 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
yylineno++;
@@ -1096,114 +1048,82 @@ YY_RULE_SETUP
}
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 124 "glcpp/glcpp-lex.l"
+#line 138 "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 140 "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;
+ return HASH_LINE;
}
YY_BREAK
-case 12:
+case 11:
YY_RULE_SETUP
-#line 156 "glcpp/glcpp-lex.l"
+#line 143 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IFDEF;
}
YY_BREAK
-case 13:
+case 12:
YY_RULE_SETUP
-#line 162 "glcpp/glcpp-lex.l"
+#line 149 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IFNDEF;
}
YY_BREAK
-case 14:
-/* rule 14 can match eol */
+case 13:
+/* rule 13 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 168 "glcpp/glcpp-lex.l"
+#line 155 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IF;
}
YY_BREAK
-case 15:
+case 14:
+/* rule 14 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 174 "glcpp/glcpp-lex.l"
+#line 161 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_ELIF;
}
YY_BREAK
-case 16:
+case 15:
YY_RULE_SETUP
-#line 180 "glcpp/glcpp-lex.l"
+#line 167 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_ELSE;
}
YY_BREAK
-case 17:
+case 16:
YY_RULE_SETUP
-#line 185 "glcpp/glcpp-lex.l"
+#line 172 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_ENDIF;
}
YY_BREAK
-case 18:
+case 17:
YY_RULE_SETUP
-#line 191 "glcpp/glcpp-lex.l"
+#line 178 "glcpp/glcpp-lex.l"
;
YY_BREAK
-case 19:
+case 18:
YY_RULE_SETUP
-#line 193 "glcpp/glcpp-lex.l"
+#line 180 "glcpp/glcpp-lex.l"
{
char *p;
for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */
@@ -1211,25 +1131,39 @@ YY_RULE_SETUP
glcpp_error(yylloc, yyextra, "#error%s", p);
}
YY_BREAK
-case 20:
+case 19:
YY_RULE_SETUP
-#line 200 "glcpp/glcpp-lex.l"
+#line 187 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
- return HASH_DEFINE_FUNC;
+ yy_push_state(DEFINE, yyscanner);
+ return HASH_DEFINE;
+}
+ YY_BREAK
+case 20:
+*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 193 "glcpp/glcpp-lex.l"
+{
+ yy_pop_state(yyscanner);
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return FUNC_IDENTIFIER;
}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 205 "glcpp/glcpp-lex.l"
+#line 199 "glcpp/glcpp-lex.l"
{
- yyextra->space_tokens = 0;
- return HASH_DEFINE_OBJ;
+ yy_pop_state(yyscanner);
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return OBJ_IDENTIFIER;
}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 210 "glcpp/glcpp-lex.l"
+#line 205 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_UNDEF;
@@ -1237,7 +1171,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 215 "glcpp/glcpp-lex.l"
+#line 210 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH;
@@ -1245,7 +1179,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 220 "glcpp/glcpp-lex.l"
+#line 215 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
@@ -1253,7 +1187,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 225 "glcpp/glcpp-lex.l"
+#line 220 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
@@ -1261,7 +1195,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 230 "glcpp/glcpp-lex.l"
+#line 225 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
@@ -1269,77 +1203,79 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 235 "glcpp/glcpp-lex.l"
+#line 230 "glcpp/glcpp-lex.l"
{
return LEFT_SHIFT;
}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 239 "glcpp/glcpp-lex.l"
+#line 234 "glcpp/glcpp-lex.l"
{
return RIGHT_SHIFT;
}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 243 "glcpp/glcpp-lex.l"
+#line 238 "glcpp/glcpp-lex.l"
{
return LESS_OR_EQUAL;
}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 247 "glcpp/glcpp-lex.l"
+#line 242 "glcpp/glcpp-lex.l"
{
return GREATER_OR_EQUAL;
}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 251 "glcpp/glcpp-lex.l"
+#line 246 "glcpp/glcpp-lex.l"
{
return EQUAL;
}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 255 "glcpp/glcpp-lex.l"
+#line 250 "glcpp/glcpp-lex.l"
{
return NOT_EQUAL;
}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 259 "glcpp/glcpp-lex.l"
+#line 254 "glcpp/glcpp-lex.l"
{
return AND;
}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 263 "glcpp/glcpp-lex.l"
+#line 258 "glcpp/glcpp-lex.l"
{
return OR;
}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 267 "glcpp/glcpp-lex.l"
+#line 262 "glcpp/glcpp-lex.l"
{
+ if (parser->is_gles)
+ glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES");
return PASTE;
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 271 "glcpp/glcpp-lex.l"
+#line 268 "glcpp/glcpp-lex.l"
{
return DEFINED;
}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 275 "glcpp/glcpp-lex.l"
+#line 272 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
return IDENTIFIER;
@@ -1347,14 +1283,14 @@ YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 280 "glcpp/glcpp-lex.l"
+#line 277 "glcpp/glcpp-lex.l"
{
return yytext[0];
}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 284 "glcpp/glcpp-lex.l"
+#line 281 "glcpp/glcpp-lex.l"
{
yylval->str = ralloc_strdup (yyextra, yytext);
return OTHER;
@@ -1362,7 +1298,7 @@ YY_RULE_SETUP
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 289 "glcpp/glcpp-lex.l"
+#line 286 "glcpp/glcpp-lex.l"
{
if (yyextra->space_tokens) {
return SPACE;
@@ -1372,7 +1308,7 @@ YY_RULE_SETUP
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
-#line 295 "glcpp/glcpp-lex.l"
+#line 292 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 0;
yylineno++;
@@ -1382,7 +1318,7 @@ YY_RULE_SETUP
YY_BREAK
/* Handle missing newline at EOF. */
case YY_STATE_EOF(INITIAL):
-#line 303 "glcpp/glcpp-lex.l"
+#line 300 "glcpp/glcpp-lex.l"
{
BEGIN DONE; /* Don't keep matching this rule forever. */
yyextra->lexing_if = 0;
@@ -1395,7 +1331,7 @@ case YY_STATE_EOF(INITIAL):
warnings. */
case 42:
YY_RULE_SETUP
-#line 313 "glcpp/glcpp-lex.l"
+#line 310 "glcpp/glcpp-lex.l"
{
unput('.');
yy_top_state(yyextra);
@@ -1403,15 +1339,16 @@ YY_RULE_SETUP
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 318 "glcpp/glcpp-lex.l"
+#line 315 "glcpp/glcpp-lex.l"
ECHO;
YY_BREAK
-#line 1410 "glcpp/glcpp-lex.c"
- case YY_STATE_EOF(DONE):
- case YY_STATE_EOF(COMMENT):
- case YY_STATE_EOF(UNREACHABLE):
- case YY_STATE_EOF(SKIP):
- yyterminate();
+#line 1346 "glcpp/glcpp-lex.c"
+case YY_STATE_EOF(DONE):
+case YY_STATE_EOF(COMMENT):
+case YY_STATE_EOF(UNREACHABLE):
+case YY_STATE_EOF(SKIP):
+case YY_STATE_EOF(DEFINE):
+ yyterminate();
case YY_END_OF_BUFFER:
{
@@ -1476,7 +1413,8 @@ ECHO;
else
{
- yy_cp = yyg->yy_c_buf_p;
+ yy_cp = yyg->yy_last_accepting_cpos;
+ yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action;
}
}
@@ -1596,14 +1534,43 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t 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" );
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ yy_size_t 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. */
+ glcpp_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;
}
@@ -1612,7 +1579,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* 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 );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1664,20 +1631,21 @@ static int yy_get_next_buffer (yyscan_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);
+ 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 >= 154 )
+ if ( yy_current_state >= 150 )
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;
@@ -1692,19 +1660,24 @@ static int yy_get_next_buffer (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 >= 154 )
+ if ( yy_current_state >= 150 )
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 == 153);
- if ( ! yy_is_jam )
- *yyg->yy_state_ptr++ = yy_current_state;
+ yy_is_jam = (yy_current_state == 149);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1721,7 +1694,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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 yy_size_t 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 =
@@ -1771,7 +1744,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2053,7 +2026,7 @@ void glcpp_pop_buffer_state (yyscan_t yyscanner)
*/
static void glcpp_ensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2146,12 +2119,12 @@ YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t 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 yybytes the byte buffer to scan
+ * @param _yybytes_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 glcpp__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
@@ -2306,7 +2279,7 @@ FILE *glcpp_get_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int glcpp_get_leng (yyscan_t yyscanner)
+yy_size_t glcpp_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -2342,7 +2315,7 @@ void glcpp_set_lineno (int line_number , yyscan_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);
+ YY_FATAL_ERROR( "glcpp_set_lineno called with no buffer" );
yylineno = line_number;
}
@@ -2357,7 +2330,7 @@ void glcpp_set_column (int column_no , yyscan_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);
+ YY_FATAL_ERROR( "glcpp_set_column called with no buffer" );
yycolumn = column_no;
}
@@ -2500,11 +2473,6 @@ static int yy_init_globals (yyscan_t yyscanner)
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;
@@ -2540,9 +2508,6 @@ int glcpp_lex_destroy (yyscan_t yyscanner)
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);
@@ -2601,7 +2566,7 @@ void glcpp_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 318 "glcpp/glcpp-lex.l"
+#line 315 "glcpp/glcpp-lex.l"
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp-lex.l b/dist/Mesa/src/glsl/glcpp/glcpp-lex.l
index 866188708..a029f6203 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp-lex.l
+++ b/dist/Mesa/src/glsl/glcpp/glcpp-lex.l
@@ -40,12 +40,18 @@ 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_ACTION \
+ do { \
+ if (parser->has_new_line_number) \
+ yylineno = parser->new_line_number; \
+ if (parser->has_new_source_number) \
+ yylloc->source = parser->new_source_number; \
+ yylloc->first_column = yycolumn + 1; \
+ yylloc->first_line = yylineno; \
+ yycolumn += yyleng; \
+ parser->has_new_line_number = 0; \
+ parser->has_new_source_number = 0; \
+ } while(0);
#define YY_USER_INIT \
do { \
@@ -61,7 +67,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
%option stack
%option never-interactive
-%x DONE COMMENT UNREACHABLE SKIP
+%x DONE COMMENT UNREACHABLE SKIP DEFINE
SPACE [[:space:]]
NONSPACE [^[:space:]]
@@ -70,7 +76,15 @@ HSPACE [ \t]
HASH ^{HSPACE}*#{HSPACE}*
IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
PUNCTUATION [][(){}.&*~!/%<>^|;,=+-]
-OTHER [^][(){}.&*~!/%<>^|;,=#[:space:]+-]+
+
+/* The OTHER class is simply a catch-all for things that the CPP
+parser just doesn't care about. Since flex regular expressions that
+match longer strings take priority over those matching shorter
+strings, we have to be careful to avoid OTHER matching and hiding
+something that CPP does care about. So we simply exclude all
+characters that appear in any other expressions. */
+
+OTHER [^][_#[:space:]#a-zA-Z0-9(){}.&*~!/%<>^|;,=+-]
DIGITS [0-9][0-9]*
DECIMAL_INTEGER [1-9][0-9]*[uU]?
@@ -106,7 +120,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return SPACE;
}
-{HASH}version {
+{HASH}version{HSPACE}+ {
yylval->str = ralloc_strdup (yyextra, yytext);
yyextra->space_tokens = 0;
return HASH_VERSION;
@@ -121,35 +135,8 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
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}line{HSPACE}+ {
+ return HASH_LINE;
}
<SKIP,INITIAL>{
@@ -171,7 +158,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return HASH_IF;
}
-{HASH}elif {
+{HASH}elif/[^_a-zA-Z0-9] {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_ELIF;
@@ -197,14 +184,22 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
glcpp_error(yylloc, yyextra, "#error%s", p);
}
-{HASH}define{HSPACE}+/{IDENTIFIER}"(" {
+{HASH}define{HSPACE}+ {
yyextra->space_tokens = 0;
- return HASH_DEFINE_FUNC;
+ yy_push_state(DEFINE, yyscanner);
+ return HASH_DEFINE;
}
-{HASH}define {
- yyextra->space_tokens = 0;
- return HASH_DEFINE_OBJ;
+<DEFINE>{IDENTIFIER}/"(" {
+ yy_pop_state(yyscanner);
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return FUNC_IDENTIFIER;
+}
+
+<DEFINE>{IDENTIFIER} {
+ yy_pop_state(yyscanner);
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return OBJ_IDENTIFIER;
}
{HASH}undef {
@@ -265,6 +260,8 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
"##" {
+ if (parser->is_gles)
+ glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES");
return PASTE;
}
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp-parse.c b/dist/Mesa/src/glsl/glcpp/glcpp-parse.c
index 15022cdec..3d8369621 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp-parse.c
+++ b/dist/Mesa/src/glsl/glcpp/glcpp-parse.c
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.6.1. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
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. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.6.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,89 +52,25 @@
/* Pure parsers. */
#define YYPURE 1
-/* Using locations. */
-#define YYLSP_NEEDED 1
-
-
-
-/* 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
-/* Tokens. */
-#define COMMA_FINAL 258
-#define DEFINED 259
-#define ELIF_EXPANDED 260
-#define HASH 261
-#define HASH_DEFINE_FUNC 262
-#define HASH_DEFINE_OBJ 263
-#define HASH_ELIF 264
-#define HASH_ELSE 265
-#define HASH_ENDIF 266
-#define HASH_IF 267
-#define HASH_IFDEF 268
-#define HASH_IFNDEF 269
-#define HASH_UNDEF 270
-#define HASH_VERSION 271
-#define IDENTIFIER 272
-#define IF_EXPANDED 273
-#define INTEGER 274
-#define INTEGER_STRING 275
-#define NEWLINE 276
-#define OTHER 277
-#define PLACEHOLDER 278
-#define SPACE 279
-#define PASTE 280
-#define OR 281
-#define AND 282
-#define NOT_EQUAL 283
-#define EQUAL 284
-#define GREATER_OR_EQUAL 285
-#define LESS_OR_EQUAL 286
-#define RIGHT_SHIFT 287
-#define LEFT_SHIFT 288
-#define UNARY 289
+/* Push parsers. */
+#define YYPUSH 0
+/* Pull parsers. */
+#define YYPULL 1
+/* Substitute the variable and function names. */
+#define yyparse glcpp_parser_parse
+#define yylex glcpp_parser_lex
+#define yyerror glcpp_parser_error
+#define yylval glcpp_parser_lval
+#define yychar glcpp_parser_char
+#define yydebug glcpp_parser_debug
+#define yynerrs glcpp_parser_nerrs
+#define yylloc glcpp_parser_lloc
/* Copy the first part of user declarations. */
+/* Line 336 of yacc.c */
#line 1 "glcpp/glcpp-parse.y"
/*
@@ -226,7 +159,6 @@ _token_create_ival (void *ctx, int type, int ival);
static token_list_t *
_token_list_create (void *ctx);
-/* Note: This function calls ralloc_steal on token. */
static void
_token_list_append (token_list_t *list, token_t *token);
@@ -247,9 +179,15 @@ _parser_active_list_pop (glcpp_parser_t *parser);
static int
_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier);
+/* Expand list, and begin lexing from the result (after first
+ * prefixing a token of type 'head_token_type').
+ */
static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
+_glcpp_parser_expand_and_lex_from (glcpp_parser_t *parser,
+ int head_token_type,
+ token_list_t *list);
+/* Perform macro expansion in-place on the given list. */
static void
_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
token_list_t *list);
@@ -269,7 +207,9 @@ _glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
static void
_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
-#define yylex glcpp_parser_lex
+static void
+_glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t version,
+ const char *ident);
static int
glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
@@ -281,11 +221,16 @@ static void
add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
+/* Line 336 of yacc.c */
+#line 226 "glcpp/glcpp-parse.c"
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULL nullptr
+# else
+# define YY_NULL 0
+# endif
+# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@@ -295,16 +240,67 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
# define YYERROR_VERBOSE 1
#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+ by #include "glcpp-parse.h". */
+#ifndef GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H
+# define GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int glcpp_parser_debug;
#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 = 262,
+ FUNC_IDENTIFIER = 263,
+ OBJ_IDENTIFIER = 264,
+ HASH_ELIF = 265,
+ HASH_ELSE = 266,
+ HASH_ENDIF = 267,
+ HASH_IF = 268,
+ HASH_IFDEF = 269,
+ HASH_IFNDEF = 270,
+ HASH_LINE = 271,
+ HASH_UNDEF = 272,
+ HASH_VERSION = 273,
+ IDENTIFIER = 274,
+ IF_EXPANDED = 275,
+ INTEGER = 276,
+ INTEGER_STRING = 277,
+ LINE_EXPANDED = 278,
+ NEWLINE = 279,
+ OTHER = 280,
+ PLACEHOLDER = 281,
+ SPACE = 282,
+ PASTE = 283,
+ OR = 284,
+ AND = 285,
+ NOT_EQUAL = 286,
+ EQUAL = 287,
+ GREATER_OR_EQUAL = 288,
+ LESS_OR_EQUAL = 289,
+ RIGHT_SHIFT = 290,
+ LEFT_SHIFT = 291,
+ UNARY = 292
+ };
+#endif
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
+
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -321,11 +317,26 @@ typedef struct YYLTYPE
#endif
-/* Copy the second part of user declarations. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int glcpp_parser_parse (void *YYPARSE_PARAM);
+#else
+int glcpp_parser_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int glcpp_parser_parse (glcpp_parser_t *parser);
+#else
+int glcpp_parser_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H */
+/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 329 "glcpp/glcpp-parse.c"
+/* Line 353 of yacc.c */
+#line 340 "glcpp/glcpp-parse.c"
#ifdef short
# undef short
@@ -375,7 +386,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -400,14 +411,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -428,11 +439,12 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (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
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -455,24 +467,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (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__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -489,9 +501,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -503,35 +515,19 @@ union yyalloc
((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
+# define YYCOPY_NEEDED 1
/* 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) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -539,23 +535,43 @@ union yyalloc
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 606
+#define YYLAST 670
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 57
+#define YYNTOKENS 60
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 17
+#define YYNNTS 19
/* YYNRULES -- Number of rules. */
-#define YYNRULES 101
+#define YYNRULES 108
/* YYNRULES -- Number of states. */
-#define YYNSTATES 162
+#define YYNSTATES 174
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 289
+#define YYMAXUTOK 292
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -566,16 +582,16 @@ 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, 50, 2, 2, 2, 46, 33, 2,
+ 48, 49, 44, 42, 52, 43, 57, 45, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 58,
+ 36, 59, 37, 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, 53, 2, 54, 32, 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, 55, 31, 56, 51, 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,
@@ -591,7 +607,8 @@ static const yytype_uint8 yytranslate[] =
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
+ 25, 26, 27, 28, 29, 30, 34, 35, 38, 39,
+ 40, 41, 47
};
#if YYDEBUG
@@ -599,89 +616,92 @@ static const yytype_uint8 yytranslate[] =
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
+ 0, 0, 3, 4, 7, 9, 13, 15, 17, 20,
+ 24, 28, 32, 37, 42, 49, 57, 61, 65, 68,
+ 73, 78, 82, 85, 86, 90, 91, 95, 99, 104,
+ 107, 109, 111, 113, 115, 119, 123, 127, 131, 135,
+ 139, 143, 147, 151, 155, 159, 163, 167, 171, 175,
+ 179, 183, 187, 190, 193, 196, 199, 203, 205, 209,
+ 211, 214, 217, 218, 220, 221, 223, 226, 231, 233,
+ 235, 238, 240, 243, 245, 247, 249, 251, 253, 255,
+ 257, 259, 261, 263, 265, 267, 269, 271, 273, 275,
+ 277, 279, 281, 283, 285, 287, 289, 291, 293, 295,
+ 297, 299, 301, 303, 305, 307, 309, 311, 313
};
/* 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
+ 61, 0, -1, -1, 61, 62, -1, 64, -1, 16,
+ 76, 24, -1, 70, -1, 63, -1, 6, 71, -1,
+ 20, 68, 24, -1, 5, 68, 24, -1, 23, 67,
+ 24, -1, 23, 67, 67, 24, -1, 7, 9, 72,
+ 24, -1, 7, 8, 48, 49, 72, 24, -1, 7,
+ 8, 48, 69, 49, 72, 24, -1, 17, 19, 24,
+ -1, 13, 75, 24, -1, 13, 24, -1, 14, 19,
+ 73, 24, -1, 15, 19, 73, 24, -1, 10, 75,
+ 24, -1, 10, 24, -1, -1, 11, 65, 24, -1,
+ -1, 12, 66, 24, -1, 18, 67, 24, -1, 18,
+ 67, 19, 24, -1, 6, 24, -1, 22, -1, 21,
+ -1, 67, -1, 19, -1, 68, 29, 68, -1, 68,
+ 30, 68, -1, 68, 31, 68, -1, 68, 32, 68,
+ -1, 68, 33, 68, -1, 68, 34, 68, -1, 68,
+ 35, 68, -1, 68, 38, 68, -1, 68, 39, 68,
+ -1, 68, 37, 68, -1, 68, 36, 68, -1, 68,
+ 40, 68, -1, 68, 41, 68, -1, 68, 43, 68,
+ -1, 68, 42, 68, -1, 68, 46, 68, -1, 68,
+ 45, 68, -1, 68, 44, 68, -1, 50, 68, -1,
+ 51, 68, -1, 43, 68, -1, 42, 68, -1, 48,
+ 68, 49, -1, 19, -1, 69, 52, 19, -1, 24,
+ -1, 76, 24, -1, 76, 24, -1, -1, 76, -1,
+ -1, 76, -1, 4, 19, -1, 4, 48, 19, 49,
+ -1, 77, -1, 74, -1, 75, 74, -1, 77, -1,
+ 76, 77, -1, 19, -1, 22, -1, 78, -1, 25,
+ -1, 27, -1, 53, -1, 54, -1, 48, -1, 49,
+ -1, 55, -1, 56, -1, 57, -1, 33, -1, 44,
+ -1, 42, -1, 43, -1, 51, -1, 50, -1, 45,
+ -1, 46, -1, 41, -1, 40, -1, 36, -1, 37,
+ -1, 39, -1, 38, -1, 35, -1, 34, -1, 32,
+ -1, 31, -1, 30, -1, 29, -1, 58, -1, 52,
+ -1, 59, -1, 28, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 181, 181, 183, 187, 190, 195, 196, 200, 203,
- 209, 212, 215, 218, 226, 245, 255, 260, 265, 284,
- 299, 302, 305, 326, 330, 339, 344, 345, 348, 351,
- 354, 357, 360, 363, 366, 369, 372, 375, 378, 381,
- 384, 387, 390, 398, 406, 409, 412, 415, 418, 421,
- 427, 432, 440, 441, 445, 451, 452, 455, 457, 464,
- 468, 472, 477, 481, 488, 493, 500, 504, 508, 512,
- 516, 523, 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
+ 0, 188, 188, 190, 194, 197, 205, 210, 211, 215,
+ 218, 221, 229, 242, 245, 248, 251, 259, 279, 289,
+ 294, 299, 319, 334, 334, 337, 337, 340, 343, 346,
+ 350, 359, 364, 365, 370, 373, 376, 379, 382, 385,
+ 388, 391, 394, 397, 400, 403, 406, 409, 412, 415,
+ 423, 431, 434, 437, 440, 443, 446, 452, 457, 465,
+ 466, 470, 476, 477, 480, 482, 489, 493, 497, 502,
+ 506, 513, 518, 525, 529, 533, 537, 541, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 1
/* 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
+ "ELIF_EXPANDED", "HASH", "HASH_DEFINE", "FUNC_IDENTIFIER",
+ "OBJ_IDENTIFIER", "HASH_ELIF", "HASH_ELSE", "HASH_ENDIF", "HASH_IF",
+ "HASH_IFDEF", "HASH_IFNDEF", "HASH_LINE", "HASH_UNDEF", "HASH_VERSION",
+ "IDENTIFIER", "IF_EXPANDED", "INTEGER", "INTEGER_STRING",
+ "LINE_EXPANDED", "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", "$@1", "$@2",
+ "integer_constant", "expression", "identifier_list", "text_line",
+ "non_directive", "replacement_list", "junk", "conditional_token",
+ "conditional_tokens", "pp_tokens", "preprocessing_token", "operator", YY_NULL
};
#endif
@@ -692,263 +712,285 @@ 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
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 124, 94, 38, 286, 287, 60, 62, 288, 289,
+ 290, 291, 43, 45, 42, 47, 37, 292, 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
+ 0, 60, 61, 61, 62, 62, 62, 62, 62, 63,
+ 63, 63, 63, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 65, 64, 66, 64, 64, 64, 64,
+ 67, 67, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 69, 69, 70,
+ 70, 71, 72, 72, 73, 73, 74, 74, 74, 75,
+ 75, 76, 76, 77, 77, 77, 77, 77, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78
};
/* 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,
+ 0, 2, 0, 2, 1, 3, 1, 1, 2, 3,
+ 3, 3, 4, 4, 6, 7, 3, 3, 2, 4,
+ 4, 3, 2, 0, 3, 0, 3, 3, 4, 2,
+ 1, 1, 1, 1, 3, 3, 3, 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,
+ 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, 1, 1
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed 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,
+ 2, 0, 1, 0, 0, 0, 0, 23, 25, 0,
+ 0, 0, 0, 0, 0, 73, 0, 74, 0, 59,
+ 76, 77, 108, 104, 103, 102, 101, 85, 100, 99,
+ 95, 96, 98, 97, 94, 93, 87, 88, 86, 91,
+ 92, 80, 81, 90, 89, 106, 78, 79, 82, 83,
+ 84, 105, 107, 3, 7, 4, 6, 0, 71, 75,
+ 33, 31, 30, 0, 0, 0, 0, 0, 32, 0,
+ 29, 8, 0, 0, 62, 0, 22, 69, 0, 68,
+ 0, 0, 18, 0, 64, 64, 0, 0, 0, 0,
+ 0, 60, 72, 55, 54, 0, 52, 53, 10, 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
+ 0, 0, 0, 0, 0, 0, 0, 61, 0, 0,
+ 63, 66, 0, 21, 70, 24, 26, 17, 0, 65,
+ 0, 5, 16, 0, 27, 9, 11, 0, 56, 34,
+ 35, 36, 37, 38, 39, 40, 44, 43, 41, 42,
+ 45, 46, 48, 47, 51, 50, 49, 57, 62, 0,
+ 13, 0, 19, 20, 28, 12, 0, 62, 0, 67,
+ 14, 0, 58, 15
};
/* 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
+ -1, 1, 53, 54, 55, 80, 81, 68, 69, 159,
+ 56, 71, 119, 128, 77, 78, 120, 58, 59
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -147
+#define YYPACT_NINF -151
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
+ -151, 115, -151, 492, -9, 108, 158, -151, -151, 201,
+ -8, 48, 451, 50, 97, -151, 492, -151, 97, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, 328, -151, -151,
+ -151, -151, -151, 492, 492, 492, 492, 492, -151, 515,
+ -151, -151, 369, -41, 451, 38, -151, -151, 244, -151,
+ 47, 51, -151, 287, 451, 451, 410, 57, -10, 538,
+ 52, -151, -151, -151, -151, 487, -151, -151, -151, 492,
+ 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
+ 492, 492, 492, 492, 492, 492, 492, -151, 19, 59,
+ 451, -151, 68, -151, -151, -151, -151, -151, 100, 451,
+ 112, -151, -151, 117, -151, -151, -151, 151, -151, 555,
+ 571, 586, 600, 613, 624, 624, 18, 18, 18, 18,
+ 64, 64, 67, 67, -151, -151, -151, -151, 451, 30,
+ -151, 127, -151, -151, -151, -151, 154, 451, 160, -151,
+ -151, 157, -151, -151
};
/* 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
+ -151, -151, -151, -151, -151, -151, -151, -12, -11, -151,
+ -151, -151, -150, 99, -13, 209, 0, -6, -151
};
/* 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. */
+ number is the opposite. 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,
+ 79, 57, 88, 79, 72, 89, 90, 118, 166, 133,
+ 15, 84, 86, 17, 134, 70, 20, 171, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 157, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 92, 93, 94, 95, 96, 97, 121, 110, 111,
+ 112, 113, 114, 115, 116, 124, 92, 85, 158, 87,
+ 124, 125, 79, 61, 62, 126, 136, 79, 137, 167,
+ 92, 132, 168, 160, 129, 129, 122, 161, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 112, 113, 114, 115,
+ 116, 114, 115, 116, 92, 2, 73, 74, 61, 62,
+ 3, 4, 5, 92, 162, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 163, 17, 18, 19,
+ 20, 164, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 75, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 165, 169, 15, 170, 172,
+ 17, 173, 76, 20, 130, 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,
+ 36, 37, 38, 39, 40, 75, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 83, 0,
+ 15, 0, 0, 17, 0, 82, 20, 0, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 75, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 0, 15, 0, 0, 17, 0, 123, 20,
+ 0, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 75, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 0, 15, 0, 0, 17,
+ 0, 127, 20, 0, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 15, 0, 0,
+ 17, 0, 91, 20, 0, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 15, 0,
+ 0, 17, 0, 117, 20, 0, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 15,
+ 0, 0, 17, 0, 131, 20, 0, 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,
+ 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 15, 0, 0, 17, 0, 0, 20, 0, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 60, 0, 61, 62, 0, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 63, 64, 138, 0, 0, 98,
+ 65, 0, 66, 67, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 135, 0, 0, 0, 0, 99, 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
+ 112, 113, 114, 115, 116, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-151))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
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,
+ 6, 1, 14, 9, 4, 16, 18, 48, 158, 19,
+ 19, 19, 12, 22, 24, 24, 25, 167, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 19, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 57, 63, 64, 65, 66, 67, 19, 40, 41,
+ 42, 43, 44, 45, 46, 78, 72, 19, 49, 19,
+ 83, 24, 78, 21, 22, 24, 24, 83, 90, 49,
+ 86, 24, 52, 24, 84, 85, 48, 19, 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,
+ 111, 112, 113, 114, 115, 116, 42, 43, 44, 45,
+ 46, 44, 45, 46, 120, 0, 8, 9, 21, 22,
+ 5, 6, 7, 129, 24, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 24, 22, 23, 24,
+ 25, 24, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 4, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 24, 49, 19, 24, 19,
+ 22, 24, 24, 25, 85, 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,
+ 42, 43, 44, 45, 46, 4, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 9, -1,
+ 19, -1, -1, 22, -1, 24, 25, -1, 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,
+ 39, 40, 41, 42, 43, 44, 45, 46, 4, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, -1, -1, 19, -1, -1, 22, -1, 24, 25,
+ -1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 4, 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, -1, -1, 19, -1, -1, 22,
+ -1, 24, 25, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, -1, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 19, -1, -1,
+ 22, -1, 24, 25, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, -1, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 19, -1,
+ -1, 22, -1, 24, 25, -1, 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,
+ 41, 42, 43, 44, 45, 46, -1, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 19,
+ -1, -1, 22, -1, 24, 25, -1, 27, 28, 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,
+ 40, 41, 42, 43, 44, 45, 46, -1, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 19, -1, -1, 22, -1, -1, 25, -1, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, -1, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 19, -1, 21, 22, -1, 29, 30, 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
+ 43, 44, 45, 46, 42, 43, 49, -1, -1, 24,
+ 48, -1, 50, 51, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 24, -1, -1, -1, -1, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46
};
/* 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
+ 0, 61, 0, 5, 6, 7, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 22, 23, 24,
+ 25, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 62, 63, 64, 70, 76, 77, 78,
+ 19, 21, 22, 42, 43, 48, 50, 51, 67, 68,
+ 24, 71, 76, 8, 9, 4, 24, 74, 75, 77,
+ 65, 66, 24, 75, 19, 19, 76, 19, 67, 68,
+ 67, 24, 77, 68, 68, 68, 68, 68, 24, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 24, 48, 72,
+ 76, 19, 48, 24, 74, 24, 24, 24, 73, 76,
+ 73, 24, 24, 19, 24, 24, 24, 67, 49, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 19, 49, 69,
+ 24, 19, 24, 24, 24, 24, 72, 49, 52, 49,
+ 24, 72, 19, 24
};
#define yyerrok (yyerrstatus = 0)
@@ -963,24 +1005,33 @@ static const yytype_uint8 yystos[] =
/* 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. */
+ 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 \
- { \
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
@@ -990,39 +1041,40 @@ 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; \
- } \
+# 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
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
/* 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 YYLTYPE_IS_TRIVIAL
+# 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, \
@@ -1086,6 +1138,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
glcpp_parser_t *parser;
#endif
{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
if (!yyvaluep)
return;
YYUSE (yylocationp);
@@ -1141,17 +1195,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -1187,11 +1244,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, parser)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , parser);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1228,7 +1285,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -1331,115 +1387,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# 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];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULL;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- 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;
- }
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ 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 yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- 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;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* 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 = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1475,25 +1558,6 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser)
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 */
-
-
@@ -1524,93 +1588,102 @@ yyparse (parser)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ /* 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. */
+ 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 YYLTYPE_IS_TRIVIAL
+
+#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 = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
-
- /* User initialization code. */
-#line 148 "glcpp/glcpp-parse.y"
+/* User initialization code. */
+/* Line 1572 of yacc.c */
+#line 155 "glcpp/glcpp-parse.y"
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -1618,8 +1691,8 @@ YYLTYPE yylloc;
yylloc.last_column = 1;
yylloc.source = 0;
}
-/* Line 1078 of yacc.c. */
-#line 1623 "glcpp/glcpp-parse.c"
+/* Line 1572 of yacc.c */
+#line 1696 "glcpp/glcpp-parse.c"
yylsp[0] = yylloc;
goto yysetstate;
@@ -1657,6 +1730,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -1678,9 +1752,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1701,6 +1775,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1709,16 +1786,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1744,26 +1821,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1804,58 +1877,107 @@ yyreduce:
switch (yyn)
{
case 4:
-#line 187 "glcpp/glcpp-parse.y"
+/* Line 1787 of yacc.c */
+#line 194 "glcpp/glcpp-parse.y"
{
- ralloc_strcat (&parser->output, "\n");
- ;}
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
+ }
break;
case 5:
-#line 190 "glcpp/glcpp-parse.y"
+/* Line 1787 of yacc.c */
+#line 197 "glcpp/glcpp-parse.y"
+ {
+ if (parser->skip_stack == NULL ||
+ parser->skip_stack->type == SKIP_NO_SKIP)
+ {
+ _glcpp_parser_expand_and_lex_from (parser,
+ LINE_EXPANDED, (yyvsp[(2) - (3)].token_list));
+ }
+ }
+ break;
+
+ case 6:
+/* Line 1787 of yacc.c */
+#line 205 "glcpp/glcpp-parse.y"
{
_glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list));
- ralloc_strcat (&parser->output, "\n");
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
ralloc_free ((yyvsp[(1) - (1)].token_list));
- ;}
+ }
break;
- case 8:
-#line 200 "glcpp/glcpp-parse.y"
+ case 9:
+/* Line 1787 of yacc.c */
+#line 215 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
- case 9:
-#line 203 "glcpp/glcpp-parse.y"
+ case 10:
+/* Line 1787 of yacc.c */
+#line 218 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
- case 10:
-#line 209 "glcpp/glcpp-parse.y"
+ case 11:
+/* Line 1787 of yacc.c */
+#line 221 "glcpp/glcpp-parse.y"
+ {
+ parser->has_new_line_number = 1;
+ parser->new_line_number = (yyvsp[(2) - (3)].ival);
+ ralloc_asprintf_rewrite_tail (&parser->output,
+ &parser->output_length,
+ "#line %" PRIiMAX "\n",
+ (yyvsp[(2) - (3)].ival));
+ }
+ break;
+
+ case 12:
+/* Line 1787 of yacc.c */
+#line 229 "glcpp/glcpp-parse.y"
+ {
+ parser->has_new_line_number = 1;
+ parser->new_line_number = (yyvsp[(2) - (4)].ival);
+ parser->has_new_source_number = 1;
+ parser->new_source_number = (yyvsp[(3) - (4)].ival);
+ ralloc_asprintf_rewrite_tail (&parser->output,
+ &parser->output_length,
+ "#line %" PRIiMAX " %" PRIiMAX "\n",
+ (yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].ival));
+ }
+ break;
+
+ case 13:
+/* Line 1787 of yacc.c */
+#line 242 "glcpp/glcpp-parse.y"
{
_define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list));
- ;}
+ }
break;
- case 11:
-#line 212 "glcpp/glcpp-parse.y"
+ case 14:
+/* Line 1787 of yacc.c */
+#line 245 "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 215 "glcpp/glcpp-parse.y"
+ case 15:
+/* Line 1787 of yacc.c */
+#line 248 "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 218 "glcpp/glcpp-parse.y"
+ case 16:
+/* Line 1787 of yacc.c */
+#line 251 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str));
if (macro) {
@@ -1863,11 +1985,12 @@ yyreduce:
ralloc_free (macro);
}
ralloc_free ((yyvsp[(2) - (3)].str));
- ;}
+ }
break;
- case 14:
-#line 226 "glcpp/glcpp-parse.y"
+ case 17:
+/* Line 1787 of yacc.c */
+#line 259 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'if' expression if
* we are not skipping. When we are skipping, we
@@ -1879,18 +2002,20 @@ yyreduce:
if (parser->skip_stack == NULL ||
parser->skip_stack->type == SKIP_NO_SKIP)
{
- _glcpp_parser_expand_if (parser, IF_EXPANDED, (yyvsp[(2) - (3)].token_list));
+ _glcpp_parser_expand_and_lex_from (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 245 "glcpp/glcpp-parse.y"
+ case 18:
+/* Line 1787 of yacc.c */
+#line 279 "glcpp/glcpp-parse.y"
{
/* #if without an expression is only an error if we
* are not skipping */
@@ -1900,29 +2025,32 @@ yyreduce:
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 255 "glcpp/glcpp-parse.y"
+ case 19:
+/* Line 1787 of yacc.c */
+#line 289 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL);
- ;}
+ }
break;
- case 17:
-#line 260 "glcpp/glcpp-parse.y"
+ case 20:
+/* Line 1787 of yacc.c */
+#line 294 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL);
- ;}
+ }
break;
- case 18:
-#line 265 "glcpp/glcpp-parse.y"
+ case 21:
+/* Line 1787 of yacc.c */
+#line 299 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'elif' expression
* if we are not skipping. When we are skipping, we
@@ -1934,18 +2062,20 @@ yyreduce:
if (parser->skip_stack &&
parser->skip_stack->type == SKIP_TO_ELSE)
{
- _glcpp_parser_expand_if (parser, ELIF_EXPANDED, (yyvsp[(2) - (3)].token_list));
+ _glcpp_parser_expand_and_lex_from (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 284 "glcpp/glcpp-parse.y"
+ case 22:
+/* Line 1787 of yacc.c */
+#line 319 "glcpp/glcpp-parse.y"
{
/* #elif without an expression is an error unless we
* are skipping. */
@@ -1960,50 +2090,44 @@ yyreduce:
"elif", 0);
glcpp_warning(& (yylsp[(1) - (2)]), parser, "ignoring illegal #elif without expression");
}
- ;}
+ }
break;
- case 20:
-#line 299 "glcpp/glcpp-parse.y"
+ case 23:
+/* Line 1787 of yacc.c */
+#line 334 "glcpp/glcpp-parse.y"
{
- _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1);
- ;}
+ _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (1)]), "else", 1);
+ }
break;
- case 21:
-#line 302 "glcpp/glcpp-parse.y"
+ case 25:
+/* Line 1787 of yacc.c */
+#line 337 "glcpp/glcpp-parse.y"
{
- _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)]));
- ;}
+ _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (1)]));
+ }
break;
- case 22:
-#line 305 "glcpp/glcpp-parse.y"
+ case 27:
+/* Line 1787 of yacc.c */
+#line 340 "glcpp/glcpp-parse.y"
{
- macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
- if (macro) {
- hash_table_remove (parser->defines, "__VERSION__");
- ralloc_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_parser_handle_version_declaration(parser, (yyvsp[(2) - (3)].ival), NULL);
+ }
+ break;
- ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival));
- ;}
+ case 28:
+/* Line 1787 of yacc.c */
+#line 343 "glcpp/glcpp-parse.y"
+ {
+ _glcpp_parser_handle_version_declaration(parser, (yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].str));
+ }
break;
- case 24:
-#line 330 "glcpp/glcpp-parse.y"
+ case 30:
+/* Line 1787 of yacc.c */
+#line 350 "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);
@@ -2012,123 +2136,150 @@ yyreduce:
} else {
(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 10);
}
- ;}
+ }
break;
- case 25:
-#line 339 "glcpp/glcpp-parse.y"
+ case 31:
+/* Line 1787 of yacc.c */
+#line 359 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (1)].ival);
- ;}
+ }
break;
- case 27:
-#line 345 "glcpp/glcpp-parse.y"
+ case 33:
+/* Line 1787 of yacc.c */
+#line 365 "glcpp/glcpp-parse.y"
+ {
+ if (parser->is_gles)
+ glcpp_error(& (yylsp[(1) - (1)]), parser, "undefined macro %s in expression (illegal in GLES)", (yyvsp[(1) - (1)].str));
+ (yyval.ival) = 0;
+ }
+ break;
+
+ case 34:
+/* Line 1787 of yacc.c */
+#line 370 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 28:
-#line 348 "glcpp/glcpp-parse.y"
+ case 35:
+/* Line 1787 of yacc.c */
+#line 373 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 29:
-#line 351 "glcpp/glcpp-parse.y"
+ case 36:
+/* Line 1787 of yacc.c */
+#line 376 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 30:
-#line 354 "glcpp/glcpp-parse.y"
+ case 37:
+/* Line 1787 of yacc.c */
+#line 379 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 31:
-#line 357 "glcpp/glcpp-parse.y"
+ case 38:
+/* Line 1787 of yacc.c */
+#line 382 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 32:
-#line 360 "glcpp/glcpp-parse.y"
+ case 39:
+/* Line 1787 of yacc.c */
+#line 385 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 33:
-#line 363 "glcpp/glcpp-parse.y"
+ case 40:
+/* Line 1787 of yacc.c */
+#line 388 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 34:
-#line 366 "glcpp/glcpp-parse.y"
+ case 41:
+/* Line 1787 of yacc.c */
+#line 391 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 35:
-#line 369 "glcpp/glcpp-parse.y"
+ case 42:
+/* Line 1787 of yacc.c */
+#line 394 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 36:
-#line 372 "glcpp/glcpp-parse.y"
+ case 43:
+/* Line 1787 of yacc.c */
+#line 397 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 37:
-#line 375 "glcpp/glcpp-parse.y"
+ case 44:
+/* Line 1787 of yacc.c */
+#line 400 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 38:
-#line 378 "glcpp/glcpp-parse.y"
+ case 45:
+/* Line 1787 of yacc.c */
+#line 403 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 39:
-#line 381 "glcpp/glcpp-parse.y"
+ case 46:
+/* Line 1787 of yacc.c */
+#line 406 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 40:
-#line 384 "glcpp/glcpp-parse.y"
+ case 47:
+/* Line 1787 of yacc.c */
+#line 409 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 41:
-#line 387 "glcpp/glcpp-parse.y"
+ case 48:
+/* Line 1787 of yacc.c */
+#line 412 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 42:
-#line 390 "glcpp/glcpp-parse.y"
+ case 49:
+/* Line 1787 of yacc.c */
+#line 415 "glcpp/glcpp-parse.y"
{
if ((yyvsp[(3) - (3)].ival) == 0) {
yyerror (& (yylsp[(1) - (3)]), parser,
@@ -2136,11 +2287,12 @@ yyreduce:
} else {
(yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
}
- ;}
+ }
break;
- case 43:
-#line 398 "glcpp/glcpp-parse.y"
+ case 50:
+/* Line 1787 of yacc.c */
+#line 423 "glcpp/glcpp-parse.y"
{
if ((yyvsp[(3) - (3)].ival) == 0) {
yyerror (& (yylsp[(1) - (3)]), parser,
@@ -2148,342 +2300,407 @@ yyreduce:
} else {
(yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
}
- ;}
+ }
break;
- case 44:
-#line 406 "glcpp/glcpp-parse.y"
+ case 51:
+/* Line 1787 of yacc.c */
+#line 431 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
- case 45:
-#line 409 "glcpp/glcpp-parse.y"
+ case 52:
+/* Line 1787 of yacc.c */
+#line 434 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ! (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
- case 46:
-#line 412 "glcpp/glcpp-parse.y"
+ case 53:
+/* Line 1787 of yacc.c */
+#line 437 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ~ (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
- case 47:
-#line 415 "glcpp/glcpp-parse.y"
+ case 54:
+/* Line 1787 of yacc.c */
+#line 440 "glcpp/glcpp-parse.y"
{
(yyval.ival) = - (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
- case 48:
-#line 418 "glcpp/glcpp-parse.y"
+ case 55:
+/* Line 1787 of yacc.c */
+#line 443 "glcpp/glcpp-parse.y"
{
(yyval.ival) = + (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
- case 49:
-#line 421 "glcpp/glcpp-parse.y"
+ case 56:
+/* Line 1787 of yacc.c */
+#line 446 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(2) - (3)].ival);
- ;}
+ }
break;
- case 50:
-#line 427 "glcpp/glcpp-parse.y"
+ case 57:
+/* Line 1787 of yacc.c */
+#line 452 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = _string_list_create (parser);
_string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str));
ralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str));
- ;}
+ }
break;
- case 51:
-#line 432 "glcpp/glcpp-parse.y"
+ case 58:
+/* Line 1787 of yacc.c */
+#line 457 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = (yyvsp[(1) - (3)].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
- ;}
+ }
break;
- case 52:
-#line 440 "glcpp/glcpp-parse.y"
- { (yyval.token_list) = NULL; ;}
+ case 59:
+/* Line 1787 of yacc.c */
+#line 465 "glcpp/glcpp-parse.y"
+ { (yyval.token_list) = NULL; }
break;
- case 54:
-#line 445 "glcpp/glcpp-parse.y"
+ case 61:
+/* Line 1787 of yacc.c */
+#line 470 "glcpp/glcpp-parse.y"
{
yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #");
- ;}
+ }
break;
- case 55:
-#line 451 "glcpp/glcpp-parse.y"
- { (yyval.token_list) = NULL; ;}
+ case 62:
+/* Line 1787 of yacc.c */
+#line 476 "glcpp/glcpp-parse.y"
+ { (yyval.token_list) = NULL; }
break;
- case 58:
-#line 457 "glcpp/glcpp-parse.y"
+ case 65:
+/* Line 1787 of yacc.c */
+#line 482 "glcpp/glcpp-parse.y"
{
glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive");
- ;}
+ }
break;
- case 59:
-#line 464 "glcpp/glcpp-parse.y"
+ case 66:
+/* Line 1787 of yacc.c */
+#line 489 "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 468 "glcpp/glcpp-parse.y"
+ case 67:
+/* Line 1787 of yacc.c */
+#line 493 "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 477 "glcpp/glcpp-parse.y"
+ case 69:
+/* Line 1787 of yacc.c */
+#line 502 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = _token_list_create (parser);
_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
- ;}
+ }
break;
- case 63:
-#line 481 "glcpp/glcpp-parse.y"
+ case 70:
+/* Line 1787 of yacc.c */
+#line 506 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- ;}
+ }
break;
- case 64:
-#line 488 "glcpp/glcpp-parse.y"
+ case 71:
+/* Line 1787 of yacc.c */
+#line 513 "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));
- ;}
+ }
break;
- case 65:
-#line 493 "glcpp/glcpp-parse.y"
+ case 72:
+/* Line 1787 of yacc.c */
+#line 518 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- ;}
+ }
break;
- case 66:
-#line 500 "glcpp/glcpp-parse.y"
+ case 73:
+/* Line 1787 of yacc.c */
+#line 525 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
- case 67:
-#line 504 "glcpp/glcpp-parse.y"
+ case 74:
+/* Line 1787 of yacc.c */
+#line 529 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
- case 68:
-#line 508 "glcpp/glcpp-parse.y"
+ case 75:
+/* Line 1787 of yacc.c */
+#line 533 "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 512 "glcpp/glcpp-parse.y"
+ case 76:
+/* Line 1787 of yacc.c */
+#line 537 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
- case 70:
-#line 516 "glcpp/glcpp-parse.y"
+ case 77:
+/* Line 1787 of yacc.c */
+#line 541 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
(yyval.token)->location = yylloc;
- ;}
- break;
-
- case 71:
-#line 523 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '['; ;}
- break;
-
- case 72:
-#line 524 "glcpp/glcpp-parse.y"
- { (yyval.ival) = ']'; ;}
- break;
-
- case 73:
-#line 525 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '('; ;}
- break;
-
- case 74:
-#line 526 "glcpp/glcpp-parse.y"
- { (yyval.ival) = ')'; ;}
- break;
-
- case 75:
-#line 527 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '{'; ;}
- break;
-
- case 76:
-#line 528 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '}'; ;}
- break;
-
- case 77:
-#line 529 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '.'; ;}
+ }
break;
case 78:
-#line 530 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '&'; ;}
+/* Line 1787 of yacc.c */
+#line 548 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '['; }
break;
case 79:
-#line 531 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '*'; ;}
+/* Line 1787 of yacc.c */
+#line 549 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = ']'; }
break;
case 80:
-#line 532 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '+'; ;}
+/* Line 1787 of yacc.c */
+#line 550 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '('; }
break;
case 81:
-#line 533 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '-'; ;}
+/* Line 1787 of yacc.c */
+#line 551 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = ')'; }
break;
case 82:
-#line 534 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '~'; ;}
+/* Line 1787 of yacc.c */
+#line 552 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '{'; }
break;
case 83:
-#line 535 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '!'; ;}
+/* Line 1787 of yacc.c */
+#line 553 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '}'; }
break;
case 84:
-#line 536 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '/'; ;}
+/* Line 1787 of yacc.c */
+#line 554 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '.'; }
break;
case 85:
-#line 537 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '%'; ;}
+/* Line 1787 of yacc.c */
+#line 555 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '&'; }
break;
case 86:
-#line 538 "glcpp/glcpp-parse.y"
- { (yyval.ival) = LEFT_SHIFT; ;}
+/* Line 1787 of yacc.c */
+#line 556 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '*'; }
break;
case 87:
-#line 539 "glcpp/glcpp-parse.y"
- { (yyval.ival) = RIGHT_SHIFT; ;}
+/* Line 1787 of yacc.c */
+#line 557 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '+'; }
break;
case 88:
-#line 540 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '<'; ;}
+/* Line 1787 of yacc.c */
+#line 558 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '-'; }
break;
case 89:
-#line 541 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '>'; ;}
+/* Line 1787 of yacc.c */
+#line 559 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '~'; }
break;
case 90:
-#line 542 "glcpp/glcpp-parse.y"
- { (yyval.ival) = LESS_OR_EQUAL; ;}
+/* Line 1787 of yacc.c */
+#line 560 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '!'; }
break;
case 91:
-#line 543 "glcpp/glcpp-parse.y"
- { (yyval.ival) = GREATER_OR_EQUAL; ;}
+/* Line 1787 of yacc.c */
+#line 561 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '/'; }
break;
case 92:
-#line 544 "glcpp/glcpp-parse.y"
- { (yyval.ival) = EQUAL; ;}
+/* Line 1787 of yacc.c */
+#line 562 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '%'; }
break;
case 93:
-#line 545 "glcpp/glcpp-parse.y"
- { (yyval.ival) = NOT_EQUAL; ;}
+/* Line 1787 of yacc.c */
+#line 563 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = LEFT_SHIFT; }
break;
case 94:
-#line 546 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '^'; ;}
+/* Line 1787 of yacc.c */
+#line 564 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = RIGHT_SHIFT; }
break;
case 95:
-#line 547 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '|'; ;}
+/* Line 1787 of yacc.c */
+#line 565 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '<'; }
break;
case 96:
-#line 548 "glcpp/glcpp-parse.y"
- { (yyval.ival) = AND; ;}
+/* Line 1787 of yacc.c */
+#line 566 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '>'; }
break;
case 97:
-#line 549 "glcpp/glcpp-parse.y"
- { (yyval.ival) = OR; ;}
+/* Line 1787 of yacc.c */
+#line 567 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = LESS_OR_EQUAL; }
break;
case 98:
-#line 550 "glcpp/glcpp-parse.y"
- { (yyval.ival) = ';'; ;}
+/* Line 1787 of yacc.c */
+#line 568 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = GREATER_OR_EQUAL; }
break;
case 99:
-#line 551 "glcpp/glcpp-parse.y"
- { (yyval.ival) = ','; ;}
+/* Line 1787 of yacc.c */
+#line 569 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = EQUAL; }
break;
case 100:
-#line 552 "glcpp/glcpp-parse.y"
- { (yyval.ival) = '='; ;}
+/* Line 1787 of yacc.c */
+#line 570 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = NOT_EQUAL; }
break;
case 101:
-#line 553 "glcpp/glcpp-parse.y"
- { (yyval.ival) = PASTE; ;}
+/* Line 1787 of yacc.c */
+#line 571 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '^'; }
+ break;
+
+ case 102:
+/* Line 1787 of yacc.c */
+#line 572 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '|'; }
break;
+ case 103:
+/* Line 1787 of yacc.c */
+#line 573 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = AND; }
+ break;
+
+ case 104:
+/* Line 1787 of yacc.c */
+#line 574 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = OR; }
+ break;
+
+ case 105:
+/* Line 1787 of yacc.c */
+#line 575 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = ';'; }
+ break;
+
+ case 106:
+/* Line 1787 of yacc.c */
+#line 576 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = ','; }
+ break;
+
+ case 107:
+/* Line 1787 of yacc.c */
+#line 577 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = '='; }
+ break;
-/* Line 1267 of yacc.c. */
-#line 2485 "glcpp/glcpp-parse.c"
+ case 108:
+/* Line 1787 of yacc.c */
+#line 578 "glcpp/glcpp-parse.y"
+ { (yyval.ival) = PASTE; }
+ break;
+
+
+/* Line 1787 of yacc.c */
+#line 2691 "glcpp/glcpp-parse.c"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -2512,6 +2729,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -2519,45 +2740,44 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (&yylloc, parser, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- 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;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (&yylloc, parser, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
- yyerror_range[0] = yylloc;
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -2574,7 +2794,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2590,7 +2810,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[0] = yylsp[1-yylen];
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2609,7 +2829,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2624,7 +2844,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[0] = *yylsp;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parser);
YYPOPSTACK (1);
@@ -2632,15 +2852,12 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
- yyerror_range[1] = yylloc;
+ yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
@@ -2664,7 +2881,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2675,9 +2892,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc, parser);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ 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);
@@ -2701,7 +2923,8 @@ yyreturn:
}
-#line 556 "glcpp/glcpp-parse.y"
+/* Line 2048 of yacc.c */
+#line 581 "glcpp/glcpp-parse.y"
string_list_t *
@@ -2912,8 +3135,6 @@ _token_list_append (token_list_t *list, token_t *token)
node->token = token;
node->next = NULL;
- ralloc_steal (list, token);
-
if (list->head == NULL) {
list->head = node;
} else {
@@ -3055,54 +3276,54 @@ _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
}
static void
-_token_print (char **out, token_t *token)
+_token_print (char **out, size_t *len, token_t *token)
{
if (token->type < 256) {
- ralloc_asprintf_append (out, "%c", token->type);
+ ralloc_asprintf_rewrite_tail (out, len, "%c", token->type);
return;
}
switch (token->type) {
case INTEGER:
- ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival);
+ ralloc_asprintf_rewrite_tail (out, len, "%" PRIiMAX, token->value.ival);
break;
case IDENTIFIER:
case INTEGER_STRING:
case OTHER:
- ralloc_strcat (out, token->value.str);
+ ralloc_asprintf_rewrite_tail (out, len, "%s", token->value.str);
break;
case SPACE:
- ralloc_strcat (out, " ");
+ ralloc_asprintf_rewrite_tail (out, len, " ");
break;
case LEFT_SHIFT:
- ralloc_strcat (out, "<<");
+ ralloc_asprintf_rewrite_tail (out, len, "<<");
break;
case RIGHT_SHIFT:
- ralloc_strcat (out, ">>");
+ ralloc_asprintf_rewrite_tail (out, len, ">>");
break;
case LESS_OR_EQUAL:
- ralloc_strcat (out, "<=");
+ ralloc_asprintf_rewrite_tail (out, len, "<=");
break;
case GREATER_OR_EQUAL:
- ralloc_strcat (out, ">=");
+ ralloc_asprintf_rewrite_tail (out, len, ">=");
break;
case EQUAL:
- ralloc_strcat (out, "==");
+ ralloc_asprintf_rewrite_tail (out, len, "==");
break;
case NOT_EQUAL:
- ralloc_strcat (out, "!=");
+ ralloc_asprintf_rewrite_tail (out, len, "!=");
break;
case AND:
- ralloc_strcat (out, "&&");
+ ralloc_asprintf_rewrite_tail (out, len, "&&");
break;
case OR:
- ralloc_strcat (out, "||");
+ ralloc_asprintf_rewrite_tail (out, len, "||");
break;
case PASTE:
- ralloc_strcat (out, "##");
+ ralloc_asprintf_rewrite_tail (out, len, "##");
break;
case COMMA_FINAL:
- ralloc_strcat (out, ",");
+ ralloc_asprintf_rewrite_tail (out, len, ",");
break;
case PLACEHOLDER:
/* Nothing to print. */
@@ -3171,32 +3392,73 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
return combined;
}
- /* Two string-valued tokens can usually just be mashed
- * together.
+ /* Two string-valued (or integer) tokens can usually just be
+ * mashed together. (We also handle a string followed by an
+ * integer here as well.)
*
- * 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))
+ * There are some exceptions here. Notably, if the first token
+ * is an integer (or a string representing an integer), then
+ * the second token must also be an integer or must be a
+ * string representing an integer that begins with a digit.
+ */
+ if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING || token->type == INTEGER) &&
+ (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING || other->type == INTEGER))
{
char *str;
+ int combined_type;
+
+ /* Check that pasting onto an integer doesn't create a
+ * non-integer, (that is, only digits can be
+ * pasted. */
+ if (token->type == INTEGER_STRING || token->type == INTEGER)
+ {
+ switch (other->type) {
+ case INTEGER_STRING:
+ if (other->value.str[0] < '0' ||
+ other->value.str[0] > '9')
+ goto FAIL;
+ break;
+ case INTEGER:
+ if (other->value.ival < 0)
+ goto FAIL;
+ break;
+ default:
+ goto FAIL;
+ }
+ }
+
+ if (token->type == INTEGER)
+ str = ralloc_asprintf (token, "%" PRIiMAX,
+ token->value.ival);
+ else
+ str = ralloc_strdup (token, token->value.str);
+
+
+ if (other->type == INTEGER)
+ ralloc_asprintf_append (&str, "%" PRIiMAX,
+ other->value.ival);
+ else
+ ralloc_strcat (&str, other->value.str);
- str = ralloc_asprintf (token, "%s%s", token->value.str,
- other->value.str);
- combined = _token_create_str (token, token->type, str);
+ /* New token is same type as original token, unless we
+ * started with an integer, in which case we will be
+ * creating an integer-string. */
+ combined_type = token->type;
+ if (combined_type == INTEGER)
+ combined_type = INTEGER_STRING;
+
+ combined = _token_create_str (token, combined_type, str);
combined->location = token->location;
return combined;
}
+ FAIL:
glcpp_error (&token->location, parser, "");
- ralloc_strcat (&parser->info_log, "Pasting \"");
- _token_print (&parser->info_log, token);
- ralloc_strcat (&parser->info_log, "\" and \"");
- _token_print (&parser->info_log, other);
- ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n");
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "Pasting \"");
+ _token_print (&parser->info_log, &parser->info_log_length, token);
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "\" and \"");
+ _token_print (&parser->info_log, &parser->info_log_length, other);
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "\" does not give a valid preprocessing token.\n");
return token;
}
@@ -3210,7 +3472,7 @@ _token_list_print (glcpp_parser_t *parser, token_list_t *list)
return;
for (node = list->head; node; node = node->next)
- _token_print (&parser->output, node->token);
+ _token_print (&parser->output, &parser->output_length, node->token);
}
void
@@ -3256,33 +3518,81 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
parser->lex_from_node = NULL;
parser->output = ralloc_strdup(parser, "");
+ parser->output_length = 0;
parser->info_log = ralloc_strdup(parser, "");
+ parser->info_log_length = 0;
parser->error = 0;
+ parser->has_new_line_number = 0;
+ parser->new_line_number = 1;
+ parser->has_new_source_number = 0;
+ parser->new_source_number = 0;
+
+ parser->is_gles = false;
+
/* 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) {
+ parser->is_gles = true;
+ add_builtin_define(parser, "GL_ES", 1);
+
+ if (extensions != NULL) {
+ if (extensions->OES_EGL_image_external)
+ add_builtin_define(parser, "GL_OES_EGL_image_external", 1);
+ }
+ } else {
+ 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 != 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);
+
+ if (extensions->ARB_shader_texture_lod)
+ add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
+
+ if (extensions->ARB_draw_instanced)
+ add_builtin_define(parser, "GL_ARB_draw_instanced", 1);
+
+ if (extensions->ARB_conservative_depth) {
+ add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
+ add_builtin_define(parser, "GL_ARB_conservative_depth", 1);
+ }
+
+ if (extensions->ARB_shader_bit_encoding)
+ add_builtin_define(parser, "GL_ARB_shader_bit_encoding", 1);
+
+ if (extensions->ARB_uniform_buffer_object)
+ add_builtin_define(parser, "GL_ARB_uniform_buffer_object", 1);
+
+ if (extensions->ARB_texture_cube_map_array)
+ add_builtin_define(parser, "GL_ARB_texture_cube_map_array", 1);
+
+ if (extensions->ARB_shading_language_packing)
+ add_builtin_define(parser, "GL_ARB_shading_language_packing", 1);
+
+ if (extensions->ARB_texture_multisample)
+ add_builtin_define(parser, "GL_ARB_texture_multisample", 1);
- if (extensions->ARB_fragment_coord_conventions)
- add_builtin_define(parser, "GL_ARB_fragment_coord_conventions",
- 1);
+ if (extensions->ARB_texture_query_lod)
+ add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
- if (extensions->ARB_explicit_attrib_location)
- add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
+ if (extensions->ARB_gpu_shader5)
+ add_builtin_define(parser, "GL_ARB_gpu_shader5", 1);
- if (extensions->ARB_shader_texture_lod)
- add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
+ if (extensions->AMD_vertex_shader_layer)
+ add_builtin_define(parser, "GL_AMD_vertex_shader_layer", 1);
- if (extensions->AMD_conservative_depth)
- add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
+ if (extensions->ARB_shading_language_420pack)
+ add_builtin_define(parser, "GL_ARB_shading_language_420pack", 1);
+ }
}
language_version = 110;
@@ -3291,12 +3601,6 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
return parser;
}
-int
-glcpp_parser_parse (glcpp_parser_t *parser)
-{
- return yyparse (parser);
-}
-
void
glcpp_parser_destroy (glcpp_parser_t *parser)
{
@@ -3396,26 +3700,45 @@ _arguments_parse (argument_list_t *arguments,
}
static token_list_t *
-_token_list_create_with_one_space (void *ctx)
+_token_list_create_with_one_ival (void *ctx, int type, int ival)
{
token_list_t *list;
- token_t *space;
+ token_t *node;
list = _token_list_create (ctx);
- space = _token_create_ival (list, SPACE, SPACE);
- _token_list_append (list, space);
+ node = _token_create_ival (list, type, ival);
+ _token_list_append (list, node);
return list;
}
+static token_list_t *
+_token_list_create_with_one_space (void *ctx)
+{
+ return _token_list_create_with_one_ival (ctx, SPACE, SPACE);
+}
+
+static token_list_t *
+_token_list_create_with_one_integer (void *ctx, int ival)
+{
+ return _token_list_create_with_one_ival (ctx, INTEGER, ival);
+}
+
+/* Perform macro expansion on 'list', placing the resulting tokens
+ * into a new list which is initialized with a first token of type
+ * 'head_token_type'. Then begin lexing from the resulting list,
+ * (return to the current lexing source when this list is exhausted).
+ */
static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list)
+_glcpp_parser_expand_and_lex_from (glcpp_parser_t *parser,
+ int head_token_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 = _token_create_ival (parser, head_token_type, head_token_type);
_token_list_append (expanded, token);
_glcpp_parser_expand_token_list (parser, list);
_token_list_append_list (expanded, list);
@@ -3617,8 +3940,18 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
return NULL;
}
- /* Look up this identifier in the hash table. */
+ *last = node;
identifier = token->value.str;
+
+ /* Special handling for __LINE__ and __FILE__, (not through
+ * the hash table). */
+ if (strcmp(identifier, "__LINE__") == 0)
+ return _token_list_create_with_one_integer (parser, node->token->location.first_line);
+
+ if (strcmp(identifier, "__FILE__") == 0)
+ return _token_list_create_with_one_integer (parser, node->token->location.source);
+
+ /* Look up this identifier in the hash table. */
macro = hash_table_find (parser->defines, identifier);
/* Not a macro, so no expansion needed. */
@@ -3639,14 +3972,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
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)
{
token_list_t *replacement;
- *last = node;
/* Replace a macro defined as empty with a SPACE token. */
if (macro->replacements == NULL)
@@ -3938,7 +4269,7 @@ glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
if (ret == NEWLINE)
parser->in_control_line = 0;
}
- else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC ||
+ else if (ret == HASH_DEFINE ||
ret == HASH_UNDEF || ret == HASH_IF ||
ret == HASH_IFDEF || ret == HASH_IFNDEF ||
ret == HASH_ELIF || ret == HASH_ELSE ||
@@ -4061,3 +4392,42 @@ _glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
ralloc_free (node);
}
+static void
+_glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t version,
+ const char *es_identifier)
+{
+ macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
+ if (macro) {
+ hash_table_remove (parser->defines, "__VERSION__");
+ ralloc_free (macro);
+ }
+ add_builtin_define (parser, "__VERSION__", version);
+
+ /* If we didn't have a GLES context to begin with, (indicated
+ * by parser->api), then the version declaration here might
+ * indicate GLES. */
+ if (! parser->is_gles &&
+ (version == 100 ||
+ (es_identifier && (strcmp(es_identifier, "es") == 0))))
+ {
+ parser->is_gles = true;
+ add_builtin_define (parser, "GL_ES", 1);
+ }
+
+ if (version >= 150)
+ add_builtin_define(parser, "GL_core_profile", 1);
+
+ /* Currently, all ES2/ES3 implementations support highp in the
+ * fragment shader, so we always define this macro in ES2/ES3.
+ * 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 (version >= 130 || parser->is_gles)
+ add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
+
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length,
+ "#version %" PRIiMAX "%s%s", version,
+ es_identifier ? " " : "",
+ es_identifier ? es_identifier : "");
+}
+
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp-parse.h b/dist/Mesa/src/glsl/glcpp/glcpp-parse.h
index 05f8a7bff..d64459c13 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp-parse.h
+++ b/dist/Mesa/src/glsl/glcpp/glcpp-parse.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.6.1. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,20 @@
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. */
+#ifndef GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H
+# define GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int glcpp_parser_debug;
+#endif
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -43,82 +50,47 @@
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
+ HASH_DEFINE = 262,
+ FUNC_IDENTIFIER = 263,
+ OBJ_IDENTIFIER = 264,
+ HASH_ELIF = 265,
+ HASH_ELSE = 266,
+ HASH_ENDIF = 267,
+ HASH_IF = 268,
+ HASH_IFDEF = 269,
+ HASH_IFNDEF = 270,
+ HASH_LINE = 271,
+ HASH_UNDEF = 272,
+ HASH_VERSION = 273,
+ IDENTIFIER = 274,
+ IF_EXPANDED = 275,
+ INTEGER = 276,
+ INTEGER_STRING = 277,
+ LINE_EXPANDED = 278,
+ NEWLINE = 279,
+ OTHER = 280,
+ PLACEHOLDER = 281,
+ SPACE = 282,
+ PASTE = 283,
+ OR = 284,
+ AND = 285,
+ NOT_EQUAL = 286,
+ EQUAL = 287,
+ GREATER_OR_EQUAL = 288,
+ LESS_OR_EQUAL = 289,
+ RIGHT_SHIFT = 290,
+ LEFT_SHIFT = 291,
+ UNARY = 292
};
#endif
-/* Tokens. */
-#define COMMA_FINAL 258
-#define DEFINED 259
-#define ELIF_EXPANDED 260
-#define HASH 261
-#define HASH_DEFINE_FUNC 262
-#define HASH_DEFINE_OBJ 263
-#define HASH_ELIF 264
-#define HASH_ELSE 265
-#define HASH_ENDIF 266
-#define HASH_IF 267
-#define HASH_IFDEF 268
-#define HASH_IFNDEF 269
-#define HASH_UNDEF 270
-#define HASH_VERSION 271
-#define IDENTIFIER 272
-#define IF_EXPANDED 273
-#define INTEGER 274
-#define INTEGER_STRING 275
-#define NEWLINE 276
-#define OTHER 277
-#define PLACEHOLDER 278
-#define SPACE 279
-#define PASTE 280
-#define OR 281
-#define AND 282
-#define NOT_EQUAL 283
-#define EQUAL 284
-#define GREATER_OR_EQUAL 285
-#define LESS_OR_EQUAL 286
-#define RIGHT_SHIFT 287
-#define LEFT_SHIFT 288
-#define UNARY 289
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
+
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
-
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
@@ -133,3 +105,18 @@ typedef struct YYLTYPE
#endif
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int glcpp_parser_parse (void *YYPARSE_PARAM);
+#else
+int glcpp_parser_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int glcpp_parser_parse (glcpp_parser_t *parser);
+#else
+int glcpp_parser_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !GLCPP_PARSER_SRC_GLSL_GLCPP_GLCPP_PARSE_H */
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp-parse.y b/dist/Mesa/src/glsl/glcpp/glcpp-parse.y
index 2a0a15676..ff5bdfe5d 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp-parse.y
+++ b/dist/Mesa/src/glsl/glcpp/glcpp-parse.y
@@ -85,7 +85,6 @@ _token_create_ival (void *ctx, int type, int ival);
static token_list_t *
_token_list_create (void *ctx);
-/* Note: This function calls ralloc_steal on token. */
static void
_token_list_append (token_list_t *list, token_t *token);
@@ -106,9 +105,15 @@ _parser_active_list_pop (glcpp_parser_t *parser);
static int
_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier);
+/* Expand list, and begin lexing from the result (after first
+ * prefixing a token of type 'head_token_type').
+ */
static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list);
+_glcpp_parser_expand_and_lex_from (glcpp_parser_t *parser,
+ int head_token_type,
+ token_list_t *list);
+/* Perform macro expansion in-place on the given list. */
static void
_glcpp_parser_expand_token_list (glcpp_parser_t *parser,
token_list_t *list);
@@ -128,7 +133,9 @@ _glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
static void
_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
-#define yylex glcpp_parser_lex
+static void
+_glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t version,
+ const char *ident);
static int
glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
@@ -157,10 +164,10 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
%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 COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE FUNC_IDENTIFIER OBJ_IDENTIFIER HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_LINE HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE
%token PASTE
%type <ival> expression INTEGER operator SPACE integer_constant
-%type <str> IDENTIFIER INTEGER_STRING OTHER
+%type <str> IDENTIFIER FUNC_IDENTIFIER OBJ_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
@@ -185,11 +192,19 @@ input:
line:
control_line {
- ralloc_strcat (&parser->output, "\n");
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
+ }
+| HASH_LINE pp_tokens NEWLINE {
+ if (parser->skip_stack == NULL ||
+ parser->skip_stack->type == SKIP_NO_SKIP)
+ {
+ _glcpp_parser_expand_and_lex_from (parser,
+ LINE_EXPANDED, $2);
+ }
}
| text_line {
_glcpp_parser_print_expanded_token_list (parser, $1);
- ralloc_strcat (&parser->output, "\n");
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
ralloc_free ($1);
}
| expanded_line
@@ -203,16 +218,34 @@ expanded_line:
| ELIF_EXPANDED expression NEWLINE {
_glcpp_parser_skip_stack_change_if (parser, & @1, "elif", $2);
}
+| LINE_EXPANDED integer_constant NEWLINE {
+ parser->has_new_line_number = 1;
+ parser->new_line_number = $2;
+ ralloc_asprintf_rewrite_tail (&parser->output,
+ &parser->output_length,
+ "#line %" PRIiMAX "\n",
+ $2);
+ }
+| LINE_EXPANDED integer_constant integer_constant NEWLINE {
+ parser->has_new_line_number = 1;
+ parser->new_line_number = $2;
+ parser->has_new_source_number = 1;
+ parser->new_source_number = $3;
+ ralloc_asprintf_rewrite_tail (&parser->output,
+ &parser->output_length,
+ "#line %" PRIiMAX " %" PRIiMAX "\n",
+ $2, $3);
+ }
;
control_line:
- HASH_DEFINE_OBJ IDENTIFIER replacement_list NEWLINE {
+ HASH_DEFINE OBJ_IDENTIFIER replacement_list NEWLINE {
_define_object_macro (parser, & @2, $2, $3);
}
-| HASH_DEFINE_FUNC IDENTIFIER '(' ')' replacement_list NEWLINE {
+| HASH_DEFINE FUNC_IDENTIFIER '(' ')' replacement_list NEWLINE {
_define_function_macro (parser, & @2, $2, NULL, $5);
}
-| HASH_DEFINE_FUNC IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE {
+| HASH_DEFINE FUNC_IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE {
_define_function_macro (parser, & @2, $2, $4, $6);
}
| HASH_UNDEF IDENTIFIER NEWLINE {
@@ -234,7 +267,8 @@ control_line:
if (parser->skip_stack == NULL ||
parser->skip_stack->type == SKIP_NO_SKIP)
{
- _glcpp_parser_expand_if (parser, IF_EXPANDED, $2);
+ _glcpp_parser_expand_and_lex_from (parser,
+ IF_EXPANDED, $2);
}
else
{
@@ -273,7 +307,8 @@ control_line:
if (parser->skip_stack &&
parser->skip_stack->type == SKIP_TO_ELSE)
{
- _glcpp_parser_expand_if (parser, ELIF_EXPANDED, $2);
+ _glcpp_parser_expand_and_lex_from (parser,
+ ELIF_EXPANDED, $2);
}
else
{
@@ -296,32 +331,17 @@ control_line:
glcpp_warning(& @1, parser, "ignoring illegal #elif without expression");
}
}
-| HASH_ELSE NEWLINE {
+| HASH_ELSE {
_glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1);
- }
-| HASH_ENDIF NEWLINE {
+ } NEWLINE
+| HASH_ENDIF {
_glcpp_parser_skip_stack_pop (parser, & @1);
- }
+ } NEWLINE
| HASH_VERSION integer_constant NEWLINE {
- macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
- if (macro) {
- hash_table_remove (parser->defines, "__VERSION__");
- ralloc_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);
-
- ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, $2);
+ _glcpp_parser_handle_version_declaration(parser, $2, NULL);
+ }
+| HASH_VERSION integer_constant IDENTIFIER NEWLINE {
+ _glcpp_parser_handle_version_declaration(parser, $2, $3);
}
| HASH NEWLINE
;
@@ -342,6 +362,11 @@ integer_constant:
expression:
integer_constant
+| IDENTIFIER {
+ if (parser->is_gles)
+ glcpp_error(& @1, parser, "undefined macro %s in expression (illegal in GLES)", $1);
+ $$ = 0;
+ }
| expression OR expression {
$$ = $1 || $3;
}
@@ -763,8 +788,6 @@ _token_list_append (token_list_t *list, token_t *token)
node->token = token;
node->next = NULL;
- ralloc_steal (list, token);
-
if (list->head == NULL) {
list->head = node;
} else {
@@ -906,54 +929,54 @@ _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
}
static void
-_token_print (char **out, token_t *token)
+_token_print (char **out, size_t *len, token_t *token)
{
if (token->type < 256) {
- ralloc_asprintf_append (out, "%c", token->type);
+ ralloc_asprintf_rewrite_tail (out, len, "%c", token->type);
return;
}
switch (token->type) {
case INTEGER:
- ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival);
+ ralloc_asprintf_rewrite_tail (out, len, "%" PRIiMAX, token->value.ival);
break;
case IDENTIFIER:
case INTEGER_STRING:
case OTHER:
- ralloc_strcat (out, token->value.str);
+ ralloc_asprintf_rewrite_tail (out, len, "%s", token->value.str);
break;
case SPACE:
- ralloc_strcat (out, " ");
+ ralloc_asprintf_rewrite_tail (out, len, " ");
break;
case LEFT_SHIFT:
- ralloc_strcat (out, "<<");
+ ralloc_asprintf_rewrite_tail (out, len, "<<");
break;
case RIGHT_SHIFT:
- ralloc_strcat (out, ">>");
+ ralloc_asprintf_rewrite_tail (out, len, ">>");
break;
case LESS_OR_EQUAL:
- ralloc_strcat (out, "<=");
+ ralloc_asprintf_rewrite_tail (out, len, "<=");
break;
case GREATER_OR_EQUAL:
- ralloc_strcat (out, ">=");
+ ralloc_asprintf_rewrite_tail (out, len, ">=");
break;
case EQUAL:
- ralloc_strcat (out, "==");
+ ralloc_asprintf_rewrite_tail (out, len, "==");
break;
case NOT_EQUAL:
- ralloc_strcat (out, "!=");
+ ralloc_asprintf_rewrite_tail (out, len, "!=");
break;
case AND:
- ralloc_strcat (out, "&&");
+ ralloc_asprintf_rewrite_tail (out, len, "&&");
break;
case OR:
- ralloc_strcat (out, "||");
+ ralloc_asprintf_rewrite_tail (out, len, "||");
break;
case PASTE:
- ralloc_strcat (out, "##");
+ ralloc_asprintf_rewrite_tail (out, len, "##");
break;
case COMMA_FINAL:
- ralloc_strcat (out, ",");
+ ralloc_asprintf_rewrite_tail (out, len, ",");
break;
case PLACEHOLDER:
/* Nothing to print. */
@@ -1022,32 +1045,73 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
return combined;
}
- /* Two string-valued tokens can usually just be mashed
- * together.
+ /* Two string-valued (or integer) tokens can usually just be
+ * mashed together. (We also handle a string followed by an
+ * integer here as well.)
*
- * 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))
+ * There are some exceptions here. Notably, if the first token
+ * is an integer (or a string representing an integer), then
+ * the second token must also be an integer or must be a
+ * string representing an integer that begins with a digit.
+ */
+ if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING || token->type == INTEGER) &&
+ (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING || other->type == INTEGER))
{
char *str;
+ int combined_type;
+
+ /* Check that pasting onto an integer doesn't create a
+ * non-integer, (that is, only digits can be
+ * pasted. */
+ if (token->type == INTEGER_STRING || token->type == INTEGER)
+ {
+ switch (other->type) {
+ case INTEGER_STRING:
+ if (other->value.str[0] < '0' ||
+ other->value.str[0] > '9')
+ goto FAIL;
+ break;
+ case INTEGER:
+ if (other->value.ival < 0)
+ goto FAIL;
+ break;
+ default:
+ goto FAIL;
+ }
+ }
- str = ralloc_asprintf (token, "%s%s", token->value.str,
- other->value.str);
- combined = _token_create_str (token, token->type, str);
+ if (token->type == INTEGER)
+ str = ralloc_asprintf (token, "%" PRIiMAX,
+ token->value.ival);
+ else
+ str = ralloc_strdup (token, token->value.str);
+
+
+ if (other->type == INTEGER)
+ ralloc_asprintf_append (&str, "%" PRIiMAX,
+ other->value.ival);
+ else
+ ralloc_strcat (&str, other->value.str);
+
+ /* New token is same type as original token, unless we
+ * started with an integer, in which case we will be
+ * creating an integer-string. */
+ combined_type = token->type;
+ if (combined_type == INTEGER)
+ combined_type = INTEGER_STRING;
+
+ combined = _token_create_str (token, combined_type, str);
combined->location = token->location;
return combined;
}
+ FAIL:
glcpp_error (&token->location, parser, "");
- ralloc_strcat (&parser->info_log, "Pasting \"");
- _token_print (&parser->info_log, token);
- ralloc_strcat (&parser->info_log, "\" and \"");
- _token_print (&parser->info_log, other);
- ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n");
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "Pasting \"");
+ _token_print (&parser->info_log, &parser->info_log_length, token);
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "\" and \"");
+ _token_print (&parser->info_log, &parser->info_log_length, other);
+ ralloc_asprintf_rewrite_tail (&parser->info_log, &parser->info_log_length, "\" does not give a valid preprocessing token.\n");
return token;
}
@@ -1061,7 +1125,7 @@ _token_list_print (glcpp_parser_t *parser, token_list_t *list)
return;
for (node = list->head; node; node = node->next)
- _token_print (&parser->output, node->token);
+ _token_print (&parser->output, &parser->output_length, node->token);
}
void
@@ -1107,33 +1171,81 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
parser->lex_from_node = NULL;
parser->output = ralloc_strdup(parser, "");
+ parser->output_length = 0;
parser->info_log = ralloc_strdup(parser, "");
+ parser->info_log_length = 0;
parser->error = 0;
+ parser->has_new_line_number = 0;
+ parser->new_line_number = 1;
+ parser->has_new_source_number = 0;
+ parser->new_source_number = 0;
+
+ parser->is_gles = false;
+
/* 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) {
+ parser->is_gles = true;
+ add_builtin_define(parser, "GL_ES", 1);
+
+ if (extensions != NULL) {
+ if (extensions->OES_EGL_image_external)
+ add_builtin_define(parser, "GL_OES_EGL_image_external", 1);
+ }
+ } else {
+ 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 != 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);
+
+ if (extensions->ARB_shader_texture_lod)
+ add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
+
+ if (extensions->ARB_draw_instanced)
+ add_builtin_define(parser, "GL_ARB_draw_instanced", 1);
- if (extensions->ARB_fragment_coord_conventions)
- add_builtin_define(parser, "GL_ARB_fragment_coord_conventions",
- 1);
+ if (extensions->ARB_conservative_depth) {
+ add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
+ add_builtin_define(parser, "GL_ARB_conservative_depth", 1);
+ }
- if (extensions->ARB_explicit_attrib_location)
- add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
+ if (extensions->ARB_shader_bit_encoding)
+ add_builtin_define(parser, "GL_ARB_shader_bit_encoding", 1);
- if (extensions->ARB_shader_texture_lod)
- add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
+ if (extensions->ARB_uniform_buffer_object)
+ add_builtin_define(parser, "GL_ARB_uniform_buffer_object", 1);
- if (extensions->AMD_conservative_depth)
- add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
+ if (extensions->ARB_texture_cube_map_array)
+ add_builtin_define(parser, "GL_ARB_texture_cube_map_array", 1);
+
+ if (extensions->ARB_shading_language_packing)
+ add_builtin_define(parser, "GL_ARB_shading_language_packing", 1);
+
+ if (extensions->ARB_texture_multisample)
+ add_builtin_define(parser, "GL_ARB_texture_multisample", 1);
+
+ if (extensions->ARB_texture_query_lod)
+ add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
+
+ if (extensions->ARB_gpu_shader5)
+ add_builtin_define(parser, "GL_ARB_gpu_shader5", 1);
+
+ if (extensions->AMD_vertex_shader_layer)
+ add_builtin_define(parser, "GL_AMD_vertex_shader_layer", 1);
+
+ if (extensions->ARB_shading_language_420pack)
+ add_builtin_define(parser, "GL_ARB_shading_language_420pack", 1);
+ }
}
language_version = 110;
@@ -1142,12 +1254,6 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
return parser;
}
-int
-glcpp_parser_parse (glcpp_parser_t *parser)
-{
- return yyparse (parser);
-}
-
void
glcpp_parser_destroy (glcpp_parser_t *parser)
{
@@ -1247,26 +1353,45 @@ _arguments_parse (argument_list_t *arguments,
}
static token_list_t *
-_token_list_create_with_one_space (void *ctx)
+_token_list_create_with_one_ival (void *ctx, int type, int ival)
{
token_list_t *list;
- token_t *space;
+ token_t *node;
list = _token_list_create (ctx);
- space = _token_create_ival (list, SPACE, SPACE);
- _token_list_append (list, space);
+ node = _token_create_ival (list, type, ival);
+ _token_list_append (list, node);
return list;
}
+static token_list_t *
+_token_list_create_with_one_space (void *ctx)
+{
+ return _token_list_create_with_one_ival (ctx, SPACE, SPACE);
+}
+
+static token_list_t *
+_token_list_create_with_one_integer (void *ctx, int ival)
+{
+ return _token_list_create_with_one_ival (ctx, INTEGER, ival);
+}
+
+/* Perform macro expansion on 'list', placing the resulting tokens
+ * into a new list which is initialized with a first token of type
+ * 'head_token_type'. Then begin lexing from the resulting list,
+ * (return to the current lexing source when this list is exhausted).
+ */
static void
-_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list)
+_glcpp_parser_expand_and_lex_from (glcpp_parser_t *parser,
+ int head_token_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 = _token_create_ival (parser, head_token_type, head_token_type);
_token_list_append (expanded, token);
_glcpp_parser_expand_token_list (parser, list);
_token_list_append_list (expanded, list);
@@ -1468,8 +1593,18 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
return NULL;
}
- /* Look up this identifier in the hash table. */
+ *last = node;
identifier = token->value.str;
+
+ /* Special handling for __LINE__ and __FILE__, (not through
+ * the hash table). */
+ if (strcmp(identifier, "__LINE__") == 0)
+ return _token_list_create_with_one_integer (parser, node->token->location.first_line);
+
+ if (strcmp(identifier, "__FILE__") == 0)
+ return _token_list_create_with_one_integer (parser, node->token->location.source);
+
+ /* Look up this identifier in the hash table. */
macro = hash_table_find (parser->defines, identifier);
/* Not a macro, so no expansion needed. */
@@ -1490,14 +1625,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
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)
{
token_list_t *replacement;
- *last = node;
/* Replace a macro defined as empty with a SPACE token. */
if (macro->replacements == NULL)
@@ -1789,7 +1922,7 @@ glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
if (ret == NEWLINE)
parser->in_control_line = 0;
}
- else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC ||
+ else if (ret == HASH_DEFINE ||
ret == HASH_UNDEF || ret == HASH_IF ||
ret == HASH_IFDEF || ret == HASH_IFNDEF ||
ret == HASH_ELIF || ret == HASH_ELSE ||
@@ -1911,3 +2044,42 @@ _glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
parser->skip_stack = node->next;
ralloc_free (node);
}
+
+static void
+_glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t version,
+ const char *es_identifier)
+{
+ macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
+ if (macro) {
+ hash_table_remove (parser->defines, "__VERSION__");
+ ralloc_free (macro);
+ }
+ add_builtin_define (parser, "__VERSION__", version);
+
+ /* If we didn't have a GLES context to begin with, (indicated
+ * by parser->api), then the version declaration here might
+ * indicate GLES. */
+ if (! parser->is_gles &&
+ (version == 100 ||
+ (es_identifier && (strcmp(es_identifier, "es") == 0))))
+ {
+ parser->is_gles = true;
+ add_builtin_define (parser, "GL_ES", 1);
+ }
+
+ if (version >= 150)
+ add_builtin_define(parser, "GL_core_profile", 1);
+
+ /* Currently, all ES2/ES3 implementations support highp in the
+ * fragment shader, so we always define this macro in ES2/ES3.
+ * 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 (version >= 130 || parser->is_gles)
+ add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
+
+ ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length,
+ "#version %" PRIiMAX "%s%s", version,
+ es_identifier ? " " : "",
+ es_identifier ? es_identifier : "");
+}
diff --git a/dist/Mesa/src/glsl/glcpp/glcpp.c b/dist/Mesa/src/glsl/glcpp/glcpp.c
index 325289129..6994d7bb9 100644
--- a/dist/Mesa/src/glsl/glcpp/glcpp.c
+++ b/dist/Mesa/src/glsl/glcpp/glcpp.c
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <getopt.h>
+
#include "glcpp.h"
#include "main/mtypes.h"
#include "main/shaderobj.h"
@@ -34,6 +36,7 @@ void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{
+ (void) ctx;
*ptr = sh;
}
@@ -93,6 +96,37 @@ load_text_file(void *ctx, const char *filename)
return text;
}
+/* Initialize only those things that glcpp cares about.
+ */
+static void
+init_fake_gl_context (struct gl_context *gl_ctx)
+{
+ gl_ctx->API = API_OPENGL_COMPAT;
+ gl_ctx->Const.DisableGLSLLineContinuations = false;
+}
+
+static void
+usage (void)
+{
+ fprintf (stderr,
+ "Usage: glcpp [OPTIONS] [--] [<filename>]\n"
+ "\n"
+ "Pre-process the given filename (stdin if no filename given).\n"
+ "The following options are supported:\n"
+ " --disable-line-continuations Do not interpret lines ending with a\n"
+ " backslash ('\\') as a line continuation.\n");
+}
+
+enum {
+ DISABLE_LINE_CONTINUATIONS_OPT = CHAR_MAX + 1
+};
+
+const static struct option
+long_options[] = {
+ {"disable-line-continuations", no_argument, 0, DISABLE_LINE_CONTINUATIONS_OPT },
+ {0, 0, 0, 0 }
+};
+
int
main (int argc, char *argv[])
{
@@ -101,16 +135,36 @@ main (int argc, char *argv[])
char *info_log = ralloc_strdup(ctx, "");
const char *shader;
int ret;
+ struct gl_context gl_ctx;
+ int c;
+
+ init_fake_gl_context (&gl_ctx);
+
+ while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) {
+ switch (c) {
+ case DISABLE_LINE_CONTINUATIONS_OPT:
+ gl_ctx.Const.DisableGLSLLineContinuations = true;
+ break;
+ default:
+ usage ();
+ exit (1);
+ }
+ }
- if (argc) {
- filename = argv[1];
+ if (optind + 1 < argc) {
+ printf ("Unexpected argument: %s\n", argv[optind+1]);
+ usage ();
+ exit (1);
+ }
+ if (optind < argc) {
+ filename = argv[optind];
}
shader = load_text_file (ctx, filename);
if (shader == NULL)
return 1;
- ret = preprocess(ctx, &shader, &info_log, NULL, API_OPENGL);
+ ret = glcpp_preprocess(ctx, &shader, &info_log, NULL, &gl_ctx);
printf("%s", shader);
fprintf(stderr, "%s", info_log);
diff --git a/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c b/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c
index 52a331cc4..1f520d4d4 100644
--- a/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c
+++ b/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c
@@ -1,3 +1,7 @@
#if 0
+Not this
#elif UNDEFINED_MACRO
+Nor this
+#else
+Yes, this.
#endif
diff --git a/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected b/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected
index de967eac4..2af0a1269 100644
--- a/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected
+++ b/dist/Mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected
@@ -1,5 +1,8 @@
-0:2(22): preprocessor error: syntax error, unexpected IDENTIFIER
-0:1(7): preprocessor error: Unterminated #if
+
+
+Yes, this.
+
+
diff --git a/dist/Mesa/src/glsl/glcpp/tests/glcpp-test b/dist/Mesa/src/glsl/glcpp/tests/glcpp-test
index e8f3b5463..2d2687fc6 100644
--- a/dist/Mesa/src/glsl/glcpp/tests/glcpp-test
+++ b/dist/Mesa/src/glsl/glcpp/tests/glcpp-test
@@ -1,5 +1,13 @@
#!/bin/sh
+if [ ! -z "$srcdir" ]; then
+ testdir=$srcdir/glcpp/tests
+ glcpp=`pwd`/glcpp/glcpp
+else
+ testdir=.
+ glcpp=../glcpp
+fi
+
trap 'rm $test.valgrind-errors; exit 1' INT QUIT
usage ()
@@ -15,6 +23,13 @@ Valid options include:
EOF
}
+test_specific_args ()
+{
+ test="$1"
+
+ grep 'glcpp-args:' "$test" | sed -e 's,^.*glcpp-args: *,,'
+}
+
# Parse command-line options
for option; do
if [ "${option}" = '--help' ] ; then
@@ -35,9 +50,9 @@ pass=0
clean=0
echo "====== Testing for correctness ======"
-for test in *.c; do
+for test in $testdir/*.c; do
echo -n "Testing $test..."
- ../glcpp < $test > $test.out 2>&1
+ $glcpp $(test_specific_args $test) < $test > $test.out 2>&1
total=$((total+1))
if cmp $test.expected $test.out >/dev/null 2>&1; then
echo "PASS"
@@ -54,9 +69,9 @@ echo ""
if [ "$do_valgrind" = "yes" ]; then
echo "====== Testing for valgrind cleanliness ======"
- for test in *.c; do
+ for test in $testdir/*.c; do
echo -n "Testing $test with valgrind..."
- valgrind --error-exitcode=31 --log-file=$test.valgrind-errors ../glcpp < $test >/dev/null 2>&1
+ valgrind --error-exitcode=31 --log-file=$test.valgrind-errors $glcpp $(test_specific_args $test) < $test >/dev/null 2>&1
if [ "$?" = "31" ]; then
echo "ERRORS"
cat $test.valgrind-errors
@@ -72,7 +87,7 @@ if [ "$do_valgrind" = "yes" ]; then
echo "$clean/$total tests are valgrind-clean"
fi
-if [ "$pass" = "$total" ] && [ "$clean" = "$total" ]; then
+if [ "$pass" = "$total" ] && [ "$do_valgrind" != "yes" ] || [ "$pass" = "$total" ]; then
exit 0
else
exit 1
diff --git a/dist/Mesa/src/glsl/glsl_lexer.cpp b/dist/Mesa/src/glsl/glsl_lexer.cpp
index 787315f9a..90eb341f3 100644
--- a/dist/Mesa/src/glsl/glsl_lexer.cpp
+++ b/dist/Mesa/src/glsl/glsl_lexer.cpp
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 36
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -54,7 +54,6 @@ 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
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -152,7 +153,7 @@ typedef void* yyscan_t;
#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_NEW_FILE _mesa_glsl_lexer_restart(yyin ,yyscanner )
#define YY_END_OF_BUFFER_CHAR 0
@@ -170,6 +171,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -192,11 +198,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#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
@@ -214,7 +215,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t 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
@@ -254,7 +255,7 @@ struct yy_buffer_state
* 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
+ * (via _mesa_glsl_lexer_restart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -277,36 +278,36 @@ struct yy_buffer_state
*/
#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 );
+void _mesa_glsl_lexer_restart (FILE *input_file ,yyscan_t yyscanner );
+void _mesa_glsl_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE _mesa_glsl_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void _mesa_glsl_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void _mesa_glsl_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void _mesa_glsl_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void _mesa_glsl_lexer_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 );
+static void _mesa_glsl_lexer_ensure_buffer_stack (yyscan_t yyscanner );
+static void _mesa_glsl_lexer__load_buffer_state (yyscan_t yyscanner );
+static void _mesa_glsl_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-#define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+#define YY_FLUSH_BUFFER _mesa_glsl_lexer__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 );
+YY_BUFFER_STATE _mesa_glsl_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE _mesa_glsl_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE _mesa_glsl_lexer__scan_bytes (yyconst char *bytes,yy_size_t 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 );
+void *_mesa_glsl_lexer_alloc (yy_size_t ,yyscan_t yyscanner );
+void *_mesa_glsl_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void _mesa_glsl_lexer_free (void * ,yyscan_t yyscanner );
-#define yy_new_buffer _mesa_glsl__create_buffer
+#define yy_new_buffer _mesa_glsl_lexer__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- _mesa_glsl_ensure_buffer_stack (yyscanner); \
+ _mesa_glsl_lexer_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
@@ -314,9 +315,9 @@ void _mesa_glsl_free (void * ,yyscan_t yyscanner );
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- _mesa_glsl_ensure_buffer_stack (yyscanner); \
+ _mesa_glsl_lexer_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
@@ -325,7 +326,7 @@ void _mesa_glsl_free (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
-#define _mesa_glsl_wrap(n) 1
+#define _mesa_glsl_lexer_wrap(yyscanner) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -349,8 +350,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 210
-#define YY_END_OF_BUFFER 211
+#define YY_NUM_RULES 234
+#define YY_END_OF_BUFFER 235
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -358,100 +359,113 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[836] =
+static yyconst flex_int16_t yy_accept[960] =
{ 0,
- 0, 0, 16, 16, 0, 0, 211, 209, 1, 21,
- 209, 209, 209, 209, 209, 209, 209, 209, 120, 118,
- 209, 209, 209, 208, 209, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 209, 1, 209, 210, 16,
- 20, 210, 19, 17, 18, 14, 13, 1, 102, 111,
- 103, 114, 108, 97, 110, 98, 117, 122, 109, 123,
- 120, 0, 0, 125, 120, 0, 118, 118, 106, 99,
- 101, 100, 107, 208, 115, 105, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 30, 208,
-
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 34, 208, 208, 61, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 116,
- 104, 1, 0, 0, 2, 0, 0, 0, 0, 16,
- 15, 19, 18, 0, 122, 121, 0, 123, 0, 124,
- 119, 112, 113, 208, 128, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 33, 208, 208, 208,
-
- 208, 208, 208, 208, 208, 208, 208, 26, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 62,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 0, 0, 0, 0, 15, 0, 122, 0, 121, 0,
- 123, 124, 119, 208, 208, 24, 208, 208, 175, 168,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 32,
- 131, 208, 208, 208, 208, 68, 208, 208, 136, 150,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
-
- 208, 208, 147, 171, 49, 50, 51, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 134, 126, 208,
- 208, 27, 208, 208, 208, 208, 208, 208, 208, 46,
- 47, 48, 95, 208, 208, 0, 0, 0, 0, 0,
- 121, 208, 208, 28, 37, 38, 39, 208, 129, 208,
- 23, 208, 208, 208, 208, 158, 159, 160, 208, 127,
- 208, 151, 25, 161, 162, 163, 173, 155, 156, 157,
- 208, 208, 208, 63, 153, 208, 208, 208, 40, 41,
- 42, 208, 208, 208, 208, 208, 208, 208, 208, 208,
-
- 208, 208, 208, 208, 208, 208, 208, 148, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 130, 208,
- 208, 170, 43, 44, 45, 208, 208, 31, 0, 0,
- 0, 0, 178, 208, 208, 176, 208, 208, 208, 149,
- 144, 181, 208, 208, 208, 208, 208, 208, 139, 208,
- 208, 208, 96, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 208, 208, 208, 208, 154, 135, 208, 208,
- 142, 36, 208, 208, 167, 69, 143, 94, 179, 137,
- 208, 208, 208, 208, 208, 208, 208, 208, 0, 0,
- 0, 0, 208, 208, 208, 138, 35, 208, 208, 208,
-
- 208, 208, 208, 182, 183, 184, 208, 208, 208, 208,
- 208, 172, 208, 208, 208, 208, 208, 208, 208, 208,
- 132, 208, 208, 208, 208, 208, 64, 208, 208, 65,
- 208, 0, 0, 0, 0, 0, 208, 66, 29, 145,
- 186, 187, 188, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 140, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 133, 190, 191, 192, 208,
- 208, 152, 208, 141, 0, 0, 6, 0, 0, 0,
- 12, 3, 22, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 185, 146, 67, 208, 208, 208, 208, 169,
-
- 208, 177, 174, 207, 71, 72, 73, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 0, 0, 0,
- 0, 0, 0, 0, 208, 208, 208, 189, 208, 208,
- 208, 208, 208, 82, 83, 84, 208, 208, 208, 208,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 193,
- 88, 89, 90, 208, 4, 0, 5, 0, 0, 0,
- 0, 0, 0, 208, 208, 208, 208, 208, 208, 208,
- 204, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 74, 208, 208, 208, 208, 208, 208, 0,
- 0, 0, 0, 208, 208, 205, 194, 208, 195, 208,
-
- 208, 208, 85, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 206, 208, 208, 91, 0, 0,
- 0, 196, 197, 208, 200, 208, 201, 208, 208, 70,
- 208, 208, 208, 164, 208, 165, 180, 208, 198, 199,
- 208, 208, 0, 0, 0, 208, 208, 208, 208, 75,
- 208, 76, 208, 208, 208, 208, 208, 0, 0, 0,
- 0, 208, 208, 86, 87, 208, 77, 208, 208, 78,
- 208, 92, 93, 0, 0, 0, 0, 208, 208, 208,
- 208, 208, 208, 0, 0, 0, 0, 208, 208, 208,
- 208, 208, 79, 0, 0, 0, 7, 0, 0, 202,
-
- 203, 208, 208, 208, 0, 0, 8, 0, 0, 208,
- 208, 166, 0, 0, 0, 80, 81, 0, 0, 0,
- 9, 0, 0, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 0
+ 0, 0, 16, 16, 0, 0, 235, 233, 1, 21,
+ 233, 233, 233, 233, 233, 233, 233, 233, 131, 129,
+ 233, 233, 233, 232, 233, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 233, 1, 233, 234, 16,
+ 20, 234, 19, 17, 18, 14, 13, 1, 113, 122,
+ 114, 125, 119, 108, 121, 109, 128, 133, 120, 134,
+ 131, 0, 0, 136, 131, 0, 129, 129, 117, 110,
+ 112, 111, 118, 232, 126, 116, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 30, 232,
+
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 34, 232, 232, 61, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 127, 115, 1, 0, 0, 2, 0, 0, 0, 0,
+ 16, 15, 19, 18, 0, 133, 132, 0, 134, 0,
+ 135, 130, 123, 124, 232, 139, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 33,
+
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 26, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 62, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 0, 0,
+ 0, 0, 15, 0, 133, 0, 132, 0, 134, 135,
+ 130, 232, 232, 232, 24, 232, 232, 186, 179, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 32,
+ 142, 232, 232, 232, 232, 68, 232, 232, 147, 161,
+
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 158, 182, 49, 50, 51, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 145, 137, 232, 232, 27, 232, 232, 232,
+ 232, 232, 232, 232, 46, 47, 48, 106, 232, 232,
+ 232, 0, 0, 0, 0, 0, 132, 232, 232, 232,
+ 28, 37, 38, 39, 232, 140, 232, 232, 23, 232,
+ 232, 232, 232, 169, 170, 171, 232, 138, 232, 162,
+ 25, 172, 173, 174, 184, 166, 167, 168, 232, 232,
+
+ 232, 63, 164, 232, 232, 232, 40, 41, 42, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 229, 232, 232, 232, 232, 232, 232, 232, 232, 159,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 141, 232, 232, 181, 43, 44, 45, 232, 232,
+ 31, 232, 0, 0, 0, 0, 189, 232, 232, 232,
+ 232, 187, 232, 232, 232, 160, 155, 192, 232, 232,
+ 232, 232, 232, 232, 150, 232, 232, 232, 107, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 232, 232,
+ 232, 232, 165, 146, 232, 232, 153, 232, 232, 232,
+
+ 36, 232, 230, 178, 69, 154, 105, 232, 190, 148,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 0,
+ 0, 0, 0, 232, 232, 232, 232, 232, 149, 35,
+ 232, 232, 232, 232, 232, 232, 193, 194, 195, 232,
+ 232, 232, 232, 232, 183, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 143, 232, 232,
+ 232, 232, 232, 64, 232, 232, 65, 232, 232, 0,
+ 0, 0, 0, 0, 232, 232, 66, 223, 29, 156,
+ 197, 198, 199, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 151, 232, 232, 232, 225,
+
+ 227, 224, 232, 232, 232, 232, 232, 232, 232, 232,
+ 144, 201, 202, 203, 232, 232, 163, 232, 152, 232,
+ 0, 0, 6, 0, 0, 0, 12, 3, 232, 22,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 196,
+ 157, 67, 232, 232, 232, 232, 232, 180, 232, 188,
+ 185, 218, 71, 72, 73, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 226, 0,
+ 0, 0, 0, 0, 0, 0, 232, 232, 232, 232,
+ 200, 232, 232, 232, 232, 232, 82, 83, 84, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+
+ 232, 232, 231, 232, 232, 232, 204, 88, 89, 90,
+ 232, 232, 4, 0, 5, 0, 0, 0, 0, 0,
+ 0, 228, 232, 232, 232, 232, 232, 232, 232, 215,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 94, 232, 232, 232, 232, 74, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 0, 0, 0, 0,
+ 232, 232, 216, 205, 232, 206, 232, 232, 232, 95,
+ 232, 232, 85, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 217, 232, 232,
+ 96, 232, 232, 91, 0, 0, 0, 207, 208, 232,
+
+ 211, 232, 212, 232, 232, 232, 232, 232, 232, 70,
+ 232, 232, 232, 232, 175, 232, 176, 191, 232, 232,
+ 232, 209, 210, 232, 232, 232, 232, 232, 232, 0,
+ 0, 0, 232, 232, 232, 232, 232, 219, 221, 232,
+ 75, 232, 76, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 220, 222, 232, 0, 0, 0, 0, 232,
+ 232, 86, 87, 232, 232, 232, 77, 232, 232, 232,
+ 78, 232, 232, 232, 92, 93, 232, 232, 0, 0,
+ 0, 0, 232, 232, 232, 232, 232, 232, 97, 232,
+ 100, 232, 232, 232, 232, 0, 0, 0, 0, 232,
+
+ 232, 98, 101, 232, 232, 232, 232, 79, 232, 99,
+ 102, 0, 0, 0, 7, 0, 0, 213, 214, 232,
+ 232, 232, 232, 104, 0, 0, 8, 0, 0, 232,
+ 232, 177, 232, 0, 0, 0, 80, 81, 232, 0,
+ 0, 0, 9, 232, 0, 0, 10, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 11, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -463,13 +477,13 @@ static yyconst flex_int32_t yy_ec[256] =
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, 34, 34, 34, 34, 35, 34, 34, 34, 34,
- 34, 36, 37, 38, 39, 34, 34, 40, 34, 34,
- 1, 1, 1, 41, 42, 1, 43, 44, 45, 46,
+ 33, 34, 34, 34, 34, 35, 36, 34, 37, 34,
+ 34, 38, 39, 40, 41, 34, 34, 42, 34, 34,
+ 1, 1, 1, 43, 44, 1, 45, 46, 47, 48,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 34, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 1, 68, 1, 1, 1, 1, 1, 1,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 34, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 1, 70, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -486,357 +500,397 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[69] =
+static yyconst flex_int32_t yy_meta[71] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 3, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 4, 4, 4, 4,
3, 3, 5, 5, 5, 5, 5, 5, 5, 5,
- 1, 5, 4, 4, 4, 4, 3, 3, 5, 5,
+ 5, 5, 1, 5, 4, 4, 4, 4, 3, 3,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 1
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[845] =
+static yyconst flex_int16_t yy_base[970] =
{ 0,
- 0, 67, 73, 0, 1210, 1209, 1211, 1214, 68, 1214,
- 1185, 1184, 134, 1183, 131, 132, 130, 1182, 146, 198,
- 129, 1181, 144, 0, 130, 113, 124, 141, 150, 126,
- 181, 1148, 159, 192, 118, 129, 146, 1142, 147, 174,
- 206, 192, 203, 222, 1153, 203, 221, 231, 1214, 260,
- 1214, 1187, 279, 1214, 0, 1214, 1214, 270, 1214, 1214,
- 1214, 1214, 1214, 1214, 1214, 1214, 1214, 244, 1214, 255,
- 139, 290, 307, 1214, 1214, 0, 0, 1214, 1176, 1214,
- 1214, 1214, 1175, 0, 1214, 1214, 1138, 1143, 1136, 1139,
- 1148, 1147, 1133, 1136, 1148, 144, 1142, 1129, 1126, 1140,
-
- 1126, 1123, 1123, 1129, 219, 193, 1123, 1134, 1119, 1125,
- 1129, 1130, 0, 1121, 1132, 278, 1131, 1126, 1106, 224,
- 1110, 1124, 1114, 232, 1107, 271, 1120, 1122, 1104, 1100,
- 1108, 1105, 1094, 1103, 234, 1101, 1107, 1102, 1105, 1093,
- 1096, 226, 145, 262, 1106, 1093, 1106, 263, 1099, 1214,
- 1214, 338, 331, 343, 1214, 1084, 1097, 1088, 1099, 345,
- 0, 334, 0, 345, 1214, 328, 391, 1214, 352, 398,
- 338, 1214, 1214, 1094, 0, 1085, 1089, 1099, 1096, 332,
- 1079, 1079, 1083, 320, 1094, 1091, 1091, 1089, 1086, 1077,
- 1084, 1070, 1068, 1081, 1066, 1083, 0, 1080, 1067, 1075,
-
- 1072, 1076, 1077, 1070, 1067, 1055, 1054, 1068, 1071, 1058,
- 1067, 1054, 1061, 1051, 364, 1057, 1060, 1050, 1058, 1046,
- 1050, 1041, 1056, 1046, 1037, 1056, 1039, 1037, 1048, 1037,
- 1032, 1030, 1044, 1029, 1031, 1028, 1040, 1039, 1042, 1023,
- 338, 1032, 1027, 1025, 1035, 1013, 403, 1032, 1034, 1022,
- 1014, 1018, 1030, 1013, 0, 415, 422, 439, 1214, 446,
- 455, 1214, 1214, 1008, 1019, 0, 1016, 406, 0, 0,
- 1009, 1007, 1009, 1004, 1013, 1001, 1019, 1007, 409, 0,
- 0, 1001, 1012, 1011, 1011, 0, 995, 429, 0, 0,
- 997, 460, 1005, 1006, 996, 990, 989, 990, 989, 989,
-
- 463, 984, 0, 0, 980, 979, 978, 980, 981, 986,
- 980, 976, 990, 985, 984, 983, 974, 977, 977, 969,
- 972, 967, 976, 981, 966, 979, 969, 0, 0, 976,
- 972, 0, 963, 963, 969, 959, 967, 466, 964, 0,
- 0, 0, 0, 953, 966, 965, 964, 961, 949, 472,
- 479, 961, 963, 0, 0, 0, 0, 949, 0, 949,
- 0, 948, 949, 943, 954, 0, 0, 0, 944, 0,
- 940, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 951, 487, 950, 0, 0, 948, 944, 940, 0, 0,
- 0, 932, 489, 494, 499, 937, 933, 939, 929, 927,
-
- 941, 925, 925, 939, 927, 939, 934, 0, 932, 929,
- 933, 916, 918, 925, 931, 926, 925, 912, 0, 914,
- 915, 0, 0, 0, 0, 912, 916, 0, 910, 963,
- 909, 912, 0, 900, 910, 0, 898, 898, 912, 0,
- 914, 0, 503, 926, 925, 924, 891, 890, 0, 908,
- 907, 902, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 890, 904, 890, 887, 0, 0, 893, 892,
- 0, 0, 890, 882, 0, 0, 0, 0, 0, 0,
- 879, 891, 506, 883, 890, 889, 886, 880, 873, 524,
- 889, 874, 869, 883, 881, 0, 0, 873, 896, 895,
-
- 894, 861, 860, 361, 365, 0, 873, 876, 874, 862,
- 858, 0, 871, 868, 867, 856, 855, 854, 519, 863,
- 0, 879, 878, 877, 844, 843, 0, 858, 844, 0,
- 855, 850, 547, 553, 898, 843, 851, 0, 0, 0,
- 870, 869, 0, 847, 850, 834, 842, 832, 840, 841,
- 841, 840, 825, 559, 838, 0, 839, 827, 826, 822,
- 850, 849, 848, 815, 814, 0, 848, 847, 0, 825,
- 828, 0, 562, 0, 814, 580, 1214, 587, 0, 607,
- 584, 1214, 0, 811, 810, 820, 820, 807, 822, 805,
- 820, 815, 0, 0, 0, 831, 830, 829, 796, 0,
-
- 796, 0, 0, 0, 502, 524, 820, 807, 810, 794,
- 793, 803, 803, 819, 818, 817, 784, 789, 615, 640,
- 550, 806, 796, 784, 782, 781, 792, 0, 795, 791,
- 793, 789, 775, 806, 805, 0, 787, 779, 770, 778,
- 768, 779, 775, 777, 775, 775, 762, 761, 772, 0,
- 791, 790, 0, 772, 1214, 555, 1214, 647, 0, 667,
- 785, 770, 752, 769, 768, 751, 743, 751, 741, 749,
- 0, 746, 745, 756, 739, 742, 757, 740, 753, 754,
- 751, 748, 757, 750, 749, 732, 731, 730, 741, 582,
- 754, 724, 734, 718, 717, 0, 745, 717, 743, 715,
-
- 719, 718, 0, 729, 732, 728, 730, 711, 725, 709,
- 710, 718, 701, 700, 0, 706, 705, 0, 728, 713,
- 706, 0, 0, 710, 0, 709, 0, 715, 714, 0,
- 690, 698, 688, 716, 695, 0, 0, 708, 0, 0,
- 707, 706, 746, 611, 696, 703, 702, 678, 677, 705,
- 677, 703, 689, 674, 691, 670, 669, 190, 613, 557,
- 667, 687, 686, 0, 0, 681, 0, 680, 686, 0,
- 671, 0, 0, 671, 590, 343, 672, 645, 644, 654,
- 635, 631, 612, 612, 604, 443, 635, 576, 575, 549,
- 25, 87, 0, 183, 500, 552, 1214, 636, 591, 0,
-
- 0, 196, 258, 254, 272, 609, 1214, 614, 598, 279,
- 284, 0, 336, 348, 671, 0, 0, 362, 672, 688,
- 1214, 394, 689, 1214, 408, 670, 691, 649, 651, 474,
- 476, 693, 694, 1214, 1214, 704, 707, 710, 530, 591,
- 713, 717, 720, 722
+ 0, 69, 75, 145, 1329, 1328, 1330, 1333, 70, 1333,
+ 1304, 1303, 94, 1302, 91, 92, 90, 1301, 202, 256,
+ 89, 1300, 95, 0, 79, 68, 64, 79, 124, 76,
+ 131, 1265, 127, 141, 81, 88, 82, 1259, 136, 126,
+ 183, 177, 149, 168, 134, 180, 206, 251, 1333, 140,
+ 1333, 1307, 239, 1333, 0, 1333, 1333, 228, 1333, 1333,
+ 1333, 1333, 1333, 1333, 1333, 1333, 1333, 231, 1333, 233,
+ 137, 307, 273, 1333, 1333, 0, 0, 1333, 1296, 1333,
+ 1333, 1333, 1295, 0, 1333, 1333, 1256, 1261, 115, 1258,
+ 1267, 1266, 1252, 1255, 1267, 244, 1261, 1248, 1245, 1259,
+
+ 1245, 1242, 1242, 1248, 126, 180, 1242, 1253, 1238, 1244,
+ 1248, 1249, 0, 1240, 1251, 254, 1250, 1245, 1225, 143,
+ 1229, 1243, 1233, 188, 1226, 271, 1239, 1241, 285, 1220,
+ 1228, 1225, 1214, 1223, 223, 252, 1228, 1223, 1226, 1214,
+ 1217, 246, 246, 226, 1227, 1214, 1227, 83, 1220, 1219,
+ 1333, 1333, 329, 334, 340, 1333, 1204, 1217, 1208, 1219,
+ 342, 0, 333, 0, 346, 1333, 329, 390, 1333, 353,
+ 397, 281, 1333, 1333, 1214, 0, 1209, 1204, 1208, 1218,
+ 1215, 328, 1198, 1198, 1210, 1201, 278, 1212, 1209, 1209,
+ 1207, 1204, 1195, 1202, 1188, 1186, 1199, 1184, 1201, 0,
+
+ 1198, 1185, 1193, 1190, 1194, 1195, 1188, 1185, 1173, 1172,
+ 1186, 1189, 1176, 1185, 1172, 1179, 1169, 362, 1175, 1178,
+ 1168, 1176, 1164, 1168, 1159, 1174, 1173, 1163, 1170, 325,
+ 1153, 1172, 1155, 1153, 1164, 1153, 1148, 1146, 1148, 1159,
+ 1144, 1146, 1143, 1155, 1154, 1157, 1138, 326, 1147, 1142,
+ 1140, 1150, 1128, 402, 1147, 1149, 1137, 1129, 1128, 1132,
+ 1144, 1127, 0, 414, 421, 438, 1333, 445, 456, 1333,
+ 1333, 1122, 1133, 1132, 0, 1129, 405, 0, 0, 1122,
+ 1120, 1120, 1121, 1116, 1125, 1113, 1131, 1119, 408, 0,
+ 0, 1113, 1124, 1123, 1123, 0, 1107, 426, 0, 0,
+
+ 1109, 450, 1117, 1118, 1108, 1102, 1101, 1102, 1101, 1101,
+ 461, 1096, 0, 0, 1092, 1091, 1090, 1092, 1093, 1098,
+ 1092, 1088, 1102, 1097, 1097, 1095, 1094, 1087, 1081, 1083,
+ 1082, 1085, 1085, 1077, 1080, 1075, 1084, 1089, 1076, 1073,
+ 1086, 1076, 0, 0, 1083, 1079, 0, 1070, 1070, 1076,
+ 1066, 1074, 464, 1071, 0, 0, 0, 0, 1060, 1073,
+ 1072, 1071, 1070, 1067, 1055, 473, 480, 1067, 1068, 1068,
+ 0, 0, 0, 0, 1054, 0, 1063, 1053, 0, 1052,
+ 1053, 1047, 1058, 0, 0, 0, 1048, 0, 1044, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1055, 486,
+
+ 1054, 0, 0, 1052, 1048, 1044, 0, 0, 0, 1036,
+ 467, 489, 498, 1041, 1037, 1043, 1033, 1031, 1045, 1029,
+ 0, 1029, 1043, 1031, 1027, 1034, 1028, 1040, 1035, 0,
+ 1033, 1030, 1034, 1017, 1015, 1018, 1025, 1031, 1026, 1025,
+ 1012, 0, 1014, 1015, 0, 0, 0, 0, 1012, 1016,
+ 0, 1009, 1009, 1064, 1008, 1011, 0, 1019, 998, 1008,
+ 1002, 0, 995, 995, 1009, 0, 1011, 0, 503, 1025,
+ 1024, 1023, 988, 987, 0, 1005, 1004, 999, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 987, 1001,
+ 987, 984, 0, 0, 990, 989, 0, 985, 993, 992,
+
+ 0, 984, 976, 0, 0, 0, 0, 973, 0, 0,
+ 972, 984, 506, 976, 983, 982, 979, 973, 970, 965,
+ 524, 981, 966, 960, 960, 974, 958, 971, 0, 0,
+ 963, 988, 987, 986, 951, 950, 359, 365, 0, 963,
+ 966, 964, 952, 948, 0, 961, 958, 957, 946, 945,
+ 935, 953, 938, 941, 519, 946, 949, 0, 967, 966,
+ 965, 930, 929, 0, 944, 930, 0, 941, 933, 935,
+ 549, 555, 985, 928, 932, 935, 0, 0, 0, 0,
+ 956, 955, 0, 931, 934, 918, 926, 916, 924, 925,
+ 925, 924, 909, 561, 922, 0, 923, 911, 910, 0,
+
+ 0, 0, 906, 936, 935, 934, 899, 898, 894, 902,
+ 0, 932, 931, 0, 907, 910, 0, 564, 0, 887,
+ 895, 582, 1333, 592, 0, 603, 594, 1333, 895, 0,
+ 891, 890, 900, 900, 887, 902, 885, 900, 895, 0,
+ 0, 0, 913, 912, 911, 876, 875, 0, 875, 0,
+ 0, 0, 500, 590, 899, 886, 889, 871, 884, 871,
+ 870, 880, 880, 898, 897, 896, 861, 860, 0, 865,
+ 628, 638, 446, 882, 872, 860, 856, 857, 856, 867,
+ 0, 870, 866, 868, 864, 850, 883, 526, 0, 859,
+ 862, 854, 845, 853, 843, 864, 853, 849, 851, 849,
+
+ 849, 848, 0, 835, 834, 845, 0, 866, 600, 0,
+ 842, 845, 1333, 508, 1333, 648, 0, 659, 860, 843,
+ 825, 0, 842, 841, 824, 816, 824, 814, 822, 0,
+ 819, 818, 839, 828, 826, 826, 809, 812, 827, 810,
+ 843, 822, 823, 820, 817, 522, 804, 819, 818, 794,
+ 772, 771, 792, 781, 779, 779, 526, 794, 762, 772,
+ 755, 754, 0, 782, 754, 780, 752, 756, 755, 788,
+ 767, 764, 784, 761, 764, 760, 760, 743, 740, 754,
+ 10, 170, 176, 190, 209, 241, 247, 0, 326, 332,
+ 368, 350, 352, 425, 478, 468, 476, 0, 0, 502,
+
+ 0, 503, 0, 511, 514, 499, 500, 525, 526, 0,
+ 520, 538, 539, 553, 576, 559, 0, 0, 571, 589,
+ 590, 0, 0, 592, 594, 582, 589, 602, 610, 670,
+ 680, 620, 629, 638, 616, 617, 625, 0, 0, 626,
+ 649, 624, 652, 647, 641, 628, 651, 649, 642, 631,
+ 632, 640, 0, 0, 641, 701, 702, 703, 637, 659,
+ 660, 0, 0, 664, 665, 660, 0, 661, 646, 670,
+ 0, 648, 658, 681, 0, 0, 674, 675, 663, 720,
+ 673, 675, 666, 667, 659, 660, 684, 685, 0, 684,
+ 694, 668, 704, 668, 669, 673, 689, 738, 740, 675,
+
+ 677, 0, 0, 696, 697, 687, 695, 0, 711, 0,
+ 0, 706, 750, 751, 1333, 754, 753, 0, 0, 698,
+ 699, 693, 719, 0, 704, 764, 1333, 765, 718, 703,
+ 704, 0, 723, 719, 723, 773, 0, 0, 718, 733,
+ 778, 779, 1333, 716, 726, 783, 1333, 0, 723, 785,
+ 788, 789, 790, 739, 740, 796, 797, 1333, 1333, 835,
+ 840, 843, 846, 797, 798, 849, 853, 856, 858
} ;
-static yyconst flex_int16_t yy_def[845] =
+static yyconst flex_int16_t yy_def[970] =
{ 0,
- 835, 1, 835, 3, 836, 836, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 837, 835, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 838, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 839, 835, 840,
- 19, 835, 835, 835, 835, 841, 20, 835, 835, 835,
- 835, 835, 835, 837, 835, 835, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 842, 835, 838, 835, 835, 840, 835, 835, 835, 835,
- 841, 835, 835, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 835, 835, 835, 835, 842, 835, 835, 835, 835, 835,
- 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 835, 835, 835, 835, 835,
- 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
- 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
- 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 835, 835, 835, 835, 835, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 835, 835, 835, 835, 843, 835,
- 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
- 843, 835, 835, 835, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 835, 835, 835, 835, 844, 835,
- 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 844,
- 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
- 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 835, 835, 835, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
- 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 835, 835, 835, 835, 837, 837, 837,
- 837, 837, 837, 835, 835, 835, 835, 837, 837, 837,
- 837, 837, 837, 835, 835, 835, 835, 835, 835, 837,
-
- 837, 837, 837, 837, 835, 835, 835, 835, 835, 837,
- 837, 837, 835, 835, 835, 837, 837, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 0, 835, 835, 835, 835, 835,
- 835, 835, 835, 835
+ 959, 1, 960, 960, 961, 961, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 962, 959, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 963, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 964, 959, 965,
+ 19, 959, 959, 959, 959, 966, 20, 959, 959, 959,
+ 959, 959, 959, 962, 959, 959, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 967, 959, 963, 959, 959, 965, 959, 959, 959,
+ 959, 966, 959, 959, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 959, 959,
+ 959, 959, 967, 959, 959, 959, 959, 959, 959, 959,
+ 959, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 959, 959, 959, 959, 959, 959, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 959, 959, 959, 959, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 959,
+ 959, 959, 959, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 959,
+ 959, 959, 959, 959, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 959, 959, 959, 959, 968, 959, 959, 959, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 959,
+ 959, 959, 968, 959, 959, 959, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 959, 959, 959, 959, 969, 959, 959, 959,
+ 959, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 969, 959, 959, 959,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 959, 959, 959, 962, 962, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 959,
+ 959, 959, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 959, 959, 959, 959, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962, 959, 959,
+ 959, 959, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 959, 959, 959, 959, 962,
+
+ 962, 962, 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 959, 959, 959, 959, 959, 959, 962, 962, 962,
+ 962, 962, 962, 962, 959, 959, 959, 959, 959, 962,
+ 962, 962, 962, 959, 959, 959, 962, 962, 962, 959,
+ 959, 959, 959, 962, 959, 959, 959, 962, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 0, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959
} ;
-static yyconst flex_int16_t yy_nxt[1283] =
+static yyconst flex_int16_t yy_nxt[1404] =
{ 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, 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,
- 803, 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,
- 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, 804, 66, 68, 68, 68, 68, 68,
- 68, 68, 79, 80, 85, 65, 67, 87, 62, 70,
- 119, 71, 71, 71, 71, 71, 71, 72, 82, 83,
- 86, 121, 88, 89, 120, 122, 73, 74, 835, 101,
- 90, 102, 91, 93, 75, 76, 92, 94, 123, 126,
- 103, 758, 73, 74, 95, 241, 97, 96, 183, 184,
-
- 98, 110, 124, 835, 242, 127, 99, 75, 128, 111,
- 76, 70, 100, 77, 77, 77, 77, 77, 77, 77,
- 129, 112, 152, 104, 58, 805, 153, 150, 73, 74,
- 130, 105, 154, 155, 106, 195, 78, 107, 138, 113,
- 774, 139, 114, 108, 73, 74, 115, 116, 131, 196,
- 140, 117, 810, 142, 118, 132, 133, 141, 143, 78,
- 134, 160, 144, 160, 146, 145, 135, 136, 147, 137,
- 151, 58, 193, 58, 164, 165, 231, 156, 148, 213,
- 239, 240, 218, 194, 157, 167, 168, 214, 158, 219,
- 164, 165, 232, 159, 162, 162, 162, 162, 162, 162,
-
- 162, 167, 168, 70, 243, 72, 72, 72, 72, 72,
- 72, 72, 244, 248, 811, 221, 249, 812, 169, 169,
- 73, 74, 170, 170, 170, 170, 170, 170, 170, 222,
- 813, 205, 154, 155, 206, 207, 73, 74, 208, 152,
- 209, 58, 816, 153, 154, 155, 160, 817, 160, 162,
- 162, 162, 162, 162, 162, 162, 256, 256, 258, 259,
- 257, 257, 257, 257, 257, 257, 257, 170, 170, 170,
- 170, 170, 170, 170, 258, 259, 263, 156, 269, 274,
- 275, 305, 306, 307, 157, 333, 818, 546, 158, 156,
- 785, 548, 270, 159, 334, 819, 157, 547, 786, 263,
-
- 158, 549, 260, 260, 822, 159, 261, 261, 261, 261,
- 261, 261, 261, 170, 170, 170, 170, 170, 170, 170,
- 340, 341, 342, 355, 356, 357, 366, 367, 368, 262,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 796, 262, 374, 375, 376, 825,
- 350, 350, 797, 165, 351, 351, 351, 351, 351, 351,
- 351, 261, 261, 261, 261, 261, 261, 261, 826, 165,
- 261, 261, 261, 261, 261, 261, 261, 378, 379, 380,
- 389, 390, 391, 423, 424, 425, 168, 351, 351, 351,
- 351, 351, 351, 351, 351, 351, 351, 351, 351, 351,
-
- 351, 806, 168, 444, 445, 446, 454, 455, 456, 807,
- 259, 457, 458, 459, 447, 448, 460, 461, 462, 499,
- 500, 501, 522, 523, 524, 490, 259, 831, 639, 832,
- 502, 503, 68, 525, 526, 561, 562, 563, 640, 533,
- 534, 534, 534, 534, 534, 534, 564, 565, 576, 577,
- 641, 576, 577, 796, 576, 577, 656, 657, 775, 642,
- 643, 797, 578, 578, 578, 578, 578, 578, 580, 580,
- 580, 580, 580, 580, 580, 596, 597, 598, 614, 615,
- 616, 576, 577, 656, 657, 581, 579, 599, 576, 577,
- 617, 775, 808, 166, 802, 619, 620, 620, 620, 620,
-
- 620, 620, 578, 578, 578, 578, 578, 578, 576, 577,
- 806, 579, 759, 776, 759, 808, 656, 657, 807, 760,
- 622, 760, 580, 580, 580, 580, 580, 580, 580, 623,
- 658, 658, 658, 658, 658, 658, 798, 798, 801, 800,
- 624, 656, 657, 799, 799, 814, 776, 809, 656, 657,
- 829, 795, 829, 815, 659, 660, 660, 660, 660, 660,
- 660, 660, 658, 658, 658, 658, 658, 658, 656, 657,
- 809, 827, 820, 823, 794, 793, 792, 791, 828, 659,
- 821, 824, 660, 660, 660, 660, 660, 660, 660, 820,
- 823, 830, 827, 830, 833, 833, 790, 821, 824, 828,
-
- 789, 788, 834, 834, 56, 56, 56, 56, 56, 84,
- 84, 84, 163, 163, 163, 171, 171, 255, 787, 255,
- 255, 255, 621, 621, 690, 690, 784, 783, 782, 781,
- 780, 779, 778, 777, 773, 772, 771, 770, 769, 768,
- 767, 766, 765, 764, 763, 762, 761, 758, 757, 756,
- 755, 754, 753, 752, 751, 750, 749, 748, 747, 746,
- 745, 744, 743, 742, 741, 740, 739, 738, 737, 736,
- 735, 734, 733, 732, 731, 730, 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, 689, 688, 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, 655, 654, 653, 652, 651, 650,
- 649, 648, 647, 646, 645, 644, 638, 637, 636, 635,
- 634, 633, 632, 631, 630, 629, 628, 627, 626, 625,
- 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,
+ 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, 817, 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, 61, 64, 85, 66, 68, 68, 68, 68, 68,
+ 68, 68, 79, 80, 87, 65, 67, 49, 62, 82,
+ 83, 86, 90, 93, 91, 119, 123, 94, 92, 88,
+ 89, 101, 121, 102, 95, 255, 122, 96, 256, 120,
+ 124, 161, 103, 161, 49, 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, 110, 97, 177, 129, 104, 98, 178, 959, 111,
+ 126, 196, 99, 105, 130, 149, 106, 49, 100, 107,
+ 113, 112, 197, 114, 150, 108, 127, 115, 116, 128,
+
+ 216, 142, 117, 959, 151, 118, 143, 153, 217, 58,
+ 144, 154, 146, 145, 49, 70, 147, 71, 71, 71,
+ 71, 71, 71, 72, 198, 138, 148, 131, 139, 58,
+ 818, 58, 73, 74, 132, 133, 819, 140, 199, 134,
+ 221, 820, 75, 76, 141, 135, 136, 222, 137, 152,
+ 73, 74, 155, 156, 163, 163, 163, 163, 163, 163,
+ 163, 165, 166, 168, 169, 75, 821, 237, 76, 70,
+ 250, 77, 77, 77, 77, 77, 77, 77, 251, 165,
+ 166, 168, 169, 238, 170, 170, 73, 74, 171, 171,
+ 171, 171, 171, 171, 171, 185, 78, 239, 248, 157,
+
+ 186, 187, 246, 247, 73, 74, 158, 249, 822, 208,
+ 159, 240, 209, 210, 823, 160, 211, 224, 212, 78,
+ 70, 271, 72, 72, 72, 72, 72, 72, 72, 229,
+ 153, 225, 58, 226, 154, 155, 156, 73, 74, 284,
+ 285, 155, 156, 161, 271, 161, 230, 231, 163, 163,
+ 163, 163, 163, 163, 163, 73, 74, 264, 264, 266,
+ 267, 265, 265, 265, 265, 265, 265, 265, 171, 171,
+ 171, 171, 171, 171, 171, 348, 278, 266, 267, 315,
+ 316, 317, 157, 329, 349, 586, 824, 330, 157, 158,
+ 279, 588, 825, 159, 826, 158, 827, 587, 160, 159,
+
+ 828, 268, 268, 589, 160, 269, 269, 269, 269, 269,
+ 269, 269, 171, 171, 171, 171, 171, 171, 171, 355,
+ 356, 357, 372, 373, 374, 384, 385, 386, 270, 265,
+ 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
+ 265, 265, 265, 392, 393, 394, 270, 622, 623, 366,
+ 366, 829, 166, 367, 367, 367, 367, 367, 367, 367,
+ 269, 269, 269, 269, 269, 269, 269, 396, 397, 398,
+ 166, 269, 269, 269, 269, 269, 269, 269, 407, 408,
+ 409, 446, 447, 448, 480, 481, 482, 169, 367, 367,
+ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367,
+
+ 367, 367, 470, 471, 472, 169, 483, 484, 485, 714,
+ 715, 267, 830, 473, 474, 486, 487, 488, 831, 532,
+ 533, 534, 559, 560, 561, 521, 693, 714, 715, 267,
+ 535, 536, 832, 562, 563, 604, 605, 606, 694, 571,
+ 572, 572, 572, 572, 572, 572, 607, 608, 783, 609,
+ 622, 623, 732, 833, 834, 835, 622, 623, 836, 837,
+ 784, 733, 838, 734, 624, 624, 624, 624, 624, 624,
+ 626, 626, 626, 626, 626, 626, 626, 643, 644, 645,
+ 664, 665, 666, 622, 623, 839, 840, 841, 646, 647,
+ 625, 667, 668, 622, 623, 627, 842, 671, 672, 672,
+
+ 672, 672, 672, 672, 622, 623, 843, 624, 624, 624,
+ 624, 624, 624, 844, 845, 625, 695, 846, 626, 626,
+ 626, 626, 626, 626, 626, 696, 752, 697, 698, 714,
+ 715, 847, 674, 848, 849, 753, 850, 754, 851, 714,
+ 715, 675, 852, 716, 716, 716, 716, 716, 716, 714,
+ 715, 853, 676, 718, 718, 718, 718, 718, 718, 718,
+ 714, 715, 854, 716, 716, 716, 716, 716, 716, 717,
+ 855, 856, 859, 860, 718, 718, 718, 718, 718, 718,
+ 718, 857, 861, 862, 863, 864, 865, 866, 858, 867,
+ 868, 869, 870, 871, 717, 872, 873, 874, 875, 876,
+
+ 877, 878, 856, 857, 880, 882, 883, 884, 885, 886,
+ 858, 887, 888, 889, 890, 891, 892, 893, 894, 895,
+ 896, 880, 897, 899, 900, 901, 902, 903, 904, 905,
+ 898, 906, 907, 908, 909, 910, 911, 912, 913, 914,
+ 918, 916, 919, 920, 921, 922, 923, 915, 917, 924,
+ 925, 926, 914, 879, 928, 916, 930, 931, 932, 927,
+ 915, 881, 917, 933, 934, 926, 928, 935, 937, 938,
+ 939, 940, 941, 927, 942, 936, 944, 945, 881, 946,
+ 942, 948, 943, 949, 946, 950, 951, 947, 943, 951,
+ 953, 953, 947, 952, 955, 956, 952, 957, 957, 68,
+
+ 167, 816, 815, 814, 813, 958, 958, 812, 811, 810,
+ 809, 929, 808, 807, 806, 805, 804, 803, 802, 801,
+ 800, 799, 798, 929, 797, 796, 795, 794, 793, 792,
+ 791, 790, 789, 954, 954, 55, 55, 55, 55, 55,
+ 56, 56, 56, 56, 56, 84, 84, 84, 164, 164,
+ 164, 172, 172, 263, 788, 263, 263, 263, 673, 673,
+ 757, 757, 787, 786, 785, 782, 781, 780, 779, 778,
+ 777, 776, 775, 774, 773, 772, 771, 770, 769, 768,
+ 767, 766, 765, 764, 763, 762, 761, 760, 759, 758,
+ 756, 755, 751, 750, 749, 748, 747, 746, 745, 744,
+
+ 743, 742, 741, 740, 739, 738, 737, 736, 735, 731,
+ 730, 729, 728, 727, 726, 725, 724, 723, 722, 721,
+ 720, 719, 713, 712, 711, 710, 709, 708, 707, 706,
+ 705, 704, 703, 702, 701, 700, 699, 692, 691, 690,
+ 689, 688, 687, 686, 685, 684, 683, 682, 681, 680,
+ 679, 678, 677, 670, 669, 663, 662, 661, 660, 659,
+ 658, 657, 656, 655, 654, 653, 652, 651, 650, 649,
+ 648, 642, 641, 640, 639, 638, 637, 636, 635, 634,
+ 633, 632, 631, 630, 629, 628, 627, 621, 620, 619,
+ 618, 617, 616, 615, 614, 613, 612, 611, 610, 603,
+
+ 602, 601, 600, 599, 598, 597, 596, 595, 594, 593,
+ 592, 591, 590, 585, 584, 583, 582, 581, 580, 579,
+ 578, 577, 576, 575, 574, 573, 570, 569, 568, 567,
+ 566, 565, 564, 558, 557, 556, 555, 554, 553, 552,
+ 551, 550, 549, 548, 547, 546, 545, 544, 543, 542,
+ 541, 540, 539, 538, 537, 531, 530, 529, 528, 527,
+ 526, 525, 524, 523, 522, 521, 520, 519, 518, 517,
+ 516, 515, 514, 513, 512, 511, 510, 509, 508, 507,
+ 506, 505, 504, 503, 502, 501, 500, 499, 498, 497,
+ 496, 495, 494, 493, 492, 491, 490, 489, 479, 478,
+
+ 477, 476, 475, 469, 468, 467, 466, 465, 464, 463,
+ 462, 461, 460, 459, 458, 457, 456, 455, 454, 453,
+ 452, 451, 450, 449, 445, 444, 443, 442, 441, 440,
+ 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
+ 429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
+ 419, 418, 417, 416, 415, 414, 413, 412, 411, 410,
+ 406, 405, 404, 403, 402, 401, 400, 399, 395, 391,
+ 390, 389, 388, 387, 383, 382, 381, 380, 379, 378,
+ 377, 376, 375, 371, 370, 369, 368, 365, 364, 363,
+ 362, 361, 360, 359, 358, 354, 353, 352, 351, 350,
+
+ 347, 346, 345, 344, 343, 342, 341, 340, 339, 338,
+ 337, 336, 335, 334, 333, 332, 331, 328, 327, 326,
+ 325, 324, 323, 322, 321, 320, 319, 318, 314, 313,
+ 312, 311, 310, 309, 308, 307, 306, 305, 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,
- 835, 57, 57, 7, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835
+ 292, 291, 290, 289, 288, 287, 286, 283, 282, 281,
+ 280, 277, 276, 275, 274, 273, 272, 262, 261, 260,
+ 259, 258, 257, 254, 253, 252, 245, 244, 243, 242,
+ 241, 236, 235, 234, 233, 232, 228, 227, 223, 220,
+ 219, 218, 215, 214, 213, 207, 206, 205, 204, 203,
+
+ 202, 201, 200, 195, 194, 193, 192, 191, 190, 189,
+ 188, 184, 183, 182, 181, 180, 179, 176, 175, 174,
+ 173, 162, 125, 109, 81, 69, 63, 60, 59, 959,
+ 57, 57, 7, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+
+ 959, 959, 959
} ;
-static yyconst flex_int16_t yy_chk[1283] =
+static yyconst flex_int16_t yy_chk[1404] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -844,141 +898,155 @@ static yyconst flex_int16_t yy_chk[1283] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 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,
- 791, 9, 2, 3, 3, 3, 3, 3, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 9, 781, 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,
- 3, 13, 15, 792, 16, 17, 17, 17, 17, 17,
- 17, 17, 21, 21, 25, 15, 16, 26, 13, 19,
- 35, 19, 19, 19, 19, 19, 19, 19, 23, 23,
- 25, 36, 26, 26, 35, 36, 19, 19, 71, 30,
- 27, 30, 27, 28, 19, 19, 27, 28, 37, 39,
- 30, 758, 19, 19, 28, 143, 29, 28, 96, 96,
-
- 29, 33, 37, 71, 143, 39, 29, 19, 39, 33,
- 19, 20, 29, 20, 20, 20, 20, 20, 20, 20,
- 40, 33, 47, 31, 47, 794, 47, 46, 20, 20,
- 40, 31, 48, 48, 31, 106, 20, 31, 42, 34,
- 758, 42, 34, 31, 20, 20, 34, 34, 41, 106,
- 42, 34, 802, 43, 34, 41, 41, 42, 43, 20,
- 41, 50, 43, 50, 44, 43, 41, 41, 44, 41,
- 46, 58, 105, 58, 68, 68, 135, 48, 44, 120,
- 142, 142, 124, 105, 48, 70, 70, 120, 48, 124,
- 68, 68, 135, 48, 53, 53, 53, 53, 53, 53,
-
- 53, 70, 70, 72, 144, 72, 72, 72, 72, 72,
- 72, 72, 144, 148, 803, 126, 148, 804, 73, 73,
- 72, 72, 73, 73, 73, 73, 73, 73, 73, 126,
- 805, 116, 153, 153, 116, 116, 72, 72, 116, 152,
- 116, 152, 810, 152, 154, 154, 160, 811, 160, 162,
- 162, 162, 162, 162, 162, 162, 164, 164, 166, 166,
- 164, 164, 164, 164, 164, 164, 164, 169, 169, 169,
- 169, 169, 169, 169, 166, 166, 171, 153, 180, 184,
- 184, 215, 215, 215, 153, 241, 813, 504, 153, 154,
- 776, 505, 180, 153, 241, 814, 154, 504, 776, 171,
-
- 154, 505, 167, 167, 818, 154, 167, 167, 167, 167,
- 167, 167, 167, 170, 170, 170, 170, 170, 170, 170,
- 247, 247, 247, 268, 268, 268, 279, 279, 279, 170,
- 256, 256, 256, 256, 256, 256, 256, 257, 257, 257,
- 257, 257, 257, 257, 786, 170, 288, 288, 288, 822,
- 258, 258, 786, 257, 258, 258, 258, 258, 258, 258,
- 258, 260, 260, 260, 260, 260, 260, 260, 825, 257,
- 261, 261, 261, 261, 261, 261, 261, 292, 292, 292,
- 301, 301, 301, 338, 338, 338, 261, 350, 350, 350,
- 350, 350, 350, 350, 351, 351, 351, 351, 351, 351,
-
- 351, 795, 261, 382, 382, 382, 393, 393, 393, 795,
- 351, 394, 394, 394, 382, 382, 395, 395, 395, 443,
- 443, 443, 483, 483, 483, 490, 351, 830, 605, 831,
- 443, 443, 839, 483, 483, 519, 519, 519, 605, 490,
- 490, 490, 490, 490, 490, 490, 519, 519, 533, 533,
- 606, 621, 621, 796, 534, 534, 656, 656, 760, 606,
- 606, 796, 533, 533, 533, 533, 533, 533, 534, 534,
- 534, 534, 534, 534, 534, 554, 554, 554, 573, 573,
- 573, 576, 576, 690, 690, 581, 533, 554, 578, 578,
- 573, 775, 799, 840, 790, 576, 576, 576, 576, 576,
-
- 576, 576, 578, 578, 578, 578, 578, 578, 580, 580,
- 806, 533, 744, 760, 759, 808, 619, 619, 806, 744,
- 581, 759, 580, 580, 580, 580, 580, 580, 580, 581,
- 619, 619, 619, 619, 619, 619, 787, 798, 789, 788,
- 581, 620, 620, 787, 798, 809, 775, 799, 658, 658,
- 828, 785, 829, 809, 619, 620, 620, 620, 620, 620,
- 620, 620, 658, 658, 658, 658, 658, 658, 660, 660,
- 808, 826, 815, 819, 784, 783, 782, 781, 826, 619,
- 815, 819, 660, 660, 660, 660, 660, 660, 660, 820,
- 823, 828, 827, 829, 832, 833, 780, 820, 823, 827,
-
- 779, 778, 832, 833, 836, 836, 836, 836, 836, 837,
- 837, 837, 838, 838, 838, 841, 841, 842, 777, 842,
- 842, 842, 843, 843, 844, 844, 774, 771, 769, 768,
- 766, 763, 762, 761, 757, 756, 755, 754, 753, 752,
- 751, 750, 749, 748, 747, 746, 745, 743, 742, 741,
- 738, 735, 734, 733, 732, 731, 729, 728, 726, 724,
- 721, 720, 719, 717, 716, 714, 713, 712, 711, 710,
- 709, 708, 707, 706, 705, 704, 702, 701, 700, 699,
- 698, 697, 695, 694, 693, 692, 691, 689, 688, 687,
- 686, 685, 684, 683, 682, 681, 680, 679, 678, 677,
-
- 676, 675, 674, 673, 672, 670, 669, 668, 667, 666,
- 665, 664, 663, 662, 661, 654, 652, 651, 649, 648,
- 647, 646, 645, 644, 643, 642, 641, 640, 639, 638,
- 637, 635, 634, 633, 632, 631, 630, 629, 627, 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, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
- 835, 835
+ 3, 13, 15, 25, 16, 17, 17, 17, 17, 17,
+ 17, 17, 21, 21, 26, 15, 16, 3, 13, 23,
+ 23, 25, 27, 28, 27, 35, 37, 28, 27, 26,
+ 26, 30, 36, 30, 28, 148, 36, 28, 148, 35,
+ 37, 50, 30, 50, 3, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 33, 29, 89, 40, 31, 29, 89, 71, 33,
+ 39, 105, 29, 31, 40, 45, 31, 4, 29, 31,
+ 34, 33, 105, 34, 45, 31, 39, 34, 34, 39,
+
+ 120, 43, 34, 71, 46, 34, 43, 47, 120, 47,
+ 43, 47, 44, 43, 4, 19, 44, 19, 19, 19,
+ 19, 19, 19, 19, 106, 42, 44, 41, 42, 58,
+ 782, 58, 19, 19, 41, 41, 783, 42, 106, 41,
+ 124, 784, 19, 19, 42, 41, 41, 124, 41, 46,
+ 19, 19, 48, 48, 53, 53, 53, 53, 53, 53,
+ 53, 68, 68, 70, 70, 19, 785, 135, 19, 20,
+ 144, 20, 20, 20, 20, 20, 20, 20, 144, 68,
+ 68, 70, 70, 135, 73, 73, 20, 20, 73, 73,
+ 73, 73, 73, 73, 73, 96, 20, 136, 143, 48,
+
+ 96, 96, 142, 142, 20, 20, 48, 143, 786, 116,
+ 48, 136, 116, 116, 787, 48, 116, 126, 116, 20,
+ 72, 172, 72, 72, 72, 72, 72, 72, 72, 129,
+ 153, 126, 153, 126, 153, 154, 154, 72, 72, 187,
+ 187, 155, 155, 161, 172, 161, 129, 129, 163, 163,
+ 163, 163, 163, 163, 163, 72, 72, 165, 165, 167,
+ 167, 165, 165, 165, 165, 165, 165, 165, 170, 170,
+ 170, 170, 170, 170, 170, 248, 182, 167, 167, 218,
+ 218, 218, 154, 230, 248, 537, 789, 230, 155, 154,
+ 182, 538, 790, 154, 791, 155, 792, 537, 154, 155,
+
+ 793, 168, 168, 538, 155, 168, 168, 168, 168, 168,
+ 168, 168, 171, 171, 171, 171, 171, 171, 171, 254,
+ 254, 254, 277, 277, 277, 289, 289, 289, 171, 264,
+ 264, 264, 264, 264, 264, 264, 265, 265, 265, 265,
+ 265, 265, 265, 298, 298, 298, 171, 673, 673, 266,
+ 266, 794, 265, 266, 266, 266, 266, 266, 266, 266,
+ 268, 268, 268, 268, 268, 268, 268, 302, 302, 302,
+ 265, 269, 269, 269, 269, 269, 269, 269, 311, 311,
+ 311, 353, 353, 353, 411, 411, 411, 269, 366, 366,
+ 366, 366, 366, 366, 366, 367, 367, 367, 367, 367,
+
+ 367, 367, 400, 400, 400, 269, 412, 412, 412, 714,
+ 714, 367, 795, 400, 400, 413, 413, 413, 796, 469,
+ 469, 469, 513, 513, 513, 521, 653, 757, 757, 367,
+ 469, 469, 797, 513, 513, 555, 555, 555, 653, 521,
+ 521, 521, 521, 521, 521, 521, 555, 555, 746, 555,
+ 571, 571, 688, 800, 802, 804, 572, 572, 805, 806,
+ 746, 688, 807, 688, 571, 571, 571, 571, 571, 571,
+ 572, 572, 572, 572, 572, 572, 572, 594, 594, 594,
+ 618, 618, 618, 622, 622, 808, 809, 811, 594, 594,
+ 571, 618, 618, 624, 624, 627, 812, 622, 622, 622,
+
+ 622, 622, 622, 622, 626, 626, 813, 624, 624, 624,
+ 624, 624, 624, 814, 815, 571, 654, 816, 626, 626,
+ 626, 626, 626, 626, 626, 654, 709, 654, 654, 671,
+ 671, 819, 627, 820, 821, 709, 824, 709, 825, 672,
+ 672, 627, 826, 671, 671, 671, 671, 671, 671, 716,
+ 716, 827, 627, 672, 672, 672, 672, 672, 672, 672,
+ 718, 718, 828, 716, 716, 716, 716, 716, 716, 671,
+ 829, 830, 832, 833, 718, 718, 718, 718, 718, 718,
+ 718, 831, 834, 835, 836, 837, 840, 841, 831, 842,
+ 843, 844, 845, 846, 671, 847, 848, 849, 850, 851,
+
+ 852, 855, 856, 857, 858, 859, 860, 861, 864, 865,
+ 857, 866, 868, 869, 870, 872, 873, 874, 877, 878,
+ 879, 880, 881, 882, 883, 884, 885, 886, 887, 888,
+ 881, 890, 891, 892, 893, 894, 895, 896, 897, 898,
+ 900, 899, 901, 904, 905, 906, 907, 898, 899, 909,
+ 912, 913, 914, 856, 917, 916, 920, 921, 922, 913,
+ 914, 858, 916, 923, 925, 926, 928, 929, 930, 931,
+ 933, 934, 935, 926, 936, 929, 939, 940, 880, 941,
+ 942, 944, 936, 945, 946, 949, 950, 941, 942, 951,
+ 952, 953, 946, 950, 954, 955, 951, 956, 957, 964,
+
+ 965, 780, 779, 778, 777, 956, 957, 776, 775, 774,
+ 773, 917, 772, 771, 770, 769, 768, 767, 766, 765,
+ 764, 762, 761, 928, 760, 759, 758, 756, 755, 754,
+ 753, 752, 751, 952, 953, 960, 960, 960, 960, 960,
+ 961, 961, 961, 961, 961, 962, 962, 962, 963, 963,
+ 963, 966, 966, 967, 750, 967, 967, 967, 968, 968,
+ 969, 969, 749, 748, 747, 745, 744, 743, 742, 741,
+ 740, 739, 738, 737, 736, 735, 734, 733, 732, 731,
+ 729, 728, 727, 726, 725, 724, 723, 721, 720, 719,
+ 712, 711, 708, 706, 705, 704, 702, 701, 700, 699,
+
+ 698, 697, 696, 695, 694, 693, 692, 691, 690, 687,
+ 686, 685, 684, 683, 682, 680, 679, 678, 677, 676,
+ 675, 674, 670, 668, 667, 666, 665, 664, 663, 662,
+ 661, 660, 659, 658, 657, 656, 655, 649, 647, 646,
+ 645, 644, 643, 639, 638, 637, 636, 635, 634, 633,
+ 632, 631, 629, 621, 620, 616, 615, 613, 612, 610,
+ 609, 608, 607, 606, 605, 604, 603, 599, 598, 597,
+ 595, 593, 592, 591, 590, 589, 588, 587, 586, 585,
+ 584, 582, 581, 576, 575, 574, 573, 570, 569, 568,
+ 566, 565, 563, 562, 561, 560, 559, 557, 556, 554,
+
+ 553, 552, 551, 550, 549, 548, 547, 546, 544, 543,
+ 542, 541, 540, 536, 535, 534, 533, 532, 531, 528,
+ 527, 526, 525, 524, 523, 522, 520, 519, 518, 517,
+ 516, 515, 514, 512, 511, 508, 503, 502, 500, 499,
+ 498, 496, 495, 492, 491, 490, 489, 478, 477, 476,
+ 474, 473, 472, 471, 470, 467, 465, 464, 463, 461,
+ 460, 459, 458, 456, 455, 454, 453, 452, 450, 449,
+ 444, 443, 441, 440, 439, 438, 437, 436, 435, 434,
+ 433, 432, 431, 429, 428, 427, 426, 425, 424, 423,
+ 422, 420, 419, 418, 417, 416, 415, 414, 410, 406,
+
+ 405, 404, 401, 399, 389, 387, 383, 382, 381, 380,
+ 378, 377, 375, 370, 369, 368, 365, 364, 363, 362,
+ 361, 360, 359, 354, 352, 351, 350, 349, 348, 346,
+ 345, 342, 341, 340, 339, 338, 337, 336, 335, 334,
+ 333, 332, 331, 330, 329, 328, 327, 326, 325, 324,
+ 323, 322, 321, 320, 319, 318, 317, 316, 315, 312,
+ 310, 309, 308, 307, 306, 305, 304, 303, 301, 297,
+ 295, 294, 293, 292, 288, 287, 286, 285, 284, 283,
+ 282, 281, 280, 276, 274, 273, 272, 262, 261, 260,
+ 259, 258, 257, 256, 255, 253, 252, 251, 250, 249,
+
+ 247, 246, 245, 244, 243, 242, 241, 240, 239, 238,
+ 237, 236, 235, 234, 233, 232, 231, 229, 228, 227,
+ 226, 225, 224, 223, 222, 221, 220, 219, 217, 216,
+ 215, 214, 213, 212, 211, 210, 209, 208, 207, 206,
+ 205, 204, 203, 202, 201, 199, 198, 197, 196, 195,
+ 194, 193, 192, 191, 190, 189, 188, 186, 185, 184,
+ 183, 181, 180, 179, 178, 177, 175, 160, 159, 158,
+ 157, 150, 149, 147, 146, 145, 141, 140, 139, 138,
+ 137, 134, 133, 132, 131, 130, 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, 88, 87, 83,
+ 79, 52, 38, 32, 22, 18, 14, 12, 11, 7,
+ 6, 5, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959, 959, 959,
+
+ 959, 959, 959
} ;
/* The intent behind this definition is that it'll catch
@@ -1013,6 +1081,7 @@ static yyconst flex_int16_t yy_chk[1283] =
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
+#include <limits.h>
#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
@@ -1034,26 +1103,38 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
#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.
+ * This may happen at different times in desktop GLSL and GLSL ES.
*
* For example, consider the following lexer rule:
- * samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER)
+ * samplerBuffer KEYWORD(130, 0, 140, 0, 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
+ * - an identifier ...in GLSL < 1.30 or GLSL ES
+ */
+#define KEYWORD(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, token) \
+ KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, false, token)
+
+/**
+ * Like the KEYWORD macro, but the word is also treated as a keyword
+ * if the given boolean expression is true.
*/
-#define KEYWORD(reserved_version, allowed_version, token) \
+#define KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, \
+ alt_expr, token) \
do { \
- if (yyextra->language_version >= allowed_version) { \
+ if (yyextra->is_version(allowed_glsl, allowed_glsl_es) \
+ || (alt_expr)) { \
return token; \
- } else if (yyextra->language_version >= reserved_version) { \
+ } else if (yyextra->is_version(reserved_glsl, \
+ reserved_glsl_es)) { \
_mesa_glsl_error(yylloc, yyextra, \
"Illegal use of reserved word `%s'", yytext); \
return ERROR_TOK; \
@@ -1063,22 +1144,80 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
} \
} 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.
+/**
+ * A macro for handling keywords that have been present in GLSL since
+ * its origin, but were changed into reserved words in GLSL 3.00 ES.
*/
-#define ES yyextra->es_shader
+#define DEPRECATED_ES_KEYWORD(token) \
+ do { \
+ if (yyextra->is_version(0, 300)) { \
+ _mesa_glsl_error(yylloc, yyextra, \
+ "Illegal use of reserved word `%s'", yytext); \
+ return ERROR_TOK; \
+ } else { \
+ return token; \
+ } \
+ } while (0)
+
+static int
+literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
+ YYSTYPE *lval, YYLTYPE *lloc, int base)
+{
+ bool is_uint = (text[len - 1] == 'u' ||
+ text[len - 1] == 'U');
+ const char *digits = text;
+
+ /* Skip "0x" */
+ if (base == 16)
+ digits += 2;
+
+#ifdef _MSC_VER
+ unsigned __int64 value = _strtoui64(digits, NULL, base);
+#else
+ unsigned long long value = strtoull(digits, NULL, base);
+#endif
+
+ lval->n = (int)value;
+
+ if (value > UINT_MAX) {
+ /* Note that signed 0xffffffff is valid, not out of range! */
+ if (state->is_version(130, 300)) {
+ _mesa_glsl_error(lloc, state,
+ "Literal value `%s' out of range", text);
+ } else {
+ _mesa_glsl_warning(lloc, state,
+ "Literal value `%s' out of range", text);
+ }
+ } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) {
+ /* Tries to catch unintentionally providing a negative value.
+ * Note that -2147483648 is parsed as -(2147483648), so we don't
+ * want to warn for INT_MAX.
+ */
+ _mesa_glsl_warning(lloc, state,
+ "Signed literal value `%s' is interpreted as %d",
+ text, lval->n);
+ }
+ return is_uint ? UINTCONSTANT : INTCONSTANT;
+}
+
+#define LITERAL_INTEGER(base) \
+ literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
+
-#line 1077 "glsl_lexer.cpp"
+#line 1208 "glsl_lexer.cpp"
#define INITIAL 0
#define PP 1
#define PRAGMA 2
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
#define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
/* Holds the entire state of the reentrant scanner. */
@@ -1094,8 +1233,8 @@ struct yyguts_t
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;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -1127,46 +1266,50 @@ static int yy_init_globals (yyscan_t yyscanner );
# define yylloc yyg->yylloc_r
-int _mesa_glsl_lex_init (yyscan_t* scanner);
+int _mesa_glsl_lexer_lex_init (yyscan_t* scanner);
-int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int _mesa_glsl_lexer_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_lexer_lex_destroy (yyscan_t yyscanner );
+
+int _mesa_glsl_lexer_get_debug (yyscan_t yyscanner );
-int _mesa_glsl_get_debug (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_debug (int debug_flag ,yyscan_t yyscanner );
-void _mesa_glsl_set_debug (int debug_flag ,yyscan_t yyscanner );
+YY_EXTRA_TYPE _mesa_glsl_lexer_get_extra (yyscan_t yyscanner );
-YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+FILE *_mesa_glsl_lexer_get_in (yyscan_t yyscanner );
-FILE *_mesa_glsl_get_in (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_in (FILE * in_str ,yyscan_t yyscanner );
-void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner );
+FILE *_mesa_glsl_lexer_get_out (yyscan_t yyscanner );
-FILE *_mesa_glsl_get_out (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_out (FILE * out_str ,yyscan_t yyscanner );
-void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner );
+yy_size_t _mesa_glsl_lexer_get_leng (yyscan_t yyscanner );
-int _mesa_glsl_get_leng (yyscan_t yyscanner );
+char *_mesa_glsl_lexer_get_text (yyscan_t yyscanner );
-char *_mesa_glsl_get_text (yyscan_t yyscanner );
+int _mesa_glsl_lexer_get_lineno (yyscan_t yyscanner );
-int _mesa_glsl_get_lineno (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_lineno (int line_number ,yyscan_t yyscanner );
-void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner );
+int _mesa_glsl_lexer_get_column (yyscan_t yyscanner );
-YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_column (int column_no ,yyscan_t yyscanner );
-void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+YYSTYPE * _mesa_glsl_lexer_get_lval (yyscan_t yyscanner );
- YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner );
+void _mesa_glsl_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+
+ YYLTYPE *_mesa_glsl_lexer_get_lloc (yyscan_t yyscanner );
- void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
+ void _mesa_glsl_lexer_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1174,9 +1317,9 @@ void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner );
+extern "C" int _mesa_glsl_lexer_wrap (yyscan_t yyscanner );
#else
-extern int _mesa_glsl_wrap (yyscan_t yyscanner );
+extern int _mesa_glsl_lexer_wrap (yyscan_t yyscanner );
#endif
#endif
@@ -1208,7 +1351,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#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,
@@ -1219,7 +1362,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1273,10 +1416,10 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int _mesa_glsl_lex \
+extern int _mesa_glsl_lexer_lex \
(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-#define YY_DECL int _mesa_glsl_lex \
+#define YY_DECL int _mesa_glsl_lexer_lex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
@@ -1307,10 +1450,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 101 "glsl_lexer.ll"
+#line 164 "glsl_lexer.ll"
-#line 1314 "glsl_lexer.cpp"
+#line 1457 "glsl_lexer.cpp"
yylval = yylval_param;
@@ -1334,12 +1477,12 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- _mesa_glsl_ensure_buffer_stack (yyscanner);
+ _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
- _mesa_glsl__load_buffer_state(yyscanner );
+ _mesa_glsl_lexer__load_buffer_state(yyscanner );
}
while ( 1 ) /* loops until end-of-file is reached */
@@ -1368,13 +1511,13 @@ yy_match:
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 >= 836 )
+ if ( yy_current_state >= 960 )
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 != 835 );
+ while ( yy_current_state != 959 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
@@ -1396,7 +1539,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 103 "glsl_lexer.ll"
+#line 166 "glsl_lexer.ll"
;
YY_BREAK
/* Preprocessor tokens. */
@@ -1405,17 +1548,17 @@ case 2:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 106 "glsl_lexer.ll"
+#line 169 "glsl_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 107 "glsl_lexer.ll"
-{ BEGIN PP; return VERSION; }
+#line 170 "glsl_lexer.ll"
+{ BEGIN PP; return VERSION_TOK; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 108 "glsl_lexer.ll"
+#line 171 "glsl_lexer.ll"
{ BEGIN PP; return EXTENSION; }
YY_BREAK
case 5:
@@ -1423,7 +1566,7 @@ case 5:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 109 "glsl_lexer.ll"
+#line 172 "glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1445,7 +1588,7 @@ case 6:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 124 "glsl_lexer.ll"
+#line 187 "glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1463,7 +1606,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 138 "glsl_lexer.ll"
+#line 201 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_ON;
@@ -1471,7 +1614,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 142 "glsl_lexer.ll"
+#line 205 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_OFF;
@@ -1479,7 +1622,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 146 "glsl_lexer.ll"
+#line 209 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_ON;
@@ -1487,7 +1630,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 150 "glsl_lexer.ll"
+#line 213 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_OFF;
@@ -1495,7 +1638,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 154 "glsl_lexer.ll"
+#line 217 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_INVARIANT_ALL;
@@ -1503,38 +1646,38 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 158 "glsl_lexer.ll"
+#line 221 "glsl_lexer.ll"
{ BEGIN PRAGMA; }
YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 160 "glsl_lexer.ll"
+#line 223 "glsl_lexer.ll"
{ BEGIN 0; yylineno++; yycolumn = 0; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 161 "glsl_lexer.ll"
+#line 224 "glsl_lexer.ll"
{ }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 163 "glsl_lexer.ll"
+#line 226 "glsl_lexer.ll"
{ }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 164 "glsl_lexer.ll"
+#line 227 "glsl_lexer.ll"
{ }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 165 "glsl_lexer.ll"
+#line 228 "glsl_lexer.ll"
return COLON;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 166 "glsl_lexer.ll"
+#line 229 "glsl_lexer.ll"
{
yylval->identifier = strdup(yytext);
return IDENTIFIER;
@@ -1542,7 +1685,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 170 "glsl_lexer.ll"
+#line 233 "glsl_lexer.ll"
{
yylval->n = strtol(yytext, NULL, 10);
return INTCONSTANT;
@@ -1551,991 +1694,1121 @@ YY_RULE_SETUP
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 174 "glsl_lexer.ll"
+#line 237 "glsl_lexer.ll"
{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 176 "glsl_lexer.ll"
+#line 239 "glsl_lexer.ll"
{ yylineno++; yycolumn = 0; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 178 "glsl_lexer.ll"
-return ATTRIBUTE;
+#line 241 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(ATTRIBUTE);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 179 "glsl_lexer.ll"
+#line 242 "glsl_lexer.ll"
return CONST_TOK;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 180 "glsl_lexer.ll"
+#line 243 "glsl_lexer.ll"
return BOOL_TOK;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 181 "glsl_lexer.ll"
+#line 244 "glsl_lexer.ll"
return FLOAT_TOK;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 182 "glsl_lexer.ll"
+#line 245 "glsl_lexer.ll"
return INT_TOK;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 183 "glsl_lexer.ll"
-KEYWORD(130, 130, UINT_TOK);
+#line 246 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, UINT_TOK);
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 185 "glsl_lexer.ll"
+#line 248 "glsl_lexer.ll"
return BREAK;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 186 "glsl_lexer.ll"
+#line 249 "glsl_lexer.ll"
return CONTINUE;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 187 "glsl_lexer.ll"
+#line 250 "glsl_lexer.ll"
return DO;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 188 "glsl_lexer.ll"
+#line 251 "glsl_lexer.ll"
return WHILE;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 189 "glsl_lexer.ll"
+#line 252 "glsl_lexer.ll"
return ELSE;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 190 "glsl_lexer.ll"
+#line 253 "glsl_lexer.ll"
return FOR;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 191 "glsl_lexer.ll"
+#line 254 "glsl_lexer.ll"
return IF;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 192 "glsl_lexer.ll"
+#line 255 "glsl_lexer.ll"
return DISCARD;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 193 "glsl_lexer.ll"
+#line 256 "glsl_lexer.ll"
return RETURN;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 195 "glsl_lexer.ll"
+#line 258 "glsl_lexer.ll"
return BVEC2;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 196 "glsl_lexer.ll"
+#line 259 "glsl_lexer.ll"
return BVEC3;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 197 "glsl_lexer.ll"
+#line 260 "glsl_lexer.ll"
return BVEC4;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 198 "glsl_lexer.ll"
+#line 261 "glsl_lexer.ll"
return IVEC2;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 199 "glsl_lexer.ll"
+#line 262 "glsl_lexer.ll"
return IVEC3;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 200 "glsl_lexer.ll"
+#line 263 "glsl_lexer.ll"
return IVEC4;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 201 "glsl_lexer.ll"
-KEYWORD(130, 130, UVEC2);
+#line 264 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, UVEC2);
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 202 "glsl_lexer.ll"
-KEYWORD(130, 130, UVEC3);
+#line 265 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, UVEC3);
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 203 "glsl_lexer.ll"
-KEYWORD(130, 130, UVEC4);
+#line 266 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, UVEC4);
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 204 "glsl_lexer.ll"
+#line 267 "glsl_lexer.ll"
return VEC2;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 205 "glsl_lexer.ll"
+#line 268 "glsl_lexer.ll"
return VEC3;
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 206 "glsl_lexer.ll"
+#line 269 "glsl_lexer.ll"
return VEC4;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 207 "glsl_lexer.ll"
+#line 270 "glsl_lexer.ll"
return MAT2X2;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 208 "glsl_lexer.ll"
+#line 271 "glsl_lexer.ll"
return MAT3X3;
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 209 "glsl_lexer.ll"
+#line 272 "glsl_lexer.ll"
return MAT4X4;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 210 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT2X2);
+#line 273 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT2X2);
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 211 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT2X3);
+#line 274 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT2X3);
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 212 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT2X4);
+#line 275 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT2X4);
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 213 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT3X2);
+#line 276 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT3X2);
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 214 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT3X3);
+#line 277 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT3X3);
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 215 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT3X4);
+#line 278 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT3X4);
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 216 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT4X2);
+#line 279 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT4X2);
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 217 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT4X3);
+#line 280 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT4X3);
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 218 "glsl_lexer.ll"
-KEYWORD(120, 120, MAT4X4);
+#line 281 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, MAT4X4);
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 220 "glsl_lexer.ll"
+#line 283 "glsl_lexer.ll"
return IN_TOK;
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 221 "glsl_lexer.ll"
+#line 284 "glsl_lexer.ll"
return OUT_TOK;
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 222 "glsl_lexer.ll"
+#line 285 "glsl_lexer.ll"
return INOUT_TOK;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 223 "glsl_lexer.ll"
+#line 286 "glsl_lexer.ll"
return UNIFORM;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 224 "glsl_lexer.ll"
-return VARYING;
+#line 287 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(VARYING);
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 225 "glsl_lexer.ll"
-KEYWORD(120, 120, CENTROID);
+#line 288 "glsl_lexer.ll"
+KEYWORD(120, 300, 120, 300, CENTROID);
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 226 "glsl_lexer.ll"
-KEYWORD(120 || ES, 120 || ES, INVARIANT);
+#line 289 "glsl_lexer.ll"
+KEYWORD(120, 100, 120, 100, INVARIANT);
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 227 "glsl_lexer.ll"
-KEYWORD(130 || ES, 130, FLAT);
+#line 290 "glsl_lexer.ll"
+KEYWORD(130, 100, 130, 300, FLAT);
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 228 "glsl_lexer.ll"
-KEYWORD(130, 130, SMOOTH);
+#line 291 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, SMOOTH);
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 229 "glsl_lexer.ll"
-KEYWORD(130, 130, NOPERSPECTIVE);
+#line 292 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, NOPERSPECTIVE);
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 231 "glsl_lexer.ll"
-return SAMPLER1D;
+#line 294 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(SAMPLER1D);
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 232 "glsl_lexer.ll"
+#line 295 "glsl_lexer.ll"
return SAMPLER2D;
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 233 "glsl_lexer.ll"
+#line 296 "glsl_lexer.ll"
return SAMPLER3D;
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 234 "glsl_lexer.ll"
+#line 297 "glsl_lexer.ll"
return SAMPLERCUBE;
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 235 "glsl_lexer.ll"
-KEYWORD(130, 130, SAMPLER1DARRAY);
+#line 298 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, SAMPLER1DARRAY);
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 236 "glsl_lexer.ll"
-KEYWORD(130, 130, SAMPLER2DARRAY);
+#line 299 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, SAMPLER2DARRAY);
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 237 "glsl_lexer.ll"
-return SAMPLER1DSHADOW;
+#line 300 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(SAMPLER1DSHADOW);
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 238 "glsl_lexer.ll"
+#line 301 "glsl_lexer.ll"
return SAMPLER2DSHADOW;
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 239 "glsl_lexer.ll"
-KEYWORD(130, 130, SAMPLERCUBESHADOW);
+#line 302 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, SAMPLERCUBESHADOW);
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 240 "glsl_lexer.ll"
-KEYWORD(130, 130, SAMPLER1DARRAYSHADOW);
+#line 303 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, SAMPLER1DARRAYSHADOW);
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 241 "glsl_lexer.ll"
-KEYWORD(130, 130, SAMPLER2DARRAYSHADOW);
+#line 304 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, SAMPLER2DARRAYSHADOW);
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 242 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLER1D);
+#line 305 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, ISAMPLER1D);
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 243 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLER2D);
+#line 306 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, ISAMPLER2D);
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 244 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLER3D);
+#line 307 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, ISAMPLER3D);
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 245 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLERCUBE);
+#line 308 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, ISAMPLERCUBE);
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 246 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLER1DARRAY);
+#line 309 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, ISAMPLER1DARRAY);
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 247 "glsl_lexer.ll"
-KEYWORD(130, 130, ISAMPLER2DARRAY);
+#line 310 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, ISAMPLER2DARRAY);
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 248 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLER1D);
+#line 311 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, USAMPLER1D);
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 249 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLER2D);
+#line 312 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, USAMPLER2D);
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 250 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLER3D);
+#line 313 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, USAMPLER3D);
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 251 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLERCUBE);
+#line 314 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, USAMPLERCUBE);
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 252 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLER1DARRAY);
+#line 315 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY);
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 253 "glsl_lexer.ll"
-KEYWORD(130, 130, USAMPLER2DARRAY);
+#line 316 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
YY_BREAK
+/* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
+/* these are reserved but not defined in GLSL 3.00 */
case 94:
YY_RULE_SETUP
-#line 256 "glsl_lexer.ll"
-return STRUCT;
+#line 320 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 257 "glsl_lexer.ll"
-return VOID_TOK;
+#line 321 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 259 "glsl_lexer.ll"
-{
- if ((yyextra->language_version >= 140)
- || yyextra->AMD_conservative_depth_enable
- || yyextra->ARB_explicit_attrib_location_enable
- || yyextra->ARB_fragment_coord_conventions_enable) {
- return LAYOUT_TOK;
- } else {
- yylval->identifier = strdup(yytext);
- return IDENTIFIER;
- }
- }
+#line 322 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS);
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 271 "glsl_lexer.ll"
-return INC_OP;
+#line 323 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY);
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 272 "glsl_lexer.ll"
-return DEC_OP;
+#line 324 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY);
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 273 "glsl_lexer.ll"
-return LE_OP;
+#line 325 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
YY_BREAK
+/* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
case 100:
YY_RULE_SETUP
-#line 274 "glsl_lexer.ll"
-return GE_OP;
+#line 328 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 275 "glsl_lexer.ll"
-return EQ_OP;
+#line 329 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 276 "glsl_lexer.ll"
-return NE_OP;
+#line 330 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 277 "glsl_lexer.ll"
-return AND_OP;
+#line 331 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 278 "glsl_lexer.ll"
-return OR_OP;
+#line 333 "glsl_lexer.ll"
+{
+ if (yyextra->OES_EGL_image_external_enable)
+ return SAMPLEREXTERNALOES;
+ else
+ return IDENTIFIER;
+ }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 279 "glsl_lexer.ll"
-return XOR_OP;
+#line 341 "glsl_lexer.ll"
+return STRUCT;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 280 "glsl_lexer.ll"
-return LEFT_OP;
+#line 342 "glsl_lexer.ll"
+return VOID_TOK;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 281 "glsl_lexer.ll"
-return RIGHT_OP;
+#line 344 "glsl_lexer.ll"
+{
+ if ((yyextra->is_version(140, 300))
+ || yyextra->AMD_conservative_depth_enable
+ || yyextra->ARB_conservative_depth_enable
+ || yyextra->ARB_explicit_attrib_location_enable
+ || yyextra->ARB_uniform_buffer_object_enable
+ || yyextra->ARB_fragment_coord_conventions_enable
+ || yyextra->ARB_shading_language_420pack_enable) {
+ return LAYOUT_TOK;
+ } else {
+ yylval->identifier = strdup(yytext);
+ return classify_identifier(yyextra, yytext);
+ }
+ }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 283 "glsl_lexer.ll"
-return MUL_ASSIGN;
+#line 359 "glsl_lexer.ll"
+return INC_OP;
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 284 "glsl_lexer.ll"
-return DIV_ASSIGN;
+#line 360 "glsl_lexer.ll"
+return DEC_OP;
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 285 "glsl_lexer.ll"
-return ADD_ASSIGN;
+#line 361 "glsl_lexer.ll"
+return LE_OP;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 286 "glsl_lexer.ll"
-return MOD_ASSIGN;
+#line 362 "glsl_lexer.ll"
+return GE_OP;
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 287 "glsl_lexer.ll"
-return LEFT_ASSIGN;
+#line 363 "glsl_lexer.ll"
+return EQ_OP;
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 288 "glsl_lexer.ll"
-return RIGHT_ASSIGN;
+#line 364 "glsl_lexer.ll"
+return NE_OP;
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 289 "glsl_lexer.ll"
-return AND_ASSIGN;
+#line 365 "glsl_lexer.ll"
+return AND_OP;
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 290 "glsl_lexer.ll"
-return XOR_ASSIGN;
+#line 366 "glsl_lexer.ll"
+return OR_OP;
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 291 "glsl_lexer.ll"
-return OR_ASSIGN;
+#line 367 "glsl_lexer.ll"
+return XOR_OP;
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 292 "glsl_lexer.ll"
-return SUB_ASSIGN;
+#line 368 "glsl_lexer.ll"
+return LEFT_OP;
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 294 "glsl_lexer.ll"
-{
- yylval->n = strtol(yytext, NULL, 10);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
- }
+#line 369 "glsl_lexer.ll"
+return RIGHT_OP;
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 298 "glsl_lexer.ll"
-{
- yylval->n = strtol(yytext + 2, NULL, 16);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
- }
+#line 371 "glsl_lexer.ll"
+return MUL_ASSIGN;
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 302 "glsl_lexer.ll"
-{
- yylval->n = strtol(yytext, NULL, 8);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
- }
+#line 372 "glsl_lexer.ll"
+return DIV_ASSIGN;
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 307 "glsl_lexer.ll"
-{
- yylval->real = glsl_strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
+#line 373 "glsl_lexer.ll"
+return ADD_ASSIGN;
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 311 "glsl_lexer.ll"
-{
- yylval->real = glsl_strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
+#line 374 "glsl_lexer.ll"
+return MOD_ASSIGN;
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 315 "glsl_lexer.ll"
-{
- yylval->real = glsl_strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
+#line 375 "glsl_lexer.ll"
+return LEFT_ASSIGN;
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 319 "glsl_lexer.ll"
-{
- yylval->real = glsl_strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
+#line 376 "glsl_lexer.ll"
+return RIGHT_ASSIGN;
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 323 "glsl_lexer.ll"
-{
- yylval->real = glsl_strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
+#line 377 "glsl_lexer.ll"
+return AND_ASSIGN;
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 328 "glsl_lexer.ll"
-{
- yylval->n = 1;
- return BOOLCONSTANT;
- }
+#line 378 "glsl_lexer.ll"
+return XOR_ASSIGN;
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 332 "glsl_lexer.ll"
-{
- yylval->n = 0;
- return BOOLCONSTANT;
- }
+#line 379 "glsl_lexer.ll"
+return OR_ASSIGN;
YY_BREAK
-/* Reserved words in GLSL 1.10. */
case 128:
YY_RULE_SETUP
-#line 339 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, ASM);
+#line 380 "glsl_lexer.ll"
+return SUB_ASSIGN;
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 340 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, CLASS);
+#line 382 "glsl_lexer.ll"
+{
+ return LITERAL_INTEGER(10);
+ }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 341 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, UNION);
+#line 385 "glsl_lexer.ll"
+{
+ return LITERAL_INTEGER(16);
+ }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 342 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, ENUM);
+#line 388 "glsl_lexer.ll"
+{
+ return LITERAL_INTEGER(8);
+ }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 343 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, TYPEDEF);
+#line 392 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtof(yytext, NULL);
+ return FLOATCONSTANT;
+ }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 344 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, TEMPLATE);
+#line 396 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtof(yytext, NULL);
+ return FLOATCONSTANT;
+ }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 345 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, THIS);
+#line 400 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtof(yytext, NULL);
+ return FLOATCONSTANT;
+ }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 346 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, PACKED_TOK);
+#line 404 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtof(yytext, NULL);
+ return FLOATCONSTANT;
+ }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 347 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, GOTO);
+#line 408 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtof(yytext, NULL);
+ return FLOATCONSTANT;
+ }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 348 "glsl_lexer.ll"
-KEYWORD(110 || ES, 130, SWITCH);
+#line 413 "glsl_lexer.ll"
+{
+ yylval->n = 1;
+ return BOOLCONSTANT;
+ }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 349 "glsl_lexer.ll"
-KEYWORD(110 || ES, 130, DEFAULT);
+#line 417 "glsl_lexer.ll"
+{
+ yylval->n = 0;
+ return BOOLCONSTANT;
+ }
YY_BREAK
+/* Reserved words in GLSL 1.10. */
case 139:
YY_RULE_SETUP
-#line 350 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, INLINE_TOK);
+#line 424 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, ASM);
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 351 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, NOINLINE);
+#line 425 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, CLASS);
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 352 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, VOLATILE);
+#line 426 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, UNION);
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 353 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, PUBLIC_TOK);
+#line 427 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, ENUM);
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 354 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, STATIC);
+#line 428 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, TYPEDEF);
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 355 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, EXTERN);
+#line 429 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, TEMPLATE);
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 356 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, EXTERNAL);
+#line 430 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, THIS);
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 357 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, INTERFACE);
+#line 431 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 358 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, LONG_TOK);
+#line 432 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, GOTO);
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 359 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, SHORT_TOK);
+#line 433 "glsl_lexer.ll"
+KEYWORD(110, 100, 130, 300, SWITCH);
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 360 "glsl_lexer.ll"
-KEYWORD(110 || ES, 400, DOUBLE_TOK);
+#line 434 "glsl_lexer.ll"
+KEYWORD(110, 100, 130, 300, DEFAULT);
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 361 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, HALF);
+#line 435 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, INLINE_TOK);
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 362 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, FIXED_TOK);
+#line 436 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, NOINLINE);
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 363 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, UNSIGNED);
+#line 437 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, VOLATILE);
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 364 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, INPUT_TOK);
+#line 438 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 365 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, OUTPUT);
+#line 439 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, STATIC);
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 366 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, HVEC2);
+#line 440 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, EXTERN);
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 367 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, HVEC3);
+#line 441 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, EXTERNAL);
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 368 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, HVEC4);
+#line 442 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, INTERFACE);
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 369 "glsl_lexer.ll"
-KEYWORD(110 || ES, 400, DVEC2);
+#line 443 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, LONG_TOK);
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 370 "glsl_lexer.ll"
-KEYWORD(110 || ES, 400, DVEC3);
+#line 444 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, SHORT_TOK);
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 371 "glsl_lexer.ll"
-KEYWORD(110 || ES, 400, DVEC4);
+#line 445 "glsl_lexer.ll"
+KEYWORD(110, 100, 400, 0, DOUBLE_TOK);
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 372 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, FVEC2);
+#line 446 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, HALF);
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 373 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, FVEC3);
+#line 447 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, FIXED_TOK);
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 374 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, FVEC4);
+#line 448 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, UNSIGNED);
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 375 "glsl_lexer.ll"
-return SAMPLER2DRECT;
+#line 449 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, INPUT_TOK);
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 376 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, SAMPLER3DRECT);
+#line 450 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, OUTPUT);
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 377 "glsl_lexer.ll"
-return SAMPLER2DRECTSHADOW;
+#line 451 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, HVEC2);
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 378 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, SIZEOF);
+#line 452 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, HVEC3);
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 379 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, CAST);
+#line 453 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, HVEC4);
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 380 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, NAMESPACE);
+#line 454 "glsl_lexer.ll"
+KEYWORD(110, 100, 400, 0, DVEC2);
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 381 "glsl_lexer.ll"
-KEYWORD(110 || ES, 999, USING);
+#line 455 "glsl_lexer.ll"
+KEYWORD(110, 100, 400, 0, DVEC3);
YY_BREAK
-/* Additional reserved words in GLSL 1.20. */
case 171:
YY_RULE_SETUP
-#line 384 "glsl_lexer.ll"
-KEYWORD(120, 130 || ES, LOWP);
+#line 456 "glsl_lexer.ll"
+KEYWORD(110, 100, 400, 0, DVEC4);
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 385 "glsl_lexer.ll"
-KEYWORD(120, 130 || ES, MEDIUMP);
+#line 457 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, FVEC2);
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 386 "glsl_lexer.ll"
-KEYWORD(120, 130 || ES, HIGHP);
+#line 458 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, FVEC3);
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 387 "glsl_lexer.ll"
-KEYWORD(120, 130 || ES, PRECISION);
+#line 459 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, FVEC4);
YY_BREAK
-/* Additional reserved words in GLSL 1.30. */
case 175:
YY_RULE_SETUP
-#line 390 "glsl_lexer.ll"
-KEYWORD(130, 130, CASE);
+#line 460 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(SAMPLER2DRECT);
YY_BREAK
case 176:
YY_RULE_SETUP
-#line 391 "glsl_lexer.ll"
-KEYWORD(130, 999, COMMON);
+#line 461 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
YY_BREAK
case 177:
YY_RULE_SETUP
-#line 392 "glsl_lexer.ll"
-KEYWORD(130, 999, PARTITION);
+#line 462 "glsl_lexer.ll"
+DEPRECATED_ES_KEYWORD(SAMPLER2DRECTSHADOW);
YY_BREAK
case 178:
YY_RULE_SETUP
-#line 393 "glsl_lexer.ll"
-KEYWORD(130, 999, ACTIVE);
+#line 463 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, SIZEOF);
YY_BREAK
case 179:
YY_RULE_SETUP
-#line 394 "glsl_lexer.ll"
-KEYWORD(130 || ES, 999, SUPERP);
+#line 464 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, CAST);
YY_BREAK
case 180:
YY_RULE_SETUP
-#line 395 "glsl_lexer.ll"
-KEYWORD(130, 140, SAMPLERBUFFER);
+#line 465 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, NAMESPACE);
YY_BREAK
case 181:
YY_RULE_SETUP
-#line 396 "glsl_lexer.ll"
-KEYWORD(130, 999, FILTER);
+#line 466 "glsl_lexer.ll"
+KEYWORD(110, 100, 0, 0, USING);
YY_BREAK
+/* Additional reserved words in GLSL 1.20. */
case 182:
YY_RULE_SETUP
-#line 397 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE1D);
+#line 469 "glsl_lexer.ll"
+KEYWORD(120, 100, 130, 100, LOWP);
YY_BREAK
case 183:
YY_RULE_SETUP
-#line 398 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE2D);
+#line 470 "glsl_lexer.ll"
+KEYWORD(120, 100, 130, 100, MEDIUMP);
YY_BREAK
case 184:
YY_RULE_SETUP
-#line 399 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE3D);
+#line 471 "glsl_lexer.ll"
+KEYWORD(120, 100, 130, 100, HIGHP);
YY_BREAK
case 185:
YY_RULE_SETUP
-#line 400 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGECUBE);
+#line 472 "glsl_lexer.ll"
+KEYWORD(120, 100, 130, 100, PRECISION);
YY_BREAK
+/* Additional reserved words in GLSL 1.30. */
case 186:
YY_RULE_SETUP
-#line 401 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGE1D);
+#line 475 "glsl_lexer.ll"
+KEYWORD(130, 300, 130, 300, CASE);
YY_BREAK
case 187:
YY_RULE_SETUP
-#line 402 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGE2D);
+#line 476 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, COMMON);
YY_BREAK
case 188:
YY_RULE_SETUP
-#line 403 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGE3D);
+#line 477 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, PARTITION);
YY_BREAK
case 189:
YY_RULE_SETUP
-#line 404 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGECUBE);
+#line 478 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, ACTIVE);
YY_BREAK
case 190:
YY_RULE_SETUP
-#line 405 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGE1D);
+#line 479 "glsl_lexer.ll"
+KEYWORD(130, 100, 0, 0, SUPERP);
YY_BREAK
case 191:
YY_RULE_SETUP
-#line 406 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGE2D);
+#line 480 "glsl_lexer.ll"
+KEYWORD(130, 300, 140, 0, SAMPLERBUFFER);
YY_BREAK
case 192:
YY_RULE_SETUP
-#line 407 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGE3D);
+#line 481 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, FILTER);
YY_BREAK
case 193:
YY_RULE_SETUP
-#line 408 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGECUBE);
+#line 482 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE1D);
YY_BREAK
case 194:
YY_RULE_SETUP
-#line 409 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE1DARRAY);
+#line 483 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE2D);
YY_BREAK
case 195:
YY_RULE_SETUP
-#line 410 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE2DARRAY);
+#line 484 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE3D);
YY_BREAK
case 196:
YY_RULE_SETUP
-#line 411 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGE1DARRAY);
+#line 485 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGECUBE);
YY_BREAK
case 197:
YY_RULE_SETUP
-#line 412 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGE2DARRAY);
+#line 486 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGE1D);
YY_BREAK
case 198:
YY_RULE_SETUP
-#line 413 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGE1DARRAY);
+#line 487 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGE2D);
YY_BREAK
case 199:
YY_RULE_SETUP
-#line 414 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGE2DARRAY);
+#line 488 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGE3D);
YY_BREAK
case 200:
YY_RULE_SETUP
-#line 415 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE1DSHADOW);
+#line 489 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGECUBE);
YY_BREAK
case 201:
YY_RULE_SETUP
-#line 416 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE2DSHADOW);
+#line 490 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGE1D);
YY_BREAK
case 202:
YY_RULE_SETUP
-#line 417 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE1DARRAYSHADOW);
+#line 491 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGE2D);
YY_BREAK
case 203:
YY_RULE_SETUP
-#line 418 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
+#line 492 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGE3D);
YY_BREAK
case 204:
YY_RULE_SETUP
-#line 419 "glsl_lexer.ll"
-KEYWORD(130, 999, IMAGEBUFFER);
+#line 493 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGECUBE);
YY_BREAK
case 205:
YY_RULE_SETUP
-#line 420 "glsl_lexer.ll"
-KEYWORD(130, 999, IIMAGEBUFFER);
+#line 494 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE1DARRAY);
YY_BREAK
case 206:
YY_RULE_SETUP
-#line 421 "glsl_lexer.ll"
-KEYWORD(130, 999, UIMAGEBUFFER);
+#line 495 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE2DARRAY);
YY_BREAK
case 207:
YY_RULE_SETUP
-#line 422 "glsl_lexer.ll"
-KEYWORD(130, 999, ROW_MAJOR);
+#line 496 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGE1DARRAY);
YY_BREAK
case 208:
YY_RULE_SETUP
-#line 424 "glsl_lexer.ll"
+#line 497 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGE2DARRAY);
+ YY_BREAK
+case 209:
+YY_RULE_SETUP
+#line 498 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGE1DARRAY);
+ YY_BREAK
+case 210:
+YY_RULE_SETUP
+#line 499 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGE2DARRAY);
+ YY_BREAK
+case 211:
+YY_RULE_SETUP
+#line 500 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
+ YY_BREAK
+case 212:
+YY_RULE_SETUP
+#line 501 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
+ YY_BREAK
+case 213:
+YY_RULE_SETUP
+#line 502 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
+ YY_BREAK
+case 214:
+YY_RULE_SETUP
+#line 503 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
+ YY_BREAK
+case 215:
+YY_RULE_SETUP
+#line 504 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IMAGEBUFFER);
+ YY_BREAK
+case 216:
+YY_RULE_SETUP
+#line 505 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, IIMAGEBUFFER);
+ YY_BREAK
+case 217:
+YY_RULE_SETUP
+#line 506 "glsl_lexer.ll"
+KEYWORD(130, 300, 0, 0, UIMAGEBUFFER);
+ YY_BREAK
+case 218:
+YY_RULE_SETUP
+#line 507 "glsl_lexer.ll"
+KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
+ YY_BREAK
+/* Additional reserved words in GLSL 1.40 */
+case 219:
+YY_RULE_SETUP
+#line 510 "glsl_lexer.ll"
+KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT);
+ YY_BREAK
+case 220:
+YY_RULE_SETUP
+#line 511 "glsl_lexer.ll"
+KEYWORD(140, 300, 140, 0, USAMPLER2DRECT);
+ YY_BREAK
+case 221:
+YY_RULE_SETUP
+#line 512 "glsl_lexer.ll"
+KEYWORD(140, 300, 140, 0, ISAMPLERBUFFER);
+ YY_BREAK
+case 222:
+YY_RULE_SETUP
+#line 513 "glsl_lexer.ll"
+KEYWORD(140, 300, 140, 0, USAMPLERBUFFER);
+ YY_BREAK
+/* Additional reserved words in GLSL ES 3.00 */
+case 223:
+YY_RULE_SETUP
+#line 516 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, COHERENT);
+ YY_BREAK
+case 224:
+YY_RULE_SETUP
+#line 517 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, RESTRICT);
+ YY_BREAK
+case 225:
+YY_RULE_SETUP
+#line 518 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, READONLY);
+ YY_BREAK
+case 226:
+YY_RULE_SETUP
+#line 519 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, WRITEONLY);
+ YY_BREAK
+case 227:
+YY_RULE_SETUP
+#line 520 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, RESOURCE);
+ YY_BREAK
+case 228:
+YY_RULE_SETUP
+#line 521 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, ATOMIC_UINT);
+ YY_BREAK
+case 229:
+YY_RULE_SETUP
+#line 522 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, PATCH);
+ YY_BREAK
+case 230:
+YY_RULE_SETUP
+#line 523 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, SAMPLE);
+ YY_BREAK
+case 231:
+YY_RULE_SETUP
+#line 524 "glsl_lexer.ll"
+KEYWORD(0, 300, 0, 0, SUBROUTINE);
+ YY_BREAK
+case 232:
+YY_RULE_SETUP
+#line 527 "glsl_lexer.ll"
{
struct _mesa_glsl_parse_state *state = yyextra;
void *ctx = state;
@@ -2543,17 +2816,17 @@ YY_RULE_SETUP
return classify_identifier(state, yytext);
}
YY_BREAK
-case 209:
+case 233:
YY_RULE_SETUP
-#line 431 "glsl_lexer.ll"
+#line 534 "glsl_lexer.ll"
{ return yytext[0]; }
YY_BREAK
-case 210:
+case 234:
YY_RULE_SETUP
-#line 433 "glsl_lexer.ll"
+#line 536 "glsl_lexer.ll"
ECHO;
YY_BREAK
-#line 2557 "glsl_lexer.cpp"
+#line 2830 "glsl_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(PP):
case YY_STATE_EOF(PRAGMA):
@@ -2573,7 +2846,7 @@ case YY_STATE_EOF(PRAGMA):
/* 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
+ * _mesa_glsl_lexer_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
@@ -2634,7 +2907,7 @@ case YY_STATE_EOF(PRAGMA):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( _mesa_glsl_wrap(yyscanner ) )
+ if ( _mesa_glsl_lexer_wrap(yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -2687,7 +2960,7 @@ case YY_STATE_EOF(PRAGMA):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of _mesa_glsl_lex */
+} /* end of _mesa_glsl_lexer_lex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -2743,21 +3016,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t 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;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
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;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2766,7 +3039,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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 );
+ _mesa_glsl_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
}
else
/* Can't grow it, we don't own it. */
@@ -2788,7 +3061,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* 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 );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2798,7 +3071,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- _mesa_glsl_restart(yyin ,yyscanner);
+ _mesa_glsl_lexer_restart(yyin ,yyscanner);
}
else
@@ -2815,7 +3088,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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 );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_lexer_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()" );
}
@@ -2851,7 +3124,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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 >= 836 )
+ if ( yy_current_state >= 960 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2880,12 +3153,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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 >= 836 )
+ if ( yy_current_state >= 960 )
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 == 835);
+ yy_is_jam = (yy_current_state == 959);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2914,7 +3188,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2931,13 +3205,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
/* Reset buffer status. */
- _mesa_glsl_restart(yyin ,yyscanner);
+ _mesa_glsl_lexer_restart(yyin ,yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( _mesa_glsl_wrap(yyscanner ) )
+ if ( _mesa_glsl_lexer_wrap(yyscanner ) )
return EOF;
if ( ! yyg->yy_did_buffer_switch_on_eof )
@@ -2971,34 +3245,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @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)
+ void _mesa_glsl_lexer_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);
+ _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
- _mesa_glsl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- _mesa_glsl__load_buffer_state(yyscanner );
+ _mesa_glsl_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+ _mesa_glsl_lexer__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)
+ void _mesa_glsl_lexer__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_lexer_pop_buffer_state();
+ * _mesa_glsl_lexer_push_buffer_state(new_buffer);
*/
- _mesa_glsl_ensure_buffer_stack (yyscanner);
+ _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -3011,17 +3285,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- _mesa_glsl__load_buffer_state(yyscanner );
+ _mesa_glsl_lexer__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
+ * EOF (_mesa_glsl_lexer_wrap()) processing, but the only time this flag
+ * is looked at is after _mesa_glsl_lexer_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)
+static void _mesa_glsl_lexer__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;
@@ -3036,35 +3310,35 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
* @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 _mesa_glsl_lexer__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 );
+ b = (YY_BUFFER_STATE) _mesa_glsl_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__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 );
+ b->yy_ch_buf = (char *) _mesa_glsl_lexer_alloc(b->yy_buf_size + 2 ,yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__create_buffer()" );
b->yy_is_our_buffer = 1;
- _mesa_glsl__init_buffer(b,file ,yyscanner);
+ _mesa_glsl_lexer__init_buffer(b,file ,yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with _mesa_glsl__create_buffer()
+ * @param b a buffer created with _mesa_glsl_lexer__create_buffer()
* @param yyscanner The scanner object.
*/
- void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void _mesa_glsl_lexer__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -3075,28 +3349,28 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
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_lexer_free((void *) b->yy_ch_buf ,yyscanner );
- _mesa_glsl_free((void *) b ,yyscanner );
+ _mesa_glsl_lexer_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.
+ * such as during a _mesa_glsl_lexer_restart() or at EOF.
*/
- static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void _mesa_glsl_lexer__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);
+ _mesa_glsl_lexer__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.
+ /* If b is the current buffer, then _mesa_glsl_lexer__init_buffer was _probably_
+ * called from _mesa_glsl_lexer_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){
@@ -3113,7 +3387,7 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
* @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)
+ void _mesa_glsl_lexer__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
@@ -3134,7 +3408,7 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- _mesa_glsl__load_buffer_state(yyscanner );
+ _mesa_glsl_lexer__load_buffer_state(yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -3143,15 +3417,15 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
* @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)
+void _mesa_glsl_lexer_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);
+ _mesa_glsl_lexer_ensure_buffer_stack(yyscanner);
- /* This block is copied from _mesa_glsl__switch_to_buffer. */
+ /* This block is copied from _mesa_glsl_lexer__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -3165,8 +3439,8 @@ void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscann
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from _mesa_glsl__switch_to_buffer. */
- _mesa_glsl__load_buffer_state(yyscanner );
+ /* copied from _mesa_glsl_lexer__switch_to_buffer. */
+ _mesa_glsl_lexer__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -3174,19 +3448,19 @@ void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscann
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner)
+void _mesa_glsl_lexer_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);
+ _mesa_glsl_lexer__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 );
+ _mesa_glsl_lexer__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -3194,9 +3468,9 @@ void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner)
/* 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)
+static void _mesa_glsl_lexer_ensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -3206,11 +3480,11 @@ static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_alloc
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_lexer_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()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer_ensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -3225,12 +3499,12 @@ static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
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 = (struct yy_buffer_state**)_mesa_glsl_lexer_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()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer_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*));
@@ -3244,7 +3518,7 @@ static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
* @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 _mesa_glsl_lexer__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
@@ -3254,9 +3528,9 @@ YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ b = (YY_BUFFER_STATE) _mesa_glsl_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -3268,33 +3542,33 @@ YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- _mesa_glsl__switch_to_buffer(b ,yyscanner );
+ _mesa_glsl_lexer__switch_to_buffer(b ,yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will
+/** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lexer_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.
+ * _mesa_glsl_lexer__scan_bytes() instead.
*/
-YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE _mesa_glsl_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
- return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner);
+ return _mesa_glsl_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will
+/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lexer_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 yybytes the byte buffer to scan
+ * @param _yybytes_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 _mesa_glsl_lexer__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
@@ -3303,18 +3577,18 @@ YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_l
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) _mesa_glsl_alloc(n ,yyscanner );
+ buf = (char *) _mesa_glsl_lexer_alloc(n ,yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__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);
+ b = _mesa_glsl_lexer__scan_buffer(buf,n ,yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in _mesa_glsl_lexer__scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -3356,7 +3630,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE _mesa_glsl_lexer_get_extra (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra;
@@ -3365,7 +3639,7 @@ YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int _mesa_glsl_get_lineno (yyscan_t yyscanner)
+int _mesa_glsl_lexer_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -3378,7 +3652,7 @@ int _mesa_glsl_get_lineno (yyscan_t yyscanner)
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int _mesa_glsl_get_column (yyscan_t yyscanner)
+int _mesa_glsl_lexer_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -3391,7 +3665,7 @@ int _mesa_glsl_get_column (yyscan_t yyscanner)
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *_mesa_glsl_get_in (yyscan_t yyscanner)
+FILE *_mesa_glsl_lexer_get_in (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin;
@@ -3400,7 +3674,7 @@ FILE *_mesa_glsl_get_in (yyscan_t yyscanner)
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *_mesa_glsl_get_out (yyscan_t yyscanner)
+FILE *_mesa_glsl_lexer_get_out (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout;
@@ -3409,7 +3683,7 @@ FILE *_mesa_glsl_get_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int _mesa_glsl_get_leng (yyscan_t yyscanner)
+yy_size_t _mesa_glsl_lexer_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -3419,7 +3693,7 @@ int _mesa_glsl_get_leng (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
-char *_mesa_glsl_get_text (yyscan_t yyscanner)
+char *_mesa_glsl_lexer_get_text (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext;
@@ -3429,7 +3703,7 @@ char *_mesa_glsl_get_text (yyscan_t yyscanner)
* @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)
+void _mesa_glsl_lexer_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ;
@@ -3439,13 +3713,13 @@ void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
* @param line_number
* @param yyscanner The scanner object.
*/
-void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner)
+void _mesa_glsl_lexer_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);
+ YY_FATAL_ERROR( "_mesa_glsl_lexer_set_lineno called with no buffer" );
yylineno = line_number;
}
@@ -3454,13 +3728,13 @@ void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner)
* @param line_number
* @param yyscanner The scanner object.
*/
-void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner)
+void _mesa_glsl_lexer_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);
+ YY_FATAL_ERROR( "_mesa_glsl_lexer_set_column called with no buffer" );
yycolumn = column_no;
}
@@ -3469,27 +3743,27 @@ void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner)
* input buffer.
* @param in_str A readable stream.
* @param yyscanner The scanner object.
- * @see _mesa_glsl__switch_to_buffer
+ * @see _mesa_glsl_lexer__switch_to_buffer
*/
-void _mesa_glsl_set_in (FILE * in_str , yyscan_t yyscanner)
+void _mesa_glsl_lexer_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)
+void _mesa_glsl_lexer_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)
+int _mesa_glsl_lexer_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)
+void _mesa_glsl_lexer_set_debug (int bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = bdebug ;
@@ -3497,25 +3771,25 @@ void _mesa_glsl_set_debug (int bdebug , yyscan_t yyscanner)
/* Accessor methods for yylval and yylloc */
-YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner)
+YYSTYPE * _mesa_glsl_lexer_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)
+void _mesa_glsl_lexer_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)
+YYLTYPE *_mesa_glsl_lexer_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)
+void _mesa_glsl_lexer_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
@@ -3523,12 +3797,12 @@ void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
/* User-visible API */
-/* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is
+/* _mesa_glsl_lexer_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)
+int _mesa_glsl_lexer_lex_init(yyscan_t* ptr_yy_globals)
{
if (ptr_yy_globals == NULL){
@@ -3536,7 +3810,7 @@ int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals)
return 1;
}
- *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) _mesa_glsl_lexer_alloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -3549,27 +3823,27 @@ int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
-/* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the
+/* _mesa_glsl_lexer_lex_init_extra has the same functionality as _mesa_glsl_lexer_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 user defined value in the first argument will be available to _mesa_glsl_lexer_alloc in
* the yyextra field.
*/
-int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+int _mesa_glsl_lexer_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);
+ _mesa_glsl_lexer_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 );
+ *ptr_yy_globals = (yyscan_t) _mesa_glsl_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -3580,7 +3854,7 @@ int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_glo
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);
+ _mesa_glsl_lexer_set_extra (yy_user_defined, *ptr_yy_globals);
return yy_init_globals ( *ptr_yy_globals );
}
@@ -3589,7 +3863,7 @@ 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.
+ * This function is called from _mesa_glsl_lexer_lex_destroy(), so don't allocate here.
*/
yyg->yy_buffer_stack = 0;
@@ -3613,37 +3887,37 @@ static int yy_init_globals (yyscan_t yyscanner)
#endif
/* For future reference: Set errno on error, since we are called by
- * _mesa_glsl_lex_init()
+ * _mesa_glsl_lexer_lex_init()
*/
return 0;
}
-/* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */
-int _mesa_glsl_lex_destroy (yyscan_t yyscanner)
+/* _mesa_glsl_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */
+int _mesa_glsl_lexer_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 );
+ _mesa_glsl_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- _mesa_glsl_pop_buffer_state(yyscanner);
+ _mesa_glsl_lexer_pop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- _mesa_glsl_free(yyg->yy_buffer_stack ,yyscanner);
+ _mesa_glsl_lexer_free(yyg->yy_buffer_stack ,yyscanner);
yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */
- _mesa_glsl_free(yyg->yy_start_stack ,yyscanner );
+ _mesa_glsl_lexer_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. */
+ * _mesa_glsl_lexer_lex() is called, initialization will occur. */
yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */
- _mesa_glsl_free ( yyscanner , yyscanner );
+ _mesa_glsl_lexer_free ( yyscanner , yyscanner );
yyscanner = NULL;
return 0;
}
@@ -3672,12 +3946,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
}
#endif
-void *_mesa_glsl_alloc (yy_size_t size , yyscan_t yyscanner)
+void *_mesa_glsl_lexer_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)
+void *_mesa_glsl_lexer_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
@@ -3689,14 +3963,14 @@ void *_mesa_glsl_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
return (void *) realloc( (char *) ptr, size );
}
-void _mesa_glsl_free (void * ptr , yyscan_t yyscanner)
+void _mesa_glsl_lexer_free (void * ptr , yyscan_t yyscanner)
{
- free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see _mesa_glsl_lexer_realloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 433 "glsl_lexer.ll"
+#line 536 "glsl_lexer.ll"
@@ -3714,13 +3988,13 @@ classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
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);
+ _mesa_glsl_lexer_lex_init_extra(state,& state->scanner);
+ _mesa_glsl_lexer__scan_string(string,state->scanner);
}
void
_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
{
- _mesa_glsl_lex_destroy(state->scanner);
+ _mesa_glsl_lexer_lex_destroy(state->scanner);
}
diff --git a/dist/Mesa/src/glsl/glsl_lexer.ll b/dist/Mesa/src/glsl/glsl_lexer.ll
index cfd892617..3340c230b 100644
--- a/dist/Mesa/src/glsl/glsl_lexer.ll
+++ b/dist/Mesa/src/glsl/glsl_lexer.ll
@@ -22,6 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
+#include <limits.h>
#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
@@ -43,26 +44,38 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
#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.
+ * This may happen at different times in desktop GLSL and GLSL ES.
*
* For example, consider the following lexer rule:
- * samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER)
+ * samplerBuffer KEYWORD(130, 0, 140, 0, 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
+ * - an identifier ...in GLSL < 1.30 or GLSL ES
+ */
+#define KEYWORD(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, token) \
+ KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, false, token)
+
+/**
+ * Like the KEYWORD macro, but the word is also treated as a keyword
+ * if the given boolean expression is true.
*/
-#define KEYWORD(reserved_version, allowed_version, token) \
+#define KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
+ allowed_glsl, allowed_glsl_es, \
+ alt_expr, token) \
do { \
- if (yyextra->language_version >= allowed_version) { \
+ if (yyextra->is_version(allowed_glsl, allowed_glsl_es) \
+ || (alt_expr)) { \
return token; \
- } else if (yyextra->language_version >= reserved_version) { \
+ } else if (yyextra->is_version(reserved_glsl, \
+ reserved_glsl_es)) { \
_mesa_glsl_error(yylloc, yyextra, \
"Illegal use of reserved word `%s'", yytext); \
return ERROR_TOK; \
@@ -72,21 +85,71 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
} \
} 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.
+/**
+ * A macro for handling keywords that have been present in GLSL since
+ * its origin, but were changed into reserved words in GLSL 3.00 ES.
*/
-#define ES yyextra->es_shader
+#define DEPRECATED_ES_KEYWORD(token) \
+ do { \
+ if (yyextra->is_version(0, 300)) { \
+ _mesa_glsl_error(yylloc, yyextra, \
+ "Illegal use of reserved word `%s'", yytext); \
+ return ERROR_TOK; \
+ } else { \
+ return token; \
+ } \
+ } while (0)
+
+static int
+literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
+ YYSTYPE *lval, YYLTYPE *lloc, int base)
+{
+ bool is_uint = (text[len - 1] == 'u' ||
+ text[len - 1] == 'U');
+ const char *digits = text;
+
+ /* Skip "0x" */
+ if (base == 16)
+ digits += 2;
+
+#ifdef _MSC_VER
+ unsigned __int64 value = _strtoui64(digits, NULL, base);
+#else
+ unsigned long long value = strtoull(digits, NULL, base);
+#endif
+
+ lval->n = (int)value;
+
+ if (value > UINT_MAX) {
+ /* Note that signed 0xffffffff is valid, not out of range! */
+ if (state->is_version(130, 300)) {
+ _mesa_glsl_error(lloc, state,
+ "Literal value `%s' out of range", text);
+ } else {
+ _mesa_glsl_warning(lloc, state,
+ "Literal value `%s' out of range", text);
+ }
+ } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) {
+ /* Tries to catch unintentionally providing a negative value.
+ * Note that -2147483648 is parsed as -(2147483648), so we don't
+ * want to warn for INT_MAX.
+ */
+ _mesa_glsl_warning(lloc, state,
+ "Signed literal value `%s' is interpreted as %d",
+ text, lval->n);
+ }
+ return is_uint ? UINTCONSTANT : INTCONSTANT;
+}
+
+#define LITERAL_INTEGER(base) \
+ literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
+
%}
%option bison-bridge bison-locations reentrant noyywrap
%option nounput noyy_top_state
%option never-interactive
-%option prefix="_mesa_glsl_"
+%option prefix="_mesa_glsl_lexer_"
%option extra-type="struct _mesa_glsl_parse_state *"
%x PP PRAGMA
@@ -104,7 +167,7 @@ HASH ^{SPC}#{SPC}
/* Preprocessor tokens. */
^[ \t]*#[ \t]*$ ;
-^[ \t]*#[ \t]*version { BEGIN PP; return VERSION; }
+^[ \t]*#[ \t]*version { BEGIN PP; return VERSION_TOK; }
^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; }
{HASH}line{SPCP}{INT}{SPCP}{INT}{SPC}$ {
/* Eat characters until the first digit is
@@ -175,12 +238,12 @@ HASH ^{SPC}#{SPC}
\n { yylineno++; yycolumn = 0; }
-attribute return ATTRIBUTE;
+attribute DEPRECATED_ES_KEYWORD(ATTRIBUTE);
const return CONST_TOK;
bool return BOOL_TOK;
float return FLOAT_TOK;
int return INT_TOK;
-uint KEYWORD(130, 130, UINT_TOK);
+uint KEYWORD(130, 300, 130, 300, UINT_TOK);
break return BREAK;
continue return CONTINUE;
@@ -198,73 +261,98 @@ 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);
+uvec2 KEYWORD(130, 300, 130, 300, UVEC2);
+uvec3 KEYWORD(130, 300, 130, 300, UVEC3);
+uvec4 KEYWORD(130, 300, 130, 300, 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);
+mat2x2 KEYWORD(120, 300, 120, 300, MAT2X2);
+mat2x3 KEYWORD(120, 300, 120, 300, MAT2X3);
+mat2x4 KEYWORD(120, 300, 120, 300, MAT2X4);
+mat3x2 KEYWORD(120, 300, 120, 300, MAT3X2);
+mat3x3 KEYWORD(120, 300, 120, 300, MAT3X3);
+mat3x4 KEYWORD(120, 300, 120, 300, MAT3X4);
+mat4x2 KEYWORD(120, 300, 120, 300, MAT4X2);
+mat4x3 KEYWORD(120, 300, 120, 300, MAT4X3);
+mat4x4 KEYWORD(120, 300, 120, 300, 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;
+varying DEPRECATED_ES_KEYWORD(VARYING);
+centroid KEYWORD(120, 300, 120, 300, CENTROID);
+invariant KEYWORD(120, 100, 120, 100, INVARIANT);
+flat KEYWORD(130, 100, 130, 300, FLAT);
+smooth KEYWORD(130, 300, 130, 300, SMOOTH);
+noperspective KEYWORD(130, 300, 130, 0, NOPERSPECTIVE);
+
+sampler1D DEPRECATED_ES_KEYWORD(SAMPLER1D);
sampler2D return SAMPLER2D;
sampler3D return SAMPLER3D;
samplerCube return SAMPLERCUBE;
-sampler1DArray KEYWORD(130, 130, SAMPLER1DARRAY);
-sampler2DArray KEYWORD(130, 130, SAMPLER2DARRAY);
-sampler1DShadow return SAMPLER1DSHADOW;
+sampler1DArray KEYWORD(130, 300, 130, 0, SAMPLER1DARRAY);
+sampler2DArray KEYWORD(130, 300, 130, 300, SAMPLER2DARRAY);
+sampler1DShadow DEPRECATED_ES_KEYWORD(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);
+samplerCubeShadow KEYWORD(130, 300, 130, 300, SAMPLERCUBESHADOW);
+sampler1DArrayShadow KEYWORD(130, 300, 130, 0, SAMPLER1DARRAYSHADOW);
+sampler2DArrayShadow KEYWORD(130, 300, 130, 300, SAMPLER2DARRAYSHADOW);
+isampler1D KEYWORD(130, 300, 130, 0, ISAMPLER1D);
+isampler2D KEYWORD(130, 300, 130, 300, ISAMPLER2D);
+isampler3D KEYWORD(130, 300, 130, 300, ISAMPLER3D);
+isamplerCube KEYWORD(130, 300, 130, 300, ISAMPLERCUBE);
+isampler1DArray KEYWORD(130, 300, 130, 0, ISAMPLER1DARRAY);
+isampler2DArray KEYWORD(130, 300, 130, 300, ISAMPLER2DARRAY);
+usampler1D KEYWORD(130, 300, 130, 0, USAMPLER1D);
+usampler2D KEYWORD(130, 300, 130, 300, USAMPLER2D);
+usampler3D KEYWORD(130, 300, 130, 300, USAMPLER3D);
+usamplerCube KEYWORD(130, 300, 130, 300, USAMPLERCUBE);
+usampler1DArray KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY);
+usampler2DArray KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
+
+ /* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
+ /* these are reserved but not defined in GLSL 3.00 */
+sampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
+isampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
+usampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS);
+sampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY);
+isampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY);
+usampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
+
+ /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
+samplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
+isamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
+usamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
+samplerCubeArrayShadow KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
+
+samplerExternalOES {
+ if (yyextra->OES_EGL_image_external_enable)
+ return SAMPLEREXTERNALOES;
+ else
+ return IDENTIFIER;
+ }
struct return STRUCT;
void return VOID_TOK;
layout {
- if ((yyextra->language_version >= 140)
+ if ((yyextra->is_version(140, 300))
|| yyextra->AMD_conservative_depth_enable
+ || yyextra->ARB_conservative_depth_enable
|| yyextra->ARB_explicit_attrib_location_enable
- || yyextra->ARB_fragment_coord_conventions_enable) {
+ || yyextra->ARB_uniform_buffer_object_enable
+ || yyextra->ARB_fragment_coord_conventions_enable
+ || yyextra->ARB_shading_language_420pack_enable) {
return LAYOUT_TOK;
} else {
yylval->identifier = strdup(yytext);
- return IDENTIFIER;
+ return classify_identifier(yyextra, yytext);
}
}
@@ -292,36 +380,33 @@ layout {
-= return SUB_ASSIGN;
[1-9][0-9]*[uU]? {
- yylval->n = strtol(yytext, NULL, 10);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
+ return LITERAL_INTEGER(10);
}
0[xX][0-9a-fA-F]+[uU]? {
- yylval->n = strtol(yytext + 2, NULL, 16);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
+ return LITERAL_INTEGER(16);
}
0[0-7]*[uU]? {
- yylval->n = strtol(yytext, NULL, 8);
- return IS_UINT ? UINTCONSTANT : INTCONSTANT;
+ return LITERAL_INTEGER(8);
}
[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_strtod(yytext, NULL);
+ yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_strtod(yytext, NULL);
+ yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_strtod(yytext, NULL);
+ yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[eE][+-]?[0-9]+[fF]? {
- yylval->real = glsl_strtod(yytext, NULL);
+ yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[fF] {
- yylval->real = glsl_strtod(yytext, NULL);
+ yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
@@ -336,90 +421,108 @@ false {
/* 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);
+asm KEYWORD(110, 100, 0, 0, ASM);
+class KEYWORD(110, 100, 0, 0, CLASS);
+union KEYWORD(110, 100, 0, 0, UNION);
+enum KEYWORD(110, 100, 0, 0, ENUM);
+typedef KEYWORD(110, 100, 0, 0, TYPEDEF);
+template KEYWORD(110, 100, 0, 0, TEMPLATE);
+this KEYWORD(110, 100, 0, 0, THIS);
+packed KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
+goto KEYWORD(110, 100, 0, 0, GOTO);
+switch KEYWORD(110, 100, 130, 300, SWITCH);
+default KEYWORD(110, 100, 130, 300, DEFAULT);
+inline KEYWORD(110, 100, 0, 0, INLINE_TOK);
+noinline KEYWORD(110, 100, 0, 0, NOINLINE);
+volatile KEYWORD(110, 100, 0, 0, VOLATILE);
+public KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
+static KEYWORD(110, 100, 0, 0, STATIC);
+extern KEYWORD(110, 100, 0, 0, EXTERN);
+external KEYWORD(110, 100, 0, 0, EXTERNAL);
+interface KEYWORD(110, 100, 0, 0, INTERFACE);
+long KEYWORD(110, 100, 0, 0, LONG_TOK);
+short KEYWORD(110, 100, 0, 0, SHORT_TOK);
+double KEYWORD(110, 100, 400, 0, DOUBLE_TOK);
+half KEYWORD(110, 100, 0, 0, HALF);
+fixed KEYWORD(110, 100, 0, 0, FIXED_TOK);
+unsigned KEYWORD(110, 100, 0, 0, UNSIGNED);
+input KEYWORD(110, 100, 0, 0, INPUT_TOK);
+output KEYWORD(110, 100, 0, 0, OUTPUT);
+hvec2 KEYWORD(110, 100, 0, 0, HVEC2);
+hvec3 KEYWORD(110, 100, 0, 0, HVEC3);
+hvec4 KEYWORD(110, 100, 0, 0, HVEC4);
+dvec2 KEYWORD(110, 100, 400, 0, DVEC2);
+dvec3 KEYWORD(110, 100, 400, 0, DVEC3);
+dvec4 KEYWORD(110, 100, 400, 0, DVEC4);
+fvec2 KEYWORD(110, 100, 0, 0, FVEC2);
+fvec3 KEYWORD(110, 100, 0, 0, FVEC3);
+fvec4 KEYWORD(110, 100, 0, 0, FVEC4);
+sampler2DRect DEPRECATED_ES_KEYWORD(SAMPLER2DRECT);
+sampler3DRect KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
+sampler2DRectShadow DEPRECATED_ES_KEYWORD(SAMPLER2DRECTSHADOW);
+sizeof KEYWORD(110, 100, 0, 0, SIZEOF);
+cast KEYWORD(110, 100, 0, 0, CAST);
+namespace KEYWORD(110, 100, 0, 0, NAMESPACE);
+using KEYWORD(110, 100, 0, 0, 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);
+lowp KEYWORD(120, 100, 130, 100, LOWP);
+mediump KEYWORD(120, 100, 130, 100, MEDIUMP);
+highp KEYWORD(120, 100, 130, 100, HIGHP);
+precision KEYWORD(120, 100, 130, 100, 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);
+case KEYWORD(130, 300, 130, 300, CASE);
+common KEYWORD(130, 300, 0, 0, COMMON);
+partition KEYWORD(130, 300, 0, 0, PARTITION);
+active KEYWORD(130, 300, 0, 0, ACTIVE);
+superp KEYWORD(130, 100, 0, 0, SUPERP);
+samplerBuffer KEYWORD(130, 300, 140, 0, SAMPLERBUFFER);
+filter KEYWORD(130, 300, 0, 0, FILTER);
+image1D KEYWORD(130, 300, 0, 0, IMAGE1D);
+image2D KEYWORD(130, 300, 0, 0, IMAGE2D);
+image3D KEYWORD(130, 300, 0, 0, IMAGE3D);
+imageCube KEYWORD(130, 300, 0, 0, IMAGECUBE);
+iimage1D KEYWORD(130, 300, 0, 0, IIMAGE1D);
+iimage2D KEYWORD(130, 300, 0, 0, IIMAGE2D);
+iimage3D KEYWORD(130, 300, 0, 0, IIMAGE3D);
+iimageCube KEYWORD(130, 300, 0, 0, IIMAGECUBE);
+uimage1D KEYWORD(130, 300, 0, 0, UIMAGE1D);
+uimage2D KEYWORD(130, 300, 0, 0, UIMAGE2D);
+uimage3D KEYWORD(130, 300, 0, 0, UIMAGE3D);
+uimageCube KEYWORD(130, 300, 0, 0, UIMAGECUBE);
+image1DArray KEYWORD(130, 300, 0, 0, IMAGE1DARRAY);
+image2DArray KEYWORD(130, 300, 0, 0, IMAGE2DARRAY);
+iimage1DArray KEYWORD(130, 300, 0, 0, IIMAGE1DARRAY);
+iimage2DArray KEYWORD(130, 300, 0, 0, IIMAGE2DARRAY);
+uimage1DArray KEYWORD(130, 300, 0, 0, UIMAGE1DARRAY);
+uimage2DArray KEYWORD(130, 300, 0, 0, UIMAGE2DARRAY);
+image1DShadow KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
+image2DShadow KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
+image1DArrayShadow KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
+image2DArrayShadow KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
+imageBuffer KEYWORD(130, 300, 0, 0, IMAGEBUFFER);
+iimageBuffer KEYWORD(130, 300, 0, 0, IIMAGEBUFFER);
+uimageBuffer KEYWORD(130, 300, 0, 0, UIMAGEBUFFER);
+row_major KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
+
+ /* Additional reserved words in GLSL 1.40 */
+isampler2DRect KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT);
+usampler2DRect KEYWORD(140, 300, 140, 0, USAMPLER2DRECT);
+isamplerBuffer KEYWORD(140, 300, 140, 0, ISAMPLERBUFFER);
+usamplerBuffer KEYWORD(140, 300, 140, 0, USAMPLERBUFFER);
+
+ /* Additional reserved words in GLSL ES 3.00 */
+coherent KEYWORD(0, 300, 0, 0, COHERENT);
+restrict KEYWORD(0, 300, 0, 0, RESTRICT);
+readonly KEYWORD(0, 300, 0, 0, READONLY);
+writeonly KEYWORD(0, 300, 0, 0, WRITEONLY);
+resource KEYWORD(0, 300, 0, 0, RESOURCE);
+atomic_uint KEYWORD(0, 300, 0, 0, ATOMIC_UINT);
+patch KEYWORD(0, 300, 0, 0, PATCH);
+sample KEYWORD(0, 300, 0, 0, SAMPLE);
+subroutine KEYWORD(0, 300, 0, 0, SUBROUTINE);
+
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
diff --git a/dist/Mesa/src/glsl/glsl_parser.cpp b/dist/Mesa/src/glsl/glsl_parser.cpp
index de358cf01..f3a810d8a 100644
--- a/dist/Mesa/src/glsl/glsl_parser.cpp
+++ b/dist/Mesa/src/glsl/glsl_parser.cpp
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.6.1. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
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. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.6.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,18 +52,102 @@
/* Pure parsers. */
#define YYPURE 1
-/* Using locations. */
-#define YYLSP_NEEDED 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 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
+#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 336 of yacc.c */
+#line 1 "glsl_parser.yy"
+
+/*
+ * 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"
+#include "main/context.h"
+
+#undef yyerror
+
+static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
+{
+ _mesa_glsl_error(loc, st, "%s", msg);
+}
+
+static int
+_mesa_glsl_lex(YYSTYPE *val, YYLTYPE *loc, _mesa_glsl_parse_state *state)
+{
+ return _mesa_glsl_lexer_lex(val, loc, state->scanner);
+}
+
+/* Line 336 of yacc.c */
+#line 123 "glsl_parser.cpp"
+
+# ifndef YY_NULL
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULL nullptr
+# else
+# define YY_NULL 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "glsl_parser.h". */
+#ifndef _MESA_GLSL_SRC_GLSL_GLSL_PARSER_H
+# define _MESA_GLSL_SRC_GLSL_GLSL_PARSER_H
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int _mesa_glsl_debug;
+#endif
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -132,404 +213,179 @@
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,
- TYPE_IDENTIFIER = 332,
- NEW_IDENTIFIER = 333,
- FLOATCONSTANT = 334,
- INTCONSTANT = 335,
- UINTCONSTANT = 336,
- BOOLCONSTANT = 337,
- FIELD_SELECTION = 338,
- LEFT_OP = 339,
- RIGHT_OP = 340,
- INC_OP = 341,
- DEC_OP = 342,
- LE_OP = 343,
- GE_OP = 344,
- EQ_OP = 345,
- NE_OP = 346,
- AND_OP = 347,
- OR_OP = 348,
- XOR_OP = 349,
- MUL_ASSIGN = 350,
- DIV_ASSIGN = 351,
- ADD_ASSIGN = 352,
- MOD_ASSIGN = 353,
- LEFT_ASSIGN = 354,
- RIGHT_ASSIGN = 355,
- AND_ASSIGN = 356,
- XOR_ASSIGN = 357,
- OR_ASSIGN = 358,
- SUB_ASSIGN = 359,
- INVARIANT = 360,
- LOWP = 361,
- MEDIUMP = 362,
- HIGHP = 363,
- SUPERP = 364,
- PRECISION = 365,
- VERSION = 366,
- EXTENSION = 367,
- LINE = 368,
- COLON = 369,
- EOL = 370,
- INTERFACE = 371,
- OUTPUT = 372,
- PRAGMA_DEBUG_ON = 373,
- PRAGMA_DEBUG_OFF = 374,
- PRAGMA_OPTIMIZE_ON = 375,
- PRAGMA_OPTIMIZE_OFF = 376,
- PRAGMA_INVARIANT_ALL = 377,
- LAYOUT_TOK = 378,
- ASM = 379,
- CLASS = 380,
- UNION = 381,
- ENUM = 382,
- TYPEDEF = 383,
- TEMPLATE = 384,
- THIS = 385,
- PACKED_TOK = 386,
- GOTO = 387,
- INLINE_TOK = 388,
- NOINLINE = 389,
- VOLATILE = 390,
- PUBLIC_TOK = 391,
- STATIC = 392,
- EXTERN = 393,
- EXTERNAL = 394,
- LONG_TOK = 395,
- SHORT_TOK = 396,
- DOUBLE_TOK = 397,
- HALF = 398,
- FIXED_TOK = 399,
- UNSIGNED = 400,
- INPUT_TOK = 401,
- OUPTUT = 402,
- HVEC2 = 403,
- HVEC3 = 404,
- HVEC4 = 405,
- DVEC2 = 406,
- DVEC3 = 407,
- DVEC4 = 408,
- FVEC2 = 409,
- FVEC3 = 410,
- FVEC4 = 411,
- SAMPLER2DRECT = 412,
- SAMPLER3DRECT = 413,
- SAMPLER2DRECTSHADOW = 414,
- SIZEOF = 415,
- CAST = 416,
- NAMESPACE = 417,
- USING = 418,
- ERROR_TOK = 419,
- COMMON = 420,
- PARTITION = 421,
- ACTIVE = 422,
- SAMPLERBUFFER = 423,
- FILTER = 424,
- IMAGE1D = 425,
- IMAGE2D = 426,
- IMAGE3D = 427,
- IMAGECUBE = 428,
- IMAGE1DARRAY = 429,
- IMAGE2DARRAY = 430,
- IIMAGE1D = 431,
- IIMAGE2D = 432,
- IIMAGE3D = 433,
- IIMAGECUBE = 434,
- IIMAGE1DARRAY = 435,
- IIMAGE2DARRAY = 436,
- UIMAGE1D = 437,
- UIMAGE2D = 438,
- UIMAGE3D = 439,
- UIMAGECUBE = 440,
- UIMAGE1DARRAY = 441,
- UIMAGE2DARRAY = 442,
- IMAGE1DSHADOW = 443,
- IMAGE2DSHADOW = 444,
- IMAGEBUFFER = 445,
- IIMAGEBUFFER = 446,
- UIMAGEBUFFER = 447,
- IMAGE1DARRAYSHADOW = 448,
- IMAGE2DARRAYSHADOW = 449,
- ROW_MAJOR = 450
+ SAMPLERCUBEARRAY = 316,
+ SAMPLERCUBEARRAYSHADOW = 317,
+ ISAMPLER1D = 318,
+ ISAMPLER2D = 319,
+ ISAMPLER3D = 320,
+ ISAMPLERCUBE = 321,
+ ISAMPLER1DARRAY = 322,
+ ISAMPLER2DARRAY = 323,
+ ISAMPLERCUBEARRAY = 324,
+ USAMPLER1D = 325,
+ USAMPLER2D = 326,
+ USAMPLER3D = 327,
+ USAMPLERCUBE = 328,
+ USAMPLER1DARRAY = 329,
+ USAMPLER2DARRAY = 330,
+ USAMPLERCUBEARRAY = 331,
+ SAMPLER2DRECT = 332,
+ ISAMPLER2DRECT = 333,
+ USAMPLER2DRECT = 334,
+ SAMPLER2DRECTSHADOW = 335,
+ SAMPLERBUFFER = 336,
+ ISAMPLERBUFFER = 337,
+ USAMPLERBUFFER = 338,
+ SAMPLER2DMS = 339,
+ ISAMPLER2DMS = 340,
+ USAMPLER2DMS = 341,
+ SAMPLER2DMSARRAY = 342,
+ ISAMPLER2DMSARRAY = 343,
+ USAMPLER2DMSARRAY = 344,
+ SAMPLEREXTERNALOES = 345,
+ STRUCT = 346,
+ VOID_TOK = 347,
+ WHILE = 348,
+ IDENTIFIER = 349,
+ TYPE_IDENTIFIER = 350,
+ NEW_IDENTIFIER = 351,
+ FLOATCONSTANT = 352,
+ INTCONSTANT = 353,
+ UINTCONSTANT = 354,
+ BOOLCONSTANT = 355,
+ FIELD_SELECTION = 356,
+ LEFT_OP = 357,
+ RIGHT_OP = 358,
+ INC_OP = 359,
+ DEC_OP = 360,
+ LE_OP = 361,
+ GE_OP = 362,
+ EQ_OP = 363,
+ NE_OP = 364,
+ AND_OP = 365,
+ OR_OP = 366,
+ XOR_OP = 367,
+ MUL_ASSIGN = 368,
+ DIV_ASSIGN = 369,
+ ADD_ASSIGN = 370,
+ MOD_ASSIGN = 371,
+ LEFT_ASSIGN = 372,
+ RIGHT_ASSIGN = 373,
+ AND_ASSIGN = 374,
+ XOR_ASSIGN = 375,
+ OR_ASSIGN = 376,
+ SUB_ASSIGN = 377,
+ INVARIANT = 378,
+ LOWP = 379,
+ MEDIUMP = 380,
+ HIGHP = 381,
+ SUPERP = 382,
+ PRECISION = 383,
+ VERSION_TOK = 384,
+ EXTENSION = 385,
+ LINE = 386,
+ COLON = 387,
+ EOL = 388,
+ INTERFACE = 389,
+ OUTPUT = 390,
+ PRAGMA_DEBUG_ON = 391,
+ PRAGMA_DEBUG_OFF = 392,
+ PRAGMA_OPTIMIZE_ON = 393,
+ PRAGMA_OPTIMIZE_OFF = 394,
+ PRAGMA_INVARIANT_ALL = 395,
+ LAYOUT_TOK = 396,
+ ASM = 397,
+ CLASS = 398,
+ UNION = 399,
+ ENUM = 400,
+ TYPEDEF = 401,
+ TEMPLATE = 402,
+ THIS = 403,
+ PACKED_TOK = 404,
+ GOTO = 405,
+ INLINE_TOK = 406,
+ NOINLINE = 407,
+ VOLATILE = 408,
+ PUBLIC_TOK = 409,
+ STATIC = 410,
+ EXTERN = 411,
+ EXTERNAL = 412,
+ LONG_TOK = 413,
+ SHORT_TOK = 414,
+ DOUBLE_TOK = 415,
+ HALF = 416,
+ FIXED_TOK = 417,
+ UNSIGNED = 418,
+ INPUT_TOK = 419,
+ OUPTUT = 420,
+ HVEC2 = 421,
+ HVEC3 = 422,
+ HVEC4 = 423,
+ DVEC2 = 424,
+ DVEC3 = 425,
+ DVEC4 = 426,
+ FVEC2 = 427,
+ FVEC3 = 428,
+ FVEC4 = 429,
+ SAMPLER3DRECT = 430,
+ SIZEOF = 431,
+ CAST = 432,
+ NAMESPACE = 433,
+ USING = 434,
+ COHERENT = 435,
+ RESTRICT = 436,
+ READONLY = 437,
+ WRITEONLY = 438,
+ RESOURCE = 439,
+ ATOMIC_UINT = 440,
+ PATCH = 441,
+ SAMPLE = 442,
+ SUBROUTINE = 443,
+ ERROR_TOK = 444,
+ COMMON = 445,
+ PARTITION = 446,
+ ACTIVE = 447,
+ FILTER = 448,
+ IMAGE1D = 449,
+ IMAGE2D = 450,
+ IMAGE3D = 451,
+ IMAGECUBE = 452,
+ IMAGE1DARRAY = 453,
+ IMAGE2DARRAY = 454,
+ IIMAGE1D = 455,
+ IIMAGE2D = 456,
+ IIMAGE3D = 457,
+ IIMAGECUBE = 458,
+ IIMAGE1DARRAY = 459,
+ IIMAGE2DARRAY = 460,
+ UIMAGE1D = 461,
+ UIMAGE2D = 462,
+ UIMAGE3D = 463,
+ UIMAGECUBE = 464,
+ UIMAGE1DARRAY = 465,
+ UIMAGE2DARRAY = 466,
+ IMAGE1DSHADOW = 467,
+ IMAGE2DSHADOW = 468,
+ IMAGEBUFFER = 469,
+ IIMAGEBUFFER = 470,
+ UIMAGEBUFFER = 471,
+ IMAGE1DARRAYSHADOW = 472,
+ IMAGE2DARRAYSHADOW = 473,
+ ROW_MAJOR = 474,
+ THEN = 475
};
#endif
-/* Tokens. */
-#define ATTRIBUTE 258
-#define CONST_TOK 259
-#define BOOL_TOK 260
-#define FLOAT_TOK 261
-#define INT_TOK 262
-#define UINT_TOK 263
-#define BREAK 264
-#define CONTINUE 265
-#define DO 266
-#define ELSE 267
-#define FOR 268
-#define IF 269
-#define DISCARD 270
-#define RETURN 271
-#define SWITCH 272
-#define CASE 273
-#define DEFAULT 274
-#define BVEC2 275
-#define BVEC3 276
-#define BVEC4 277
-#define IVEC2 278
-#define IVEC3 279
-#define IVEC4 280
-#define UVEC2 281
-#define UVEC3 282
-#define UVEC4 283
-#define VEC2 284
-#define VEC3 285
-#define VEC4 286
-#define CENTROID 287
-#define IN_TOK 288
-#define OUT_TOK 289
-#define INOUT_TOK 290
-#define UNIFORM 291
-#define VARYING 292
-#define NOPERSPECTIVE 293
-#define FLAT 294
-#define SMOOTH 295
-#define MAT2X2 296
-#define MAT2X3 297
-#define MAT2X4 298
-#define MAT3X2 299
-#define MAT3X3 300
-#define MAT3X4 301
-#define MAT4X2 302
-#define MAT4X3 303
-#define MAT4X4 304
-#define SAMPLER1D 305
-#define SAMPLER2D 306
-#define SAMPLER3D 307
-#define SAMPLERCUBE 308
-#define SAMPLER1DSHADOW 309
-#define SAMPLER2DSHADOW 310
-#define SAMPLERCUBESHADOW 311
-#define SAMPLER1DARRAY 312
-#define SAMPLER2DARRAY 313
-#define SAMPLER1DARRAYSHADOW 314
-#define SAMPLER2DARRAYSHADOW 315
-#define ISAMPLER1D 316
-#define ISAMPLER2D 317
-#define ISAMPLER3D 318
-#define ISAMPLERCUBE 319
-#define ISAMPLER1DARRAY 320
-#define ISAMPLER2DARRAY 321
-#define USAMPLER1D 322
-#define USAMPLER2D 323
-#define USAMPLER3D 324
-#define USAMPLERCUBE 325
-#define USAMPLER1DARRAY 326
-#define USAMPLER2DARRAY 327
-#define STRUCT 328
-#define VOID_TOK 329
-#define WHILE 330
-#define IDENTIFIER 331
-#define TYPE_IDENTIFIER 332
-#define NEW_IDENTIFIER 333
-#define FLOATCONSTANT 334
-#define INTCONSTANT 335
-#define UINTCONSTANT 336
-#define BOOLCONSTANT 337
-#define FIELD_SELECTION 338
-#define LEFT_OP 339
-#define RIGHT_OP 340
-#define INC_OP 341
-#define DEC_OP 342
-#define LE_OP 343
-#define GE_OP 344
-#define EQ_OP 345
-#define NE_OP 346
-#define AND_OP 347
-#define OR_OP 348
-#define XOR_OP 349
-#define MUL_ASSIGN 350
-#define DIV_ASSIGN 351
-#define ADD_ASSIGN 352
-#define MOD_ASSIGN 353
-#define LEFT_ASSIGN 354
-#define RIGHT_ASSIGN 355
-#define AND_ASSIGN 356
-#define XOR_ASSIGN 357
-#define OR_ASSIGN 358
-#define SUB_ASSIGN 359
-#define INVARIANT 360
-#define LOWP 361
-#define MEDIUMP 362
-#define HIGHP 363
-#define SUPERP 364
-#define PRECISION 365
-#define VERSION 366
-#define EXTENSION 367
-#define LINE 368
-#define COLON 369
-#define EOL 370
-#define INTERFACE 371
-#define OUTPUT 372
-#define PRAGMA_DEBUG_ON 373
-#define PRAGMA_DEBUG_OFF 374
-#define PRAGMA_OPTIMIZE_ON 375
-#define PRAGMA_OPTIMIZE_OFF 376
-#define PRAGMA_INVARIANT_ALL 377
-#define LAYOUT_TOK 378
-#define ASM 379
-#define CLASS 380
-#define UNION 381
-#define ENUM 382
-#define TYPEDEF 383
-#define TEMPLATE 384
-#define THIS 385
-#define PACKED_TOK 386
-#define GOTO 387
-#define INLINE_TOK 388
-#define NOINLINE 389
-#define VOLATILE 390
-#define PUBLIC_TOK 391
-#define STATIC 392
-#define EXTERN 393
-#define EXTERNAL 394
-#define LONG_TOK 395
-#define SHORT_TOK 396
-#define DOUBLE_TOK 397
-#define HALF 398
-#define FIXED_TOK 399
-#define UNSIGNED 400
-#define INPUT_TOK 401
-#define OUPTUT 402
-#define HVEC2 403
-#define HVEC3 404
-#define HVEC4 405
-#define DVEC2 406
-#define DVEC3 407
-#define DVEC4 408
-#define FVEC2 409
-#define FVEC3 410
-#define FVEC4 411
-#define SAMPLER2DRECT 412
-#define SAMPLER3DRECT 413
-#define SAMPLER2DRECTSHADOW 414
-#define SIZEOF 415
-#define CAST 416
-#define NAMESPACE 417
-#define USING 418
-#define ERROR_TOK 419
-#define COMMON 420
-#define PARTITION 421
-#define ACTIVE 422
-#define SAMPLERBUFFER 423
-#define FILTER 424
-#define IMAGE1D 425
-#define IMAGE2D 426
-#define IMAGE3D 427
-#define IMAGECUBE 428
-#define IMAGE1DARRAY 429
-#define IMAGE2DARRAY 430
-#define IIMAGE1D 431
-#define IIMAGE2D 432
-#define IIMAGE3D 433
-#define IIMAGECUBE 434
-#define IIMAGE1DARRAY 435
-#define IIMAGE2DARRAY 436
-#define UIMAGE1D 437
-#define UIMAGE2D 438
-#define UIMAGE3D 439
-#define UIMAGECUBE 440
-#define UIMAGE1DARRAY 441
-#define UIMAGE2DARRAY 442
-#define IMAGE1DSHADOW 443
-#define IMAGE2DSHADOW 444
-#define IMAGEBUFFER 445
-#define IIMAGEBUFFER 446
-#define UIMAGEBUFFER 447
-#define IMAGE1DARRAYSHADOW 448
-#define IMAGE2DARRAYSHADOW 449
-#define ROW_MAJOR 450
-
-
-
-
-/* Copy the first part of user declarations. */
-#line 1 "glsl_parser.yy"
-
-/*
- * 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
-
-
-
-/* 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
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 52 "glsl_parser.yy"
{
+/* Line 350 of yacc.c */
+#line 65 "glsl_parser.yy"
+
int n;
float real;
- char *identifier;
+ const char *identifier;
struct ast_type_qualifier type_qualifier;
@@ -544,6 +400,12 @@ typedef union YYSTYPE
ast_declarator_list *declarator_list;
ast_struct_specifier *struct_specifier;
ast_declaration *declaration;
+ ast_switch_body *switch_body;
+ ast_case_label *case_label;
+ ast_case_label_list *case_label_list;
+ ast_case_statement *case_statement;
+ ast_case_statement_list *case_statement_list;
+ ast_interface_block *interface_block;
struct {
ast_node *cond;
@@ -554,13 +416,14 @@ typedef union YYSTYPE
ast_node *then_statement;
ast_node *else_statement;
} selection_rest_statement;
-}
-/* Line 193 of yacc.c. */
-#line 560 "glsl_parser.cpp"
- YYSTYPE;
+
+
+/* Line 350 of yacc.c */
+#line 423 "glsl_parser.cpp"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -577,11 +440,26 @@ typedef struct YYLTYPE
#endif
-/* Copy the second part of user declarations. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int _mesa_glsl_parse (void *YYPARSE_PARAM);
+#else
+int _mesa_glsl_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int _mesa_glsl_parse (struct _mesa_glsl_parse_state *state);
+#else
+int _mesa_glsl_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !_MESA_GLSL_SRC_GLSL_GLSL_PARSER_H */
+/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 585 "glsl_parser.cpp"
+/* Line 353 of yacc.c */
+#line 463 "glsl_parser.cpp"
#ifdef short
# undef short
@@ -631,7 +509,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -656,14 +534,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -684,11 +562,12 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (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
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -711,24 +590,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (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__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -745,9 +624,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -759,35 +638,19 @@ union yyalloc
((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
+# define YYCOPY_NEEDED 1
/* 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) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -795,23 +658,43 @@ union yyalloc
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 5
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 3692
+#define YYLAST 3501
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 220
+#define YYNTOKENS 245
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 93
+#define YYNNTS 107
/* YYNRULES -- Number of rules. */
-#define YYNRULES 291
+#define YYNRULES 340
/* YYNRULES -- Number of states. */
-#define YYNSTATES 434
+#define YYNSTATES 500
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 450
+#define YYMAXUTOK 475
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -822,16 +705,16 @@ 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, 204, 2, 2, 2, 208, 211, 2,
- 196, 197, 206, 202, 201, 203, 200, 207, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 215, 217,
- 209, 216, 210, 214, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 229, 2, 2, 2, 233, 236, 2,
+ 221, 222, 231, 227, 226, 228, 225, 232, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 240, 242,
+ 234, 241, 235, 239, 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, 198, 2, 199, 212, 2, 2, 2, 2, 2,
+ 2, 223, 2, 224, 237, 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, 218, 213, 219, 205, 2, 2, 2,
+ 2, 2, 2, 243, 238, 244, 230, 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,
@@ -864,7 +747,9 @@ static const yytype_uint8 yytranslate[] =
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, 193, 194,
- 195
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220
};
#if YYDEBUG
@@ -872,163 +757,186 @@ static const yytype_uint8 yytranslate[] =
YYRHS. */
static const yytype_uint16 yyprhs[] =
{
- 0, 0, 3, 4, 9, 10, 14, 17, 20, 23,
- 26, 29, 30, 33, 35, 37, 39, 45, 47, 50,
- 52, 54, 56, 58, 60, 62, 64, 68, 70, 75,
- 77, 81, 84, 87, 89, 91, 93, 97, 100, 103,
- 106, 108, 111, 115, 118, 120, 122, 124, 127, 130,
- 133, 135, 138, 142, 145, 147, 150, 153, 156, 158,
- 160, 162, 164, 166, 170, 174, 178, 180, 184, 188,
- 190, 194, 198, 200, 204, 208, 212, 216, 218, 222,
- 226, 228, 232, 234, 238, 240, 244, 246, 250, 252,
- 256, 258, 262, 264, 270, 272, 276, 278, 280, 282,
- 284, 286, 288, 290, 292, 294, 296, 298, 300, 304,
- 306, 309, 312, 317, 320, 322, 324, 327, 331, 335,
- 338, 344, 348, 351, 355, 358, 359, 361, 363, 365,
- 367, 369, 373, 379, 386, 394, 403, 409, 411, 414,
- 419, 425, 432, 440, 445, 448, 450, 453, 458, 460,
- 464, 466, 470, 472, 474, 476, 478, 480, 482, 485,
- 487, 490, 493, 497, 499, 501, 503, 505, 508, 510,
- 512, 515, 518, 520, 522, 525, 527, 531, 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,
- 620, 622, 624, 626, 628, 630, 632, 634, 636, 638,
- 640, 642, 644, 646, 648, 650, 656, 661, 663, 666,
- 670, 672, 676, 678, 683, 685, 687, 689, 691, 693,
- 695, 697, 699, 701, 703, 705, 708, 709, 714, 716,
- 718, 721, 725, 727, 730, 732, 735, 741, 745, 747,
- 749, 754, 760, 764, 767, 773, 781, 788, 790, 792,
- 794, 795, 798, 802, 805, 808, 811, 815, 818, 820,
- 822, 824
+ 0, 0, 3, 4, 9, 10, 14, 19, 22, 25,
+ 28, 31, 34, 35, 38, 40, 42, 44, 50, 52,
+ 55, 57, 59, 61, 63, 65, 67, 69, 73, 75,
+ 80, 82, 86, 89, 92, 94, 96, 98, 102, 105,
+ 108, 111, 113, 116, 120, 123, 125, 127, 129, 132,
+ 135, 138, 140, 143, 147, 150, 152, 155, 158, 161,
+ 163, 165, 167, 169, 171, 175, 179, 183, 185, 189,
+ 193, 195, 199, 203, 205, 209, 213, 217, 221, 223,
+ 227, 231, 233, 237, 239, 243, 245, 249, 251, 255,
+ 257, 261, 263, 267, 269, 275, 277, 281, 283, 285,
+ 287, 289, 291, 293, 295, 297, 299, 301, 303, 305,
+ 309, 311, 314, 317, 322, 324, 327, 329, 331, 334,
+ 338, 342, 345, 351, 354, 357, 358, 361, 364, 367,
+ 369, 371, 373, 375, 377, 381, 387, 394, 402, 411,
+ 417, 419, 422, 427, 433, 440, 448, 453, 456, 458,
+ 461, 466, 468, 472, 474, 476, 478, 482, 484, 486,
+ 488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
+ 509, 512, 515, 518, 521, 524, 526, 528, 530, 532,
+ 534, 536, 538, 540, 544, 549, 551, 553, 555, 557,
+ 559, 561, 563, 565, 567, 569, 571, 573, 575, 577,
+ 579, 581, 583, 585, 587, 589, 591, 593, 595, 597,
+ 599, 601, 603, 605, 607, 609, 611, 613, 615, 617,
+ 619, 621, 623, 625, 627, 629, 631, 633, 635, 637,
+ 639, 641, 643, 645, 647, 649, 651, 653, 655, 657,
+ 659, 661, 663, 665, 667, 669, 671, 673, 675, 677,
+ 679, 681, 683, 685, 687, 689, 691, 693, 695, 701,
+ 706, 708, 711, 715, 717, 721, 723, 728, 730, 734,
+ 739, 741, 745, 747, 749, 751, 753, 755, 757, 759,
+ 761, 763, 766, 767, 772, 774, 776, 779, 783, 785,
+ 788, 790, 793, 799, 803, 805, 807, 812, 818, 821,
+ 825, 829, 832, 834, 837, 840, 843, 845, 848, 854,
+ 862, 869, 871, 873, 875, 876, 879, 883, 886, 889,
+ 892, 896, 899, 901, 903, 905, 907, 910, 912, 915,
+ 923, 925, 927, 929, 930, 932, 937, 941, 943, 946,
+ 950
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 221, 0, -1, -1, 223, 225, 222, 228, -1, -1,
- 111, 80, 115, -1, 118, 115, -1, 119, 115, -1,
- 120, 115, -1, 121, 115, -1, 122, 115, -1, -1,
- 225, 227, -1, 76, -1, 77, -1, 78, -1, 112,
- 226, 114, 226, 115, -1, 311, -1, 228, 311, -1,
- 76, -1, 78, -1, 229, -1, 80, -1, 81, -1,
- 79, -1, 82, -1, 196, 260, 197, -1, 230, -1,
- 231, 198, 232, 199, -1, 233, -1, 231, 200, 226,
- -1, 231, 86, -1, 231, 87, -1, 260, -1, 234,
- -1, 235, -1, 231, 200, 240, -1, 237, 197, -1,
- 236, 197, -1, 238, 74, -1, 238, -1, 238, 258,
- -1, 237, 201, 258, -1, 239, 196, -1, 281, -1,
- 229, -1, 83, -1, 242, 197, -1, 241, 197, -1,
- 243, 74, -1, 243, -1, 243, 258, -1, 242, 201,
- 258, -1, 229, 196, -1, 231, -1, 86, 244, -1,
- 87, 244, -1, 245, 244, -1, 202, -1, 203, -1,
- 204, -1, 205, -1, 244, -1, 246, 206, 244, -1,
- 246, 207, 244, -1, 246, 208, 244, -1, 246, -1,
- 247, 202, 246, -1, 247, 203, 246, -1, 247, -1,
- 248, 84, 247, -1, 248, 85, 247, -1, 248, -1,
- 249, 209, 248, -1, 249, 210, 248, -1, 249, 88,
- 248, -1, 249, 89, 248, -1, 249, -1, 250, 90,
- 249, -1, 250, 91, 249, -1, 250, -1, 251, 211,
- 250, -1, 251, -1, 252, 212, 251, -1, 252, -1,
- 253, 213, 252, -1, 253, -1, 254, 92, 253, -1,
- 254, -1, 255, 94, 254, -1, 255, -1, 256, 93,
- 255, -1, 256, -1, 256, 214, 260, 215, 258, -1,
- 257, -1, 244, 259, 258, -1, 216, -1, 95, -1,
- 96, -1, 98, -1, 97, -1, 104, -1, 99, -1,
- 100, -1, 101, -1, 102, -1, 103, -1, 258, -1,
- 260, 201, 258, -1, 257, -1, 263, 217, -1, 271,
- 217, -1, 110, 285, 282, 217, -1, 264, 197, -1,
- 266, -1, 265, -1, 266, 268, -1, 265, 201, 268,
- -1, 273, 229, 196, -1, 281, 226, -1, 281, 226,
- 198, 261, 199, -1, 278, 269, 267, -1, 269, 267,
- -1, 278, 269, 270, -1, 269, 270, -1, -1, 33,
- -1, 34, -1, 35, -1, 281, -1, 272, -1, 271,
- 201, 226, -1, 271, 201, 226, 198, 199, -1, 271,
- 201, 226, 198, 261, 199, -1, 271, 201, 226, 198,
- 199, 216, 291, -1, 271, 201, 226, 198, 261, 199,
- 216, 291, -1, 271, 201, 226, 216, 291, -1, 273,
- -1, 273, 226, -1, 273, 226, 198, 199, -1, 273,
- 226, 198, 261, 199, -1, 273, 226, 198, 199, 216,
- 291, -1, 273, 226, 198, 261, 199, 216, 291, -1,
- 273, 226, 216, 291, -1, 105, 229, -1, 281, -1,
- 279, 281, -1, 123, 196, 275, 197, -1, 276, -1,
- 275, 201, 276, -1, 226, -1, 226, 216, 80, -1,
- 40, -1, 39, -1, 38, -1, 4, -1, 280, -1,
- 274, -1, 274, 280, -1, 277, -1, 277, 280, -1,
- 105, 280, -1, 105, 277, 280, -1, 105, -1, 4,
- -1, 3, -1, 37, -1, 32, 37, -1, 33, -1,
- 34, -1, 32, 33, -1, 32, 34, -1, 36, -1,
- 282, -1, 285, 282, -1, 283, -1, 283, 198, 199,
- -1, 283, 198, 261, 199, -1, 284, -1, 286, -1,
- 77, -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, 157, -1,
- 52, -1, 53, -1, 54, -1, 55, -1, 159, -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, 108, -1, 107, -1, 106, -1,
- 73, 226, 218, 287, 219, -1, 73, 218, 287, 219,
- -1, 288, -1, 287, 288, -1, 281, 289, 217, -1,
- 290, -1, 289, 201, 290, -1, 226, -1, 226, 198,
- 261, 199, -1, 258, -1, 262, -1, 295, -1, 294,
- -1, 292, -1, 300, -1, 301, -1, 304, -1, 305,
- -1, 306, -1, 310, -1, 218, 219, -1, -1, 218,
- 296, 299, 219, -1, 298, -1, 294, -1, 218, 219,
- -1, 218, 299, 219, -1, 293, -1, 299, 293, -1,
- 217, -1, 260, 217, -1, 14, 196, 260, 197, 302,
- -1, 293, 12, 293, -1, 293, -1, 260, -1, 273,
- 226, 216, 291, -1, 17, 196, 260, 197, 295, -1,
- 18, 260, 215, -1, 19, 215, -1, 75, 196, 303,
- 197, 297, -1, 11, 293, 75, 196, 260, 197, 217,
- -1, 13, 196, 307, 309, 197, 297, -1, 300, -1,
- 292, -1, 303, -1, -1, 308, 217, -1, 308, 217,
- 260, -1, 10, 217, -1, 9, 217, -1, 16, 217,
- -1, 16, 260, 217, -1, 15, 217, -1, 312, -1,
- 262, -1, 224, -1, 263, 298, -1
+ 246, 0, -1, -1, 248, 250, 247, 253, -1, -1,
+ 129, 98, 133, -1, 129, 98, 251, 133, -1, 136,
+ 133, -1, 137, 133, -1, 138, 133, -1, 139, 133,
+ -1, 140, 133, -1, -1, 250, 252, -1, 94, -1,
+ 95, -1, 96, -1, 130, 251, 132, 251, 133, -1,
+ 343, -1, 253, 343, -1, 94, -1, 96, -1, 254,
+ -1, 98, -1, 99, -1, 97, -1, 100, -1, 221,
+ 285, 222, -1, 255, -1, 256, 223, 257, 224, -1,
+ 258, -1, 256, 225, 251, -1, 256, 104, -1, 256,
+ 105, -1, 285, -1, 259, -1, 260, -1, 256, 225,
+ 265, -1, 262, 222, -1, 261, 222, -1, 263, 92,
+ -1, 263, -1, 263, 283, -1, 262, 226, 283, -1,
+ 264, 221, -1, 309, -1, 254, -1, 101, -1, 267,
+ 222, -1, 266, 222, -1, 268, 92, -1, 268, -1,
+ 268, 283, -1, 267, 226, 283, -1, 254, 221, -1,
+ 256, -1, 104, 269, -1, 105, 269, -1, 270, 269,
+ -1, 227, -1, 228, -1, 229, -1, 230, -1, 269,
+ -1, 271, 231, 269, -1, 271, 232, 269, -1, 271,
+ 233, 269, -1, 271, -1, 272, 227, 271, -1, 272,
+ 228, 271, -1, 272, -1, 273, 102, 272, -1, 273,
+ 103, 272, -1, 273, -1, 274, 234, 273, -1, 274,
+ 235, 273, -1, 274, 106, 273, -1, 274, 107, 273,
+ -1, 274, -1, 275, 108, 274, -1, 275, 109, 274,
+ -1, 275, -1, 276, 236, 275, -1, 276, -1, 277,
+ 237, 276, -1, 277, -1, 278, 238, 277, -1, 278,
+ -1, 279, 110, 278, -1, 279, -1, 280, 112, 279,
+ -1, 280, -1, 281, 111, 280, -1, 281, -1, 281,
+ 239, 285, 240, 283, -1, 282, -1, 269, 284, 283,
+ -1, 241, -1, 113, -1, 114, -1, 116, -1, 115,
+ -1, 122, -1, 117, -1, 118, -1, 119, -1, 120,
+ -1, 121, -1, 283, -1, 285, 226, 283, -1, 282,
+ -1, 288, 242, -1, 297, 242, -1, 128, 312, 309,
+ 242, -1, 345, -1, 289, 222, -1, 291, -1, 290,
+ -1, 291, 293, -1, 290, 226, 293, -1, 299, 254,
+ 221, -1, 309, 251, -1, 309, 251, 223, 286, 224,
+ -1, 294, 292, -1, 294, 296, -1, -1, 4, 294,
+ -1, 295, 294, -1, 312, 294, -1, 33, -1, 34,
+ -1, 35, -1, 309, -1, 298, -1, 297, 226, 251,
+ -1, 297, 226, 251, 223, 224, -1, 297, 226, 251,
+ 223, 286, 224, -1, 297, 226, 251, 223, 224, 241,
+ 318, -1, 297, 226, 251, 223, 286, 224, 241, 318,
+ -1, 297, 226, 251, 241, 318, -1, 299, -1, 299,
+ 251, -1, 299, 251, 223, 224, -1, 299, 251, 223,
+ 286, 224, -1, 299, 251, 223, 224, 241, 318, -1,
+ 299, 251, 223, 286, 224, 241, 318, -1, 299, 251,
+ 241, 318, -1, 123, 254, -1, 309, -1, 306, 309,
+ -1, 141, 221, 301, 222, -1, 303, -1, 301, 226,
+ 303, -1, 98, -1, 99, -1, 251, -1, 251, 241,
+ 302, -1, 304, -1, 219, -1, 149, -1, 40, -1,
+ 39, -1, 38, -1, 123, -1, 307, -1, 308, -1,
+ 305, -1, 300, -1, 312, -1, 123, 306, -1, 305,
+ 306, -1, 300, 306, -1, 307, 306, -1, 308, 306,
+ -1, 312, 306, -1, 32, -1, 4, -1, 3, -1,
+ 37, -1, 33, -1, 34, -1, 36, -1, 310, -1,
+ 310, 223, 224, -1, 310, 223, 286, 224, -1, 311,
+ -1, 313, -1, 95, -1, 92, -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, 77, -1, 52, -1, 53, -1, 90, -1, 54,
+ -1, 55, -1, 80, -1, 56, -1, 57, -1, 58,
+ -1, 59, -1, 60, -1, 81, -1, 61, -1, 62,
+ -1, 63, -1, 64, -1, 78, -1, 65, -1, 66,
+ -1, 67, -1, 68, -1, 82, -1, 69, -1, 70,
+ -1, 71, -1, 79, -1, 72, -1, 73, -1, 74,
+ -1, 75, -1, 83, -1, 76, -1, 84, -1, 85,
+ -1, 86, -1, 87, -1, 88, -1, 89, -1, 126,
+ -1, 125, -1, 124, -1, 91, 251, 243, 314, 244,
+ -1, 91, 243, 314, 244, -1, 315, -1, 314, 315,
+ -1, 309, 316, 242, -1, 317, -1, 316, 226, 317,
+ -1, 251, -1, 251, 223, 286, 224, -1, 283, -1,
+ 243, 319, 244, -1, 243, 319, 226, 244, -1, 318,
+ -1, 319, 226, 318, -1, 287, -1, 323, -1, 322,
+ -1, 320, -1, 328, -1, 329, -1, 332, -1, 338,
+ -1, 342, -1, 243, 244, -1, -1, 243, 324, 327,
+ 244, -1, 326, -1, 322, -1, 243, 244, -1, 243,
+ 327, 244, -1, 321, -1, 327, 321, -1, 242, -1,
+ 285, 242, -1, 14, 221, 285, 222, 330, -1, 321,
+ 12, 321, -1, 321, -1, 285, -1, 299, 251, 241,
+ 318, -1, 17, 221, 285, 222, 333, -1, 243, 244,
+ -1, 243, 337, 244, -1, 18, 285, 240, -1, 19,
+ 240, -1, 334, -1, 335, 334, -1, 335, 321, -1,
+ 336, 321, -1, 336, -1, 337, 336, -1, 93, 221,
+ 331, 222, 325, -1, 11, 321, 93, 221, 285, 222,
+ 242, -1, 13, 221, 339, 341, 222, 325, -1, 328,
+ -1, 320, -1, 331, -1, -1, 340, 242, -1, 340,
+ 242, 285, -1, 10, 242, -1, 9, 242, -1, 16,
+ 242, -1, 16, 285, 242, -1, 15, 242, -1, 344,
+ -1, 287, -1, 249, -1, 351, -1, 288, 326, -1,
+ 346, -1, 300, 346, -1, 347, 96, 243, 349, 244,
+ 348, 242, -1, 33, -1, 34, -1, 36, -1, -1,
+ 96, -1, 96, 223, 286, 224, -1, 96, 223, 224,
+ -1, 350, -1, 350, 349, -1, 299, 316, 242, -1,
+ 300, 36, 242, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 218, 218, 217, 229, 231, 271, 272, 273, 274,
- 275, 287, 289, 293, 294, 295, 299, 308, 316, 327,
- 328, 332, 339, 346, 353, 360, 367, 374, 375, 381,
- 385, 392, 398, 407, 411, 415, 416, 425, 426, 430,
- 431, 435, 441, 453, 457, 463, 470, 480, 481, 485,
- 486, 490, 496, 508, 519, 520, 526, 532, 542, 543,
- 544, 545, 549, 550, 556, 562, 571, 572, 578, 587,
- 588, 594, 603, 604, 610, 616, 622, 631, 632, 638,
- 647, 648, 657, 658, 667, 668, 677, 678, 687, 688,
- 697, 698, 707, 708, 717, 718, 727, 728, 729, 730,
- 731, 732, 733, 734, 735, 736, 737, 741, 745, 761,
- 765, 770, 774, 783, 787, 788, 792, 797, 805, 819,
- 829, 844, 851, 856, 867, 880, 883, 888, 893, 902,
- 906, 907, 917, 927, 937, 947, 957, 971, 978, 987,
- 996, 1005, 1014, 1023, 1032, 1046, 1053, 1064, 1071, 1072,
- 1091, 1143, 1184, 1189, 1194, 1202, 1210, 1211, 1212, 1217,
- 1218, 1223, 1228, 1234, 1242, 1247, 1252, 1257, 1263, 1268,
- 1273, 1278, 1283, 1291, 1295, 1303, 1304, 1310, 1319, 1325,
- 1331, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348,
- 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358,
- 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368,
- 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378,
- 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388,
- 1389, 1390, 1394, 1404, 1414, 1427, 1434, 1443, 1448, 1456,
- 1471, 1476, 1484, 1491, 1500, 1504, 1510, 1511, 1515, 1516,
- 1517, 1518, 1519, 1520, 1521, 1525, 1532, 1531, 1545, 1546,
- 1550, 1556, 1565, 1575, 1587, 1593, 1602, 1611, 1616, 1624,
- 1628, 1642, 1646, 1647, 1651, 1658, 1665, 1675, 1676, 1680,
- 1682, 1688, 1693, 1702, 1708, 1714, 1720, 1726, 1735, 1736,
- 1737, 1741
+ 0, 263, 263, 262, 274, 276, 283, 293, 294, 295,
+ 296, 297, 310, 312, 316, 317, 318, 322, 331, 339,
+ 350, 351, 355, 362, 369, 376, 383, 390, 397, 398,
+ 404, 408, 415, 421, 430, 434, 438, 439, 448, 449,
+ 453, 454, 458, 464, 476, 480, 486, 493, 503, 504,
+ 508, 509, 513, 519, 531, 542, 543, 549, 555, 565,
+ 566, 567, 568, 572, 573, 579, 585, 594, 595, 601,
+ 610, 611, 617, 626, 627, 633, 639, 645, 654, 655,
+ 661, 670, 671, 680, 681, 690, 691, 700, 701, 710,
+ 711, 720, 721, 730, 731, 740, 741, 750, 751, 752,
+ 753, 754, 755, 756, 757, 758, 759, 760, 764, 768,
+ 784, 788, 793, 797, 802, 809, 813, 814, 818, 823,
+ 831, 845, 855, 870, 875, 888, 891, 899, 911, 924,
+ 929, 934, 943, 947, 948, 958, 968, 978, 993, 1008,
+ 1026, 1033, 1042, 1051, 1060, 1074, 1088, 1100, 1114, 1121,
+ 1132, 1139, 1140, 1150, 1151, 1155, 1231, 1280, 1302, 1307,
+ 1315, 1320, 1325, 1334, 1339, 1340, 1341, 1342, 1343, 1361,
+ 1374, 1402, 1425, 1440, 1460, 1474, 1482, 1487, 1492, 1497,
+ 1502, 1507, 1515, 1516, 1522, 1531, 1537, 1543, 1552, 1553,
+ 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563,
+ 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573,
+ 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583,
+ 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593,
+ 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603,
+ 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613,
+ 1614, 1615, 1616, 1617, 1618, 1622, 1627, 1632, 1640, 1648,
+ 1657, 1662, 1670, 1685, 1690, 1698, 1704, 1713, 1714, 1718,
+ 1725, 1732, 1739, 1745, 1746, 1750, 1751, 1752, 1753, 1754,
+ 1755, 1759, 1766, 1765, 1779, 1780, 1784, 1790, 1799, 1809,
+ 1821, 1827, 1836, 1845, 1850, 1858, 1862, 1880, 1888, 1893,
+ 1901, 1906, 1914, 1922, 1930, 1938, 1946, 1954, 1962, 1969,
+ 1976, 1986, 1987, 1991, 1993, 1999, 2004, 2013, 2019, 2025,
+ 2031, 2037, 2046, 2047, 2048, 2049, 2053, 2067, 2071, 2082,
+ 2179, 2184, 2189, 2198, 2202, 2207, 2212, 2223, 2228, 2236,
+ 2260
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 1
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
@@ -1043,41 +951,47 @@ static const char *const yytname[] =
"MAT4X4", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE",
"SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW",
"SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW",
- "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D",
- "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D",
+ "SAMPLER2DARRAYSHADOW", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW",
+ "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE",
+ "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "ISAMPLERCUBEARRAY", "USAMPLER1D",
"USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY",
- "USAMPLER2DARRAY", "STRUCT", "VOID_TOK", "WHILE", "IDENTIFIER",
- "TYPE_IDENTIFIER", "NEW_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", "PRAGMA_INVARIANT_ALL",
- "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",
+ "USAMPLER2DARRAY", "USAMPLERCUBEARRAY", "SAMPLER2DRECT",
+ "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLER2DRECTSHADOW",
+ "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS",
+ "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY",
+ "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "STRUCT", "VOID_TOK", "WHILE",
+ "IDENTIFIER", "TYPE_IDENTIFIER", "NEW_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_TOK", "EXTENSION", "LINE",
+ "COLON", "EOL", "INTERFACE", "OUTPUT", "PRAGMA_DEBUG_ON",
+ "PRAGMA_DEBUG_OFF", "PRAGMA_OPTIMIZE_ON", "PRAGMA_OPTIMIZE_OFF",
+ "PRAGMA_INVARIANT_ALL", "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", "SAMPLER3DRECT", "SIZEOF", "CAST",
+ "NAMESPACE", "USING", "COHERENT", "RESTRICT", "READONLY", "WRITEONLY",
+ "RESOURCE", "ATOMIC_UINT", "PATCH", "SAMPLE", "SUBROUTINE", "ERROR_TOK",
+ "COMMON", "PARTITION", "ACTIVE", "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", "any_identifier", "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",
+ "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "THEN", "'('", "')'", "'['", "']'",
+ "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'", "'%'", "'<'",
+ "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'", "'{'", "'}'",
+ "$accept", "translation_unit", "$@1", "version_statement",
+ "pragma_statement", "extension_statement_list", "any_identifier",
+ "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", "method_call_generic",
"method_call_header_no_parameters", "method_call_header_with_parameters",
@@ -1091,22 +1005,27 @@ static const char *const yytname[] =
"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", "@2", "statement_no_new_scope",
- "compound_statement_no_new_scope", "statement_list",
- "expression_statement", "selection_statement",
+ "parameter_qualifier", "parameter_direction_qualifier",
+ "parameter_type_specifier", "init_declarator_list", "single_declaration",
+ "fully_specified_type", "layout_qualifier", "layout_qualifier_id_list",
+ "integer_constant", "layout_qualifier_id",
+ "interface_block_layout_qualifier", "interpolation_qualifier",
+ "type_qualifier", "auxiliary_storage_qualifier", "storage_qualifier",
+ "type_specifier", "type_specifier_nonarray",
+ "basic_type_specifier_nonarray", "precision_qualifier",
+ "struct_specifier", "struct_declaration_list", "struct_declaration",
+ "struct_declarator_list", "struct_declarator", "initializer",
+ "initializer_list", "declaration_statement", "statement",
+ "simple_statement", "compound_statement", "$@2",
+ "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",
+ "switch_body", "case_label", "case_label_list", "case_statement",
+ "case_statement_list", "iteration_statement", "for_init_statement",
"conditionopt", "for_rest_statement", "jump_statement",
- "external_declaration", "function_definition", 0
+ "external_declaration", "function_definition", "interface_block",
+ "basic_interface_block", "interface_qualifier", "instance_name_opt",
+ "member_list", "member_declaration", "layout_defaults", YY_NULL
};
#endif
@@ -1134,1015 +1053,1015 @@ static const yytype_uint16 yytoknum[] =
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, 448, 449, 450, 40, 41, 91, 93,
- 46, 44, 43, 45, 33, 126, 42, 47, 37, 60,
- 62, 38, 94, 124, 63, 58, 61, 59, 123, 125
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 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, 220, 222, 221, 223, 223, 224, 224, 224, 224,
- 224, 225, 225, 226, 226, 226, 227, 228, 228, 229,
- 229, 230, 230, 230, 230, 230, 230, 231, 231, 231,
- 231, 231, 231, 232, 233, 234, 234, 235, 235, 236,
- 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
- 241, 242, 242, 243, 244, 244, 244, 244, 245, 245,
- 245, 245, 246, 246, 246, 246, 247, 247, 247, 248,
- 248, 248, 249, 249, 249, 249, 249, 250, 250, 250,
- 251, 251, 252, 252, 253, 253, 254, 254, 255, 255,
- 256, 256, 257, 257, 258, 258, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 260, 260, 261,
- 262, 262, 262, 263, 264, 264, 265, 265, 266, 267,
- 267, 268, 268, 268, 268, 269, 269, 269, 269, 270,
- 271, 271, 271, 271, 271, 271, 271, 272, 272, 272,
- 272, 272, 272, 272, 272, 273, 273, 274, 275, 275,
- 276, 276, 277, 277, 277, 278, 279, 279, 279, 279,
- 279, 279, 279, 279, 280, 280, 280, 280, 280, 280,
- 280, 280, 280, 281, 281, 282, 282, 282, 283, 283,
- 283, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 285, 285, 285, 286, 286, 287, 287, 288,
- 289, 289, 290, 290, 291, 292, 293, 293, 294, 294,
- 294, 294, 294, 294, 294, 295, 296, 295, 297, 297,
- 298, 298, 299, 299, 300, 300, 301, 302, 302, 303,
- 303, 304, 305, 305, 306, 306, 306, 307, 307, 308,
- 308, 309, 309, 310, 310, 310, 310, 310, 311, 311,
- 311, 312
+ 0, 245, 247, 246, 248, 248, 248, 249, 249, 249,
+ 249, 249, 250, 250, 251, 251, 251, 252, 253, 253,
+ 254, 254, 255, 255, 255, 255, 255, 255, 256, 256,
+ 256, 256, 256, 256, 257, 258, 259, 259, 260, 260,
+ 261, 261, 262, 262, 263, 264, 264, 264, 265, 265,
+ 266, 266, 267, 267, 268, 269, 269, 269, 269, 270,
+ 270, 270, 270, 271, 271, 271, 271, 272, 272, 272,
+ 273, 273, 273, 274, 274, 274, 274, 274, 275, 275,
+ 275, 276, 276, 277, 277, 278, 278, 279, 279, 280,
+ 280, 281, 281, 282, 282, 283, 283, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284, 285, 285,
+ 286, 287, 287, 287, 287, 288, 289, 289, 290, 290,
+ 291, 292, 292, 293, 293, 294, 294, 294, 294, 295,
+ 295, 295, 296, 297, 297, 297, 297, 297, 297, 297,
+ 298, 298, 298, 298, 298, 298, 298, 298, 299, 299,
+ 300, 301, 301, 302, 302, 303, 303, 303, 304, 304,
+ 305, 305, 305, 306, 306, 306, 306, 306, 306, 306,
+ 306, 306, 306, 306, 306, 307, 308, 308, 308, 308,
+ 308, 308, 309, 309, 309, 310, 310, 310, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 312, 312, 312, 313, 313,
+ 314, 314, 315, 316, 316, 317, 317, 318, 318, 318,
+ 319, 319, 320, 321, 321, 322, 322, 322, 322, 322,
+ 322, 323, 324, 323, 325, 325, 326, 326, 327, 327,
+ 328, 328, 329, 330, 330, 331, 331, 332, 333, 333,
+ 334, 334, 335, 335, 336, 336, 337, 337, 338, 338,
+ 338, 339, 339, 340, 340, 341, 341, 342, 342, 342,
+ 342, 342, 343, 343, 343, 343, 344, 345, 345, 346,
+ 347, 347, 347, 348, 348, 348, 348, 349, 349, 350,
+ 351
};
/* 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,
- 2, 0, 2, 1, 1, 1, 5, 1, 2, 1,
- 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, 2, 2, 2,
- 1, 2, 3, 2, 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,
+ 0, 2, 0, 4, 0, 3, 4, 2, 2, 2,
+ 2, 2, 0, 2, 1, 1, 1, 5, 1, 2,
+ 1, 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, 2, 2,
+ 2, 1, 2, 3, 2, 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, 1, 2, 1, 1, 2, 3,
+ 3, 2, 5, 2, 2, 0, 2, 2, 2, 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, 1, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 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, 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, 0, 4, 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
+ 1, 1, 1, 1, 1, 1, 1, 1, 5, 4,
+ 1, 2, 3, 1, 3, 1, 4, 1, 3, 4,
+ 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 0, 4, 1, 1, 2, 3, 1, 2,
+ 1, 2, 5, 3, 1, 1, 4, 5, 2, 3,
+ 3, 2, 1, 2, 2, 2, 1, 2, 5, 7,
+ 6, 1, 1, 1, 0, 2, 3, 2, 2, 2,
+ 3, 2, 1, 1, 1, 1, 2, 1, 2, 7,
+ 1, 1, 1, 0, 1, 4, 3, 1, 2, 3,
+ 3
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 4, 0, 0, 11, 0, 1, 2, 5, 0, 0,
- 12, 13, 14, 15, 0, 165, 164, 185, 182, 183,
- 184, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 186, 187, 188, 0, 168, 169, 172, 166, 154, 153,
- 152, 198, 199, 200, 201, 202, 203, 204, 205, 206,
- 207, 208, 210, 211, 212, 213, 215, 216, 217, 218,
- 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 0, 181, 180, 163, 234, 233, 232,
- 0, 0, 0, 0, 0, 0, 0, 209, 214, 290,
- 3, 289, 0, 0, 115, 125, 0, 130, 137, 157,
- 159, 0, 156, 145, 173, 175, 178, 0, 179, 17,
- 288, 0, 170, 171, 167, 0, 0, 19, 20, 144,
- 0, 161, 0, 6, 7, 8, 9, 10, 0, 18,
- 110, 0, 291, 113, 125, 155, 126, 127, 128, 116,
- 0, 125, 0, 111, 13, 15, 138, 0, 158, 160,
- 146, 0, 174, 0, 0, 0, 237, 0, 162, 0,
- 150, 0, 148, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 24, 22, 23, 25, 46, 0,
- 0, 0, 58, 59, 60, 61, 264, 256, 260, 21,
- 27, 54, 29, 34, 35, 0, 0, 40, 0, 62,
- 0, 66, 69, 72, 77, 80, 82, 84, 86, 88,
- 90, 92, 94, 107, 0, 245, 0, 145, 248, 262,
- 247, 246, 0, 249, 250, 251, 252, 253, 254, 117,
- 122, 124, 129, 0, 131, 0, 0, 118, 176, 62,
- 109, 0, 44, 16, 242, 0, 240, 236, 238, 0,
- 112, 0, 147, 0, 284, 283, 0, 0, 0, 287,
- 285, 0, 0, 0, 273, 0, 55, 56, 0, 255,
- 0, 31, 32, 0, 0, 38, 37, 0, 181, 41,
- 43, 97, 98, 100, 99, 102, 103, 104, 105, 106,
- 101, 96, 0, 57, 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 12, 0, 1, 2, 14, 15, 16,
+ 5, 0, 0, 0, 13, 6, 0, 177, 176, 192,
+ 189, 190, 191, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 193, 194, 195, 175, 179, 180, 181, 178,
+ 162, 161, 160, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 217, 218, 220, 221, 223, 224,
+ 225, 226, 227, 229, 230, 231, 232, 234, 235, 236,
+ 237, 239, 240, 241, 243, 244, 245, 246, 248, 216,
+ 233, 242, 222, 228, 238, 247, 249, 250, 251, 252,
+ 253, 254, 219, 0, 188, 187, 163, 257, 256, 255,
+ 0, 0, 0, 0, 0, 0, 0, 324, 3, 323,
+ 0, 0, 117, 125, 0, 133, 140, 167, 166, 0,
+ 164, 165, 148, 182, 185, 168, 186, 18, 322, 114,
+ 327, 0, 325, 0, 0, 0, 179, 180, 181, 20,
+ 21, 163, 147, 167, 169, 0, 7, 8, 9, 10,
+ 11, 0, 19, 111, 0, 326, 115, 125, 125, 129,
+ 130, 131, 118, 0, 125, 125, 0, 112, 14, 16,
+ 141, 0, 181, 171, 328, 170, 149, 172, 173, 0,
+ 174, 0, 0, 0, 0, 260, 0, 0, 159, 158,
+ 155, 0, 151, 157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 25, 23, 24, 26, 47, 0, 0,
+ 0, 59, 60, 61, 62, 290, 282, 286, 22, 28,
+ 55, 30, 35, 36, 0, 0, 41, 0, 63, 0,
+ 67, 70, 73, 78, 81, 83, 85, 87, 89, 91,
+ 93, 95, 108, 0, 272, 0, 167, 148, 275, 288,
+ 274, 273, 0, 276, 277, 278, 279, 280, 119, 126,
+ 123, 124, 132, 127, 128, 134, 0, 0, 120, 340,
+ 183, 63, 110, 0, 45, 0, 17, 265, 0, 263,
+ 259, 261, 0, 113, 0, 150, 0, 318, 317, 0,
+ 0, 0, 321, 319, 0, 0, 0, 56, 57, 0,
+ 281, 0, 32, 33, 0, 0, 39, 38, 0, 188,
+ 42, 44, 98, 99, 101, 100, 103, 104, 105, 106,
+ 107, 102, 97, 0, 58, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 265, 261, 263, 119, 121,
- 123, 0, 0, 139, 0, 244, 143, 177, 0, 0,
- 239, 235, 151, 149, 0, 278, 277, 280, 0, 286,
- 0, 272, 163, 269, 0, 0, 26, 0, 0, 33,
- 30, 0, 36, 0, 0, 50, 42, 95, 63, 64,
- 65, 67, 68, 70, 71, 75, 76, 73, 74, 78,
- 79, 81, 83, 85, 87, 89, 91, 0, 108, 0,
- 132, 0, 136, 0, 140, 0, 241, 0, 279, 0,
- 0, 0, 0, 0, 0, 257, 28, 53, 48, 47,
- 0, 181, 51, 0, 0, 0, 133, 141, 0, 243,
- 0, 281, 0, 268, 266, 271, 0, 259, 274, 258,
- 52, 93, 120, 134, 0, 142, 0, 282, 276, 0,
- 270, 135, 275, 267
+ 0, 0, 0, 0, 0, 0, 291, 287, 289, 121,
+ 0, 0, 142, 0, 0, 267, 146, 184, 0, 0,
+ 337, 0, 0, 262, 258, 153, 154, 156, 152, 0,
+ 312, 311, 314, 0, 320, 0, 295, 0, 0, 27,
+ 0, 0, 34, 31, 0, 37, 0, 0, 51, 43,
+ 96, 64, 65, 66, 68, 69, 71, 72, 76, 77,
+ 74, 75, 79, 80, 82, 84, 86, 88, 90, 92,
+ 0, 109, 0, 135, 0, 139, 0, 143, 270, 0,
+ 0, 333, 338, 0, 264, 0, 313, 0, 0, 0,
+ 0, 0, 0, 283, 29, 54, 49, 48, 0, 188,
+ 52, 0, 0, 0, 136, 144, 0, 0, 268, 339,
+ 334, 0, 266, 0, 315, 0, 294, 292, 0, 297,
+ 0, 285, 308, 284, 53, 94, 122, 137, 0, 145,
+ 269, 271, 0, 329, 0, 316, 310, 0, 0, 0,
+ 298, 302, 0, 306, 0, 296, 138, 336, 0, 309,
+ 293, 0, 301, 304, 303, 305, 299, 307, 335, 300
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 2, 9, 3, 89, 6, 160, 10, 90, 189,
- 190, 191, 348, 192, 193, 194, 195, 196, 197, 198,
- 352, 353, 354, 355, 199, 200, 201, 202, 203, 204,
- 205, 206, 207, 208, 209, 210, 211, 212, 213, 292,
- 214, 241, 215, 216, 93, 94, 95, 230, 139, 140,
- 231, 96, 97, 98, 99, 161, 162, 100, 141, 101,
- 102, 242, 104, 105, 106, 107, 108, 155, 156, 245,
- 246, 326, 218, 219, 220, 221, 270, 418, 419, 222,
- 223, 224, 414, 345, 225, 226, 227, 337, 389, 390,
- 228, 109, 110
+ -1, 2, 13, 3, 107, 6, 277, 14, 108, 218,
+ 219, 220, 381, 221, 222, 223, 224, 225, 226, 227,
+ 385, 386, 387, 388, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 323,
+ 243, 273, 244, 245, 111, 112, 113, 260, 162, 163,
+ 164, 261, 114, 115, 116, 143, 191, 367, 192, 193,
+ 118, 119, 120, 121, 274, 123, 124, 125, 126, 184,
+ 185, 278, 279, 356, 419, 248, 249, 250, 251, 301,
+ 462, 463, 252, 253, 254, 457, 378, 255, 459, 481,
+ 482, 483, 484, 256, 372, 427, 428, 257, 127, 128,
+ 129, 130, 131, 451, 359, 360, 132
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -366
+#define YYPACT_NINF -392
static const yytype_int16 yypact[] =
{
- -57, -43, 62, -366, -50, -366, -30, -366, 67, 3341,
- -366, -366, -366, -366, -6, -366, -366, -366, -366, -366,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, 8, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, -65, -366, -366, 226, -366, -366, -366,
- 51, -31, -28, 6, 13, 15, -44, -366, -366, -366,
- 3341, -366, -183, -47, -29, 18, -169, -366, 140, 24,
- 24, 3460, -366, -366, -366, -24, -366, 3533, -366, -366,
- -366, 67, -366, -366, -366, 3460, -48, -366, -366, -366,
- 24, -366, 3533, -366, -366, -366, -366, -366, 67, -366,
- -366, 408, -366, -366, 55, -366, -366, -366, -366, -366,
- 3460, 200, 67, -366, -20, -18, -178, 23, -366, -366,
- -366, 2225, -366, 72, 67, 1598, -366, 3460, -366, 4,
- 10, -84, -366, 11, 14, 1059, 40, 42, 29, 1836,
- 43, 2783, 34, 54, -366, -366, -366, -366, -366, 2783,
- 2783, 2783, -366, -366, -366, -366, -366, 32, -366, 56,
- -366, -71, -366, -366, -366, 57, -81, 2969, 61, -27,
- 2783, 35, -88, -41, -70, 33, 60, 41, 59, 181,
- 180, -89, -366, -366, -168, -366, 58, 80, -366, -366,
- -366, -366, 625, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, 67, 3460, -177, 2411, 2783, -366, -366, -366,
- -366, 78, -366, -366, 81, -137, -366, -366, -366, 1717,
- -366, 201, -366, 67, -366, -366, 205, 1478, 2783, -366,
- -366, -134, 2783, -115, -366, 2039, -366, -366, -60, -366,
- 1059, -366, -366, 2783, 140, -366, -366, 2783, 85, -366,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, 2783, -366, 2783, 2783, 2783, 2783, 2783, 2783,
- 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783,
- 2783, 2783, 2783, 2783, 2783, -366, -366, -366, 86, -366,
- -366, 2597, 2783, 69, 87, -366, -366, -366, 2783, 67,
- -366, -366, -366, -366, 91, -366, -366, 2039, -59, -366,
- -46, -366, 129, 88, 67, 93, -366, 842, 89, 88,
- -366, 95, -366, 96, -37, 3155, -366, -366, -366, -366,
- -366, 35, 35, -88, -88, -41, -41, -41, -41, -70,
- -70, 33, 60, 41, 59, 181, 180, -96, -366, 2783,
- 76, 97, -366, 2783, 79, 98, -366, 2783, -366, 77,
- 101, 1059, 83, 90, 1275, -366, -366, -366, -366, -366,
- 2783, 102, -366, 2783, 108, 2783, 94, -366, 2783, -366,
- -26, 2783, 1275, 297, -366, -366, 2783, -366, -366, -366,
- -366, -366, -366, -366, 2783, -366, 100, 88, -366, 1059,
- -366, -366, -366, -366
+ -100, -8, 108, -392, -50, -392, 3, -392, -392, -392,
+ -392, 9, 127, 3234, -392, -392, 24, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, 66, 68, 74, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -80, -392, -392, 289, -392, -392, -392,
+ 109, 39, 41, 51, 60, 92, 15, -392, 3234, -392,
+ -209, 8, 12, 2, -166, -392, 150, 215, 312, 1319,
+ 312, 312, -392, 17, -392, 312, -392, -392, -392, -392,
+ -392, 154, -392, 127, 1319, 13, -392, -392, -392, -392,
+ -392, 312, -392, 312, -392, 1319, -392, -392, -392, -392,
+ -392, -64, -392, -392, 484, -392, -392, 34, 34, -392,
+ -392, -392, -392, 1319, 34, 34, 127, -392, 43, 49,
+ -161, 50, -95, -392, -392, -392, -392, -392, -392, 2373,
+ -392, 30, 141, 127, 593, -392, 1319, 33, -392, -392,
+ 35, -113, -392, -392, 36, 38, 1451, 63, 65, 47,
+ 2255, 77, 80, -392, -392, -392, -392, -392, 1801, 1801,
+ 1801, -392, -392, -392, -392, -392, 55, -392, 83, -392,
+ -33, -392, -392, -392, 59, -112, 3006, 84, -63, 1801,
+ 27, -46, -21, -81, 37, 71, 58, 70, 199, 198,
+ -90, -392, -392, -165, -392, 72, 1067, 91, -392, -392,
+ -392, -392, 726, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, 127, -392, -392, -153, 2694, 2147, -392, -392,
+ -392, -392, -392, 89, -392, 3360, -392, 94, -151, -392,
+ -392, -392, 835, -392, 78, -392, -64, -392, -392, 225,
+ 1920, 1801, -392, -392, -142, 1801, 2483, -392, -392, -97,
+ -392, 1451, -392, -392, 1801, 150, -392, -392, 1801, 97,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, 1801, -392, 1801, 1801, 1801, 1801, 1801,
+ 1801, 1801, 1801, 1801, 1801, 1801, 1801, 1801, 1801, 1801,
+ 1801, 1801, 1801, 1801, 1801, 1801, -392, -392, -392, 101,
+ 2795, 2147, 79, 107, 2147, -392, -392, -392, 127, 88,
+ 3360, 1801, 127, -392, -392, -392, -392, -392, -392, 112,
+ -392, -392, 2483, -87, -392, -82, 110, 127, 113, -392,
+ 968, 119, 110, -392, 132, -392, 133, -65, 3116, -392,
+ -392, -392, -392, -392, 27, 27, -46, -46, -21, -21,
+ -21, -21, -81, -81, 37, 71, 58, 70, 199, 198,
+ -139, -392, 1801, 93, 130, -392, 2147, 117, -392, -152,
+ -137, 266, -392, 139, -392, 1801, -392, 122, 144, 1451,
+ 125, 129, 1692, -392, -392, -392, -392, -392, 1801, 149,
+ -392, 1801, 148, 2147, 134, -392, 2147, 2029, -392, -392,
+ 153, 131, -392, -57, 1801, 1692, 365, -392, -15, -392,
+ 2147, -392, -392, -392, -392, -392, -392, -392, 2147, -392,
+ -392, -392, 2905, -392, 137, 110, -392, 1451, 1801, 140,
+ -392, -392, 1210, 1451, -7, -392, -392, -392, 157, -392,
+ -392, -133, -392, -392, -392, -392, -392, 1451, -392, -392
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -366, -366, -366, -366, -366, -366, -7, -366, -366, -62,
- -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
- -366, -366, -366, -366, -101, -366, -113, -109, -121, -61,
- 5, 3, 9, 16, 2, 7, -366, -142, -100, -366,
- -164, -225, 21, 22, -366, -366, -366, 82, 186, 173,
- 92, -366, -366, -242, -366, -366, 68, -73, -366, -366,
- -74, -9, -67, -366, -366, 243, -366, 170, -147, -366,
- 0, -298, 73, -159, -365, -58, -366, -80, 239, 63,
- 84, -366, -366, -2, -366, -366, -366, -366, -366, -366,
- -366, 246, -366
+ -392, -392, -392, -392, -392, -392, 1, -392, -392, -88,
+ -392, -392, -392, -392, -392, -392, -392, -392, -392, -392,
+ -392, -392, -392, -392, -130, -392, -114, -103, -146, -70,
+ 46, 52, 48, 45, 56, 54, -392, -170, -51, -392,
+ -193, -246, 10, 11, -392, -392, -392, -392, 232, -42,
+ -392, -392, -392, -392, -248, -11, -392, -392, 114, -392,
+ -392, -78, -392, -392, -13, -392, -392, -27, -392, 207,
+ -162, 44, 32, -86, -392, 111, -186, -391, -392, -392,
+ -56, 293, 103, 115, -392, -392, 53, -392, -392, -76,
+ -392, -77, -392, -392, -392, -392, -392, -392, 300, -392,
+ -392, -98, -392, -392, 62, -392, -392
};
/* 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 -115
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -333
static const yytype_int16 yytable[] =
{
- 103, 14, 121, 120, 312, 261, 256, 263, 248, 240,
- 324, 11, 12, 13, 119, 271, 272, 268, 301, 302,
- 235, 321, 135, 344, 382, 148, 149, 15, 16, 417,
- 91, 92, 142, 314, 130, 131, 147, 4, 236, 322,
- 152, 112, 113, 299, 300, 114, 158, 417, 143, 315,
- 239, 136, 137, 138, 1, 159, 33, 34, 35, 135,
- 36, 37, 5, 317, 329, 7, 116, 314, 281, 282,
- 283, 284, 285, 286, 287, 288, 289, 290, 266, 267,
- 330, 103, 8, 339, 123, 407, 314, 124, 136, 137,
- 138, 146, 150, 240, 338, 344, 381, 279, 340, 293,
- 341, 343, 248, 385, 153, 314, 154, 423, 111, 349,
- 425, 91, 92, 252, 297, 298, 276, 253, 430, 403,
- 277, 125, 217, 305, 306, 313, 431, 273, 126, 274,
- 127, 232, 15, 16, 239, 234, 325, 346, 391, 303,
- 304, 314, 314, 11, 12, 13, 154, 244, 154, 377,
- 133, 392, 128, 115, 404, 314, 217, 77, 78, 79,
- 399, 33, 34, 35, 400, 36, 37, 38, 39, 40,
- 157, 426, 134, 343, 151, 314, -19, 356, -20, 240,
- 365, 366, 367, 368, 361, 362, 240, 243, 317, 291,
- 363, 364, 357, 358, 359, 360, 239, 239, 239, 239,
- 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
- 239, 239, 351, 217, 378, -114, 144, 12, 145, 237,
- 239, 250, 325, 410, 232, 318, 251, 239, 254, 15,
- 16, 255, 413, 136, 137, 138, 257, 240, 258, 262,
- 154, 294, 295, 296, 369, 370, 259, 427, 217, 264,
- 265, 269, -45, 308, 275, 402, 217, 280, 33, 34,
- 35, 217, 36, 37, 38, 39, 40, 350, 121, 120,
- 433, 307, 309, 310, 311, 130, -44, 327, 239, 328,
- 334, 332, -39, 325, 379, 383, 384, 387, 396, 314,
- 394, 397, 405, 398, 411, 408, 406, 409, 412, -49,
- 420, 187, 117, 421, 118, 325, 416, 422, 325, 429,
- 424, 372, 371, 375, 233, 319, 325, 432, 373, 376,
- 229, 333, 244, 122, 325, 320, 374, 249, 217, 386,
- 335, 132, 428, 347, 415, 388, 129, 393, 217, 0,
- 0, 336, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 217, 0, 0, 217, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 217, 0, 0, 0, 0, 0, 0,
- 0, 15, 16, 17, 18, 19, 20, 163, 164, 165,
- 217, 166, 167, 168, 169, 170, 171, 172, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 0, 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, 173, 117, 75, 118, 174, 175, 176,
- 177, 178, 0, 0, 179, 180, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 76, 77, 78, 79, 0, 80, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 86, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 87, 0, 88, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
- 182, 183, 184, 185, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 186, 187, 188, 15, 16,
- 17, 18, 19, 20, 163, 164, 165, 0, 166, 167,
- 168, 169, 170, 171, 172, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 0, 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,
- 173, 117, 75, 118, 174, 175, 176, 177, 178, 0,
- 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 77, 78, 79, 0, 80, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
- 185, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 186, 187, 316, 15, 16, 17, 18, 19,
- 20, 163, 164, 165, 0, 166, 167, 168, 169, 170,
- 171, 172, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 0, 36, 37,
+ 122, -332, 117, 478, 479, 11, 158, 294, 142, 272,
+ 289, 478, 479, 16, 7, 8, 9, 299, 144, 174,
+ 353, 343, 281, 109, 110, 332, 333, 358, 171, 1,
+ 7, 8, 9, 153, 154, 159, 160, 161, 158, 173,
+ 175, 461, 177, 178, 7, 8, 9, 180, 377, 271,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 166, 345, 266, 144, 461, 173, 348, 159, 160, 161,
+ 350, 302, 303, 145, 447, 362, 167, 346, 297, 298,
+ 267, 330, 331, 10, 345, 188, 165, 345, 351, 362,
+ 4, 363, 448, 345, 135, 122, 272, 117, 373, 324,
+ 374, 441, 375, 376, 414, 449, 176, 499, 5, 285,
+ 307, 382, 358, 286, 308, 423, 259, 170, 109, 110,
+ 281, 183, 263, 264, 377, 379, 97, 98, 99, 345,
+ 165, 165, 187, 12, 182, 429, 271, 165, 165, 345,
+ 430, 247, 15, 246, 345, 336, 337, 269, 174, 344,
+ 262, 410, 190, 334, 335, 189, 133, 437, 97, 98,
+ 99, 438, -330, 134, -331, 474, 442, 265, 173, 345,
+ -332, 183, 146, 183, 147, 310, 365, 366, 322, 376,
+ 272, 328, 329, 247, 148, 246, 398, 399, 400, 401,
+ 304, 272, 305, 149, 348, 391, 392, 393, 271, 271,
+ 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
+ 271, 271, 271, 271, 394, 395, 355, 384, 17, 18,
+ 271, 7, 8, 9, -116, 150, 488, 396, 397, 480,
+ 156, 271, 453, 97, 98, 99, 151, 496, 157, 247,
+ 179, 246, 272, 456, 168, 8, 169, 35, 36, 37,
+ 181, 172, 39, 40, 41, 42, 186, 389, 325, 326,
+ 327, 475, 122, 349, -20, 415, 402, 403, 418, 183,
+ -21, 268, 390, 275, 276, 283, 284, 247, 287, 246,
+ 288, 306, 271, 247, 290, 491, 291, 190, 247, 292,
+ 246, 490, 17, 18, 411, 339, 493, 495, 295, 300,
+ 355, 296, 272, 355, -46, 311, 383, 338, 340, 341,
+ 342, 495, -45, 357, 153, 17, 18, 361, 369, -40,
+ 416, 35, 136, 137, 412, 138, 39, 40, 41, 42,
+ 445, 417, 421, 425, 443, 432, 345, 440, 141, 97,
+ 98, 99, 271, 434, 35, 136, 137, 122, 138, 39,
+ 40, 41, 42, 435, 444, 436, 106, 467, 446, 247,
+ 469, 471, 450, 452, 454, 355, 455, 247, 458, 246,
+ 460, -50, 466, 473, 485, 468, 472, 477, 431, 489,
+ 492, 498, 486, 139, 404, 140, 407, 464, 406, 258,
+ 465, 405, 355, 282, 424, 355, 355, 409, 408, 476,
+ 368, 370, 420, 155, 380, 371, 494, 497, 152, 355,
+ 0, 0, 141, 97, 98, 99, 247, 355, 246, 247,
+ 0, 246, 422, 0, 0, 426, 0, 0, 0, 0,
+ 106, 0, 0, 0, 0, 141, 97, 98, 99, 0,
+ 0, 0, 247, 0, 246, 0, 0, 0, 0, 0,
+ 0, 0, 0, 106, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 247, 0, 246, 0, 0, 247,
+ 247, 246, 246, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 247, 0, 246, 17, 18, 19,
+ 20, 21, 22, 194, 195, 196, 0, 197, 198, 199,
+ 200, 201, 0, 0, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 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, 72, 73, 74, 173, 117, 75,
- 118, 174, 175, 176, 177, 178, 0, 0, 179, 180,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 76, 77, 78,
- 79, 0, 80, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 86, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
- 0, 88, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 181, 0,
- 0, 0, 0, 0, 182, 183, 184, 185, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 186,
- 187, 395, 15, 16, 17, 18, 19, 20, 163, 164,
- 165, 0, 166, 167, 168, 169, 170, 171, 172, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 0, 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, 173, 117, 75, 118, 174, 175,
- 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 76, 77, 78, 79, 0, 80,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 86, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
- 0, 182, 183, 184, 185, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 186, 187, 15, 16,
- 17, 18, 19, 20, 163, 164, 165, 0, 166, 167,
- 168, 169, 170, 171, 172, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 0, 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,
- 173, 117, 75, 118, 174, 175, 176, 177, 178, 0,
- 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
+ 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, 202, 139, 95,
+ 140, 203, 204, 205, 206, 207, 0, 0, 208, 209,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 20,
+ 21, 22, 0, 0, 0, 0, 0, 96, 97, 98,
+ 99, 0, 100, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 106, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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, 0, 0, 95, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 76, 77, 78, 79, 0, 80, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
+ 0, 0, 0, 0, 0, 210, 0, 0, 0, 0,
+ 0, 211, 212, 213, 214, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 215, 216, 217, 17,
+ 18, 19, 20, 21, 22, 194, 195, 196, 0, 197,
+ 198, 199, 200, 201, 0, 0, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 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, 72, 73, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, 93, 94, 202,
+ 139, 95, 140, 203, 204, 205, 206, 207, 0, 0,
+ 208, 209, 0, 0, 0, 0, 0, 280, 0, 0,
+ 19, 20, 21, 22, 0, 0, 0, 0, 0, 96,
+ 97, 98, 99, 0, 100, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 106, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 0, 0,
+ 95, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 210, 0, 0,
+ 0, 0, 0, 211, 212, 213, 214, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 215, 216,
+ 347, 17, 18, 19, 20, 21, 22, 194, 195, 196,
+ 0, 197, 198, 199, 200, 201, 0, 0, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 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, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 202, 139, 95, 140, 203, 204, 205, 206, 207,
+ 17, 18, 208, 209, 0, 0, 0, 0, 0, 364,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 96, 97, 98, 99, 0, 100, 0, 0, 35,
+ 36, 37, 0, 38, 39, 40, 41, 42, 0, 106,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
- 185, 15, 16, 17, 18, 19, 20, 0, 0, 0,
- 0, 0, 186, 131, 0, 0, 0, 0, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 0, 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, 0, 117, 75, 118, 174, 175, 176,
- 177, 178, 0, 0, 179, 180, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 76, 77, 78, 79, 0, 80, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 86, 0, 17, 18, 19, 20, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 21, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 210,
+ 141, 97, 98, 99, 0, 211, 212, 213, 214, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 106, 0,
+ 215, 216, 433, 17, 18, 19, 20, 21, 22, 194,
+ 195, 196, 0, 197, 198, 199, 200, 201, 478, 479,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 0, 0, 0, 0, 0, 87, 0, 88, 0, 41,
+ 33, 34, 35, 36, 37, 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,
- 72, 73, 74, 0, 181, 75, 0, 0, 0, 0,
- 182, 183, 184, 185, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 186, 0, 0, 0, 0,
- 0, 0, 0, 0, 77, 78, 79, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 18, 19, 20, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
- 0, 0, 0, 0, 0, 87, 0, 88, 41, 42,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 202, 139, 95, 140, 203, 204, 205,
+ 206, 207, 0, 0, 208, 209, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 20, 21, 22, 0, 0,
+ 0, 0, 0, 96, 97, 98, 99, 0, 100, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 106, 0, 0, 0, 0, 0, 0, 0, 0,
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, 0, 0, 75, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 247, 0, 0,
- 0, 0, 0, 77, 78, 79, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 19, 20, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 0, 0,
- 0, 0, 0, 0, 87, 0, 88, 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, 0, 117, 75, 118, 174, 175, 176, 177, 178,
- 0, 0, 179, 180, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 331, 0, 0, 0,
- 0, 0, 77, 78, 79, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 0, 0, 95, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 87, 0, 88, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 181, 0, 0, 0, 0, 0, 182, 183,
- 184, 185, 15, 16, 17, 18, 19, 20, 0, 0,
- 0, 0, 0, 260, 0, 0, 0, 0, 0, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 0, 36, 37, 38, 39, 40,
+ 0, 210, 0, 0, 0, 0, 0, 211, 212, 213,
+ 214, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 215, 216, 17, 18, 19, 20, 21, 22,
+ 194, 195, 196, 0, 197, 198, 199, 200, 201, 0,
+ 0, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 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, 72, 73, 74, 0, 117, 75, 118, 174, 175,
- 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 342, 77, 78, 79, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 86, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 18, 19, 20, 0, 181, 0, 0, 0, 0,
- 0, 182, 183, 184, 185, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 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,
- 0, 117, 75, 118, 174, 175, 176, 177, 178, 0,
- 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 77, 78, 79, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 202, 139, 95, 140, 203, 204,
+ 205, 206, 207, 0, 0, 208, 209, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 96, 97, 98, 99, 0, 100,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 17, 18, 19, 20,
- 0, 181, 0, 0, 238, 0, 0, 182, 183, 184,
- 185, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 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, 0, 117, 75, 118,
- 174, 175, 176, 177, 178, 0, 0, 179, 180, 0,
+ 0, 0, 106, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 77, 78, 79,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 87, 0,
- 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 18, 19, 20, 0, 181, 0, 0,
- 323, 0, 0, 182, 183, 184, 185, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 41, 42,
+ 0, 0, 210, 0, 0, 0, 0, 0, 211, 212,
+ 213, 214, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 215, 216, 17, 18, 19, 20, 21,
+ 22, 194, 195, 196, 0, 197, 198, 199, 200, 201,
+ 0, 0, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 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, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 202, 139, 95, 140, 203,
+ 204, 205, 206, 207, 0, 0, 208, 209, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 20, 21, 22,
+ 0, 0, 0, 0, 0, 96, 97, 98, 99, 0,
+ 100, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 106, 0, 0, 0, 0, 0, 0,
+ 0, 0, 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, 0, 139, 95, 140, 203, 204,
+ 205, 206, 207, 0, 0, 208, 209, 0, 0, 0,
+ 0, 0, 0, 210, 0, 0, 0, 0, 0, 211,
+ 212, 213, 214, 17, 18, 19, 20, 21, 22, 0,
+ 0, 0, 0, 0, 215, 154, 0, 0, 0, 0,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 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,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 0, 139, 95, 140, 203, 204, 205,
+ 206, 207, 210, 0, 208, 209, 0, 0, 211, 212,
+ 213, 214, 0, 0, 19, 20, 21, 22, 0, 0,
+ 0, 0, 0, 96, 97, 98, 99, 0, 100, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 106, 0, 0, 0, 0, 0, 0, 0, 0,
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, 0, 117, 75, 118, 174, 175, 176, 177,
- 178, 0, 0, 179, 180, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 77, 78, 79, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 87, 0, 88, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 17, 18,
- 19, 20, 0, 181, 0, 0, 380, 0, 0, 182,
- 183, 184, 185, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 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, 0, 117,
- 75, 118, 174, 175, 176, 177, 178, 0, 0, 179,
- 180, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
- 78, 79, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 87, 0, 88, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 18, 19, 20, 0, 181,
- 0, 0, 0, 0, 0, 182, 183, 184, 185, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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, 278, 0, 117, 75, 118, 174, 175,
- 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 77, 78, 79, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 18, 19, 20, 0, 181, 0, 0, 0, 0,
- 0, 182, 183, 184, 185, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 41, 42, 43, 44,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 0, 139, 95, 140, 203, 204, 205, 206,
+ 207, 0, 0, 208, 209, 0, 0, 0, 0, 0,
+ 0, 210, 0, 0, 0, 0, 0, 211, 212, 213,
+ 214, 0, 19, 20, 21, 22, 0, 0, 0, 0,
+ 0, 0, 215, 0, 0, 0, 0, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 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, 401,
- 0, 117, 75, 118, 174, 175, 176, 177, 178, 0,
- 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 77, 78, 79, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 15, 16, 17, 18, 19, 20,
- 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
- 185, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 0, 36, 37, 38,
+ 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,
+ 0, 139, 95, 140, 203, 204, 205, 206, 207, 0,
+ 210, 208, 209, 0, 0, 0, 211, 212, 213, 214,
+ 19, 20, 21, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 354, 470, 0, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 0, 139,
+ 95, 140, 203, 204, 205, 206, 207, 0, 0, 208,
+ 209, 0, 0, 0, 0, 0, 0, 0, 210, 0,
+ 0, 0, 0, 0, 211, 212, 213, 214, 19, 20,
+ 21, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 354, 0, 0, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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, 0, 139, 95, 140,
+ 203, 204, 205, 206, 207, 0, 210, 208, 209, 0,
+ 0, 0, 211, 212, 213, 214, 17, 18, 19, 20,
+ 21, 22, 0, 0, 0, 0, 0, 293, 0, 0,
+ 0, 0, 0, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 136, 137, 0, 138,
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, 0, 0, 75, 0,
+ 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, 0, 139, 95, 140,
+ 203, 204, 205, 206, 207, 0, 0, 208, 209, 0,
+ 0, 0, 0, 0, 210, 0, 0, 270, 0, 0,
+ 211, 212, 213, 214, 0, 0, 141, 97, 98, 99,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 106, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 76, 77, 78, 79,
- 0, 80, 0, 0, 0, 0, 0, 0, 0, 81,
- 82, 83, 84, 85, 86, 17, 18, 19, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 0, 0, 0, 0, 0, 0, 87, 0,
- 88, 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, 0, 0, 75, 17, 18,
- 19, 20, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 0, 77, 78, 79, 0,
- 0, 0, 0, 0, 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, 0, 0,
- 75, 0, 0, 0, 0, 0, 0, 87, 0, 88,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 20, 21, 22, 0, 210, 0, 0, 0, 0, 0,
+ 211, 212, 213, 214, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 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, 0, 139, 95,
+ 140, 203, 204, 205, 206, 207, 0, 0, 208, 209,
+ 19, 20, 21, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 0, 139,
+ 95, 140, 203, 204, 205, 206, 207, 0, 0, 208,
+ 209, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 20, 21, 22, 0, 210, 0, 0, 352, 0,
+ 0, 211, 212, 213, 214, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 0, 139,
+ 95, 140, 203, 204, 205, 206, 207, 0, 0, 208,
+ 209, 19, 20, 21, 22, 0, 210, 0, 0, 413,
+ 0, 0, 211, 212, 213, 214, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 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, 309, 0,
+ 139, 95, 140, 203, 204, 205, 206, 207, 0, 0,
+ 208, 209, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 19, 20, 21, 22, 0, 210, 0, 0, 487,
+ 0, 0, 211, 212, 213, 214, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 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, 439, 0,
+ 139, 95, 140, 203, 204, 205, 206, 207, 0, 0,
+ 208, 209, 0, 0, 0, 0, 0, 210, 0, 0,
+ 0, 0, 0, 211, 212, 213, 214, 17, 18, 19,
+ 20, 21, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 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, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 0, 0, 95,
+ 0, 0, 0, 0, 0, 0, 0, 210, 0, 0,
+ 0, 0, 0, 211, 212, 213, 214, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 96, 97, 98,
+ 99, 0, 100, 17, 18, 19, 20, 21, 22, 0,
+ 101, 102, 103, 104, 105, 106, 0, 0, 0, 0,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 136, 137, 0, 138, 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, 0, 0, 95, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 141, 97, 98, 99, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 87, 0, 88
+ 0, 106
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-392))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int16 yycheck[] =
{
- 9, 8, 76, 76, 93, 169, 165, 171, 155, 151,
- 235, 76, 77, 78, 76, 86, 87, 181, 88, 89,
- 198, 198, 4, 265, 322, 99, 100, 3, 4, 394,
- 9, 9, 201, 201, 217, 218, 98, 80, 216, 216,
- 107, 33, 34, 84, 85, 37, 120, 412, 217, 217,
- 151, 33, 34, 35, 111, 122, 32, 33, 34, 4,
- 36, 37, 0, 222, 201, 115, 73, 201, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 179, 180,
- 217, 90, 112, 217, 115, 383, 201, 115, 33, 34,
- 35, 98, 101, 235, 258, 337, 321, 197, 262, 200,
- 215, 265, 249, 328, 111, 201, 115, 405, 114, 273,
- 408, 90, 90, 197, 202, 203, 197, 201, 416, 215,
- 201, 115, 131, 90, 91, 214, 424, 198, 115, 200,
- 115, 140, 3, 4, 235, 142, 236, 197, 197, 209,
- 210, 201, 201, 76, 77, 78, 155, 154, 157, 313,
- 197, 197, 196, 218, 379, 201, 165, 106, 107, 108,
- 197, 32, 33, 34, 201, 36, 37, 38, 39, 40,
- 218, 197, 201, 337, 198, 201, 196, 277, 196, 321,
- 301, 302, 303, 304, 297, 298, 328, 115, 347, 216,
- 299, 300, 292, 294, 295, 296, 297, 298, 299, 300,
- 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 274, 222, 314, 197, 76, 77, 78, 196,
- 321, 217, 322, 387, 233, 232, 216, 328, 217, 3,
- 4, 217, 391, 33, 34, 35, 196, 379, 196, 196,
- 249, 206, 207, 208, 305, 306, 217, 411, 257, 215,
- 196, 219, 196, 212, 197, 355, 265, 196, 32, 33,
- 34, 270, 36, 37, 38, 39, 40, 274, 342, 342,
- 429, 211, 213, 92, 94, 217, 196, 199, 379, 198,
- 75, 80, 197, 383, 198, 216, 199, 196, 199, 201,
- 197, 196, 216, 197, 217, 216, 199, 199, 197, 197,
- 400, 218, 76, 403, 78, 405, 216, 199, 408, 12,
- 216, 308, 307, 311, 141, 233, 416, 217, 309, 312,
- 134, 253, 329, 80, 424, 233, 310, 157, 337, 329,
- 257, 92, 412, 270, 392, 337, 90, 344, 347, -1,
- -1, 257, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 391, -1, -1, 394, -1, -1, -1, -1,
+ 13, 96, 13, 18, 19, 4, 4, 200, 96, 179,
+ 196, 18, 19, 12, 94, 95, 96, 210, 96, 117,
+ 266, 111, 184, 13, 13, 106, 107, 275, 116, 129,
+ 94, 95, 96, 242, 243, 33, 34, 35, 4, 117,
+ 118, 432, 120, 121, 94, 95, 96, 125, 296, 179,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 226, 226, 223, 141, 455, 143, 252, 33, 34, 35,
+ 223, 104, 105, 100, 226, 226, 242, 242, 208, 209,
+ 241, 102, 103, 133, 226, 149, 113, 226, 241, 226,
+ 98, 242, 244, 226, 93, 108, 266, 108, 291, 229,
+ 242, 240, 295, 296, 350, 242, 119, 240, 0, 222,
+ 222, 304, 360, 226, 226, 361, 158, 116, 108, 108,
+ 282, 134, 164, 165, 372, 222, 124, 125, 126, 226,
+ 157, 158, 145, 130, 133, 222, 266, 164, 165, 226,
+ 222, 154, 133, 154, 226, 108, 109, 242, 246, 239,
+ 163, 344, 151, 234, 235, 219, 132, 222, 124, 125,
+ 126, 226, 96, 243, 96, 222, 412, 166, 246, 226,
+ 96, 184, 133, 186, 133, 226, 98, 99, 241, 372,
+ 350, 227, 228, 196, 133, 196, 332, 333, 334, 335,
+ 223, 361, 225, 133, 380, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 328, 329, 267, 305, 3, 4,
+ 350, 94, 95, 96, 222, 133, 472, 330, 331, 244,
+ 222, 361, 425, 124, 125, 126, 221, 244, 226, 252,
+ 223, 252, 412, 429, 94, 95, 96, 32, 33, 34,
+ 96, 36, 37, 38, 39, 40, 243, 308, 231, 232,
+ 233, 454, 275, 262, 221, 351, 336, 337, 354, 282,
+ 221, 221, 323, 243, 133, 242, 241, 290, 242, 290,
+ 242, 222, 412, 296, 221, 478, 221, 286, 301, 242,
+ 301, 477, 3, 4, 345, 237, 482, 483, 221, 244,
+ 351, 221, 472, 354, 221, 221, 305, 236, 238, 110,
+ 112, 497, 221, 224, 242, 3, 4, 223, 93, 222,
+ 241, 32, 33, 34, 223, 36, 37, 38, 39, 40,
+ 416, 224, 244, 221, 241, 222, 226, 388, 123, 124,
+ 125, 126, 472, 224, 32, 33, 34, 360, 36, 37,
+ 38, 39, 40, 221, 224, 222, 141, 443, 241, 372,
+ 446, 447, 96, 224, 242, 416, 222, 380, 243, 380,
+ 241, 222, 224, 242, 460, 241, 223, 12, 377, 242,
+ 240, 224, 468, 94, 338, 96, 341, 438, 340, 157,
+ 441, 339, 443, 186, 362, 446, 447, 343, 342, 455,
+ 286, 290, 358, 110, 301, 290, 482, 484, 108, 460,
+ -1, -1, 123, 124, 125, 126, 429, 468, 429, 432,
+ -1, 432, 360, -1, -1, 372, -1, -1, -1, -1,
+ 141, -1, -1, -1, -1, 123, 124, 125, 126, -1,
+ -1, -1, 455, -1, 455, -1, -1, -1, -1, -1,
+ -1, -1, -1, 141, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 477, -1, 477, -1, -1, 482,
+ 483, 482, 483, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 497, -1, 497, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, -1, 13, 14, 15,
+ 16, 17, -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, 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, -1, -1, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5, 6,
+ 7, 8, -1, -1, -1, -1, -1, 123, 124, 125,
+ 126, -1, 128, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 141, -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, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, -1, -1, 95, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 412, -1, -1, -1, -1, -1, -1,
- -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 429, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ -1, -1, -1, -1, -1, 221, -1, -1, -1, -1,
+ -1, 227, 228, 229, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 242, 243, 244, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, -1, 13,
+ 14, 15, 16, 17, -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, 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, -1, -1,
+ 104, 105, -1, -1, -1, -1, -1, 244, -1, -1,
+ 5, 6, 7, 8, -1, -1, -1, -1, -1, 123,
+ 124, 125, 126, -1, 128, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 141, -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,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, -1, -1,
+ 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 221, -1, -1,
+ -1, -1, -1, 227, 228, 229, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 242, 243,
+ 244, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ -1, 13, 14, 15, 16, 17, -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, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 3, 4, 104, 105, -1, -1, -1, -1, -1, 244,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 105, 106, 107, 108, -1, 110, -1,
+ -1, 123, 124, 125, 126, -1, 128, -1, -1, 32,
+ 33, 34, -1, 36, 37, 38, 39, 40, -1, 141,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 157, -1, 159, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 196, -1, -1, -1, -1, -1,
- 202, 203, 204, 205, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 217, 218, 219, 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, 82, 83, -1,
- -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 123, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 221,
+ 123, 124, 125, 126, -1, 227, 228, 229, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 141, -1,
+ 242, 243, 244, 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, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, -1, -1, 104, 105, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5, 6, 7, 8, -1, -1,
+ -1, -1, -1, 123, 124, 125, 126, -1, 128, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 141, -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, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, -1, -1, 95, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 221, -1, -1, -1, -1, -1, 227, 228, 229,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 242, 243, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, -1, 13, 14, 15, 16, 17, -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, 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, -1, -1, 104, 105, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 123, 124, 125, 126, -1, 128,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 141, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 196, -1, -1, -1, -1, -1, 202, 203, 204,
- 205, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 217, 218, 219, 3, 4, 5, 6, 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, 221, -1, -1, -1, -1, -1, 227, 228,
+ 229, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 242, 243, 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,
+ -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, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 105, 106, 107,
- 108, -1, 110, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 123, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 157,
- -1, 159, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 196, -1,
- -1, -1, -1, -1, 202, 203, 204, 205, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 217,
- 218, 219, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, -1, 13, 14, 15, 16, 17, 18, 19, 20,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, -1, -1, 104, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5, 6, 7, 8,
+ -1, -1, -1, -1, -1, 123, 124, 125, 126, -1,
+ 128, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 141, -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, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, -1, 94, 95, 96, 97, 98,
+ 99, 100, 101, -1, -1, 104, 105, -1, -1, -1,
+ -1, -1, -1, 221, -1, -1, -1, -1, -1, 227,
+ 228, 229, 230, 3, 4, 5, 6, 7, 8, -1,
+ -1, -1, -1, -1, 242, 243, -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, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, -1, 94, 95, 96, 97, 98, 99,
+ 100, 101, 221, -1, 104, 105, -1, -1, 227, 228,
+ 229, 230, -1, -1, 5, 6, 7, 8, -1, -1,
+ -1, -1, -1, 123, 124, 125, 126, -1, 128, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 33, 34, -1, 36, 37, 38, 39, 40,
+ 31, 141, -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, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 105, 106, 107, 108, -1, 110,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 196, -1, -1, -1, -1,
- -1, 202, 203, 204, 205, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 217, 218, 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, 82, 83, -1,
- -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 123, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 196, -1, -1, -1, -1, -1, 202, 203, 204,
- 205, 3, 4, 5, 6, 7, 8, -1, -1, -1,
- -1, -1, 217, 218, -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,
- 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 105, 106, 107, 108, -1, 110, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 123, -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, 157, -1, 159, -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, 196, 77, -1, -1, -1, -1,
- 202, 203, 204, 205, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 217, -1, -1, -1, -1,
- -1, -1, -1, -1, 106, 107, 108, -1, -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,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, -1, 94, 95, 96, 97, 98, 99, 100,
+ 101, -1, -1, 104, 105, -1, -1, -1, -1, -1,
+ -1, 221, -1, -1, -1, -1, -1, 227, 228, 229,
+ 230, -1, 5, 6, 7, 8, -1, -1, -1, -1,
+ -1, -1, 242, -1, -1, -1, -1, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
- -1, -1, -1, -1, -1, 157, -1, 159, 41, 42,
+ -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, -1, 77, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 219, -1, -1,
- -1, -1, -1, 106, 107, 108, -1, -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, 157, -1, 159, 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, 82, 83,
- -1, -1, 86, 87, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 219, -1, -1, -1,
- -1, -1, 106, 107, 108, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 157, -1, 159, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 196, -1, -1, -1, -1, -1, 202, 203,
- 204, 205, 3, 4, 5, 6, 7, 8, -1, -1,
- -1, -1, -1, 217, -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, 82, 83, -1, -1, 86, 87, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 105, 106, 107, 108, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
- -1, -1, -1, -1, -1, -1, -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, 196, -1, -1, -1, -1,
- -1, 202, 203, 204, 205, 20, 21, 22, 23, 24,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ -1, 94, 95, 96, 97, 98, 99, 100, 101, -1,
+ 221, 104, 105, -1, -1, -1, 227, 228, 229, 230,
+ 5, 6, 7, 8, -1, -1, -1, -1, -1, -1,
+ -1, -1, 243, 244, -1, 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, 82, 83, -1,
- -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 106, 107, 108, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
- -1, -1, -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, 196, -1, -1, 199, -1, -1, 202, 203, 204,
- 205, 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, 82, 83, -1, -1, 86, 87, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 106, 107, 108,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 157, -1,
- 159, -1, -1, -1, -1, -1, -1, -1, -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, 196, -1, -1,
- 199, -1, -1, 202, 203, 204, 205, 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, 82,
- 83, -1, -1, 86, 87, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 106, 107, 108, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 157, -1, 159, -1, -1, -1,
- -1, -1, -1, -1, -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, 196, -1, -1, 199, -1, -1, 202,
- 203, 204, 205, 20, 21, 22, 23, 24, 25, 26,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, -1, 94,
+ 95, 96, 97, 98, 99, 100, 101, -1, -1, 104,
+ 105, -1, -1, -1, -1, -1, -1, -1, 221, -1,
+ -1, -1, -1, -1, 227, 228, 229, 230, 5, 6,
+ 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,
+ 243, -1, -1, 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, 82, 83, -1, -1, 86,
- 87, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 106,
- 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 157, -1, 159, -1, -1, -1, -1, -1, -1, -1,
- -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, 196,
- -1, -1, -1, -1, -1, 202, 203, 204, 205, 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, 82, 83, -1, -1, 86, 87, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 106, 107, 108, -1, -1,
+ 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, -1, 94, 95, 96,
+ 97, 98, 99, 100, 101, -1, 221, 104, 105, -1,
+ -1, -1, 227, 228, 229, 230, 3, 4, 5, 6,
+ 7, 8, -1, -1, -1, -1, -1, 242, -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, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, -1, 94, 95, 96,
+ 97, 98, 99, 100, 101, -1, -1, 104, 105, -1,
+ -1, -1, -1, -1, 221, -1, -1, 224, -1, -1,
+ 227, 228, 229, 230, -1, -1, 123, 124, 125, 126,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 141, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
-1, -1, -1, -1, -1, -1, -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, 196, -1, -1, -1, -1,
- -1, 202, 203, 204, 205, 20, 21, 22, 23, 24,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5,
+ 6, 7, 8, -1, 221, -1, -1, -1, -1, -1,
+ 227, 228, 229, 230, 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, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, -1, 94, 95,
+ 96, 97, 98, 99, 100, 101, -1, -1, 104, 105,
+ 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, -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, 82, 83, -1,
- -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 106, 107, 108, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
- -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, 196, -1, -1, -1, -1, -1, 202, 203, 204,
- 205, 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, -1, 77, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 105, 106, 107, 108,
- -1, 110, -1, -1, -1, -1, -1, -1, -1, 118,
- 119, 120, 121, 122, 123, 5, 6, 7, 8, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, -1, 94,
+ 95, 96, 97, 98, 99, 100, 101, -1, -1, 104,
+ 105, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, -1, 221, -1, -1, 224, -1,
+ -1, 227, 228, 229, 230, 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,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, -1, 94,
+ 95, 96, 97, 98, 99, 100, 101, -1, -1, 104,
+ 105, 5, 6, 7, 8, -1, 221, -1, -1, 224,
+ -1, -1, 227, 228, 229, 230, 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, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, -1,
+ 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
+ 104, 105, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5, 6, 7, 8, -1, 221, -1, -1, 224,
+ -1, -1, 227, 228, 229, 230, 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, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, -1,
+ 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
+ 104, 105, -1, -1, -1, -1, -1, 221, -1, -1,
+ -1, -1, -1, 227, 228, 229, 230, 3, 4, 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, 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, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, -1, -1, 95,
+ -1, -1, -1, -1, -1, -1, -1, 221, -1, -1,
+ -1, -1, -1, 227, 228, 229, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 123, 124, 125,
+ 126, -1, 128, 3, 4, 5, 6, 7, 8, -1,
+ 136, 137, 138, 139, 140, 141, -1, -1, -1, -1,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, -1, -1, -1, -1, -1, -1, 157, -1,
- 159, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 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, -1, 77, 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, 106, 107, 108, -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, -1,
- 77, -1, -1, -1, -1, -1, -1, 157, -1, 159,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, -1, -1, 95, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 123, 124, 125, 126, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 157, -1, 159
+ -1, 141
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 111, 221, 223, 80, 0, 225, 115, 112, 222,
- 227, 76, 77, 78, 226, 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, 77, 105, 106, 107, 108,
- 110, 118, 119, 120, 121, 122, 123, 157, 159, 224,
- 228, 262, 263, 264, 265, 266, 271, 272, 273, 274,
- 277, 279, 280, 281, 282, 283, 284, 285, 286, 311,
- 312, 114, 33, 34, 37, 218, 226, 76, 78, 229,
- 277, 280, 285, 115, 115, 115, 115, 115, 196, 311,
- 217, 218, 298, 197, 201, 4, 33, 34, 35, 268,
- 269, 278, 201, 217, 76, 78, 226, 229, 280, 280,
- 281, 198, 282, 226, 281, 287, 288, 218, 280, 282,
- 226, 275, 276, 9, 10, 11, 13, 14, 15, 16,
- 17, 18, 19, 75, 79, 80, 81, 82, 83, 86,
- 87, 196, 202, 203, 204, 205, 217, 218, 219, 229,
- 230, 231, 233, 234, 235, 236, 237, 238, 239, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 260, 262, 263, 281, 292, 293,
- 294, 295, 299, 300, 301, 304, 305, 306, 310, 268,
- 267, 270, 281, 269, 226, 198, 216, 196, 199, 244,
- 257, 261, 281, 115, 226, 289, 290, 219, 288, 287,
- 217, 216, 197, 201, 217, 217, 293, 196, 196, 217,
- 217, 260, 196, 260, 215, 196, 244, 244, 260, 219,
- 296, 86, 87, 198, 200, 197, 197, 201, 74, 258,
- 196, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 216, 259, 244, 206, 207, 208, 202, 203, 84,
- 85, 88, 89, 209, 210, 90, 91, 211, 212, 213,
- 92, 94, 93, 214, 201, 217, 219, 293, 226, 267,
- 270, 198, 216, 199, 261, 258, 291, 199, 198, 201,
- 217, 219, 80, 276, 75, 292, 300, 307, 260, 217,
- 260, 215, 105, 260, 273, 303, 197, 299, 232, 260,
- 226, 229, 240, 241, 242, 243, 258, 258, 244, 244,
- 244, 246, 246, 247, 247, 248, 248, 248, 248, 249,
- 249, 250, 251, 252, 253, 254, 255, 260, 258, 198,
- 199, 261, 291, 216, 199, 261, 290, 196, 303, 308,
- 309, 197, 197, 226, 197, 219, 199, 196, 197, 197,
- 201, 74, 258, 215, 261, 216, 199, 291, 216, 199,
- 260, 217, 197, 293, 302, 295, 216, 294, 297, 298,
- 258, 258, 199, 291, 216, 291, 197, 260, 297, 12,
- 291, 291, 217, 293
+ 0, 129, 246, 248, 98, 0, 250, 94, 95, 96,
+ 133, 251, 130, 247, 252, 133, 251, 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, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 95, 123, 124, 125, 126,
+ 128, 136, 137, 138, 139, 140, 141, 249, 253, 287,
+ 288, 289, 290, 291, 297, 298, 299, 300, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 343, 344, 345,
+ 346, 347, 351, 132, 243, 251, 33, 34, 36, 94,
+ 96, 123, 254, 300, 306, 312, 133, 133, 133, 133,
+ 133, 221, 343, 242, 243, 326, 222, 226, 4, 33,
+ 34, 35, 293, 294, 295, 312, 226, 242, 94, 96,
+ 251, 254, 36, 306, 346, 306, 309, 306, 306, 223,
+ 306, 96, 251, 309, 314, 315, 243, 309, 149, 219,
+ 251, 301, 303, 304, 9, 10, 11, 13, 14, 15,
+ 16, 17, 93, 97, 98, 99, 100, 101, 104, 105,
+ 221, 227, 228, 229, 230, 242, 243, 244, 254, 255,
+ 256, 258, 259, 260, 261, 262, 263, 264, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 285, 287, 288, 300, 309, 320, 321,
+ 322, 323, 327, 328, 329, 332, 338, 342, 293, 294,
+ 292, 296, 309, 294, 294, 251, 223, 241, 221, 242,
+ 224, 269, 282, 286, 309, 243, 133, 251, 316, 317,
+ 244, 315, 314, 242, 241, 222, 226, 242, 242, 321,
+ 221, 221, 242, 242, 285, 221, 221, 269, 269, 285,
+ 244, 324, 104, 105, 223, 225, 222, 222, 226, 92,
+ 283, 221, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 241, 284, 269, 231, 232, 233, 227, 228,
+ 102, 103, 106, 107, 234, 235, 108, 109, 236, 237,
+ 238, 110, 112, 111, 239, 226, 242, 244, 321, 251,
+ 223, 241, 224, 286, 243, 283, 318, 224, 299, 349,
+ 350, 223, 226, 242, 244, 98, 99, 302, 303, 93,
+ 320, 328, 339, 285, 242, 285, 285, 299, 331, 222,
+ 327, 257, 285, 251, 254, 265, 266, 267, 268, 283,
+ 283, 269, 269, 269, 271, 271, 272, 272, 273, 273,
+ 273, 273, 274, 274, 275, 276, 277, 278, 279, 280,
+ 285, 283, 223, 224, 286, 318, 241, 224, 318, 319,
+ 316, 244, 349, 286, 317, 221, 331, 340, 341, 222,
+ 222, 251, 222, 244, 224, 221, 222, 222, 226, 92,
+ 283, 240, 286, 241, 224, 318, 241, 226, 244, 242,
+ 96, 348, 224, 285, 242, 222, 321, 330, 243, 333,
+ 241, 322, 325, 326, 283, 283, 224, 318, 241, 318,
+ 244, 318, 223, 242, 222, 285, 325, 12, 18, 19,
+ 244, 334, 335, 336, 337, 318, 318, 224, 286, 242,
+ 321, 285, 240, 321, 334, 321, 244, 336, 224, 240
};
#define yyerrok (yyerrstatus = 0)
@@ -2157,24 +2076,33 @@ static const yytype_uint16 yystos[] =
/* 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. */
+ 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 \
- { \
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
@@ -2184,39 +2112,40 @@ 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; \
- } \
+# 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
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
/* 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 YYLTYPE_IS_TRIVIAL
+# 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, \
@@ -2232,7 +2161,7 @@ while (YYID (0))
#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
#else
-# define YYLEX yylex (&yylval, &yylloc, scanner)
+# define YYLEX yylex (&yylval, &yylloc, state)
#endif
/* Enable debugging if requested. */
@@ -2280,6 +2209,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state)
struct _mesa_glsl_parse_state *state;
#endif
{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
if (!yyvaluep)
return;
YYUSE (yylocationp);
@@ -2335,17 +2266,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2381,11 +2315,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, state)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , state);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2422,7 +2356,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -2525,115 +2458,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# 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];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- 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;
- }
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULL;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ 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 yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- 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;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* 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 = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -2669,25 +2629,6 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, state)
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 */
-
-
@@ -2718,93 +2659,102 @@ yyparse (state)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ /* 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. */
+ 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 YYLTYPE_IS_TRIVIAL
+
+#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 = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
-
- /* User initialization code. */
-#line 41 "glsl_parser.yy"
+/* User initialization code. */
+/* Line 1572 of yacc.c */
+#line 54 "glsl_parser.yy"
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -2812,8 +2762,8 @@ YYLTYPE yylloc;
yylloc.last_column = 1;
yylloc.source = 0;
}
-/* Line 1078 of yacc.c. */
-#line 2817 "glsl_parser.cpp"
+/* Line 1572 of yacc.c */
+#line 2767 "glsl_parser.cpp"
yylsp[0] = yylloc;
goto yysetstate;
@@ -2851,6 +2801,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2872,9 +2823,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2895,6 +2846,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2903,16 +2857,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2938,26 +2892,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -2998,1951 +2948,2807 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 218 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 263 "glsl_parser.yy"
{
- _mesa_glsl_initialize_types(state);
- ;}
+ _mesa_glsl_initialize_types(state);
+ }
break;
case 3:
-#line 222 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 267 "glsl_parser.yy"
{
- delete state->symbols;
- state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
- _mesa_glsl_initialize_types(state);
- ;}
+ delete state->symbols;
+ state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
+ _mesa_glsl_initialize_types(state);
+ }
break;
case 5:
-#line 232 "glsl_parser.yy"
- {
- bool supported = false;
-
- switch ((yyvsp[(2) - (3)].n)) {
- case 100:
- state->es_shader = true;
- supported = state->Const.GLSL_100ES;
- break;
- case 110:
- supported = state->Const.GLSL_110;
- break;
- case 120:
- supported = state->Const.GLSL_120;
- break;
- case 130:
- supported = state->Const.GLSL_130;
- break;
- default:
- supported = false;
- break;
- }
-
- state->language_version = (yyvsp[(2) - (3)].n);
- state->version_string =
- ralloc_asprintf(state, "GLSL%s %d.%02d",
- state->es_shader ? " ES" : "",
- state->language_version / 100,
- state->language_version % 100);
-
- if (!supported) {
- _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "%s is not supported. "
- "Supported versions are: %s\n",
- state->version_string,
- state->supported_version_string);
- }
- ;}
- break;
-
- case 10:
-#line 276 "glsl_parser.yy"
- {
- if (state->language_version < 120) {
- _mesa_glsl_warning(& (yylsp[(1) - (2)]), state,
- "pragma `invariant(all)' not supported in %s",
- state->version_string);
- } else {
- state->all_invariant = true;
- }
- ;}
- break;
-
- case 16:
-#line 300 "glsl_parser.yy"
- {
- if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
- YYERROR;
- }
- ;}
+/* Line 1787 of yacc.c */
+#line 277 "glsl_parser.yy"
+ {
+ state->process_version_directive(&(yylsp[(2) - (3)]), (yyvsp[(2) - (3)].n), NULL);
+ if (state->error) {
+ YYERROR;
+ }
+ }
+ break;
+
+ case 6:
+/* Line 1787 of yacc.c */
+#line 284 "glsl_parser.yy"
+ {
+ state->process_version_directive(&(yylsp[(2) - (4)]), (yyvsp[(2) - (4)].n), (yyvsp[(3) - (4)].identifier));
+ if (state->error) {
+ YYERROR;
+ }
+ }
+ break;
+
+ case 11:
+/* Line 1787 of yacc.c */
+#line 298 "glsl_parser.yy"
+ {
+ if (!state->is_version(120, 100)) {
+ _mesa_glsl_warning(& (yylsp[(1) - (2)]), state,
+ "pragma `invariant(all)' not supported in %s "
+ "(GLSL ES 1.00 or GLSL 1.20 required).",
+ state->get_version_string());
+ } else {
+ state->all_invariant = true;
+ }
+ }
break;
case 17:
-#line 309 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 323 "glsl_parser.yy"
{
- /* FINISHME: The NULL test is required because pragmas are set to
- * FINISHME: NULL. (See production rule for external_declaration.)
- */
- if ((yyvsp[(1) - (1)].node) != NULL)
- state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link);
- ;}
+ if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
+ YYERROR;
+ }
+ }
break;
case 18:
-#line 317 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 332 "glsl_parser.yy"
{
- /* FINISHME: The NULL test is required because pragmas are set to
- * FINISHME: NULL. (See production rule for external_declaration.)
- */
- if ((yyvsp[(2) - (2)].node) != NULL)
- state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link);
- ;}
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
+ */
+ if ((yyvsp[(1) - (1)].node) != NULL)
+ state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link);
+ }
break;
- case 21:
-#line 333 "glsl_parser.yy"
+ case 19:
+/* Line 1787 of yacc.c */
+#line 340 "glsl_parser.yy"
{
- 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);
- ;}
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
+ */
+ if ((yyvsp[(2) - (2)].node) != NULL)
+ state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link);
+ }
break;
case 22:
-#line 340 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 356 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 23:
-#line 347 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 363 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 24:
-#line 354 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 370 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 25:
-#line 361 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 377 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 26:
-#line 368 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 384 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(2) - (3)].expression);
- ;}
+ 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 28:
-#line 376 "glsl_parser.yy"
+ case 27:
+/* Line 1787 of yacc.c */
+#line 391 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.expression) = (yyvsp[(2) - (3)].expression);
+ }
break;
case 29:
-#line 382 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 399 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(1) - (1)].expression);
- ;}
+ 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 30:
-#line 386 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 405 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (1)].expression);
+ }
break;
case 31:
-#line 393 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 409 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL);
- (yyval.expression)->set_location(yylloc);
- ;}
+ 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 32:
-#line 399 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 416 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL);
- (yyval.expression)->set_location(yylloc);
- ;}
+ 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 36:
-#line 417 "glsl_parser.yy"
+ case 33:
+/* Line 1787 of yacc.c */
+#line 422 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 41:
-#line 436 "glsl_parser.yy"
+ case 37:
+/* Line 1787 of yacc.c */
+#line 440 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(1) - (2)].expression);
- (yyval.expression)->set_location(yylloc);
- (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
- ;}
+ 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 42:
-#line 442 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 459 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(1) - (3)].expression);
- (yyval.expression)->set_location(yylloc);
- (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (2)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
+ }
break;
- case 44:
-#line 458 "glsl_parser.yy"
+ case 43:
+/* Line 1787 of yacc.c */
+#line 465 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier));
- (yyval.expression)->set_location(yylloc);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (3)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
+ }
break;
case 45:
-#line 464 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 481 "glsl_parser.yy"
{
- 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);
- ;}
+ void *ctx = state;
+ (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier));
+ (yyval.expression)->set_location(yylloc);
+ }
break;
case 46:
-#line 471 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 487 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 51:
-#line 491 "glsl_parser.yy"
+ case 47:
+/* Line 1787 of yacc.c */
+#line 494 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(1) - (2)].expression);
- (yyval.expression)->set_location(yylloc);
- (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
- ;}
+ 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 52:
-#line 497 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 514 "glsl_parser.yy"
{
- (yyval.expression) = (yyvsp[(1) - (3)].expression);
- (yyval.expression)->set_location(yylloc);
- (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (2)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
+ }
break;
case 53:
-#line 509 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 520 "glsl_parser.yy"
{
- void *ctx = state;
- ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier));
- (yyval.expression) = new(ctx) ast_function_expression(callee);
- (yyval.expression)->set_location(yylloc);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (3)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
+ }
break;
- case 55:
-#line 521 "glsl_parser.yy"
+ case 54:
+/* Line 1787 of yacc.c */
+#line 532 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL);
- (yyval.expression)->set_location(yylloc);
- ;}
+ void *ctx = state;
+ ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier));
+ (yyval.expression) = new(ctx) ast_function_expression(callee);
+ (yyval.expression)->set_location(yylloc);
+ }
break;
case 56:
-#line 527 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 544 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL);
- (yyval.expression)->set_location(yylloc);
- ;}
+ 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 57:
-#line 533 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 550 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL);
- (yyval.expression)->set_location(yylloc);
- ;}
+ 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 58:
-#line 542 "glsl_parser.yy"
- { (yyval.n) = ast_plus; ;}
+/* Line 1787 of yacc.c */
+#line 556 "glsl_parser.yy"
+ {
+ 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 59:
-#line 543 "glsl_parser.yy"
- { (yyval.n) = ast_neg; ;}
+/* Line 1787 of yacc.c */
+#line 565 "glsl_parser.yy"
+ { (yyval.n) = ast_plus; }
break;
case 60:
-#line 544 "glsl_parser.yy"
- { (yyval.n) = ast_logic_not; ;}
+/* Line 1787 of yacc.c */
+#line 566 "glsl_parser.yy"
+ { (yyval.n) = ast_neg; }
break;
case 61:
-#line 545 "glsl_parser.yy"
- { (yyval.n) = ast_bit_not; ;}
+/* Line 1787 of yacc.c */
+#line 567 "glsl_parser.yy"
+ { (yyval.n) = ast_logic_not; }
break;
- case 63:
-#line 551 "glsl_parser.yy"
- {
- 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);
- ;}
+ case 62:
+/* Line 1787 of yacc.c */
+#line 568 "glsl_parser.yy"
+ { (yyval.n) = ast_bit_not; }
break;
case 64:
-#line 557 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 574 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 65:
-#line 563 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 580 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 67:
-#line 573 "glsl_parser.yy"
+ case 66:
+/* Line 1787 of yacc.c */
+#line 586 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 68:
-#line 579 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 596 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 70:
-#line 589 "glsl_parser.yy"
+ case 69:
+/* Line 1787 of yacc.c */
+#line 602 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 71:
-#line 595 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 612 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 73:
-#line 605 "glsl_parser.yy"
+ case 72:
+/* Line 1787 of yacc.c */
+#line 618 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 74:
-#line 611 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 628 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 75:
-#line 617 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 634 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 76:
-#line 623 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 640 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 78:
-#line 633 "glsl_parser.yy"
+ case 77:
+/* Line 1787 of yacc.c */
+#line 646 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 79:
-#line 639 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 656 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 81:
-#line 649 "glsl_parser.yy"
+ case 80:
+/* Line 1787 of yacc.c */
+#line 662 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 83:
-#line 659 "glsl_parser.yy"
+ case 82:
+/* Line 1787 of yacc.c */
+#line 672 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 85:
-#line 669 "glsl_parser.yy"
+ case 84:
+/* Line 1787 of yacc.c */
+#line 682 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 87:
-#line 679 "glsl_parser.yy"
+ case 86:
+/* Line 1787 of yacc.c */
+#line 692 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 89:
-#line 689 "glsl_parser.yy"
+ case 88:
+/* Line 1787 of yacc.c */
+#line 702 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 91:
-#line 699 "glsl_parser.yy"
+ case 90:
+/* Line 1787 of yacc.c */
+#line 712 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 93:
-#line 709 "glsl_parser.yy"
+ case 92:
+/* Line 1787 of yacc.c */
+#line 722 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 95:
-#line 719 "glsl_parser.yy"
+ case 94:
+/* Line 1787 of yacc.c */
+#line 732 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 96:
-#line 727 "glsl_parser.yy"
- { (yyval.n) = ast_assign; ;}
+/* Line 1787 of yacc.c */
+#line 742 "glsl_parser.yy"
+ {
+ 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 97:
-#line 728 "glsl_parser.yy"
- { (yyval.n) = ast_mul_assign; ;}
+/* Line 1787 of yacc.c */
+#line 750 "glsl_parser.yy"
+ { (yyval.n) = ast_assign; }
break;
case 98:
-#line 729 "glsl_parser.yy"
- { (yyval.n) = ast_div_assign; ;}
+/* Line 1787 of yacc.c */
+#line 751 "glsl_parser.yy"
+ { (yyval.n) = ast_mul_assign; }
break;
case 99:
-#line 730 "glsl_parser.yy"
- { (yyval.n) = ast_mod_assign; ;}
+/* Line 1787 of yacc.c */
+#line 752 "glsl_parser.yy"
+ { (yyval.n) = ast_div_assign; }
break;
case 100:
-#line 731 "glsl_parser.yy"
- { (yyval.n) = ast_add_assign; ;}
+/* Line 1787 of yacc.c */
+#line 753 "glsl_parser.yy"
+ { (yyval.n) = ast_mod_assign; }
break;
case 101:
-#line 732 "glsl_parser.yy"
- { (yyval.n) = ast_sub_assign; ;}
+/* Line 1787 of yacc.c */
+#line 754 "glsl_parser.yy"
+ { (yyval.n) = ast_add_assign; }
break;
case 102:
-#line 733 "glsl_parser.yy"
- { (yyval.n) = ast_ls_assign; ;}
+/* Line 1787 of yacc.c */
+#line 755 "glsl_parser.yy"
+ { (yyval.n) = ast_sub_assign; }
break;
case 103:
-#line 734 "glsl_parser.yy"
- { (yyval.n) = ast_rs_assign; ;}
+/* Line 1787 of yacc.c */
+#line 756 "glsl_parser.yy"
+ { (yyval.n) = ast_ls_assign; }
break;
case 104:
-#line 735 "glsl_parser.yy"
- { (yyval.n) = ast_and_assign; ;}
+/* Line 1787 of yacc.c */
+#line 757 "glsl_parser.yy"
+ { (yyval.n) = ast_rs_assign; }
break;
case 105:
-#line 736 "glsl_parser.yy"
- { (yyval.n) = ast_xor_assign; ;}
+/* Line 1787 of yacc.c */
+#line 758 "glsl_parser.yy"
+ { (yyval.n) = ast_and_assign; }
break;
case 106:
-#line 737 "glsl_parser.yy"
- { (yyval.n) = ast_or_assign; ;}
+/* Line 1787 of yacc.c */
+#line 759 "glsl_parser.yy"
+ { (yyval.n) = ast_xor_assign; }
break;
case 107:
-#line 742 "glsl_parser.yy"
- {
- (yyval.expression) = (yyvsp[(1) - (1)].expression);
- ;}
+/* Line 1787 of yacc.c */
+#line 760 "glsl_parser.yy"
+ { (yyval.n) = ast_or_assign; }
break;
case 108:
-#line 746 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 765 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.expression) = (yyvsp[(1) - (1)].expression);
+ }
break;
- case 110:
-#line 766 "glsl_parser.yy"
+ case 109:
+/* Line 1787 of yacc.c */
+#line 769 "glsl_parser.yy"
{
- state->symbols->pop_scope();
- (yyval.node) = (yyvsp[(1) - (2)].function);
- ;}
+ 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 111:
-#line 771 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 789 "glsl_parser.yy"
{
- (yyval.node) = (yyvsp[(1) - (2)].declarator_list);
- ;}
+ state->symbols->pop_scope();
+ (yyval.node) = (yyvsp[(1) - (2)].function);
+ }
break;
case 112:
-#line 775 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 794 "glsl_parser.yy"
{
- (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n);
- (yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true;
- (yyval.node) = (yyvsp[(3) - (4)].type_specifier);
- ;}
+ (yyval.node) = (yyvsp[(1) - (2)].declarator_list);
+ }
break;
- case 116:
-#line 793 "glsl_parser.yy"
+ case 113:
+/* Line 1787 of yacc.c */
+#line 798 "glsl_parser.yy"
{
- (yyval.function) = (yyvsp[(1) - (2)].function);
- (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link);
- ;}
+ (yyvsp[(3) - (4)].type_specifier)->default_precision = (yyvsp[(2) - (4)].n);
+ (yyval.node) = (yyvsp[(3) - (4)].type_specifier);
+ }
break;
- case 117:
-#line 798 "glsl_parser.yy"
+ case 114:
+/* Line 1787 of yacc.c */
+#line 803 "glsl_parser.yy"
{
- (yyval.function) = (yyvsp[(1) - (3)].function);
- (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link);
- ;}
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
break;
case 118:
-#line 806 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 819 "glsl_parser.yy"
{
- 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);
-
- state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier)));
- state->symbols->push_scope();
- ;}
+ (yyval.function) = (yyvsp[(1) - (2)].function);
+ (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link);
+ }
break;
case 119:
-#line 820 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 824 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.function) = (yyvsp[(1) - (3)].function);
+ (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link);
+ }
break;
case 120:
-#line 830 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 832 "glsl_parser.yy"
{
- 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);
- ;}
+ 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);
+
+ state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier)));
+ state->symbols->push_scope();
+ }
break;
case 121:
-#line 845 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 846 "glsl_parser.yy"
{
- (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);
- ;}
+ 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 122:
-#line 852 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 856 "glsl_parser.yy"
{
- (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator);
- (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
- ;}
+ 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 123:
-#line 857 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 871 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator);
+ (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
+ }
break;
case 124:
-#line 868 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 876 "glsl_parser.yy"
{
- 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);
- ;}
+ 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 125:
-#line 880 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 888 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ }
break;
case 126:
-#line 884 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 892 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.in = 1;
- ;}
+ if ((yyvsp[(2) - (2)].type_qualifier).flags.q.constant)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "duplicate const qualifier.\n");
+
+ (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
+ (yyval.type_qualifier).flags.q.constant = 1;
+ }
break;
case 127:
-#line 889 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 900 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.out = 1;
- ;}
+ if (((yyvsp[(1) - (2)].type_qualifier).flags.q.in || (yyvsp[(1) - (2)].type_qualifier).flags.q.out) && ((yyvsp[(2) - (2)].type_qualifier).flags.q.in || (yyvsp[(2) - (2)].type_qualifier).flags.q.out))
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "duplicate in/out/inout qualifier\n");
+
+ if (!state->ARB_shading_language_420pack_enable && (yyvsp[(2) - (2)].type_qualifier).flags.q.constant)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "const must be specified before "
+ "in/out/inout.\n");
+
+ (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
+ (yyval.type_qualifier).merge_qualifier(&(yylsp[(1) - (2)]), state, (yyvsp[(2) - (2)].type_qualifier));
+ }
break;
case 128:
-#line 894 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 912 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.in = 1;
- (yyval.type_qualifier).flags.q.out = 1;
- ;}
- break;
+ if ((yyvsp[(2) - (2)].type_qualifier).precision != ast_precision_none)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate precision qualifier.\n");
- case 131:
-#line 908 "glsl_parser.yy"
- {
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL);
- decl->set_location(yylloc);
+ if (!state->ARB_shading_language_420pack_enable && (yyvsp[(2) - (2)].type_qualifier).flags.i != 0)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Precision qualifiers must come last.\n");
- (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto));
- ;}
+ (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
+ (yyval.type_qualifier).precision = (yyvsp[(1) - (2)].n);
+ }
break;
- case 132:
-#line 918 "glsl_parser.yy"
+ case 129:
+/* Line 1787 of yacc.c */
+#line 925 "glsl_parser.yy"
{
- 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);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.in = 1;
+ }
break;
- case 133:
-#line 928 "glsl_parser.yy"
+ case 130:
+/* Line 1787 of yacc.c */
+#line 930 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL);
- decl->set_location(yylloc);
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.out = 1;
+ }
+ break;
- (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto));
- ;}
+ case 131:
+/* Line 1787 of yacc.c */
+#line 935 "glsl_parser.yy"
+ {
+ 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 134:
-#line 938 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 949 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression));
- decl->set_location(yylloc);
+ 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) - (7)].declarator_list);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto));
- ;}
+ (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
+ (yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto));
+ }
break;
case 135:
-#line 948 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 959 "glsl_parser.yy"
{
- 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);
+ 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) - (8)].declarator_list);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto));
- ;}
+ (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
+ (yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
+ }
break;
case 136:
-#line 958 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 969 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression));
- decl->set_location(yylloc);
+ 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) - (5)].declarator_list);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
- ;}
+ (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
+ (yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto));
+ }
break;
case 137:
-#line 972 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 979 "glsl_parser.yy"
{
- void *ctx = state;
- /* Empty declaration list is valid. */
- (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type));
- (yyval.declarator_list)->set_location(yylloc);
- ;}
+ 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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto));
+ if ((yyvsp[(7) - (7)].expression)->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)(yyvsp[(7) - (7)].expression);
+ ast_type_specifier *type = new(ctx) ast_type_specifier((yyvsp[(1) - (7)].declarator_list)->type->specifier, true, NULL);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
break;
case 138:
-#line 979 "glsl_parser.yy"
- {
- 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);
- ;}
+/* Line 1787 of yacc.c */
+#line 994 "glsl_parser.yy"
+ {
+ 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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto));
+ if ((yyvsp[(8) - (8)].expression)->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)(yyvsp[(8) - (8)].expression);
+ ast_type_specifier *type = new(ctx) ast_type_specifier((yyvsp[(1) - (8)].declarator_list)->type->specifier, true, (yyvsp[(5) - (8)].expression));
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
break;
case 139:
-#line 988 "glsl_parser.yy"
- {
- 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);
- ;}
+/* Line 1787 of yacc.c */
+#line 1009 "glsl_parser.yy"
+ {
+ 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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
+ if ((yyvsp[(5) - (5)].expression)->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)(yyvsp[(5) - (5)].expression);
+ _mesa_ast_set_aggregate_type((yyvsp[(1) - (5)].declarator_list)->type->specifier, ai, state);
+ }
+ }
break;
case 140:
-#line 997 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1027 "glsl_parser.yy"
{
- 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);
- ;}
+ void *ctx = state;
+ /* Empty declaration list is valid. */
+ (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type));
+ (yyval.declarator_list)->set_location(yylloc);
+ }
break;
case 141:
-#line 1006 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1034 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression));
+ 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) - (6)].fully_specified_type));
- (yyval.declarator_list)->set_location(yylloc);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ (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 142:
-#line 1015 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1043 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression));
+ 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) - (7)].fully_specified_type));
- (yyval.declarator_list)->set_location(yylloc);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ (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 143:
-#line 1024 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1052 "glsl_parser.yy"
{
- void *ctx = state;
- ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression));
+ 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) - (4)].fully_specified_type));
- (yyval.declarator_list)->set_location(yylloc);
- (yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ (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 144:
-#line 1033 "glsl_parser.yy"
- {
- 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);
- ;}
+/* Line 1787 of yacc.c */
+#line 1061 "glsl_parser.yy"
+ {
+ 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);
+ if ((yyvsp[(6) - (6)].expression)->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)(yyvsp[(6) - (6)].expression);
+ ast_type_specifier *type = new(ctx) ast_type_specifier((yyvsp[(1) - (6)].fully_specified_type)->specifier, true, NULL);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
break;
case 145:
-#line 1047 "glsl_parser.yy"
- {
- 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);
- ;}
+/* Line 1787 of yacc.c */
+#line 1075 "glsl_parser.yy"
+ {
+ 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);
+ if ((yyvsp[(7) - (7)].expression)->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)(yyvsp[(7) - (7)].expression);
+ ast_type_specifier *type = new(ctx) ast_type_specifier((yyvsp[(1) - (7)].fully_specified_type)->specifier, true, (yyvsp[(4) - (7)].expression));
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
break;
case 146:
-#line 1054 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1089 "glsl_parser.yy"
{
- 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);
- ;}
+ 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);
+ if ((yyvsp[(4) - (4)].expression)->oper == ast_aggregate) {
+ _mesa_ast_set_aggregate_type((yyvsp[(1) - (4)].fully_specified_type)->specifier, (yyvsp[(4) - (4)].expression), state);
+ }
+ }
break;
case 147:
-#line 1065 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1101 "glsl_parser.yy"
{
- (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
- ;}
- break;
+ void *ctx = state;
+ ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL);
- case 149:
-#line 1073 "glsl_parser.yy"
- {
- 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.declarator_list) = new(ctx) ast_declarator_list(NULL);
+ (yyval.declarator_list)->set_location(yylloc);
+ (yyval.declarator_list)->invariant = true;
- (yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i;
+ (yyval.declarator_list)->declarations.push_tail(&decl->link);
+ }
+ break;
- if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location)
- (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location;
+ case 148:
+/* Line 1787 of yacc.c */
+#line 1115 "glsl_parser.yy"
+ {
+ 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;
- if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location)
- (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location;
- ;}
+ case 149:
+/* Line 1787 of yacc.c */
+#line 1122 "glsl_parser.yy"
+ {
+ 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 150:
-#line 1092 "glsl_parser.yy"
- {
- bool got_one = false;
-
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
-
- /* Layout qualifiers for ARB_fragment_coord_conventions. */
- if (!got_one && 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 (got_one && 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));
- }
- }
-
- /* Layout qualifiers for AMD_conservative_depth. */
- if (!got_one && state->AMD_conservative_depth_enable) {
- if (strcmp((yyvsp[(1) - (1)].identifier), "depth_any") == 0) {
- got_one = true;
- (yyval.type_qualifier).flags.q.depth_any = 1;
- } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_greater") == 0) {
- got_one = true;
- (yyval.type_qualifier).flags.q.depth_greater = 1;
- } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_less") == 0) {
- got_one = true;
- (yyval.type_qualifier).flags.q.depth_less = 1;
- } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_unchanged") == 0) {
- got_one = true;
- (yyval.type_qualifier).flags.q.depth_unchanged = 1;
- }
-
- if (got_one && state->AMD_conservative_depth_warn) {
- _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
- "GL_AMD_conservative_depth "
- "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier));
- }
- }
-
- if (!got_one) {
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier "
- "`%s'\n", (yyvsp[(1) - (1)].identifier));
- YYERROR;
- }
- ;}
- break;
-
- case 151:
-#line 1144 "glsl_parser.yy"
- {
- 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));
- }
- ;}
+/* Line 1787 of yacc.c */
+#line 1133 "glsl_parser.yy"
+ {
+ (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
+ }
break;
case 152:
-#line 1185 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1141 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.smooth = 1;
- ;}
+ (yyval.type_qualifier) = (yyvsp[(1) - (3)].type_qualifier);
+ if (!(yyval.type_qualifier).merge_qualifier(& (yylsp[(3) - (3)]), state, (yyvsp[(3) - (3)].type_qualifier))) {
+ YYERROR;
+ }
+ }
break;
case 153:
-#line 1190 "glsl_parser.yy"
- {
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.flat = 1;
- ;}
+/* Line 1787 of yacc.c */
+#line 1150 "glsl_parser.yy"
+ { (yyval.n) = (yyvsp[(1) - (1)].n); }
break;
case 154:
-#line 1195 "glsl_parser.yy"
- {
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.noperspective = 1;
- ;}
+/* Line 1787 of yacc.c */
+#line 1151 "glsl_parser.yy"
+ { (yyval.n) = (yyvsp[(1) - (1)].n); }
break;
case 155:
-#line 1203 "glsl_parser.yy"
- {
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.constant = 1;
- ;}
- break;
+/* Line 1787 of yacc.c */
+#line 1156 "glsl_parser.yy"
+ {
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+
+ /* Layout qualifiers for ARB_fragment_coord_conventions. */
+ if (!(yyval.type_qualifier).flags.i && state->ARB_fragment_coord_conventions_enable) {
+ if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) {
+ (yyval.type_qualifier).flags.q.origin_upper_left = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) {
+ (yyval.type_qualifier).flags.q.pixel_center_integer = 1;
+ }
+
+ if ((yyval.type_qualifier).flags.i && 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));
+ }
+ }
- case 158:
-#line 1213 "glsl_parser.yy"
- {
- (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
- (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
- ;}
- break;
+ /* Layout qualifiers for AMD/ARB_conservative_depth. */
+ if (!(yyval.type_qualifier).flags.i &&
+ (state->AMD_conservative_depth_enable ||
+ state->ARB_conservative_depth_enable)) {
+ if (strcmp((yyvsp[(1) - (1)].identifier), "depth_any") == 0) {
+ (yyval.type_qualifier).flags.q.depth_any = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_greater") == 0) {
+ (yyval.type_qualifier).flags.q.depth_greater = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_less") == 0) {
+ (yyval.type_qualifier).flags.q.depth_less = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_unchanged") == 0) {
+ (yyval.type_qualifier).flags.q.depth_unchanged = 1;
+ }
+
+ if ((yyval.type_qualifier).flags.i && state->AMD_conservative_depth_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "GL_AMD_conservative_depth "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier));
+ }
+ if ((yyval.type_qualifier).flags.i && state->ARB_conservative_depth_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "GL_ARB_conservative_depth "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier));
+ }
+ }
- case 160:
-#line 1219 "glsl_parser.yy"
- {
- (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
- (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
- ;}
- break;
+ /* See also interface_block_layout_qualifier. */
+ if (!(yyval.type_qualifier).flags.i && state->ARB_uniform_buffer_object_enable) {
+ if (strcmp((yyvsp[(1) - (1)].identifier), "std140") == 0) {
+ (yyval.type_qualifier).flags.q.std140 = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "shared") == 0) {
+ (yyval.type_qualifier).flags.q.shared = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "column_major") == 0) {
+ (yyval.type_qualifier).flags.q.column_major = 1;
+ /* "row_major" is a reserved word in GLSL 1.30+. Its token is parsed
+ * below in the interface_block_layout_qualifier rule.
+ *
+ * It is not a reserved word in GLSL ES 3.00, so it's handled here as
+ * an identifier.
+ */
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "row_major") == 0) {
+ (yyval.type_qualifier).flags.q.row_major = 1;
+ }
+
+ if ((yyval.type_qualifier).flags.i && state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier));
+ }
+ }
- case 161:
-#line 1224 "glsl_parser.yy"
- {
- (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
- (yyval.type_qualifier).flags.q.invariant = 1;
- ;}
+ if (!(yyval.type_qualifier).flags.i) {
+ _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier "
+ "`%s'\n", (yyvsp[(1) - (1)].identifier));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 156:
+/* Line 1787 of yacc.c */
+#line 1232 "glsl_parser.yy"
+ {
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+
+ if (state->ARB_explicit_attrib_location_enable) {
+ if (strcmp("location", (yyvsp[(1) - (3)].identifier)) == 0) {
+ (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 (strcmp("index", (yyvsp[(1) - (3)].identifier)) == 0) {
+ (yyval.type_qualifier).flags.q.explicit_index = 1;
+
+ if ((yyvsp[(3) - (3)].n) >= 0) {
+ (yyval.type_qualifier).index = (yyvsp[(3) - (3)].n);
+ } else {
+ _mesa_glsl_error(& (yylsp[(3) - (3)]), state,
+ "invalid index %d specified\n", (yyvsp[(3) - (3)].n));
+ YYERROR;
+ }
+ }
+ }
+
+ if (state->ARB_shading_language_420pack_enable &&
+ strcmp("binding", (yyvsp[(1) - (3)].identifier)) == 0) {
+ (yyval.type_qualifier).flags.q.explicit_binding = 1;
+ (yyval.type_qualifier).binding = (yyvsp[(3) - (3)].n);
+ }
+
+ /* If the identifier didn't match any known layout identifiers,
+ * emit an error.
+ */
+ if (!(yyval.type_qualifier).flags.i) {
+ _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 157:
+/* Line 1787 of yacc.c */
+#line 1281 "glsl_parser.yy"
+ {
+ (yyval.type_qualifier) = (yyvsp[(1) - (1)].type_qualifier);
+ /* Layout qualifiers for ARB_uniform_buffer_object. */
+ if ((yyval.type_qualifier).flags.q.uniform && !state->ARB_uniform_buffer_object_enable) {
+ _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].type_qualifier));
+ } else if ((yyval.type_qualifier).flags.q.uniform && state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].type_qualifier));
+ }
+ }
break;
- case 162:
-#line 1229 "glsl_parser.yy"
+ case 158:
+/* Line 1787 of yacc.c */
+#line 1303 "glsl_parser.yy"
{
- (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;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.row_major = 1;
+ }
break;
- case 163:
-#line 1235 "glsl_parser.yy"
+ case 159:
+/* Line 1787 of yacc.c */
+#line 1308 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.invariant = 1;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.packed = 1;
+ }
break;
- case 164:
-#line 1243 "glsl_parser.yy"
+ case 160:
+/* Line 1787 of yacc.c */
+#line 1316 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.constant = 1;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.smooth = 1;
+ }
break;
- case 165:
-#line 1248 "glsl_parser.yy"
+ case 161:
+/* Line 1787 of yacc.c */
+#line 1321 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.attribute = 1;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.flat = 1;
+ }
break;
- case 166:
-#line 1253 "glsl_parser.yy"
+ case 162:
+/* Line 1787 of yacc.c */
+#line 1326 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.varying = 1;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.noperspective = 1;
+ }
break;
- case 167:
-#line 1258 "glsl_parser.yy"
+ case 163:
+/* Line 1787 of yacc.c */
+#line 1335 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.centroid = 1;
- (yyval.type_qualifier).flags.q.varying = 1;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.invariant = 1;
+ }
break;
case 168:
-#line 1264 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1344 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.in = 1;
- ;}
+ memset(&(yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).precision = (yyvsp[(1) - (1)].n);
+ }
break;
case 169:
-#line 1269 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1362 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.out = 1;
- ;}
+ if ((yyvsp[(2) - (2)].type_qualifier).flags.q.invariant)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate \"invariant\" qualifier.\n");
+
+ if ((yyvsp[(2) - (2)].type_qualifier).has_layout()) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state,
+ "\"invariant\" cannot be used with layout(...).\n");
+ }
+
+ (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
+ (yyval.type_qualifier).flags.q.invariant = 1;
+ }
break;
case 170:
-#line 1274 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1375 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1;
- ;}
+ /* Section 4.3 of the GLSL 1.40 specification states:
+ * "...qualified with one of these interpolation qualifiers"
+ *
+ * GLSL 1.30 claims to allow "one or more", but insists that:
+ * "These interpolation qualifiers may only precede the qualifiers in,
+ * centroid in, out, or centroid out in a declaration."
+ *
+ * ...which means that e.g. smooth can't precede smooth, so there can be
+ * only one after all, and the 1.40 text is a clarification, not a change.
+ */
+ if ((yyvsp[(2) - (2)].type_qualifier).has_interpolation())
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate interpolation qualifier.\n");
+
+ if ((yyvsp[(2) - (2)].type_qualifier).has_layout()) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Interpolation qualifiers cannot be used "
+ "with layout(...).\n");
+ }
+
+ if (!state->ARB_shading_language_420pack_enable && (yyvsp[(2) - (2)].type_qualifier).flags.q.invariant) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Interpolation qualifiers must come "
+ "after \"invariant\".\n");
+ }
+
+ (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
+ (yyval.type_qualifier).merge_qualifier(&(yylsp[(1) - (2)]), state, (yyvsp[(2) - (2)].type_qualifier));
+ }
break;
case 171:
-#line 1279 "glsl_parser.yy"
- {
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1;
- ;}
+/* Line 1787 of yacc.c */
+#line 1403 "glsl_parser.yy"
+ {
+ /* The GLSL 1.50 grammar indicates that a layout(...) declaration can be
+ * used standalone or immediately before a storage qualifier. It cannot
+ * be used with interpolation qualifiers or invariant. There does not
+ * appear to be any text indicating that it must come before the storage
+ * qualifier, but always seems to in examples.
+ */
+ if (!state->ARB_shading_language_420pack_enable && (yyvsp[(2) - (2)].type_qualifier).has_layout())
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate layout(...) qualifiers.\n");
+
+ if ((yyvsp[(2) - (2)].type_qualifier).flags.q.invariant)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "layout(...) cannot be used with "
+ "the \"invariant\" qualifier\n");
+
+ if ((yyvsp[(2) - (2)].type_qualifier).has_interpolation()) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "layout(...) cannot be used with "
+ "interpolation qualifiers.\n");
+ }
+
+ (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
+ (yyval.type_qualifier).merge_qualifier(&(yylsp[(1) - (2)]), state, (yyvsp[(2) - (2)].type_qualifier));
+ }
break;
case 172:
-#line 1284 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1426 "glsl_parser.yy"
{
- memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- (yyval.type_qualifier).flags.q.uniform = 1;
- ;}
+ if ((yyvsp[(2) - (2)].type_qualifier).has_auxiliary_storage()) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state,
+ "Duplicate auxiliary storage qualifier (centroid).\n");
+ }
+
+ if (!state->ARB_shading_language_420pack_enable &&
+ ((yyvsp[(2) - (2)].type_qualifier).flags.q.invariant || (yyvsp[(2) - (2)].type_qualifier).has_interpolation() || (yyvsp[(2) - (2)].type_qualifier).has_layout())) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Auxiliary storage qualifiers must come "
+ "just before storage qualifiers.\n");
+ }
+ (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
+ (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
+ }
break;
case 173:
-#line 1292 "glsl_parser.yy"
- {
- (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier);
- ;}
+/* Line 1787 of yacc.c */
+#line 1441 "glsl_parser.yy"
+ {
+ /* Section 4.3 of the GLSL 1.20 specification states:
+ * "Variable declarations may have a storage qualifier specified..."
+ * 1.30 clarifies this to "may have one storage qualifier".
+ */
+ if ((yyvsp[(2) - (2)].type_qualifier).has_storage())
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate storage qualifier.\n");
+
+ if (!state->ARB_shading_language_420pack_enable &&
+ ((yyvsp[(2) - (2)].type_qualifier).flags.q.invariant || (yyvsp[(2) - (2)].type_qualifier).has_interpolation() || (yyvsp[(2) - (2)].type_qualifier).has_layout() ||
+ (yyvsp[(2) - (2)].type_qualifier).has_auxiliary_storage())) {
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Storage qualifiers must come after "
+ "invariant, interpolation, layout and auxiliary "
+ "storage qualifiers.\n");
+ }
+
+ (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
+ (yyval.type_qualifier).merge_qualifier(&(yylsp[(1) - (2)]), state, (yyvsp[(2) - (2)].type_qualifier));
+ }
break;
case 174:
-#line 1296 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1461 "glsl_parser.yy"
+ {
+ if ((yyvsp[(2) - (2)].type_qualifier).precision != ast_precision_none)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Duplicate precision qualifier.\n");
+
+ if (!state->ARB_shading_language_420pack_enable && (yyvsp[(2) - (2)].type_qualifier).flags.i != 0)
+ _mesa_glsl_error(&(yylsp[(1) - (2)]), state, "Precision qualifiers must come last.\n");
+
+ (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
+ (yyval.type_qualifier).precision = (yyvsp[(1) - (2)].n);
+ }
+ break;
+
+ case 175:
+/* Line 1787 of yacc.c */
+#line 1475 "glsl_parser.yy"
{
- (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier);
- (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n);
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.centroid = 1;
+ }
break;
case 176:
-#line 1305 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1483 "glsl_parser.yy"
{
- (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
- (yyval.type_specifier)->is_array = true;
- (yyval.type_specifier)->array_size = NULL;
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.constant = 1;
+ }
break;
case 177:
-#line 1311 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1488 "glsl_parser.yy"
{
- (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier);
- (yyval.type_specifier)->is_array = true;
- (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression);
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.attribute = 1;
+ }
break;
case 178:
-#line 1320 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1493 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].n));
- (yyval.type_specifier)->set_location(yylloc);
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.varying = 1;
+ }
break;
case 179:
-#line 1326 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1498 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier));
- (yyval.type_specifier)->set_location(yylloc);
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.in = 1;
+ }
break;
case 180:
-#line 1332 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1503 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
- (yyval.type_specifier)->set_location(yylloc);
- ;}
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.out = 1;
+ }
break;
case 181:
-#line 1340 "glsl_parser.yy"
- { (yyval.n) = ast_void; ;}
- break;
-
- case 182:
-#line 1341 "glsl_parser.yy"
- { (yyval.n) = ast_float; ;}
+/* Line 1787 of yacc.c */
+#line 1508 "glsl_parser.yy"
+ {
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.uniform = 1;
+ }
break;
case 183:
-#line 1342 "glsl_parser.yy"
- { (yyval.n) = ast_int; ;}
+/* Line 1787 of yacc.c */
+#line 1517 "glsl_parser.yy"
+ {
+ (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
+ (yyval.type_specifier)->is_array = true;
+ (yyval.type_specifier)->array_size = NULL;
+ }
break;
case 184:
-#line 1343 "glsl_parser.yy"
- { (yyval.n) = ast_uint; ;}
+/* Line 1787 of yacc.c */
+#line 1523 "glsl_parser.yy"
+ {
+ (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 185:
-#line 1344 "glsl_parser.yy"
- { (yyval.n) = ast_bool; ;}
+/* Line 1787 of yacc.c */
+#line 1532 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
+ (yyval.type_specifier)->set_location(yylloc);
+ }
break;
case 186:
-#line 1345 "glsl_parser.yy"
- { (yyval.n) = ast_vec2; ;}
+/* Line 1787 of yacc.c */
+#line 1538 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier));
+ (yyval.type_specifier)->set_location(yylloc);
+ }
break;
case 187:
-#line 1346 "glsl_parser.yy"
- { (yyval.n) = ast_vec3; ;}
+/* Line 1787 of yacc.c */
+#line 1544 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
+ (yyval.type_specifier)->set_location(yylloc);
+ }
break;
case 188:
-#line 1347 "glsl_parser.yy"
- { (yyval.n) = ast_vec4; ;}
+/* Line 1787 of yacc.c */
+#line 1552 "glsl_parser.yy"
+ { (yyval.identifier) = "void"; }
break;
case 189:
-#line 1348 "glsl_parser.yy"
- { (yyval.n) = ast_bvec2; ;}
+/* Line 1787 of yacc.c */
+#line 1553 "glsl_parser.yy"
+ { (yyval.identifier) = "float"; }
break;
case 190:
-#line 1349 "glsl_parser.yy"
- { (yyval.n) = ast_bvec3; ;}
+/* Line 1787 of yacc.c */
+#line 1554 "glsl_parser.yy"
+ { (yyval.identifier) = "int"; }
break;
case 191:
-#line 1350 "glsl_parser.yy"
- { (yyval.n) = ast_bvec4; ;}
+/* Line 1787 of yacc.c */
+#line 1555 "glsl_parser.yy"
+ { (yyval.identifier) = "uint"; }
break;
case 192:
-#line 1351 "glsl_parser.yy"
- { (yyval.n) = ast_ivec2; ;}
+/* Line 1787 of yacc.c */
+#line 1556 "glsl_parser.yy"
+ { (yyval.identifier) = "bool"; }
break;
case 193:
-#line 1352 "glsl_parser.yy"
- { (yyval.n) = ast_ivec3; ;}
+/* Line 1787 of yacc.c */
+#line 1557 "glsl_parser.yy"
+ { (yyval.identifier) = "vec2"; }
break;
case 194:
-#line 1353 "glsl_parser.yy"
- { (yyval.n) = ast_ivec4; ;}
+/* Line 1787 of yacc.c */
+#line 1558 "glsl_parser.yy"
+ { (yyval.identifier) = "vec3"; }
break;
case 195:
-#line 1354 "glsl_parser.yy"
- { (yyval.n) = ast_uvec2; ;}
+/* Line 1787 of yacc.c */
+#line 1559 "glsl_parser.yy"
+ { (yyval.identifier) = "vec4"; }
break;
case 196:
-#line 1355 "glsl_parser.yy"
- { (yyval.n) = ast_uvec3; ;}
+/* Line 1787 of yacc.c */
+#line 1560 "glsl_parser.yy"
+ { (yyval.identifier) = "bvec2"; }
break;
case 197:
-#line 1356 "glsl_parser.yy"
- { (yyval.n) = ast_uvec4; ;}
+/* Line 1787 of yacc.c */
+#line 1561 "glsl_parser.yy"
+ { (yyval.identifier) = "bvec3"; }
break;
case 198:
-#line 1357 "glsl_parser.yy"
- { (yyval.n) = ast_mat2; ;}
+/* Line 1787 of yacc.c */
+#line 1562 "glsl_parser.yy"
+ { (yyval.identifier) = "bvec4"; }
break;
case 199:
-#line 1358 "glsl_parser.yy"
- { (yyval.n) = ast_mat2x3; ;}
+/* Line 1787 of yacc.c */
+#line 1563 "glsl_parser.yy"
+ { (yyval.identifier) = "ivec2"; }
break;
case 200:
-#line 1359 "glsl_parser.yy"
- { (yyval.n) = ast_mat2x4; ;}
+/* Line 1787 of yacc.c */
+#line 1564 "glsl_parser.yy"
+ { (yyval.identifier) = "ivec3"; }
break;
case 201:
-#line 1360 "glsl_parser.yy"
- { (yyval.n) = ast_mat3x2; ;}
+/* Line 1787 of yacc.c */
+#line 1565 "glsl_parser.yy"
+ { (yyval.identifier) = "ivec4"; }
break;
case 202:
-#line 1361 "glsl_parser.yy"
- { (yyval.n) = ast_mat3; ;}
+/* Line 1787 of yacc.c */
+#line 1566 "glsl_parser.yy"
+ { (yyval.identifier) = "uvec2"; }
break;
case 203:
-#line 1362 "glsl_parser.yy"
- { (yyval.n) = ast_mat3x4; ;}
+/* Line 1787 of yacc.c */
+#line 1567 "glsl_parser.yy"
+ { (yyval.identifier) = "uvec3"; }
break;
case 204:
-#line 1363 "glsl_parser.yy"
- { (yyval.n) = ast_mat4x2; ;}
+/* Line 1787 of yacc.c */
+#line 1568 "glsl_parser.yy"
+ { (yyval.identifier) = "uvec4"; }
break;
case 205:
-#line 1364 "glsl_parser.yy"
- { (yyval.n) = ast_mat4x3; ;}
+/* Line 1787 of yacc.c */
+#line 1569 "glsl_parser.yy"
+ { (yyval.identifier) = "mat2"; }
break;
case 206:
-#line 1365 "glsl_parser.yy"
- { (yyval.n) = ast_mat4; ;}
+/* Line 1787 of yacc.c */
+#line 1570 "glsl_parser.yy"
+ { (yyval.identifier) = "mat2x3"; }
break;
case 207:
-#line 1366 "glsl_parser.yy"
- { (yyval.n) = ast_sampler1d; ;}
+/* Line 1787 of yacc.c */
+#line 1571 "glsl_parser.yy"
+ { (yyval.identifier) = "mat2x4"; }
break;
case 208:
-#line 1367 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2d; ;}
+/* Line 1787 of yacc.c */
+#line 1572 "glsl_parser.yy"
+ { (yyval.identifier) = "mat3x2"; }
break;
case 209:
-#line 1368 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2drect; ;}
+/* Line 1787 of yacc.c */
+#line 1573 "glsl_parser.yy"
+ { (yyval.identifier) = "mat3"; }
break;
case 210:
-#line 1369 "glsl_parser.yy"
- { (yyval.n) = ast_sampler3d; ;}
+/* Line 1787 of yacc.c */
+#line 1574 "glsl_parser.yy"
+ { (yyval.identifier) = "mat3x4"; }
break;
case 211:
-#line 1370 "glsl_parser.yy"
- { (yyval.n) = ast_samplercube; ;}
+/* Line 1787 of yacc.c */
+#line 1575 "glsl_parser.yy"
+ { (yyval.identifier) = "mat4x2"; }
break;
case 212:
-#line 1371 "glsl_parser.yy"
- { (yyval.n) = ast_sampler1dshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1576 "glsl_parser.yy"
+ { (yyval.identifier) = "mat4x3"; }
break;
case 213:
-#line 1372 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2dshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1577 "glsl_parser.yy"
+ { (yyval.identifier) = "mat4"; }
break;
case 214:
-#line 1373 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2drectshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1578 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler1D"; }
break;
case 215:
-#line 1374 "glsl_parser.yy"
- { (yyval.n) = ast_samplercubeshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1579 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2D"; }
break;
case 216:
-#line 1375 "glsl_parser.yy"
- { (yyval.n) = ast_sampler1darray; ;}
+/* Line 1787 of yacc.c */
+#line 1580 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DRect"; }
break;
case 217:
-#line 1376 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2darray; ;}
+/* Line 1787 of yacc.c */
+#line 1581 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler3D"; }
break;
case 218:
-#line 1377 "glsl_parser.yy"
- { (yyval.n) = ast_sampler1darrayshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1582 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerCube"; }
break;
case 219:
-#line 1378 "glsl_parser.yy"
- { (yyval.n) = ast_sampler2darrayshadow; ;}
+/* Line 1787 of yacc.c */
+#line 1583 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerExternalOES"; }
break;
case 220:
-#line 1379 "glsl_parser.yy"
- { (yyval.n) = ast_isampler1d; ;}
+/* Line 1787 of yacc.c */
+#line 1584 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler1DShadow"; }
break;
case 221:
-#line 1380 "glsl_parser.yy"
- { (yyval.n) = ast_isampler2d; ;}
+/* Line 1787 of yacc.c */
+#line 1585 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DShadow"; }
break;
case 222:
-#line 1381 "glsl_parser.yy"
- { (yyval.n) = ast_isampler3d; ;}
+/* Line 1787 of yacc.c */
+#line 1586 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DRectShadow"; }
break;
case 223:
-#line 1382 "glsl_parser.yy"
- { (yyval.n) = ast_isamplercube; ;}
+/* Line 1787 of yacc.c */
+#line 1587 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerCubeShadow"; }
break;
case 224:
-#line 1383 "glsl_parser.yy"
- { (yyval.n) = ast_isampler1darray; ;}
+/* Line 1787 of yacc.c */
+#line 1588 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler1DArray"; }
break;
case 225:
-#line 1384 "glsl_parser.yy"
- { (yyval.n) = ast_isampler2darray; ;}
+/* Line 1787 of yacc.c */
+#line 1589 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DArray"; }
break;
case 226:
-#line 1385 "glsl_parser.yy"
- { (yyval.n) = ast_usampler1d; ;}
+/* Line 1787 of yacc.c */
+#line 1590 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler1DArrayShadow"; }
break;
case 227:
-#line 1386 "glsl_parser.yy"
- { (yyval.n) = ast_usampler2d; ;}
+/* Line 1787 of yacc.c */
+#line 1591 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DArrayShadow"; }
break;
case 228:
-#line 1387 "glsl_parser.yy"
- { (yyval.n) = ast_usampler3d; ;}
+/* Line 1787 of yacc.c */
+#line 1592 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerBuffer"; }
break;
case 229:
-#line 1388 "glsl_parser.yy"
- { (yyval.n) = ast_usamplercube; ;}
+/* Line 1787 of yacc.c */
+#line 1593 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerCubeArray"; }
break;
case 230:
-#line 1389 "glsl_parser.yy"
- { (yyval.n) = ast_usampler1darray; ;}
+/* Line 1787 of yacc.c */
+#line 1594 "glsl_parser.yy"
+ { (yyval.identifier) = "samplerCubeArrayShadow"; }
break;
case 231:
-#line 1390 "glsl_parser.yy"
- { (yyval.n) = ast_usampler2darray; ;}
+/* Line 1787 of yacc.c */
+#line 1595 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler1D"; }
break;
case 232:
-#line 1394 "glsl_parser.yy"
- {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- (yyval.n) = ast_precision_high;
- ;}
+/* Line 1787 of yacc.c */
+#line 1596 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler2D"; }
break;
case 233:
-#line 1404 "glsl_parser.yy"
- {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- (yyval.n) = ast_precision_medium;
- ;}
+/* Line 1787 of yacc.c */
+#line 1597 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler2DRect"; }
break;
case 234:
-#line 1414 "glsl_parser.yy"
- {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- (yyval.n) = ast_precision_low;
- ;}
+/* Line 1787 of yacc.c */
+#line 1598 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler3D"; }
break;
case 235:
-#line 1428 "glsl_parser.yy"
- {
- 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);
- state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type);
- ;}
+/* Line 1787 of yacc.c */
+#line 1599 "glsl_parser.yy"
+ { (yyval.identifier) = "isamplerCube"; }
break;
case 236:
-#line 1435 "glsl_parser.yy"
- {
- void *ctx = state;
- (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].node));
- (yyval.struct_specifier)->set_location(yylloc);
- ;}
+/* Line 1787 of yacc.c */
+#line 1600 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler1DArray"; }
break;
case 237:
-#line 1444 "glsl_parser.yy"
- {
- (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list);
- (yyvsp[(1) - (1)].declarator_list)->link.self_link();
- ;}
+/* Line 1787 of yacc.c */
+#line 1601 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler2DArray"; }
break;
case 238:
-#line 1449 "glsl_parser.yy"
- {
- (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node);
- (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
- ;}
+/* Line 1787 of yacc.c */
+#line 1602 "glsl_parser.yy"
+ { (yyval.identifier) = "isamplerBuffer"; }
break;
case 239:
-#line 1457 "glsl_parser.yy"
- {
- 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);
- ;}
+/* Line 1787 of yacc.c */
+#line 1603 "glsl_parser.yy"
+ { (yyval.identifier) = "isamplerCubeArray"; }
break;
case 240:
-#line 1472 "glsl_parser.yy"
- {
- (yyval.declaration) = (yyvsp[(1) - (1)].declaration);
- (yyvsp[(1) - (1)].declaration)->link.self_link();
- ;}
+/* Line 1787 of yacc.c */
+#line 1604 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler1D"; }
break;
case 241:
-#line 1477 "glsl_parser.yy"
- {
- (yyval.declaration) = (yyvsp[(1) - (3)].declaration);
- (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link);
- ;}
+/* Line 1787 of yacc.c */
+#line 1605 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler2D"; }
break;
case 242:
-#line 1485 "glsl_parser.yy"
- {
- void *ctx = state;
- (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL);
- (yyval.declaration)->set_location(yylloc);
- state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(1) - (1)].identifier), ir_var_auto));
- ;}
+/* Line 1787 of yacc.c */
+#line 1606 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler2DRect"; }
break;
case 243:
-#line 1492 "glsl_parser.yy"
- {
- void *ctx = state;
- (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL);
- (yyval.declaration)->set_location(yylloc);
- ;}
+/* Line 1787 of yacc.c */
+#line 1607 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler3D"; }
+ break;
+
+ case 244:
+/* Line 1787 of yacc.c */
+#line 1608 "glsl_parser.yy"
+ { (yyval.identifier) = "usamplerCube"; }
+ break;
+
+ case 245:
+/* Line 1787 of yacc.c */
+#line 1609 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler1DArray"; }
break;
case 246:
-#line 1510 "glsl_parser.yy"
- { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+/* Line 1787 of yacc.c */
+#line 1610 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler2DArray"; }
+ break;
+
+ case 247:
+/* Line 1787 of yacc.c */
+#line 1611 "glsl_parser.yy"
+ { (yyval.identifier) = "usamplerBuffer"; }
+ break;
+
+ case 248:
+/* Line 1787 of yacc.c */
+#line 1612 "glsl_parser.yy"
+ { (yyval.identifier) = "usamplerCubeArray"; }
+ break;
+
+ case 249:
+/* Line 1787 of yacc.c */
+#line 1613 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DMS"; }
+ break;
+
+ case 250:
+/* Line 1787 of yacc.c */
+#line 1614 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler2DMS"; }
break;
case 251:
-#line 1518 "glsl_parser.yy"
- { (yyval.node) = NULL; ;}
+/* Line 1787 of yacc.c */
+#line 1615 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler2DMS"; }
break;
case 252:
-#line 1519 "glsl_parser.yy"
- { (yyval.node) = NULL; ;}
+/* Line 1787 of yacc.c */
+#line 1616 "glsl_parser.yy"
+ { (yyval.identifier) = "sampler2DMSArray"; }
+ break;
+
+ case 253:
+/* Line 1787 of yacc.c */
+#line 1617 "glsl_parser.yy"
+ { (yyval.identifier) = "isampler2DMSArray"; }
+ break;
+
+ case 254:
+/* Line 1787 of yacc.c */
+#line 1618 "glsl_parser.yy"
+ { (yyval.identifier) = "usampler2DMSArray"; }
break;
case 255:
-#line 1526 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1623 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
- (yyval.compound_statement)->set_location(yylloc);
- ;}
+ state->check_precision_qualifiers_allowed(&(yylsp[(1) - (1)]));
+ (yyval.n) = ast_precision_high;
+ }
break;
case 256:
-#line 1532 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1628 "glsl_parser.yy"
{
- state->symbols->push_scope();
- ;}
+ state->check_precision_qualifiers_allowed(&(yylsp[(1) - (1)]));
+ (yyval.n) = ast_precision_medium;
+ }
break;
case 257:
-#line 1536 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1633 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node));
- (yyval.compound_statement)->set_location(yylloc);
- state->symbols->pop_scope();
- ;}
+ state->check_precision_qualifiers_allowed(&(yylsp[(1) - (1)]));
+ (yyval.n) = ast_precision_low;
+ }
break;
case 258:
-#line 1545 "glsl_parser.yy"
- { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+/* Line 1787 of yacc.c */
+#line 1641 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].declarator_list));
+ (yyval.struct_specifier)->set_location(yylloc);
+ state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type);
+ state->symbols->add_type_ast((yyvsp[(2) - (5)].identifier), new(ctx) ast_type_specifier((yyval.struct_specifier)));
+ }
+ break;
+
+ case 259:
+/* Line 1787 of yacc.c */
+#line 1649 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].declarator_list));
+ (yyval.struct_specifier)->set_location(yylloc);
+ }
break;
case 260:
-#line 1551 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1658 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
- (yyval.compound_statement)->set_location(yylloc);
- ;}
+ (yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list);
+ (yyvsp[(1) - (1)].declarator_list)->link.self_link();
+ }
break;
case 261:
-#line 1557 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1663 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node));
- (yyval.compound_statement)->set_location(yylloc);
- ;}
+ (yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list);
+ (yyval.declarator_list)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
+ }
break;
case 262:
-#line 1566 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1671 "glsl_parser.yy"
{
- if ((yyvsp[(1) - (1)].node) == NULL) {
- _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "<nil> statement\n");
- assert((yyvsp[(1) - (1)].node) != NULL);
- }
+ void *ctx = state;
+ ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
+ type->set_location(yylloc);
- (yyval.node) = (yyvsp[(1) - (1)].node);
- (yyval.node)->link.self_link();
- ;}
+ 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 263:
-#line 1576 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1686 "glsl_parser.yy"
{
- 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);
- ;}
+ (yyval.declaration) = (yyvsp[(1) - (1)].declaration);
+ (yyvsp[(1) - (1)].declaration)->link.self_link();
+ }
break;
case 264:
-#line 1588 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1691 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_expression_statement(NULL);
- (yyval.node)->set_location(yylloc);
- ;}
+ (yyval.declaration) = (yyvsp[(1) - (3)].declaration);
+ (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link);
+ }
break;
case 265:
-#line 1594 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1699 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression));
- (yyval.node)->set_location(yylloc);
- ;}
+ void *ctx = state;
+ (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL);
+ (yyval.declaration)->set_location(yylloc);
+ }
break;
case 266:
-#line 1603 "glsl_parser.yy"
- {
- (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 267:
-#line 1612 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1705 "glsl_parser.yy"
{
- (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node);
- (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node);
- ;}
+ 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 268:
-#line 1617 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1715 "glsl_parser.yy"
{
- (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node);
- (yyval.selection_rest_statement).else_statement = NULL;
- ;}
+ (yyval.expression) = (yyvsp[(2) - (3)].expression);
+ }
break;
case 269:
-#line 1625 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1719 "glsl_parser.yy"
{
- (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
- ;}
+ (yyval.expression) = (yyvsp[(2) - (4)].expression);
+ }
break;
case 270:
-#line 1629 "glsl_parser.yy"
+/* Line 1787 of yacc.c */
+#line 1726 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.expression) = new(ctx) ast_aggregate_initializer();
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (1)].expression)->link);
+ }
+ break;
+
+ case 271:
+/* Line 1787 of yacc.c */
+#line 1733 "glsl_parser.yy"
{
- 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);
+ (yyvsp[(1) - (3)].expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
+ }
+ break;
- declarator->declarations.push_tail(&decl->link);
- (yyval.node) = declarator;
- ;}
+ case 273:
+/* Line 1787 of yacc.c */
+#line 1745 "glsl_parser.yy"
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); }
break;
- case 274:
-#line 1652 "glsl_parser.yy"
+ case 281:
+/* Line 1787 of yacc.c */
+#line 1760 "glsl_parser.yy"
{
- 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);
- ;}
+ void *ctx = state;
+ (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
+ (yyval.compound_statement)->set_location(yylloc);
+ }
break;
- case 275:
-#line 1659 "glsl_parser.yy"
+ case 282:
+/* Line 1787 of yacc.c */
+#line 1766 "glsl_parser.yy"
{
- 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);
- ;}
+ state->symbols->push_scope();
+ }
break;
- case 276:
-#line 1666 "glsl_parser.yy"
+ case 283:
+/* Line 1787 of yacc.c */
+#line 1770 "glsl_parser.yy"
{
- 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);
- ;}
+ void *ctx = state;
+ (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node));
+ (yyval.compound_statement)->set_location(yylloc);
+ state->symbols->pop_scope();
+ }
+ break;
+
+ case 284:
+/* Line 1787 of yacc.c */
+#line 1779 "glsl_parser.yy"
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); }
break;
- case 280:
-#line 1682 "glsl_parser.yy"
+ case 286:
+/* Line 1787 of yacc.c */
+#line 1785 "glsl_parser.yy"
{
- (yyval.node) = NULL;
- ;}
+ void *ctx = state;
+ (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
+ (yyval.compound_statement)->set_location(yylloc);
+ }
break;
- case 281:
-#line 1689 "glsl_parser.yy"
+ case 287:
+/* Line 1787 of yacc.c */
+#line 1791 "glsl_parser.yy"
{
- (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
- (yyval.for_rest_statement).rest = NULL;
- ;}
+ void *ctx = state;
+ (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node));
+ (yyval.compound_statement)->set_location(yylloc);
+ }
break;
- case 282:
-#line 1694 "glsl_parser.yy"
+ case 288:
+/* Line 1787 of yacc.c */
+#line 1800 "glsl_parser.yy"
{
- (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
- (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
- ;}
+ 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 283:
-#line 1703 "glsl_parser.yy"
+ case 289:
+/* Line 1787 of yacc.c */
+#line 1810 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
- (yyval.node)->set_location(yylloc);
- ;}
+ 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 284:
-#line 1709 "glsl_parser.yy"
+ case 290:
+/* Line 1787 of yacc.c */
+#line 1822 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
- (yyval.node)->set_location(yylloc);
- ;}
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_expression_statement(NULL);
+ (yyval.node)->set_location(yylloc);
+ }
break;
- case 285:
-#line 1715 "glsl_parser.yy"
+ case 291:
+/* Line 1787 of yacc.c */
+#line 1828 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
- (yyval.node)->set_location(yylloc);
- ;}
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression));
+ (yyval.node)->set_location(yylloc);
+ }
break;
- case 286:
-#line 1721 "glsl_parser.yy"
+ case 292:
+/* Line 1787 of yacc.c */
+#line 1837 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression));
- (yyval.node)->set_location(yylloc);
- ;}
+ (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 287:
-#line 1727 "glsl_parser.yy"
+ case 293:
+/* Line 1787 of yacc.c */
+#line 1846 "glsl_parser.yy"
{
- void *ctx = state;
- (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
- (yyval.node)->set_location(yylloc);
- ;}
+ (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node);
+ (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node);
+ }
break;
- case 288:
-#line 1735 "glsl_parser.yy"
- { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;}
+ case 294:
+/* Line 1787 of yacc.c */
+#line 1851 "glsl_parser.yy"
+ {
+ (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node);
+ (yyval.selection_rest_statement).else_statement = NULL;
+ }
break;
- case 289:
-#line 1736 "glsl_parser.yy"
- { (yyval.node) = (yyvsp[(1) - (1)].node); ;}
+ case 295:
+/* Line 1787 of yacc.c */
+#line 1859 "glsl_parser.yy"
+ {
+ (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
+ }
break;
- case 290:
-#line 1737 "glsl_parser.yy"
- { (yyval.node) = NULL; ;}
+ case 296:
+/* Line 1787 of yacc.c */
+#line 1863 "glsl_parser.yy"
+ {
+ 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 291:
-#line 1742 "glsl_parser.yy"
+ case 297:
+/* Line 1787 of yacc.c */
+#line 1881 "glsl_parser.yy"
+ {
+ (yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body));
+ (yyval.node)->set_location(yylloc);
+ }
+ break;
+
+ case 298:
+/* Line 1787 of yacc.c */
+#line 1889 "glsl_parser.yy"
+ {
+ (yyval.switch_body) = new(state) ast_switch_body(NULL);
+ (yyval.switch_body)->set_location(yylloc);
+ }
+ break;
+
+ case 299:
+/* Line 1787 of yacc.c */
+#line 1894 "glsl_parser.yy"
+ {
+ (yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list));
+ (yyval.switch_body)->set_location(yylloc);
+ }
+ break;
+
+ case 300:
+/* Line 1787 of yacc.c */
+#line 1902 "glsl_parser.yy"
+ {
+ (yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression));
+ (yyval.case_label)->set_location(yylloc);
+ }
+ break;
+
+ case 301:
+/* Line 1787 of yacc.c */
+#line 1907 "glsl_parser.yy"
+ {
+ (yyval.case_label) = new(state) ast_case_label(NULL);
+ (yyval.case_label)->set_location(yylloc);
+ }
+ break;
+
+ case 302:
+/* Line 1787 of yacc.c */
+#line 1915 "glsl_parser.yy"
+ {
+ ast_case_label_list *labels = new(state) ast_case_label_list();
+
+ labels->labels.push_tail(& (yyvsp[(1) - (1)].case_label)->link);
+ (yyval.case_label_list) = labels;
+ (yyval.case_label_list)->set_location(yylloc);
+ }
+ break;
+
+ case 303:
+/* Line 1787 of yacc.c */
+#line 1923 "glsl_parser.yy"
+ {
+ (yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list);
+ (yyval.case_label_list)->labels.push_tail(& (yyvsp[(2) - (2)].case_label)->link);
+ }
+ break;
+
+ case 304:
+/* Line 1787 of yacc.c */
+#line 1931 "glsl_parser.yy"
+ {
+ ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list));
+ stmts->set_location(yylloc);
+
+ stmts->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link);
+ (yyval.case_statement) = stmts;
+ }
+ break;
+
+ case 305:
+/* Line 1787 of yacc.c */
+#line 1939 "glsl_parser.yy"
+ {
+ (yyval.case_statement) = (yyvsp[(1) - (2)].case_statement);
+ (yyval.case_statement)->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link);
+ }
+ break;
+
+ case 306:
+/* Line 1787 of yacc.c */
+#line 1947 "glsl_parser.yy"
+ {
+ ast_case_statement_list *cases= new(state) ast_case_statement_list();
+ cases->set_location(yylloc);
+
+ cases->cases.push_tail(& (yyvsp[(1) - (1)].case_statement)->link);
+ (yyval.case_statement_list) = cases;
+ }
+ break;
+
+ case 307:
+/* Line 1787 of yacc.c */
+#line 1955 "glsl_parser.yy"
+ {
+ (yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list);
+ (yyval.case_statement_list)->cases.push_tail(& (yyvsp[(2) - (2)].case_statement)->link);
+ }
+ break;
+
+ case 308:
+/* Line 1787 of yacc.c */
+#line 1963 "glsl_parser.yy"
+ {
+ 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 309:
+/* Line 1787 of yacc.c */
+#line 1970 "glsl_parser.yy"
+ {
+ 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 310:
+/* Line 1787 of yacc.c */
+#line 1977 "glsl_parser.yy"
+ {
+ 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 314:
+/* Line 1787 of yacc.c */
+#line 1993 "glsl_parser.yy"
+ {
+ (yyval.node) = NULL;
+ }
+ break;
+
+ case 315:
+/* Line 1787 of yacc.c */
+#line 2000 "glsl_parser.yy"
+ {
+ (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
+ (yyval.for_rest_statement).rest = NULL;
+ }
+ break;
+
+ case 316:
+/* Line 1787 of yacc.c */
+#line 2005 "glsl_parser.yy"
+ {
+ (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
+ (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
+ }
+ break;
+
+ case 317:
+/* Line 1787 of yacc.c */
+#line 2014 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
+ (yyval.node)->set_location(yylloc);
+ }
+ break;
+
+ case 318:
+/* Line 1787 of yacc.c */
+#line 2020 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
+ (yyval.node)->set_location(yylloc);
+ }
+ break;
+
+ case 319:
+/* Line 1787 of yacc.c */
+#line 2026 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
+ (yyval.node)->set_location(yylloc);
+ }
+ break;
+
+ case 320:
+/* Line 1787 of yacc.c */
+#line 2032 "glsl_parser.yy"
+ {
+ 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 321:
+/* Line 1787 of yacc.c */
+#line 2038 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
+ (yyval.node)->set_location(yylloc);
+ }
+ break;
+
+ case 322:
+/* Line 1787 of yacc.c */
+#line 2046 "glsl_parser.yy"
+ { (yyval.node) = (yyvsp[(1) - (1)].function_definition); }
+ break;
+
+ case 323:
+/* Line 1787 of yacc.c */
+#line 2047 "glsl_parser.yy"
+ { (yyval.node) = (yyvsp[(1) - (1)].node); }
+ break;
+
+ case 324:
+/* Line 1787 of yacc.c */
+#line 2048 "glsl_parser.yy"
+ { (yyval.node) = NULL; }
+ break;
+
+ case 325:
+/* Line 1787 of yacc.c */
+#line 2049 "glsl_parser.yy"
+ { (yyval.node) = NULL; }
+ break;
+
+ case 326:
+/* Line 1787 of yacc.c */
+#line 2054 "glsl_parser.yy"
+ {
+ 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);
+
+ state->symbols->pop_scope();
+ }
+ break;
+
+ case 327:
+/* Line 1787 of yacc.c */
+#line 2068 "glsl_parser.yy"
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].interface_block);
+ }
+ break;
+
+ case 328:
+/* Line 1787 of yacc.c */
+#line 2072 "glsl_parser.yy"
+ {
+ ast_interface_block *block = (yyvsp[(2) - (2)].interface_block);
+ if (!block->layout.merge_qualifier(& (yylsp[(1) - (2)]), state, (yyvsp[(1) - (2)].type_qualifier))) {
+ YYERROR;
+ }
+ (yyval.node) = block;
+ }
+ break;
+
+ case 329:
+/* Line 1787 of yacc.c */
+#line 2083 "glsl_parser.yy"
+ {
+ ast_interface_block *const block = (yyvsp[(6) - (7)].interface_block);
+
+ block->block_name = (yyvsp[(2) - (7)].identifier);
+ block->declarations.push_degenerate_list_at_head(& (yyvsp[(4) - (7)].declarator_list)->link);
+
+ if ((yyvsp[(1) - (7)].type_qualifier).flags.q.uniform) {
+ if (!state->ARB_uniform_buffer_object_enable) {
+ _mesa_glsl_error(& (yylsp[(1) - (7)]), state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ } else if (state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (7)]), state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ }
+ } else {
+ if (state->es_shader || state->language_version < 150) {
+ _mesa_glsl_error(& (yylsp[(1) - (7)]), state,
+ "#version 150 required for using "
+ "interface blocks.\n");
+ }
+ }
+
+ /* From the GLSL 1.50.11 spec, section 4.3.7 ("Interface Blocks"):
+ * "It is illegal to have an input block in a vertex shader
+ * or an output block in a fragment shader"
+ */
+ if ((state->target == vertex_shader) && (yyvsp[(1) - (7)].type_qualifier).flags.q.in) {
+ _mesa_glsl_error(& (yylsp[(1) - (7)]), state,
+ "`in' interface block is not allowed for "
+ "a vertex shader\n");
+ } else if ((state->target == fragment_shader) && (yyvsp[(1) - (7)].type_qualifier).flags.q.out) {
+ _mesa_glsl_error(& (yylsp[(1) - (7)]), state,
+ "`out' interface block is not allowed for "
+ "a fragment shader\n");
+ }
+
+ /* Since block arrays require names, and both features are added in
+ * the same language versions, we don't have to explicitly
+ * version-check both things.
+ */
+ if (block->instance_name != NULL) {
+ state->check_version(150, 300, & (yylsp[(1) - (7)]), "interface blocks with "
+ "an instance name are not allowed");
+ }
+
+ unsigned interface_type_mask;
+ struct ast_type_qualifier temp_type_qualifier;
+
+ /* Get a bitmask containing only the in/out/uniform flags, allowing us
+ * to ignore other irrelevant flags like interpolation qualifiers.
+ */
+ temp_type_qualifier.flags.i = 0;
+ temp_type_qualifier.flags.q.uniform = true;
+ temp_type_qualifier.flags.q.in = true;
+ temp_type_qualifier.flags.q.out = true;
+ interface_type_mask = temp_type_qualifier.flags.i;
+
+ /* Get the block's interface qualifier. The interface_qualifier
+ * production rule guarantees that only one bit will be set (and
+ * it will be in/out/uniform).
+ */
+ unsigned block_interface_qualifier = (yyvsp[(1) - (7)].type_qualifier).flags.i;
+
+ block->layout.flags.i |= block_interface_qualifier;
+
+ foreach_list_typed (ast_declarator_list, member, link, &block->declarations) {
+ ast_type_qualifier& qualifier = member->type->qualifier;
+ if ((qualifier.flags.i & interface_type_mask) == 0) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If no optional qualifier is used in a member declaration, the
+ * qualifier of the variable is just in, out, or uniform as declared
+ * by interface-qualifier."
+ */
+ qualifier.flags.i |= block_interface_qualifier;
+ } else if ((qualifier.flags.i & interface_type_mask) !=
+ block_interface_qualifier) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If optional qualifiers are used, they can include interpolation
+ * and storage qualifiers and they must declare an input, output,
+ * or uniform variable consistent with the interface qualifier of
+ * the block."
+ */
+ _mesa_glsl_error(& (yylsp[(1) - (7)]), state,
+ "uniform/in/out qualifier on "
+ "interface block member does not match "
+ "the interface block\n");
+ }
+ }
+
+ (yyval.interface_block) = block;
+ }
+ break;
+
+ case 330:
+/* Line 1787 of yacc.c */
+#line 2180 "glsl_parser.yy"
{
- 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);
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.in = 1;
+ }
+ break;
- state->symbols->pop_scope();
- ;}
+ case 331:
+/* Line 1787 of yacc.c */
+#line 2185 "glsl_parser.yy"
+ {
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.out = 1;
+ }
break;
+ case 332:
+/* Line 1787 of yacc.c */
+#line 2190 "glsl_parser.yy"
+ {
+ memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
+ (yyval.type_qualifier).flags.q.uniform = 1;
+ }
+ break;
-/* Line 1267 of yacc.c. */
-#line 4944 "glsl_parser.cpp"
+ case 333:
+/* Line 1787 of yacc.c */
+#line 2198 "glsl_parser.yy"
+ {
+ (yyval.interface_block) = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ NULL, NULL);
+ }
+ break;
+
+ case 334:
+/* Line 1787 of yacc.c */
+#line 2203 "glsl_parser.yy"
+ {
+ (yyval.interface_block) = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ (yyvsp[(1) - (1)].identifier), NULL);
+ }
+ break;
+
+ case 335:
+/* Line 1787 of yacc.c */
+#line 2208 "glsl_parser.yy"
+ {
+ (yyval.interface_block) = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ (yyvsp[(1) - (4)].identifier), (yyvsp[(3) - (4)].expression));
+ }
+ break;
+
+ case 336:
+/* Line 1787 of yacc.c */
+#line 2213 "glsl_parser.yy"
+ {
+ _mesa_glsl_error(& (yylsp[(1) - (3)]), state,
+ "instance block arrays must be explicitly sized\n");
+
+ (yyval.interface_block) = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ (yyvsp[(1) - (3)].identifier), NULL);
+ }
+ break;
+
+ case 337:
+/* Line 1787 of yacc.c */
+#line 2224 "glsl_parser.yy"
+ {
+ (yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list);
+ (yyvsp[(1) - (1)].declarator_list)->link.self_link();
+ }
+ break;
+
+ case 338:
+/* Line 1787 of yacc.c */
+#line 2229 "glsl_parser.yy"
+ {
+ (yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list);
+ (yyvsp[(2) - (2)].declarator_list)->link.insert_before(& (yyval.declarator_list)->link);
+ }
+ break;
+
+ case 339:
+/* Line 1787 of yacc.c */
+#line 2237 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ ast_fully_specified_type *type = (yyvsp[(1) - (3)].fully_specified_type);
+ type->set_location(yylloc);
+
+ if (type->qualifier.flags.q.attribute) {
+ _mesa_glsl_error(& (yylsp[(1) - (3)]), state,
+ "keyword 'attribute' cannot be used with "
+ "interface block member\n");
+ } else if (type->qualifier.flags.q.varying) {
+ _mesa_glsl_error(& (yylsp[(1) - (3)]), state,
+ "keyword 'varying' cannot be used with "
+ "interface block member\n");
+ }
+
+ (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 340:
+/* Line 1787 of yacc.c */
+#line 2261 "glsl_parser.yy"
+ {
+ if (!state->default_uniform_qualifier->merge_qualifier(& (yylsp[(1) - (3)]), state, (yyvsp[(1) - (3)].type_qualifier))) {
+ YYERROR;
+ }
+ }
+ break;
+
+
+/* Line 1787 of yacc.c */
+#line 5739 "glsl_parser.cpp"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -4971,6 +5777,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -4978,45 +5788,44 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (&yylloc, state, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- 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;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (&yylloc, state, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
- yyerror_range[0] = yylloc;
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5033,7 +5842,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5049,7 +5858,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[0] = yylsp[1-yylen];
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -5068,7 +5877,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -5083,7 +5892,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[0] = *yylsp;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, state);
YYPOPSTACK (1);
@@ -5091,15 +5900,12 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
- yyerror_range[1] = yylloc;
+ yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
@@ -5123,7 +5929,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5134,9 +5940,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc, state);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ 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);
diff --git a/dist/Mesa/src/glsl/glsl_parser.h b/dist/Mesa/src/glsl/glsl_parser.h
index 6d3019119..e4b479a30 100644
--- a/dist/Mesa/src/glsl/glsl_parser.h
+++ b/dist/Mesa/src/glsl/glsl_parser.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.6.1. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,20 @@
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. */
+#ifndef _MESA_GLSL_SRC_GLSL_GLSL_PARSER_H
+# define _MESA_GLSL_SRC_GLSL_GLSL_PARSER_H
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int _mesa_glsl_debug;
+#endif
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -97,348 +104,179 @@
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,
- TYPE_IDENTIFIER = 332,
- NEW_IDENTIFIER = 333,
- FLOATCONSTANT = 334,
- INTCONSTANT = 335,
- UINTCONSTANT = 336,
- BOOLCONSTANT = 337,
- FIELD_SELECTION = 338,
- LEFT_OP = 339,
- RIGHT_OP = 340,
- INC_OP = 341,
- DEC_OP = 342,
- LE_OP = 343,
- GE_OP = 344,
- EQ_OP = 345,
- NE_OP = 346,
- AND_OP = 347,
- OR_OP = 348,
- XOR_OP = 349,
- MUL_ASSIGN = 350,
- DIV_ASSIGN = 351,
- ADD_ASSIGN = 352,
- MOD_ASSIGN = 353,
- LEFT_ASSIGN = 354,
- RIGHT_ASSIGN = 355,
- AND_ASSIGN = 356,
- XOR_ASSIGN = 357,
- OR_ASSIGN = 358,
- SUB_ASSIGN = 359,
- INVARIANT = 360,
- LOWP = 361,
- MEDIUMP = 362,
- HIGHP = 363,
- SUPERP = 364,
- PRECISION = 365,
- VERSION = 366,
- EXTENSION = 367,
- LINE = 368,
- COLON = 369,
- EOL = 370,
- INTERFACE = 371,
- OUTPUT = 372,
- PRAGMA_DEBUG_ON = 373,
- PRAGMA_DEBUG_OFF = 374,
- PRAGMA_OPTIMIZE_ON = 375,
- PRAGMA_OPTIMIZE_OFF = 376,
- PRAGMA_INVARIANT_ALL = 377,
- LAYOUT_TOK = 378,
- ASM = 379,
- CLASS = 380,
- UNION = 381,
- ENUM = 382,
- TYPEDEF = 383,
- TEMPLATE = 384,
- THIS = 385,
- PACKED_TOK = 386,
- GOTO = 387,
- INLINE_TOK = 388,
- NOINLINE = 389,
- VOLATILE = 390,
- PUBLIC_TOK = 391,
- STATIC = 392,
- EXTERN = 393,
- EXTERNAL = 394,
- LONG_TOK = 395,
- SHORT_TOK = 396,
- DOUBLE_TOK = 397,
- HALF = 398,
- FIXED_TOK = 399,
- UNSIGNED = 400,
- INPUT_TOK = 401,
- OUPTUT = 402,
- HVEC2 = 403,
- HVEC3 = 404,
- HVEC4 = 405,
- DVEC2 = 406,
- DVEC3 = 407,
- DVEC4 = 408,
- FVEC2 = 409,
- FVEC3 = 410,
- FVEC4 = 411,
- SAMPLER2DRECT = 412,
- SAMPLER3DRECT = 413,
- SAMPLER2DRECTSHADOW = 414,
- SIZEOF = 415,
- CAST = 416,
- NAMESPACE = 417,
- USING = 418,
- ERROR_TOK = 419,
- COMMON = 420,
- PARTITION = 421,
- ACTIVE = 422,
- SAMPLERBUFFER = 423,
- FILTER = 424,
- IMAGE1D = 425,
- IMAGE2D = 426,
- IMAGE3D = 427,
- IMAGECUBE = 428,
- IMAGE1DARRAY = 429,
- IMAGE2DARRAY = 430,
- IIMAGE1D = 431,
- IIMAGE2D = 432,
- IIMAGE3D = 433,
- IIMAGECUBE = 434,
- IIMAGE1DARRAY = 435,
- IIMAGE2DARRAY = 436,
- UIMAGE1D = 437,
- UIMAGE2D = 438,
- UIMAGE3D = 439,
- UIMAGECUBE = 440,
- UIMAGE1DARRAY = 441,
- UIMAGE2DARRAY = 442,
- IMAGE1DSHADOW = 443,
- IMAGE2DSHADOW = 444,
- IMAGEBUFFER = 445,
- IIMAGEBUFFER = 446,
- UIMAGEBUFFER = 447,
- IMAGE1DARRAYSHADOW = 448,
- IMAGE2DARRAYSHADOW = 449,
- ROW_MAJOR = 450
+ SAMPLERCUBEARRAY = 316,
+ SAMPLERCUBEARRAYSHADOW = 317,
+ ISAMPLER1D = 318,
+ ISAMPLER2D = 319,
+ ISAMPLER3D = 320,
+ ISAMPLERCUBE = 321,
+ ISAMPLER1DARRAY = 322,
+ ISAMPLER2DARRAY = 323,
+ ISAMPLERCUBEARRAY = 324,
+ USAMPLER1D = 325,
+ USAMPLER2D = 326,
+ USAMPLER3D = 327,
+ USAMPLERCUBE = 328,
+ USAMPLER1DARRAY = 329,
+ USAMPLER2DARRAY = 330,
+ USAMPLERCUBEARRAY = 331,
+ SAMPLER2DRECT = 332,
+ ISAMPLER2DRECT = 333,
+ USAMPLER2DRECT = 334,
+ SAMPLER2DRECTSHADOW = 335,
+ SAMPLERBUFFER = 336,
+ ISAMPLERBUFFER = 337,
+ USAMPLERBUFFER = 338,
+ SAMPLER2DMS = 339,
+ ISAMPLER2DMS = 340,
+ USAMPLER2DMS = 341,
+ SAMPLER2DMSARRAY = 342,
+ ISAMPLER2DMSARRAY = 343,
+ USAMPLER2DMSARRAY = 344,
+ SAMPLEREXTERNALOES = 345,
+ STRUCT = 346,
+ VOID_TOK = 347,
+ WHILE = 348,
+ IDENTIFIER = 349,
+ TYPE_IDENTIFIER = 350,
+ NEW_IDENTIFIER = 351,
+ FLOATCONSTANT = 352,
+ INTCONSTANT = 353,
+ UINTCONSTANT = 354,
+ BOOLCONSTANT = 355,
+ FIELD_SELECTION = 356,
+ LEFT_OP = 357,
+ RIGHT_OP = 358,
+ INC_OP = 359,
+ DEC_OP = 360,
+ LE_OP = 361,
+ GE_OP = 362,
+ EQ_OP = 363,
+ NE_OP = 364,
+ AND_OP = 365,
+ OR_OP = 366,
+ XOR_OP = 367,
+ MUL_ASSIGN = 368,
+ DIV_ASSIGN = 369,
+ ADD_ASSIGN = 370,
+ MOD_ASSIGN = 371,
+ LEFT_ASSIGN = 372,
+ RIGHT_ASSIGN = 373,
+ AND_ASSIGN = 374,
+ XOR_ASSIGN = 375,
+ OR_ASSIGN = 376,
+ SUB_ASSIGN = 377,
+ INVARIANT = 378,
+ LOWP = 379,
+ MEDIUMP = 380,
+ HIGHP = 381,
+ SUPERP = 382,
+ PRECISION = 383,
+ VERSION_TOK = 384,
+ EXTENSION = 385,
+ LINE = 386,
+ COLON = 387,
+ EOL = 388,
+ INTERFACE = 389,
+ OUTPUT = 390,
+ PRAGMA_DEBUG_ON = 391,
+ PRAGMA_DEBUG_OFF = 392,
+ PRAGMA_OPTIMIZE_ON = 393,
+ PRAGMA_OPTIMIZE_OFF = 394,
+ PRAGMA_INVARIANT_ALL = 395,
+ LAYOUT_TOK = 396,
+ ASM = 397,
+ CLASS = 398,
+ UNION = 399,
+ ENUM = 400,
+ TYPEDEF = 401,
+ TEMPLATE = 402,
+ THIS = 403,
+ PACKED_TOK = 404,
+ GOTO = 405,
+ INLINE_TOK = 406,
+ NOINLINE = 407,
+ VOLATILE = 408,
+ PUBLIC_TOK = 409,
+ STATIC = 410,
+ EXTERN = 411,
+ EXTERNAL = 412,
+ LONG_TOK = 413,
+ SHORT_TOK = 414,
+ DOUBLE_TOK = 415,
+ HALF = 416,
+ FIXED_TOK = 417,
+ UNSIGNED = 418,
+ INPUT_TOK = 419,
+ OUPTUT = 420,
+ HVEC2 = 421,
+ HVEC3 = 422,
+ HVEC4 = 423,
+ DVEC2 = 424,
+ DVEC3 = 425,
+ DVEC4 = 426,
+ FVEC2 = 427,
+ FVEC3 = 428,
+ FVEC4 = 429,
+ SAMPLER3DRECT = 430,
+ SIZEOF = 431,
+ CAST = 432,
+ NAMESPACE = 433,
+ USING = 434,
+ COHERENT = 435,
+ RESTRICT = 436,
+ READONLY = 437,
+ WRITEONLY = 438,
+ RESOURCE = 439,
+ ATOMIC_UINT = 440,
+ PATCH = 441,
+ SAMPLE = 442,
+ SUBROUTINE = 443,
+ ERROR_TOK = 444,
+ COMMON = 445,
+ PARTITION = 446,
+ ACTIVE = 447,
+ FILTER = 448,
+ IMAGE1D = 449,
+ IMAGE2D = 450,
+ IMAGE3D = 451,
+ IMAGECUBE = 452,
+ IMAGE1DARRAY = 453,
+ IMAGE2DARRAY = 454,
+ IIMAGE1D = 455,
+ IIMAGE2D = 456,
+ IIMAGE3D = 457,
+ IIMAGECUBE = 458,
+ IIMAGE1DARRAY = 459,
+ IIMAGE2DARRAY = 460,
+ UIMAGE1D = 461,
+ UIMAGE2D = 462,
+ UIMAGE3D = 463,
+ UIMAGECUBE = 464,
+ UIMAGE1DARRAY = 465,
+ UIMAGE2DARRAY = 466,
+ IMAGE1DSHADOW = 467,
+ IMAGE2DSHADOW = 468,
+ IMAGEBUFFER = 469,
+ IIMAGEBUFFER = 470,
+ UIMAGEBUFFER = 471,
+ IMAGE1DARRAYSHADOW = 472,
+ IMAGE2DARRAYSHADOW = 473,
+ ROW_MAJOR = 474,
+ THEN = 475
};
#endif
-/* Tokens. */
-#define ATTRIBUTE 258
-#define CONST_TOK 259
-#define BOOL_TOK 260
-#define FLOAT_TOK 261
-#define INT_TOK 262
-#define UINT_TOK 263
-#define BREAK 264
-#define CONTINUE 265
-#define DO 266
-#define ELSE 267
-#define FOR 268
-#define IF 269
-#define DISCARD 270
-#define RETURN 271
-#define SWITCH 272
-#define CASE 273
-#define DEFAULT 274
-#define BVEC2 275
-#define BVEC3 276
-#define BVEC4 277
-#define IVEC2 278
-#define IVEC3 279
-#define IVEC4 280
-#define UVEC2 281
-#define UVEC3 282
-#define UVEC4 283
-#define VEC2 284
-#define VEC3 285
-#define VEC4 286
-#define CENTROID 287
-#define IN_TOK 288
-#define OUT_TOK 289
-#define INOUT_TOK 290
-#define UNIFORM 291
-#define VARYING 292
-#define NOPERSPECTIVE 293
-#define FLAT 294
-#define SMOOTH 295
-#define MAT2X2 296
-#define MAT2X3 297
-#define MAT2X4 298
-#define MAT3X2 299
-#define MAT3X3 300
-#define MAT3X4 301
-#define MAT4X2 302
-#define MAT4X3 303
-#define MAT4X4 304
-#define SAMPLER1D 305
-#define SAMPLER2D 306
-#define SAMPLER3D 307
-#define SAMPLERCUBE 308
-#define SAMPLER1DSHADOW 309
-#define SAMPLER2DSHADOW 310
-#define SAMPLERCUBESHADOW 311
-#define SAMPLER1DARRAY 312
-#define SAMPLER2DARRAY 313
-#define SAMPLER1DARRAYSHADOW 314
-#define SAMPLER2DARRAYSHADOW 315
-#define ISAMPLER1D 316
-#define ISAMPLER2D 317
-#define ISAMPLER3D 318
-#define ISAMPLERCUBE 319
-#define ISAMPLER1DARRAY 320
-#define ISAMPLER2DARRAY 321
-#define USAMPLER1D 322
-#define USAMPLER2D 323
-#define USAMPLER3D 324
-#define USAMPLERCUBE 325
-#define USAMPLER1DARRAY 326
-#define USAMPLER2DARRAY 327
-#define STRUCT 328
-#define VOID_TOK 329
-#define WHILE 330
-#define IDENTIFIER 331
-#define TYPE_IDENTIFIER 332
-#define NEW_IDENTIFIER 333
-#define FLOATCONSTANT 334
-#define INTCONSTANT 335
-#define UINTCONSTANT 336
-#define BOOLCONSTANT 337
-#define FIELD_SELECTION 338
-#define LEFT_OP 339
-#define RIGHT_OP 340
-#define INC_OP 341
-#define DEC_OP 342
-#define LE_OP 343
-#define GE_OP 344
-#define EQ_OP 345
-#define NE_OP 346
-#define AND_OP 347
-#define OR_OP 348
-#define XOR_OP 349
-#define MUL_ASSIGN 350
-#define DIV_ASSIGN 351
-#define ADD_ASSIGN 352
-#define MOD_ASSIGN 353
-#define LEFT_ASSIGN 354
-#define RIGHT_ASSIGN 355
-#define AND_ASSIGN 356
-#define XOR_ASSIGN 357
-#define OR_ASSIGN 358
-#define SUB_ASSIGN 359
-#define INVARIANT 360
-#define LOWP 361
-#define MEDIUMP 362
-#define HIGHP 363
-#define SUPERP 364
-#define PRECISION 365
-#define VERSION 366
-#define EXTENSION 367
-#define LINE 368
-#define COLON 369
-#define EOL 370
-#define INTERFACE 371
-#define OUTPUT 372
-#define PRAGMA_DEBUG_ON 373
-#define PRAGMA_DEBUG_OFF 374
-#define PRAGMA_OPTIMIZE_ON 375
-#define PRAGMA_OPTIMIZE_OFF 376
-#define PRAGMA_INVARIANT_ALL 377
-#define LAYOUT_TOK 378
-#define ASM 379
-#define CLASS 380
-#define UNION 381
-#define ENUM 382
-#define TYPEDEF 383
-#define TEMPLATE 384
-#define THIS 385
-#define PACKED_TOK 386
-#define GOTO 387
-#define INLINE_TOK 388
-#define NOINLINE 389
-#define VOLATILE 390
-#define PUBLIC_TOK 391
-#define STATIC 392
-#define EXTERN 393
-#define EXTERNAL 394
-#define LONG_TOK 395
-#define SHORT_TOK 396
-#define DOUBLE_TOK 397
-#define HALF 398
-#define FIXED_TOK 399
-#define UNSIGNED 400
-#define INPUT_TOK 401
-#define OUPTUT 402
-#define HVEC2 403
-#define HVEC3 404
-#define HVEC4 405
-#define DVEC2 406
-#define DVEC3 407
-#define DVEC4 408
-#define FVEC2 409
-#define FVEC3 410
-#define FVEC4 411
-#define SAMPLER2DRECT 412
-#define SAMPLER3DRECT 413
-#define SAMPLER2DRECTSHADOW 414
-#define SIZEOF 415
-#define CAST 416
-#define NAMESPACE 417
-#define USING 418
-#define ERROR_TOK 419
-#define COMMON 420
-#define PARTITION 421
-#define ACTIVE 422
-#define SAMPLERBUFFER 423
-#define FILTER 424
-#define IMAGE1D 425
-#define IMAGE2D 426
-#define IMAGE3D 427
-#define IMAGECUBE 428
-#define IMAGE1DARRAY 429
-#define IMAGE2DARRAY 430
-#define IIMAGE1D 431
-#define IIMAGE2D 432
-#define IIMAGE3D 433
-#define IIMAGECUBE 434
-#define IIMAGE1DARRAY 435
-#define IIMAGE2DARRAY 436
-#define UIMAGE1D 437
-#define UIMAGE2D 438
-#define UIMAGE3D 439
-#define UIMAGECUBE 440
-#define UIMAGE1DARRAY 441
-#define UIMAGE2DARRAY 442
-#define IMAGE1DSHADOW 443
-#define IMAGE2DSHADOW 444
-#define IMAGEBUFFER 445
-#define IIMAGEBUFFER 446
-#define UIMAGEBUFFER 447
-#define IMAGE1DARRAYSHADOW 448
-#define IMAGE2DARRAYSHADOW 449
-#define ROW_MAJOR 450
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 52 "glsl_parser.yy"
{
+/* Line 2049 of yacc.c */
+#line 65 "glsl_parser.yy"
+
int n;
float real;
- char *identifier;
+ const char *identifier;
struct ast_type_qualifier type_qualifier;
@@ -453,6 +291,12 @@ typedef union YYSTYPE
ast_declarator_list *declarator_list;
ast_struct_specifier *struct_specifier;
ast_declaration *declaration;
+ ast_switch_body *switch_body;
+ ast_case_label *case_label;
+ ast_case_label_list *case_label_list;
+ ast_case_statement *case_statement;
+ ast_case_statement_list *case_statement_list;
+ ast_interface_block *interface_block;
struct {
ast_node *cond;
@@ -463,17 +307,16 @@ typedef union YYSTYPE
ast_node *then_statement;
ast_node *else_statement;
} selection_rest_statement;
-}
-/* Line 1529 of yacc.c. */
-#line 469 "glsl_parser.h"
- YYSTYPE;
+
+
+/* Line 2049 of yacc.c */
+#line 314 "../../src/glsl/glsl_parser.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
-
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
@@ -488,3 +331,18 @@ typedef struct YYLTYPE
#endif
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int _mesa_glsl_parse (void *YYPARSE_PARAM);
+#else
+int _mesa_glsl_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int _mesa_glsl_parse (struct _mesa_glsl_parse_state *state);
+#else
+int _mesa_glsl_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !_MESA_GLSL_SRC_GLSL_GLSL_PARSER_H */
diff --git a/dist/Mesa/src/glsl/glsl_parser.yy b/dist/Mesa/src/glsl/glsl_parser.yy
index 1851f1e20..d60a1e0a9 100644
--- a/dist/Mesa/src/glsl/glsl_parser.yy
+++ b/dist/Mesa/src/glsl/glsl_parser.yy
@@ -25,15 +25,28 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-
+
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_types.h"
+#include "main/context.h"
+
+#undef yyerror
-#define YYLEX_PARAM state->scanner
+static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
+{
+ _mesa_glsl_error(loc, st, "%s", msg);
+}
+static int
+_mesa_glsl_lex(YYSTYPE *val, YYLTYPE *loc, _mesa_glsl_parse_state *state)
+{
+ return _mesa_glsl_lexer_lex(val, loc, state->scanner);
+}
%}
+%expect 0
+
%pure-parser
%error-verbose
@@ -46,13 +59,13 @@
@$.source = 0;
}
-%lex-param {void *scanner}
+%lex-param {struct _mesa_glsl_parse_state *state}
%parse-param {struct _mesa_glsl_parse_state *state}
%union {
int n;
float real;
- char *identifier;
+ const char *identifier;
struct ast_type_qualifier type_qualifier;
@@ -67,6 +80,12 @@
ast_declarator_list *declarator_list;
ast_struct_specifier *struct_specifier;
ast_declaration *declaration;
+ ast_switch_body *switch_body;
+ ast_case_label *case_label;
+ ast_case_label_list *case_label_list;
+ ast_case_statement *case_statement;
+ ast_case_statement_list *case_statement_list;
+ ast_interface_block *interface_block;
struct {
ast_node *cond;
@@ -89,12 +108,20 @@
%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 SAMPLER2DARRAYSHADOW SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
+%token ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
+%token ISAMPLER1DARRAY ISAMPLER2DARRAY ISAMPLERCUBEARRAY
+%token USAMPLER1D USAMPLER2D USAMPLER3D USAMPLERCUBE USAMPLER1DARRAY
+%token USAMPLER2DARRAY USAMPLERCUBEARRAY
+%token SAMPLER2DRECT ISAMPLER2DRECT USAMPLER2DRECT SAMPLER2DRECTSHADOW
+%token SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
+%token SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS
+%token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
+%token SAMPLEREXTERNALOES
%token STRUCT VOID_TOK WHILE
%token <identifier> IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER
%type <identifier> any_identifier
+%type <interface_block> instance_name_opt
%token <real> FLOATCONSTANT
%token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
%token <identifier> FIELD_SELECTION
@@ -106,7 +133,7 @@
%token INVARIANT
%token LOWP MEDIUMP HIGHP SUPERP PRECISION
-%token VERSION EXTENSION LINE COLON EOL INTERFACE OUTPUT
+%token VERSION_TOK EXTENSION LINE COLON EOL INTERFACE OUTPUT
%token PRAGMA_DEBUG_ON PRAGMA_DEBUG_OFF
%token PRAGMA_OPTIMIZE_ON PRAGMA_OPTIMIZE_OFF
%token PRAGMA_INVARIANT_ALL
@@ -118,12 +145,14 @@
%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 SAMPLER3DRECT
%token SIZEOF CAST NAMESPACE USING
+%token COHERENT RESTRICT READONLY WRITEONLY RESOURCE ATOMIC_UINT PATCH SAMPLE
+%token SUBROUTINE
%token ERROR_TOK
-%token COMMON PARTITION ACTIVE SAMPLERBUFFER FILTER
+%token COMMON PARTITION ACTIVE FILTER
%token IMAGE1D IMAGE2D IMAGE3D IMAGECUBE IMAGE1DARRAY IMAGE2DARRAY
%token IIMAGE1D IIMAGE2D IIMAGE3D IIMAGECUBE IIMAGE1DARRAY IIMAGE2DARRAY
%token UIMAGE1D UIMAGE2D UIMAGE3D UIMAGECUBE UIMAGE1DARRAY UIMAGE2DARRAY
@@ -137,14 +166,16 @@
%type <node> simple_statement
%type <n> precision_qualifier
%type <type_qualifier> type_qualifier
+%type <type_qualifier> auxiliary_storage_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_qualifier> interface_block_layout_qualifier
+%type <type_qualifier> interface_qualifier
%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 <identifier> basic_type_specifier_nonarray
%type <fully_specified_type> fully_specified_type
%type <function> function_prototype
%type <function> function_header
@@ -153,7 +184,7 @@
%type <parameter_declarator> parameter_declarator
%type <parameter_declarator> parameter_declaration
%type <type_qualifier> parameter_qualifier
-%type <type_qualifier> parameter_type_qualifier
+%type <type_qualifier> parameter_direction_qualifier
%type <type_specifier> parameter_type_specifier
%type <function_definition> function_definition
%type <compound_statement> compound_statement_no_new_scope
@@ -196,1556 +227,2039 @@
%type <declarator_list> init_declarator_list
%type <declarator_list> single_declaration
%type <expression> initializer
+%type <expression> initializer_list
%type <node> declaration
%type <node> declaration_statement
%type <node> jump_statement
+%type <node> interface_block
+%type <interface_block> basic_interface_block
%type <struct_specifier> struct_specifier
-%type <node> struct_declaration_list
+%type <declarator_list> struct_declaration_list
%type <declarator_list> struct_declaration
%type <declaration> struct_declarator
%type <declaration> struct_declarator_list
+%type <declarator_list> member_list
+%type <declarator_list> member_declaration
%type <node> selection_statement
%type <selection_rest_statement> selection_rest_statement
+%type <node> switch_statement
+%type <switch_body> switch_body
+%type <case_label_list> case_label_list
+%type <case_label> case_label
+%type <case_statement> case_statement
+%type <case_statement_list> case_statement_list
%type <node> iteration_statement
%type <node> condition
%type <node> conditionopt
%type <node> for_init_statement
%type <for_rest_statement> for_rest_statement
+%type <n> integer_constant
+
+%right THEN ELSE
%%
-translation_unit:
- version_statement extension_statement_list
- {
- _mesa_glsl_initialize_types(state);
- }
- external_declaration_list
- {
- delete state->symbols;
- state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
- _mesa_glsl_initialize_types(state);
- }
- ;
+translation_unit:
+ version_statement extension_statement_list
+ {
+ _mesa_glsl_initialize_types(state);
+ }
+ external_declaration_list
+ {
+ delete state->symbols;
+ state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
+ _mesa_glsl_initialize_types(state);
+ }
+ ;
version_statement:
- /* blank - no #version specified: defaults are already set */
- | VERSION INTCONSTANT EOL
- {
- bool supported = false;
-
- switch ($2) {
- case 100:
- state->es_shader = true;
- supported = state->Const.GLSL_100ES;
- break;
- case 110:
- supported = state->Const.GLSL_110;
- break;
- case 120:
- supported = state->Const.GLSL_120;
- break;
- case 130:
- supported = state->Const.GLSL_130;
- break;
- default:
- supported = false;
- break;
- }
-
- state->language_version = $2;
- state->version_string =
- ralloc_asprintf(state, "GLSL%s %d.%02d",
- state->es_shader ? " ES" : "",
- state->language_version / 100,
- state->language_version % 100);
-
- if (!supported) {
- _mesa_glsl_error(& @2, state, "%s is not supported. "
- "Supported versions are: %s\n",
- state->version_string,
- state->supported_version_string);
- }
- }
- ;
+ /* blank - no #version specified: defaults are already set */
+ | VERSION_TOK INTCONSTANT EOL
+ {
+ state->process_version_directive(&@2, $2, NULL);
+ if (state->error) {
+ YYERROR;
+ }
+ }
+ | VERSION_TOK INTCONSTANT any_identifier EOL
+ {
+ state->process_version_directive(&@2, $2, $3);
+ if (state->error) {
+ YYERROR;
+ }
+ }
+ ;
pragma_statement:
- PRAGMA_DEBUG_ON EOL
- | PRAGMA_DEBUG_OFF EOL
- | PRAGMA_OPTIMIZE_ON EOL
- | PRAGMA_OPTIMIZE_OFF EOL
- | PRAGMA_INVARIANT_ALL EOL
- {
- if (state->language_version < 120) {
- _mesa_glsl_warning(& @1, state,
- "pragma `invariant(all)' not supported in %s",
- state->version_string);
- } else {
- state->all_invariant = true;
- }
- }
- ;
+ PRAGMA_DEBUG_ON EOL
+ | PRAGMA_DEBUG_OFF EOL
+ | PRAGMA_OPTIMIZE_ON EOL
+ | PRAGMA_OPTIMIZE_OFF EOL
+ | PRAGMA_INVARIANT_ALL EOL
+ {
+ if (!state->is_version(120, 100)) {
+ _mesa_glsl_warning(& @1, state,
+ "pragma `invariant(all)' not supported in %s "
+ "(GLSL ES 1.00 or GLSL 1.20 required).",
+ state->get_version_string());
+ } else {
+ state->all_invariant = true;
+ }
+ }
+ ;
extension_statement_list:
- | extension_statement_list extension_statement
- ;
+ | extension_statement_list extension_statement
+ ;
any_identifier:
- IDENTIFIER
- | TYPE_IDENTIFIER
- | NEW_IDENTIFIER
- ;
+ IDENTIFIER
+ | TYPE_IDENTIFIER
+ | NEW_IDENTIFIER
+ ;
extension_statement:
- EXTENSION any_identifier COLON any_identifier EOL
- {
- if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) {
- YYERROR;
- }
- }
- ;
+ EXTENSION any_identifier COLON any_identifier EOL
+ {
+ if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) {
+ YYERROR;
+ }
+ }
+ ;
external_declaration_list:
- external_declaration
- {
- /* FINISHME: The NULL test is required because pragmas are set to
- * FINISHME: NULL. (See production rule for external_declaration.)
- */
- if ($1 != NULL)
- state->translation_unit.push_tail(& $1->link);
- }
- | external_declaration_list external_declaration
- {
- /* FINISHME: The NULL test is required because pragmas are set to
- * FINISHME: NULL. (See production rule for external_declaration.)
- */
- if ($2 != NULL)
- state->translation_unit.push_tail(& $2->link);
- }
- ;
+ external_declaration
+ {
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
+ */
+ if ($1 != NULL)
+ state->translation_unit.push_tail(& $1->link);
+ }
+ | external_declaration_list external_declaration
+ {
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
+ */
+ if ($2 != NULL)
+ state->translation_unit.push_tail(& $2->link);
+ }
+ ;
variable_identifier:
- IDENTIFIER
- | NEW_IDENTIFIER
- ;
+ IDENTIFIER
+ | NEW_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;
- }
- ;
+ 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 '.' any_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);
- }
- ;
+ 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 '.' any_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
- ;
+ expression
+ ;
function_call:
- function_call_or_method
- ;
+ function_call_or_method
+ ;
function_call_or_method:
- function_call_generic
- | postfix_expression '.' method_call_generic
- {
- void *ctx = state;
- $$ = new(ctx) ast_expression(ast_field_selection, $1, $3, NULL);
- $$->set_location(yylloc);
- }
- ;
+ function_call_generic
+ | postfix_expression '.' method_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_with_parameters ')'
+ | function_call_header_no_parameters ')'
+ ;
function_call_header_no_parameters:
- function_call_header VOID_TOK
- | function_call_header
- ;
+ 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 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 '('
+ ;
function_identifier:
- type_specifier
- {
- void *ctx = state;
- $$ = new(ctx) ast_function_expression($1);
- $$->set_location(yylloc);
- }
- | variable_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);
- }
- ;
+ type_specifier
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_function_expression($1);
+ $$->set_location(yylloc);
+ }
+ | variable_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);
+ }
+ ;
method_call_generic:
- method_call_header_with_parameters ')'
- | method_call_header_no_parameters ')'
- ;
+ method_call_header_with_parameters ')'
+ | method_call_header_no_parameters ')'
+ ;
method_call_header_no_parameters:
- method_call_header VOID_TOK
- | method_call_header
- ;
+ method_call_header VOID_TOK
+ | method_call_header
+ ;
method_call_header_with_parameters:
- method_call_header assignment_expression
- {
- $$ = $1;
- $$->set_location(yylloc);
- $$->expressions.push_tail(& $2->link);
- }
- | method_call_header_with_parameters ',' assignment_expression
- {
- $$ = $1;
- $$->set_location(yylloc);
- $$->expressions.push_tail(& $3->link);
- }
- ;
-
- // Grammar Note: Constructors look like methods, but lexical
- // analysis recognized most of them as keywords. They are now
- // recognized through "type_specifier".
+ method_call_header assignment_expression
+ {
+ $$ = $1;
+ $$->set_location(yylloc);
+ $$->expressions.push_tail(& $2->link);
+ }
+ | method_call_header_with_parameters ',' assignment_expression
+ {
+ $$ = $1;
+ $$->set_location(yylloc);
+ $$->expressions.push_tail(& $3->link);
+ }
+ ;
+
+ // Grammar Note: Constructors look like methods, but lexical
+ // analysis recognized most of them as keywords. They are now
+ // recognized through "type_specifier".
method_call_header:
- variable_identifier '('
- {
- 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.
+ variable_identifier '('
+ {
+ 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.
+ 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; }
- ;
+ '+' { $$ = 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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_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);
- }
- ;
+ 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);
- }
- ;
+ 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);
- }
- ;
+ 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; }
- ;
+ '=' { $$ = 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);
- }
- ;
+ 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
- ;
+ conditional_expression
+ ;
declaration:
- function_prototype ';'
- {
- state->symbols->pop_scope();
- $$ = $1;
- }
- | init_declarator_list ';'
- {
- $$ = $1;
- }
- | PRECISION precision_qualifier type_specifier_no_prec ';'
- {
- $3->precision = $2;
- $3->is_precision_statement = true;
- $$ = $3;
- }
- ;
+ function_prototype ';'
+ {
+ state->symbols->pop_scope();
+ $$ = $1;
+ }
+ | init_declarator_list ';'
+ {
+ $$ = $1;
+ }
+ | PRECISION precision_qualifier type_specifier ';'
+ {
+ $3->default_precision = $2;
+ $$ = $3;
+ }
+ | interface_block
+ {
+ $$ = $1;
+ }
+ ;
function_prototype:
- function_declarator ')'
- ;
+ function_declarator ')'
+ ;
function_declarator:
- function_header
- | function_header_with_parameters
- ;
+ 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 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 variable_identifier '('
- {
- void *ctx = state;
- $$ = new(ctx) ast_function();
- $$->set_location(yylloc);
- $$->return_type = $1;
- $$->identifier = $2;
-
- state->symbols->add_function(new(state) ir_function($2));
- state->symbols->push_scope();
- }
- ;
+ fully_specified_type variable_identifier '('
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_function();
+ $$->set_location(yylloc);
+ $$->return_type = $1;
+ $$->identifier = $2;
+
+ state->symbols->add_function(new(state) ir_function($2));
+ state->symbols->push_scope();
+ }
+ ;
parameter_declarator:
- type_specifier any_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 any_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;
- }
- ;
+ type_specifier any_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 any_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 parameter_declarator
+ {
+ $$ = $2;
+ $$->type->qualifier = $1;
+ }
+ | 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;
- }
- ;
+ /* empty */
+ {
+ memset(& $$, 0, sizeof($$));
+ }
+ | CONST_TOK parameter_qualifier
+ {
+ if ($2.flags.q.constant)
+ _mesa_glsl_error(&@1, state, "duplicate const qualifier.\n");
+
+ $$ = $2;
+ $$.flags.q.constant = 1;
+ }
+ | parameter_direction_qualifier parameter_qualifier
+ {
+ if (($1.flags.q.in || $1.flags.q.out) && ($2.flags.q.in || $2.flags.q.out))
+ _mesa_glsl_error(&@1, state, "duplicate in/out/inout qualifier\n");
+
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.q.constant)
+ _mesa_glsl_error(&@1, state, "const must be specified before "
+ "in/out/inout.\n");
+
+ $$ = $1;
+ $$.merge_qualifier(&@1, state, $2);
+ }
+ | precision_qualifier parameter_qualifier
+ {
+ if ($2.precision != ast_precision_none)
+ _mesa_glsl_error(&@1, state, "Duplicate precision qualifier.\n");
+
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
+ _mesa_glsl_error(&@1, state, "Precision qualifiers must come last.\n");
+
+ $$ = $2;
+ $$.precision = $1;
+ }
+
+parameter_direction_qualifier:
+ 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
- ;
+ type_specifier
+ ;
init_declarator_list:
- single_declaration
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- | init_declarator_list ',' any_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);
- state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
- }
- ;
-
- // Grammar Note: No 'enum', or 'typedef'.
+ single_declaration
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ }
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ }
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ }
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ if ($7->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)$7;
+ ast_type_specifier *type = new(ctx) ast_type_specifier($1->type->specifier, true, NULL);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ if ($8->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)$8;
+ ast_type_specifier *type = new(ctx) ast_type_specifier($1->type->specifier, true, $5);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
+ | init_declarator_list ',' any_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);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
+ if ($5->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)$5;
+ _mesa_ast_set_aggregate_type($1->type->specifier, ai, state);
+ }
+ }
+ ;
+
+ // Grammar Note: No 'enum', or 'typedef'.
single_declaration:
- fully_specified_type
- {
- void *ctx = state;
- /* Empty declaration list is valid. */
- $$ = new(ctx) ast_declarator_list($1);
- $$->set_location(yylloc);
- }
- | fully_specified_type any_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 any_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 any_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 any_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 any_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 any_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 variable_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
+ {
+ void *ctx = state;
+ /* Empty declaration list is valid. */
+ $$ = new(ctx) ast_declarator_list($1);
+ $$->set_location(yylloc);
+ }
+ | fully_specified_type any_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 any_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 any_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 any_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);
+ if ($6->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)$6;
+ ast_type_specifier *type = new(ctx) ast_type_specifier($1->specifier, true, NULL);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
+ | fully_specified_type any_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);
+ if ($7->oper == ast_aggregate) {
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)$7;
+ ast_type_specifier *type = new(ctx) ast_type_specifier($1->specifier, true, $4);
+ _mesa_ast_set_aggregate_type(type, ai, state);
+ }
+ }
+ | fully_specified_type any_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);
+ if ($4->oper == ast_aggregate) {
+ _mesa_ast_set_aggregate_type($1->specifier, $4, state);
+ }
+ }
+ | INVARIANT variable_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;
- }
- ;
+ 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_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
+ | layout_qualifier_id_list ',' layout_qualifier_id
+ {
+ $$ = $1;
+ if (!$$.merge_qualifier(& @3, state, $3)) {
+ YYERROR;
+ }
+ }
+ ;
+
+integer_constant:
+ INTCONSTANT { $$ = $1; }
+ | UINTCONSTANT { $$ = $1; }
+ ;
layout_qualifier_id:
- any_identifier
- {
- bool got_one = false;
-
- memset(& $$, 0, sizeof($$));
-
- /* Layout qualifiers for ARB_fragment_coord_conventions. */
- if (!got_one && 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 (got_one && state->ARB_fragment_coord_conventions_warn) {
- _mesa_glsl_warning(& @1, state,
- "GL_ARB_fragment_coord_conventions layout "
- "identifier `%s' used\n", $1);
- }
- }
-
- /* Layout qualifiers for AMD_conservative_depth. */
- if (!got_one && state->AMD_conservative_depth_enable) {
- if (strcmp($1, "depth_any") == 0) {
- got_one = true;
- $$.flags.q.depth_any = 1;
- } else if (strcmp($1, "depth_greater") == 0) {
- got_one = true;
- $$.flags.q.depth_greater = 1;
- } else if (strcmp($1, "depth_less") == 0) {
- got_one = true;
- $$.flags.q.depth_less = 1;
- } else if (strcmp($1, "depth_unchanged") == 0) {
- got_one = true;
- $$.flags.q.depth_unchanged = 1;
- }
-
- if (got_one && state->AMD_conservative_depth_warn) {
- _mesa_glsl_warning(& @1, state,
- "GL_AMD_conservative_depth "
- "layout qualifier `%s' is used\n", $1);
- }
- }
-
- if (!got_one) {
- _mesa_glsl_error(& @1, state, "unrecognized layout identifier "
- "`%s'\n", $1);
- YYERROR;
- }
- }
- | any_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);
- }
- }
- ;
+ any_identifier
+ {
+ memset(& $$, 0, sizeof($$));
+
+ /* Layout qualifiers for ARB_fragment_coord_conventions. */
+ if (!$$.flags.i && state->ARB_fragment_coord_conventions_enable) {
+ if (strcmp($1, "origin_upper_left") == 0) {
+ $$.flags.q.origin_upper_left = 1;
+ } else if (strcmp($1, "pixel_center_integer") == 0) {
+ $$.flags.q.pixel_center_integer = 1;
+ }
+
+ if ($$.flags.i && state->ARB_fragment_coord_conventions_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_ARB_fragment_coord_conventions layout "
+ "identifier `%s' used\n", $1);
+ }
+ }
+
+ /* Layout qualifiers for AMD/ARB_conservative_depth. */
+ if (!$$.flags.i &&
+ (state->AMD_conservative_depth_enable ||
+ state->ARB_conservative_depth_enable)) {
+ if (strcmp($1, "depth_any") == 0) {
+ $$.flags.q.depth_any = 1;
+ } else if (strcmp($1, "depth_greater") == 0) {
+ $$.flags.q.depth_greater = 1;
+ } else if (strcmp($1, "depth_less") == 0) {
+ $$.flags.q.depth_less = 1;
+ } else if (strcmp($1, "depth_unchanged") == 0) {
+ $$.flags.q.depth_unchanged = 1;
+ }
+
+ if ($$.flags.i && state->AMD_conservative_depth_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_AMD_conservative_depth "
+ "layout qualifier `%s' is used\n", $1);
+ }
+ if ($$.flags.i && state->ARB_conservative_depth_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_ARB_conservative_depth "
+ "layout qualifier `%s' is used\n", $1);
+ }
+ }
+
+ /* See also interface_block_layout_qualifier. */
+ if (!$$.flags.i && state->ARB_uniform_buffer_object_enable) {
+ if (strcmp($1, "std140") == 0) {
+ $$.flags.q.std140 = 1;
+ } else if (strcmp($1, "shared") == 0) {
+ $$.flags.q.shared = 1;
+ } else if (strcmp($1, "column_major") == 0) {
+ $$.flags.q.column_major = 1;
+ /* "row_major" is a reserved word in GLSL 1.30+. Its token is parsed
+ * below in the interface_block_layout_qualifier rule.
+ *
+ * It is not a reserved word in GLSL ES 3.00, so it's handled here as
+ * an identifier.
+ */
+ } else if (strcmp($1, "row_major") == 0) {
+ $$.flags.q.row_major = 1;
+ }
+
+ if ($$.flags.i && state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", $1);
+ }
+ }
+
+ if (!$$.flags.i) {
+ _mesa_glsl_error(& @1, state, "unrecognized layout identifier "
+ "`%s'\n", $1);
+ YYERROR;
+ }
+ }
+ | any_identifier '=' integer_constant
+ {
+ memset(& $$, 0, sizeof($$));
+
+ if (state->ARB_explicit_attrib_location_enable) {
+ if (strcmp("location", $1) == 0) {
+ $$.flags.q.explicit_location = 1;
+
+ if ($3 >= 0) {
+ $$.location = $3;
+ } else {
+ _mesa_glsl_error(& @3, state,
+ "invalid location %d specified\n", $3);
+ YYERROR;
+ }
+ }
+
+ if (strcmp("index", $1) == 0) {
+ $$.flags.q.explicit_index = 1;
+
+ if ($3 >= 0) {
+ $$.index = $3;
+ } else {
+ _mesa_glsl_error(& @3, state,
+ "invalid index %d specified\n", $3);
+ YYERROR;
+ }
+ }
+ }
+
+ if (state->ARB_shading_language_420pack_enable &&
+ strcmp("binding", $1) == 0) {
+ $$.flags.q.explicit_binding = 1;
+ $$.binding = $3;
+ }
+
+ /* If the identifier didn't match any known layout identifiers,
+ * emit an error.
+ */
+ if (!$$.flags.i) {
+ _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);
+ }
+ }
+ | interface_block_layout_qualifier
+ {
+ $$ = $1;
+ /* Layout qualifiers for ARB_uniform_buffer_object. */
+ if ($$.flags.q.uniform && !state->ARB_uniform_buffer_object_enable) {
+ _mesa_glsl_error(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", $1);
+ } else if ($$.flags.q.uniform && state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "layout qualifier `%s' is used\n", $1);
+ }
+ }
+ ;
+
+/* This is a separate language rule because we parse these as tokens
+ * (due to them being reserved keywords) instead of identifiers like
+ * most qualifiers. See the any_identifier path of
+ * layout_qualifier_id for the others.
+ */
+interface_block_layout_qualifier:
+ ROW_MAJOR
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.row_major = 1;
+ }
+ | PACKED_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.packed = 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;
- }
- ;
+ SMOOTH
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.smooth = 1;
+ }
+ | FLAT
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.flat = 1;
+ }
+ | NOPERSPECTIVE
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.noperspective = 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;
- }
- ;
+ /* Single qualifiers */
+ INVARIANT
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.invariant = 1;
+ }
+ | auxiliary_storage_qualifier
+ | storage_qualifier
+ | interpolation_qualifier
+ | layout_qualifier
+ | precision_qualifier
+ {
+ memset(&$$, 0, sizeof($$));
+ $$.precision = $1;
+ }
+
+ /* Multiple qualifiers:
+ * In GLSL 4.20, these can be specified in any order. In earlier versions,
+ * they appear in this order (see GLSL 1.50 section 4.7 & comments below):
+ *
+ * invariant interpolation auxiliary storage precision ...or...
+ * layout storage precision
+ *
+ * Each qualifier's rule ensures that the accumulated qualifiers on the right
+ * side don't contain any that must appear on the left hand side.
+ * For example, when processing a storage qualifier, we check that there are
+ * no auxiliary, interpolation, layout, or invariant qualifiers to the right.
+ */
+ | INVARIANT type_qualifier
+ {
+ if ($2.flags.q.invariant)
+ _mesa_glsl_error(&@1, state, "Duplicate \"invariant\" qualifier.\n");
+
+ if ($2.has_layout()) {
+ _mesa_glsl_error(&@1, state,
+ "\"invariant\" cannot be used with layout(...).\n");
+ }
+
+ $$ = $2;
+ $$.flags.q.invariant = 1;
+ }
+ | interpolation_qualifier type_qualifier
+ {
+ /* Section 4.3 of the GLSL 1.40 specification states:
+ * "...qualified with one of these interpolation qualifiers"
+ *
+ * GLSL 1.30 claims to allow "one or more", but insists that:
+ * "These interpolation qualifiers may only precede the qualifiers in,
+ * centroid in, out, or centroid out in a declaration."
+ *
+ * ...which means that e.g. smooth can't precede smooth, so there can be
+ * only one after all, and the 1.40 text is a clarification, not a change.
+ */
+ if ($2.has_interpolation())
+ _mesa_glsl_error(&@1, state, "Duplicate interpolation qualifier.\n");
+
+ if ($2.has_layout()) {
+ _mesa_glsl_error(&@1, state, "Interpolation qualifiers cannot be used "
+ "with layout(...).\n");
+ }
+
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.q.invariant) {
+ _mesa_glsl_error(&@1, state, "Interpolation qualifiers must come "
+ "after \"invariant\".\n");
+ }
+
+ $$ = $1;
+ $$.merge_qualifier(&@1, state, $2);
+ }
+ | layout_qualifier type_qualifier
+ {
+ /* The GLSL 1.50 grammar indicates that a layout(...) declaration can be
+ * used standalone or immediately before a storage qualifier. It cannot
+ * be used with interpolation qualifiers or invariant. There does not
+ * appear to be any text indicating that it must come before the storage
+ * qualifier, but always seems to in examples.
+ */
+ if (!state->ARB_shading_language_420pack_enable && $2.has_layout())
+ _mesa_glsl_error(&@1, state, "Duplicate layout(...) qualifiers.\n");
+
+ if ($2.flags.q.invariant)
+ _mesa_glsl_error(&@1, state, "layout(...) cannot be used with "
+ "the \"invariant\" qualifier\n");
+
+ if ($2.has_interpolation()) {
+ _mesa_glsl_error(&@1, state, "layout(...) cannot be used with "
+ "interpolation qualifiers.\n");
+ }
+
+ $$ = $1;
+ $$.merge_qualifier(&@1, state, $2);
+ }
+ | auxiliary_storage_qualifier type_qualifier
+ {
+ if ($2.has_auxiliary_storage()) {
+ _mesa_glsl_error(&@1, state,
+ "Duplicate auxiliary storage qualifier (centroid).\n");
+ }
+
+ if (!state->ARB_shading_language_420pack_enable &&
+ ($2.flags.q.invariant || $2.has_interpolation() || $2.has_layout())) {
+ _mesa_glsl_error(&@1, state, "Auxiliary storage qualifiers must come "
+ "just before storage qualifiers.\n");
+ }
+ $$ = $1;
+ $$.flags.i |= $2.flags.i;
+ }
+ | storage_qualifier type_qualifier
+ {
+ /* Section 4.3 of the GLSL 1.20 specification states:
+ * "Variable declarations may have a storage qualifier specified..."
+ * 1.30 clarifies this to "may have one storage qualifier".
+ */
+ if ($2.has_storage())
+ _mesa_glsl_error(&@1, state, "Duplicate storage qualifier.\n");
+
+ if (!state->ARB_shading_language_420pack_enable &&
+ ($2.flags.q.invariant || $2.has_interpolation() || $2.has_layout() ||
+ $2.has_auxiliary_storage())) {
+ _mesa_glsl_error(&@1, state, "Storage qualifiers must come after "
+ "invariant, interpolation, layout and auxiliary "
+ "storage qualifiers.\n");
+ }
+
+ $$ = $1;
+ $$.merge_qualifier(&@1, state, $2);
+ }
+ | precision_qualifier type_qualifier
+ {
+ if ($2.precision != ast_precision_none)
+ _mesa_glsl_error(&@1, state, "Duplicate precision qualifier.\n");
+
+ if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
+ _mesa_glsl_error(&@1, state, "Precision qualifiers must come last.\n");
+
+ $$ = $2;
+ $$.precision = $1;
+ }
+ ;
+
+auxiliary_storage_qualifier:
+ CENTROID
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.centroid = 1;
+ }
+ /* TODO: "sample" and "patch" also go here someday. */
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;
- }
- ;
+ 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;
+ }
+ | IN_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.in = 1;
+ }
+ | OUT_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.out = 1;
+ }
+ | UNIFORM
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.uniform = 1;
+ }
+ ;
type_specifier:
- type_specifier_no_prec
- {
- $$ = $1;
- }
- | 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
+ | 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);
- }
- | TYPE_IDENTIFIER
- {
- void *ctx = state;
- $$ = new(ctx) ast_type_specifier($1);
- $$->set_location(yylloc);
- }
- ;
+ 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);
+ }
+ | TYPE_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; }
- ;
+ VOID_TOK { $$ = "void"; }
+ | FLOAT_TOK { $$ = "float"; }
+ | INT_TOK { $$ = "int"; }
+ | UINT_TOK { $$ = "uint"; }
+ | BOOL_TOK { $$ = "bool"; }
+ | VEC2 { $$ = "vec2"; }
+ | VEC3 { $$ = "vec3"; }
+ | VEC4 { $$ = "vec4"; }
+ | BVEC2 { $$ = "bvec2"; }
+ | BVEC3 { $$ = "bvec3"; }
+ | BVEC4 { $$ = "bvec4"; }
+ | IVEC2 { $$ = "ivec2"; }
+ | IVEC3 { $$ = "ivec3"; }
+ | IVEC4 { $$ = "ivec4"; }
+ | UVEC2 { $$ = "uvec2"; }
+ | UVEC3 { $$ = "uvec3"; }
+ | UVEC4 { $$ = "uvec4"; }
+ | MAT2X2 { $$ = "mat2"; }
+ | MAT2X3 { $$ = "mat2x3"; }
+ | MAT2X4 { $$ = "mat2x4"; }
+ | MAT3X2 { $$ = "mat3x2"; }
+ | MAT3X3 { $$ = "mat3"; }
+ | MAT3X4 { $$ = "mat3x4"; }
+ | MAT4X2 { $$ = "mat4x2"; }
+ | MAT4X3 { $$ = "mat4x3"; }
+ | MAT4X4 { $$ = "mat4"; }
+ | SAMPLER1D { $$ = "sampler1D"; }
+ | SAMPLER2D { $$ = "sampler2D"; }
+ | SAMPLER2DRECT { $$ = "sampler2DRect"; }
+ | SAMPLER3D { $$ = "sampler3D"; }
+ | SAMPLERCUBE { $$ = "samplerCube"; }
+ | SAMPLEREXTERNALOES { $$ = "samplerExternalOES"; }
+ | SAMPLER1DSHADOW { $$ = "sampler1DShadow"; }
+ | SAMPLER2DSHADOW { $$ = "sampler2DShadow"; }
+ | SAMPLER2DRECTSHADOW { $$ = "sampler2DRectShadow"; }
+ | SAMPLERCUBESHADOW { $$ = "samplerCubeShadow"; }
+ | SAMPLER1DARRAY { $$ = "sampler1DArray"; }
+ | SAMPLER2DARRAY { $$ = "sampler2DArray"; }
+ | SAMPLER1DARRAYSHADOW { $$ = "sampler1DArrayShadow"; }
+ | SAMPLER2DARRAYSHADOW { $$ = "sampler2DArrayShadow"; }
+ | SAMPLERBUFFER { $$ = "samplerBuffer"; }
+ | SAMPLERCUBEARRAY { $$ = "samplerCubeArray"; }
+ | SAMPLERCUBEARRAYSHADOW { $$ = "samplerCubeArrayShadow"; }
+ | ISAMPLER1D { $$ = "isampler1D"; }
+ | ISAMPLER2D { $$ = "isampler2D"; }
+ | ISAMPLER2DRECT { $$ = "isampler2DRect"; }
+ | ISAMPLER3D { $$ = "isampler3D"; }
+ | ISAMPLERCUBE { $$ = "isamplerCube"; }
+ | ISAMPLER1DARRAY { $$ = "isampler1DArray"; }
+ | ISAMPLER2DARRAY { $$ = "isampler2DArray"; }
+ | ISAMPLERBUFFER { $$ = "isamplerBuffer"; }
+ | ISAMPLERCUBEARRAY { $$ = "isamplerCubeArray"; }
+ | USAMPLER1D { $$ = "usampler1D"; }
+ | USAMPLER2D { $$ = "usampler2D"; }
+ | USAMPLER2DRECT { $$ = "usampler2DRect"; }
+ | USAMPLER3D { $$ = "usampler3D"; }
+ | USAMPLERCUBE { $$ = "usamplerCube"; }
+ | USAMPLER1DARRAY { $$ = "usampler1DArray"; }
+ | USAMPLER2DARRAY { $$ = "usampler2DArray"; }
+ | USAMPLERBUFFER { $$ = "usamplerBuffer"; }
+ | USAMPLERCUBEARRAY { $$ = "usamplerCubeArray"; }
+ | SAMPLER2DMS { $$ = "sampler2DMS"; }
+ | ISAMPLER2DMS { $$ = "isampler2DMS"; }
+ | USAMPLER2DMS { $$ = "usampler2DMS"; }
+ | SAMPLER2DMSARRAY { $$ = "sampler2DMSArray"; }
+ | ISAMPLER2DMSARRAY { $$ = "isampler2DMSArray"; }
+ | USAMPLER2DMSARRAY { $$ = "usampler2DMSArray"; }
+ ;
precision_qualifier:
- HIGHP {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- $$ = ast_precision_high;
- }
- | MEDIUMP {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- $$ = ast_precision_medium;
- }
- | LOWP {
- if (!state->es_shader && state->language_version < 130)
- _mesa_glsl_error(& @1, state,
- "precision qualifier forbidden "
- "in %s (1.30 or later "
- "required)\n",
- state->version_string);
-
- $$ = ast_precision_low;
- }
- ;
+ HIGHP
+ {
+ state->check_precision_qualifiers_allowed(&@1);
+ $$ = ast_precision_high;
+ }
+ | MEDIUMP
+ {
+ state->check_precision_qualifiers_allowed(&@1);
+ $$ = ast_precision_medium;
+ }
+ | LOWP
+ {
+ state->check_precision_qualifiers_allowed(&@1);
+ $$ = ast_precision_low;
+ }
+ ;
struct_specifier:
- STRUCT any_identifier '{' struct_declaration_list '}'
- {
- void *ctx = state;
- $$ = new(ctx) ast_struct_specifier($2, $4);
- $$->set_location(yylloc);
- state->symbols->add_type($2, glsl_type::void_type);
- }
- | STRUCT '{' struct_declaration_list '}'
- {
- void *ctx = state;
- $$ = new(ctx) ast_struct_specifier(NULL, $3);
- $$->set_location(yylloc);
- }
- ;
+ STRUCT any_identifier '{' struct_declaration_list '}'
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_struct_specifier($2, $4);
+ $$->set_location(yylloc);
+ state->symbols->add_type($2, glsl_type::void_type);
+ state->symbols->add_type_ast($2, new(ctx) ast_type_specifier($$));
+ }
+ | 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
+ {
+ $$ = $1;
+ $1->link.self_link();
+ }
+ | struct_declaration_list struct_declaration
+ {
+ $$ = $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 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);
+ type->specifier = $1;
+ $$ = new(ctx) ast_declarator_list(type);
+ $$->set_location(yylloc);
- $$->declarations.push_degenerate_list_at_head(& $2->link);
- }
- ;
+ $$->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
+ {
+ $$ = $1;
+ $1->link.self_link();
+ }
+ | struct_declarator_list ',' struct_declarator
+ {
+ $$ = $1;
+ $$->link.insert_before(& $3->link);
+ }
+ ;
struct_declarator:
- any_identifier
- {
- void *ctx = state;
- $$ = new(ctx) ast_declaration($1, false, NULL, NULL);
- $$->set_location(yylloc);
- state->symbols->add_variable(new(state) ir_variable(NULL, $1, ir_var_auto));
- }
- | any_identifier '[' constant_expression ']'
- {
- void *ctx = state;
- $$ = new(ctx) ast_declaration($1, true, $3, NULL);
- $$->set_location(yylloc);
- }
- ;
+ any_identifier
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_declaration($1, false, NULL, NULL);
+ $$->set_location(yylloc);
+ }
+ | any_identifier '[' constant_expression ']'
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_declaration($1, true, $3, NULL);
+ $$->set_location(yylloc);
+ }
+ ;
initializer:
- assignment_expression
- ;
+ assignment_expression
+ | '{' initializer_list '}'
+ {
+ $$ = $2;
+ }
+ | '{' initializer_list ',' '}'
+ {
+ $$ = $2;
+ }
+ ;
+
+initializer_list:
+ initializer
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_aggregate_initializer();
+ $$->set_location(yylloc);
+ $$->expressions.push_tail(& $1->link);
+ }
+ | initializer_list ',' initializer
+ {
+ $1->expressions.push_tail(& $3->link);
+ }
+ ;
declaration_statement:
- declaration
- ;
+ declaration
+ ;
- // Grammar Note: labeled statements for SWITCH only; 'goto' is not
- // supported.
+ // Grammar Note: labeled statements for SWITCH only; 'goto' is not
+ // supported.
statement:
- compound_statement { $$ = (ast_node *) $1; }
- | simple_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
- ;
+ declaration_statement
+ | expression_statement
+ | selection_statement
+ | switch_statement
+ | iteration_statement
+ | jump_statement
+ ;
compound_statement:
- '{' '}'
- {
- void *ctx = state;
- $$ = new(ctx) ast_compound_statement(true, NULL);
- $$->set_location(yylloc);
- }
- | '{'
- {
- state->symbols->push_scope();
- }
- statement_list '}'
- {
- void *ctx = state;
- $$ = new(ctx) ast_compound_statement(true, $3);
- $$->set_location(yylloc);
- state->symbols->pop_scope();
- }
- ;
+ '{' '}'
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_compound_statement(true, NULL);
+ $$->set_location(yylloc);
+ }
+ | '{'
+ {
+ state->symbols->push_scope();
+ }
+ statement_list '}'
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_compound_statement(true, $3);
+ $$->set_location(yylloc);
+ state->symbols->pop_scope();
+ }
+ ;
statement_no_new_scope:
- compound_statement_no_new_scope { $$ = (ast_node *) $1; }
- | simple_statement
- ;
+ 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);
- }
- ;
+ '{' '}'
+ {
+ 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);
- }
- ;
+ 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);
- }
- ;
+ ';'
+ {
+ 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);
- }
- ;
+ 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;
- }
- ;
+ statement ELSE statement
+ {
+ $$.then_statement = $1;
+ $$.else_statement = $3;
+ }
+ | statement %prec THEN
+ {
+ $$.then_statement = $1;
+ $$.else_statement = NULL;
+ }
+ ;
condition:
- expression
- {
- $$ = (ast_node *) $1;
- }
- | fully_specified_type any_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;
- }
- ;
+ expression
+ {
+ $$ = (ast_node *) $1;
+ }
+ | fully_specified_type any_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;
+ }
+ ;
+/*
+ * siwtch_statement grammar is based on the syntax described in the body
+ * of the GLSL spec, not in it's appendix!!!
+ */
switch_statement:
- SWITCH '(' expression ')' compound_statement
- ;
+ SWITCH '(' expression ')' switch_body
+ {
+ $$ = new(state) ast_switch_statement($3, $5);
+ $$->set_location(yylloc);
+ }
+ ;
+
+switch_body:
+ '{' '}'
+ {
+ $$ = new(state) ast_switch_body(NULL);
+ $$->set_location(yylloc);
+ }
+ | '{' case_statement_list '}'
+ {
+ $$ = new(state) ast_switch_body($2);
+ $$->set_location(yylloc);
+ }
+ ;
case_label:
- CASE expression ':'
- | DEFAULT ':'
- ;
+ CASE expression ':'
+ {
+ $$ = new(state) ast_case_label($2);
+ $$->set_location(yylloc);
+ }
+ | DEFAULT ':'
+ {
+ $$ = new(state) ast_case_label(NULL);
+ $$->set_location(yylloc);
+ }
+ ;
+
+case_label_list:
+ case_label
+ {
+ ast_case_label_list *labels = new(state) ast_case_label_list();
+
+ labels->labels.push_tail(& $1->link);
+ $$ = labels;
+ $$->set_location(yylloc);
+ }
+ | case_label_list case_label
+ {
+ $$ = $1;
+ $$->labels.push_tail(& $2->link);
+ }
+ ;
+
+case_statement:
+ case_label_list statement
+ {
+ ast_case_statement *stmts = new(state) ast_case_statement($1);
+ stmts->set_location(yylloc);
+
+ stmts->stmts.push_tail(& $2->link);
+ $$ = stmts;
+ }
+ | case_statement statement
+ {
+ $$ = $1;
+ $$->stmts.push_tail(& $2->link);
+ }
+ ;
+
+case_statement_list:
+ case_statement
+ {
+ ast_case_statement_list *cases= new(state) ast_case_statement_list();
+ cases->set_location(yylloc);
+
+ cases->cases.push_tail(& $1->link);
+ $$ = cases;
+ }
+ | case_statement_list case_statement
+ {
+ $$ = $1;
+ $$->cases.push_tail(& $2->link);
+ }
+ ;
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);
- }
- ;
+ 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
- ;
+ expression_statement
+ | declaration_statement
+ ;
conditionopt:
- condition
- | /* empty */
- {
- $$ = NULL;
- }
- ;
+ 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.
+ 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);
- }
- ;
+ 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 { $$ = $1; }
+ | declaration { $$ = $1; }
+ | pragma_statement { $$ = NULL; }
+ | layout_defaults { $$ = 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;
-
- state->symbols->pop_scope();
- }
- ;
+ function_prototype compound_statement_no_new_scope
+ {
+ void *ctx = state;
+ $$ = new(ctx) ast_function_definition();
+ $$->set_location(yylloc);
+ $$->prototype = $1;
+ $$->body = $2;
+
+ state->symbols->pop_scope();
+ }
+ ;
+
+/* layout_qualifieropt is packed into this rule */
+interface_block:
+ basic_interface_block
+ {
+ $$ = $1;
+ }
+ | layout_qualifier basic_interface_block
+ {
+ ast_interface_block *block = $2;
+ if (!block->layout.merge_qualifier(& @1, state, $1)) {
+ YYERROR;
+ }
+ $$ = block;
+ }
+ ;
+
+basic_interface_block:
+ interface_qualifier NEW_IDENTIFIER '{' member_list '}' instance_name_opt ';'
+ {
+ ast_interface_block *const block = $6;
+
+ block->block_name = $2;
+ block->declarations.push_degenerate_list_at_head(& $4->link);
+
+ if ($1.flags.q.uniform) {
+ if (!state->ARB_uniform_buffer_object_enable) {
+ _mesa_glsl_error(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ } else if (state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ }
+ } else {
+ if (state->es_shader || state->language_version < 150) {
+ _mesa_glsl_error(& @1, state,
+ "#version 150 required for using "
+ "interface blocks.\n");
+ }
+ }
+
+ /* From the GLSL 1.50.11 spec, section 4.3.7 ("Interface Blocks"):
+ * "It is illegal to have an input block in a vertex shader
+ * or an output block in a fragment shader"
+ */
+ if ((state->target == vertex_shader) && $1.flags.q.in) {
+ _mesa_glsl_error(& @1, state,
+ "`in' interface block is not allowed for "
+ "a vertex shader\n");
+ } else if ((state->target == fragment_shader) && $1.flags.q.out) {
+ _mesa_glsl_error(& @1, state,
+ "`out' interface block is not allowed for "
+ "a fragment shader\n");
+ }
+
+ /* Since block arrays require names, and both features are added in
+ * the same language versions, we don't have to explicitly
+ * version-check both things.
+ */
+ if (block->instance_name != NULL) {
+ state->check_version(150, 300, & @1, "interface blocks with "
+ "an instance name are not allowed");
+ }
+
+ unsigned interface_type_mask;
+ struct ast_type_qualifier temp_type_qualifier;
+
+ /* Get a bitmask containing only the in/out/uniform flags, allowing us
+ * to ignore other irrelevant flags like interpolation qualifiers.
+ */
+ temp_type_qualifier.flags.i = 0;
+ temp_type_qualifier.flags.q.uniform = true;
+ temp_type_qualifier.flags.q.in = true;
+ temp_type_qualifier.flags.q.out = true;
+ interface_type_mask = temp_type_qualifier.flags.i;
+
+ /* Get the block's interface qualifier. The interface_qualifier
+ * production rule guarantees that only one bit will be set (and
+ * it will be in/out/uniform).
+ */
+ unsigned block_interface_qualifier = $1.flags.i;
+
+ block->layout.flags.i |= block_interface_qualifier;
+
+ foreach_list_typed (ast_declarator_list, member, link, &block->declarations) {
+ ast_type_qualifier& qualifier = member->type->qualifier;
+ if ((qualifier.flags.i & interface_type_mask) == 0) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If no optional qualifier is used in a member declaration, the
+ * qualifier of the variable is just in, out, or uniform as declared
+ * by interface-qualifier."
+ */
+ qualifier.flags.i |= block_interface_qualifier;
+ } else if ((qualifier.flags.i & interface_type_mask) !=
+ block_interface_qualifier) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If optional qualifiers are used, they can include interpolation
+ * and storage qualifiers and they must declare an input, output,
+ * or uniform variable consistent with the interface qualifier of
+ * the block."
+ */
+ _mesa_glsl_error(& @1, state,
+ "uniform/in/out qualifier on "
+ "interface block member does not match "
+ "the interface block\n");
+ }
+ }
+
+ $$ = block;
+ }
+ ;
+
+interface_qualifier:
+ IN_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.in = 1;
+ }
+ | OUT_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.out = 1;
+ }
+ | UNIFORM
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.uniform = 1;
+ }
+ ;
+
+instance_name_opt:
+ /* empty */
+ {
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ NULL, NULL);
+ }
+ | NEW_IDENTIFIER
+ {
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ $1, NULL);
+ }
+ | NEW_IDENTIFIER '[' constant_expression ']'
+ {
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ $1, $3);
+ }
+ | NEW_IDENTIFIER '[' ']'
+ {
+ _mesa_glsl_error(& @1, state,
+ "instance block arrays must be explicitly sized\n");
+
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
+ $1, NULL);
+ }
+ ;
+
+member_list:
+ member_declaration
+ {
+ $$ = $1;
+ $1->link.self_link();
+ }
+ | member_declaration member_list
+ {
+ $$ = $1;
+ $2->link.insert_before(& $$->link);
+ }
+ ;
+
+member_declaration:
+ fully_specified_type struct_declarator_list ';'
+ {
+ void *ctx = state;
+ ast_fully_specified_type *type = $1;
+ type->set_location(yylloc);
+
+ if (type->qualifier.flags.q.attribute) {
+ _mesa_glsl_error(& @1, state,
+ "keyword 'attribute' cannot be used with "
+ "interface block member\n");
+ } else if (type->qualifier.flags.q.varying) {
+ _mesa_glsl_error(& @1, state,
+ "keyword 'varying' cannot be used with "
+ "interface block member\n");
+ }
+
+ $$ = new(ctx) ast_declarator_list(type);
+ $$->set_location(yylloc);
+
+ $$->declarations.push_degenerate_list_at_head(& $2->link);
+ }
+ ;
+
+layout_defaults:
+ layout_qualifier UNIFORM ';'
+ {
+ if (!state->default_uniform_qualifier->merge_qualifier(& @1, state, $1)) {
+ YYERROR;
+ }
+ }
diff --git a/dist/Mesa/src/glsl/glsl_parser_extras.cpp b/dist/Mesa/src/glsl/glsl_parser_extras.cpp
index cc781378d..e97461d6c 100644
--- a/dist/Mesa/src/glsl/glsl_parser_extras.cpp
+++ b/dist/Mesa/src/glsl/glsl_parser_extras.cpp
@@ -27,6 +27,8 @@
extern "C" {
#include "main/core.h" /* for struct gl_context */
+#include "main/context.h"
+#include "main/shaderobj.h"
}
#include "ralloc.h"
@@ -36,8 +38,24 @@ extern "C" {
#include "ir_optimization.h"
#include "loop_analysis.h"
-_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
+/**
+ * Format a short human-readable description of the given GLSL version.
+ */
+const char *
+glsl_compute_version_string(void *mem_ctx, bool is_es, unsigned version)
+{
+ return ralloc_asprintf(mem_ctx, "GLSL%s %d.%02d", is_es ? " ES" : "",
+ version / 100, version % 100);
+}
+
+
+static unsigned known_desktop_glsl_versions[] =
+ { 110, 120, 130, 140, 150, 330, 400, 410, 420, 430 };
+
+
+_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
GLenum target, void *mem_ctx)
+ : ctx(_ctx)
{
switch (target) {
case GL_VERTEX_SHADER: this->target = vertex_shader; break;
@@ -50,10 +68,15 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
this->symbols = new(mem_ctx) glsl_symbol_table;
this->info_log = ralloc_strdup(mem_ctx, "");
this->error = false;
- this->loop_or_switch_nesting = NULL;
+ this->loop_nesting_ast = NULL;
+ this->switch_state.switch_nesting_ast = NULL;
+
+ this->struct_specifier_depth = 0;
+ this->num_builtins_to_link = 0;
/* Set default language version and extensions */
- this->language_version = 110;
+ this->language_version = ctx->Const.ForceGLSLVersion ?
+ ctx->Const.ForceGLSLVersion : 110;
this->es_shader = false;
this->ARB_texture_rectangle_enable = true;
@@ -73,46 +96,250 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
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.MaxVertexTextureImageUnits = ctx->Const.VertexProgram.MaxTextureImageUnits;
this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
- this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
+ this->Const.MaxTextureImageUnits = ctx->Const.FragmentProgram.MaxTextureImageUnits;
this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
+ this->Const.MinProgramTexelOffset = ctx->Const.MinProgramTexelOffset;
+ this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset;
this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
- /* Note: Once the OpenGL 3.0 'forward compatible' context or the OpenGL 3.2
- * Core context is supported, this logic will need change. Older versions of
- * GLSL are no longer supported outside the compatibility contexts of 3.x.
+ /* Populate the list of supported GLSL versions */
+ /* FINISHME: Once the OpenGL 3.0 'forward compatible' context or
+ * the OpenGL 3.2 Core context is supported, this logic will need
+ * change. Older versions of GLSL are no longer supported
+ * outside the compatibility contexts of 3.x.
*/
- this->Const.GLSL_100ES = (ctx->API == API_OPENGLES2)
- || ctx->Extensions.ARB_ES2_compatibility;
- this->Const.GLSL_110 = (ctx->API == API_OPENGL);
- this->Const.GLSL_120 = (ctx->API == API_OPENGL)
- && (ctx->Const.GLSLVersion >= 120);
- this->Const.GLSL_130 = (ctx->API == API_OPENGL)
- && (ctx->Const.GLSLVersion >= 130);
-
- const unsigned lowest_version =
- (ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
- ? 100 : 110;
- const unsigned highest_version =
- (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100;
- char *supported = ralloc_strdup(this, "");
+ this->num_supported_versions = 0;
+ if (_mesa_is_desktop_gl(ctx)) {
+ for (unsigned i = 0; i < ARRAY_SIZE(known_desktop_glsl_versions); i++) {
+ if (known_desktop_glsl_versions[i] <= ctx->Const.GLSLVersion) {
+ this->supported_versions[this->num_supported_versions].ver
+ = known_desktop_glsl_versions[i];
+ this->supported_versions[this->num_supported_versions].es = false;
+ this->num_supported_versions++;
+ }
+ }
+ }
+ if (ctx->API == API_OPENGLES2 || ctx->Extensions.ARB_ES2_compatibility) {
+ this->supported_versions[this->num_supported_versions].ver = 100;
+ this->supported_versions[this->num_supported_versions].es = true;
+ this->num_supported_versions++;
+ }
+ if (_mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility) {
+ this->supported_versions[this->num_supported_versions].ver = 300;
+ this->supported_versions[this->num_supported_versions].es = true;
+ this->num_supported_versions++;
+ }
+ assert(this->num_supported_versions
+ <= ARRAY_SIZE(this->supported_versions));
- for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) {
- const char *const prefix = (ver == lowest_version)
+ /* Create a string for use in error messages to tell the user which GLSL
+ * versions are supported.
+ */
+ char *supported = ralloc_strdup(this, "");
+ for (unsigned i = 0; i < this->num_supported_versions; i++) {
+ unsigned ver = this->supported_versions[i].ver;
+ const char *const prefix = (i == 0)
? ""
- : ((ver == highest_version) ? ", and " : ", ");
+ : ((i == this->num_supported_versions - 1) ? ", and " : ", ");
+ const char *const suffix = (this->supported_versions[i].es) ? " ES" : "";
- ralloc_asprintf_append(& supported, "%s%d.%02d%s",
+ ralloc_asprintf_append(& supported, "%s%u.%02u%s",
prefix,
ver / 100, ver % 100,
- (ver == 100) ? " ES" : "");
+ suffix);
}
this->supported_version_string = supported;
+
+ if (ctx->Const.ForceGLSLExtensionsWarn)
+ _mesa_glsl_process_extension("all", NULL, "warn", NULL, this);
+
+ this->default_uniform_qualifier = new(this) ast_type_qualifier();
+ this->default_uniform_qualifier->flags.q.shared = 1;
+ this->default_uniform_qualifier->flags.q.column_major = 1;
+}
+
+/**
+ * Determine whether the current GLSL version is sufficiently high to support
+ * a certain feature, and generate an error message if it isn't.
+ *
+ * \param required_glsl_version and \c required_glsl_es_version are
+ * interpreted as they are in _mesa_glsl_parse_state::is_version().
+ *
+ * \param locp is the parser location where the error should be reported.
+ *
+ * \param fmt (and additional arguments) constitute a printf-style error
+ * message to report if the version check fails. Information about the
+ * current and required GLSL versions will be appended. So, for example, if
+ * the GLSL version being compiled is 1.20, and check_version(130, 300, locp,
+ * "foo unsupported") is called, the error message will be "foo unsupported in
+ * GLSL 1.20 (GLSL 1.30 or GLSL 3.00 ES required)".
+ */
+bool
+_mesa_glsl_parse_state::check_version(unsigned required_glsl_version,
+ unsigned required_glsl_es_version,
+ YYLTYPE *locp, const char *fmt, ...)
+{
+ if (this->is_version(required_glsl_version, required_glsl_es_version))
+ return true;
+
+ va_list args;
+ va_start(args, fmt);
+ char *problem = ralloc_vasprintf(this, fmt, args);
+ va_end(args);
+ const char *glsl_version_string
+ = glsl_compute_version_string(this, false, required_glsl_version);
+ const char *glsl_es_version_string
+ = glsl_compute_version_string(this, true, required_glsl_es_version);
+ const char *requirement_string = "";
+ if (required_glsl_version && required_glsl_es_version) {
+ requirement_string = ralloc_asprintf(this, " (%s or %s required)",
+ glsl_version_string,
+ glsl_es_version_string);
+ } else if (required_glsl_version) {
+ requirement_string = ralloc_asprintf(this, " (%s required)",
+ glsl_version_string);
+ } else if (required_glsl_es_version) {
+ requirement_string = ralloc_asprintf(this, " (%s required)",
+ glsl_es_version_string);
+ }
+ _mesa_glsl_error(locp, this, "%s in %s%s.",
+ problem, this->get_version_string(),
+ requirement_string);
+
+ return false;
+}
+
+/**
+ * Process a GLSL #version directive.
+ *
+ * \param version is the integer that follows the #version token.
+ *
+ * \param ident is a string identifier that follows the integer, if any is
+ * present. Otherwise NULL.
+ */
+void
+_mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
+ const char *ident)
+{
+ bool es_token_present = false;
+ if (ident) {
+ if (strcmp(ident, "es") == 0) {
+ es_token_present = true;
+ } else if (version >= 150) {
+ if (strcmp(ident, "core") == 0) {
+ /* Accept the token. There's no need to record that this is
+ * a core profile shader since that's the only profile we support.
+ */
+ } else if (strcmp(ident, "compatibility") == 0) {
+ _mesa_glsl_error(locp, this,
+ "The compatibility profile is not supported.\n");
+ } else {
+ _mesa_glsl_error(locp, this,
+ "\"%s\" is not a valid shading language profile; "
+ "if present, it must be \"core\".\n", ident);
+ }
+ } else {
+ _mesa_glsl_error(locp, this,
+ "Illegal text following version number\n");
+ }
+ }
+
+ this->es_shader = es_token_present;
+ if (version == 100) {
+ if (es_token_present) {
+ _mesa_glsl_error(locp, this,
+ "GLSL 1.00 ES should be selected using "
+ "`#version 100'\n");
+ } else {
+ this->es_shader = true;
+ }
+ }
+
+ this->language_version = version;
+
+ bool supported = false;
+ for (unsigned i = 0; i < this->num_supported_versions; i++) {
+ if (this->supported_versions[i].ver == (unsigned) version
+ && this->supported_versions[i].es == this->es_shader) {
+ supported = true;
+ break;
+ }
+ }
+
+ if (!supported) {
+ _mesa_glsl_error(locp, this, "%s is not supported. "
+ "Supported versions are: %s\n",
+ this->get_version_string(),
+ this->supported_version_string);
+
+ /* On exit, the language_version must be set to a valid value.
+ * Later calls to _mesa_glsl_initialize_types will misbehave if
+ * the version is invalid.
+ */
+ switch (this->ctx->API) {
+ case API_OPENGL_COMPAT:
+ case API_OPENGL_CORE:
+ this->language_version = this->ctx->Const.GLSLVersion;
+ break;
+
+ case API_OPENGLES:
+ assert(!"Should not get here.");
+ /* FALLTHROUGH */
+
+ case API_OPENGLES2:
+ this->language_version = 100;
+ break;
+ }
+ }
+
+ if (this->language_version >= 140) {
+ this->ARB_uniform_buffer_object_enable = true;
+ }
+
+ if (this->language_version == 300 && this->es_shader) {
+ this->ARB_explicit_attrib_location_enable = true;
+ }
+}
+
+extern "C" {
+
+/**
+ * The most common use of _mesa_glsl_shader_target_name(), which is
+ * shared with C code in Mesa core to translate a GLenum to a short
+ * shader stage name in debug printouts.
+ *
+ * It recognizes the PROGRAM variants of the names so it can be used
+ * with a struct gl_program->Target, not just a struct
+ * gl_shader->Type.
+ */
+const char *
+_mesa_glsl_shader_target_name(GLenum type)
+{
+ switch (type) {
+ case GL_VERTEX_SHADER:
+ case GL_VERTEX_PROGRAM_ARB:
+ return "vertex";
+ case GL_FRAGMENT_SHADER:
+ case GL_FRAGMENT_PROGRAM_ARB:
+ return "fragment";
+ case GL_GEOMETRY_SHADER:
+ return "geometry";
+ default:
+ assert(!"Should not get here.");
+ return "unknown";
+ }
}
+} /* extern "C" */
+
+/**
+ * Overloaded C++ variant usable within the compiler for translating
+ * our internal enum into short stage names.
+ */
const char *
_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target)
{
@@ -126,6 +353,37 @@ _mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target)
return "unknown";
}
+/* This helper function will append the given message to the shader's
+ info log and report it via GL_ARB_debug_output. Per that extension,
+ 'type' is one of the enum values classifying the message, and
+ 'id' is the implementation-defined ID of the given message. */
+static void
+_mesa_glsl_msg(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
+ GLenum type, const char *fmt, va_list ap)
+{
+ bool error = (type == MESA_DEBUG_TYPE_ERROR);
+ GLuint msg_id = 0;
+
+ assert(state->info_log != NULL);
+
+ /* Get the offset that the new message will be written to. */
+ int msg_offset = strlen(state->info_log);
+
+ ralloc_asprintf_append(&state->info_log, "%u:%u(%u): %s: ",
+ locp->source,
+ locp->first_line,
+ locp->first_column,
+ error ? "error" : "warning");
+ ralloc_vasprintf_append(&state->info_log, fmt, ap);
+
+ const char *const msg = &state->info_log[msg_offset];
+ struct gl_context *ctx = state->ctx;
+
+ /* Report the error via GL_ARB_debug_output. */
+ _mesa_shader_debug(ctx, type, &msg_id, msg, strlen(msg));
+
+ ralloc_strcat(&state->info_log, "\n");
+}
void
_mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
@@ -135,15 +393,9 @@ _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
state->error = true;
- assert(state->info_log != NULL);
- ralloc_asprintf_append(&state->info_log, "%u:%u(%u): error: ",
- locp->source,
- locp->first_line,
- locp->first_column);
va_start(ap, fmt);
- ralloc_vasprintf_append(&state->info_log, fmt, ap);
+ _mesa_glsl_msg(locp, state, MESA_DEBUG_TYPE_ERROR, fmt, ap);
va_end(ap);
- ralloc_strcat(&state->info_log, "\n");
}
@@ -153,15 +405,9 @@ _mesa_glsl_warning(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
{
va_list ap;
- assert(state->info_log != NULL);
- ralloc_asprintf_append(&state->info_log, "%u:%u(%u): warning: ",
- locp->source,
- locp->first_line,
- locp->first_column);
va_start(ap, fmt);
- ralloc_vasprintf_append(&state->info_log, fmt, ap);
+ _mesa_glsl_msg(locp, state, MESA_DEBUG_TYPE_OTHER, fmt, ap);
va_end(ap);
- ralloc_strcat(&state->info_log, "\n");
}
@@ -253,6 +499,7 @@ struct _mesa_glsl_extension {
static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
/* target availability API availability */
/* name VS GS FS GL ES supported flag */
+ EXT(ARB_conservative_depth, false, false, true, true, false, ARB_conservative_depth),
EXT(ARB_draw_buffers, false, false, true, true, false, dummy_true),
EXT(ARB_draw_instanced, true, false, false, true, false, ARB_draw_instanced),
EXT(ARB_explicit_attrib_location, true, false, true, true, false, ARB_explicit_attrib_location),
@@ -261,9 +508,20 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(EXT_texture_array, true, false, true, true, false, EXT_texture_array),
EXT(ARB_shader_texture_lod, true, false, true, true, false, ARB_shader_texture_lod),
EXT(ARB_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export),
- EXT(AMD_conservative_depth, true, false, true, true, false, AMD_conservative_depth),
+ EXT(AMD_conservative_depth, false, false, true, true, false, ARB_conservative_depth),
EXT(AMD_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export),
EXT(OES_texture_3D, true, false, true, false, true, EXT_texture3D),
+ EXT(OES_EGL_image_external, true, false, true, false, true, OES_EGL_image_external),
+ EXT(ARB_shader_bit_encoding, true, true, true, true, false, ARB_shader_bit_encoding),
+ EXT(ARB_uniform_buffer_object, true, false, true, true, false, ARB_uniform_buffer_object),
+ EXT(OES_standard_derivatives, false, false, true, false, true, OES_standard_derivatives),
+ EXT(ARB_texture_cube_map_array, true, false, true, true, false, ARB_texture_cube_map_array),
+ EXT(ARB_shading_language_packing, true, false, true, true, false, ARB_shading_language_packing),
+ EXT(ARB_shading_language_420pack, true, true, true, true, false, ARB_shading_language_420pack),
+ EXT(ARB_texture_multisample, true, false, true, true, false, ARB_texture_multisample),
+ EXT(ARB_texture_query_lod, false, false, true, true, false, ARB_texture_query_lod),
+ EXT(ARB_gpu_shader5, true, true, true, true, false, ARB_gpu_shader5),
+ EXT(AMD_vertex_shader_layer, true, false, false, true, false, AMD_vertex_shader_layer),
};
#undef EXT
@@ -407,6 +665,194 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
return true;
}
+
+/**
+ * Returns the name of the type of a column of a matrix. E.g.,
+ *
+ * "mat3" -> "vec3"
+ * "mat4x2" -> "vec2"
+ */
+static const char *
+_mesa_ast_get_matrix_column_type_name(const char *matrix_type_name)
+{
+ static const char *vec_name[] = { "vec2", "vec3", "vec4" };
+
+ /* The number of elements in a row of a matrix is specified by the last
+ * character of the matrix type name.
+ */
+ long rows = strtol(matrix_type_name + strlen(matrix_type_name) - 1,
+ NULL, 10);
+ return vec_name[rows - 2];
+}
+
+/**
+ * Recurses through <type> and <expr> if <expr> is an aggregate initializer
+ * and sets <expr>'s <constructor_type> field to <type>. Gives later functions
+ * (process_array_constructor, et al) sufficient information to do type
+ * checking.
+ *
+ * Operates on assignments involving an aggregate initializer. E.g.,
+ *
+ * vec4 pos = {1.0, -1.0, 0.0, 1.0};
+ *
+ * or more ridiculously,
+ *
+ * struct S {
+ * vec4 v[2];
+ * };
+ *
+ * struct {
+ * S a[2], b;
+ * int c;
+ * } aggregate = {
+ * {
+ * {
+ * {
+ * {1.0, 2.0, 3.0, 4.0}, // a[0].v[0]
+ * {5.0, 6.0, 7.0, 8.0} // a[0].v[1]
+ * } // a[0].v
+ * }, // a[0]
+ * {
+ * {
+ * {1.0, 2.0, 3.0, 4.0}, // a[1].v[0]
+ * {5.0, 6.0, 7.0, 8.0} // a[1].v[1]
+ * } // a[1].v
+ * } // a[1]
+ * }, // a
+ * {
+ * {
+ * {1.0, 2.0, 3.0, 4.0}, // b.v[0]
+ * {5.0, 6.0, 7.0, 8.0} // b.v[1]
+ * } // b.v
+ * }, // b
+ * 4 // c
+ * };
+ *
+ * This pass is necessary because the right-hand side of <type> e = { ... }
+ * doesn't contain sufficient information to determine if the types match.
+ */
+void
+_mesa_ast_set_aggregate_type(const ast_type_specifier *type,
+ ast_expression *expr,
+ _mesa_glsl_parse_state *state)
+{
+ void *ctx = state;
+ ast_aggregate_initializer *ai = (ast_aggregate_initializer *)expr;
+ ai->constructor_type = (ast_type_specifier *)type;
+
+ bool is_declaration = ai->constructor_type->structure != NULL;
+ if (!is_declaration) {
+ /* Look up <type> name in the symbol table to see if it's a struct. */
+ const ast_type_specifier *struct_type =
+ state->symbols->get_type_ast(type->type_name);
+ ai->constructor_type->structure =
+ struct_type ? new(ctx) ast_struct_specifier(*struct_type->structure)
+ : NULL;
+ }
+
+ /* If the aggregate is an array, recursively set its elements' types. */
+ if (type->is_array) {
+ /* We want to set the element type which is not an array itself, so make
+ * a copy of the array type and set its is_array field to false.
+ *
+ * E.g., if <type> if struct S[2] we want to set each element's type to
+ * struct S.
+ *
+ * FINISHME: Update when ARB_array_of_arrays is supported.
+ */
+ const ast_type_specifier *non_array_type =
+ new(ctx) ast_type_specifier(type, false, NULL);
+
+ for (exec_node *expr_node = ai->expressions.head;
+ !expr_node->is_tail_sentinel();
+ expr_node = expr_node->next) {
+ ast_expression *expr = exec_node_data(ast_expression, expr_node,
+ link);
+
+ if (expr->oper == ast_aggregate)
+ _mesa_ast_set_aggregate_type(non_array_type, expr, state);
+ }
+
+ /* If the aggregate is a struct, recursively set its fields' types. */
+ } else if (ai->constructor_type->structure) {
+ ai->constructor_type->structure->is_declaration = is_declaration;
+ exec_node *expr_node = ai->expressions.head;
+
+ /* Iterate through the struct's fields' declarations. E.g., iterate from
+ * "float a, b" to "int c" in the struct below.
+ *
+ * struct {
+ * float a, b;
+ * int c;
+ * } s;
+ */
+ for (exec_node *decl_list_node =
+ ai->constructor_type->structure->declarations.head;
+ !decl_list_node->is_tail_sentinel();
+ decl_list_node = decl_list_node->next) {
+ ast_declarator_list *decl_list = exec_node_data(ast_declarator_list,
+ decl_list_node, link);
+
+ for (exec_node *decl_node = decl_list->declarations.head;
+ !decl_node->is_tail_sentinel() && !expr_node->is_tail_sentinel();
+ decl_node = decl_node->next, expr_node = expr_node->next) {
+ ast_declaration *decl = exec_node_data(ast_declaration, decl_node,
+ link);
+ ast_expression *expr = exec_node_data(ast_expression, expr_node,
+ link);
+
+ bool is_array = decl_list->type->specifier->is_array;
+ ast_expression *array_size = decl_list->type->specifier->array_size;
+
+ /* Recognize variable declarations with the bracketed size attached
+ * to the type rather than the variable name as arrays. E.g.,
+ *
+ * float a[2];
+ * float[2] b;
+ *
+ * are both arrays, but <a>'s array_size is decl->array_size, while
+ * <b>'s array_size is decl_list->type->specifier->array_size.
+ */
+ if (!is_array) {
+ /* FINISHME: Update when ARB_array_of_arrays is supported. */
+ is_array = decl->is_array;
+ array_size = decl->array_size;
+ }
+
+ /* Declaration shadows the <type> parameter. */
+ ast_type_specifier *type =
+ new(ctx) ast_type_specifier(decl_list->type->specifier,
+ is_array, array_size);
+
+ if (expr->oper == ast_aggregate)
+ _mesa_ast_set_aggregate_type(type, expr, state);
+ }
+ }
+ } else {
+ /* If the aggregate is a matrix, set its columns' types. */
+ const char *name;
+ const glsl_type *const constructor_type =
+ ai->constructor_type->glsl_type(&name, state);
+
+ if (constructor_type->is_matrix()) {
+ for (exec_node *expr_node = ai->expressions.head;
+ !expr_node->is_tail_sentinel();
+ expr_node = expr_node->next) {
+ ast_expression *expr = exec_node_data(ast_expression, expr_node,
+ link);
+
+ /* Declaration shadows the <type> parameter. */
+ ast_type_specifier *type = new(ctx)
+ ast_type_specifier(_mesa_ast_get_matrix_column_type_name(name));
+
+ if (expr->oper == ast_aggregate)
+ _mesa_ast_set_aggregate_type(type, expr, state);
+ }
+ }
+ }
+}
+
+
void
_mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q)
{
@@ -606,6 +1052,19 @@ ast_expression::print(void) const
break;
}
+ case ast_aggregate: {
+ 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;
@@ -621,6 +1080,7 @@ ast_expression::ast_expression(int oper,
this->subexpressions[0] = ex0;
this->subexpressions[1] = ex1;
this->subexpressions[2] = ex2;
+ this->non_lvalue_description = NULL;
}
@@ -702,7 +1162,7 @@ ast_declaration::print(void) const
}
-ast_declaration::ast_declaration(char *identifier, int is_array,
+ast_declaration::ast_declaration(const char *identifier, bool is_array,
ast_expression *array_size,
ast_expression *initializer)
{
@@ -766,6 +1226,7 @@ ast_jump_statement::print(void) const
ast_jump_statement::ast_jump_statement(int mode, ast_expression *return_value)
+ : opt_return_value(NULL)
{
this->mode = ast_jump_modes(mode);
@@ -802,6 +1263,106 @@ ast_selection_statement::ast_selection_statement(ast_expression *condition,
void
+ast_switch_statement::print(void) const
+{
+ printf("switch ( ");
+ test_expression->print();
+ printf(") ");
+
+ body->print();
+}
+
+
+ast_switch_statement::ast_switch_statement(ast_expression *test_expression,
+ ast_node *body)
+{
+ this->test_expression = test_expression;
+ this->body = body;
+}
+
+
+void
+ast_switch_body::print(void) const
+{
+ printf("{\n");
+ if (stmts != NULL) {
+ stmts->print();
+ }
+ printf("}\n");
+}
+
+
+ast_switch_body::ast_switch_body(ast_case_statement_list *stmts)
+{
+ this->stmts = stmts;
+}
+
+
+void ast_case_label::print(void) const
+{
+ if (test_value != NULL) {
+ printf("case ");
+ test_value->print();
+ printf(": ");
+ } else {
+ printf("default: ");
+ }
+}
+
+
+ast_case_label::ast_case_label(ast_expression *test_value)
+{
+ this->test_value = test_value;
+}
+
+
+void ast_case_label_list::print(void) const
+{
+ foreach_list_const(n, & this->labels) {
+ ast_node *ast = exec_node_data(ast_node, n, link);
+ ast->print();
+ }
+ printf("\n");
+}
+
+
+ast_case_label_list::ast_case_label_list(void)
+{
+}
+
+
+void ast_case_statement::print(void) const
+{
+ labels->print();
+ foreach_list_const(n, & this->stmts) {
+ ast_node *ast = exec_node_data(ast_node, n, link);
+ ast->print();
+ printf("\n");
+ }
+}
+
+
+ast_case_statement::ast_case_statement(ast_case_label_list *labels)
+{
+ this->labels = labels;
+}
+
+
+void ast_case_statement_list::print(void) const
+{
+ foreach_list_const(n, & this->cases) {
+ ast_node *ast = exec_node_data(ast_node, n, link);
+ ast->print();
+ }
+}
+
+
+ast_case_statement_list::ast_case_statement_list(void)
+{
+}
+
+
+void
ast_iteration_statement::print(void) const
{
switch (mode) {
@@ -868,8 +1429,8 @@ ast_struct_specifier::print(void) const
}
-ast_struct_specifier::ast_struct_specifier(char *identifier,
- ast_node *declarator_list)
+ast_struct_specifier::ast_struct_specifier(const char *identifier,
+ ast_declarator_list *declarator_list)
{
if (identifier == NULL) {
static unsigned anon_count = 1;
@@ -878,10 +1439,114 @@ ast_struct_specifier::ast_struct_specifier(char *identifier,
}
name = identifier;
this->declarations.push_degenerate_list_at_head(&declarator_list->link);
+ is_declaration = true;
}
+extern "C" {
+
+void
+_mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
+ bool dump_ast, bool dump_hir)
+{
+ struct _mesa_glsl_parse_state *state =
+ new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader);
+ const char *source = shader->Source;
+
+ state->error = glcpp_preprocess(state, &source, &state->info_log,
+ &ctx->Extensions, ctx);
+
+ 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");
+ }
+
+ ralloc_free(shader->ir);
+ shader->ir = new(shader) exec_list;
+ if (!state->error && !state->translation_unit.is_empty())
+ _mesa_ast_to_hir(shader->ir, state);
+
+ if (!state->error) {
+ validate_ir_tree(shader->ir);
+
+ /* Print out the unoptimized IR. */
+ if (dump_hir) {
+ _mesa_print_ir(shader->ir, state);
+ }
+ }
+
+
+ if (!state->error && !shader->ir->is_empty()) {
+ struct gl_shader_compiler_options *options =
+ &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
+
+ /* Do some optimization at compile time to reduce shader IR size
+ * and reduce later work if the same shader is linked multiple times
+ */
+ while (do_common_optimization(shader->ir, false, false, 32, options))
+ ;
+
+ validate_ir_tree(shader->ir);
+ }
+
+ if (shader->InfoLog)
+ ralloc_free(shader->InfoLog);
+
+ shader->symbols = state->symbols;
+ shader->CompileStatus = !state->error;
+ shader->InfoLog = state->info_log;
+ shader->Version = state->language_version;
+ shader->InfoLog = state->info_log;
+ shader->IsES = state->es_shader;
+
+ 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->UniformBlocks)
+ ralloc_free(shader->UniformBlocks);
+ shader->NumUniformBlocks = state->num_uniform_blocks;
+ shader->UniformBlocks = state->uniform_blocks;
+ ralloc_steal(shader, shader->UniformBlocks);
+
+ /* Retain any live IR, but trash the rest. */
+ reparent_ir(shader->ir, shader->ir);
+
+ ralloc_free(state);
+}
+
+} /* extern "C" */
+/**
+ * Do the set of common optimizations passes
+ *
+ * \param ir List of instructions to be optimized
+ * \param linked Is the shader linked? This enables
+ * optimizations passes that remove code at
+ * global scope and could cause linking to
+ * fail.
+ * \param uniform_locations_assigned Have locations already been assigned for
+ * uniforms? This prevents the declarations
+ * of unused uniforms from being removed.
+ * The setting of this flag only matters if
+ * \c linked is \c true.
+ * \param max_unroll_iterations Maximum number of loop iterations to be
+ * unrolled. Setting to 0 disables loop
+ * unrolling.
+ * \param options The driver's preferred shader options.
+ */
bool
-do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations)
+do_common_optimization(exec_list *ir, bool linked,
+ bool uniform_locations_assigned,
+ unsigned max_unroll_iterations,
+ const struct gl_shader_compiler_options *options)
{
GLboolean progress = GL_FALSE;
@@ -890,14 +1555,18 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration
if (linked) {
progress = do_function_inlining(ir) || progress;
progress = do_dead_functions(ir) || progress;
+ progress = do_structure_splitting(ir) || progress;
}
- progress = do_structure_splitting(ir) || progress;
progress = do_if_simplification(ir) || progress;
- progress = do_discard_simplification(ir) || progress;
+ progress = opt_flatten_nested_if_blocks(ir) || progress;
progress = do_copy_propagation(ir) || progress;
progress = do_copy_propagation_elements(ir) || progress;
+
+ if (options->PreferDP4 && !linked)
+ progress = opt_flip_matrices(ir) || progress;
+
if (linked)
- progress = do_dead_code(ir) || progress;
+ progress = do_dead_code(ir, uniform_locations_assigned) || progress;
else
progress = do_dead_code_unlinked(ir) || progress;
progress = do_dead_code_local(ir) || progress;
@@ -911,9 +1580,11 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration
progress = do_algebraic(ir) || progress;
progress = do_lower_jumps(ir) || progress;
progress = do_vec_index_to_swizzle(ir) || progress;
+ progress = lower_vector_insert(ir, false) || progress;
progress = do_swizzle_swizzle(ir) || progress;
progress = do_noop_swizzle(ir) || progress;
+ progress = optimize_split_arrays(ir, linked) || progress;
progress = optimize_redundant_jumps(ir) || progress;
loop_state *ls = analyze_loop_variables(ir);
diff --git a/dist/Mesa/src/glsl/glsl_parser_extras.h b/dist/Mesa/src/glsl/glsl_parser_extras.h
index fc392da5b..dec13ac7e 100644
--- a/dist/Mesa/src/glsl/glsl_parser_extras.h
+++ b/dist/Mesa/src/glsl/glsl_parser_extras.h
@@ -42,8 +42,35 @@ enum _mesa_glsl_parser_targets {
struct gl_context;
+struct glsl_switch_state {
+ /** Temporary variables needed for switch statement. */
+ ir_variable *test_var;
+ ir_variable *is_fallthru_var;
+ ir_variable *is_break_var;
+ class ast_switch_statement *switch_nesting_ast;
+
+ /** Table of constant values already used in case labels */
+ struct hash_table *labels_ht;
+ class ast_case_label *previous_default;
+
+ bool is_switch_innermost; // if switch stmt is closest to break, ...
+};
+
+const char *
+glsl_compute_version_string(void *mem_ctx, bool is_es, unsigned version);
+
+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
+
struct _mesa_glsl_parse_state {
- _mesa_glsl_parse_state(struct gl_context *ctx, GLenum target,
+ _mesa_glsl_parse_state(struct gl_context *_ctx, GLenum target,
void *mem_ctx);
/* Callers of this ralloc-based new need not call delete. It's
@@ -63,16 +90,89 @@ struct _mesa_glsl_parse_state {
ralloc_free(mem);
}
+ /**
+ * Generate a string representing the GLSL version currently being compiled
+ * (useful for error messages).
+ */
+ const char *get_version_string()
+ {
+ return glsl_compute_version_string(this, this->es_shader,
+ this->language_version);
+ }
+
+ /**
+ * Determine whether the current GLSL version is sufficiently high to
+ * support a certain feature.
+ *
+ * \param required_glsl_version is the desktop GLSL version that is
+ * required to support the feature, or 0 if no version of desktop GLSL
+ * supports the feature.
+ *
+ * \param required_glsl_es_version is the GLSL ES version that is required
+ * to support the feature, or 0 if no version of GLSL ES suports the
+ * feature.
+ */
+ bool is_version(unsigned required_glsl_version,
+ unsigned required_glsl_es_version)
+ {
+ unsigned required_version = this->es_shader ?
+ required_glsl_es_version : required_glsl_version;
+ return required_version != 0
+ && this->language_version >= required_version;
+ }
+
+ bool check_version(unsigned required_glsl_version,
+ unsigned required_glsl_es_version,
+ YYLTYPE *locp, const char *fmt, ...) PRINTFLIKE(5, 6);
+
+ bool check_precision_qualifiers_allowed(YYLTYPE *locp)
+ {
+ return check_version(130, 100, locp,
+ "precision qualifiers are forbidden");
+ }
+
+ bool check_bitwise_operations_allowed(YYLTYPE *locp)
+ {
+ return check_version(130, 300, locp, "bit-wise operations are forbidden");
+ }
+
+ void process_version_directive(YYLTYPE *locp, int version,
+ const char *ident);
+
+ struct gl_context *const ctx;
void *scanner;
exec_list translation_unit;
glsl_symbol_table *symbols;
+ unsigned num_uniform_blocks;
+ unsigned uniform_block_array_size;
+ struct gl_uniform_block *uniform_blocks;
+
+ unsigned num_supported_versions;
+ struct {
+ unsigned ver;
+ bool es;
+ } supported_versions[12];
+
bool es_shader;
unsigned language_version;
- const char *version_string;
enum _mesa_glsl_parser_targets target;
/**
+ * Number of nested struct_specifier levels
+ *
+ * Outside a struct_specifer, this is zero.
+ */
+ unsigned struct_specifier_depth;
+
+ /**
+ * Default uniform layout qualifiers tracked during parsing.
+ * Currently affects uniform blocks and uniform buffer variables in
+ * those blocks.
+ */
+ struct ast_type_qualifier *default_uniform_qualifier;
+
+ /**
* Printable list of GLSL versions supported by the current context
*
* \note
@@ -104,21 +204,9 @@ struct _mesa_glsl_parse_state {
/* ARB_draw_buffers */
unsigned MaxDrawBuffers;
- /**
- * Set of GLSL versions supported by the current context
- *
- * Knowing that version X is supported doesn't mean that versions before
- * X are also supported. Version 1.00 is only supported in an ES2
- * context or when GL_ARB_ES2_compatibility is supported. In an OpenGL
- * 3.0 "forward compatible" context, GLSL 1.10 and 1.20 are \b not
- * supported.
- */
- /*@{*/
- unsigned GLSL_100ES:1;
- unsigned GLSL_110:1;
- unsigned GLSL_120:1;
- unsigned GLSL_130:1;
- /*@}*/
+ /* 3.00 ES */
+ int MinProgramTexelOffset;
+ int MaxProgramTexelOffset;
} Const;
/**
@@ -149,8 +237,9 @@ struct _mesa_glsl_parse_state {
bool all_invariant;
/** Loop or switch statement containing the current instructions. */
- class ir_instruction *loop_or_switch_nesting;
- class ast_iteration_statement *loop_or_switch_nesting_ast;
+ class ast_iteration_statement *loop_nesting_ast;
+
+ struct glsl_switch_state switch_state;
/** List of structures defined in user code. */
const glsl_type **user_structures;
@@ -180,10 +269,34 @@ struct _mesa_glsl_parse_state {
bool ARB_shader_stencil_export_warn;
bool AMD_conservative_depth_enable;
bool AMD_conservative_depth_warn;
+ bool ARB_conservative_depth_enable;
+ bool ARB_conservative_depth_warn;
bool AMD_shader_stencil_export_enable;
bool AMD_shader_stencil_export_warn;
bool OES_texture_3D_enable;
bool OES_texture_3D_warn;
+ bool OES_EGL_image_external_enable;
+ bool OES_EGL_image_external_warn;
+ bool ARB_shader_bit_encoding_enable;
+ bool ARB_shader_bit_encoding_warn;
+ bool ARB_uniform_buffer_object_enable;
+ bool ARB_uniform_buffer_object_warn;
+ bool OES_standard_derivatives_enable;
+ bool OES_standard_derivatives_warn;
+ bool ARB_texture_cube_map_array_enable;
+ bool ARB_texture_cube_map_array_warn;
+ bool ARB_shading_language_packing_enable;
+ bool ARB_shading_language_packing_warn;
+ bool ARB_texture_multisample_enable;
+ bool ARB_texture_multisample_warn;
+ bool ARB_texture_query_lod_enable;
+ bool ARB_texture_query_lod_warn;
+ bool ARB_gpu_shader5_enable;
+ bool ARB_gpu_shader5_warn;
+ bool AMD_vertex_shader_layer_enable;
+ bool AMD_vertex_shader_layer_warn;
+ bool ARB_shading_language_420pack_enable;
+ bool ARB_shading_language_420pack_warn;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
@@ -194,16 +307,6 @@ struct _mesa_glsl_parse_state {
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) \
@@ -241,8 +344,8 @@ extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
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_lexer_lex(union YYSTYPE *yylval, YYLTYPE *yylloc,
+ void *scanner);
extern int _mesa_glsl_parse(struct _mesa_glsl_parse_state *);
@@ -275,8 +378,11 @@ _mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target);
extern "C" {
#endif
-extern int preprocess(void *ctx, const char **shader, char **info_log,
- const struct gl_extensions *extensions, int api);
+extern const char *
+_mesa_glsl_shader_target_name(GLenum type);
+
+extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log,
+ const struct gl_extensions *extensions, struct gl_context *gl_ctx);
extern void _mesa_destroy_shader_compiler(void);
extern void _mesa_destroy_shader_compiler_caches(void);
diff --git a/dist/Mesa/src/glsl/glsl_symbol_table.cpp b/dist/Mesa/src/glsl/glsl_symbol_table.cpp
index bcb65d301..4c96620bf 100644
--- a/dist/Mesa/src/glsl/glsl_symbol_table.cpp
+++ b/dist/Mesa/src/glsl/glsl_symbol_table.cpp
@@ -41,18 +41,75 @@ public:
ralloc_free(entry);
}
- 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) {}
+ bool add_interface(const glsl_type *i, enum ir_variable_mode mode)
+ {
+ const glsl_type **dest;
+
+ switch (mode) {
+ case ir_var_uniform:
+ dest = &ibu;
+ break;
+ case ir_var_shader_in:
+ dest = &ibi;
+ break;
+ case ir_var_shader_out:
+ dest = &ibo;
+ break;
+ default:
+ assert(!"Unsupported interface variable mode!");
+ return false;
+ }
+
+ if (*dest != NULL) {
+ return false;
+ } else {
+ *dest = i;
+ return true;
+ }
+ }
+
+ const glsl_type *get_interface(enum ir_variable_mode mode)
+ {
+ switch (mode) {
+ case ir_var_uniform:
+ return ibu;
+ case ir_var_shader_in:
+ return ibi;
+ case ir_var_shader_out:
+ return ibo;
+ default:
+ assert(!"Unsupported interface variable mode!");
+ return NULL;
+ }
+ }
+
+ symbol_table_entry(ir_variable *v) :
+ v(v), f(0), t(0), ibu(0), ibi(0), ibo(0), a(0) {}
+ symbol_table_entry(ir_function *f) :
+ v(0), f(f), t(0), ibu(0), ibi(0), ibo(0), a(0) {}
+ symbol_table_entry(const glsl_type *t) :
+ v(0), f(0), t(t), ibu(0), ibi(0), ibo(0), a(0) {}
+ symbol_table_entry(const glsl_type *t, enum ir_variable_mode mode) :
+ v(0), f(0), t(0), ibu(0), ibi(0), ibo(0), a(0)
+ {
+ assert(t->is_interface());
+ add_interface(t, mode);
+ }
+ symbol_table_entry(const class ast_type_specifier *a):
+ v(0), f(0), t(0), ibu(0), ibi(0), ibo(0), a(a) {}
ir_variable *v;
ir_function *f;
const glsl_type *t;
+ const glsl_type *ibu;
+ const glsl_type *ibi;
+ const glsl_type *ibo;
+ const class ast_type_specifier *a;
};
glsl_symbol_table::glsl_symbol_table()
{
- this->language_version = 120;
+ this->separate_function_namespace = false;
this->table = _mesa_symbol_table_ctor();
this->mem_ctx = ralloc_context(NULL);
}
@@ -80,7 +137,7 @@ bool glsl_symbol_table::name_declared_this_scope(const char *name)
bool glsl_symbol_table::add_variable(ir_variable *v)
{
- if (this->language_version == 110) {
+ if (this->separate_function_namespace) {
/* In 1.10, functions and variables have separate namespaces. */
symbol_table_entry *existing = get_entry(v->name);
if (name_declared_this_scope(v->name)) {
@@ -118,9 +175,43 @@ bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
}
+static char *make_ast_name(const char *name)
+{
+ char *ast_name = new char[strlen("#ast.") + strlen(name) + 1];
+ strcpy(ast_name, "#ast.");
+ strcat(ast_name + strlen("#ast."), name);
+ return ast_name;
+}
+
+bool glsl_symbol_table::add_type_ast(const char *name, const class ast_type_specifier *a)
+{
+ symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(a);
+ char *ast_name = make_ast_name(name);
+ bool ret = _mesa_symbol_table_add_symbol(table, -1, ast_name, entry) == 0;
+ delete [] ast_name;
+ return ret;
+}
+
+bool glsl_symbol_table::add_interface(const char *name, const glsl_type *i,
+ enum ir_variable_mode mode)
+{
+ assert(i->is_interface());
+ symbol_table_entry *entry = get_entry(name);
+ if (entry == NULL) {
+ symbol_table_entry *entry =
+ new(mem_ctx) symbol_table_entry(i, mode);
+ bool add_interface_symbol_result =
+ _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
+ assert(add_interface_symbol_result);
+ return add_interface_symbol_result;
+ } else {
+ return entry->add_interface(i, mode);
+ }
+}
+
bool glsl_symbol_table::add_function(ir_function *f)
{
- if (this->language_version == 110 && name_declared_this_scope(f->name)) {
+ if (this->separate_function_namespace && 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)) {
@@ -152,6 +243,21 @@ const glsl_type *glsl_symbol_table::get_type(const char *name)
return entry != NULL ? entry->t : NULL;
}
+const class ast_type_specifier *glsl_symbol_table::get_type_ast(const char *name)
+{
+ char *ast_name = make_ast_name(name);
+ symbol_table_entry *entry = get_entry(ast_name);
+ delete [] ast_name;
+ return entry != NULL ? entry->a : NULL;
+}
+
+const glsl_type *glsl_symbol_table::get_interface(const char *name,
+ enum ir_variable_mode mode)
+{
+ symbol_table_entry *entry = get_entry(name);
+ return entry != NULL ? entry->get_interface(mode) : NULL;
+}
+
ir_function *glsl_symbol_table::get_function(const char *name)
{
symbol_table_entry *entry = get_entry(name);
diff --git a/dist/Mesa/src/glsl/glsl_types.cpp b/dist/Mesa/src/glsl/glsl_types.cpp
index c94aec0d2..8324b8ade 100644
--- a/dist/Mesa/src/glsl/glsl_types.cpp
+++ b/dist/Mesa/src/glsl/glsl_types.cpp
@@ -27,13 +27,13 @@
#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;
+hash_table *glsl_type::interface_types = NULL;
void *glsl_type::mem_ctx = NULL;
void
@@ -51,11 +51,12 @@ glsl_type::glsl_type(GLenum gl_type,
gl_type(gl_type),
base_type(base_type),
sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
- sampler_type(0),
+ sampler_type(0), interface_packing(0),
vector_elements(vector_elements), matrix_columns(matrix_columns),
length(0)
{
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
/* Neither dimension is zero or both dimensions are zero.
*/
@@ -69,26 +70,29 @@ glsl_type::glsl_type(GLenum gl_type,
gl_type(gl_type),
base_type(GLSL_TYPE_SAMPLER),
sampler_dimensionality(dim), sampler_shadow(shadow),
- sampler_array(array), sampler_type(type),
+ sampler_array(array), sampler_type(type), interface_packing(0),
vector_elements(0), matrix_columns(0),
length(0)
{
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_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) :
+ gl_type(0),
base_type(GLSL_TYPE_STRUCT),
sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
- sampler_type(0),
+ sampler_type(0), interface_packing(0),
vector_elements(0), matrix_columns(0),
length(num_fields)
{
unsigned int i;
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
this->fields.structure = ralloc_array(this->mem_ctx,
glsl_struct_field, length);
@@ -96,21 +100,35 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
this->fields.structure[i].type = fields[i].type;
this->fields.structure[i].name = ralloc_strdup(this->fields.structure,
fields[i].name);
+ this->fields.structure[i].row_major = fields[i].row_major;
}
}
-static void
-add_types_to_symbol_table(glsl_symbol_table *symtab,
- const struct glsl_type *types,
- unsigned num_types, bool warn)
+glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
+ enum glsl_interface_packing packing, const char *name) :
+ gl_type(0),
+ base_type(GLSL_TYPE_INTERFACE),
+ sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
+ sampler_type(0), interface_packing((unsigned) packing),
+ vector_elements(0), matrix_columns(0),
+ length(num_fields)
{
- (void) warn;
+ unsigned int i;
- for (unsigned i = 0; i < num_types; i++) {
- symtab->add_type(types[i].name, & types[i]);
+ init_ralloc_type_ctx();
+ assert(name != NULL);
+ this->name = ralloc_strdup(this->mem_ctx, name);
+ this->fields.structure = ralloc_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 = ralloc_strdup(this->fields.structure,
+ fields[i].name);
+ this->fields.structure[i].row_major = fields[i].row_major;
}
}
+
bool
glsl_type::contains_sampler() const
{
@@ -127,123 +145,82 @@ glsl_type::contains_sampler() const
}
}
-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, &_sampler3D_type, 1, 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)
+bool
+glsl_type::contains_integer() const
{
- add_types_to_symbol_table(symtab, builtin_EXT_texture_array_types,
- Elements(builtin_EXT_texture_array_types),
- warn);
+ if (this->is_array()) {
+ return this->fields.array->contains_integer();
+ } else if (this->is_record()) {
+ for (unsigned int i = 0; i < this->length; i++) {
+ if (this->fields.structure[i].type->contains_integer())
+ return true;
+ }
+ return false;
+ } else {
+ return this->is_integer();
+ }
}
-void
-glsl_type::generate_OES_texture_3D_types(glsl_symbol_table *symtab, bool warn)
+gl_texture_index
+glsl_type::sampler_index() const
{
- add_types_to_symbol_table(symtab, &_sampler3D_type, 1, warn);
+ const glsl_type *const t = (this->is_array()) ? this->fields.array : this;
+
+ assert(t->is_sampler());
+
+ switch (t->sampler_dimensionality) {
+ case GLSL_SAMPLER_DIM_1D:
+ return (t->sampler_array) ? TEXTURE_1D_ARRAY_INDEX : TEXTURE_1D_INDEX;
+ case GLSL_SAMPLER_DIM_2D:
+ return (t->sampler_array) ? TEXTURE_2D_ARRAY_INDEX : TEXTURE_2D_INDEX;
+ case GLSL_SAMPLER_DIM_3D:
+ return TEXTURE_3D_INDEX;
+ case GLSL_SAMPLER_DIM_CUBE:
+ return (t->sampler_array) ? TEXTURE_CUBE_ARRAY_INDEX : TEXTURE_CUBE_INDEX;
+ case GLSL_SAMPLER_DIM_RECT:
+ return TEXTURE_RECT_INDEX;
+ case GLSL_SAMPLER_DIM_BUF:
+ return TEXTURE_BUFFER_INDEX;
+ case GLSL_SAMPLER_DIM_EXTERNAL:
+ return TEXTURE_EXTERNAL_INDEX;
+ case GLSL_SAMPLER_DIM_MS:
+ return (t->sampler_array) ? TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX : TEXTURE_2D_MULTISAMPLE_INDEX;
+ default:
+ assert(!"Should not get here.");
+ return TEXTURE_BUFFER_INDEX;
+ }
}
-void
-_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
+const glsl_type *glsl_type::get_base_type() const
{
- 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;
+ 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:
- /* error */
- break;
- }
-
- if (state->ARB_texture_rectangle_enable) {
- glsl_type::generate_ARB_texture_rectangle_types(state->symbols,
- state->ARB_texture_rectangle_warn);
- }
- if (state->OES_texture_3D_enable && state->language_version == 100) {
- glsl_type::generate_OES_texture_3D_types(state->symbols,
- state->OES_texture_3D_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);
+ return error_type;
}
}
-const glsl_type *glsl_type::get_base_type() const
+const glsl_type *glsl_type::get_scalar_type() const
{
- switch (base_type) {
+ const glsl_type *type = this;
+
+ /* Handle arrays */
+ while (type->base_type == GLSL_TYPE_ARRAY)
+ type = type->fields.array;
+
+ /* Handle vectors and matrices */
+ switch (type->base_type) {
case GLSL_TYPE_UINT:
return uint_type;
case GLSL_TYPE_INT:
@@ -253,7 +230,8 @@ const glsl_type *glsl_type::get_base_type() const
case GLSL_TYPE_BOOL:
return bool_type;
default:
- return error_type;
+ /* Handle everything else */
+ return type;
}
}
@@ -276,7 +254,7 @@ _mesa_glsl_release_types(void)
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),
+ sampler_type(0), interface_packing(0),
vector_elements(0), matrix_columns(0),
name(NULL), length(length)
{
@@ -304,6 +282,58 @@ glsl_type::glsl_type(const glsl_type *array, unsigned length) :
const glsl_type *
+glsl_type::vec(unsigned components)
+{
+ if (components == 0 || components > 4)
+ return error_type;
+
+ static const glsl_type *const ts[] = {
+ float_type, vec2_type, vec3_type, vec4_type
+ };
+ return ts[components - 1];
+}
+
+
+const glsl_type *
+glsl_type::ivec(unsigned components)
+{
+ if (components == 0 || components > 4)
+ return error_type;
+
+ static const glsl_type *const ts[] = {
+ int_type, ivec2_type, ivec3_type, ivec4_type
+ };
+ return ts[components - 1];
+}
+
+
+const glsl_type *
+glsl_type::uvec(unsigned components)
+{
+ if (components == 0 || components > 4)
+ return error_type;
+
+ static const glsl_type *const ts[] = {
+ uint_type, uvec2_type, uvec3_type, uvec4_type
+ };
+ return ts[components - 1];
+}
+
+
+const glsl_type *
+glsl_type::bvec(unsigned components)
+{
+ if (components == 0 || components > 4)
+ return error_type;
+
+ static const glsl_type *const ts[] = {
+ bool_type, bvec2_type, bvec3_type, bvec4_type
+ };
+ return ts[components - 1];
+}
+
+
+const glsl_type *
glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
{
if (base_type == GLSL_TYPE_VOID)
@@ -317,13 +347,13 @@ glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
if (columns == 1) {
switch (base_type) {
case GLSL_TYPE_UINT:
- return uint_type + (rows - 1);
+ return uvec(rows);
case GLSL_TYPE_INT:
- return int_type + (rows - 1);
+ return ivec(rows);
case GLSL_TYPE_FLOAT:
- return float_type + (rows - 1);
+ return vec(rows);
case GLSL_TYPE_BOOL:
- return bool_type + (rows - 1);
+ return bvec(rows);
default:
return error_type;
}
@@ -408,12 +438,18 @@ glsl_type::record_key_compare(const void *a, const void *b)
if (key1->length != key2->length)
return 1;
+ if (key1->interface_packing != key2->interface_packing)
+ 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;
+ if (key1->fields.structure[i].row_major
+ != key2->fields.structure[i].row_major)
+ return 1;
}
return 0;
@@ -468,9 +504,37 @@ glsl_type::get_record_instance(const glsl_struct_field *fields,
const glsl_type *
+glsl_type::get_interface_instance(const glsl_struct_field *fields,
+ unsigned num_fields,
+ enum glsl_interface_packing packing,
+ const char *name)
+{
+ const glsl_type key(fields, num_fields, packing, name);
+
+ if (interface_types == NULL) {
+ interface_types = hash_table_ctor(64, record_key_hash, record_key_compare);
+ }
+
+ const glsl_type *t = (glsl_type *) hash_table_find(interface_types, & key);
+ if (t == NULL) {
+ t = new glsl_type(fields, num_fields, packing, name);
+
+ hash_table_insert(interface_types, (void *) t, t);
+ }
+
+ assert(t->base_type == GLSL_TYPE_INTERFACE);
+ 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)
+ if (this->base_type != GLSL_TYPE_STRUCT
+ && this->base_type != GLSL_TYPE_INTERFACE)
return error_type;
for (unsigned i = 0; i < this->length; i++) {
@@ -485,7 +549,8 @@ glsl_type::field_type(const char *name) const
int
glsl_type::field_index(const char *name) const
{
- if (this->base_type != GLSL_TYPE_STRUCT)
+ if (this->base_type != GLSL_TYPE_STRUCT
+ && this->base_type != GLSL_TYPE_INTERFACE)
return -1;
for (unsigned i = 0; i < this->length; i++) {
@@ -507,7 +572,8 @@ glsl_type::component_slots() const
case GLSL_TYPE_BOOL:
return this->components();
- case GLSL_TYPE_STRUCT: {
+ case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_INTERFACE: {
unsigned size = 0;
for (unsigned i = 0; i < this->length; i++)
@@ -519,9 +585,13 @@ glsl_type::component_slots() const
case GLSL_TYPE_ARRAY:
return this->length * this->fields.array->component_slots();
- default:
- return 0;
+ case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
+ break;
}
+
+ return 0;
}
bool
@@ -539,3 +609,222 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired) const
&& this->is_integer()
&& this->vector_elements == desired->vector_elements;
}
+
+unsigned
+glsl_type::std140_base_alignment(bool row_major) const
+{
+ /* (1) If the member is a scalar consuming <N> basic machine units, the
+ * base alignment is <N>.
+ *
+ * (2) If the member is a two- or four-component vector with components
+ * consuming <N> basic machine units, the base alignment is 2<N> or
+ * 4<N>, respectively.
+ *
+ * (3) If the member is a three-component vector with components consuming
+ * <N> basic machine units, the base alignment is 4<N>.
+ */
+ if (this->is_scalar() || this->is_vector()) {
+ switch (this->vector_elements) {
+ case 1:
+ return 4;
+ case 2:
+ return 8;
+ case 3:
+ case 4:
+ return 16;
+ }
+ }
+
+ /* (4) If the member is an array of scalars or vectors, the base alignment
+ * and array stride are set to match the base alignment of a single
+ * array element, according to rules (1), (2), and (3), and rounded up
+ * to the base alignment of a vec4. The array may have padding at the
+ * end; the base offset of the member following the array is rounded up
+ * to the next multiple of the base alignment.
+ *
+ * (6) If the member is an array of <S> column-major matrices with <C>
+ * columns and <R> rows, the matrix is stored identically to a row of
+ * <S>*<C> column vectors with <R> components each, according to rule
+ * (4).
+ *
+ * (8) If the member is an array of <S> row-major matrices with <C> columns
+ * and <R> rows, the matrix is stored identically to a row of <S>*<R>
+ * row vectors with <C> components each, according to rule (4).
+ *
+ * (10) If the member is an array of <S> structures, the <S> elements of
+ * the array are laid out in order, according to rule (9).
+ */
+ if (this->is_array()) {
+ if (this->fields.array->is_scalar() ||
+ this->fields.array->is_vector() ||
+ this->fields.array->is_matrix()) {
+ return MAX2(this->fields.array->std140_base_alignment(row_major), 16);
+ } else {
+ assert(this->fields.array->is_record());
+ return this->fields.array->std140_base_alignment(row_major);
+ }
+ }
+
+ /* (5) If the member is a column-major matrix with <C> columns and
+ * <R> rows, the matrix is stored identically to an array of
+ * <C> column vectors with <R> components each, according to
+ * rule (4).
+ *
+ * (7) If the member is a row-major matrix with <C> columns and <R>
+ * rows, the matrix is stored identically to an array of <R>
+ * row vectors with <C> components each, according to rule (4).
+ */
+ if (this->is_matrix()) {
+ const struct glsl_type *vec_type, *array_type;
+ int c = this->matrix_columns;
+ int r = this->vector_elements;
+
+ if (row_major) {
+ vec_type = get_instance(GLSL_TYPE_FLOAT, c, 1);
+ array_type = glsl_type::get_array_instance(vec_type, r);
+ } else {
+ vec_type = get_instance(GLSL_TYPE_FLOAT, r, 1);
+ array_type = glsl_type::get_array_instance(vec_type, c);
+ }
+
+ return array_type->std140_base_alignment(false);
+ }
+
+ /* (9) If the member is a structure, the base alignment of the
+ * structure is <N>, where <N> is the largest base alignment
+ * value of any of its members, and rounded up to the base
+ * alignment of a vec4. The individual members of this
+ * sub-structure are then assigned offsets by applying this set
+ * of rules recursively, where the base offset of the first
+ * member of the sub-structure is equal to the aligned offset
+ * of the structure. The structure may have padding at the end;
+ * the base offset of the member following the sub-structure is
+ * rounded up to the next multiple of the base alignment of the
+ * structure.
+ */
+ if (this->is_record()) {
+ unsigned base_alignment = 16;
+ for (unsigned i = 0; i < this->length; i++) {
+ const struct glsl_type *field_type = this->fields.structure[i].type;
+ base_alignment = MAX2(base_alignment,
+ field_type->std140_base_alignment(row_major));
+ }
+ return base_alignment;
+ }
+
+ assert(!"not reached");
+ return -1;
+}
+
+unsigned
+glsl_type::std140_size(bool row_major) const
+{
+ /* (1) If the member is a scalar consuming <N> basic machine units, the
+ * base alignment is <N>.
+ *
+ * (2) If the member is a two- or four-component vector with components
+ * consuming <N> basic machine units, the base alignment is 2<N> or
+ * 4<N>, respectively.
+ *
+ * (3) If the member is a three-component vector with components consuming
+ * <N> basic machine units, the base alignment is 4<N>.
+ */
+ if (this->is_scalar() || this->is_vector()) {
+ return this->vector_elements * 4;
+ }
+
+ /* (5) If the member is a column-major matrix with <C> columns and
+ * <R> rows, the matrix is stored identically to an array of
+ * <C> column vectors with <R> components each, according to
+ * rule (4).
+ *
+ * (6) If the member is an array of <S> column-major matrices with <C>
+ * columns and <R> rows, the matrix is stored identically to a row of
+ * <S>*<C> column vectors with <R> components each, according to rule
+ * (4).
+ *
+ * (7) If the member is a row-major matrix with <C> columns and <R>
+ * rows, the matrix is stored identically to an array of <R>
+ * row vectors with <C> components each, according to rule (4).
+ *
+ * (8) If the member is an array of <S> row-major matrices with <C> columns
+ * and <R> rows, the matrix is stored identically to a row of <S>*<R>
+ * row vectors with <C> components each, according to rule (4).
+ */
+ if (this->is_matrix() || (this->is_array() &&
+ this->fields.array->is_matrix())) {
+ const struct glsl_type *element_type;
+ const struct glsl_type *vec_type;
+ unsigned int array_len;
+
+ if (this->is_array()) {
+ element_type = this->fields.array;
+ array_len = this->length;
+ } else {
+ element_type = this;
+ array_len = 1;
+ }
+
+ if (row_major) {
+ vec_type = get_instance(GLSL_TYPE_FLOAT,
+ element_type->matrix_columns, 1);
+ array_len *= element_type->vector_elements;
+ } else {
+ vec_type = get_instance(GLSL_TYPE_FLOAT,
+ element_type->vector_elements, 1);
+ array_len *= element_type->matrix_columns;
+ }
+ const glsl_type *array_type = glsl_type::get_array_instance(vec_type,
+ array_len);
+
+ return array_type->std140_size(false);
+ }
+
+ /* (4) If the member is an array of scalars or vectors, the base alignment
+ * and array stride are set to match the base alignment of a single
+ * array element, according to rules (1), (2), and (3), and rounded up
+ * to the base alignment of a vec4. The array may have padding at the
+ * end; the base offset of the member following the array is rounded up
+ * to the next multiple of the base alignment.
+ *
+ * (10) If the member is an array of <S> structures, the <S> elements of
+ * the array are laid out in order, according to rule (9).
+ */
+ if (this->is_array()) {
+ if (this->fields.array->is_record()) {
+ return this->length * this->fields.array->std140_size(row_major);
+ } else {
+ unsigned element_base_align =
+ this->fields.array->std140_base_alignment(row_major);
+ return this->length * MAX2(element_base_align, 16);
+ }
+ }
+
+ /* (9) If the member is a structure, the base alignment of the
+ * structure is <N>, where <N> is the largest base alignment
+ * value of any of its members, and rounded up to the base
+ * alignment of a vec4. The individual members of this
+ * sub-structure are then assigned offsets by applying this set
+ * of rules recursively, where the base offset of the first
+ * member of the sub-structure is equal to the aligned offset
+ * of the structure. The structure may have padding at the end;
+ * the base offset of the member following the sub-structure is
+ * rounded up to the next multiple of the base alignment of the
+ * structure.
+ */
+ if (this->is_record()) {
+ unsigned size = 0;
+ for (unsigned i = 0; i < this->length; i++) {
+ const struct glsl_type *field_type = this->fields.structure[i].type;
+ unsigned align = field_type->std140_base_alignment(row_major);
+ size = glsl_align(size, align);
+ size += field_type->std140_size(row_major);
+ }
+ size = glsl_align(size,
+ this->fields.structure[0].type->std140_base_alignment(row_major));
+ return size;
+ }
+
+ assert(!"not reached");
+ return -1;
+}
diff --git a/dist/Mesa/src/glsl/glsl_types.h b/dist/Mesa/src/glsl/glsl_types.h
index 048696693..8172309a7 100644
--- a/dist/Mesa/src/glsl/glsl_types.h
+++ b/dist/Mesa/src/glsl/glsl_types.h
@@ -28,22 +28,25 @@
#include <string.h>
#include <assert.h>
+#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
+#ifdef __cplusplus
extern "C" {
-#include "GL/gl.h"
-}
-
-#include "ralloc.h"
+#endif
struct _mesa_glsl_parse_state;
struct glsl_symbol_table;
-extern "C" void
+extern void
_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state);
-extern "C" void
+extern void
_mesa_glsl_release_types(void);
+#ifdef __cplusplus
+}
+#endif
+
enum glsl_base_type {
GLSL_TYPE_UINT = 0,
GLSL_TYPE_INT,
@@ -51,6 +54,7 @@ enum glsl_base_type {
GLSL_TYPE_BOOL,
GLSL_TYPE_SAMPLER,
GLSL_TYPE_STRUCT,
+ GLSL_TYPE_INTERFACE,
GLSL_TYPE_ARRAY,
GLSL_TYPE_VOID,
GLSL_TYPE_ERROR
@@ -62,9 +66,20 @@ enum glsl_sampler_dim {
GLSL_SAMPLER_DIM_3D,
GLSL_SAMPLER_DIM_CUBE,
GLSL_SAMPLER_DIM_RECT,
- GLSL_SAMPLER_DIM_BUF
+ GLSL_SAMPLER_DIM_BUF,
+ GLSL_SAMPLER_DIM_EXTERNAL,
+ GLSL_SAMPLER_DIM_MS
};
+enum glsl_interface_packing {
+ GLSL_INTERFACE_PACKING_STD140,
+ GLSL_INTERFACE_PACKING_SHARED,
+ GLSL_INTERFACE_PACKING_PACKED
+};
+
+#ifdef __cplusplus
+#include "GL/gl.h"
+#include "ralloc.h"
struct glsl_type {
GLenum gl_type;
@@ -77,6 +92,7 @@ struct glsl_type {
* only \c GLSL_TYPE_FLOAT, \c GLSL_TYPE_INT,
* and \c GLSL_TYPE_UINT are valid.
*/
+ unsigned interface_packing:2;
/* Callers of this ralloc-based new need not call delete. It's
* easier to just ralloc_free 'mem_ctx' (or any of its ancestors). */
@@ -116,15 +132,15 @@ struct glsl_type {
/**
* Name of the data type
*
- * This may be \c NULL for anonymous structures, for arrays, or for
- * function types.
+ * Will never be \c NULL.
*/
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).
+ * \c GLSL_TYPE_STRUCT or \c GLSL_TYPE_INTERFACE, it is the number of
+ * elements in the structure and the number of values pointed to by
+ * \c fields.structure (below).
*/
unsigned length;
@@ -137,35 +153,28 @@ struct glsl_type {
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 void_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;
+#undef DECL_TYPE
+#define DECL_TYPE(NAME, ...) \
+ static const glsl_type *const NAME##_type;
+#undef STRUCT_TYPE
+#define STRUCT_TYPE(NAME) \
+ static const glsl_type *const struct_##NAME##_type;
+#include "builtin_type_macros.h"
/*@}*/
+ /**
+ * Convenience accessors for vector types (shorter than get_instance()).
+ * @{
+ */
+ static const glsl_type *vec(unsigned components);
+ static const glsl_type *ivec(unsigned components);
+ static const glsl_type *uvec(unsigned components);
+ static const glsl_type *bvec(unsigned components);
+ /**@}*/
/**
* For numeric and boolean derrived types returns the basic scalar type
@@ -178,6 +187,17 @@ struct glsl_type {
const glsl_type *get_base_type() const;
/**
+ * Get the basic scalar type which this type aggregates.
+ *
+ * If the type is a numeric or boolean scalar, vector, or matrix, or an
+ * array of any of those, this function gets the scalar type of the
+ * individual components. For structs and arrays of structs, this function
+ * returns the struct type. For samplers and arrays of samplers, this
+ * function returns the sampler type.
+ */
+ const glsl_type *get_scalar_type() const;
+
+ /**
* Query the type of elements in an array
*
* \return
@@ -209,6 +229,14 @@ struct glsl_type {
const char *name);
/**
+ * Get the instance of an interface block type
+ */
+ static const glsl_type *get_interface_instance(const glsl_struct_field *fields,
+ unsigned num_fields,
+ enum glsl_interface_packing packing,
+ const char *name);
+
+ /**
* Query the total number of scalars that make up a scalar, vector or matrix
*/
unsigned components() const
@@ -225,6 +253,19 @@ struct glsl_type {
unsigned component_slots() const;
/**
+ * Alignment in bytes of the start of this type in a std140 uniform
+ * block.
+ */
+ unsigned std140_base_alignment(bool row_major) const;
+
+ /** Size in bytes of this type in a std140 uniform block.
+ *
+ * Note that this is not GL_UNIFORM_SIZE (which is the number of
+ * elements in the array)
+ */
+ unsigned std140_size(bool row_major) const;
+
+ /**
* \brief Can this type be implicitly converted to another?
*
* \return True if the types are identical or if this type can be converted
@@ -307,6 +348,12 @@ struct glsl_type {
}
/**
+ * Query whether or not type is an integral type, or for struct and array
+ * types, contains an integral type.
+ */
+ bool contains_integer() const;
+
+ /**
* Query whether or not a type is a float type
*/
bool is_float() const
@@ -337,6 +384,11 @@ struct glsl_type {
bool contains_sampler() const;
/**
+ * Get the Mesa texture target index for a sampler type.
+ */
+ gl_texture_index sampler_index() const;
+
+ /**
* Query whether or not a type is an array
*/
bool is_array() const
@@ -353,6 +405,14 @@ struct glsl_type {
}
/**
+ * Query whether or not a type is an interface
+ */
+ bool is_interface() const
+ {
+ return base_type == GLSL_TYPE_INTERFACE;
+ }
+
+ /**
* Query whether or not a type is the void type singleton.
*/
bool is_void() const
@@ -450,6 +510,10 @@ private:
glsl_type(const glsl_struct_field *fields, unsigned num_fields,
const char *name);
+ /** Constructor for interface types */
+ glsl_type(const glsl_struct_field *fields, unsigned num_fields,
+ enum glsl_interface_packing packing, const char *name);
+
/** Constructor for array types */
glsl_type(const glsl_type *array, unsigned length);
@@ -459,43 +523,21 @@ private:
/** Hash table containing the known record types. */
static struct hash_table *record_types;
+ /** Hash table containing the known interface types. */
+ static struct hash_table *interface_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 _sampler3D_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.
+ * \name Built-in type flyweights
*/
/*@{*/
- 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);
- static void generate_OES_texture_3D_types(glsl_symbol_table *, bool);
+#undef DECL_TYPE
+#define DECL_TYPE(NAME, ...) static const glsl_type _##NAME##_type;
+#undef STRUCT_TYPE
+#define STRUCT_TYPE(NAME) static const glsl_type _struct_##NAME##_type;
+#include "builtin_type_macros.h"
/*@}*/
/**
@@ -514,6 +556,17 @@ private:
struct glsl_struct_field {
const struct glsl_type *type;
const char *name;
+ bool row_major;
};
+static inline unsigned int
+glsl_align(unsigned int a, unsigned int align)
+{
+ return (a + align - 1) / align * align;
+}
+
+#undef DECL_TYPE
+#undef STRUCT_TYPE
+#endif /* __cplusplus */
+
#endif /* GLSL_TYPES_H */
diff --git a/dist/Mesa/src/glsl/ir.cpp b/dist/Mesa/src/glsl/ir.cpp
index 66debe555..dad58deeb 100644
--- a/dist/Mesa/src/glsl/ir.cpp
+++ b/dist/Mesa/src/glsl/ir.cpp
@@ -46,6 +46,11 @@ bool ir_rvalue::is_negative_one() const
return false;
}
+bool ir_rvalue::is_basis() const
+{
+ return false;
+}
+
/**
* Modify the swizzle make to move one component to another
*
@@ -190,34 +195,6 @@ ir_assignment::ir_assignment(ir_rvalue *lhs, ir_rvalue *rhs,
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)
@@ -229,6 +206,12 @@ ir_expression::ir_expression(int op, const struct glsl_type *type,
this->operands[1] = op1;
this->operands[2] = op2;
this->operands[3] = op3;
+#ifndef NDEBUG
+ int num_operands = get_num_operands(this->operation);
+ for (int i = num_operands; i < 4; i++) {
+ assert(this->operands[i] == NULL);
+ }
+#endif
}
ir_expression::ir_expression(int op, ir_rvalue *op0)
@@ -272,6 +255,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
case ir_unop_f2i:
case ir_unop_b2i:
+ case ir_unop_u2i:
+ case ir_unop_bitcast_f2i:
this->type = glsl_type::get_instance(GLSL_TYPE_INT,
op0->type->vector_elements, 1);
break;
@@ -279,6 +264,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
case ir_unop_b2f:
case ir_unop_i2f:
case ir_unop_u2f:
+ case ir_unop_bitcast_i2f:
+ case ir_unop_bitcast_u2f:
this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
op0->type->vector_elements, 1);
break;
@@ -289,7 +276,16 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
op0->type->vector_elements, 1);
break;
+ case ir_unop_i2u:
+ case ir_unop_f2u:
+ case ir_unop_bitcast_f2u:
+ this->type = glsl_type::get_instance(GLSL_TYPE_UINT,
+ op0->type->vector_elements, 1);
+ break;
+
case ir_unop_noise:
+ case ir_unop_unpack_half_2x16_split_x:
+ case ir_unop_unpack_half_2x16_split_y:
this->type = glsl_type::float_type;
break;
@@ -297,6 +293,25 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
this->type = glsl_type::bool_type;
break;
+ case ir_unop_pack_snorm_2x16:
+ case ir_unop_pack_snorm_4x8:
+ case ir_unop_pack_unorm_2x16:
+ case ir_unop_pack_unorm_4x8:
+ case ir_unop_pack_half_2x16:
+ this->type = glsl_type::uint_type;
+ break;
+
+ case ir_unop_unpack_snorm_2x16:
+ case ir_unop_unpack_unorm_2x16:
+ case ir_unop_unpack_half_2x16:
+ this->type = glsl_type::vec2_type;
+ break;
+
+ case ir_unop_unpack_snorm_4x8:
+ case ir_unop_unpack_unorm_4x8:
+ this->type = glsl_type::vec4_type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = op0->type;
@@ -348,10 +363,15 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
case ir_binop_bit_and:
case ir_binop_bit_xor:
case ir_binop_bit_or:
+ assert(!op0->type->is_matrix());
+ assert(!op1->type->is_matrix());
if (op0->type->is_scalar()) {
- this->type = op1->type;
+ this->type = op1->type;
} else if (op1->type->is_scalar()) {
- this->type = op0->type;
+ this->type = op0->type;
+ } else {
+ assert(op0->type->vector_elements == op1->type->vector_elements);
+ this->type = op0->type;
}
break;
@@ -370,11 +390,19 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
this->type = glsl_type::float_type;
break;
+ case ir_binop_pack_half_2x16_split:
+ this->type = glsl_type::uint_type;
+ break;
+
case ir_binop_lshift:
case ir_binop_rshift:
this->type = op0->type;
break;
+ case ir_binop_vector_extract:
+ this->type = op0->type->get_scalar_type();
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = glsl_type::float_type;
@@ -392,7 +420,10 @@ ir_expression::get_num_operands(ir_expression_operation op)
if (op <= ir_last_binop)
return 2;
- if (op == ir_quadop_vector)
+ if (op <= ir_last_triop)
+ return 3;
+
+ if (op <= ir_last_quadop)
return 4;
assert(false);
@@ -413,12 +444,19 @@ static const char *const operator_strs[] = {
"exp2",
"log2",
"f2i",
+ "f2u",
"i2f",
"f2b",
"b2f",
"i2b",
"b2i",
"u2f",
+ "i2u",
+ "u2i",
+ "bitcast_i2f",
+ "bitcast_f2i",
+ "bitcast_u2f",
+ "bitcast_f2u",
"any",
"trunc",
"ceil",
@@ -431,6 +469,22 @@ static const char *const operator_strs[] = {
"cos_reduced",
"dFdx",
"dFdy",
+ "packSnorm2x16",
+ "packSnorm4x8",
+ "packUnorm2x16",
+ "packUnorm4x8",
+ "packHalf2x16",
+ "unpackSnorm2x16",
+ "unpackSnorm4x8",
+ "unpackUnorm2x16",
+ "unpackUnorm4x8",
+ "unpackHalf2x16",
+ "unpackHalf2x16_split_x",
+ "unpackHalf2x16_split_y",
+ "bitfield_reverse",
+ "bit_count",
+ "find_msb",
+ "find_lsb",
"noise",
"+",
"-",
@@ -457,6 +511,15 @@ static const char *const operator_strs[] = {
"min",
"max",
"pow",
+ "packHalf2x16_split",
+ "bfm",
+ "ubo_load",
+ "vector_extract",
+ "lrp",
+ "bfi",
+ "bitfield_extract",
+ "vector_insert",
+ "bitfield_insert",
"vector",
};
@@ -708,12 +771,27 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
ir_constant *
ir_constant::zero(void *mem_ctx, const glsl_type *type)
{
- assert(type->is_numeric() || type->is_boolean());
+ assert(type->is_scalar() || type->is_vector() || type->is_matrix()
+ || type->is_record() || type->is_array());
ir_constant *c = new(mem_ctx) ir_constant;
c->type = type;
memset(&c->value, 0, sizeof(c->value));
+ if (type->is_array()) {
+ c->array_elements = ralloc_array(c, ir_constant *, type->length);
+
+ for (unsigned i = 0; i < type->length; i++)
+ c->array_elements[i] = ir_constant::zero(c, type->element_type());
+ }
+
+ if (type->is_record()) {
+ for (unsigned i = 0; i < type->length; i++) {
+ ir_constant *comp = ir_constant::zero(mem_ctx, type->fields.structure[i].type);
+ c->components.push_tail(comp);
+ }
+ }
+
return c;
}
@@ -741,7 +819,7 @@ ir_constant::get_float_component(unsigned i) const
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;
+ case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0f : 0.0f;
default: assert(!"Should not get here."); break;
}
@@ -833,6 +911,95 @@ ir_constant::get_record_field(const char *name)
return (ir_constant *) node;
}
+void
+ir_constant::copy_offset(ir_constant *src, int offset)
+{
+ switch (this->type->base_type) {
+ case GLSL_TYPE_UINT:
+ case GLSL_TYPE_INT:
+ case GLSL_TYPE_FLOAT:
+ case GLSL_TYPE_BOOL: {
+ unsigned int size = src->type->components();
+ assert (size <= this->type->components() - offset);
+ for (unsigned int i=0; i<size; i++) {
+ switch (this->type->base_type) {
+ case GLSL_TYPE_UINT:
+ value.u[i+offset] = src->get_uint_component(i);
+ break;
+ case GLSL_TYPE_INT:
+ value.i[i+offset] = src->get_int_component(i);
+ break;
+ case GLSL_TYPE_FLOAT:
+ value.f[i+offset] = src->get_float_component(i);
+ break;
+ case GLSL_TYPE_BOOL:
+ value.b[i+offset] = src->get_bool_component(i);
+ break;
+ default: // Shut up the compiler
+ break;
+ }
+ }
+ break;
+ }
+
+ case GLSL_TYPE_STRUCT: {
+ assert (src->type == this->type);
+ this->components.make_empty();
+ foreach_list(node, &src->components) {
+ ir_constant *const orig = (ir_constant *) node;
+
+ this->components.push_tail(orig->clone(this, NULL));
+ }
+ break;
+ }
+
+ case GLSL_TYPE_ARRAY: {
+ assert (src->type == this->type);
+ for (unsigned i = 0; i < this->type->length; i++) {
+ this->array_elements[i] = src->array_elements[i]->clone(this, NULL);
+ }
+ break;
+ }
+
+ default:
+ assert(!"Should not get here.");
+ break;
+ }
+}
+
+void
+ir_constant::copy_masked_offset(ir_constant *src, int offset, unsigned int mask)
+{
+ assert (!type->is_array() && !type->is_record());
+
+ if (!type->is_vector() && !type->is_matrix()) {
+ offset = 0;
+ mask = 1;
+ }
+
+ int id = 0;
+ for (int i=0; i<4; i++) {
+ if (mask & (1 << i)) {
+ switch (this->type->base_type) {
+ case GLSL_TYPE_UINT:
+ value.u[i+offset] = src->get_uint_component(id++);
+ break;
+ case GLSL_TYPE_INT:
+ value.i[i+offset] = src->get_int_component(id++);
+ break;
+ case GLSL_TYPE_FLOAT:
+ value.f[i+offset] = src->get_float_component(id++);
+ break;
+ case GLSL_TYPE_BOOL:
+ value.b[i+offset] = src->get_bool_component(id++);
+ break;
+ default:
+ assert(!"Should not get here.");
+ return;
+ }
+ }
+ }
+}
bool
ir_constant::has_value(const ir_constant *c) const
@@ -1005,6 +1172,49 @@ ir_constant::is_negative_one() const
return true;
}
+bool
+ir_constant::is_basis() const
+{
+ if (!this->type->is_scalar() && !this->type->is_vector())
+ return false;
+
+ if (this->type->is_boolean())
+ return false;
+
+ unsigned ones = 0;
+ 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)
+ ones++;
+ else if (this->value.f[c] != 0.0)
+ return false;
+ break;
+ case GLSL_TYPE_INT:
+ if (this->value.i[c] == 1)
+ ones++;
+ else if (this->value.i[c] != 0)
+ return false;
+ break;
+ case GLSL_TYPE_UINT:
+ if (int(this->value.u[c]) == 1)
+ ones++;
+ else if (int(this->value.u[c]) != 0)
+ 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 ones == 1;
+}
+
ir_loop::ir_loop()
{
this->ir_type = ir_type_loop;
@@ -1018,9 +1228,11 @@ ir_loop::ir_loop()
ir_dereference_variable::ir_dereference_variable(ir_variable *var)
{
+ assert(var != NULL);
+
this->ir_type = ir_type_dereference_variable;
this->var = var;
- this->type = (var != NULL) ? var->type : glsl_type::error_type;
+ this->type = var->type;
}
@@ -1047,19 +1259,18 @@ ir_dereference_array::ir_dereference_array(ir_variable *var,
void
ir_dereference_array::set_array(ir_rvalue *value)
{
+ assert(value != NULL);
+
this->array = value;
- this->type = glsl_type::error_type;
- if (this->array != NULL) {
- const glsl_type *const vt = this->array->type;
+ 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();
- }
+ 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();
}
}
@@ -1067,11 +1278,12 @@ ir_dereference_array::set_array(ir_rvalue *value)
ir_dereference_record::ir_dereference_record(ir_rvalue *value,
const char *field)
{
+ assert(value != NULL);
+
this->ir_type = ir_type_dereference_record;
this->record = value;
this->field = ralloc_strdup(this, field);
- this->type = (this->record != NULL)
- ? this->record->type->field_type(field) : glsl_type::error_type;
+ this->type = this->record->type->field_type(field);
}
@@ -1083,12 +1295,11 @@ ir_dereference_record::ir_dereference_record(ir_variable *var,
this->ir_type = ir_type_dereference_record;
this->record = new(ctx) ir_dereference_variable(var);
this->field = ralloc_strdup(this, field);
- this->type = (this->record != NULL)
- ? this->record->type->field_type(field) : glsl_type::error_type;
+ this->type = this->record->type->field_type(field);
}
bool
-ir_dereference::is_lvalue()
+ir_dereference::is_lvalue() const
{
ir_variable *var = this->variable_referenced();
@@ -1110,7 +1321,7 @@ ir_dereference::is_lvalue()
}
-const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf" };
+static const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txf_ms", "txs", "lod" };
const char *ir_texture::opcode_string()
{
@@ -1139,11 +1350,18 @@ ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type)
this->sampler = sampler;
this->type = type;
- assert(sampler->type->sampler_type == (int) type->base_type);
- if (sampler->type->sampler_shadow)
- assert(type->vector_elements == 4 || type->vector_elements == 1);
- else
- assert(type->vector_elements == 4);
+ if (this->op == ir_txs) {
+ assert(type->base_type == GLSL_TYPE_INT);
+ } else if (this->op == ir_lod) {
+ assert(type->vector_elements == 2);
+ assert(type->base_type == GLSL_TYPE_FLOAT);
+ } else {
+ assert(sampler->type->sampler_type == (int) type->base_type);
+ if (sampler->type->sampler_shadow)
+ assert(type->vector_elements == 4 || type->vector_elements == 1);
+ else
+ assert(type->vector_elements == 4);
+ }
}
@@ -1299,7 +1517,7 @@ ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length)
#undef I
ir_variable *
-ir_swizzle::variable_referenced()
+ir_swizzle::variable_referenced() const
{
return this->val->variable_referenced();
}
@@ -1308,15 +1526,18 @@ ir_swizzle::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)
+ mode(mode), interpolation(INTERP_QUALIFIER_NONE)
{
this->ir_type = ir_type_variable;
this->type = type;
this->name = ralloc_strdup(this, name);
this->explicit_location = false;
+ this->has_initializer = false;
this->location = -1;
+ this->location_frac = 0;
this->warn_extension = NULL;
this->constant_value = NULL;
+ this->constant_initializer = NULL;
this->origin_upper_left = false;
this->pixel_center_integer = false;
this->depth_layout = ir_depth_layout_none;
@@ -1331,9 +1552,10 @@ 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";
+ case INTERP_QUALIFIER_NONE: return "no";
+ case INTERP_QUALIFIER_SMOOTH: return "smooth";
+ case INTERP_QUALIFIER_FLAT: return "flat";
+ case INTERP_QUALIFIER_NOPERSPECTIVE: return "noperspective";
}
assert(!"Should not get here.");
@@ -1341,11 +1563,18 @@ ir_variable::interpolation_string() const
}
-unsigned
-ir_variable::component_slots() const
+glsl_interp_qualifier
+ir_variable::determine_interpolation_mode(bool flat_shade)
{
- /* FINISHME: Sparsely accessed arrays require fewer slots. */
- return this->type->component_slots();
+ if (this->interpolation != INTERP_QUALIFIER_NONE)
+ return (glsl_interp_qualifier) this->interpolation;
+ int location = this->location;
+ bool is_gl_Color =
+ location == VARYING_SLOT_COL0 || location == VARYING_SLOT_COL1;
+ if (flat_shade && is_gl_Color)
+ return INTERP_QUALIFIER_FLAT;
+ else
+ return INTERP_QUALIFIER_SMOOTH;
}
@@ -1354,6 +1583,7 @@ ir_function_signature::ir_function_signature(const glsl_type *return_type)
{
this->ir_type = ir_type_function_signature;
this->is_builtin = false;
+ this->origin = NULL;
}
@@ -1364,8 +1594,8 @@ modes_match(unsigned a, unsigned b)
return true;
/* Accept "in" vs. "const in" */
- if ((a == ir_var_const_in && b == ir_var_in) ||
- (b == ir_var_const_in && a == ir_var_in))
+ if ((a == ir_var_const_in && b == ir_var_function_in) ||
+ (b == ir_var_const_in && a == ir_var_function_in))
return true;
return false;
@@ -1435,22 +1665,15 @@ ir_function::has_user_signature()
}
-ir_call *
-ir_call::get_error_instruction(void *ctx)
+ir_rvalue *
+ir_rvalue::error_value(void *mem_ctx)
{
- ir_call *call = new(ctx) ir_call;
+ ir_rvalue *v = new(mem_ctx) ir_rvalue;
- call->type = glsl_type::error_type;
- return call;
+ v->type = glsl_type::error_type;
+ return v;
}
-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)
@@ -1469,6 +1692,9 @@ steal_memory(ir_instruction *ir, void *new_ctx)
if (var != NULL && var->constant_value != NULL)
steal_memory(var->constant_value, ir);
+ if (var != NULL && var->constant_initializer != NULL)
+ steal_memory(var->constant_initializer, ir);
+
/* The components of aggregate constants are not visited by the normal
* visitor, so steal their values by hand.
*/
diff --git a/dist/Mesa/src/glsl/ir.h b/dist/Mesa/src/glsl/ir.h
index dda68d20e..7ac291cf4 100644
--- a/dist/Mesa/src/glsl/ir.h
+++ b/dist/Mesa/src/glsl/ir.h
@@ -34,6 +34,9 @@
#include "list.h"
#include "ir_visitor.h"
#include "ir_hierarchical_visitor.h"
+#include "main/mtypes.h"
+
+#ifdef __cplusplus
/**
* \defgroup IR Intermediate representation nodes
@@ -87,7 +90,16 @@ enum ir_node_type {
class ir_instruction : public exec_node {
public:
enum ir_node_type ir_type;
- const struct glsl_type *type;
+
+ /**
+ * GCC 4.7+ and clang warn when deleting an ir_instruction unless
+ * there's a virtual destructor present. Because we almost
+ * universally use ralloc for our memory management of
+ * ir_instructions, the destructor doesn't need to do any work.
+ */
+ virtual ~ir_instruction()
+ {
+ }
/** ir_print_visitor helper for debugging. */
void print(void) const;
@@ -110,6 +122,7 @@ public:
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_dereference_record *as_dereference_record() { 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; }
@@ -120,22 +133,34 @@ public:
virtual class ir_swizzle * as_swizzle() { return NULL; }
virtual class ir_constant * as_constant() { return NULL; }
virtual class ir_discard * as_discard() { return NULL; }
+ virtual class ir_jump * as_jump() { return NULL; }
/*@}*/
protected:
ir_instruction()
{
ir_type = ir_type_unset;
- type = NULL;
}
};
+/**
+ * The base class for all "values"/expression trees.
+ */
class ir_rvalue : public ir_instruction {
public:
- virtual ir_rvalue *clone(void *mem_ctx, struct hash_table *) const = 0;
+ const struct glsl_type *type;
+
+ virtual ir_rvalue *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 *);
- virtual ir_constant *constant_expression_value() = 0;
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_rvalue * as_rvalue()
{
@@ -144,7 +169,7 @@ public:
ir_rvalue *as_rvalue_to_saturate();
- virtual bool is_lvalue()
+ virtual bool is_lvalue() const
{
return false;
}
@@ -152,7 +177,7 @@ public:
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced()
+ virtual ir_variable *variable_referenced() const
{
return NULL;
}
@@ -180,7 +205,8 @@ public:
* 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
+ * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one,
+ * ir_constant::is_basis
*/
virtual bool is_zero() const;
@@ -192,7 +218,8 @@ public:
* 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
+ * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one,
+ * ir_constant::is_basis
*/
virtual bool is_one() const;
@@ -202,12 +229,35 @@ public:
* 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.
+ * negative one. For boolean types, the result is always \c false.
*
* \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one
+ * ir_constant::is_basis
*/
virtual bool is_negative_one() const;
+ /**
+ * Determine if an r-value is a basis vector
+ *
+ * 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 one element set to the value one,
+ * and the other elements set to the value zero. For boolean types, the
+ * result is always \c false.
+ *
+ * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one,
+ * is_constant::is_negative_one
+ */
+ virtual bool is_basis() const;
+
+
+ /**
+ * Return a generic value of error_type.
+ *
+ * Allocation will be performed with 'mem_ctx' as ralloc owner.
+ */
+ static ir_rvalue *error_value(void *mem_ctx);
+
protected:
ir_rvalue();
};
@@ -219,24 +269,21 @@ protected:
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_shader_in,
+ ir_var_shader_out,
+ ir_var_function_in,
+ ir_var_function_out,
+ ir_var_function_inout,
ir_var_const_in, /**< "in" param that must be a constant expression */
ir_var_system_value, /**< Ex: front-face, instance-id, etc. */
- ir_var_temporary /**< Temporary variable generated during compilation. */
-};
-
-enum ir_variable_interpolation {
- ir_var_smooth = 0,
- ir_var_flat,
- ir_var_noperspective
+ ir_var_temporary, /**< Temporary variable generated during compilation. */
+ ir_var_mode_count /**< Number of variable modes */
};
/**
* \brief Layout qualifiers for gl_FragDepth.
*
- * The AMD_conservative_depth extension allows gl_FragDepth to be redeclared
+ * The AMD/ARB_conservative_depth extensions allow gl_FragDepth to be redeclared
* with a layout qualifier.
*/
enum ir_depth_layout {
@@ -288,20 +335,67 @@ public:
* \return The string that would be used in a shader to specify \c
* mode will be returned.
*
+ * This function is used to generate error messages of the form "shader
+ * uses %s interpolation qualifier", so in the case where there is no
+ * interpolation qualifier, it returns "no".
+ *
* 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
+ * Determine how this variable should be interpolated based on its
+ * interpolation qualifier (if present), whether it is gl_Color or
+ * gl_SecondaryColor, and whether flatshading is enabled in the current GL
+ * state.
*
- * This is used to determine how many uniform or varying locations a variable
- * occupies. The count is in units of floating point components.
+ * The return value will always be either INTERP_QUALIFIER_SMOOTH,
+ * INTERP_QUALIFIER_NOPERSPECTIVE, or INTERP_QUALIFIER_FLAT.
*/
- unsigned component_slots() const;
+ glsl_interp_qualifier determine_interpolation_mode(bool flat_shade);
/**
- * Delcared name of the variable
+ * Determine whether or not a variable is part of a uniform block.
+ */
+ inline bool is_in_uniform_block() const
+ {
+ return this->mode == ir_var_uniform && this->interface_type != NULL;
+ }
+
+ /**
+ * Determine whether or not a variable is the declaration of an interface
+ * block
+ *
+ * For the first declaration below, there will be an \c ir_variable named
+ * "instance" whose type and whose instance_type will be the same
+ * \cglsl_type. For the second declaration, there will be an \c ir_variable
+ * named "f" whose type is float and whose instance_type is B2.
+ *
+ * "instance" is an interface instance variable, but "f" is not.
+ *
+ * uniform B1 {
+ * float f;
+ * } instance;
+ *
+ * uniform B2 {
+ * float f;
+ * };
+ */
+ inline bool is_interface_instance() const
+ {
+ const glsl_type *const t = this->type;
+
+ return (t == this->interface_type)
+ || (t->is_array() && t->fields.array == this->interface_type);
+ }
+
+ /**
+ * Declared type of the variable
+ */
+ const struct glsl_type *type;
+
+ /**
+ * Declared name of the variable
*/
const char *name;
@@ -328,15 +422,28 @@ public:
* Several GLSL semantic checks require knowledge of whether or not a
* variable has been used. For example, it is an error to redeclare a
* variable as invariant after it has been used.
+ *
+ * This is only maintained in the ast_to_hir.cpp path, not in
+ * Mesa's fixed function or ARB program paths.
*/
unsigned used:1;
/**
+ * Has this variable been statically assigned?
+ *
+ * This answers whether the variable was assigned in any path of
+ * the shader during ast_to_hir. This doesn't answer whether it is
+ * still written after dead code removal, nor is it maintained in
+ * non-ast_to_hir.cpp (GLSL parsing) paths.
+ */
+ unsigned assigned:1;
+
+ /**
* Storage class of the variable.
*
* \sa ir_variable_mode
*/
- unsigned mode:3;
+ unsigned mode:4;
/**
* Interpolation mode for shader inputs / outputs
@@ -354,14 +461,6 @@ public:
/*@}*/
/**
- * \brief Layout qualifier for gl_FragDepth.
- *
- * This is not equal to \c ir_depth_layout_none if and only if this
- * variable is \c gl_FragDepth and a layout qualifier is specified.
- */
- ir_depth_layout depth_layout;
-
- /**
* Was the location explicitly set in the shader?
*
* If the location is explicitly set in the shader, it \b cannot be changed
@@ -369,6 +468,49 @@ public:
* no effect).
*/
unsigned explicit_location:1;
+ unsigned explicit_index:1;
+
+ /**
+ * Was an initial binding explicitly set in the shader?
+ *
+ * If so, constant_value contains an integer ir_constant representing the
+ * initial binding point.
+ */
+ unsigned explicit_binding:1;
+
+ /**
+ * Does this variable have an initializer?
+ *
+ * This is used by the linker to cross-validiate initializers of global
+ * variables.
+ */
+ unsigned has_initializer:1;
+
+ /**
+ * Is this variable a generic output or input that has not yet been matched
+ * up to a variable in another stage of the pipeline?
+ *
+ * This is used by the linker as scratch storage while assigning locations
+ * to generic inputs and outputs.
+ */
+ unsigned is_unmatched_generic_inout:1;
+
+ /**
+ * If non-zero, then this variable may be packed along with other variables
+ * into a single varying slot, so this offset should be applied when
+ * accessing components. For example, an offset of 1 means that the x
+ * component of this variable is actually stored in component y of the
+ * location specified by \c location.
+ */
+ unsigned location_frac:2;
+
+ /**
+ * \brief Layout qualifier for gl_FragDepth.
+ *
+ * This is not equal to \c ir_depth_layout_none if and only if this
+ * variable is \c gl_FragDepth and a layout qualifier is specified.
+ */
+ ir_depth_layout depth_layout;
/**
* Storage location of the base of this variable
@@ -376,10 +518,11 @@ public:
* 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.
+ * - Vertex shader output: one of the values from \c gl_varying_slot.
+ * - Fragment shader input: one of the values from \c gl_varying_slot.
* - Fragment shader output: one of the values from \c gl_frag_result.
- * - Uniforms: Per-stage uniform slot number.
+ * - Uniforms: Per-stage uniform slot number for default uniform block.
+ * - Uniforms: Index within the uniform block definition for UBO members.
* - Other: This field is not currently used.
*
* If the variable is a uniform, shader input, or shader output, and the
@@ -388,6 +531,18 @@ public:
int location;
/**
+ * output index for dual source blending.
+ */
+ int index;
+
+ /**
+ * Initial binding point for a sampler or UBO.
+ *
+ * For array types, this represents the binding point for the first element.
+ */
+ int binding;
+
+ /**
* Built-in state that backs this uniform
*
* Once set at variable creation, \c state_slots must remain invariant.
@@ -412,6 +567,24 @@ public:
* Value assigned in the initializer of a variable declared "const"
*/
ir_constant *constant_value;
+
+ /**
+ * Constant expression assigned in the initializer of the variable
+ *
+ * \warning
+ * This field and \c ::constant_value are distinct. Even if the two fields
+ * refer to constants with the same value, they must point to separate
+ * objects.
+ */
+ ir_constant *constant_initializer;
+
+ /**
+ * For variables that are in an interface block or are an instance of an
+ * interface block, this is the \c GLSL_TYPE_INTERFACE type for that block.
+ *
+ * \sa ir_variable::location
+ */
+ const glsl_type *interface_type;
};
@@ -440,6 +613,13 @@ public:
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
/**
+ * Attempt to evaluate this function as a constant expression,
+ * given a list of the actual parameters and the variable context.
+ * Returns NULL for non-built-ins.
+ */
+ ir_constant *constant_expression_value(exec_list *actual_parameters, struct hash_table *variable_context);
+
+ /**
* Get the name of the function for which this is a signature
*/
const char *function_name() const;
@@ -503,7 +683,25 @@ private:
/** Function of which this signature is one overload. */
class ir_function *_function;
+ /** Function signature of which this one is a prototype clone */
+ const ir_function_signature *origin;
+
friend class ir_function;
+
+ /**
+ * Helper function to run a list of instructions for constant
+ * expression evaluation.
+ *
+ * The hash table represents the values of the visible variables.
+ * There are no scoping issues because the table is indexed on
+ * ir_variable pointers, not variable names.
+ *
+ * Returns false if the expression is not constant, true otherwise,
+ * and the value in *result if result is non-NULL.
+ */
+ bool constant_expression_evaluate_expression_list(const struct exec_list &body,
+ struct hash_table *variable_context,
+ ir_constant **result);
};
@@ -546,6 +744,13 @@ public:
/**
* Find a signature that matches a set of actual parameters, taking implicit
+ * conversions into account. Also flags whether the match was exact.
+ */
+ ir_function_signature *matching_signature(const exec_list *actual_param,
+ bool *match_is_exact);
+
+ /**
+ * 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);
@@ -688,7 +893,7 @@ public:
virtual ir_assignment *clone(void *mem_ctx, struct hash_table *ht) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual void accept(ir_visitor *v)
{
@@ -758,7 +963,7 @@ public:
unsigned write_mask:4;
};
-/* Update ir_expression::num_operands() and operator_strs when
+/* Update ir_expression::get_num_operands() and operator_strs when
* updating this list.
*/
enum ir_expression_operation {
@@ -770,17 +975,24 @@ enum ir_expression_operation {
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_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_f2i, /**< Float-to-integer conversion. */
+ ir_unop_f2u, /**< Float-to-unsigned 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_i2u, /**< Integer-to-unsigned conversion. */
+ ir_unop_u2i, /**< Unsigned-to-integer conversion. */
+ ir_unop_bitcast_i2f, /**< Bit-identical int-to-float "conversion" */
+ ir_unop_bitcast_f2i, /**< Bit-identical float-to-int "conversion" */
+ ir_unop_bitcast_u2f, /**< Bit-identical uint-to-float "conversion" */
+ ir_unop_bitcast_f2u, /**< Bit-identical float-to-uint "conversion" */
ir_unop_any,
/**
@@ -812,6 +1024,42 @@ enum ir_expression_operation {
ir_unop_dFdy,
/*@}*/
+ /**
+ * \name Floating point pack and unpack operations.
+ */
+ /*@{*/
+ ir_unop_pack_snorm_2x16,
+ ir_unop_pack_snorm_4x8,
+ ir_unop_pack_unorm_2x16,
+ ir_unop_pack_unorm_4x8,
+ ir_unop_pack_half_2x16,
+ ir_unop_unpack_snorm_2x16,
+ ir_unop_unpack_snorm_4x8,
+ ir_unop_unpack_unorm_2x16,
+ ir_unop_unpack_unorm_4x8,
+ ir_unop_unpack_half_2x16,
+ /*@}*/
+
+ /**
+ * \name Lowered floating point unpacking operations.
+ *
+ * \see lower_packing_builtins_visitor::split_unpack_half_2x16
+ */
+ /*@{*/
+ ir_unop_unpack_half_2x16_split_x,
+ ir_unop_unpack_half_2x16_split_y,
+ /*@}*/
+
+ /**
+ * \name Bit operations, part of ARB_gpu_shader5.
+ */
+ /*@{*/
+ ir_unop_bitfield_reverse,
+ ir_unop_bit_count,
+ ir_unop_find_msb,
+ ir_unop_find_lsb,
+ /*@}*/
+
ir_unop_noise,
/**
@@ -879,39 +1127,102 @@ enum ir_expression_operation {
ir_binop_pow,
/**
+ * \name Lowered floating point packing operations.
+ *
+ * \see lower_packing_builtins_visitor::split_pack_half_2x16
+ */
+ /*@{*/
+ ir_binop_pack_half_2x16_split,
+ /*@}*/
+
+ /**
+ * \name First half of a lowered bitfieldInsert() operation.
+ *
+ * \see lower_instructions::bitfield_insert_to_bfm_bfi
+ */
+ /*@{*/
+ ir_binop_bfm,
+ /*@}*/
+
+ /**
+ * Load a value the size of a given GLSL type from a uniform block.
+ *
+ * operand0 is the ir_constant uniform block index in the linked shader.
+ * operand1 is a byte offset within the uniform block.
+ */
+ ir_binop_ubo_load,
+
+ /**
+ * Extract a scalar from a vector
+ *
+ * operand0 is the vector
+ * operand1 is the index of the field to read from operand0
+ */
+ ir_binop_vector_extract,
+
+ /**
* A sentinel marking the last of the binary operations.
*/
- ir_last_binop = ir_binop_pow,
+ ir_last_binop = ir_binop_vector_extract,
+
+ ir_triop_lrp,
+
+ /**
+ * \name Second half of a lowered bitfieldInsert() operation.
+ *
+ * \see lower_instructions::bitfield_insert_to_bfm_bfi
+ */
+ /*@{*/
+ ir_triop_bfi,
+ /*@}*/
+
+ ir_triop_bitfield_extract,
+
+ /**
+ * Generate a value with one field of a vector changed
+ *
+ * operand0 is the vector
+ * operand1 is the value to write into the vector result
+ * operand2 is the index in operand0 to be modified
+ */
+ ir_triop_vector_insert,
+
+ /**
+ * A sentinel marking the last of the ternary operations.
+ */
+ ir_last_triop = ir_triop_vector_insert,
+
+ ir_quadop_bitfield_insert,
ir_quadop_vector,
/**
+ * A sentinel marking the last of the ternary operations.
+ */
+ ir_last_quadop = ir_quadop_vector,
+
+ /**
* A sentinel marking the last of all operations.
*/
- ir_last_opcode = ir_last_binop
+ ir_last_opcode = ir_quadop_vector
};
class ir_expression : public ir_rvalue {
public:
+ ir_expression(int op, const struct glsl_type *type,
+ ir_rvalue *op0, ir_rvalue *op1 = NULL,
+ ir_rvalue *op2 = NULL, ir_rvalue *op3 = NULL);
+
/**
* 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;
@@ -922,10 +1233,14 @@ public:
/**
* Attempt to constant-fold the expression
*
+ * The "variable_context" hash table links ir_variable * to ir_constant *
+ * that represent the variables' values. \c NULL represents an empty
+ * context.
+ *
* If the expression cannot be constant folded, this method will return
* \c NULL.
*/
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
/**
* Determine the number of operands used by an expression
@@ -970,23 +1285,25 @@ public:
/**
- * IR instruction representing a function call
+ * HIR instruction representing a high-level function call, containing a list
+ * of parameters and returning a value in the supplied temporary.
*/
-class ir_call : public ir_rvalue {
+class ir_call : public ir_instruction {
public:
- ir_call(ir_function_signature *callee, exec_list *actual_parameters)
- : callee(callee)
+ ir_call(ir_function_signature *callee,
+ ir_dereference_variable *return_deref,
+ exec_list *actual_parameters)
+ : return_deref(return_deref), callee(callee)
{
ir_type = ir_type_call;
assert(callee->return_type != NULL);
- type = callee->return_type;
actual_parameters->move_nodes_to(& this->actual_parameters);
this->use_builtin = callee->is_builtin;
}
virtual ir_call *clone(void *mem_ctx, struct hash_table *ht) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_call *as_call()
{
@@ -1001,13 +1318,6 @@ public:
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 ralloc owner.
- */
- static ir_call *get_error_instruction(void *ctx);
-
- /**
* Get an iterator for the set of acutal parameters
*/
exec_list_iterator iterator()
@@ -1024,38 +1334,27 @@ public:
}
/**
- * Get the function signature bound to this function call
+ * Generates an inline version of the function before @ir,
+ * storing the return value in return_deref.
*/
- ir_function_signature *get_callee()
- {
- return callee;
- }
+ void generate_inline(ir_instruction *ir);
/**
- * Set the function call target
+ * Storage for the function's return value.
+ * This must be NULL if the return type is void.
*/
- void set_callee(ir_function_signature *sig);
+ ir_dereference_variable *return_deref;
/**
- * Generates an inline version of the function before @ir,
- * returning the return value of the function.
+ * The specific function signature being called.
*/
- ir_rvalue *generate_inline(ir_instruction *ir);
+ ir_function_signature *callee;
/* List of ir_rvalue of paramaters passed in this call. */
exec_list actual_parameters;
/** Should this call only bind to a built-in function? */
bool use_builtin;
-
-private:
- ir_call()
- : callee(NULL)
- {
- this->ir_type = ir_type_call;
- }
-
- ir_function_signature *callee;
};
@@ -1071,6 +1370,12 @@ protected:
{
ir_type = ir_type_unset;
}
+
+public:
+ virtual ir_jump *as_jump()
+ {
+ return this;
+ }
};
class ir_return : public ir_jump {
@@ -1129,7 +1434,6 @@ public:
{
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;
@@ -1153,9 +1457,6 @@ public:
/** Mode selector for the jump instruction. */
enum jump_mode mode;
-private:
- /** Loop containing this break instruction. */
- ir_loop *loop;
};
/**
@@ -1202,7 +1503,10 @@ enum ir_texture_opcode {
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_txf, /**< Texel fetch with explicit LOD */
+ ir_txf_ms, /**< Multisample texture fetch */
+ ir_txs, /**< Texture size */
+ ir_lod /**< Texture lod query */
};
@@ -1223,18 +1527,23 @@ enum ir_texture_opcode {
* (txl <type> <sampler> <coordinate> 0 1 ( ) <lod>)
* (txd <type> <sampler> <coordinate> 0 1 ( ) (dPdx dPdy))
* (txf <type> <sampler> <coordinate> 0 <lod>)
+ * (txf_ms
+ * <type> <sampler> <coordinate> <sample_index>)
+ * (txs <type> <sampler> <lod>)
+ * (lod <type> <sampler> <coordinate>)
*/
class ir_texture : public ir_rvalue {
public:
ir_texture(enum ir_texture_opcode op)
- : op(op), projector(NULL), shadow_comparitor(NULL), offset(NULL)
+ : op(op), sampler(NULL), coordinate(NULL), projector(NULL),
+ shadow_comparitor(NULL), offset(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 ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual void accept(ir_visitor *v)
{
@@ -1287,6 +1596,7 @@ public:
union {
ir_rvalue *lod; /**< Floating point LOD */
ir_rvalue *bias; /**< Floating point LOD bias */
+ ir_rvalue *sample_index; /**< MSAA sample index */
struct {
ir_rvalue *dPdx; /**< Partial derivative of coordinate wrt X */
ir_rvalue *dPdy; /**< Partial derivative of coordinate wrt Y */
@@ -1326,7 +1636,7 @@ public:
virtual ir_swizzle *clone(void *mem_ctx, struct hash_table *) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_swizzle *as_swizzle()
{
@@ -1345,7 +1655,7 @@ public:
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
- bool is_lvalue()
+ bool is_lvalue() const
{
return val->is_lvalue() && !mask.has_duplicates;
}
@@ -1353,7 +1663,7 @@ public:
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced();
+ virtual ir_variable *variable_referenced() const;
ir_rvalue *val;
ir_swizzle_mask mask;
@@ -1377,12 +1687,21 @@ public:
return this;
}
- bool is_lvalue();
+ bool is_lvalue() const;
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced() = 0;
+ virtual ir_variable *variable_referenced() const = 0;
+
+ /**
+ * Get the constant that is ultimately referenced by an r-value,
+ * in a constant expression evaluation context.
+ *
+ * The offset is used when the reference is to a specific column of
+ * a matrix.
+ */
+ virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const = 0;
};
@@ -1393,7 +1712,7 @@ public:
virtual ir_dereference_variable *clone(void *mem_ctx,
struct hash_table *) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_dereference_variable *as_dereference_variable()
{
@@ -1403,11 +1722,20 @@ public:
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced()
+ virtual ir_variable *variable_referenced() const
{
return this->var;
}
+ /**
+ * Get the constant that is ultimately referenced by an r-value,
+ * in a constant expression evaluation context.
+ *
+ * The offset is used when the reference is to a specific column of
+ * a matrix.
+ */
+ virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
+
virtual ir_variable *whole_variable_referenced()
{
/* ir_dereference_variable objects always dereference the entire
@@ -1442,7 +1770,7 @@ public:
virtual ir_dereference_array *clone(void *mem_ctx,
struct hash_table *) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_dereference_array *as_dereference_array()
{
@@ -1452,11 +1780,20 @@ public:
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced()
+ virtual ir_variable *variable_referenced() const
{
return this->array->variable_referenced();
}
+ /**
+ * Get the constant that is ultimately referenced by an r-value,
+ * in a constant expression evaluation context.
+ *
+ * The offset is used when the reference is to a specific column of
+ * a matrix.
+ */
+ virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
+
virtual void accept(ir_visitor *v)
{
v->visit(this);
@@ -1481,16 +1818,30 @@ public:
virtual ir_dereference_record *clone(void *mem_ctx,
struct hash_table *) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
+
+ virtual ir_dereference_record *as_dereference_record()
+ {
+ return this;
+ }
/**
* Get the variable that is ultimately referenced by an r-value
*/
- virtual ir_variable *variable_referenced()
+ virtual ir_variable *variable_referenced() const
{
return this->record->variable_referenced();
}
+ /**
+ * Get the constant that is ultimately referenced by an r-value,
+ * in a constant expression evaluation context.
+ *
+ * The offset is used when the reference is to a specific column of
+ * a matrix.
+ */
+ virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
+
virtual void accept(ir_visitor *v)
{
v->visit(this);
@@ -1546,7 +1897,7 @@ public:
virtual ir_constant *clone(void *mem_ctx, struct hash_table *) const;
- virtual ir_constant *constant_expression_value();
+ virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
virtual ir_constant *as_constant()
{
@@ -1579,16 +1930,42 @@ public:
ir_constant *get_record_field(const char *name);
/**
+ * Copy the values on another constant at a given offset.
+ *
+ * The offset is ignored for array or struct copies, it's only for
+ * scalars or vectors into vectors or matrices.
+ *
+ * With identical types on both sides and zero offset it's clone()
+ * without creating a new object.
+ */
+
+ void copy_offset(ir_constant *src, int offset);
+
+ /**
+ * Copy the values on another constant at a given offset and
+ * following an assign-like mask.
+ *
+ * The mask is ignored for scalars.
+ *
+ * Note that this function only handles what assign can handle,
+ * i.e. at most a vector as source and a column of a matrix as
+ * destination.
+ */
+
+ void copy_masked_offset(ir_constant *src, int offset, unsigned int mask);
+
+ /**
* 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
+ * ir_constant::is_negative_one, ir_constant::is_basis
*/
bool has_value(const ir_constant *) const;
virtual bool is_zero() const;
virtual bool is_one() const;
virtual bool is_negative_one() const;
+ virtual bool is_basis() const;
/**
* Value of the constant.
@@ -1683,10 +2060,21 @@ extern bool
ir_has_call(ir_instruction *ir);
extern void
-do_set_program_inouts(exec_list *instructions, struct gl_program *prog);
+do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
+ bool is_fragment_shader);
extern char *
prototype_string(const glsl_type *return_type, const char *name,
exec_list *parameters);
+extern "C" {
+#endif /* __cplusplus */
+
+extern void _mesa_print_ir(struct exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* IR_H */
diff --git a/dist/Mesa/src/glsl/ir_clone.cpp b/dist/Mesa/src/glsl/ir_clone.cpp
index 6a4ddb08e..9d4178de8 100644
--- a/dist/Mesa/src/glsl/ir_clone.cpp
+++ b/dist/Mesa/src/glsl/ir_clone.cpp
@@ -25,16 +25,17 @@
#include "main/compiler.h"
#include "ir.h"
#include "glsl_types.h"
-extern "C" {
#include "program/hash_table.h"
+
+ir_rvalue *
+ir_rvalue::clone(void *mem_ctx, struct hash_table *ht) const
+{
+ /* The only possible instantiation is the generic error value. */
+ return error_value(mem_ctx);
}
/**
* 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
@@ -48,10 +49,16 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
var->invariant = this->invariant;
var->interpolation = this->interpolation;
var->location = this->location;
+ var->index = this->index;
+ var->binding = this->binding;
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;
+ var->explicit_index = this->explicit_index;
+ var->explicit_binding = this->explicit_binding;
+ var->has_initializer = this->has_initializer;
+ var->depth_layout = this->depth_layout;
var->num_state_slots = this->num_state_slots;
if (this->state_slots) {
@@ -64,12 +71,15 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
sizeof(this->state_slots[0]) * var->num_state_slots);
}
- if (this->explicit_location)
- var->location = this->location;
-
if (this->constant_value)
var->constant_value = this->constant_value->clone(mem_ctx, ht);
+ if (this->constant_initializer)
+ var->constant_initializer =
+ this->constant_initializer->clone(mem_ctx, ht);
+
+ var->interface_type = this->interface_type;
+
if (ht) {
hash_table_insert(ht, var, (void *)const_cast<ir_variable *>(this));
}
@@ -156,8 +166,9 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
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);
+ ir_dereference_variable *new_return_ref = NULL;
+ if (this->return_deref != NULL)
+ new_return_ref = this->return_deref->clone(mem_ctx, ht);
exec_list new_parameters;
@@ -166,7 +177,7 @@ ir_call::clone(void *mem_ctx, struct hash_table *ht) const
new_parameters.push_tail(ir->clone(mem_ctx, ht));
}
- return new(mem_ctx) ir_call(this->callee, &new_parameters);
+ return new(mem_ctx) ir_call(this->callee, new_return_ref, &new_parameters);
}
ir_expression *
@@ -221,7 +232,8 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
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->coordinate)
+ 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) {
@@ -233,14 +245,19 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
switch (this->op) {
case ir_tex:
+ case ir_lod:
break;
case ir_txb:
new_tex->lod_info.bias = this->lod_info.bias->clone(mem_ctx, ht);
break;
case ir_txl:
case ir_txf:
+ case ir_txs:
new_tex->lod_info.lod = this->lod_info.lod->clone(mem_ctx, ht);
break;
+ case ir_txf_ms:
+ new_tex->lod_info.sample_index = this->lod_info.sample_index->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);
@@ -311,6 +328,7 @@ ir_function_signature::clone_prototype(void *mem_ctx, struct hash_table *ht) con
copy->is_defined = false;
copy->is_builtin = this->is_builtin;
+ copy->origin = this;
/* Clone the parameter list, but NOT the body.
*/
@@ -364,10 +382,15 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
return c;
}
- default:
+ case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_VOID:
+ case GLSL_TYPE_ERROR:
+ case GLSL_TYPE_INTERFACE:
assert(!"Should not get here.");
- return NULL;
+ break;
}
+
+ return NULL;
}
@@ -384,9 +407,9 @@ public:
* 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());
+ (ir_function_signature *) hash_table_find(this->ht, ir->callee);
if (sig != NULL)
- ir->set_callee(sig);
+ ir->callee = sig;
/* Since this may be used before function call parameters are flattened,
* the children also need to be processed.
diff --git a/dist/Mesa/src/glsl/ir_constant_expression.cpp b/dist/Mesa/src/glsl/ir_constant_expression.cpp
index 2a3084896..0a725b45b 100644
--- a/dist/Mesa/src/glsl/ir_constant_expression.cpp
+++ b/dist/Mesa/src/glsl/ir_constant_expression.cpp
@@ -38,6 +38,7 @@
#include "ir.h"
#include "ir_visitor.h"
#include "glsl_types.h"
+#include "program/hash_table.h"
static float
dot(ir_constant *op0, ir_constant *op1)
@@ -51,8 +52,329 @@ dot(ir_constant *op0, ir_constant *op1)
return result;
}
+/* This method is the only one supported by gcc. Unions in particular
+ * are iffy, and read-through-converted-pointer is killed by strict
+ * aliasing. OTOH, the compiler sees through the memcpy, so the
+ * resulting asm is reasonable.
+ */
+static float
+bitcast_u2f(unsigned int u)
+{
+ assert(sizeof(float) == sizeof(unsigned int));
+ float f;
+ memcpy(&f, &u, sizeof(f));
+ return f;
+}
+
+static unsigned int
+bitcast_f2u(float f)
+{
+ assert(sizeof(float) == sizeof(unsigned int));
+ unsigned int u;
+ memcpy(&u, &f, sizeof(f));
+ return u;
+}
+
+/**
+ * Evaluate one component of a floating-point 4x8 unpacking function.
+ */
+typedef uint8_t
+(*pack_1x8_func_t)(float);
+
+/**
+ * Evaluate one component of a floating-point 2x16 unpacking function.
+ */
+typedef uint16_t
+(*pack_1x16_func_t)(float);
+
+/**
+ * Evaluate one component of a floating-point 4x8 unpacking function.
+ */
+typedef float
+(*unpack_1x8_func_t)(uint8_t);
+
+/**
+ * Evaluate one component of a floating-point 2x16 unpacking function.
+ */
+typedef float
+(*unpack_1x16_func_t)(uint16_t);
+
+/**
+ * Evaluate a 2x16 floating-point packing function.
+ */
+static uint32_t
+pack_2x16(pack_1x16_func_t pack_1x16,
+ float x, float y)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * packSnorm2x16
+ * -------------
+ * The first component of the vector will be written to the least
+ * significant bits of the output; the last component will be written to
+ * the most significant bits.
+ *
+ * The specifications for the other packing functions contain similar
+ * language.
+ */
+ uint32_t u = 0;
+ u |= ((uint32_t) pack_1x16(x) << 0);
+ u |= ((uint32_t) pack_1x16(y) << 16);
+ return u;
+}
+
+/**
+ * Evaluate a 4x8 floating-point packing function.
+ */
+static uint32_t
+pack_4x8(pack_1x8_func_t pack_1x8,
+ float x, float y, float z, float w)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * packSnorm4x8
+ * ------------
+ * The first component of the vector will be written to the least
+ * significant bits of the output; the last component will be written to
+ * the most significant bits.
+ *
+ * The specifications for the other packing functions contain similar
+ * language.
+ */
+ uint32_t u = 0;
+ u |= ((uint32_t) pack_1x8(x) << 0);
+ u |= ((uint32_t) pack_1x8(y) << 8);
+ u |= ((uint32_t) pack_1x8(z) << 16);
+ u |= ((uint32_t) pack_1x8(w) << 24);
+ return u;
+}
+
+/**
+ * Evaluate a 2x16 floating-point unpacking function.
+ */
+static void
+unpack_2x16(unpack_1x16_func_t unpack_1x16,
+ uint32_t u,
+ float *x, float *y)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * unpackSnorm2x16
+ * ---------------
+ * The first component of the returned vector will be extracted from
+ * the least significant bits of the input; the last component will be
+ * extracted from the most significant bits.
+ *
+ * The specifications for the other unpacking functions contain similar
+ * language.
+ */
+ *x = unpack_1x16((uint16_t) (u & 0xffff));
+ *y = unpack_1x16((uint16_t) (u >> 16));
+}
+
+/**
+ * Evaluate a 4x8 floating-point unpacking function.
+ */
+static void
+unpack_4x8(unpack_1x8_func_t unpack_1x8, uint32_t u,
+ float *x, float *y, float *z, float *w)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * unpackSnorm4x8
+ * --------------
+ * The first component of the returned vector will be extracted from
+ * the least significant bits of the input; the last component will be
+ * extracted from the most significant bits.
+ *
+ * The specifications for the other unpacking functions contain similar
+ * language.
+ */
+ *x = unpack_1x8((uint8_t) (u & 0xff));
+ *y = unpack_1x8((uint8_t) (u >> 8));
+ *z = unpack_1x8((uint8_t) (u >> 16));
+ *w = unpack_1x8((uint8_t) (u >> 24));
+}
+
+/**
+ * Evaluate one component of packSnorm4x8.
+ */
+static uint8_t
+pack_snorm_1x8(float x)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * packSnorm4x8
+ * ------------
+ * The conversion for component c of v to fixed point is done as
+ * follows:
+ *
+ * packSnorm4x8: round(clamp(c, -1, +1) * 127.0)
+ *
+ * We must first cast the float to an int, because casting a negative
+ * float to a uint is undefined.
+ */
+ return (uint8_t) (int8_t)
+ _mesa_round_to_even(CLAMP(x, -1.0f, +1.0f) * 127.0f);
+}
+
+/**
+ * Evaluate one component of packSnorm2x16.
+ */
+static uint16_t
+pack_snorm_1x16(float x)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * packSnorm2x16
+ * -------------
+ * The conversion for component c of v to fixed point is done as
+ * follows:
+ *
+ * packSnorm2x16: round(clamp(c, -1, +1) * 32767.0)
+ *
+ * We must first cast the float to an int, because casting a negative
+ * float to a uint is undefined.
+ */
+ return (uint16_t) (int16_t)
+ _mesa_round_to_even(CLAMP(x, -1.0f, +1.0f) * 32767.0f);
+}
+
+/**
+ * Evaluate one component of unpackSnorm4x8.
+ */
+static float
+unpack_snorm_1x8(uint8_t u)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * unpackSnorm4x8
+ * --------------
+ * The conversion for unpacked fixed-point value f to floating point is
+ * done as follows:
+ *
+ * unpackSnorm4x8: clamp(f / 127.0, -1, +1)
+ */
+ return CLAMP((int8_t) u / 127.0f, -1.0f, +1.0f);
+}
+
+/**
+ * Evaluate one component of unpackSnorm2x16.
+ */
+static float
+unpack_snorm_1x16(uint16_t u)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * unpackSnorm2x16
+ * ---------------
+ * The conversion for unpacked fixed-point value f to floating point is
+ * done as follows:
+ *
+ * unpackSnorm2x16: clamp(f / 32767.0, -1, +1)
+ */
+ return CLAMP((int16_t) u / 32767.0f, -1.0f, +1.0f);
+}
+
+/**
+ * Evaluate one component packUnorm4x8.
+ */
+static uint8_t
+pack_unorm_1x8(float x)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * packUnorm4x8
+ * ------------
+ * The conversion for component c of v to fixed point is done as
+ * follows:
+ *
+ * packUnorm4x8: round(clamp(c, 0, +1) * 255.0)
+ */
+ return (uint8_t) _mesa_round_to_even(CLAMP(x, 0.0f, 1.0f) * 255.0f);
+}
+
+/**
+ * Evaluate one component packUnorm2x16.
+ */
+static uint16_t
+pack_unorm_1x16(float x)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * packUnorm2x16
+ * -------------
+ * The conversion for component c of v to fixed point is done as
+ * follows:
+ *
+ * packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)
+ */
+ return (uint16_t) _mesa_round_to_even(CLAMP(x, 0.0f, 1.0f) * 65535.0f);
+}
+
+/**
+ * Evaluate one component of unpackUnorm4x8.
+ */
+static float
+unpack_unorm_1x8(uint8_t u)
+{
+ /* From section 8.4 of the GLSL 4.30 spec:
+ *
+ * unpackUnorm4x8
+ * --------------
+ * The conversion for unpacked fixed-point value f to floating point is
+ * done as follows:
+ *
+ * unpackUnorm4x8: f / 255.0
+ */
+ return (float) u / 255.0f;
+}
+
+/**
+ * Evaluate one component of unpackUnorm2x16.
+ */
+static float
+unpack_unorm_1x16(uint16_t u)
+{
+ /* From section 8.4 of the GLSL ES 3.00 spec:
+ *
+ * unpackUnorm2x16
+ * ---------------
+ * The conversion for unpacked fixed-point value f to floating point is
+ * done as follows:
+ *
+ * unpackUnorm2x16: f / 65535.0
+ */
+ return (float) u / 65535.0f;
+}
+
+/**
+ * Evaluate one component of packHalf2x16.
+ */
+static uint16_t
+pack_half_1x16(float x)
+{
+ return _mesa_float_to_half(x);
+}
+
+/**
+ * Evaluate one component of unpackHalf2x16.
+ */
+static float
+unpack_half_1x16(uint16_t u)
+{
+ return _mesa_half_to_float(u);
+}
+
+ir_constant *
+ir_rvalue::constant_expression_value(struct hash_table *variable_context)
+{
+ assert(this->type->is_error());
+ return NULL;
+}
+
ir_constant *
-ir_expression::constant_expression_value()
+ir_expression::constant_expression_value(struct hash_table *variable_context)
{
if (this->type->is_error())
return NULL;
@@ -63,13 +385,23 @@ ir_expression::constant_expression_value()
memset(&data, 0, sizeof(data));
for (unsigned operand = 0; operand < this->get_num_operands(); operand++) {
- op[operand] = this->operands[operand]->constant_expression_value();
+ op[operand] = this->operands[operand]->constant_expression_value(variable_context);
if (!op[operand])
return NULL;
}
if (op[1] != NULL)
- assert(op[0]->type->base_type == op[1]->type->base_type);
+ switch (this->operation) {
+ case ir_binop_lshift:
+ case ir_binop_rshift:
+ case ir_binop_vector_extract:
+ case ir_triop_bitfield_extract:
+ break;
+
+ default:
+ assert(op[0]->type->base_type == op[1]->type->base_type);
+ break;
+ }
bool op0_scalar = op[0]->type->is_scalar();
bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar();
@@ -130,6 +462,12 @@ ir_expression::constant_expression_value()
data.i[c] = (int) op[0]->value.f[c];
}
break;
+ case ir_unop_f2u:
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.i[c] = (unsigned) 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++) {
@@ -166,7 +504,42 @@ ir_expression::constant_expression_value()
data.b[c] = op[0]->value.u[c] ? true : false;
}
break;
-
+ case ir_unop_u2i:
+ assert(op[0]->type->base_type == GLSL_TYPE_UINT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.i[c] = op[0]->value.u[c];
+ }
+ break;
+ case ir_unop_i2u:
+ assert(op[0]->type->base_type == GLSL_TYPE_INT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.u[c] = op[0]->value.i[c];
+ }
+ break;
+ case ir_unop_bitcast_i2f:
+ assert(op[0]->type->base_type == GLSL_TYPE_INT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.f[c] = bitcast_u2f(op[0]->value.i[c]);
+ }
+ break;
+ case ir_unop_bitcast_f2i:
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.i[c] = bitcast_f2u(op[0]->value.f[c]);
+ }
+ break;
+ case ir_unop_bitcast_u2f:
+ assert(op[0]->type->base_type == GLSL_TYPE_UINT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.f[c] = bitcast_u2f(op[0]->value.u[c]);
+ }
+ break;
+ case ir_unop_bitcast_f2u:
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.u[c] = bitcast_f2u(op[0]->value.f[c]);
+ }
+ break;
case ir_unop_any:
assert(op[0]->type->is_boolean());
data.b[0] = false;
@@ -183,6 +556,13 @@ ir_expression::constant_expression_value()
}
break;
+ case ir_unop_round_even:
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.f[c] = _mesa_round_to_even(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++) {
@@ -359,6 +739,70 @@ ir_expression::constant_expression_value()
}
break;
+ case ir_unop_pack_snorm_2x16:
+ assert(op[0]->type == glsl_type::vec2_type);
+ data.u[0] = pack_2x16(pack_snorm_1x16,
+ op[0]->value.f[0],
+ op[0]->value.f[1]);
+ break;
+ case ir_unop_pack_snorm_4x8:
+ assert(op[0]->type == glsl_type::vec4_type);
+ data.u[0] = pack_4x8(pack_snorm_1x8,
+ op[0]->value.f[0],
+ op[0]->value.f[1],
+ op[0]->value.f[2],
+ op[0]->value.f[3]);
+ break;
+ case ir_unop_unpack_snorm_2x16:
+ assert(op[0]->type == glsl_type::uint_type);
+ unpack_2x16(unpack_snorm_1x16,
+ op[0]->value.u[0],
+ &data.f[0], &data.f[1]);
+ break;
+ case ir_unop_unpack_snorm_4x8:
+ assert(op[0]->type == glsl_type::uint_type);
+ unpack_4x8(unpack_snorm_1x8,
+ op[0]->value.u[0],
+ &data.f[0], &data.f[1], &data.f[2], &data.f[3]);
+ break;
+ case ir_unop_pack_unorm_2x16:
+ assert(op[0]->type == glsl_type::vec2_type);
+ data.u[0] = pack_2x16(pack_unorm_1x16,
+ op[0]->value.f[0],
+ op[0]->value.f[1]);
+ break;
+ case ir_unop_pack_unorm_4x8:
+ assert(op[0]->type == glsl_type::vec4_type);
+ data.u[0] = pack_4x8(pack_unorm_1x8,
+ op[0]->value.f[0],
+ op[0]->value.f[1],
+ op[0]->value.f[2],
+ op[0]->value.f[3]);
+ break;
+ case ir_unop_unpack_unorm_2x16:
+ assert(op[0]->type == glsl_type::uint_type);
+ unpack_2x16(unpack_unorm_1x16,
+ op[0]->value.u[0],
+ &data.f[0], &data.f[1]);
+ break;
+ case ir_unop_unpack_unorm_4x8:
+ assert(op[0]->type == glsl_type::uint_type);
+ unpack_4x8(unpack_unorm_1x8,
+ op[0]->value.u[0],
+ &data.f[0], &data.f[1], &data.f[2], &data.f[3]);
+ break;
+ case ir_unop_pack_half_2x16:
+ assert(op[0]->type == glsl_type::vec2_type);
+ data.u[0] = pack_2x16(pack_half_1x16,
+ op[0]->value.f[0],
+ op[0]->value.f[1]);
+ break;
+ case ir_unop_unpack_half_2x16:
+ assert(op[0]->type == glsl_type::uint_type);
+ unpack_2x16(unpack_half_1x16,
+ op[0]->value.u[0],
+ &data.f[0], &data.f[1]);
+ break;
case ir_binop_pow:
assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
for (unsigned c = 0; c < op[0]->type->components(); c++) {
@@ -594,13 +1038,13 @@ ir_expression::constant_expression_value()
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];
+ data.b[c] = op[0]->value.u[c] < op[1]->value.u[c];
break;
case GLSL_TYPE_INT:
- data.b[0] = op[0]->value.i[0] < op[1]->value.i[0];
+ data.b[c] = op[0]->value.i[c] < op[1]->value.i[c];
break;
case GLSL_TYPE_FLOAT:
- data.b[0] = op[0]->value.f[0] < op[1]->value.f[0];
+ data.b[c] = op[0]->value.f[c] < op[1]->value.f[c];
break;
default:
assert(0);
@@ -630,13 +1074,13 @@ ir_expression::constant_expression_value()
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];
+ data.b[c] = op[0]->value.u[c] <= op[1]->value.u[c];
break;
case GLSL_TYPE_INT:
- data.b[0] = op[0]->value.i[0] <= op[1]->value.i[0];
+ data.b[c] = op[0]->value.i[c] <= op[1]->value.i[c];
break;
case GLSL_TYPE_FLOAT:
- data.b[0] = op[0]->value.f[0] <= op[1]->value.f[0];
+ data.b[c] = op[0]->value.f[c] <= op[1]->value.f[c];
break;
default:
assert(0);
@@ -648,13 +1092,13 @@ ir_expression::constant_expression_value()
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];
+ data.b[c] = op[0]->value.u[c] >= op[1]->value.u[c];
break;
case GLSL_TYPE_INT:
- data.b[0] = op[0]->value.i[0] >= op[1]->value.i[0];
+ data.b[c] = op[0]->value.i[c] >= op[1]->value.i[c];
break;
case GLSL_TYPE_FLOAT:
- data.b[0] = op[0]->value.f[0] >= op[1]->value.f[0];
+ data.b[c] = op[0]->value.f[c] >= op[1]->value.f[c];
break;
default:
assert(0);
@@ -674,13 +1118,16 @@ ir_expression::constant_expression_value()
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(0);
}
}
break;
case ir_binop_nequal:
- assert(op[0]->type != op[1]->type);
+ assert(op[0]->type == op[1]->type);
for (unsigned c = 0; c < components; c++) {
switch (op[0]->type->base_type) {
case GLSL_TYPE_UINT:
@@ -692,6 +1139,9 @@ ir_expression::constant_expression_value()
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(0);
}
@@ -788,6 +1238,29 @@ ir_expression::constant_expression_value()
}
break;
+ case ir_binop_vector_extract: {
+ const int c = CLAMP(op[1]->value.i[0], 0,
+ (int) op[0]->type->vector_elements - 1);
+
+ switch (op[0]->type->base_type) {
+ case GLSL_TYPE_UINT:
+ data.u[0] = op[0]->value.u[c];
+ break;
+ case GLSL_TYPE_INT:
+ data.i[0] = op[0]->value.i[c];
+ break;
+ case GLSL_TYPE_FLOAT:
+ data.f[0] = op[0]->value.f[c];
+ break;
+ case GLSL_TYPE_BOOL:
+ data.b[0] = op[0]->value.b[c];
+ break;
+ default:
+ assert(0);
+ }
+ break;
+ }
+
case ir_binop_bit_xor:
for (unsigned c = 0, c0 = 0, c1 = 0;
c < components;
@@ -806,6 +1279,167 @@ ir_expression::constant_expression_value()
}
break;
+ case ir_unop_bitfield_reverse:
+ /* http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious */
+ for (unsigned c = 0; c < components; c++) {
+ unsigned int v = op[0]->value.u[c]; // input bits to be reversed
+ unsigned int r = v; // r will be reversed bits of v; first get LSB of v
+ int s = sizeof(v) * CHAR_BIT - 1; // extra shift needed at end
+
+ for (v >>= 1; v; v >>= 1) {
+ r <<= 1;
+ r |= v & 1;
+ s--;
+ }
+ r <<= s; // shift when v's highest bits are zero
+
+ data.u[c] = r;
+ }
+ break;
+
+ case ir_unop_bit_count:
+ for (unsigned c = 0; c < components; c++) {
+ unsigned count = 0;
+ unsigned v = op[0]->value.u[c];
+
+ for (; v; count++) {
+ v &= v - 1;
+ }
+ data.u[c] = count;
+ }
+ break;
+
+ case ir_unop_find_msb:
+ for (unsigned c = 0; c < components; c++) {
+ int v = op[0]->value.i[c];
+
+ if (v == 0 || (op[0]->type->base_type == GLSL_TYPE_INT && v == -1))
+ data.i[c] = -1;
+ else {
+ int count = 0;
+ int top_bit = op[0]->type->base_type == GLSL_TYPE_UINT
+ ? 0 : v & (1 << 31);
+
+ while (((v & (1 << 31)) == top_bit) && count != 32) {
+ count++;
+ v <<= 1;
+ }
+
+ data.i[c] = 31 - count;
+ }
+ }
+ break;
+
+ case ir_unop_find_lsb:
+ for (unsigned c = 0; c < components; c++) {
+ if (op[0]->value.i[c] == 0)
+ data.i[c] = -1;
+ else {
+ unsigned pos = 0;
+ unsigned v = op[0]->value.u[c];
+
+ for (; !(v & 1); v >>= 1) {
+ pos++;
+ }
+ data.u[c] = pos;
+ }
+ }
+ break;
+
+ case ir_triop_bitfield_extract: {
+ int offset = op[1]->value.i[0];
+ int bits = op[2]->value.i[0];
+
+ for (unsigned c = 0; c < components; c++) {
+ if (bits == 0)
+ data.u[c] = 0;
+ else if (offset < 0 || bits < 0)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else if (offset + bits > 32)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else {
+ if (op[0]->type->base_type == GLSL_TYPE_INT) {
+ /* int so that the right shift will sign-extend. */
+ int value = op[0]->value.i[c];
+ value <<= 32 - bits - offset;
+ value >>= 32 - bits;
+ data.i[c] = value;
+ } else {
+ unsigned value = op[0]->value.u[c];
+ value <<= 32 - bits - offset;
+ value >>= 32 - bits;
+ data.u[c] = value;
+ }
+ }
+ }
+ break;
+ }
+
+ case ir_triop_lrp: {
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(op[1]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(op[2]->type->base_type == GLSL_TYPE_FLOAT);
+
+ unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1;
+ for (unsigned c = 0, c2 = 0; c < components; c2 += c2_inc, c++) {
+ data.f[c] = op[0]->value.f[c] * (1.0f - op[2]->value.f[c2]) +
+ (op[1]->value.f[c] * op[2]->value.f[c2]);
+ }
+ break;
+ }
+
+ case ir_triop_vector_insert: {
+ const unsigned idx = op[2]->value.u[0];
+
+ memcpy(&data, &op[0]->value, sizeof(data));
+
+ switch (this->type->base_type) {
+ case GLSL_TYPE_INT:
+ data.i[idx] = op[1]->value.i[0];
+ break;
+ case GLSL_TYPE_UINT:
+ data.u[idx] = op[1]->value.u[0];
+ break;
+ case GLSL_TYPE_FLOAT:
+ data.f[idx] = op[1]->value.f[0];
+ break;
+ case GLSL_TYPE_BOOL:
+ data.b[idx] = op[1]->value.b[0];
+ break;
+ default:
+ assert(!"Should not get here.");
+ break;
+ }
+ break;
+ }
+
+ case ir_quadop_bitfield_insert: {
+ int offset = op[2]->value.i[0];
+ int bits = op[3]->value.i[0];
+
+ for (unsigned c = 0; c < components; c++) {
+ if (bits == 0)
+ data.u[c] = op[0]->value.u[c];
+ else if (offset < 0 || bits < 0)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else if (offset + bits > 32)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else {
+ unsigned insert_mask = ((1 << bits) - 1) << offset;
+
+ unsigned insert = op[1]->value.u[c];
+ insert <<= offset;
+ insert &= insert_mask;
+
+ unsigned base = op[0]->value.u[c];
+ base &= ~insert_mask;
+
+ data.u[c] = base | insert;
+ }
+ }
+ break;
+ }
+
case ir_quadop_vector:
for (unsigned c = 0; c < this->type->vector_elements; c++) {
switch (this->type->base_type) {
@@ -834,7 +1468,7 @@ ir_expression::constant_expression_value()
ir_constant *
-ir_texture::constant_expression_value()
+ir_texture::constant_expression_value(struct hash_table *variable_context)
{
/* texture lookups aren't constant expressions */
return NULL;
@@ -842,9 +1476,9 @@ ir_texture::constant_expression_value()
ir_constant *
-ir_swizzle::constant_expression_value()
+ir_swizzle::constant_expression_value(struct hash_table *variable_context)
{
- ir_constant *v = this->val->constant_expression_value();
+ ir_constant *v = this->val->constant_expression_value(variable_context);
if (v != NULL) {
ir_constant_data data = { { 0 } };
@@ -870,13 +1504,33 @@ ir_swizzle::constant_expression_value()
}
+void
+ir_dereference_variable::constant_referenced(struct hash_table *variable_context,
+ ir_constant *&store, int &offset) const
+{
+ if (variable_context) {
+ store = (ir_constant *)hash_table_find(variable_context, var);
+ offset = 0;
+ } else {
+ store = NULL;
+ offset = 0;
+ }
+}
+
ir_constant *
-ir_dereference_variable::constant_expression_value()
+ir_dereference_variable::constant_expression_value(struct hash_table *variable_context)
{
/* This may occur during compile and var->type is glsl_type::error_type */
if (!var)
return NULL;
+ /* Give priority to the context hashtable, if it exists */
+ if (variable_context) {
+ ir_constant *value = (ir_constant *)hash_table_find(variable_context, var);
+ if(value)
+ return value;
+ }
+
/* The constant_value of a uniform variable is its initializer,
* not the lifetime constant value of the uniform.
*/
@@ -890,11 +1544,65 @@ ir_dereference_variable::constant_expression_value()
}
+void
+ir_dereference_array::constant_referenced(struct hash_table *variable_context,
+ ir_constant *&store, int &offset) const
+{
+ ir_constant *index_c = array_index->constant_expression_value(variable_context);
+
+ if (!index_c || !index_c->type->is_scalar() || !index_c->type->is_integer()) {
+ store = 0;
+ offset = 0;
+ return;
+ }
+
+ int index = index_c->type->base_type == GLSL_TYPE_INT ?
+ index_c->get_int_component(0) :
+ index_c->get_uint_component(0);
+
+ ir_constant *substore;
+ int suboffset;
+ const ir_dereference *deref = array->as_dereference();
+ if (!deref) {
+ store = 0;
+ offset = 0;
+ return;
+ }
+
+ deref->constant_referenced(variable_context, substore, suboffset);
+
+ if (!substore) {
+ store = 0;
+ offset = 0;
+ return;
+ }
+
+ const glsl_type *vt = array->type;
+ if (vt->is_array()) {
+ store = substore->get_array_element(index);
+ offset = 0;
+ return;
+ }
+ if (vt->is_matrix()) {
+ store = substore;
+ offset = index * vt->vector_elements;
+ return;
+ }
+ if (vt->is_vector()) {
+ store = substore;
+ offset = suboffset + index;
+ return;
+ }
+
+ store = 0;
+ offset = 0;
+}
+
ir_constant *
-ir_dereference_array::constant_expression_value()
+ir_dereference_array::constant_expression_value(struct hash_table *variable_context)
{
- ir_constant *array = this->array->constant_expression_value();
- ir_constant *idx = this->array_index->constant_expression_value();
+ ir_constant *array = this->array->constant_expression_value(variable_context);
+ ir_constant *idx = this->array_index->constant_expression_value(variable_context);
if ((array != NULL) && (idx != NULL)) {
void *ctx = ralloc_parent(this);
@@ -945,8 +1653,33 @@ ir_dereference_array::constant_expression_value()
}
+void
+ir_dereference_record::constant_referenced(struct hash_table *variable_context,
+ ir_constant *&store, int &offset) const
+{
+ ir_constant *substore;
+ int suboffset;
+ const ir_dereference *deref = record->as_dereference();
+ if (!deref) {
+ store = 0;
+ offset = 0;
+ return;
+ }
+
+ deref->constant_referenced(variable_context, substore, suboffset);
+
+ if (!substore) {
+ store = 0;
+ offset = 0;
+ return;
+ }
+
+ store = substore->get_record_field(field);
+ offset = 0;
+}
+
ir_constant *
-ir_dereference_record::constant_expression_value()
+ir_dereference_record::constant_expression_value(struct hash_table *variable_context)
{
ir_constant *v = this->record->constant_expression_value();
@@ -955,7 +1688,7 @@ ir_dereference_record::constant_expression_value()
ir_constant *
-ir_assignment::constant_expression_value()
+ir_assignment::constant_expression_value(struct hash_table *variable_context)
{
/* FINISHME: Handle CEs involving assignment (return RHS) */
return NULL;
@@ -963,410 +1696,187 @@ ir_assignment::constant_expression_value()
ir_constant *
-ir_constant::constant_expression_value()
+ir_constant::constant_expression_value(struct hash_table *variable_context)
{
return this;
}
ir_constant *
-ir_call::constant_expression_value()
+ir_call::constant_expression_value(struct hash_table *variable_context)
{
- if (this->type == glsl_type::error_type)
- return NULL;
+ return this->callee->constant_expression_value(&this->actual_parameters, variable_context);
+}
- /* 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;
+bool ir_function_signature::constant_expression_evaluate_expression_list(const struct exec_list &body,
+ struct hash_table *variable_context,
+ ir_constant **result)
+{
+ foreach_list(n, &body) {
+ ir_instruction *inst = (ir_instruction *)n;
+ switch(inst->ir_type) {
+
+ /* (declare () type symbol) */
+ case ir_type_variable: {
+ ir_variable *var = inst->as_variable();
+ hash_table_insert(variable_context, ir_constant::zero(this, var->type), var);
+ break;
+ }
- /* 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;
+ /* (assign [condition] (write-mask) (ref) (value)) */
+ case ir_type_assignment: {
+ ir_assignment *asg = inst->as_assignment();
+ if (asg->condition) {
+ ir_constant *cond = asg->condition->constant_expression_value(variable_context);
+ if (!cond)
+ return false;
+ if (!cond->get_bool_component(0))
+ break;
+ }
- op[num_parameters] = constant;
+ ir_constant *store = NULL;
+ int offset = 0;
+ asg->lhs->constant_referenced(variable_context, store, offset);
- assert(num_parameters < 3);
- num_parameters++;
- }
+ if (!store)
+ return false;
- /* 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 = ralloc_parent(this);
- ir_expression *expr = NULL;
+ ir_constant *value = asg->rhs->constant_expression_value(variable_context);
- ir_constant_data data;
- memset(&data, 0, sizeof(data));
+ if (!value)
+ return false;
- 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]);
+ store->copy_masked_offset(value, offset, asg->write_mask);
+ break;
}
- } 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]));
+ /* (return (expression)) */
+ case ir_type_return:
+ assert (result);
+ *result = inst->as_return()->value->constant_expression_value(variable_context);
+ return *result != NULL;
- if (length == 0)
- return ir_constant::zero(mem_ctx, this->type);
+ /* (call name (ref) (params))*/
+ case ir_type_call: {
+ ir_call *call = inst->as_call();
- 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];
- }
+ /* Just say no to void functions in constant expressions. We
+ * don't need them at that point.
+ */
+
+ if (!call->return_deref)
+ return false;
+
+ ir_constant *store = NULL;
+ int offset = 0;
+ call->return_deref->constant_referenced(variable_context, store, offset);
+
+ if (!store)
+ return false;
+
+ ir_constant *value = call->constant_expression_value(variable_context);
+
+ if(!value)
+ return false;
+
+ store->copy_offset(value, offset);
+ break;
}
- } 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);
- }
+
+ /* (if condition (then-instructions) (else-instructions)) */
+ case ir_type_if: {
+ ir_if *iif = inst->as_if();
+
+ ir_constant *cond = iif->condition->constant_expression_value(variable_context);
+ if (!cond || !cond->type->is_boolean())
+ return false;
+
+ exec_list &branch = cond->get_bool_component(0) ? iif->then_instructions : iif->else_instructions;
+
+ *result = NULL;
+ if (!constant_expression_evaluate_expression_list(branch, variable_context, result))
+ return false;
+
+ /* If there was a return in the branch chosen, drop out now. */
+ if (*result)
+ return true;
+
+ break;
}
- } 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];
- }
+
+ /* Every other expression type, we drop out. */
+ default:
+ return false;
}
- } else {
- /* Unsupported builtin - some are not allowed in constant expressions. */
+ }
+
+ /* Reaching the end of the block is not an error condition */
+ if (result)
+ *result = NULL;
+
+ return true;
+}
+
+ir_constant *
+ir_function_signature::constant_expression_value(exec_list *actual_parameters, struct hash_table *variable_context)
+{
+ const glsl_type *type = this->return_type;
+ if (type == glsl_type::void_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->is_builtin)
+ return NULL;
+
+ /*
+ * Of the builtin functions, only the texture lookups and the noise
+ * ones must not be used in constant expressions. They all include
+ * specific opcodes so they don't need to be special-cased at this
+ * point.
+ */
+
+ /* Initialize the table of dereferencable names with the function
+ * parameters. Verify their const-ness on the way.
+ *
+ * We expect the correctness of the number of parameters to have
+ * been checked earlier.
+ */
+ hash_table *deref_hash = hash_table_ctor(8, hash_table_pointer_hash,
+ hash_table_pointer_compare);
+
+ /* If "origin" is non-NULL, then the function body is there. So we
+ * have to use the variable objects from the object with the body,
+ * but the parameter instanciation on the current object.
+ */
+ const exec_node *parameter_info = origin ? origin->parameters.head : parameters.head;
+
+ foreach_list(n, actual_parameters) {
+ ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value(variable_context);
+ if (constant == NULL) {
+ hash_table_dtor(deref_hash);
+ return NULL;
+ }
+
+
+ ir_variable *var = (ir_variable *)parameter_info;
+ hash_table_insert(deref_hash, constant, var);
+
+ parameter_info = parameter_info->next;
}
- if (expr != NULL)
- return expr->constant_expression_value();
+ ir_constant *result = NULL;
- return new(mem_ctx) ir_constant(this->type, &data);
+ /* Now run the builtin function until something non-constant
+ * happens or we get the result.
+ */
+ if (constant_expression_evaluate_expression_list(origin ? origin->body : body, deref_hash, &result) && result)
+ result = result->clone(ralloc_parent(this), NULL);
+
+ hash_table_dtor(deref_hash);
+
+ return result;
}
diff --git a/dist/Mesa/src/glsl/ir_function.cpp b/dist/Mesa/src/glsl/ir_function.cpp
index dd63e3078..fe4209c77 100644
--- a/dist/Mesa/src/glsl/ir_function.cpp
+++ b/dist/Mesa/src/glsl/ir_function.cpp
@@ -24,17 +24,20 @@
#include "glsl_types.h"
#include "ir.h"
+typedef enum {
+ PARAMETER_LIST_NO_MATCH,
+ PARAMETER_LIST_EXACT_MATCH,
+ PARAMETER_LIST_INEXACT_MATCH /*< Match requires implicit conversion. */
+} parameter_list_match_t;
+
/**
* \brief Check if two parameter lists match.
*
* \param list_a Parameters of the function definition.
* \param list_b Actual parameters passed to the function.
- * \return If an exact match, return 0.
- * If an inexact match requiring implicit conversion, return 1.
- * If not a match, return -1.
* \see matching_signature()
*/
-static int
+static parameter_list_match_t
parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
{
const exec_node *node_a = list_a->head;
@@ -52,11 +55,11 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
* do not match.
*/
if (node_b->is_tail_sentinel())
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
const ir_variable *const param = (ir_variable *) node_a;
- const ir_instruction *const actual = (ir_instruction *) node_b;
+ const ir_rvalue *const actual = (ir_rvalue *) node_b;
if (param->type == actual->type)
continue;
@@ -72,29 +75,29 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
* as uniform.
*/
assert(0);
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
case ir_var_const_in:
- case ir_var_in:
+ case ir_var_function_in:
if (!actual->type->can_implicitly_convert_to(param->type))
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
break;
- case ir_var_out:
+ case ir_var_function_out:
if (!param->type->can_implicitly_convert_to(actual->type))
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
break;
- case ir_var_inout:
+ case ir_var_function_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.
*/
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
default:
assert(false);
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
}
}
@@ -103,18 +106,26 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
* match.
*/
if (!node_b->is_tail_sentinel())
- return -1;
+ return PARAMETER_LIST_NO_MATCH;
if (inexact_match)
- return 1;
+ return PARAMETER_LIST_INEXACT_MATCH;
else
- return 0;
+ return PARAMETER_LIST_EXACT_MATCH;
}
ir_function_signature *
ir_function::matching_signature(const exec_list *actual_parameters)
{
+ bool is_exact;
+ return matching_signature(actual_parameters, &is_exact);
+}
+
+ir_function_signature *
+ir_function::matching_signature(const exec_list *actual_parameters,
+ bool *is_exact)
+{
ir_function_signature *match = NULL;
bool multiple_inexact_matches = false;
@@ -132,18 +143,21 @@ ir_function::matching_signature(const exec_list *actual_parameters)
ir_function_signature *const sig =
(ir_function_signature *) iter.get();
- const int score = parameter_lists_match(& sig->parameters,
- actual_parameters);
-
- /* If we found an exact match, simply return it */
- if (score == 0)
+ switch (parameter_lists_match(& sig->parameters, actual_parameters)) {
+ case PARAMETER_LIST_EXACT_MATCH:
+ *is_exact = true;
return sig;
-
- if (score > 0) {
+ case PARAMETER_LIST_INEXACT_MATCH:
if (match == NULL)
match = sig;
else
multiple_inexact_matches = true;
+ continue;
+ case PARAMETER_LIST_NO_MATCH:
+ continue;
+ default:
+ assert(false);
+ return NULL;
}
}
@@ -154,6 +168,8 @@ ir_function::matching_signature(const exec_list *actual_parameters)
* FINISHME: a "no matching signature" error; it should report that the
* FINISHME: call is ambiguous. But reporting errors from here is hard.
*/
+ *is_exact = false;
+
if (multiple_inexact_matches)
return NULL;
diff --git a/dist/Mesa/src/glsl/ir_function_detect_recursion.cpp b/dist/Mesa/src/glsl/ir_function_detect_recursion.cpp
index 8f805bf1b..4b39f9724 100644
--- a/dist/Mesa/src/glsl/ir_function_detect_recursion.cpp
+++ b/dist/Mesa/src/glsl/ir_function_detect_recursion.cpp
@@ -173,6 +173,7 @@ public:
has_recursion_visitor()
: current(NULL)
{
+ progress = false;
this->mem_ctx = ralloc_context(NULL);
this->function_hash = hash_table_ctor(0, hash_table_pointer_hash,
hash_table_pointer_compare);
@@ -217,7 +218,7 @@ public:
if (this->current == NULL)
return visit_continue;
- function *const target = this->get_function(call->get_callee());
+ function *const target = this->get_function(call->callee);
/* Create a link from the caller to the callee.
*/
@@ -289,6 +290,8 @@ emit_errors_unlinked(const void *key, void *data, void *closure)
function *f = (function *) data;
YYLTYPE loc;
+ (void) key;
+
char *proto = prototype_string(f->sig->return_type,
f->sig->function_name(),
&f->sig->parameters);
@@ -308,6 +311,8 @@ emit_errors_linked(const void *key, void *data, void *closure)
(struct gl_shader_program *) closure;
function *f = (function *) data;
+ (void) key;
+
char *proto = prototype_string(f->sig->return_type,
f->sig->function_name(),
&f->sig->parameters);
diff --git a/dist/Mesa/src/glsl/ir_hierarchical_visitor.h b/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
index bba046db4..1988ad091 100644
--- a/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
+++ b/dist/Mesa/src/glsl/ir_hierarchical_visitor.h
@@ -36,6 +36,7 @@ enum ir_visitor_status {
};
+#ifdef __cplusplus
/**
* Base class of hierarchical visitors of IR instruction trees
*
@@ -82,6 +83,7 @@ public:
* \name Visit methods for leaf-node classes
*/
/*@{*/
+ virtual ir_visitor_status visit(class ir_rvalue *);
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 *);
@@ -180,5 +182,6 @@ void visit_tree(ir_instruction *ir,
ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l,
bool statement_list = true);
+#endif /* __cplusplus */
#endif /* IR_HIERARCHICAL_VISITOR_H */
diff --git a/dist/Mesa/src/glsl/ir_hv_accept.cpp b/dist/Mesa/src/glsl/ir_hv_accept.cpp
index 8bb578864..559b71af3 100644
--- a/dist/Mesa/src/glsl/ir_hv_accept.cpp
+++ b/dist/Mesa/src/glsl/ir_hv_accept.cpp
@@ -66,6 +66,13 @@ visit_list_elements(ir_hierarchical_visitor *v, exec_list *l,
ir_visitor_status
+ir_rvalue::accept(ir_hierarchical_visitor *v)
+{
+ return v->visit(this);
+}
+
+
+ir_visitor_status
ir_variable::accept(ir_hierarchical_visitor *v)
{
return v->visit(this);
@@ -180,9 +187,11 @@ ir_texture::accept(ir_hierarchical_visitor *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->coordinate) {
+ 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);
@@ -204,6 +213,7 @@ ir_texture::accept(ir_hierarchical_visitor *v)
switch (this->op) {
case ir_tex:
+ case ir_lod:
break;
case ir_txb:
s = this->lod_info.bias->accept(v);
@@ -212,10 +222,16 @@ ir_texture::accept(ir_hierarchical_visitor *v)
break;
case ir_txl:
case ir_txf:
+ case ir_txs:
s = this->lod_info.lod->accept(v);
if (s != visit_continue)
return (s == visit_continue_with_parent) ? visit_continue : s;
break;
+ case ir_txf_ms:
+ s = this->lod_info.sample_index->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)
@@ -323,6 +339,14 @@ ir_call::accept(ir_hierarchical_visitor *v)
if (s != visit_continue)
return (s == visit_continue_with_parent) ? visit_continue : s;
+ if (this->return_deref != NULL) {
+ v->in_assignee = true;
+ s = this->return_deref->accept(v);
+ v->in_assignee = false;
+ if (s != visit_continue)
+ return (s == visit_continue_with_parent) ? visit_continue : s;
+ }
+
s = visit_list_elements(v, &this->actual_parameters, false);
if (s == visit_stop)
return s;
diff --git a/dist/Mesa/src/glsl/ir_optimization.h b/dist/Mesa/src/glsl/ir_optimization.h
index dd265673c..d9d90ddab 100644
--- a/dist/Mesa/src/glsl/ir_optimization.h
+++ b/dist/Mesa/src/glsl/ir_optimization.h
@@ -29,14 +29,45 @@
*/
/* 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
+#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
+#define INT_DIV_TO_MUL_RCP 0x40
+#define LRP_TO_ARITH 0x80
+#define BITFIELD_INSERT_TO_BFM_BFI 0x100
-bool do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations);
+/**
+ * \see class lower_packing_builtins_visitor
+ */
+enum lower_packing_builtins_op {
+ LOWER_PACK_UNPACK_NONE = 0x0000,
+
+ LOWER_PACK_SNORM_2x16 = 0x0001,
+ LOWER_UNPACK_SNORM_2x16 = 0x0002,
+
+ LOWER_PACK_UNORM_2x16 = 0x0004,
+ LOWER_UNPACK_UNORM_2x16 = 0x0008,
+
+ LOWER_PACK_HALF_2x16 = 0x0010,
+ LOWER_UNPACK_HALF_2x16 = 0x0020,
+
+ LOWER_PACK_HALF_2x16_TO_SPLIT = 0x0040,
+ LOWER_UNPACK_HALF_2x16_TO_SPLIT = 0x0080,
+
+ LOWER_PACK_SNORM_4x8 = 0x0100,
+ LOWER_UNPACK_SNORM_4x8 = 0x0200,
+
+ LOWER_PACK_UNORM_4x8 = 0x0400,
+ LOWER_UNPACK_UNORM_4x8 = 0x0800
+};
+
+bool do_common_optimization(exec_list *ir, bool linked,
+ bool uniform_locations_assigned,
+ unsigned max_unroll_iterations,
+ const struct gl_shader_compiler_options *options);
bool do_algebraic(exec_list *instructions);
bool do_constant_folding(exec_list *instructions);
@@ -45,29 +76,48 @@ bool do_constant_variable_unlinked(exec_list *instructions);
bool do_copy_propagation(exec_list *instructions);
bool do_copy_propagation_elements(exec_list *instructions);
bool do_constant_propagation(exec_list *instructions);
-bool do_dead_code(exec_list *instructions);
+void do_dead_builtin_varyings(struct gl_context *ctx,
+ gl_shader *producer, gl_shader *consumer,
+ unsigned num_tfeedback_decls,
+ class tfeedback_decl *tfeedback_decls);
+bool do_dead_code(exec_list *instructions, bool uniform_locations_assigned);
bool do_dead_code_local(exec_list *instructions);
bool do_dead_code_unlinked(exec_list *instructions);
bool do_dead_functions(exec_list *instructions);
+bool opt_flip_matrices(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 opt_flatten_nested_if_blocks(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);
+void lower_discard_flow(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 lower_clip_distance(gl_shader *shader);
+void lower_output_reads(exec_list *instructions);
+bool lower_packing_builtins(exec_list *instructions, int op_mask);
+void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions);
+void lower_packed_varyings(void *mem_ctx, unsigned location_base,
+ unsigned locations_used, ir_variable_mode mode,
+ gl_shader *shader);
+bool lower_vector_insert(exec_list *instructions, bool lower_nonconstant_index);
+void lower_named_interface_blocks(void *mem_ctx, gl_shader *shader);
bool optimize_redundant_jumps(exec_list *instructions);
+bool optimize_split_arrays(exec_list *instructions, bool linked);
+
+ir_rvalue *
+compare_index_block(exec_list *instructions, ir_variable *index,
+ unsigned base, unsigned components, void *mem_ctx);
diff --git a/dist/Mesa/src/glsl/ir_print_visitor.cpp b/dist/Mesa/src/glsl/ir_print_visitor.cpp
index 518910bd1..ca973a5f3 100644
--- a/dist/Mesa/src/glsl/ir_print_visitor.cpp
+++ b/dist/Mesa/src/glsl/ir_print_visitor.cpp
@@ -24,10 +24,8 @@
#include "ir_print_visitor.h"
#include "glsl_types.h"
#include "glsl_parser_extras.h"
-
-extern "C" {
+#include "main/macros.h"
#include "program/hash_table.h"
-}
static void print_type(const glsl_type *t);
@@ -40,6 +38,7 @@ ir_instruction::print(void) const
deconsted->accept(&v);
}
+extern "C" {
void
_mesa_print_ir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
@@ -71,6 +70,8 @@ _mesa_print_ir(exec_list *instructions,
printf("\n)");
}
+} /* extern "C" */
+
ir_print_visitor::ir_print_visitor()
{
indentation = 0;
@@ -138,6 +139,10 @@ print_type(const glsl_type *t)
}
}
+void ir_print_visitor::visit(ir_rvalue *ir)
+{
+ printf("error");
+}
void ir_print_visitor::visit(ir_variable *ir)
{
@@ -145,9 +150,12 @@ void ir_print_visitor::visit(ir_variable *ir)
const char *const cent = (ir->centroid) ? "centroid " : "";
const char *const inv = (ir->invariant) ? "invariant " : "";
- const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ",
+ const char *const mode[] = { "", "uniform ", "shader_in ", "shader_out ",
+ "in ", "out ", "inout ",
"const_in ", "sys ", "temporary " };
- const char *const interp[] = { "", "flat", "noperspective" };
+ STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
+ const char *const interp[] = { "", "smooth", "flat", "noperspective" };
+ STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT);
printf("(%s%s%s%s) ",
cent, inv, mode[ir->mode], interp[ir->interpolation]);
@@ -244,19 +252,21 @@ void ir_print_visitor::visit(ir_texture *ir)
ir->sampler->accept(this);
printf(" ");
- ir->coordinate->accept(this);
+ if (ir->op != ir_txs) {
+ ir->coordinate->accept(this);
- printf(" ");
+ printf(" ");
- if (ir->offset != NULL) {
- ir->offset->accept(this);
- } else {
- printf("0");
- }
+ if (ir->offset != NULL) {
+ ir->offset->accept(this);
+ } else {
+ printf("0");
+ }
- printf(" ");
+ printf(" ");
+ }
- if (ir->op != ir_txf) {
+ if (ir->op != ir_txf && ir->op != ir_txf_ms && ir->op != ir_txs) {
if (ir->projector)
ir->projector->accept(this);
else
@@ -274,14 +284,19 @@ void ir_print_visitor::visit(ir_texture *ir)
switch (ir->op)
{
case ir_tex:
+ case ir_lod:
break;
case ir_txb:
ir->lod_info.bias->accept(this);
break;
case ir_txl:
case ir_txf:
+ case ir_txs:
ir->lod_info.lod->accept(this);
break;
+ case ir_txf_ms:
+ ir->lod_info.sample_index->accept(this);
+ break;
case ir_txd:
printf("(");
ir->lod_info.grad.dPdx->accept(this);
@@ -368,8 +383,6 @@ void ir_print_visitor::visit(ir_assignment *ir)
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(" (");
@@ -390,7 +403,7 @@ void ir_print_visitor::visit(ir_constant *ir)
for (unsigned i = 0; i < ir->type->components(); i++) {
if (i != 0)
printf(" ");
- switch (base_type->base_type) {
+ switch (ir->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;
@@ -406,7 +419,10 @@ void ir_print_visitor::visit(ir_constant *ir)
void
ir_print_visitor::visit(ir_call *ir)
{
- printf("(call %s (", ir->callee_name());
+ printf("(call %s ", ir->callee_name());
+ if (ir->return_deref)
+ ir->return_deref->accept(this);
+ printf(" (");
foreach_iter(exec_list_iterator, iter, *ir) {
ir_instruction *const inst = (ir_instruction *) iter.get();
diff --git a/dist/Mesa/src/glsl/ir_print_visitor.h b/dist/Mesa/src/glsl/ir_print_visitor.h
index c7136f11a..a84056d16 100644
--- a/dist/Mesa/src/glsl/ir_print_visitor.h
+++ b/dist/Mesa/src/glsl/ir_print_visitor.h
@@ -33,9 +33,6 @@ extern "C" {
#include "program/symbol_table.h"
}
-extern void _mesa_print_ir(exec_list *instructions,
- struct _mesa_glsl_parse_state *state);
-
/**
* Abstract base class of visitors of IR instruction trees
*/
@@ -54,6 +51,7 @@ public:
* the hierarchy should not have \c visit methods.
*/
/*@{*/
+ virtual void visit(ir_rvalue *);
virtual void visit(ir_variable *);
virtual void visit(ir_function_signature *);
virtual void visit(ir_function *);
diff --git a/dist/Mesa/src/glsl/ir_reader.cpp b/dist/Mesa/src/glsl/ir_reader.cpp
index 30df257be..51534ca7c 100644
--- a/dist/Mesa/src/glsl/ir_reader.cpp
+++ b/dist/Mesa/src/glsl/ir_reader.cpp
@@ -51,16 +51,17 @@ private:
ir_variable *read_declaration(s_expression *);
ir_if *read_if(s_expression *, ir_loop *);
ir_loop *read_loop(s_expression *);
+ ir_call *read_call(s_expression *);
ir_return *read_return(s_expression *);
ir_rvalue *read_rvalue(s_expression *);
ir_assignment *read_assignment(s_expression *);
ir_expression *read_expression(s_expression *);
- ir_call *read_call(s_expression *);
ir_swizzle *read_swizzle(s_expression *);
ir_constant *read_constant(s_expression *);
ir_texture *read_texture(s_expression *);
ir_dereference *read_dereference(s_expression *);
+ ir_dereference_variable *read_var_ref(s_expression *);
};
ir_reader::ir_reader(_mesa_glsl_parse_state *state) : state(state)
@@ -79,7 +80,8 @@ _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
void
ir_reader::read(exec_list *instructions, const char *src, bool scan_for_protos)
{
- s_expression *expr = s_expression::read_expression(mem_ctx, src);
+ void *sx_mem_ctx = ralloc_context(NULL);
+ s_expression *expr = s_expression::read_expression(sx_mem_ctx, src);
if (expr == NULL) {
ir_read_error(NULL, "couldn't parse S-Expression.");
return;
@@ -92,7 +94,7 @@ ir_reader::read(exec_list *instructions, const char *src, bool scan_for_protos)
}
read_instructions(instructions, expr, NULL);
- ralloc_free(expr);
+ ralloc_free(sx_mem_ctx);
if (debug)
validate_ir_tree(instructions);
@@ -347,6 +349,8 @@ ir_reader::read_instruction(s_expression *expr, ir_loop *loop_ctx)
inst = read_if(list, loop_ctx);
} else if (strcmp(tag->value(), "loop") == 0) {
inst = read_loop(list);
+ } else if (strcmp(tag->value(), "call") == 0) {
+ inst = read_call(list);
} else if (strcmp(tag->value(), "return") == 0) {
inst = read_return(list);
} else if (strcmp(tag->value(), "function") == 0) {
@@ -396,19 +400,25 @@ ir_reader::read_declaration(s_expression *expr)
} else if (strcmp(qualifier->value(), "auto") == 0) {
var->mode = ir_var_auto;
} else if (strcmp(qualifier->value(), "in") == 0) {
- var->mode = ir_var_in;
+ var->mode = ir_var_function_in;
+ } else if (strcmp(qualifier->value(), "shader_in") == 0) {
+ var->mode = ir_var_shader_in;
} else if (strcmp(qualifier->value(), "const_in") == 0) {
var->mode = ir_var_const_in;
} else if (strcmp(qualifier->value(), "out") == 0) {
- var->mode = ir_var_out;
+ var->mode = ir_var_function_out;
+ } else if (strcmp(qualifier->value(), "shader_out") == 0) {
+ var->mode = ir_var_shader_out;
} else if (strcmp(qualifier->value(), "inout") == 0) {
- var->mode = ir_var_inout;
+ var->mode = ir_var_function_inout;
+ } else if (strcmp(qualifier->value(), "temporary") == 0) {
+ var->mode = ir_var_temporary;
} else if (strcmp(qualifier->value(), "smooth") == 0) {
- var->interpolation = ir_var_smooth;
+ var->interpolation = INTERP_QUALIFIER_SMOOTH;
} else if (strcmp(qualifier->value(), "flat") == 0) {
- var->interpolation = ir_var_flat;
+ var->interpolation = INTERP_QUALIFIER_FLAT;
} else if (strcmp(qualifier->value(), "noperspective") == 0) {
- var->interpolation = ir_var_noperspective;
+ var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
} else {
ir_read_error(expr, "unknown qualifier: %s", qualifier->value());
return NULL;
@@ -482,19 +492,21 @@ ir_reader::read_return(s_expression *expr)
{
s_expression *s_retval;
- s_pattern pat[] = { "return", s_retval};
- if (!MATCH(expr, pat)) {
- ir_read_error(expr, "expected (return <rvalue>)");
- return NULL;
- }
-
- ir_rvalue *retval = read_rvalue(s_retval);
- if (retval == NULL) {
- ir_read_error(NULL, "when reading return value");
+ s_pattern return_value_pat[] = { "return", s_retval};
+ s_pattern return_void_pat[] = { "return" };
+ if (MATCH(expr, return_value_pat)) {
+ ir_rvalue *retval = read_rvalue(s_retval);
+ if (retval == NULL) {
+ ir_read_error(NULL, "when reading return value");
+ return NULL;
+ }
+ return new(mem_ctx) ir_return(retval);
+ } else if (MATCH(expr, return_void_pat)) {
+ return new(mem_ctx) ir_return;
+ } else {
+ ir_read_error(expr, "expected (return <rvalue>) or (return)");
return NULL;
}
-
- return new(mem_ctx) ir_return(retval);
}
@@ -518,8 +530,6 @@ ir_reader::read_rvalue(s_expression *expr)
rvalue = read_swizzle(list);
} else if (strcmp(tag->value(), "expression") == 0) {
rvalue = read_expression(list);
- } else if (strcmp(tag->value(), "call") == 0) {
- rvalue = read_call(list);
} else if (strcmp(tag->value(), "constant") == 0) {
rvalue = read_constant(list);
} else {
@@ -607,10 +617,20 @@ ir_reader::read_call(s_expression *expr)
{
s_symbol *name;
s_list *params;
+ s_list *s_return = NULL;
- s_pattern pat[] = { "call", name, params };
- if (!MATCH(expr, pat)) {
- ir_read_error(expr, "expected (call <name> (<param> ...))");
+ ir_dereference_variable *return_deref = NULL;
+
+ s_pattern void_pat[] = { "call", name, params };
+ s_pattern non_void_pat[] = { "call", name, s_return, params };
+ if (MATCH(expr, non_void_pat)) {
+ return_deref = read_var_ref(s_return);
+ if (return_deref == NULL) {
+ ir_read_error(s_return, "when reading a call's return storage");
+ return NULL;
+ }
+ } else if (!MATCH(expr, void_pat)) {
+ ir_read_error(expr, "expected (call <name> [<deref>] (<param> ...))");
return NULL;
}
@@ -640,7 +660,15 @@ ir_reader::read_call(s_expression *expr)
return NULL;
}
- return new(mem_ctx) ir_call(callee, &parameters);
+ if (callee->return_type == glsl_type::void_type && return_deref) {
+ ir_read_error(expr, "call has return value storage but void type");
+ return NULL;
+ } else if (callee->return_type != glsl_type::void_type && !return_deref) {
+ ir_read_error(expr, "call has non-void type but no return value storage");
+ return NULL;
+ }
+
+ return new(mem_ctx) ir_call(callee, return_deref, &parameters);
}
ir_expression *
@@ -648,15 +676,18 @@ ir_reader::read_expression(s_expression *expr)
{
s_expression *s_type;
s_symbol *s_op;
- s_expression *s_arg1;
+ s_expression *s_arg[4] = {NULL};
- s_pattern pat[] = { "expression", s_type, s_op, s_arg1 };
+ s_pattern pat[] = { "expression", s_type, s_op, s_arg[0] };
if (!PARTIAL_MATCH(expr, pat)) {
ir_read_error(expr, "expected (expression <type> <operator> "
- "<operand> [<operand>])");
+ "<operand> [<operand>] [<operand>] [<operand>])");
return NULL;
}
- s_expression *s_arg2 = (s_expression *) s_arg1->next; // may be tail sentinel
+ s_arg[1] = (s_expression *) s_arg[0]->next; // may be tail sentinel
+ s_arg[2] = (s_expression *) s_arg[1]->next; // may be tail sentinel or NULL
+ if (s_arg[2])
+ s_arg[3] = (s_expression *) s_arg[2]->next; // may be tail sentinel or NULL
const glsl_type *type = read_type(s_type);
if (type == NULL)
@@ -669,35 +700,27 @@ ir_reader::read_expression(s_expression *expr)
return NULL;
}
- unsigned num_operands = ir_expression::get_num_operands(op);
- if (num_operands == 1 && !s_arg1->next->is_tail_sentinel()) {
- ir_read_error(expr, "expected (expression <type> %s <operand>)",
- s_op->value());
+ int num_operands = -3; /* skip "expression" <type> <operation> */
+ foreach_list(n, &((s_list *) expr)->subexpressions)
+ ++num_operands;
+
+ int expected_operands = ir_expression::get_num_operands(op);
+ if (num_operands != expected_operands) {
+ ir_read_error(expr, "found %d expression operands, expected %d",
+ num_operands, expected_operands);
return NULL;
}
- ir_rvalue *arg1 = read_rvalue(s_arg1);
- ir_rvalue *arg2 = NULL;
- if (arg1 == NULL) {
- ir_read_error(NULL, "when reading first operand of %s", s_op->value());
- return NULL;
- }
-
- if (num_operands == 2) {
- if (s_arg2->is_tail_sentinel() || !s_arg2->next->is_tail_sentinel()) {
- ir_read_error(expr, "expected (expression <type> %s <operand> "
- "<operand>)", s_op->value());
- return NULL;
- }
- arg2 = read_rvalue(s_arg2);
- if (arg2 == NULL) {
- ir_read_error(NULL, "when reading second operand of %s",
- s_op->value());
- return NULL;
+ ir_rvalue *arg[4] = {NULL};
+ for (int i = 0; i < num_operands; i++) {
+ arg[i] = read_rvalue(s_arg[i]);
+ if (arg[i] == NULL) {
+ ir_read_error(NULL, "when reading operand #%d of %s", i, s_op->value());
+ return NULL;
}
}
- return new(mem_ctx) ir_expression(op, type, arg1, arg2);
+ return new(mem_ctx) ir_expression(op, type, arg[0], arg[1], arg[2], arg[3]);
}
ir_swizzle *
@@ -770,12 +793,10 @@ ir_reader::read_constant(s_expression *expr)
return new(mem_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;
+ unsigned k = 0;
foreach_iter(exec_list_iterator, it, values->subexpressions) {
if (k >= 16) {
ir_read_error(values, "expected at most 16 numbers");
@@ -784,7 +805,7 @@ ir_reader::read_constant(s_expression *expr)
s_expression *expr = (s_expression*) it.get();
- if (base_type->base_type == GLSL_TYPE_FLOAT) {
+ if (type->base_type == GLSL_TYPE_FLOAT) {
s_number *value = SX_AS_NUMBER(expr);
if (value == NULL) {
ir_read_error(values, "expected numbers");
@@ -798,7 +819,7 @@ ir_reader::read_constant(s_expression *expr)
return NULL;
}
- switch (base_type->base_type) {
+ switch (type->base_type) {
case GLSL_TYPE_UINT: {
data.u[k] = value->value();
break;
@@ -818,21 +839,20 @@ ir_reader::read_constant(s_expression *expr)
}
++k;
}
+ if (k != type->components()) {
+ ir_read_error(values, "expected %u constant values, found %u",
+ type->components(), k);
+ return NULL;
+ }
return new(mem_ctx) ir_constant(type, &data);
}
-ir_dereference *
-ir_reader::read_dereference(s_expression *expr)
+ir_dereference_variable *
+ir_reader::read_var_ref(s_expression *expr)
{
s_symbol *s_var;
- s_expression *s_subject;
- s_expression *s_index;
- s_symbol *s_field;
-
s_pattern var_pat[] = { "var_ref", s_var };
- s_pattern array_pat[] = { "array_ref", s_subject, s_index };
- s_pattern record_pat[] = { "record_ref", s_subject, s_field };
if (MATCH(expr, var_pat)) {
ir_variable *var = state->symbols->get_variable(s_var->value());
@@ -841,6 +861,23 @@ ir_reader::read_dereference(s_expression *expr)
return NULL;
}
return new(mem_ctx) ir_dereference_variable(var);
+ }
+ return NULL;
+}
+
+ir_dereference *
+ir_reader::read_dereference(s_expression *expr)
+{
+ s_expression *s_subject;
+ s_expression *s_index;
+ s_symbol *s_field;
+
+ s_pattern array_pat[] = { "array_ref", s_subject, s_index };
+ s_pattern record_pat[] = { "record_ref", s_subject, s_field };
+
+ ir_dereference_variable *var_ref = read_var_ref(expr);
+ if (var_ref != NULL) {
+ return var_ref;
} else if (MATCH(expr, array_pat)) {
ir_rvalue *subject = read_rvalue(s_subject);
if (subject == NULL) {
@@ -849,7 +886,7 @@ ir_reader::read_dereference(s_expression *expr)
}
ir_rvalue *idx = read_rvalue(s_index);
- if (subject == NULL) {
+ if (idx == NULL) {
ir_read_error(NULL, "when reading the index of an array_ref");
return NULL;
}
@@ -876,26 +913,39 @@ ir_reader::read_texture(s_expression *expr)
s_expression *s_proj = NULL;
s_list *s_shadow = NULL;
s_expression *s_lod = NULL;
+ s_expression *s_sample_index = NULL;
ir_texture_opcode op = ir_tex; /* silence warning */
s_pattern tex_pattern[] =
{ "tex", s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow };
+ s_pattern lod_pattern[] =
+ { "lod", s_type, s_sampler, s_coord };
s_pattern txf_pattern[] =
{ "txf", s_type, s_sampler, s_coord, s_offset, s_lod };
+ s_pattern txf_ms_pattern[] =
+ { "txf_ms", s_type, s_sampler, s_coord, s_sample_index };
+ s_pattern txs_pattern[] =
+ { "txs", s_type, s_sampler, s_lod };
s_pattern other_pattern[] =
{ tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
- if (MATCH(expr, tex_pattern)) {
+ if (MATCH(expr, lod_pattern)) {
+ op = ir_lod;
+ } else if (MATCH(expr, tex_pattern)) {
op = ir_tex;
} else if (MATCH(expr, txf_pattern)) {
op = ir_txf;
+ } else if (MATCH(expr, txf_ms_pattern)) {
+ op = ir_txf_ms;
+ } else if (MATCH(expr, txs_pattern)) {
+ op = ir_txs;
} else if (MATCH(expr, other_pattern)) {
op = ir_texture::get_opcode(tag->value());
if (op == -1)
return NULL;
} else {
- ir_read_error(NULL, "unexpected texture pattern");
+ ir_read_error(NULL, "unexpected texture pattern %s", tag->value());
return NULL;
}
@@ -918,25 +968,29 @@ ir_reader::read_texture(s_expression *expr)
}
tex->set_sampler(sampler, type);
- // Read coordinate (any rvalue)
- tex->coordinate = read_rvalue(s_coord);
- if (tex->coordinate == NULL) {
- ir_read_error(NULL, "when reading coordinate in (%s ...)",
- tex->opcode_string());
- return NULL;
- }
-
- // Read texel offset - either 0 or an rvalue.
- s_int *si_offset = SX_AS_INT(s_offset);
- if (si_offset == NULL || si_offset->value() != 0) {
- tex->offset = read_rvalue(s_offset);
- if (tex->offset == NULL) {
- ir_read_error(s_offset, "expected 0 or an expression");
+ if (op != ir_txs) {
+ // Read coordinate (any rvalue)
+ tex->coordinate = read_rvalue(s_coord);
+ if (tex->coordinate == NULL) {
+ ir_read_error(NULL, "when reading coordinate in (%s ...)",
+ tex->opcode_string());
return NULL;
}
+
+ if (op != ir_txf_ms && op != ir_lod) {
+ // Read texel offset - either 0 or an rvalue.
+ s_int *si_offset = SX_AS_INT(s_offset);
+ if (si_offset == NULL || si_offset->value() != 0) {
+ tex->offset = read_rvalue(s_offset);
+ if (tex->offset == NULL) {
+ ir_read_error(s_offset, "expected 0 or an expression");
+ return NULL;
+ }
+ }
+ }
}
- if (op != ir_txf) {
+ if (op != ir_txf && op != ir_txf_ms && op != ir_txs && op != ir_lod) {
s_int *proj_as_int = SX_AS_INT(s_proj);
if (proj_as_int && proj_as_int->value() == 1) {
tex->projector = NULL;
@@ -971,6 +1025,7 @@ ir_reader::read_texture(s_expression *expr)
break;
case ir_txl:
case ir_txf:
+ case ir_txs:
tex->lod_info.lod = read_rvalue(s_lod);
if (tex->lod_info.lod == NULL) {
ir_read_error(NULL, "when reading LOD in (%s ...)",
@@ -978,6 +1033,13 @@ ir_reader::read_texture(s_expression *expr)
return NULL;
}
break;
+ case ir_txf_ms:
+ tex->lod_info.sample_index = read_rvalue(s_sample_index);
+ if (tex->lod_info.sample_index == NULL) {
+ ir_read_error(NULL, "when reading sample_index in (txf_ms ...)");
+ return NULL;
+ }
+ break;
case ir_txd: {
s_expression *s_dx, *s_dy;
s_pattern dxdy_pat[] = { s_dx, s_dy };
@@ -998,7 +1060,7 @@ ir_reader::read_texture(s_expression *expr)
break;
}
default:
- // tex doesn't have any extra parameters.
+ // tex and lod don't have any extra parameters.
break;
};
return tex;
diff --git a/dist/Mesa/src/glsl/ir_rvalue_visitor.cpp b/dist/Mesa/src/glsl/ir_rvalue_visitor.cpp
index ed6c7cb6a..8eb1c62c3 100644
--- a/dist/Mesa/src/glsl/ir_rvalue_visitor.cpp
+++ b/dist/Mesa/src/glsl/ir_rvalue_visitor.cpp
@@ -32,11 +32,10 @@
#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)
+ir_rvalue_base_visitor::rvalue_visit(ir_expression *ir)
{
unsigned int operand;
@@ -48,7 +47,7 @@ ir_rvalue_visitor::visit_leave(ir_expression *ir)
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_texture *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_texture *ir)
{
handle_rvalue(&ir->coordinate);
handle_rvalue(&ir->projector);
@@ -57,14 +56,19 @@ ir_rvalue_visitor::visit_leave(ir_texture *ir)
switch (ir->op) {
case ir_tex:
+ case ir_lod:
break;
case ir_txb:
handle_rvalue(&ir->lod_info.bias);
break;
case ir_txf:
case ir_txl:
+ case ir_txs:
handle_rvalue(&ir->lod_info.lod);
break;
+ case ir_txf_ms:
+ handle_rvalue(&ir->lod_info.sample_index);
+ break;
case ir_txd:
handle_rvalue(&ir->lod_info.grad.dPdx);
handle_rvalue(&ir->lod_info.grad.dPdy);
@@ -75,14 +79,14 @@ ir_rvalue_visitor::visit_leave(ir_texture *ir)
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_swizzle *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_swizzle *ir)
{
handle_rvalue(&ir->val);
return visit_continue;
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_dereference_array *ir)
+ir_rvalue_base_visitor::rvalue_visit(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.
@@ -97,14 +101,14 @@ ir_rvalue_visitor::visit_leave(ir_dereference_array *ir)
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_dereference_record *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_dereference_record *ir)
{
handle_rvalue(&ir->record);
return visit_continue;
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_assignment *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_assignment *ir)
{
handle_rvalue(&ir->rhs);
handle_rvalue(&ir->condition);
@@ -113,7 +117,7 @@ ir_rvalue_visitor::visit_leave(ir_assignment *ir)
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_call *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_call *ir)
{
foreach_iter(exec_list_iterator, iter, *ir) {
ir_rvalue *param = (ir_rvalue *)iter.get();
@@ -128,15 +132,124 @@ ir_rvalue_visitor::visit_leave(ir_call *ir)
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_return *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_return *ir)
{
handle_rvalue(&ir->value);;
return visit_continue;
}
ir_visitor_status
-ir_rvalue_visitor::visit_leave(ir_if *ir)
+ir_rvalue_base_visitor::rvalue_visit(ir_if *ir)
{
handle_rvalue(&ir->condition);
return visit_continue;
}
+
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_expression *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_texture *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_swizzle *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_dereference_array *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_dereference_record *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_assignment *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_call *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_return *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_visitor::visit_leave(ir_if *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_expression *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_texture *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_swizzle *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_dereference_array *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_dereference_record *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_assignment *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_call *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_return *ir)
+{
+ return rvalue_visit(ir);
+}
+
+ir_visitor_status
+ir_rvalue_enter_visitor::visit_enter(ir_if *ir)
+{
+ return rvalue_visit(ir);
+}
diff --git a/dist/Mesa/src/glsl/ir_set_program_inouts.cpp b/dist/Mesa/src/glsl/ir_set_program_inouts.cpp
index 085456533..91a8b4526 100644
--- a/dist/Mesa/src/glsl/ir_set_program_inouts.cpp
+++ b/dist/Mesa/src/glsl/ir_set_program_inouts.cpp
@@ -26,6 +26,9 @@
*
* Sets the InputsRead and OutputsWritten of Mesa programs.
*
+ * Additionally, for fragment shaders, sets the InterpQualifier array, the
+ * IsCentroid bitfield, and the UsesDFdy flag.
+ *
* 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
@@ -34,39 +37,44 @@
* 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)
+ ir_set_program_inouts_visitor(struct gl_program *prog,
+ bool is_fragment_shader)
{
this->prog = prog;
- this->ht = hash_table_ctor(0,
- hash_table_pointer_hash,
- hash_table_pointer_compare);
+ this->is_fragment_shader = is_fragment_shader;
}
~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_enter(ir_expression *);
+ virtual ir_visitor_status visit_enter(ir_discard *);
virtual ir_visitor_status visit(ir_dereference_variable *);
- virtual ir_visitor_status visit(ir_variable *);
struct gl_program *prog;
- struct hash_table *ht;
+ bool is_fragment_shader;
};
+static inline bool
+is_shader_inout(ir_variable *var)
+{
+ return var->mode == ir_var_shader_in ||
+ var->mode == ir_var_shader_out ||
+ var->mode == ir_var_system_value;
+}
+
static void
-mark(struct gl_program *prog, ir_variable *var, int offset, int len)
+mark(struct gl_program *prog, ir_variable *var, int offset, int len,
+ bool is_fragment_shader)
{
/* As of GLSL 1.20, varyings can only be floats, floating-point
* vectors or matrices, or arrays of them. For Mesa programs using
@@ -77,12 +85,22 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len)
*/
for (int i = 0; i < len; i++) {
- if (var->mode == ir_var_in)
- prog->InputsRead |= BITFIELD64_BIT(var->location + offset + i);
- else if (var->mode == ir_var_system_value)
- prog->SystemValuesRead |= (1 << (var->location + offset + i));
- else
- prog->OutputsWritten |= BITFIELD64_BIT(var->location + offset + i);
+ GLbitfield64 bitfield = BITFIELD64_BIT(var->location + var->index + offset + i);
+ if (var->mode == ir_var_shader_in) {
+ prog->InputsRead |= bitfield;
+ if (is_fragment_shader) {
+ gl_fragment_program *fprog = (gl_fragment_program *) prog;
+ fprog->InterpQualifier[var->location + var->index + offset + i] =
+ (glsl_interp_qualifier) var->interpolation;
+ if (var->centroid)
+ fprog->IsCentroid |= bitfield;
+ }
+ } else if (var->mode == ir_var_system_value) {
+ prog->SystemValuesRead |= bitfield;
+ } else {
+ assert(var->mode == ir_var_shader_out);
+ prog->OutputsWritten |= bitfield;
+ }
}
}
@@ -90,16 +108,16 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len)
ir_visitor_status
ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
{
- if (hash_table_find(this->ht, ir->var) == NULL)
+ if (!is_shader_inout(ir->var))
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);
- }
+ mark(this->prog, ir->var, 0,
+ ir->type->length * ir->type->fields.array->matrix_columns,
+ this->is_fragment_shader);
} else {
- mark(this->prog, ir->var, 0, ir->type->matrix_columns);
+ mark(this->prog, ir->var, 0, ir->type->matrix_columns,
+ this->is_fragment_shader);
}
return visit_continue;
@@ -111,13 +129,13 @@ 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;
+ ir_variable *var = deref_var ? deref_var->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 (!var || !is_shader_inout(var))
+ return visit_continue;
- if (index && var) {
+ if (index) {
int width = 1;
if (deref_var->type->is_array() &&
@@ -125,7 +143,8 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
width = deref_var->type->fields.array->matrix_columns;
}
- mark(this->prog, var, index->value.i[0] * width, width);
+ mark(this->prog, var, index->value.i[0] * width, width,
+ this->is_fragment_shader);
return visit_continue_with_parent;
}
@@ -133,18 +152,6 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
}
ir_visitor_status
-ir_set_program_inouts_visitor::visit(ir_variable *ir)
-{
- if (ir->mode == ir_var_in ||
- ir->mode == ir_var_out ||
- ir->mode == ir_var_system_value) {
- 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
@@ -154,13 +161,43 @@ ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir)
return visit_continue_with_parent;
}
+ir_visitor_status
+ir_set_program_inouts_visitor::visit_enter(ir_expression *ir)
+{
+ if (is_fragment_shader && ir->operation == ir_unop_dFdy) {
+ gl_fragment_program *fprog = (gl_fragment_program *) prog;
+ fprog->UsesDFdy = true;
+ }
+ return visit_continue;
+}
+
+ir_visitor_status
+ir_set_program_inouts_visitor::visit_enter(ir_discard *)
+{
+ /* discards are only allowed in fragment shaders. */
+ assert(is_fragment_shader);
+
+ gl_fragment_program *fprog = (gl_fragment_program *) prog;
+ fprog->UsesKill = true;
+
+ return visit_continue;
+}
+
void
-do_set_program_inouts(exec_list *instructions, struct gl_program *prog)
+do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
+ bool is_fragment_shader)
{
- ir_set_program_inouts_visitor v(prog);
+ ir_set_program_inouts_visitor v(prog, is_fragment_shader);
prog->InputsRead = 0;
prog->OutputsWritten = 0;
prog->SystemValuesRead = 0;
+ if (is_fragment_shader) {
+ gl_fragment_program *fprog = (gl_fragment_program *) prog;
+ memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier));
+ fprog->IsCentroid = 0;
+ fprog->UsesDFdy = false;
+ fprog->UsesKill = false;
+ }
visit_list_elements(&v, instructions);
}
diff --git a/dist/Mesa/src/glsl/ir_validate.cpp b/dist/Mesa/src/glsl/ir_validate.cpp
index 7b1c19d65..ce96f6855 100644
--- a/dist/Mesa/src/glsl/ir_validate.cpp
+++ b/dist/Mesa/src/glsl/ir_validate.cpp
@@ -33,7 +33,6 @@
* a dereference chain.
*/
-#include <inttypes.h>
#include "ir.h"
#include "ir_hierarchical_visitor.h"
#include "program/hash_table.h"
@@ -59,7 +58,8 @@ public:
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_enter(ir_if *ir);
virtual ir_visitor_status visit_leave(ir_loop *ir);
virtual ir_visitor_status visit_enter(ir_function *ir);
@@ -69,6 +69,8 @@ public:
virtual ir_visitor_status visit_leave(ir_expression *ir);
virtual ir_visitor_status visit_leave(ir_swizzle *ir);
+ virtual ir_visitor_status visit_enter(class ir_dereference_array *);
+
virtual ir_visitor_status visit_enter(ir_assignment *ir);
virtual ir_visitor_status visit_enter(ir_call *ir);
@@ -102,7 +104,34 @@ ir_validate::visit(ir_dereference_variable *ir)
}
ir_visitor_status
-ir_validate::visit(ir_if *ir)
+ir_validate::visit_enter(class ir_dereference_array *ir)
+{
+ if (!ir->array->type->is_array() && !ir->array->type->is_matrix()) {
+ printf("ir_dereference_array @ %p does not specify an array or a "
+ "matrix\n",
+ (void *) ir);
+ ir->print();
+ printf("\n");
+ abort();
+ }
+
+ if (!ir->array_index->type->is_scalar()) {
+ printf("ir_dereference_array @ %p does not have scalar index: %s\n",
+ (void *) ir, ir->array_index->type->name);
+ abort();
+ }
+
+ if (!ir->array_index->type->is_integer()) {
+ printf("ir_dereference_array @ %p does not have integer index: %s\n",
+ (void *) ir, ir->array_index->type->name);
+ abort();
+ }
+
+ return visit_continue;
+}
+
+ir_visitor_status
+ir_validate::visit_enter(ir_if *ir)
{
if (ir->condition->type != glsl_type::bool_type) {
printf("ir_if condition %s type instead of bool.\n",
@@ -120,7 +149,7 @@ ir_visitor_status
ir_validate::visit_leave(ir_loop *ir)
{
if (ir->counter != NULL) {
- if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) {
+ if ((ir->from == NULL) || (ir->to == NULL) || (ir->increment == NULL)) {
printf("ir_loop has invalid loop controls:\n"
" counter: %p\n"
" from: %p\n"
@@ -136,7 +165,7 @@ ir_validate::visit_leave(ir_loop *ir)
abort();
}
} else {
- if ((ir->from != NULL) || (ir->from != NULL) || (ir->increment != NULL)) {
+ if ((ir->from != NULL) || (ir->to != NULL) || (ir->increment != NULL)) {
printf("ir_loop has invalid loop controls:\n"
" counter: %p\n"
" from: %p\n"
@@ -254,7 +283,11 @@ ir_validate::visit_leave(ir_expression *ir)
case ir_unop_f2i:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
- assert(ir->type->is_integer());
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+ case ir_unop_f2u:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_UINT);
break;
case ir_unop_i2f:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
@@ -269,17 +302,41 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
break;
case ir_unop_i2b:
- assert(ir->operands[0]->type->is_integer());
+ 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->is_integer());
+ 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_i2u:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
+ assert(ir->type->base_type == GLSL_TYPE_UINT);
+ break;
+ case ir_unop_u2i:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+ case ir_unop_bitcast_i2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bitcast_f2i:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+ case ir_unop_bitcast_u2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bitcast_f2u:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_UINT);
+ break;
case ir_unop_any:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
@@ -301,6 +358,51 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[0]->type == ir->type);
break;
+ case ir_unop_pack_snorm_2x16:
+ case ir_unop_pack_unorm_2x16:
+ case ir_unop_pack_half_2x16:
+ assert(ir->type == glsl_type::uint_type);
+ assert(ir->operands[0]->type == glsl_type::vec2_type);
+ break;
+
+ case ir_unop_pack_snorm_4x8:
+ case ir_unop_pack_unorm_4x8:
+ assert(ir->type == glsl_type::uint_type);
+ assert(ir->operands[0]->type == glsl_type::vec4_type);
+ break;
+
+ case ir_unop_unpack_snorm_2x16:
+ case ir_unop_unpack_unorm_2x16:
+ case ir_unop_unpack_half_2x16:
+ assert(ir->type == glsl_type::vec2_type);
+ assert(ir->operands[0]->type == glsl_type::uint_type);
+ break;
+
+ case ir_unop_unpack_snorm_4x8:
+ case ir_unop_unpack_unorm_4x8:
+ assert(ir->type == glsl_type::vec4_type);
+ assert(ir->operands[0]->type == glsl_type::uint_type);
+ break;
+
+ case ir_unop_unpack_half_2x16_split_x:
+ case ir_unop_unpack_half_2x16_split_y:
+ assert(ir->type == glsl_type::float_type);
+ assert(ir->operands[0]->type == glsl_type::uint_type);
+ break;
+
+ case ir_unop_bitfield_reverse:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->type->is_integer());
+ break;
+
+ case ir_unop_bit_count:
+ case ir_unop_find_msb:
+ case ir_unop_find_lsb:
+ assert(ir->operands[0]->type->vector_elements == ir->type->vector_elements);
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+
case ir_unop_noise:
/* XXX what can we assert here? */
break;
@@ -395,6 +497,65 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[0]->type == ir->operands[1]->type);
break;
+ case ir_binop_pack_half_2x16_split:
+ assert(ir->type == glsl_type::uint_type);
+ assert(ir->operands[0]->type == glsl_type::float_type);
+ assert(ir->operands[1]->type == glsl_type::float_type);
+ break;
+
+ case ir_binop_bfm:
+ assert(ir->type->is_integer());
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->operands[1]->type->is_integer());
+ break;
+
+ case ir_binop_ubo_load:
+ assert(ir->operands[0]->as_constant());
+ assert(ir->operands[0]->type == glsl_type::uint_type);
+
+ assert(ir->operands[1]->type == glsl_type::uint_type);
+ break;
+
+ case ir_binop_vector_extract:
+ assert(ir->operands[0]->type->is_vector());
+ assert(ir->operands[1]->type->is_scalar()
+ && ir->operands[1]->type->is_integer());
+ break;
+
+ case ir_triop_lrp:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->operands[0]->type == ir->operands[1]->type);
+ assert(ir->operands[2]->type == ir->operands[0]->type || ir->operands[2]->type == glsl_type::float_type);
+ break;
+
+ case ir_triop_bfi:
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->operands[1]->type == ir->operands[2]->type);
+ assert(ir->operands[1]->type == ir->type);
+ break;
+
+ case ir_triop_bitfield_extract:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[1]->type == glsl_type::int_type);
+ assert(ir->operands[2]->type == glsl_type::int_type);
+ break;
+
+ case ir_triop_vector_insert:
+ assert(ir->operands[0]->type->is_vector());
+ assert(ir->operands[1]->type->is_scalar());
+ assert(ir->operands[0]->type->base_type == ir->operands[1]->type->base_type);
+ assert(ir->operands[2]->type->is_scalar()
+ && ir->operands[2]->type->is_integer());
+ assert(ir->type == ir->operands[0]->type);
+ break;
+
+ case ir_quadop_bitfield_insert:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[1]->type == ir->type);
+ assert(ir->operands[2]->type == glsl_type::int_type);
+ assert(ir->operands[3]->type == glsl_type::int_type);
+ break;
+
case ir_quadop_vector:
/* The vector operator collects some number of scalars and generates a
* vector from them.
@@ -447,7 +608,7 @@ ir_validate::visit_leave(ir_expression *ir)
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};
+ unsigned 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) {
@@ -488,6 +649,13 @@ ir_validate::visit(ir_variable *ir)
}
}
+ if (ir->constant_initializer != NULL && !ir->has_initializer) {
+ printf("ir_variable didn't have an initializer, but has a constant "
+ "initializer value.\n");
+ ir->print();
+ abort();
+ }
+
return visit_continue;
}
@@ -526,14 +694,62 @@ ir_validate::visit_enter(ir_assignment *ir)
ir_visitor_status
ir_validate::visit_enter(ir_call *ir)
{
- ir_function_signature *const callee = ir->get_callee();
+ ir_function_signature *const callee = ir->callee;
if (callee->ir_type != ir_type_function_signature) {
printf("IR called by ir_call is not ir_function_signature!\n");
abort();
}
+ if (ir->return_deref) {
+ if (ir->return_deref->type != callee->return_type) {
+ printf("callee type %s does not match return storage type %s\n",
+ callee->return_type->name, ir->return_deref->type->name);
+ abort();
+ }
+ } else if (callee->return_type != glsl_type::void_type) {
+ printf("ir_call has non-void callee but no return storage\n");
+ abort();
+ }
+
+ const exec_node *formal_param_node = callee->parameters.head;
+ const exec_node *actual_param_node = ir->actual_parameters.head;
+ while (true) {
+ if (formal_param_node->is_tail_sentinel()
+ != actual_param_node->is_tail_sentinel()) {
+ printf("ir_call has the wrong number of parameters:\n");
+ goto dump_ir;
+ }
+ if (formal_param_node->is_tail_sentinel()) {
+ break;
+ }
+ const ir_variable *formal_param
+ = (const ir_variable *) formal_param_node;
+ const ir_rvalue *actual_param
+ = (const ir_rvalue *) actual_param_node;
+ if (formal_param->type != actual_param->type) {
+ printf("ir_call parameter type mismatch:\n");
+ goto dump_ir;
+ }
+ if (formal_param->mode == ir_var_function_out
+ || formal_param->mode == ir_var_function_inout) {
+ if (!actual_param->is_lvalue()) {
+ printf("ir_call out/inout parameters must be lvalues:\n");
+ goto dump_ir;
+ }
+ }
+ formal_param_node = formal_param_node->next;
+ actual_param_node = actual_param_node->next;
+ }
+
return visit_continue;
+
+dump_ir:
+ ir->print();
+ printf("callee:\n");
+ callee->print();
+ abort();
+ return visit_stop;
}
void
@@ -559,12 +775,19 @@ check_node_type(ir_instruction *ir, void *data)
printf("Instruction node with unset type\n");
ir->print(); printf("\n");
}
- assert(ir->type != glsl_type::error_type);
+ ir_rvalue *value = ir->as_rvalue();
+ if (value != NULL)
+ assert(value->type != glsl_type::error_type);
}
void
validate_ir_tree(exec_list *instructions)
{
+ /* We shouldn't have any reason to validate IR in a release build,
+ * and it's half composed of assert()s anyway which wouldn't do
+ * anything.
+ */
+#ifdef DEBUG
ir_validate v;
v.run(instructions);
@@ -574,4 +797,5 @@ validate_ir_tree(exec_list *instructions)
visit_tree(ir, check_node_type, NULL);
}
+#endif
}
diff --git a/dist/Mesa/src/glsl/ir_variable.cpp b/dist/Mesa/src/glsl/ir_variable.cpp
deleted file mode 100644
index 6a8ea5916..000000000
--- a/dist/Mesa/src/glsl/ir_variable.cpp
+++ /dev/null
@@ -1,857 +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"
-#include "main/uniforms.h"
-#include "program/prog_parameter.h"
-#include "program/prog_statevars.h"
-#include "program/prog_instruction.h"
-
-static void generate_ARB_draw_buffers_variables(exec_list *,
- struct _mesa_glsl_parse_state *,
- bool, _mesa_glsl_parser_targets);
-
-static void
-generate_ARB_draw_instanced_variables(exec_list *,
- struct _mesa_glsl_parse_state *,
- bool, _mesa_glsl_parser_targets);
-
-static struct gl_builtin_uniform_element gl_DepthRange_elements[] = {
- {"near", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_XXXX},
- {"far", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_YYYY},
- {"diff", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_ZZZZ},
-};
-
-static struct gl_builtin_uniform_element gl_ClipPlane_elements[] = {
- {NULL, {STATE_CLIPPLANE, 0, 0}, SWIZZLE_XYZW}
-};
-
-static struct gl_builtin_uniform_element gl_Point_elements[] = {
- {"size", {STATE_POINT_SIZE}, SWIZZLE_XXXX},
- {"sizeMin", {STATE_POINT_SIZE}, SWIZZLE_YYYY},
- {"sizeMax", {STATE_POINT_SIZE}, SWIZZLE_ZZZZ},
- {"fadeThresholdSize", {STATE_POINT_SIZE}, SWIZZLE_WWWW},
- {"distanceConstantAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_XXXX},
- {"distanceLinearAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_YYYY},
- {"distanceQuadraticAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_ZZZZ},
-};
-
-static struct gl_builtin_uniform_element gl_FrontMaterial_elements[] = {
- {"emission", {STATE_MATERIAL, 0, STATE_EMISSION}, SWIZZLE_XYZW},
- {"ambient", {STATE_MATERIAL, 0, STATE_AMBIENT}, SWIZZLE_XYZW},
- {"diffuse", {STATE_MATERIAL, 0, STATE_DIFFUSE}, SWIZZLE_XYZW},
- {"specular", {STATE_MATERIAL, 0, STATE_SPECULAR}, SWIZZLE_XYZW},
- {"shininess", {STATE_MATERIAL, 0, STATE_SHININESS}, SWIZZLE_XXXX},
-};
-
-static struct gl_builtin_uniform_element gl_BackMaterial_elements[] = {
- {"emission", {STATE_MATERIAL, 1, STATE_EMISSION}, SWIZZLE_XYZW},
- {"ambient", {STATE_MATERIAL, 1, STATE_AMBIENT}, SWIZZLE_XYZW},
- {"diffuse", {STATE_MATERIAL, 1, STATE_DIFFUSE}, SWIZZLE_XYZW},
- {"specular", {STATE_MATERIAL, 1, STATE_SPECULAR}, SWIZZLE_XYZW},
- {"shininess", {STATE_MATERIAL, 1, STATE_SHININESS}, SWIZZLE_XXXX},
-};
-
-static struct gl_builtin_uniform_element gl_LightSource_elements[] = {
- {"ambient", {STATE_LIGHT, 0, STATE_AMBIENT}, SWIZZLE_XYZW},
- {"diffuse", {STATE_LIGHT, 0, STATE_DIFFUSE}, SWIZZLE_XYZW},
- {"specular", {STATE_LIGHT, 0, STATE_SPECULAR}, SWIZZLE_XYZW},
- {"position", {STATE_LIGHT, 0, STATE_POSITION}, SWIZZLE_XYZW},
- {"halfVector", {STATE_LIGHT, 0, STATE_HALF_VECTOR}, SWIZZLE_XYZW},
- {"spotDirection", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION},
- MAKE_SWIZZLE4(SWIZZLE_X,
- SWIZZLE_Y,
- SWIZZLE_Z,
- SWIZZLE_Z)},
- {"spotCosCutoff", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, SWIZZLE_WWWW},
- {"spotCutoff", {STATE_LIGHT, 0, STATE_SPOT_CUTOFF}, SWIZZLE_XXXX},
- {"spotExponent", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_WWWW},
- {"constantAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_XXXX},
- {"linearAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_YYYY},
- {"quadraticAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_ZZZZ},
-};
-
-static struct gl_builtin_uniform_element gl_LightModel_elements[] = {
- {"ambient", {STATE_LIGHTMODEL_AMBIENT, 0}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_FrontLightModelProduct_elements[] = {
- {"sceneColor", {STATE_LIGHTMODEL_SCENECOLOR, 0}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_BackLightModelProduct_elements[] = {
- {"sceneColor", {STATE_LIGHTMODEL_SCENECOLOR, 1}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_FrontLightProduct_elements[] = {
- {"ambient", {STATE_LIGHTPROD, 0, 0, STATE_AMBIENT}, SWIZZLE_XYZW},
- {"diffuse", {STATE_LIGHTPROD, 0, 0, STATE_DIFFUSE}, SWIZZLE_XYZW},
- {"specular", {STATE_LIGHTPROD, 0, 0, STATE_SPECULAR}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_BackLightProduct_elements[] = {
- {"ambient", {STATE_LIGHTPROD, 0, 1, STATE_AMBIENT}, SWIZZLE_XYZW},
- {"diffuse", {STATE_LIGHTPROD, 0, 1, STATE_DIFFUSE}, SWIZZLE_XYZW},
- {"specular", {STATE_LIGHTPROD, 0, 1, STATE_SPECULAR}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_TextureEnvColor_elements[] = {
- {NULL, {STATE_TEXENV_COLOR, 0}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_EyePlaneS_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_S}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_EyePlaneT_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_T}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_EyePlaneR_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_R}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_EyePlaneQ_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_Q}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_ObjectPlaneS_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_S}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_ObjectPlaneT_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_T}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_ObjectPlaneR_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_R}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_ObjectPlaneQ_elements[] = {
- {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_Q}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_Fog_elements[] = {
- {"color", {STATE_FOG_COLOR}, SWIZZLE_XYZW},
- {"density", {STATE_FOG_PARAMS}, SWIZZLE_XXXX},
- {"start", {STATE_FOG_PARAMS}, SWIZZLE_YYYY},
- {"end", {STATE_FOG_PARAMS}, SWIZZLE_ZZZZ},
- {"scale", {STATE_FOG_PARAMS}, SWIZZLE_WWWW},
-};
-
-static struct gl_builtin_uniform_element gl_NormalScale_elements[] = {
- {NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX},
-};
-
-static struct gl_builtin_uniform_element gl_MESABumpRotMatrix0_elements[] = {
- {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_0}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_MESABumpRotMatrix1_elements[] = {
- {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_1}, SWIZZLE_XYZW},
-};
-
-static struct gl_builtin_uniform_element gl_MESAFogParamsOptimized_elements[] = {
- {NULL, {STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED}, SWIZZLE_XYZW},
-};
-
-#define MATRIX(name, statevar, modifier) \
- static struct gl_builtin_uniform_element name ## _elements[] = { \
- { NULL, { statevar, 0, 0, 0, modifier}, SWIZZLE_XYZW }, \
- { NULL, { statevar, 0, 1, 1, modifier}, SWIZZLE_XYZW }, \
- { NULL, { statevar, 0, 2, 2, modifier}, SWIZZLE_XYZW }, \
- { NULL, { statevar, 0, 3, 3, modifier}, SWIZZLE_XYZW }, \
- }
-
-MATRIX(gl_ModelViewMatrix,
- STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE);
-MATRIX(gl_ModelViewMatrixInverse,
- STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVTRANS);
-MATRIX(gl_ModelViewMatrixTranspose,
- STATE_MODELVIEW_MATRIX, 0);
-MATRIX(gl_ModelViewMatrixInverseTranspose,
- STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVERSE);
-
-MATRIX(gl_ProjectionMatrix,
- STATE_PROJECTION_MATRIX, STATE_MATRIX_TRANSPOSE);
-MATRIX(gl_ProjectionMatrixInverse,
- STATE_PROJECTION_MATRIX, STATE_MATRIX_INVTRANS);
-MATRIX(gl_ProjectionMatrixTranspose,
- STATE_PROJECTION_MATRIX, 0);
-MATRIX(gl_ProjectionMatrixInverseTranspose,
- STATE_PROJECTION_MATRIX, STATE_MATRIX_INVERSE);
-
-MATRIX(gl_ModelViewProjectionMatrix,
- STATE_MVP_MATRIX, STATE_MATRIX_TRANSPOSE);
-MATRIX(gl_ModelViewProjectionMatrixInverse,
- STATE_MVP_MATRIX, STATE_MATRIX_INVTRANS);
-MATRIX(gl_ModelViewProjectionMatrixTranspose,
- STATE_MVP_MATRIX, 0);
-MATRIX(gl_ModelViewProjectionMatrixInverseTranspose,
- STATE_MVP_MATRIX, STATE_MATRIX_INVERSE);
-
-MATRIX(gl_TextureMatrix,
- STATE_TEXTURE_MATRIX, STATE_MATRIX_TRANSPOSE);
-MATRIX(gl_TextureMatrixInverse,
- STATE_TEXTURE_MATRIX, STATE_MATRIX_INVTRANS);
-MATRIX(gl_TextureMatrixTranspose,
- STATE_TEXTURE_MATRIX, 0);
-MATRIX(gl_TextureMatrixInverseTranspose,
- STATE_TEXTURE_MATRIX, STATE_MATRIX_INVERSE);
-
-static struct gl_builtin_uniform_element gl_NormalMatrix_elements[] = {
- { NULL, { STATE_MODELVIEW_MATRIX, 0, 0, 0, STATE_MATRIX_INVERSE},
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) },
- { NULL, { STATE_MODELVIEW_MATRIX, 0, 1, 1, STATE_MATRIX_INVERSE},
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) },
- { NULL, { STATE_MODELVIEW_MATRIX, 0, 2, 2, STATE_MATRIX_INVERSE},
- MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) },
-};
-
-#undef MATRIX
-
-#define STATEVAR(name) {#name, name ## _elements, Elements(name ## _elements)}
-
-const struct gl_builtin_uniform_desc _mesa_builtin_uniform_desc[] = {
- STATEVAR(gl_DepthRange),
- STATEVAR(gl_ClipPlane),
- STATEVAR(gl_Point),
- STATEVAR(gl_FrontMaterial),
- STATEVAR(gl_BackMaterial),
- STATEVAR(gl_LightSource),
- STATEVAR(gl_LightModel),
- STATEVAR(gl_FrontLightModelProduct),
- STATEVAR(gl_BackLightModelProduct),
- STATEVAR(gl_FrontLightProduct),
- STATEVAR(gl_BackLightProduct),
- STATEVAR(gl_TextureEnvColor),
- STATEVAR(gl_EyePlaneS),
- STATEVAR(gl_EyePlaneT),
- STATEVAR(gl_EyePlaneR),
- STATEVAR(gl_EyePlaneQ),
- STATEVAR(gl_ObjectPlaneS),
- STATEVAR(gl_ObjectPlaneT),
- STATEVAR(gl_ObjectPlaneR),
- STATEVAR(gl_ObjectPlaneQ),
- STATEVAR(gl_Fog),
-
- STATEVAR(gl_ModelViewMatrix),
- STATEVAR(gl_ModelViewMatrixInverse),
- STATEVAR(gl_ModelViewMatrixTranspose),
- STATEVAR(gl_ModelViewMatrixInverseTranspose),
-
- STATEVAR(gl_ProjectionMatrix),
- STATEVAR(gl_ProjectionMatrixInverse),
- STATEVAR(gl_ProjectionMatrixTranspose),
- STATEVAR(gl_ProjectionMatrixInverseTranspose),
-
- STATEVAR(gl_ModelViewProjectionMatrix),
- STATEVAR(gl_ModelViewProjectionMatrixInverse),
- STATEVAR(gl_ModelViewProjectionMatrixTranspose),
- STATEVAR(gl_ModelViewProjectionMatrixInverseTranspose),
-
- STATEVAR(gl_TextureMatrix),
- STATEVAR(gl_TextureMatrixInverse),
- STATEVAR(gl_TextureMatrixTranspose),
- STATEVAR(gl_TextureMatrixInverseTranspose),
-
- STATEVAR(gl_NormalMatrix),
- STATEVAR(gl_NormalScale),
-
- STATEVAR(gl_MESABumpRotMatrix0),
- STATEVAR(gl_MESABumpRotMatrix1),
- STATEVAR(gl_MESAFogParamsOptimized),
-
- {NULL, NULL, 0}
-};
-
-static ir_variable *
-add_variable(exec_list *instructions, glsl_symbol_table *symtab,
- const char *name, const glsl_type *type,
- enum ir_variable_mode mode, int slot)
-{
- ir_variable *var = new(symtab) ir_variable(type, name, mode);
-
- switch (var->mode) {
- case ir_var_auto:
- case ir_var_in:
- case ir_var_const_in:
- case ir_var_uniform:
- case ir_var_system_value:
- 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, glsl_symbol_table *symtab,
- const char *name, const glsl_type *type)
-{
- ir_variable *const uni =
- add_variable(instructions, symtab, name, type, ir_var_uniform, -1);
-
- unsigned i;
- for (i = 0; _mesa_builtin_uniform_desc[i].name != NULL; i++) {
- if (strcmp(_mesa_builtin_uniform_desc[i].name, name) == 0) {
- break;
- }
- }
-
- assert(_mesa_builtin_uniform_desc[i].name != NULL);
- const struct gl_builtin_uniform_desc* const statevar =
- &_mesa_builtin_uniform_desc[i];
-
- const unsigned array_count = type->is_array() ? type->length : 1;
- uni->num_state_slots = array_count * statevar->num_elements;
-
- ir_state_slot *slots =
- ralloc_array(uni, ir_state_slot, uni->num_state_slots);
-
- uni->state_slots = slots;
-
- for (unsigned a = 0; a < array_count; a++) {
- for (unsigned j = 0; j < statevar->num_elements; j++) {
- struct gl_builtin_uniform_element *element = &statevar->elements[j];
-
- memcpy(slots->tokens, element->tokens, sizeof(element->tokens));
- if (type->is_array()) {
- slots->tokens[1] = a;
- }
-
- slots->swizzle = element->swizzle;
- slots++;
- }
- }
-
- return uni;
-}
-
-static void
-add_builtin_variable(exec_list *instructions, glsl_symbol_table *symtab,
- const builtin_variable *proto)
-{
- /* 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);
-
- if (proto->mode == ir_var_uniform) {
- add_uniform(instructions, symtab, proto->name, type);
- } else {
- add_variable(instructions, symtab, proto->name, type, proto->mode,
- proto->slot);
- }
-}
-
-static void
-add_builtin_constant(exec_list *instructions, glsl_symbol_table *symtab,
- const char *name, int value)
-{
- ir_variable *const var = add_variable(instructions, symtab,
- name, glsl_type::int_type,
- ir_var_auto, -1);
- 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)
-{
- glsl_symbol_table *const symtab = state->symbols;
-
- add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
- state->Const.MaxVertexAttribs);
- add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformVectors",
- state->Const.MaxVertexUniformComponents);
- add_builtin_constant(instructions, symtab, "gl_MaxVaryingVectors",
- state->Const.MaxVaryingFloats / 4);
- add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
- state->Const.MaxVertexTextureImageUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",
- state->Const.MaxCombinedTextureImageUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
- state->Const.MaxTextureImageUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformVectors",
- state->Const.MaxFragmentUniformComponents);
-
- add_uniform(instructions, symtab, "gl_DepthRange",
- state->symbols->get_type("gl_DepthRangeParameters"));
-}
-
-static void
-generate_110_uniforms(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- glsl_symbol_table *const symtab = state->symbols;
-
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_uniforms)
- ; i++) {
- add_builtin_variable(instructions, symtab,
- & builtin_110_deprecated_uniforms[i]);
- }
-
- add_builtin_constant(instructions, symtab, "gl_MaxLights",
- state->Const.MaxLights);
- add_builtin_constant(instructions, symtab, "gl_MaxClipPlanes",
- state->Const.MaxClipPlanes);
- add_builtin_constant(instructions, symtab, "gl_MaxTextureUnits",
- state->Const.MaxTextureUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxTextureCoords",
- state->Const.MaxTextureCoords);
- add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
- state->Const.MaxVertexAttribs);
- add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformComponents",
- state->Const.MaxVertexUniformComponents);
- add_builtin_constant(instructions, symtab, "gl_MaxVaryingFloats",
- state->Const.MaxVaryingFloats);
- add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
- state->Const.MaxVertexTextureImageUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",
- state->Const.MaxCombinedTextureImageUnits);
- add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
- state->Const.MaxTextureImageUnits);
- add_builtin_constant(instructions, symtab, "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, symtab, "gl_TextureMatrix", mat4_array_type);
- add_uniform(instructions, symtab, "gl_TextureMatrixInverse", mat4_array_type);
- add_uniform(instructions, symtab, "gl_TextureMatrixTranspose", mat4_array_type);
- add_uniform(instructions, symtab, "gl_TextureMatrixInverseTranspose", mat4_array_type);
-
- add_uniform(instructions, symtab, "gl_DepthRange",
- symtab->get_type("gl_DepthRangeParameters"));
-
- add_uniform(instructions, symtab, "gl_ClipPlane",
- glsl_type::get_array_instance(glsl_type::vec4_type,
- state->Const.MaxClipPlanes));
- add_uniform(instructions, symtab, "gl_Point",
- symtab->get_type("gl_PointParameters"));
-
- const glsl_type *const material_parameters_type =
- symtab->get_type("gl_MaterialParameters");
- add_uniform(instructions, symtab, "gl_FrontMaterial", material_parameters_type);
- add_uniform(instructions, symtab, "gl_BackMaterial", material_parameters_type);
-
- const glsl_type *const light_source_array_type =
- glsl_type::get_array_instance(symtab->get_type("gl_LightSourceParameters"), state->Const.MaxLights);
-
- add_uniform(instructions, symtab, "gl_LightSource", light_source_array_type);
-
- const glsl_type *const light_model_products_type =
- symtab->get_type("gl_LightModelProducts");
- add_uniform(instructions, symtab, "gl_FrontLightModelProduct",
- light_model_products_type);
- add_uniform(instructions, symtab, "gl_BackLightModelProduct",
- light_model_products_type);
-
- const glsl_type *const light_products_type =
- glsl_type::get_array_instance(symtab->get_type("gl_LightProducts"),
- state->Const.MaxLights);
- add_uniform(instructions, symtab, "gl_FrontLightProduct", light_products_type);
- add_uniform(instructions, symtab, "gl_BackLightProduct", light_products_type);
-
- add_uniform(instructions, symtab, "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, symtab, "gl_EyePlaneS", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_EyePlaneT", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_EyePlaneR", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_EyePlaneQ", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_ObjectPlaneS", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_ObjectPlaneT", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_ObjectPlaneR", texcoords_vec4);
- add_uniform(instructions, symtab, "gl_ObjectPlaneQ", texcoords_vec4);
-
- add_uniform(instructions, symtab, "gl_Fog",
- symtab->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(instructions, state->symbols,
- & builtin_core_vs_variables[i]);
- }
-
- 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(instructions, state->symbols,
- & builtin_core_vs_variables[i]);
- }
-
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_vs_variables)
- ; i++) {
- add_builtin_variable(instructions, state->symbols,
- & builtin_110_deprecated_vs_variables[i]);
- }
- 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(instructions, state->symbols,
- "gl_TexCoord", vec4_array_type, ir_var_out, VERT_RESULT_TEX0);
-
- 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(instructions, state->symbols,
- & builtin_130_vs_variables[i]);
- }
-
- 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(instructions, state->symbols,
- "gl_ClipDistance", clip_distance_array_type, ir_var_out, -1);
-
-}
-
-
-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;
- }
-
- if (state->ARB_draw_instanced_enable)
- generate_ARB_draw_instanced_variables(instructions, state, false,
- vertex_shader);
-}
-
-
-/* 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(instructions, state->symbols,
- & builtin_core_fs_variables[i]);
- }
-
- for (unsigned i = 0; i < Elements(builtin_100ES_fs_variables); i++) {
- add_builtin_variable(instructions, state->symbols,
- & builtin_100ES_fs_variables[i]);
- }
-
- 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(instructions, state->symbols,
- & builtin_core_fs_variables[i]);
- }
-
- for (unsigned i = 0; i < Elements(builtin_110_fs_variables); i++) {
- add_builtin_variable(instructions, state->symbols,
- & builtin_110_fs_variables[i]);
- }
-
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_fs_variables)
- ; i++) {
- add_builtin_variable(instructions, state->symbols,
- & builtin_110_deprecated_fs_variables[i]);
- }
- 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(instructions, state->symbols,
- "gl_TexCoord", vec4_array_type, ir_var_in, FRAG_ATTRIB_TEX0);
-
- 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(instructions, state->symbols,
- "gl_MaxDrawBuffers", glsl_type::int_type, ir_var_auto, -1);
-
- 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(instructions, state->symbols,
- "gl_FragData", vec4_array_type,
- ir_var_out, FRAG_RESULT_DATA0);
-
- if (warn)
- fd->warn_extension = "GL_ARB_draw_buffers";
- }
-}
-
-
-static void
-generate_ARB_draw_instanced_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- bool warn,
- _mesa_glsl_parser_targets target)
-{
- /* gl_InstanceIDARB is only available in the vertex shader.
- */
- if (target == vertex_shader) {
- ir_variable *const inst =
- add_variable(instructions, state->symbols,
- "gl_InstanceIDARB", glsl_type::int_type,
- ir_var_system_value, SYSTEM_VALUE_INSTANCE_ID);
-
- if (warn)
- inst->warn_extension = "GL_ARB_draw_instanced";
- }
-}
-
-
-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(instructions, state->symbols,
- "gl_FragStencilRefARB", glsl_type::int_type,
- ir_var_out, FRAG_RESULT_STENCIL);
-
- if (warn)
- fd->warn_extension = "GL_ARB_shader_stencil_export";
-}
-
-static void
-generate_AMD_shader_stencil_export_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- bool warn)
-{
- /* gl_FragStencilRefAMD is only available in the fragment shader.
- */
- ir_variable *const fd =
- add_variable(instructions, state->symbols,
- "gl_FragStencilRefAMD", glsl_type::int_type,
- ir_var_out, FRAG_RESULT_STENCIL);
-
- if (warn)
- fd->warn_extension = "GL_AMD_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(instructions, state->symbols,
- & builtin_120_fs_variables[i]);
- }
-}
-
-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(instructions, state->symbols,
- "gl_ClipDistance", clip_distance_array_type, ir_var_in, -1);
-}
-
-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);
-
- if (state->AMD_shader_stencil_export_enable)
- generate_AMD_shader_stencil_export_variables(instructions, state,
- state->AMD_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/dist/Mesa/src/glsl/link_functions.cpp b/dist/Mesa/src/glsl/link_functions.cpp
index d40f771e3..6b3e15448 100644
--- a/dist/Mesa/src/glsl/link_functions.cpp
+++ b/dist/Mesa/src/glsl/link_functions.cpp
@@ -68,7 +68,7 @@ public:
* 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();
+ const ir_function_signature *const callee = ir->callee;
assert(callee != NULL);
const char *const name = callee->function_name();
@@ -79,7 +79,7 @@ public:
find_matching_signature(name, &callee->parameters, &linked, 1,
ir->use_builtin);
if (sig != NULL) {
- ir->set_callee(sig);
+ ir->callee = sig;
return visit_continue;
}
@@ -104,10 +104,12 @@ public:
if (f == NULL) {
f = new(linked) ir_function(name);
- /* Add the new function to the linked IR.
+ /* Add the new function to the linked IR. Put it at the end
+ * so that it comes after any global variable declarations
+ * that it refers to.
*/
linked->symbols->add_function(f);
- linked->ir->push_head(f);
+ linked->ir->push_tail(f);
}
ir_function_signature *linked_sig =
@@ -166,7 +168,7 @@ public:
*/
linked_sig->accept(this);
- ir->set_callee(linked_sig);
+ ir->callee = linked_sig;
return visit_continue;
}
diff --git a/dist/Mesa/src/glsl/linker.cpp b/dist/Mesa/src/glsl/linker.cpp
index 19eb9b5ff..b37b15086 100644
--- a/dist/Mesa/src/glsl/linker.cpp
+++ b/dist/Mesa/src/glsl/linker.cpp
@@ -66,10 +66,12 @@
#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"
+#include "link_varyings.h"
#include "ir_optimization.h"
extern "C" {
@@ -101,13 +103,13 @@ public:
virtual ir_visitor_status visit_enter(ir_call *ir)
{
- exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
+ exec_list_iterator sig_iter = ir->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) {
+ if (sig_param->mode == ir_var_function_out ||
+ sig_param->mode == ir_var_function_inout) {
ir_variable *var = param_rval->variable_referenced();
if (var && strcmp(name, var->name) == 0) {
found = true;
@@ -117,6 +119,15 @@ public:
sig_iter.next();
}
+ if (ir->return_deref != NULL) {
+ ir_variable *const var = ir->return_deref->variable_referenced();
+
+ if (strcmp(name, var->name) == 0) {
+ found = true;
+ return visit_stop;
+ }
+ }
+
return visit_continue_with_parent;
}
@@ -190,20 +201,98 @@ linker_warning(gl_shader_program *prog, const char *fmt, ...)
}
+/**
+ * Given a string identifying a program resource, break it into a base name
+ * and an optional array index in square brackets.
+ *
+ * If an array index is present, \c out_base_name_end is set to point to the
+ * "[" that precedes the array index, and the array index itself is returned
+ * as a long.
+ *
+ * If no array index is present (or if the array index is negative or
+ * mal-formed), \c out_base_name_end, is set to point to the null terminator
+ * at the end of the input string, and -1 is returned.
+ *
+ * Only the final array index is parsed; if the string contains other array
+ * indices (or structure field accesses), they are left in the base name.
+ *
+ * No attempt is made to check that the base name is properly formed;
+ * typically the caller will look up the base name in a hash table, so
+ * ill-formed base names simply turn into hash table lookup failures.
+ */
+long
+parse_program_resource_name(const GLchar *name,
+ const GLchar **out_base_name_end)
+{
+ /* Section 7.3.1 ("Program Interfaces") of the OpenGL 4.3 spec says:
+ *
+ * "When an integer array element or block instance number is part of
+ * the name string, it will be specified in decimal form without a "+"
+ * or "-" sign or any extra leading zeroes. Additionally, the name
+ * string will not include white space anywhere in the string."
+ */
+
+ const size_t len = strlen(name);
+ *out_base_name_end = name + len;
+
+ if (len == 0 || name[len-1] != ']')
+ return -1;
+
+ /* Walk backwards over the string looking for a non-digit character. This
+ * had better be the opening bracket for an array index.
+ *
+ * Initially, i specifies the location of the ']'. Since the string may
+ * contain only the ']' charcater, walk backwards very carefully.
+ */
+ unsigned i;
+ for (i = len - 1; (i > 0) && isdigit(name[i-1]); --i)
+ /* empty */ ;
+
+ if ((i == 0) || name[i-1] != '[')
+ return -1;
+
+ long array_index = strtol(&name[i], NULL, 10);
+ if (array_index < 0)
+ return -1;
+
+ *out_base_name_end = name + (i - 1);
+ return array_index;
+}
+
+
void
-invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
- int generic_base)
+link_invalidate_variable_locations(gl_shader *sh, int input_base,
+ int output_base)
{
foreach_list(node, sh->ir) {
ir_variable *const var = ((ir_instruction *) node)->as_variable();
- if ((var == NULL) || (var->mode != (unsigned) mode))
- continue;
+ if (var == NULL)
+ continue;
+
+ int base;
+ switch (var->mode) {
+ case ir_var_shader_in:
+ base = input_base;
+ break;
+ case ir_var_shader_out:
+ base = output_base;
+ break;
+ default:
+ continue;
+ }
/* Only assign locations for generic attributes / varyings / etc.
*/
- if ((var->location >= generic_base) && !var->explicit_location)
- var->location = -1;
+ if ((var->location >= base) && !var->explicit_location)
+ var->location = -1;
+
+ if ((var->location == -1) && !var->explicit_location) {
+ var->is_unmatched_generic_inout = 1;
+ var->location_frac = 0;
+ } else {
+ var->is_unmatched_generic_inout = 0;
+ }
}
}
@@ -244,7 +333,10 @@ count_attribute_slots(const glsl_type *t)
/**
- * Verify that a vertex shader executable meets all semantic requirements
+ * Verify that a vertex shader executable meets all semantic requirements.
+ *
+ * Also sets prog->Vert.UsesClipDistance and prog->Vert.ClipDistanceArraySize
+ * as a side effect.
*
* \param shader Vertex shader executable to be verified
*/
@@ -255,11 +347,68 @@ validate_vertex_shader_executable(struct gl_shader_program *prog,
if (shader == NULL)
return true;
- find_assignment_visitor find("gl_Position");
- find.run(shader->ir);
- if (!find.variable_found()) {
- linker_error(prog, "vertex shader does not write to `gl_Position'\n");
- return false;
+ /* From the GLSL 1.10 spec, page 48:
+ *
+ * "The variable gl_Position is available only in the vertex
+ * language and is intended for writing the homogeneous vertex
+ * position. All executions of a well-formed vertex shader
+ * executable must write a value into this variable. [...] The
+ * variable gl_Position is available only in the vertex
+ * language and is intended for writing the homogeneous vertex
+ * position. All executions of a well-formed vertex shader
+ * executable must write a value into this variable."
+ *
+ * while in GLSL 1.40 this text is changed to:
+ *
+ * "The variable gl_Position is available only in the vertex
+ * language and is intended for writing the homogeneous vertex
+ * position. It can be written at any time during shader
+ * execution. It may also be read back by a vertex shader
+ * after being written. This value will be used by primitive
+ * assembly, clipping, culling, and other fixed functionality
+ * operations, if present, that operate on primitives after
+ * vertex processing has occurred. Its value is undefined if
+ * the vertex shader executable does not write gl_Position."
+ *
+ * GLSL ES 3.00 is similar to GLSL 1.40--failing to write to gl_Position is
+ * not an error.
+ */
+ if (prog->Version < (prog->IsES ? 300 : 140)) {
+ find_assignment_visitor find("gl_Position");
+ find.run(shader->ir);
+ if (!find.variable_found()) {
+ linker_error(prog, "vertex shader does not write to `gl_Position'\n");
+ return false;
+ }
+ }
+
+ prog->Vert.ClipDistanceArraySize = 0;
+
+ if (!prog->IsES && prog->Version >= 130) {
+ /* From section 7.1 (Vertex Shader Special Variables) of the
+ * GLSL 1.30 spec:
+ *
+ * "It is an error for a shader to statically write both
+ * gl_ClipVertex and gl_ClipDistance."
+ *
+ * This does not apply to GLSL ES shaders, since GLSL ES defines neither
+ * gl_ClipVertex nor gl_ClipDistance.
+ */
+ find_assignment_visitor clip_vertex("gl_ClipVertex");
+ find_assignment_visitor clip_distance("gl_ClipDistance");
+
+ clip_vertex.run(shader->ir);
+ clip_distance.run(shader->ir);
+ if (clip_vertex.variable_found() && clip_distance.variable_found()) {
+ linker_error(prog, "vertex shader writes to both `gl_ClipVertex' "
+ "and `gl_ClipDistance'\n");
+ return false;
+ }
+ prog->Vert.UsesClipDistance = clip_distance.variable_found();
+ ir_variable *clip_distance_var =
+ shader->symbols->get_variable("gl_ClipDistance");
+ if (clip_distance_var)
+ prog->Vert.ClipDistanceArraySize = clip_distance_var->type->length;
}
return true;
@@ -304,10 +453,9 @@ mode_string(const ir_variable *var)
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_uniform: return "uniform";
+ case ir_var_shader_in: return "shader input";
+ case ir_var_shader_out: return "shader output";
case ir_var_const_in:
case ir_var_temporary:
@@ -393,43 +541,82 @@ cross_validate_globals(struct gl_shader_program *prog,
existing->explicit_location = true;
}
- /* Validate layout qualifiers for gl_FragDepth.
- *
- * From the AMD_conservative_depth spec:
- * "If gl_FragDepth is redeclared in any fragment shader in
- * a program, it must be redeclared in all fragment shaders in that
- * program that have static assignments to gl_FragDepth. All
- * redeclarations of gl_FragDepth in all fragment shaders in
- * a single program must have the same set of qualifiers."
- */
- if (strcmp(var->name, "gl_FragDepth") == 0) {
- bool layout_declared = var->depth_layout != ir_depth_layout_none;
- bool layout_differs = var->depth_layout != existing->depth_layout;
- if (layout_declared && layout_differs) {
- linker_error(prog,
- "All redeclarations of gl_FragDepth in all fragment shaders "
- "in a single program must have the same set of qualifiers.");
- }
- if (var->used && layout_differs) {
- linker_error(prog,
- "If gl_FragDepth is redeclared with a layout qualifier in"
- "any fragment shader, it must be redeclared with the same"
- "layout qualifier in all fragment shaders that have"
- "assignments to gl_FragDepth");
- }
- }
-
- /* FINISHME: Handle non-constant initializers.
+ /* From the GLSL 4.20 specification:
+ * "A link error will result if two compilation units in a program
+ * specify different integer-constant bindings for the same
+ * opaque-uniform name. However, it is not an error to specify a
+ * binding on some but not all declarations for the same name"
+ */
+ if (var->explicit_binding) {
+ if (existing->explicit_binding &&
+ var->binding != existing->binding) {
+ linker_error(prog, "explicit bindings for %s "
+ "`%s' have differing values\n",
+ mode_string(var), var->name);
+ return false;
+ }
+
+ existing->binding = var->binding;
+ existing->explicit_binding = true;
+ }
+
+ /* Validate layout qualifiers for gl_FragDepth.
+ *
+ * From the AMD/ARB_conservative_depth specs:
+ *
+ * "If gl_FragDepth is redeclared in any fragment shader in a
+ * program, it must be redeclared in all fragment shaders in
+ * that program that have static assignments to
+ * gl_FragDepth. All redeclarations of gl_FragDepth in all
+ * fragment shaders in a single program must have the same set
+ * of qualifiers."
+ */
+ if (strcmp(var->name, "gl_FragDepth") == 0) {
+ bool layout_declared = var->depth_layout != ir_depth_layout_none;
+ bool layout_differs =
+ var->depth_layout != existing->depth_layout;
+
+ if (layout_declared && layout_differs) {
+ linker_error(prog,
+ "All redeclarations of gl_FragDepth in all "
+ "fragment shaders in a single program must have "
+ "the same set of qualifiers.");
+ }
+
+ if (var->used && layout_differs) {
+ linker_error(prog,
+ "If gl_FragDepth is redeclared with a layout "
+ "qualifier in any fragment shader, it must be "
+ "redeclared with the same layout qualifier in "
+ "all fragment shaders that have assignments to "
+ "gl_FragDepth");
+ }
+ }
+
+ /* Page 35 (page 41 of the PDF) of the GLSL 4.20 spec says:
+ *
+ * "If a shared global has multiple initializers, the
+ * initializers must all be constant expressions, and they
+ * must all have the same value. Otherwise, a link error will
+ * result. (A shared global having only one initializer does
+ * not require that initializer to be a constant expression.)"
+ *
+ * Previous to 4.20 the GLSL spec simply said that initializers
+ * must have the same value. In this case of non-constant
+ * initializers, this was impossible to determine. As a result,
+ * no vendor actually implemented that behavior. The 4.20
+ * behavior matches the implemented behavior of at least one other
+ * vendor, so we'll implement that for all GLSL versions.
*/
- if (var->constant_value != NULL) {
- if (existing->constant_value != NULL) {
- if (!var->constant_value->has_value(existing->constant_value)) {
+ if (var->constant_initializer != NULL) {
+ if (existing->constant_initializer != NULL) {
+ if (!var->constant_initializer->has_value(existing->constant_initializer)) {
linker_error(prog, "initializers for %s "
"`%s' have differing values\n",
mode_string(var), var->name);
return false;
}
- } else
+ } 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.
@@ -442,8 +629,29 @@ cross_validate_globals(struct gl_shader_program *prog,
* FINISHME: modify the shader, and linking with the second
* FINISHME: will fail.
*/
- existing->constant_value =
- var->constant_value->clone(ralloc_parent(existing), NULL);
+ existing->constant_initializer =
+ var->constant_initializer->clone(ralloc_parent(existing),
+ NULL);
+ }
+ }
+
+ if (var->has_initializer) {
+ if (existing->has_initializer
+ && (var->constant_initializer == NULL
+ || existing->constant_initializer == NULL)) {
+ linker_error(prog,
+ "shared global variable `%s' has multiple "
+ "non-constant initializers.\n",
+ var->name);
+ return false;
+ }
+
+ /* Some instance had an initializer, so keep track of that. In
+ * this location, all sorts of initializers (constant or
+ * otherwise) will propagate the existence to the variable
+ * stored in the symbol table.
+ */
+ existing->has_initializer = true;
}
if (existing->invariant != var->invariant) {
@@ -477,121 +685,43 @@ cross_validate_uniforms(struct gl_shader_program *prog)
MESA_SHADER_TYPES, true);
}
-
/**
- * Validate that outputs from one stage match inputs of another
+ * Accumulates the array of prog->UniformBlocks and checks that all
+ * definitons of blocks agree on their contents.
*/
-bool
-cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
- gl_shader *producer, gl_shader *consumer)
+static bool
+interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog)
{
- glsl_symbol_table parameters;
- /* 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);
+ unsigned max_num_uniform_blocks = 0;
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (prog->_LinkedShaders[i])
+ max_num_uniform_blocks += prog->_LinkedShaders[i]->NumUniformBlocks;
}
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ struct gl_shader *sh = prog->_LinkedShaders[i];
- /* 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();
+ prog->UniformBlockStageIndex[i] = ralloc_array(prog, int,
+ max_num_uniform_blocks);
+ for (unsigned int j = 0; j < max_num_uniform_blocks; j++)
+ prog->UniformBlockStageIndex[i][j] = -1;
- /* FINISHME: For geometry shaders, this should also look for inout
- * FINISHME: variables.
- */
- if ((input == NULL) || (input->mode != ir_var_in))
+ if (sh == NULL)
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. Applications 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(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;
- }
- }
+ for (unsigned int j = 0; j < sh->NumUniformBlocks; j++) {
+ int index = link_cross_validate_uniform_block(prog,
+ &prog->UniformBlocks,
+ &prog->NumUniformBlocks,
+ &sh->UniformBlocks[j]);
- /* Check that all of the qualifiers match between stages.
- */
- if (input->centroid != output->centroid) {
- linker_error(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");
+ if (index == -1) {
+ linker_error(prog, "uniform block `%s' has mismatching definitions",
+ sh->UniformBlocks[j].Name);
return false;
}
- if (input->invariant != output->invariant) {
- linker_error(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(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;
- }
+ prog->UniformBlockStageIndex[i][index] = j;
}
}
@@ -735,6 +865,8 @@ move_non_declarations(exec_list *instructions, exec_node *last,
continue;
assert(inst->as_assignment()
+ || inst->as_call()
+ || inst->as_if() /* for initializers with the ?: operator */
|| ((var != NULL) && (var->mode == ir_var_temporary)));
if (make_copies) {
@@ -786,6 +918,26 @@ get_main_function_signature(gl_shader *sh)
/**
+ * This class is only used in link_intrastage_shaders() below but declaring
+ * it inside that function leads to compiler warnings with some versions of
+ * gcc.
+ */
+class array_sizing_visitor : public ir_hierarchical_visitor {
+public:
+ virtual ir_visitor_status visit(ir_variable *var)
+ {
+ if (var->type->is_array() && (var->type->length == 0)) {
+ const glsl_type *type =
+ glsl_type::get_array_instance(var->type->fields.array,
+ var->max_array_access + 1);
+ assert(type != NULL);
+ var->type = type;
+ }
+ return visit_continue;
+ }
+};
+
+/**
* Combine a group of shaders for a single stage to generate a linked shader
*
* \note
@@ -799,11 +951,26 @@ link_intrastage_shaders(void *mem_ctx,
struct gl_shader **shader_list,
unsigned num_shaders)
{
+ struct gl_uniform_block *uniform_blocks = NULL;
+
/* Check that global variables defined in multiple shaders are consistent.
*/
if (!cross_validate_globals(prog, shader_list, num_shaders, false))
return NULL;
+ /* Check that interface blocks defined in multiple shaders are consistent.
+ */
+ if (!validate_intrastage_interface_blocks((const gl_shader **)shader_list,
+ num_shaders))
+ return NULL;
+
+ /* Check that uniform blocks between shaders for a stage agree. */
+ const int num_uniform_blocks =
+ link_uniform_blocks(mem_ctx, prog, shader_list, num_shaders,
+ &uniform_blocks);
+ if (num_uniform_blocks < 0)
+ return NULL;
+
/* Check that there is only a single definition of each function signature
* across all shaders.
*/
@@ -862,8 +1029,7 @@ link_intrastage_shaders(void *mem_ctx,
if (main == NULL) {
linker_error(prog, "%s shader lacks `main'\n",
- (shader_list[0]->Type == GL_VERTEX_SHADER)
- ? "vertex" : "fragment");
+ _mesa_glsl_shader_target_name(shader_list[0]->Type));
return NULL;
}
@@ -871,6 +1037,10 @@ link_intrastage_shaders(void *mem_ctx,
linked->ir = new(linked) exec_list;
clone_ir_list(mem_ctx, linked->ir, main->ir);
+ linked->UniformBlocks = uniform_blocks;
+ linked->NumUniformBlocks = num_uniform_blocks;
+ ralloc_steal(linked, linked->UniformBlocks);
+
populate_symbol_table(linked);
/* The a pointer to the main function in the final linked shader (i.e., the
@@ -922,27 +1092,18 @@ link_intrastage_shaders(void *mem_ctx,
free(linking_shaders);
+ /* At this point linked should contain all of the linked IR, so
+ * validate it to make sure nothing went wrong.
+ */
+ if (linked)
+ validate_ir_tree(linked->ir);
+
/* Make a pass over all variable declarations to ensure that arrays with
* unspecified sizes have a size specified. The size is inferred from the
* max_array_access field.
*/
if (linked != NULL) {
- class array_sizing_visitor : public ir_hierarchical_visitor {
- public:
- virtual ir_visitor_status visit(ir_variable *var)
- {
- if (var->type->is_array() && (var->type->length == 0)) {
- const glsl_type *type =
- glsl_type::get_array_instance(var->type->fields.array,
- var->max_array_access + 1);
-
- assert(type != NULL);
- var->type = type;
- }
-
- return visit_continue;
- }
- } v;
+ array_sizing_visitor v;
v.run(linked->ir);
}
@@ -950,13 +1111,6 @@ link_intrastage_shaders(void *mem_ctx,
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.
@@ -983,11 +1137,18 @@ update_array_sizes(struct gl_shader_program *prog)
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->mode != ir_var_shader_in &&
+ var->mode != ir_var_shader_out) ||
!var->type->is_array())
continue;
+ /* GL_ARB_uniform_buffer_object says that std140 uniforms
+ * will not be eliminated. Since we always do std140, just
+ * don't resize arrays in UBOs.
+ */
+ if (var->is_in_uniform_block())
+ continue;
+
unsigned int size = var->max_array_access;
for (unsigned j = 0; j < MESA_SHADER_TYPES; j++) {
if (prog->_LinkedShaders[j] == NULL)
@@ -1005,7 +1166,7 @@ update_array_sizes(struct gl_shader_program *prog)
}
}
- if (size + 1 != var->type->fields.array->length) {
+ if (size + 1 != var->type->length) {
/* If this is a built-in uniform (i.e., it's backed by some
* fixed-function state), adjust the number of state slots to
* match the new array size. The number of slots per array entry
@@ -1029,151 +1190,6 @@ update_array_sizes(struct gl_shader_program *prog)
}
}
-static void
-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)
-{
- 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 = ralloc_asprintf(mem_ctx, "%s.%s", name,
- type->fields.structure[i].name);
-
- add_uniform(mem_ctx, uniforms, ht, field_name, field_type,
- shader_type, next_shader_pos, total_uniforms);
- }
- } 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 = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
- add_uniform(mem_ctx, uniforms, ht, elem_name, array_elem_type,
- shader_type, next_shader_pos, total_uniforms);
- }
- return;
- }
- }
-
- /* 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->VertPos = -1;
- n->u->FragPos = -1;
- n->u->GeomPos = -1;
- (*total_uniforms)++;
-
- hash_table_insert(ht, n, name);
- uniforms->push_tail(& n->link);
- }
-
- switch (shader_type) {
- case GL_VERTEX_SHADER:
- n->u->VertPos = *next_shader_pos;
- break;
- case GL_FRAGMENT_SHADER:
- n->u->FragPos = *next_shader_pos;
- break;
- case GL_GEOMETRY_SHADER:
- n->u->GeomPos = *next_shader_pos;
- break;
- }
-
- (*next_shader_pos) += vec4_slots;
- }
-}
-
-void
-assign_uniform_locations(struct gl_shader_program *prog)
-{
- /* */
- exec_list uniforms;
- unsigned total_uniforms = 0;
- hash_table *ht = hash_table_ctor(32, hash_table_string_hash,
- hash_table_string_compare);
- void *mem_ctx = ralloc_context(NULL);
-
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
- if (prog->_LinkedShaders[i] == NULL)
- continue;
-
- unsigned next_position = 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 = next_position;
- add_uniform(mem_ctx, &uniforms, ht, var->name, var->type,
- prog->_LinkedShaders[i]->Type,
- &next_position, &total_uniforms);
- }
- }
-
- ralloc_free(mem_ctx);
-
- gl_uniform_list *ul = (gl_uniform_list *)
- calloc(1, sizeof(gl_uniform_list));
-
- ul->Size = total_uniforms;
- ul->NumUniforms = total_uniforms;
- ul->Uniforms = (gl_uniform *) calloc(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;
-}
-
-
/**
* Find a contiguous set of available bits in a bitmask.
*
@@ -1220,12 +1236,6 @@ find_available_slots(unsigned used_mask, unsigned needed_count)
* \return
* If locations are successfully assigned, true is returned. Otherwise an
* error is emitted to the shader link log and false is returned.
- *
- * \bug
- * Locations set via \c glBindFragDataLocation are not currently supported.
- * Only locations assigned automatically by the linker, explicitly set by a
- * layout qualifier, or explicitly set by a built-in variable (e.g., \c
- * gl_FragColor) are supported for fragment shaders.
*/
bool
assign_attribute_or_color_locations(gl_shader_program *prog,
@@ -1249,7 +1259,8 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
* 1. Invalidate the location assignments for all vertex shader inputs.
*
* 2. Assign locations for inputs that have user-defined (via
- * glBindVertexAttribLocation) locations.
+ * glBindVertexAttribLocation) locations and outputs that have
+ * user-defined locations (via glBindFragDataLocation).
*
* 3. Sort the attributes without assigned locations by number of slots
* required in decreasing order. Fragmentation caused by attribute
@@ -1263,75 +1274,9 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
? (int) VERT_ATTRIB_GENERIC0 : (int) FRAG_RESULT_DATA0;
const enum ir_variable_mode direction =
- (target_index == MESA_SHADER_VERTEX) ? ir_var_in : ir_var_out;
-
-
- invalidate_variable_locations(sh, direction, generic_base);
-
- if ((target_index == MESA_SHADER_VERTEX) && (prog->Attributes != NULL)) {
- for (unsigned i = 0; i < prog->Attributes->NumParameters; i++) {
- ir_variable *const var =
- sh->symbols->get_variable(prog->Attributes->Parameters[i].Name);
-
- /* Note: attributes that occupy multiple slots, such as arrays or
- * matrices, may appear in the attrib array multiple times.
- */
- if ((var == NULL) || (var->location != -1))
- 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 = prog->Attributes->Parameters[i].StateIndexes[0];
- const unsigned slots = count_attribute_slots(var->type);
+ (target_index == MESA_SHADER_VERTEX)
+ ? ir_var_shader_in : ir_var_shader_out;
- /* 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) != used_locations) {
- linker_error(prog,
- "insufficient contiguous attribute locations "
- "available for vertex shader input `%s'",
- var->name);
- return false;
- }
-
- var->location = VERT_ATTRIB_GENERIC0 + attr;
- used_locations |= (use_mask << attr);
- }
- }
/* Temporary storage for the set of attributes that need locations assigned.
*/
@@ -1359,28 +1304,102 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
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 - generic_base;
-
if ((var->location >= (int)(max_index + generic_base))
|| (var->location < 0)) {
linker_error(prog,
"invalid explicit location %d specified for `%s'\n",
- (var->location < 0) ? var->location : attr,
+ (var->location < 0)
+ ? var->location : var->location - generic_base,
var->name);
return false;
- } else if (var->location >= generic_base) {
- used_locations |= (use_mask << attr);
+ }
+ } else if (target_index == MESA_SHADER_VERTEX) {
+ unsigned binding;
+
+ if (prog->AttributeBindings->get(binding, var->name)) {
+ assert(binding >= VERT_ATTRIB_GENERIC0);
+ var->location = binding;
+ var->is_unmatched_generic_inout = 0;
+ }
+ } else if (target_index == MESA_SHADER_FRAGMENT) {
+ unsigned binding;
+ unsigned index;
+
+ if (prog->FragDataBindings->get(binding, var->name)) {
+ assert(binding >= FRAG_RESULT_DATA0);
+ var->location = binding;
+ var->is_unmatched_generic_inout = 0;
+
+ if (prog->FragDataIndexBindings->get(index, var->name)) {
+ var->index = index;
+ }
}
}
- /* The location was explicitly assigned, nothing to do here.
+ /* If the variable is not a built-in and has a location statically
+ * assigned in the shader (presumably via a layout qualifier), make sure
+ * that it doesn't collide with other assigned locations. Otherwise,
+ * add it to the list of variables that need linker-assigned locations.
*/
- if (var->location != -1)
+ const unsigned slots = count_attribute_slots(var->type);
+ if (var->location != -1) {
+ if (var->location >= generic_base && var->index < 1) {
+ /* 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
+ * FINISHME: attribute location aliasing (see comment above).
+ */
+ /* Mask representing the contiguous slots that will be used by
+ * this attribute.
+ */
+ const unsigned attr = var->location - generic_base;
+ 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) != used_locations) {
+ const char *const string = (target_index == MESA_SHADER_VERTEX)
+ ? "vertex shader input" : "fragment shader output";
+ linker_error(prog,
+ "insufficient contiguous locations "
+ "available for %s `%s' %d %d %d", string,
+ var->name, used_locations, use_mask, attr);
+ return false;
+ }
+
+ used_locations |= (use_mask << attr);
+ }
+
continue;
+ }
- to_assign[num_attr].slots = count_attribute_slots(var->type);
+ to_assign[num_attr].slots = slots;
to_assign[num_attr].var = var;
num_attr++;
}
@@ -1418,13 +1437,14 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
? "vertex shader input" : "fragment shader output";
linker_error(prog,
- "insufficient contiguous attribute locations "
+ "insufficient contiguous locations "
"available for %s `%s'",
string, to_assign[i].var->name);
return false;
}
to_assign[i].var->location = generic_base + location;
+ to_assign[i].var->is_unmatched_generic_inout = 0;
used_locations |= (use_mask << location);
}
@@ -1448,145 +1468,191 @@ demote_shader_inputs_and_outputs(gl_shader *sh, enum ir_variable_mode mode)
* its value is used by other shader stages. This will cause the variable
* to have a location assigned.
*/
- if (var->location == -1) {
+ if (var->is_unmatched_generic_inout) {
var->mode = ir_var_auto;
}
}
}
-bool
-assign_varying_locations(struct gl_context *ctx,
- struct gl_shader_program *prog,
- gl_shader *producer, gl_shader *consumer)
+/**
+ * Store the gl_FragDepth layout in the gl_shader_program struct.
+ */
+static void
+store_fragdepth_layout(struct gl_shader_program *prog)
{
- /* FINISHME: Set dynamically when geometry shader support is added. */
- unsigned output_index = VERT_RESULT_VAR0;
- unsigned input_index = FRAG_ATTRIB_VAR0;
+ if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
+ return;
+ }
- /* 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.
+ struct exec_list *ir = prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
+
+ /* We don't look up the gl_FragDepth symbol directly because if
+ * gl_FragDepth is not used in the shader, it's removed from the IR.
+ * However, the symbol won't be removed from the symbol table.
*
- * 3. Mark input variables in the consumer that do not have locations as
- * not being inputs. This lets the optimizer eliminate them.
+ * We're only interested in the cases where the variable is NOT removed
+ * from the IR.
*/
+ foreach_list(node, ir) {
+ ir_variable *const var = ((ir_instruction *) node)->as_variable();
- invalidate_variable_locations(producer, ir_var_out, VERT_RESULT_VAR0);
- invalidate_variable_locations(consumer, ir_var_in, FRAG_ATTRIB_VAR0);
-
- foreach_list(node, producer->ir) {
- ir_variable *const output_var = ((ir_instruction *) node)->as_variable();
+ if (var == NULL || var->mode != ir_var_shader_out) {
+ continue;
+ }
- if ((output_var == NULL) || (output_var->mode != ir_var_out)
- || (output_var->location != -1))
- continue;
+ if (strcmp(var->name, "gl_FragDepth") == 0) {
+ switch (var->depth_layout) {
+ case ir_depth_layout_none:
+ prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_NONE;
+ return;
+ case ir_depth_layout_any:
+ prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_ANY;
+ return;
+ case ir_depth_layout_greater:
+ prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_GREATER;
+ return;
+ case ir_depth_layout_less:
+ prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_LESS;
+ return;
+ case ir_depth_layout_unchanged:
+ prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_UNCHANGED;
+ return;
+ default:
+ assert(0);
+ return;
+ }
+ }
+ }
+}
- ir_variable *const input_var =
- consumer->symbols->get_variable(output_var->name);
+/**
+ * Validate the resources used by a program versus the implementation limits
+ */
+static bool
+check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
+{
+ static const char *const shader_names[MESA_SHADER_TYPES] = {
+ "vertex", "geometry", "fragment"
+ };
- if ((input_var == NULL) || (input_var->mode != ir_var_in))
- continue;
+ const unsigned max_samplers[MESA_SHADER_TYPES] = {
+ ctx->Const.VertexProgram.MaxTextureImageUnits,
+ ctx->Const.GeometryProgram.MaxTextureImageUnits,
+ ctx->Const.FragmentProgram.MaxTextureImageUnits
+ };
- assert(input_var->location == -1);
+ const unsigned max_default_uniform_components[MESA_SHADER_TYPES] = {
+ ctx->Const.VertexProgram.MaxUniformComponents,
+ ctx->Const.GeometryProgram.MaxUniformComponents,
+ ctx->Const.FragmentProgram.MaxUniformComponents
+ };
- output_var->location = output_index;
- input_var->location = input_index;
+ const unsigned max_combined_uniform_components[MESA_SHADER_TYPES] = {
+ ctx->Const.VertexProgram.MaxCombinedUniformComponents,
+ ctx->Const.GeometryProgram.MaxCombinedUniformComponents,
+ ctx->Const.FragmentProgram.MaxCombinedUniformComponents
+ };
- /* FINISHME: Support for "varying" records in GLSL 1.50. */
- assert(!output_var->type->is_record());
+ const unsigned max_uniform_blocks[MESA_SHADER_TYPES] = {
+ ctx->Const.VertexProgram.MaxUniformBlocks,
+ ctx->Const.GeometryProgram.MaxUniformBlocks,
+ ctx->Const.FragmentProgram.MaxUniformBlocks
+ };
- if (output_var->type->is_array()) {
- const unsigned slots = output_var->type->length
- * output_var->type->fields.array->matrix_columns;
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ struct gl_shader *sh = prog->_LinkedShaders[i];
- output_index += slots;
- input_index += slots;
- } else {
- const unsigned slots = output_var->type->matrix_columns;
+ if (sh == NULL)
+ continue;
- output_index += slots;
- input_index += slots;
+ if (sh->num_samplers > max_samplers[i]) {
+ linker_error(prog, "Too many %s shader texture samplers",
+ shader_names[i]);
}
- }
- unsigned varying_vectors = 0;
+ if (sh->num_uniform_components > max_default_uniform_components[i]) {
+ if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) {
+ linker_warning(prog, "Too many %s shader default uniform block "
+ "components, but the driver will try to optimize "
+ "them out; this is non-portable out-of-spec "
+ "behavior\n",
+ shader_names[i]);
+ } else {
+ linker_error(prog, "Too many %s shader default uniform block "
+ "components",
+ shader_names[i]);
+ }
+ }
- foreach_list(node, consumer->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ if (sh->num_combined_uniform_components >
+ max_combined_uniform_components[i]) {
+ if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) {
+ linker_warning(prog, "Too many %s shader uniform components, "
+ "but the driver will try to optimize them out; "
+ "this is non-portable out-of-spec behavior\n",
+ shader_names[i]);
+ } else {
+ linker_error(prog, "Too many %s shader uniform components",
+ shader_names[i]);
+ }
+ }
+ }
- if ((var == NULL) || (var->mode != ir_var_in))
- continue;
+ unsigned blocks[MESA_SHADER_TYPES] = {0};
+ unsigned total_uniform_blocks = 0;
- 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(prog, "fragment shader varying %s not written "
- "by vertex shader\n.", var->name);
+ for (unsigned i = 0; i < prog->NumUniformBlocks; i++) {
+ for (unsigned j = 0; j < MESA_SHADER_TYPES; j++) {
+ if (prog->UniformBlockStageIndex[j][i] != -1) {
+ blocks[j]++;
+ total_uniform_blocks++;
}
-
- /* An 'in' variable is only really a shader input if its
- * value is written by the previous stage.
- */
- var->mode = ir_var_auto;
- } else {
- /* The packing rules are used for vertex shader inputs are also used
- * for fragment shader inputs.
- */
- varying_vectors += count_attribute_slots(var->type);
}
- }
- if (ctx->API == API_OPENGLES2 || prog->Version == 100) {
- if (varying_vectors > ctx->Const.MaxVarying) {
- linker_error(prog, "shader uses too many varying vectors "
- "(%u > %u)\n",
- varying_vectors, ctx->Const.MaxVarying);
- return false;
- }
- } else {
- const unsigned float_components = varying_vectors * 4;
- if (float_components > ctx->Const.MaxVarying * 4) {
- linker_error(prog, "shader uses too many varying components "
- "(%u > %u)\n",
- float_components, ctx->Const.MaxVarying * 4);
- return false;
+ if (total_uniform_blocks > ctx->Const.MaxCombinedUniformBlocks) {
+ linker_error(prog, "Too many combined uniform blocks (%d/%d)",
+ prog->NumUniformBlocks,
+ ctx->Const.MaxCombinedUniformBlocks);
+ } else {
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (blocks[i] > max_uniform_blocks[i]) {
+ linker_error(prog, "Too many %s uniform blocks (%d/%d)",
+ shader_names[i],
+ blocks[i],
+ max_uniform_blocks[i]);
+ break;
+ }
+ }
}
}
- return true;
+ return prog->LinkStatus;
}
-
void
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
{
+ tfeedback_decl *tfeedback_decls = NULL;
+ unsigned num_tfeedback_decls = prog->TransformFeedback.NumVarying;
+
void *mem_ctx = ralloc_context(NULL); // temporary linker context
prog->LinkStatus = false;
prog->Validated = false;
prog->_Used = false;
- if (prog->InfoLog != NULL)
- ralloc_free(prog->InfoLog);
-
+ ralloc_free(prog->InfoLog);
prog->InfoLog = ralloc_strdup(NULL, "");
+ ralloc_free(prog->UniformBlocks);
+ prog->UniformBlocks = NULL;
+ prog->NumUniformBlocks = 0;
+ for (int i = 0; i < MESA_SHADER_TYPES; i++) {
+ ralloc_free(prog->UniformBlockStageIndex[i]);
+ prog->UniformBlockStageIndex[i] = NULL;
+ }
+
/* Separate the shaders into groups based on their type.
*/
struct gl_shader **vert_shader_list;
@@ -1600,10 +1666,18 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
unsigned min_version = UINT_MAX;
unsigned max_version = 0;
+ const bool is_es_prog =
+ (prog->NumShaders > 0 && prog->Shaders[0]->IsES) ? true : false;
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);
+ if (prog->Shaders[i]->IsES != is_es_prog) {
+ linker_error(prog, "all shaders must use same shading "
+ "language version\n");
+ goto done;
+ }
+
switch (prog->Shaders[i]->Type) {
case GL_VERTEX_SHADER:
vert_shader_list[num_vert_shaders] = prog->Shaders[i];
@@ -1623,10 +1697,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
/* 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.
+ *
+ * GLSL ES has never allowed mixing of shading language versions.
*/
- assert(min_version >= 100);
- assert(max_version <= 130);
- if ((max_version >= 130 || min_version == 100)
+ if ((is_es_prog || max_version >= 130)
&& min_version != max_version) {
linker_error(prog, "all shaders must use same shading "
"language version\n");
@@ -1634,6 +1708,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
}
prog->Version = max_version;
+ prog->IsES = is_es_prog;
for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
if (prog->_LinkedShaders[i] != NULL)
@@ -1693,6 +1768,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (prog->_LinkedShaders[i] == NULL)
continue;
+ if (!validate_interstage_interface_blocks(prog->_LinkedShaders[prev],
+ prog->_LinkedShaders[i])) {
+ linker_error(prog, "interface block mismatch between shader stages\n");
+ goto done;
+ }
+
if (!cross_validate_outputs_to_inputs(prog,
prog->_LinkedShaders[prev],
prog->_LinkedShaders[i]))
@@ -1704,6 +1785,28 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
prog->LinkStatus = true;
}
+
+ for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (prog->_LinkedShaders[i] != NULL)
+ lower_named_interface_blocks(mem_ctx, prog->_LinkedShaders[i]);
+ }
+
+ /* Implement the GLSL 1.30+ rule for discard vs infinite loops Do
+ * it before optimization because we want most of the checks to get
+ * dropped thanks to constant propagation.
+ *
+ * This rule also applies to GLSL ES 3.00.
+ */
+ if (max_version >= (is_es_prog ? 300 : 130)) {
+ struct gl_shader *sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ if (sh) {
+ lower_discard_flow(sh->ir);
+ }
+ }
+
+ if (!interstage_cross_validate_uniform_blocks(prog))
+ goto done;
+
/* Do common optimization before assigning storage for attributes,
* uniforms, and varyings. Later optimization could possibly make
* some of that unused.
@@ -1716,13 +1819,28 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (!prog->LinkStatus)
goto done;
- while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, 32))
+ if (ctx->ShaderCompilerOptions[i].LowerClipDistance) {
+ lower_clip_distance(prog->_LinkedShaders[i]);
+ }
+
+ unsigned max_unroll = ctx->ShaderCompilerOptions[i].MaxUnrollIterations;
+
+ while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll, &ctx->ShaderCompilerOptions[i]))
;
}
- update_array_sizes(prog);
-
- assign_uniform_locations(prog);
+ /* Mark all generic shader inputs and outputs as unpaired. */
+ if (prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL) {
+ link_invalidate_variable_locations(
+ prog->_LinkedShaders[MESA_SHADER_VERTEX],
+ VERT_ATTRIB_GENERIC0, VARYING_SLOT_VAR0);
+ }
+ /* FINISHME: Geometry shaders not implemented yet */
+ if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] != NULL) {
+ link_invalidate_variable_locations(
+ prog->_LinkedShaders[MESA_SHADER_FRAGMENT],
+ VARYING_SLOT_VAR0, FRAG_RESULT_DATA0);
+ }
/* FINISHME: The value of the max_attribute_index parameter is
* FINISHME: implementation dependent based on the value of
@@ -1733,53 +1851,135 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
goto done;
}
- if (!assign_attribute_or_color_locations(prog, MESA_SHADER_FRAGMENT, ctx->Const.MaxDrawBuffers)) {
+ if (!assign_attribute_or_color_locations(prog, MESA_SHADER_FRAGMENT, MAX2(ctx->Const.MaxDrawBuffers, ctx->Const.MaxDualSourceDrawBuffers))) {
goto done;
}
- unsigned prev;
- for (prev = 0; prev < MESA_SHADER_TYPES; prev++) {
- if (prog->_LinkedShaders[prev] != NULL)
+ unsigned first;
+ for (first = 0; first < MESA_SHADER_TYPES; first++) {
+ if (prog->_LinkedShaders[first] != NULL)
break;
}
- for (unsigned i = prev + 1; i < MESA_SHADER_TYPES; i++) {
- if (prog->_LinkedShaders[i] == NULL)
- continue;
-
- if (!assign_varying_locations(ctx, prog,
- prog->_LinkedShaders[prev],
- prog->_LinkedShaders[i])) {
- goto done;
+ if (num_tfeedback_decls != 0) {
+ /* From GL_EXT_transform_feedback:
+ * A program will fail to link if:
+ *
+ * * the <count> specified by TransformFeedbackVaryingsEXT is
+ * non-zero, but the program object has no vertex or geometry
+ * shader;
+ */
+ if (first >= MESA_SHADER_FRAGMENT) {
+ linker_error(prog, "Transform feedback varyings specified, but "
+ "no vertex or geometry shader is present.");
+ goto done;
}
- prev = i;
+ tfeedback_decls = ralloc_array(mem_ctx, tfeedback_decl,
+ prog->TransformFeedback.NumVarying);
+ if (!parse_tfeedback_decls(ctx, prog, mem_ctx, num_tfeedback_decls,
+ prog->TransformFeedback.VaryingNames,
+ tfeedback_decls))
+ goto done;
}
- if (prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL) {
- demote_shader_inputs_and_outputs(prog->_LinkedShaders[MESA_SHADER_VERTEX],
- ir_var_out);
+ /* Linking the stages in the opposite order (from fragment to vertex)
+ * ensures that inter-shader outputs written to in an earlier stage are
+ * eliminated if they are (transitively) not used in a later stage.
+ */
+ int last, next;
+ for (last = MESA_SHADER_TYPES-1; last >= 0; last--) {
+ if (prog->_LinkedShaders[last] != NULL)
+ break;
}
- if (prog->_LinkedShaders[MESA_SHADER_GEOMETRY] != NULL) {
- gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_GEOMETRY];
+ if (last >= 0 && last < MESA_SHADER_FRAGMENT) {
+ gl_shader *const sh = prog->_LinkedShaders[last];
+
+ if (num_tfeedback_decls != 0) {
+ /* There was no fragment shader, but we still have to assign varying
+ * locations for use by transform feedback.
+ */
+ if (!assign_varying_locations(ctx, mem_ctx, prog,
+ sh, NULL,
+ num_tfeedback_decls, tfeedback_decls))
+ goto done;
+ }
+
+ do_dead_builtin_varyings(ctx, sh, NULL,
+ num_tfeedback_decls, tfeedback_decls);
+
+ demote_shader_inputs_and_outputs(sh, ir_var_shader_out);
- 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);
+ /* Eliminate code that is now dead due to unused outputs being demoted.
+ */
+ while (do_dead_code(sh->ir, false))
+ ;
}
+ else if (first == MESA_SHADER_FRAGMENT) {
+ /* If the program only contains a fragment shader...
+ */
+ gl_shader *const sh = prog->_LinkedShaders[first];
- if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] != NULL) {
- gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ do_dead_builtin_varyings(ctx, NULL, sh,
+ num_tfeedback_decls, tfeedback_decls);
+
+ demote_shader_inputs_and_outputs(sh, ir_var_shader_in);
- demote_shader_inputs_and_outputs(sh, ir_var_in);
+ while (do_dead_code(sh->ir, false))
+ ;
}
+ next = last;
+ for (int i = next - 1; i >= 0; i--) {
+ if (prog->_LinkedShaders[i] == NULL)
+ continue;
+
+ gl_shader *const sh_i = prog->_LinkedShaders[i];
+ gl_shader *const sh_next = prog->_LinkedShaders[next];
+
+ if (!assign_varying_locations(ctx, mem_ctx, prog, sh_i, sh_next,
+ next == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0,
+ tfeedback_decls))
+ goto done;
+
+ do_dead_builtin_varyings(ctx, sh_i, sh_next,
+ next == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0,
+ tfeedback_decls);
+
+ demote_shader_inputs_and_outputs(sh_i, ir_var_shader_out);
+ demote_shader_inputs_and_outputs(sh_next, ir_var_shader_in);
+
+ /* Eliminate code that is now dead due to unused outputs being demoted.
+ */
+ while (do_dead_code(sh_i->ir, false))
+ ;
+ while (do_dead_code(sh_next->ir, false))
+ ;
+
+ /* This must be done after all dead varyings are eliminated. */
+ if (!check_against_varying_limit(ctx, prog, sh_next))
+ goto done;
+
+ next = i;
+ }
+
+ if (!store_tfeedback_info(ctx, prog, num_tfeedback_decls, tfeedback_decls))
+ goto done;
+
+ update_array_sizes(prog);
+ link_assign_uniform_locations(prog);
+ store_fragdepth_layout(prog);
+
+ if (!check_resources(ctx, prog))
+ goto done;
+
/* OpenGL ES requires that a vertex shader and a fragment shader both be
- * present in a linked program. By checking for use of shading language
- * version 1.00, we also catch the GL_ARB_ES2_compatibility case.
+ * present in a linked program. By checking prog->IsES, we also
+ * catch the GL_ARB_ES2_compatibility case.
*/
- if (ctx->API == API_OPENGLES2 || prog->Version == 100) {
+ if (!prog->InternalSeparateShader &&
+ (ctx->API == API_OPENGLES2 || prog->IsES)) {
if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
linker_error(prog, "program lacks a vertex shader\n");
} else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
@@ -1798,6 +1998,14 @@ done:
/* Retain any live IR, but trash the rest. */
reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir);
+
+ /* The symbol table in the linked shaders may contain references to
+ * variables that were removed (e.g., unused uniforms). Since it may
+ * contain junk, there is no possible valid use. Delete it and set the
+ * pointer to NULL.
+ */
+ delete prog->_LinkedShaders[i]->symbols;
+ prog->_LinkedShaders[i]->symbols = NULL;
}
ralloc_free(mem_ctx);
diff --git a/dist/Mesa/src/glsl/linker.h b/dist/Mesa/src/glsl/linker.h
index 769cf68b6..c55ba227d 100644
--- a/dist/Mesa/src/glsl/linker.h
+++ b/dist/Mesa/src/glsl/linker.h
@@ -1,3 +1,4 @@
+/* -*- c++ -*- */
/*
* Copyright © 2010 Intel Corporation
*
@@ -29,4 +30,143 @@ extern bool
link_function_calls(gl_shader_program *prog, gl_shader *main,
gl_shader **shader_list, unsigned num_shaders);
+extern void
+link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
+ int generic_base);
+
+extern void
+link_assign_uniform_locations(struct gl_shader_program *prog);
+
+extern void
+link_set_uniform_initializers(struct gl_shader_program *prog);
+
+extern int
+link_cross_validate_uniform_block(void *mem_ctx,
+ struct gl_uniform_block **linked_blocks,
+ unsigned int *num_linked_blocks,
+ struct gl_uniform_block *new_block);
+
+void
+link_assign_uniform_block_offsets(struct gl_shader *shader);
+
+extern bool
+link_uniform_blocks_are_compatible(const gl_uniform_block *a,
+ const gl_uniform_block *b);
+
+extern int
+link_uniform_blocks(void *mem_ctx,
+ struct gl_shader_program *prog,
+ struct gl_shader **shader_list,
+ unsigned num_shaders,
+ struct gl_uniform_block **blocks_ret);
+
+bool
+validate_intrastage_interface_blocks(const gl_shader **shader_list,
+ unsigned num_shaders);
+
+bool
+validate_interstage_interface_blocks(const gl_shader *producer,
+ const gl_shader *consumer);
+
+/**
+ * Class for processing all of the leaf fields of a variable that corresponds
+ * to a program resource.
+ *
+ * The leaf fields are all the parts of the variable that the application
+ * could query using \c glGetProgramResourceIndex (or that could be returned
+ * by \c glGetProgramResourceName).
+ *
+ * Classes my derive from this class to implement specific functionality.
+ * This class only provides the mechanism to iterate over the leaves. Derived
+ * classes must implement \c ::visit_field and may override \c ::process.
+ */
+class program_resource_visitor {
+public:
+ /**
+ * Begin processing a variable
+ *
+ * Classes that overload this function should call \c ::process from the
+ * base class to start the recursive processing of the variable.
+ *
+ * \param var The variable that is to be processed
+ *
+ * Calls \c ::visit_field for each leaf of the variable.
+ *
+ * \warning
+ * When processing a uniform block, this entry should only be used in cases
+ * where the row / column ordering of matrices in the block does not
+ * matter. For example, enumerating the names of members of the block, but
+ * not for determining the offsets of members.
+ */
+ void process(ir_variable *var);
+
+ /**
+ * Begin processing a variable of a structured type.
+ *
+ * This flavor of \c process should be used to handle structured types
+ * (i.e., structures, interfaces, or arrays there of) that need special
+ * name handling. A common usage is to handle cases where the block name
+ * (instead of the instance name) is used for an interface block.
+ *
+ * \param type Type that is to be processed, associated with \c name
+ * \param name Base name of the structured variable being processed
+ *
+ * \note
+ * \c type must be \c GLSL_TYPE_RECORD, \c GLSL_TYPE_INTERFACE, or an array
+ * there of.
+ */
+ void process(const glsl_type *type, const char *name);
+
+protected:
+ /**
+ * Method invoked for each leaf of the variable
+ *
+ * \param type Type of the field.
+ * \param name Fully qualified name of the field.
+ * \param row_major For a matrix type, is it stored row-major.
+ * \param record_type Type of the record containing the field.
+ *
+ * The default implementation just calls the other \c visit_field method.
+ */
+ virtual void visit_field(const glsl_type *type, const char *name,
+ bool row_major, const glsl_type *record_type);
+
+ /**
+ * Method invoked for each leaf of the variable
+ *
+ * \param type Type of the field.
+ * \param name Fully qualified name of the field.
+ * \param row_major For a matrix type, is it stored row-major.
+ */
+ virtual void visit_field(const glsl_type *type, const char *name,
+ bool row_major) = 0;
+
+ /**
+ * Visit a record before visiting its fields
+ *
+ * For structures-of-structures or interfaces-of-structures, this visits
+ * the inner structure before visiting its fields.
+ *
+ * The default implementation does nothing.
+ */
+ virtual void visit_field(const glsl_struct_field *field);
+
+private:
+ /**
+ * \param name_length Length of the current name \b not including the
+ * terminating \c NUL character.
+ */
+ void recursion(const glsl_type *t, char **name, size_t name_length,
+ bool row_major, const glsl_type *record_type);
+};
+
+void
+linker_error(gl_shader_program *prog, const char *fmt, ...);
+
+void
+linker_warning(gl_shader_program *prog, const char *fmt, ...);
+
+unsigned
+count_attribute_slots(const glsl_type *t);
+
#endif /* GLSL_LINKER_H */
diff --git a/dist/Mesa/src/glsl/loop_analysis.cpp b/dist/Mesa/src/glsl/loop_analysis.cpp
index 9bba6a97c..40897bb6f 100644
--- a/dist/Mesa/src/glsl/loop_analysis.cpp
+++ b/dist/Mesa/src/glsl/loop_analysis.cpp
@@ -105,11 +105,13 @@ loop_variable_state::insert(ir_if *if_stmt)
class loop_analysis : public ir_hierarchical_visitor {
public:
- loop_analysis();
+ loop_analysis(loop_state *loops);
virtual ir_visitor_status visit(ir_loop_jump *);
virtual ir_visitor_status visit(ir_dereference_variable *);
+ virtual ir_visitor_status visit_enter(ir_call *);
+
virtual ir_visitor_status visit_enter(ir_loop *);
virtual ir_visitor_status visit_leave(ir_loop *);
virtual ir_visitor_status visit_enter(ir_assignment *);
@@ -127,12 +129,10 @@ public:
};
-loop_analysis::loop_analysis()
+loop_analysis::loop_analysis(loop_state *loops)
+ : loops(loops), if_statement_depth(0), current_assignment(NULL)
{
- this->loops = new loop_state;
-
- this->if_statement_depth = 0;
- this->current_assignment = NULL;
+ /* empty */
}
@@ -153,6 +153,21 @@ loop_analysis::visit(ir_loop_jump *ir)
ir_visitor_status
+loop_analysis::visit_enter(ir_call *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();
+
+ ls->contains_calls = true;
+ return visit_continue_with_parent;
+}
+
+
+ir_visitor_status
loop_analysis::visit(ir_dereference_variable *ir)
{
/* If we're not somewhere inside a loop, there's nothing to do.
@@ -209,6 +224,17 @@ loop_analysis::visit_leave(ir_loop *ir)
loop_variable_state *const ls =
(loop_variable_state *) this->state.pop_head();
+ /* Function calls may contain side effects. These could alter any of our
+ * variables in ways that cannot be known, and may even terminate shader
+ * execution (say, calling discard in the fragment shader). So we can't
+ * rely on any of our analysis about assignments to variables.
+ *
+ * We could perform some conservative analysis (prove there's no statically
+ * possible assignment, etc.) but it isn't worth it for now; function
+ * inlining will allow us to unroll loops anyway.
+ */
+ if (ls->contains_calls)
+ return visit_continue;
foreach_list(node, &ir->body_instructions) {
/* Skip over declarations at the start of a loop.
@@ -477,7 +503,8 @@ is_loop_terminator(ir_if *ir)
ir_instruction *const inst =
(ir_instruction *) ir->then_instructions.get_head();
- assert(inst != NULL);
+ if (inst == NULL)
+ return false;
if (inst->ir_type != ir_type_loop_jump)
return false;
@@ -493,7 +520,8 @@ is_loop_terminator(ir_if *ir)
loop_state *
analyze_loop_variables(exec_list *instructions)
{
- loop_analysis v;
+ loop_state *loops = new loop_state;
+ loop_analysis v(loops);
v.run(instructions);
return v.loops;
diff --git a/dist/Mesa/src/glsl/loop_analysis.h b/dist/Mesa/src/glsl/loop_analysis.h
index 229730836..769d62661 100644
--- a/dist/Mesa/src/glsl/loop_analysis.h
+++ b/dist/Mesa/src/glsl/loop_analysis.h
@@ -122,10 +122,16 @@ public:
*/
unsigned num_loop_jumps;
+ /**
+ * Whether this loop contains any function calls.
+ */
+ bool contains_calls;
+
loop_variable_state()
{
this->max_iterations = -1;
this->num_loop_jumps = 0;
+ this->contains_calls = false;
this->var_hash = hash_table_ctor(0, hash_table_pointer_hash,
hash_table_pointer_compare);
}
@@ -134,6 +140,23 @@ public:
{
hash_table_dtor(this->var_hash);
}
+
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *lvs = ralloc_size(ctx, size);
+ assert(lvs != NULL);
+
+ ralloc_set_destructor(lvs, (void (*)(void*)) destructor);
+
+ return lvs;
+ }
+
+private:
+ static void
+ destructor(loop_variable_state *lvs)
+ {
+ lvs->~loop_variable_state();
+ }
};
@@ -226,7 +249,7 @@ private:
void *mem_ctx;
- friend class loop_analysis;
+ friend loop_state *analyze_loop_variables(exec_list *instructions);
};
#endif /* LOOP_ANALYSIS_H */
diff --git a/dist/Mesa/src/glsl/lower_if_to_cond_assign.cpp b/dist/Mesa/src/glsl/lower_if_to_cond_assign.cpp
index b637eb4fe..2c5d5612d 100644
--- a/dist/Mesa/src/glsl/lower_if_to_cond_assign.cpp
+++ b/dist/Mesa/src/glsl/lower_if_to_cond_assign.cpp
@@ -47,6 +47,7 @@
#include "glsl_types.h"
#include "ir.h"
+#include "program/hash_table.h"
class ir_if_to_cond_assign_visitor : public ir_hierarchical_visitor {
public:
@@ -55,6 +56,14 @@ public:
this->progress = false;
this->max_depth = max_depth;
this->depth = 0;
+
+ this->condition_variables = hash_table_ctor(0, hash_table_pointer_hash,
+ hash_table_pointer_compare);
+ }
+
+ ~ir_if_to_cond_assign_visitor()
+ {
+ hash_table_dtor(this->condition_variables);
}
ir_visitor_status visit_enter(ir_if *);
@@ -63,11 +72,16 @@ public:
bool progress;
unsigned max_depth;
unsigned depth;
+
+ struct hash_table *condition_variables;
};
bool
lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth)
{
+ if (max_depth == UINT_MAX)
+ return false;
+
ir_if_to_cond_assign_visitor v(max_depth);
visit_list_elements(&v, instructions);
@@ -94,40 +108,43 @@ check_control_flow(ir_instruction *ir, void *data)
void
move_block_to_cond_assign(void *mem_ctx,
- ir_if *if_ir, ir_variable *cond_var, bool then)
+ ir_if *if_ir, ir_rvalue *cond_expr,
+ exec_list *instructions,
+ struct hash_table *ht)
{
- 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();
+ foreach_list_safe(node, instructions) {
+ ir_instruction *ir = (ir_instruction *) node;
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);
+ if (hash_table_find(ht, assign) == NULL) {
+ hash_table_insert(ht, assign, assign);
+
+ /* If the LHS of the assignment is a condition variable that was
+ * previously added, insert an additional assignment of false to
+ * the variable.
+ */
+ const bool assign_to_cv =
+ hash_table_find(ht, assign->lhs->variable_referenced()) != NULL;
+
+ if (!assign->condition) {
+ if (assign_to_cv) {
+ assign->rhs =
+ new(mem_ctx) ir_expression(ir_binop_logic_and,
+ glsl_type::bool_type,
+ cond_expr->clone(mem_ctx, NULL),
+ assign->rhs);
+ } else {
+ assign->condition = cond_expr->clone(mem_ctx, NULL);
+ }
+ } else {
+ assign->condition =
+ new(mem_ctx) ir_expression(ir_binop_logic_and,
+ glsl_type::bool_type,
+ cond_expr->clone(mem_ctx, NULL),
+ assign->condition);
+ }
}
}
@@ -142,6 +159,7 @@ ir_if_to_cond_assign_visitor::visit_enter(ir_if *ir)
{
(void) ir;
this->depth++;
+
return visit_continue;
}
@@ -153,9 +171,7 @@ ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
return visit_continue;
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) {
@@ -171,24 +187,62 @@ ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
void *mem_ctx = ralloc_parent(ir);
- /* Store the condition to a variable so the assignment conditions are
- * simpler.
+ /* Store the condition to a variable. Move all of the instructions from
+ * the then-clause of the if-statement. Use the condition variable as a
+ * condition for all assignments.
*/
- 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_variable *const then_var =
+ new(mem_ctx) ir_variable(glsl_type::bool_type,
+ "if_to_cond_assign_then",
+ ir_var_temporary);
+ ir->insert_before(then_var);
+
+ ir_dereference_variable *then_cond =
+ new(mem_ctx) ir_dereference_variable(then_var);
+
+ assign = new(mem_ctx) ir_assignment(then_cond, ir->condition);
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, then_cond,
+ &ir->then_instructions,
+ this->condition_variables);
+
+ /* Add the new condition variable to the hash table. This allows us to
+ * find this variable when lowering other (enclosing) if-statements.
+ */
+ hash_table_insert(this->condition_variables, then_var, then_var);
+
+ /* If there are instructions in the else-clause, store the inverse of the
+ * condition to a variable. Move all of the instructions from the
+ * else-clause if the if-statement. Use the (inverse) condition variable
+ * as a condition for all assignments.
*/
- move_block_to_cond_assign(mem_ctx, ir, cond_var, true);
- move_block_to_cond_assign(mem_ctx, ir, cond_var, false);
+ if (!ir->else_instructions.is_empty()) {
+ ir_variable *const else_var =
+ new(mem_ctx) ir_variable(glsl_type::bool_type,
+ "if_to_cond_assign_else",
+ ir_var_temporary);
+ ir->insert_before(else_var);
+
+ ir_dereference_variable *else_cond =
+ new(mem_ctx) ir_dereference_variable(else_var);
+
+ ir_rvalue *inverse =
+ new(mem_ctx) ir_expression(ir_unop_logic_not,
+ then_cond->clone(mem_ctx, NULL));
+
+ assign = new(mem_ctx) ir_assignment(else_cond, inverse);
+ ir->insert_before(assign);
+
+ move_block_to_cond_assign(mem_ctx, ir, else_cond,
+ &ir->else_instructions,
+ this->condition_variables);
+
+ /* Add the new condition variable to the hash table. This allows us to
+ * find this variable when lowering other (enclosing) if-statements.
+ */
+ hash_table_insert(this->condition_variables, else_var, else_var);
+ }
ir->remove();
diff --git a/dist/Mesa/src/glsl/lower_instructions.cpp b/dist/Mesa/src/glsl/lower_instructions.cpp
index ab2fc7c8c..d32ec80d6 100644
--- a/dist/Mesa/src/glsl/lower_instructions.cpp
+++ b/dist/Mesa/src/glsl/lower_instructions.cpp
@@ -32,10 +32,13 @@
* Currently supported transformations:
* - SUB_TO_ADD_NEG
* - DIV_TO_MUL_RCP
+ * - INT_DIV_TO_MUL_RCP
* - EXP_TO_EXP2
* - POW_TO_EXP2
* - LOG_TO_LOG2
* - MOD_TO_FRACT
+ * - LRP_TO_ARITH
+ * - BITFIELD_INSERT_TO_BFM_BFI
*
* SUB_TO_ADD_NEG:
* ---------------
@@ -47,15 +50,19 @@
* 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)).
+ * DIV_TO_MUL_RCP and INT_DIV_TO_MUL_RCP:
+ * --------------------------------------
+ * Breaks an ir_binop_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.
*
+ * DIV_TO_MUL_RCP only lowers floating point division; INT_DIV_TO_MUL_RCP
+ * handles the integer case, converting to and from floating point so that
+ * RCP is possible.
+ *
* EXP_TO_EXP2 and LOG_TO_LOG2:
* ----------------------------
* Many GPUs don't have a base e log or exponent instruction, but they
@@ -69,18 +76,34 @@
*
* MOD_TO_FRACT:
* -------------
- * Breaks an ir_unop_mod expression down to (op1 * fract(op0 / op1))
+ * Breaks an ir_binop_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.
+ *
+ * LRP_TO_ARITH:
+ * -------------
+ * Converts ir_triop_lrp to (op0 * (1.0f - op2)) + (op1 * op2).
+ *
+ * BITFIELD_INSERT_TO_BFM_BFI:
+ * ---------------------------
+ * Breaks ir_quadop_bitfield_insert into ir_binop_bfm (bitfield mask) and
+ * ir_triop_bfi (bitfield insert).
+ *
+ * Many GPUs implement the bitfieldInsert() built-in from ARB_gpu_shader_5
+ * with a pair of instructions.
+ *
*/
#include "main/core.h" /* for M_LOG2E */
#include "glsl_types.h"
#include "ir.h"
+#include "ir_builder.h"
#include "ir_optimization.h"
+using namespace ir_builder;
+
class lower_instructions_visitor : public ir_hierarchical_visitor {
public:
lower_instructions_visitor(unsigned lower)
@@ -95,10 +118,13 @@ private:
void sub_to_add_neg(ir_expression *);
void div_to_mul_rcp(ir_expression *);
+ void int_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 *);
+ void lrp_to_arith(ir_expression *);
+ void bitfield_insert_to_bfm_bfi(ir_expression *);
};
/**
@@ -127,55 +153,67 @@ lower_instructions_visitor::sub_to_add_neg(ir_expression *ir)
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;
+ assert(ir->operands[1]->type->is_float());
+
+ /* 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]);
+
+ /* op0 / op1 -> op0 * (1.0 / op1) */
+ ir->operation = ir_binop_mul;
+ ir->operands[1] = expr;
+
+ this->progress = true;
+}
+
+void
+lower_instructions_visitor::int_div_to_mul_rcp(ir_expression *ir)
+{
+ assert(ir->operands[1]->type->is_integer());
+
+ /* 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
- vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
- ir->type->vector_elements,
- ir->type->matrix_columns);
+ vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
+ ir->type->vector_elements,
+ ir->type->matrix_columns);
- op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1);
+ op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1);
+ if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) {
ir->operation = ir_unop_f2i;
ir->operands[0] = op0;
- ir->operands[1] = NULL;
+ } else {
+ ir->operation = ir_unop_i2u;
+ ir->operands[0] = new(ir) ir_expression(ir_unop_f2i, op0);
}
+ ir->operands[1] = NULL;
this->progress = true;
}
@@ -250,6 +288,50 @@ lower_instructions_visitor::mod_to_fract(ir_expression *ir)
this->progress = true;
}
+void
+lower_instructions_visitor::lrp_to_arith(ir_expression *ir)
+{
+ /* (lrp x y a) -> x*(1-a) + y*a */
+
+ /* Save op2 */
+ ir_variable *temp = new(ir) ir_variable(ir->operands[2]->type, "lrp_factor",
+ ir_var_temporary);
+ this->base_ir->insert_before(temp);
+ this->base_ir->insert_before(assign(temp, ir->operands[2]));
+
+ ir_constant *one = new(ir) ir_constant(1.0f);
+
+ ir->operation = ir_binop_add;
+ ir->operands[0] = mul(ir->operands[0], sub(one, temp));
+ ir->operands[1] = mul(ir->operands[1], temp);
+ ir->operands[2] = NULL;
+
+ this->progress = true;
+}
+
+void
+lower_instructions_visitor::bitfield_insert_to_bfm_bfi(ir_expression *ir)
+{
+ /* Translates
+ * ir_quadop_bitfield_insert base insert offset bits
+ * into
+ * ir_triop_bfi (ir_binop_bfm bits offset) insert base
+ */
+
+ ir_rvalue *base_expr = ir->operands[0];
+
+ ir->operation = ir_triop_bfi;
+ ir->operands[0] = new(ir) ir_expression(ir_binop_bfm,
+ ir->type->get_base_type(),
+ ir->operands[3],
+ ir->operands[2]);
+ /* ir->operands[1] is still the value to insert. */
+ ir->operands[2] = base_expr;
+ ir->operands[3] = NULL;
+
+ this->progress = true;
+}
+
ir_visitor_status
lower_instructions_visitor::visit_leave(ir_expression *ir)
{
@@ -260,7 +342,9 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
break;
case ir_binop_div:
- if (lowering(DIV_TO_MUL_RCP))
+ if (ir->operands[1]->type->is_integer() && lowering(INT_DIV_TO_MUL_RCP))
+ int_div_to_mul_rcp(ir);
+ else if (ir->operands[1]->type->is_float() && lowering(DIV_TO_MUL_RCP))
div_to_mul_rcp(ir);
break;
@@ -275,7 +359,7 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
break;
case ir_binop_mod:
- if (lowering(MOD_TO_FRACT))
+ if (lowering(MOD_TO_FRACT) && ir->type->is_float())
mod_to_fract(ir);
break;
@@ -284,6 +368,16 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
pow_to_exp2(ir);
break;
+ case ir_triop_lrp:
+ if (lowering(LRP_TO_ARITH))
+ lrp_to_arith(ir);
+ break;
+
+ case ir_quadop_bitfield_insert:
+ if (lowering(BITFIELD_INSERT_TO_BFM_BFI))
+ bitfield_insert_to_bfm_bfi(ir);
+ break;
+
default:
return visit_continue;
}
diff --git a/dist/Mesa/src/glsl/lower_jumps.cpp b/dist/Mesa/src/glsl/lower_jumps.cpp
index 177b75164..bfc8c013b 100644
--- a/dist/Mesa/src/glsl/lower_jumps.cpp
+++ b/dist/Mesa/src/glsl/lower_jumps.cpp
@@ -60,12 +60,76 @@
#include <string.h>
#include "ir.h"
+/**
+ * Enum recording the result of analyzing how control flow might exit
+ * an IR node.
+ *
+ * Each possible value of jump_strength indicates a strictly stronger
+ * guarantee on control flow than the previous value.
+ *
+ * The ordering of strengths roughly reflects the way jumps are
+ * lowered: jumps with higher strength tend to be lowered to jumps of
+ * lower strength. Accordingly, strength is used as a heuristic to
+ * determine which lowering to perform first.
+ *
+ * This enum is also used by get_jump_strength() to categorize
+ * instructions as either break, continue, return, or other. When
+ * used in this fashion, strength_always_clears_execute_flag is not
+ * used.
+ *
+ * The control flow analysis made by this optimization pass makes two
+ * simplifying assumptions:
+ *
+ * - It ignores discard instructions, since they are lowered by a
+ * separate pass (lower_discard.cpp).
+ *
+ * - It assumes it is always possible for control to flow from a loop
+ * to the instruction immediately following it. Technically, this
+ * is not true (since all execution paths through the loop might
+ * jump back to the top, or return from the function).
+ *
+ * Both of these simplifying assumtions are safe, since they can never
+ * cause reachable code to be incorrectly classified as unreachable;
+ * they can only do the opposite.
+ */
enum jump_strength
{
+ /**
+ * Analysis has produced no guarantee on how control flow might
+ * exit this IR node. It might fall out the bottom (with or
+ * without clearing the execute flag, if present), or it might
+ * continue to the top of the innermost enclosing loop, break out
+ * of it, or return from the function.
+ */
strength_none,
+
+ /**
+ * The only way control can fall out the bottom of this node is
+ * through a code path that clears the execute flag. It might also
+ * continue to the top of the innermost enclosing loop, break out
+ * of it, or return from the function.
+ */
strength_always_clears_execute_flag,
+
+ /**
+ * Control cannot fall out the bottom of this node. It might
+ * continue to the top of the innermost enclosing loop, break out
+ * of it, or return from the function.
+ */
strength_continue,
+
+ /**
+ * Control cannot fall out the bottom of this node, or continue the
+ * top of the innermost enclosing loop. It can only break out of
+ * it or return from the function.
+ */
strength_break,
+
+ /**
+ * Control cannot fall out the bottom of this node, continue to the
+ * top of the innermost enclosing loop, or break out of it. It can
+ * only return from the function.
+ */
strength_return
};
@@ -181,6 +245,27 @@ struct function_record
};
struct ir_lower_jumps_visitor : public ir_control_flow_visitor {
+ /* Postconditions: on exit of any visit() function:
+ *
+ * ANALYSIS: this->block.min_strength,
+ * this->block.may_clear_execute_flag, and
+ * this->loop.may_set_return_flag are updated to reflect the
+ * characteristics of the visited statement.
+ *
+ * DEAD_CODE_ELIMINATION: If this->block.min_strength is not
+ * strength_none, the visited node is at the end of its exec_list.
+ * In other words, any unreachable statements that follow the
+ * visited statement in its exec_list have been removed.
+ *
+ * CONTAINED_JUMPS_LOWERED: If the visited statement contains other
+ * statements, then should_lower_jump() is false for all of the
+ * return, break, or continue statements it contains.
+ *
+ * Note that visiting a jump does not lower it. That is the
+ * responsibility of the statement (or function signature) that
+ * contains the jump.
+ */
+
bool progress;
struct function_record function;
@@ -302,18 +387,58 @@ struct ir_lower_jumps_visitor : public ir_control_flow_visitor {
virtual void visit(class ir_loop_jump * ir)
{
+ /* Eliminate all instructions after each one, since they are
+ * unreachable. This satisfies the DEAD_CODE_ELIMINATION
+ * postcondition.
+ */
truncate_after_instruction(ir);
+
+ /* Set this->block.min_strength based on this instruction. This
+ * satisfies the ANALYSIS postcondition. It is not necessary to
+ * update this->block.may_clear_execute_flag or
+ * this->loop.may_set_return_flag, because an unlowered jump
+ * instruction can't change any flags.
+ */
this->block.min_strength = ir->is_break() ? strength_break : strength_continue;
+
+ /* The CONTAINED_JUMPS_LOWERED postcondition is already
+ * satisfied, because jump statements can't contain other
+ * statements.
+ */
}
virtual void visit(class ir_return * ir)
{
+ /* Eliminate all instructions after each one, since they are
+ * unreachable. This satisfies the DEAD_CODE_ELIMINATION
+ * postcondition.
+ */
truncate_after_instruction(ir);
+
+ /* Set this->block.min_strength based on this instruction. This
+ * satisfies the ANALYSIS postcondition. It is not necessary to
+ * update this->block.may_clear_execute_flag or
+ * this->loop.may_set_return_flag, because an unlowered return
+ * instruction can't change any flags.
+ */
this->block.min_strength = strength_return;
+
+ /* The CONTAINED_JUMPS_LOWERED postcondition is already
+ * satisfied, because jump statements can't contain other
+ * statements.
+ */
}
virtual void visit(class ir_discard * ir)
{
+ /* Nothing needs to be done. The ANALYSIS and
+ * DEAD_CODE_ELIMINATION postconditions are already satisfied,
+ * because discard statements are ignored by this optimization
+ * pass. The CONTAINED_JUMPS_LOWERED postcondition is already
+ * satisfied, because discard statements can't contain other
+ * statements.
+ */
+ (void) ir;
}
enum jump_strength get_jump_strength(ir_instruction* ir)
@@ -395,18 +520,34 @@ struct ir_lower_jumps_visitor : public ir_control_flow_visitor {
block_record block_records[2];
ir_jump* jumps[2];
+ /* Recursively lower nested jumps. This satisfies the
+ * CONTAINED_JUMPS_LOWERED postcondition, except in the case of
+ * unconditional jumps at the end of ir->then_instructions and
+ * ir->else_instructions, which are handled below.
+ */
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();
- }
+ /* Determine which of ir->then_instructions and
+ * ir->else_instructions end with an unconditional jump.
+ */
+ 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();
+ }
+
+ /* Loop until we have satisfied the CONTAINED_JUMPS_LOWERED
+ * postcondition by lowering jumps in both then_instructions and
+ * else_instructions.
+ */
for(;;) {
+ /* Determine the types of the jumps that terminate
+ * ir->then_instructions and ir->else_instructions.
+ */
jump_strength jump_strengths[2];
for(unsigned i = 0; i < 2; ++i) {
@@ -417,7 +558,12 @@ retry: /* we get here if we put code after the if inside a branch */
jump_strengths[i] = strength_none;
}
- /* move both jumps out if possible */
+ /* If both code paths end in a jump, and the jumps are the
+ * same, and we are pulling out jumps, replace them with a
+ * single jump that comes after the if instruction. The new
+ * jump will be visited next, and it will be lowered if
+ * necessary by the loop or conditional that encloses it.
+ */
if(pull_out_jumps && jump_strengths[0] == jump_strengths[1]) {
bool unify = true;
if(jump_strengths[0] == strength_continue)
@@ -435,10 +581,19 @@ retry: /* we get here if we put code after the if inside a branch */
jumps[1]->remove();
this->progress = true;
+ /* Update jumps[] to reflect the fact that the jumps
+ * are gone, and update block_records[] to reflect the
+ * fact that control can now flow to the next
+ * instruction.
+ */
jumps[0] = 0;
jumps[1] = 0;
block_records[0].min_strength = strength_none;
block_records[1].min_strength = strength_none;
+
+ /* The CONTAINED_JUMPS_LOWERED postcondition is now
+ * satisfied, so we can break out of the loop.
+ */
break;
}
}
@@ -458,6 +613,10 @@ retry: /* we get here if we put code after the if inside a branch */
else if(should_lower[1])
lower = 1;
else
+ /* Neither code path ends in a jump that needs to be
+ * lowered, so the CONTAINED_JUMPS_LOWERED postcondition
+ * is satisfied and we can break out of the loop.
+ */
break;
if(jump_strengths[lower] == strength_return) {
@@ -468,29 +627,58 @@ retry: /* we get here if we put code after the if inside a branch */
*/
insert_lowered_return((ir_return*)jumps[lower]);
if(this->loop.loop) {
+ /* If we are in a loop, replace the return instruction
+ * with a break instruction, and then loop so that the
+ * break instruction can be lowered if necessary.
+ */
ir_loop_jump* lowered = 0;
lowered = new(ir) ir_loop_jump(ir_loop_jump::jump_break);
+ /* Note: we must update block_records and jumps to
+ * reflect the fact that the control path has been
+ * altered from a return to a break.
+ */
block_records[lower].min_strength = strength_break;
jumps[lower]->replace_with(lowered);
jumps[lower] = lowered;
- } else
+ } else {
+ /* If we are not in a loop, we then proceed as we would
+ * for a continue statement (set the execute flag to
+ * false to prevent the rest of the function from
+ * executing).
+ */
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.
+ /* To lower a break, we create a break flag (if the loop
+ * doesn't have one already) and add an instruction that
+ * sets it.
*
- * 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.
+ * Then we proceed as we would for a continue statement
+ * (set the execute flag to false to prevent the rest of
+ * the loop body from executing).
*
- * 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.
+ * The visit() function for the loop will ensure that the
+ * break flag is checked after executing the loop body.
*/
jumps[lower]->insert_before(create_lowered_break());
goto lower_continue;
} else if(jump_strengths[lower] == strength_continue) {
lower_continue:
+ /* To lower a continue, we create an execute flag (if the
+ * loop doesn't have one already) and replace the continue
+ * with an instruction that clears it.
+ *
+ * Note that this code path gets exercised when lowering
+ * return statements that are not inside a loop, so
+ * this->loop must be initialized even outside of loops.
+ */
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));
+ /* Note: we must update block_records and jumps to reflect
+ * the fact that the control path has been altered to an
+ * instruction that clears the execute flag.
+ */
jumps[lower] = 0;
block_records[lower].min_strength = strength_always_clears_execute_flag;
block_records[lower].may_clear_execute_flag = true;
@@ -504,6 +692,12 @@ lower_continue:
/* move out a jump out if possible */
if(pull_out_jumps) {
+ /* If one of the branches ends in a jump, and control cannot
+ * fall out the bottom of the other branch, then we can move
+ * the jump after the if.
+ *
+ * Set move_out to the branch we are moving a jump out of.
+ */
int move_out = -1;
if(jumps[0] && block_records[1].min_strength >= strength_continue)
move_out = 0;
@@ -514,22 +708,46 @@ lower_continue:
{
jumps[move_out]->remove();
ir->insert_after(jumps[move_out]);
+ /* Note: we must update block_records and jumps to reflect
+ * the fact that the jump has been moved out of the if.
+ */
jumps[move_out] = 0;
block_records[move_out].min_strength = strength_none;
this->progress = true;
}
}
+ /* Now satisfy the ANALYSIS postcondition by setting
+ * this->block.min_strength and
+ * this->block.may_clear_execute_flag based on the
+ * characteristics of the two branches.
+ */
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;
+ /* Now we need to clean up the instructions that follow the
+ * if.
+ *
+ * If those instructions are unreachable, then satisfy the
+ * DEAD_CODE_ELIMINATION postcondition by eliminating them.
+ * Otherwise that postcondition is already satisfied.
+ */
if(this->block.min_strength)
truncate_after_instruction(ir);
else if(this->block.may_clear_execute_flag)
{
+ /* If the "if" instruction might clear the execute flag, then
+ * we need to guard any instructions that follow so that they
+ * are only executed if the execute flag is set.
+ *
+ * If one of the branches of the "if" always clears the
+ * execute flag, and the other branch never clears it, then
+ * this is easy: just move all the instructions following the
+ * "if" into the branch that never clears it.
+ */
int move_into = -1;
if(block_records[0].min_strength && !block_records[1].may_clear_execute_flag)
move_into = 1;
@@ -544,14 +762,34 @@ lower_continue:
if(!next->is_tail_sentinel()) {
move_outer_block_inside(ir, list);
+ /* If any instructions moved, then we need to visit
+ * them (since they are now inside the "if"). Since
+ * block_records[move_into] is in its default state
+ * (see assertion above), we can safely replace
+ * block_records[move_into] with the result of this
+ * analysis.
+ */
exec_list list;
list.head = next;
block_records[move_into] = visit_block(&list);
+ /*
+ * Then we need to re-start our jump lowering, since one
+ * of the instructions we moved might be a jump that
+ * needs to be lowered.
+ */
this->progress = true;
goto retry;
}
} else {
+ /* If we get here, then the simple case didn't apply; we
+ * need to actually guard the instructions that follow.
+ *
+ * To avoid creating unnecessarily-deep nesting, first
+ * look through the instructions that follow and unwrap
+ * any instructions that that are already wrapped in the
+ * appropriate guard.
+ */
ir_instruction* ir_after;
for(ir_after = (ir_instruction*)ir->get_next(); !ir_after->is_tail_sentinel();)
{
@@ -572,6 +810,9 @@ lower_continue:
this->progress = true;
}
+ /* Then, wrap all the instructions that follow in a single
+ * guard.
+ */
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));
@@ -586,6 +827,23 @@ lower_continue:
virtual void visit(ir_loop *ir)
{
+ /* Visit the body of the loop, with a fresh data structure in
+ * this->loop so that the analysis we do here won't bleed into
+ * enclosing loops.
+ *
+ * We assume that all code after a loop is reachable from the
+ * loop (see comments on enum jump_strength), so the
+ * DEAD_CODE_ELIMINATION postcondition is automatically
+ * satisfied, as is the block.min_strength portion of the
+ * ANALYSIS postcondition.
+ *
+ * The block.may_clear_execute_flag portion of the ANALYSIS
+ * postcondition is automatically satisfied because execute
+ * flags do not propagate outside of loops.
+ *
+ * The loop.may_set_return_flag portion of the ANALYSIS
+ * postcondition is handled below.
+ */
++this->function.nesting_depth;
loop_record saved_loop = this->loop;
this->loop = loop_record(this->function.signature, ir);
@@ -613,7 +871,13 @@ lower_continue:
lower_return_unconditionally(ir_last);
if(body.min_strength >= strength_break) {
- /* FINISHME: turn the this->loop into an if, or replace it with its body */
+ /* FINISHME: If the min_strength of the loop body is
+ * strength_break or strength_return, that means that it
+ * isn't a loop at all, since control flow always leaves the
+ * body of the loop via break or return. In principle the
+ * loop could be eliminated in this case. This optimization
+ * is not implemented yet.
+ */
}
if(this->loop.break_flag) {
@@ -639,13 +903,35 @@ lower_continue:
ir->body_instructions.push_tail(break_if);
}
+ /* If the body of the loop may set the return flag, then at
+ * least one return was lowered to a break, so we need to ensure
+ * that the return flag is checked after the body of the loop is
+ * executed.
+ */
if(this->loop.may_set_return_flag) {
assert(this->function.return_flag);
+ /* Generate the if statement to check the return flag */
ir_if* return_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->function.return_flag));
+ /* Note: we also need to propagate the knowledge that the
+ * return flag may get set to the outer context. This
+ * satisfies the loop.may_set_return_flag part of the
+ * ANALYSIS postcondition.
+ */
saved_loop.may_set_return_flag = true;
if(saved_loop.loop)
+ /* If this loop is nested inside another one, then the if
+ * statement that we generated should break out of that
+ * loop if the return flag is set. Caller will lower that
+ * break statement if necessary.
+ */
return_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
else
+ /* Otherwise, all we need to do is ensure that the
+ * instructions that follow are only executed if the
+ * return flag is clear. We can do that by moving those
+ * instructions into the else clause of the generated if
+ * statement.
+ */
move_outer_block_inside(ir, &return_if->else_instructions);
ir->insert_after(return_if);
}
@@ -672,6 +958,11 @@ lower_continue:
this->loop = loop_record(ir);
assert(!this->loop.loop);
+
+ /* Visit the body of the function to lower any jumps that occur
+ * in it, except possibly an unconditional return statement at
+ * the end of it.
+ */
visit_block(&ir->body);
/* If the body ended in an unconditional return of non-void,
@@ -711,10 +1002,12 @@ do_lower_jumps(exec_list *instructions, bool pull_out_jumps, bool lower_sub_retu
v.lower_sub_return = lower_sub_return;
v.lower_main_return = lower_main_return;
+ bool progress_ever = false;
do {
v.progress = false;
visit_exec_list(instructions, &v);
+ progress_ever = v.progress || progress_ever;
} while (v.progress);
- return v.progress;
+ return progress_ever;
}
diff --git a/dist/Mesa/src/glsl/lower_variable_index_to_cond_assign.cpp b/dist/Mesa/src/glsl/lower_variable_index_to_cond_assign.cpp
index 2cebdcf46..0f5072793 100644
--- a/dist/Mesa/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ b/dist/Mesa/src/glsl/lower_variable_index_to_cond_assign.cpp
@@ -52,8 +52,72 @@
#include "glsl_types.h"
#include "main/macros.h"
+/**
+ * Generate a comparison value for a block of indices
+ *
+ * Lowering passes for non-constant indexing of arrays, matrices, or vectors
+ * can use this to generate blocks of index comparison values.
+ *
+ * \param instructions List where new instructions will be appended
+ * \param index \c ir_variable containing the desired index
+ * \param base Base value for this block of comparisons
+ * \param components Number of unique index values to compare. This must
+ * be on the range [1, 4].
+ * \param mem_ctx ralloc memory context to be used for all allocations.
+ *
+ * \returns
+ * An \c ir_rvalue that \b must be cloned for each use in conditional
+ * assignments, etc.
+ */
+ir_rvalue *
+compare_index_block(exec_list *instructions, ir_variable *index,
+ unsigned base, unsigned components, void *mem_ctx)
+{
+ ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index);
+
+ assert(index->type->is_scalar());
+ assert(index->type->base_type == GLSL_TYPE_INT);
+ assert(components >= 1 && components <= 4);
+
+ if (components > 1) {
+ const ir_swizzle_mask m = { 0, 0, 0, 0, components, false };
+ broadcast_index = new(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] = base;
+ test_indices_data.i[1] = base + 1;
+ test_indices_data.i[2] = base + 2;
+ test_indices_data.i[3] = base + 3;
+
+ ir_constant *const test_indices =
+ new(mem_ctx) ir_constant(broadcast_index->type,
+ &test_indices_data);
+
+ ir_rvalue *const condition_val =
+ new(mem_ctx) ir_expression(ir_binop_equal,
+ glsl_type::bvec(components),
+ broadcast_index,
+ test_indices);
+
+ ir_variable *const condition =
+ new(mem_ctx) ir_variable(condition_val->type,
+ "dereference_condition",
+ ir_var_temporary);
+ instructions->push_tail(condition);
+
+ ir_rvalue *const cond_deref =
+ new(mem_ctx) ir_dereference_variable(condition);
+ instructions->push_tail(new(mem_ctx) ir_assignment(cond_deref, condition_val, 0));
+
+ return cond_deref;
+}
+
static inline bool
-is_array_or_matrix(const ir_instruction *ir)
+is_array_or_matrix(const ir_rvalue *ir)
{
return (ir->type->is_array() || ir->type->is_matrix());
}
@@ -204,54 +268,17 @@ struct switch_generator
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));
+ compare_index_block(list, index, i, comps, this->mem_ctx);
if (comps == 1) {
- ir_rvalue *const cond_deref =
- new(this->mem_ctx) ir_dereference_variable(condition);
-
- this->generator.generate(i, cond_deref, list);
+ this->generator.generate(i, cond_deref->clone(this->mem_ctx, NULL),
+ 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);
+ new(this->mem_ctx) ir_swizzle(cond_deref->clone(this->mem_ctx, NULL),
+ j, 0, 0, 0, 1);
this->generator.generate(i + j, cond_swiz, list);
}
@@ -337,12 +364,16 @@ public:
return this->lower_temps;
case ir_var_uniform:
return this->lower_uniforms;
- case ir_var_in:
+ case ir_var_function_in:
case ir_var_const_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;
+ case ir_var_shader_in:
+ return this->lower_inputs;
+ case ir_var_function_out:
+ return this->lower_temps;
+ case ir_var_shader_out:
+ return this->lower_outputs;
+ case ir_var_function_inout:
return this->lower_temps;
}
diff --git a/dist/Mesa/src/glsl/lower_vec_index_to_cond_assign.cpp b/dist/Mesa/src/glsl/lower_vec_index_to_cond_assign.cpp
index 15992e272..880859688 100644
--- a/dist/Mesa/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ b/dist/Mesa/src/glsl/lower_vec_index_to_cond_assign.cpp
@@ -52,7 +52,12 @@ public:
progress = false;
}
- ir_rvalue *convert_vec_index_to_cond_assign(ir_rvalue *val);
+ ir_rvalue *convert_vec_index_to_cond_assign(void *mem_ctx,
+ ir_rvalue *orig_vector,
+ ir_rvalue *orig_index,
+ const glsl_type *type);
+
+ ir_rvalue *convert_vector_extract_to_cond_assign(ir_rvalue *ir);
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_swizzle *);
@@ -65,71 +70,97 @@ public:
};
ir_rvalue *
-ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue *ir)
+ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(void *mem_ctx,
+ ir_rvalue *orig_vector,
+ ir_rvalue *orig_index,
+ const glsl_type *type)
{
- 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;
+ ir_assignment *assign, *value_assign;
+ ir_variable *index, *var, *value;
+ ir_dereference *deref, *deref_value;
+ unsigned i;
- void *mem_ctx = ralloc_parent(ir);
- assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
+ exec_list list;
/* 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);
+ list.push_tail(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);
+ assign = new(base_ir) ir_assignment(deref, orig_index, NULL);
+ list.push_tail(assign);
+
+ /* Store the value inside a temp, thus avoiding matrixes duplication */
+ value = new(base_ir) ir_variable(orig_vector->type, "vec_value_tmp",
+ ir_var_temporary);
+ list.push_tail(value);
+ deref_value = new(base_ir) ir_dereference_variable(value);
+ value_assign = new(base_ir) ir_assignment(deref_value, orig_vector);
+ list.push_tail(value_assign);
/* Temporary where we store whichever value we swizzle out. */
- var = new(base_ir) ir_variable(ir->type, "vec_index_tmp_v",
+ var = new(base_ir) ir_variable(type, "vec_index_tmp_v",
ir_var_temporary);
- base_ir->insert_before(var);
+ list.push_tail(var);
+
+ /* Generate a single comparison condition "mask" for all of the components
+ * in the vector.
+ */
+ ir_rvalue *const cond_deref =
+ compare_index_block(&list, index, 0,
+ orig_vector->type->vector_elements,
+ mem_ctx);
/* 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));
+ for (i = 0; i < orig_vector->type->vector_elements; i++) {
+ ir_rvalue *condition_swizzle =
+ new(base_ir) ir_swizzle(cond_deref->clone(mem_ctx, NULL),
+ i, 0, 0, 0, 1);
/* 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);
+ ir_rvalue *swizzle =
+ new(base_ir) ir_swizzle(deref_value->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);
+ assign = new(base_ir) ir_assignment(deref, swizzle, condition_swizzle);
+ list.push_tail(assign);
}
+ /* Put all of the new instructions in the IR stream before the old
+ * instruction.
+ */
+ base_ir->insert_before(&list);
+
this->progress = true;
return new(base_ir) ir_dereference_variable(var);
}
+ir_rvalue *
+ir_vec_index_to_cond_assign_visitor::convert_vector_extract_to_cond_assign(ir_rvalue *ir)
+{
+ ir_expression *const expr = ir->as_expression();
+
+ if (expr == NULL || expr->operation != ir_binop_vector_extract)
+ return ir;
+
+ return convert_vec_index_to_cond_assign(ralloc_parent(ir),
+ expr->operands[0],
+ expr->operands[1],
+ ir->type);
+}
+
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]);
+ ir->operands[i] = convert_vector_extract_to_cond_assign(ir->operands[i]);
}
return visit_continue;
@@ -142,7 +173,7 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir)
* 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);
+ ir->val = convert_vector_extract_to_cond_assign(ir->val);
return visit_continue;
}
@@ -150,86 +181,12 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir)
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 = ralloc_parent(ir);
-
- assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
+ ir->rhs = convert_vector_extract_to_cond_assign(ir->rhs);
- exec_list list;
-
- /* 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);
- list.push_tail(index);
- deref = new(ir) ir_dereference_variable(index);
- assign = new(ir) ir_assignment(deref, orig_deref->array_index, NULL);
- list.push_tail(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);
- list.push_tail(var);
- deref = new(ir) ir_dereference_variable(var);
- assign = new(ir) ir_assignment(deref, ir->rhs, NULL);
- list.push_tail(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);
- list.push_tail(assign);
- }
-
- /* If the original assignment has a condition, respect that original
- * condition! This is acomplished by wrapping the new conditional
- * assignments in an if-statement that uses the original condition.
- */
- if (ir->condition != NULL) {
- /* No need to clone the condition because the IR that it hangs on is
- * going to be removed from the instruction sequence.
- */
- ir_if *if_stmt = new(mem_ctx) ir_if(ir->condition);
-
- list.move_nodes_to(&if_stmt->then_instructions);
- ir->insert_before(if_stmt);
- } else {
- ir->insert_before(&list);
+ if (ir->condition) {
+ ir->condition = convert_vector_extract_to_cond_assign(ir->condition);
}
- ir->remove();
-
- this->progress = true;
-
return visit_continue;
}
@@ -238,7 +195,7 @@ 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);
+ ir_rvalue *new_param = convert_vector_extract_to_cond_assign(param);
if (new_param != param) {
param->replace_with(new_param);
@@ -252,7 +209,7 @@ 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);
+ ir->value = convert_vector_extract_to_cond_assign(ir->value);
}
return visit_continue;
@@ -261,7 +218,7 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_return *ir)
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);
+ ir->condition = convert_vector_extract_to_cond_assign(ir->condition);
return visit_continue;
}
diff --git a/dist/Mesa/src/glsl/lower_vec_index_to_swizzle.cpp b/dist/Mesa/src/glsl/lower_vec_index_to_swizzle.cpp
index 46fd6ace1..d5ad692c2 100644
--- a/dist/Mesa/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/dist/Mesa/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -46,7 +46,7 @@ public:
progress = false;
}
- ir_rvalue *convert_vec_index_to_swizzle(ir_rvalue *val);
+ ir_rvalue *convert_vector_extract_to_swizzle(ir_rvalue *val);
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_swizzle *);
@@ -59,20 +59,14 @@ public:
};
ir_rvalue *
-ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
+ir_vec_index_to_swizzle_visitor::convert_vector_extract_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())
+ ir_expression *const expr = ir->as_expression();
+ if (expr == NULL || expr->operation != ir_binop_vector_extract)
return ir;
- assert(deref->array_index->type->base_type == GLSL_TYPE_INT);
- ir_constant = deref->array_index->constant_expression_value();
- if (!ir_constant)
+ ir_constant *const idx = expr->operands[1]->constant_expression_value();
+ if (idx == NULL)
return ir;
void *ctx = ralloc_parent(ir);
@@ -92,10 +86,10 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
* The ir_swizzle constructor gets angry if the index is negative or too
* large. For simplicity sake, just clamp the index to [0, size-1].
*/
- const int i = MIN2(MAX2(ir_constant->value.i[0], 0),
- (deref->array->type->vector_elements - 1));
+ const int i = CLAMP(idx->value.i[0], 0,
+ (int) expr->operands[0]->type->vector_elements - 1);
- return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1);
+ return new(ctx) ir_swizzle(expr->operands[0], i, 0, 0, 0, 1);
}
ir_visitor_status
@@ -104,7 +98,7 @@ 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]);
+ ir->operands[i] = convert_vector_extract_to_swizzle(ir->operands[i]);
}
return visit_continue;
@@ -117,7 +111,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir)
* 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);
+ ir->val = convert_vector_extract_to_swizzle(ir->val);
return visit_continue;
}
@@ -125,8 +119,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir)
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);
+ ir->rhs = convert_vector_extract_to_swizzle(ir->rhs);
return visit_continue;
}
@@ -136,7 +129,7 @@ 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);
+ ir_rvalue *new_param = convert_vector_extract_to_swizzle(param);
if (new_param != param) {
param->replace_with(new_param);
@@ -150,7 +143,7 @@ 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);
+ ir->value = convert_vector_extract_to_swizzle(ir->value);
}
return visit_continue;
@@ -159,7 +152,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_return *ir)
ir_visitor_status
ir_vec_index_to_swizzle_visitor::visit_enter(ir_if *ir)
{
- ir->condition = convert_vec_index_to_swizzle(ir->condition);
+ ir->condition = convert_vector_extract_to_swizzle(ir->condition);
return visit_continue;
}
diff --git a/dist/Mesa/src/glsl/main.cpp b/dist/Mesa/src/glsl/main.cpp
index 83d1e8c09..60bc62827 100644
--- a/dist/Mesa/src/glsl/main.cpp
+++ b/dist/Mesa/src/glsl/main.cpp
@@ -22,87 +22,41 @@
*/
#include <getopt.h>
+/** @file main.cpp
+ *
+ * This file is the main() routine and scaffolding for producing
+ * builtin_compiler (which doesn't include builtins itself and is used
+ * to generate the profile information for builtin_function.cpp), and
+ * for glsl_compiler (which does include builtins and can be used to
+ * offline compile GLSL code and examine the resulting GLSL IR.
+ */
+
#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"
-
-extern "C" struct gl_shader *
-_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
-
-extern "C" void
-_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
- struct gl_shader *sh);
-
-/* Copied from shader_api.c for the stand-alone compiler.
- */
-void
-_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
- struct gl_shader *sh)
-{
- *ptr = sh;
-}
-
-struct gl_shader *
-_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
-{
- struct gl_shader *shader;
-
- (void) ctx;
-
- assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER);
- shader = rzalloc(NULL, struct gl_shader);
- if (shader) {
- shader->Type = type;
- shader->Name = name;
- shader->RefCount = 1;
- }
- return shader;
-}
+#include "standalone_scaffolding.h"
static void
initialize_context(struct gl_context *ctx, gl_api api)
{
- memset(ctx, 0, sizeof(*ctx));
-
- ctx->API = api;
-
- ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
- ctx->Extensions.ARB_draw_buffers = GL_TRUE;
- ctx->Extensions.ARB_draw_instanced = GL_TRUE;
- ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
- ctx->Extensions.EXT_texture_array = GL_TRUE;
- ctx->Extensions.NV_texture_rectangle = GL_TRUE;
- ctx->Extensions.EXT_texture3D = GL_TRUE;
+ initialize_context_to_defaults(ctx, api);
- /* GLSL 1.30 isn't fully supported, but we need to advertise 1.30 so that
- * the built-in functions for 1.30 can be built.
+ /* The standalone compiler needs to claim support for almost
+ * everything in order to compile the built-in functions.
*/
- ctx->Const.GLSLVersion = 130;
+ ctx->Const.GLSLVersion = 150;
+ ctx->Extensions.ARB_ES3_compatibility = true;
- /* 1.10 minimums. */
- ctx->Const.MaxLights = 8;
ctx->Const.MaxClipPlanes = 8;
- ctx->Const.MaxTextureUnits = 2;
+ ctx->Const.MaxDrawBuffers = 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;
-
ctx->Driver.NewShader = _mesa_new_shader;
}
@@ -189,67 +143,13 @@ 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) != 0;
-
- 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);
- }
-
+ _mesa_glsl_compile_shader(ctx, shader, dump_ast, dump_hir);
/* 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)
- ralloc_free(shader->InfoLog);
-
- shader->InfoLog = state->info_log;
-
- /* Retain any live IR, but trash the rest. */
- reparent_ir(shader->ir, shader);
-
- ralloc_free(state);
-
return;
}
@@ -269,7 +169,7 @@ main(int argc, char **argv)
if (argc <= optind)
usage_fail(argv[0]);
- initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL);
+ initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL_COMPAT);
struct gl_shader_program *whole_program;
@@ -293,7 +193,7 @@ main(int argc, char **argv)
usage_fail(argv[0]);
const char *const ext = & argv[optind][len - 5];
- if (strncmp(".vert", ext, 5) == 0)
+ if (strncmp(".vert", ext, 5) == 0 || strncmp(".glsl", ext, 5) == 0)
shader->Type = GL_VERTEX_SHADER;
else if (strncmp(".geom", ext, 5) == 0)
shader->Type = GL_GEOMETRY_SHADER;
diff --git a/dist/Mesa/src/glsl/opt_constant_folding.cpp b/dist/Mesa/src/glsl/opt_constant_folding.cpp
index 599b21525..072fefe9a 100644
--- a/dist/Mesa/src/glsl/opt_constant_folding.cpp
+++ b/dist/Mesa/src/glsl/opt_constant_folding.cpp
@@ -32,6 +32,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
/**
* Visitor class for replacing expressions with ir_constant values.
*/
@@ -56,6 +58,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
void
ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue)
{
@@ -117,12 +121,14 @@ ir_constant_folding_visitor::visit_enter(ir_assignment *ir)
ir_visitor_status
ir_constant_folding_visitor::visit_enter(ir_call *ir)
{
- exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
+ /* Attempt to constant fold parameters */
+ exec_list_iterator sig_iter = ir->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 || sig_param->mode == ir_var_const_in) {
+ if (sig_param->mode == ir_var_function_in
+ || sig_param->mode == ir_var_const_in) {
ir_rvalue *new_param = param_rval;
handle_rvalue(&new_param);
@@ -133,6 +139,15 @@ ir_constant_folding_visitor::visit_enter(ir_call *ir)
sig_iter.next();
}
+ /* Next, see if the call can be replaced with an assignment of a constant */
+ ir_constant *const_val = ir->constant_expression_value();
+
+ if (const_val != NULL) {
+ ir_assignment *assignment =
+ new(ralloc_parent(ir)) ir_assignment(ir->return_deref, const_val);
+ ir->replace_with(assignment);
+ }
+
return visit_continue_with_parent;
}
diff --git a/dist/Mesa/src/glsl/opt_constant_propagation.cpp b/dist/Mesa/src/glsl/opt_constant_propagation.cpp
index af77e4906..2f65937fe 100644
--- a/dist/Mesa/src/glsl/opt_constant_propagation.cpp
+++ b/dist/Mesa/src/glsl/opt_constant_propagation.cpp
@@ -41,6 +41,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -90,6 +92,7 @@ public:
ir_constant_propagation_visitor()
{
progress = false;
+ killed_all = false;
mem_ctx = ralloc_context(0);
this->acp = new(mem_ctx) exec_list;
this->kills = new(mem_ctx) exec_list;
@@ -241,7 +244,26 @@ ir_constant_propagation_visitor::visit_leave(ir_assignment *ir)
if (this->in_assignee)
return visit_continue;
- kill(ir->lhs->variable_referenced(), ir->write_mask);
+ unsigned kill_mask = ir->write_mask;
+ if (ir->lhs->as_dereference_array()) {
+ /* The LHS of the assignment uses an array indexing operator (e.g. v[i]
+ * = ...;). Since we only try to constant propagate vectors and
+ * scalars, this means that either (a) array indexing is being used to
+ * select a vector component, or (b) the variable in question is neither
+ * a scalar or a vector, so we don't care about it. In the former case,
+ * we want to kill the whole vector, since in general we can't predict
+ * which vector component will be selected by array indexing. In the
+ * latter case, it doesn't matter what we do, so go ahead and kill the
+ * whole variable anyway.
+ *
+ * Note that if the array index is constant (e.g. v[2] = ...;), we could
+ * in principle be smarter, but we don't need to, because a future
+ * optimization pass will convert it to a simple assignment with the
+ * correct mask.
+ */
+ kill_mask = ~0;
+ }
+ kill(ir->lhs->variable_referenced(), kill_mask);
add_constant(ir);
@@ -259,11 +281,12 @@ 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();
+ exec_list_iterator sig_param_iter = ir->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) {
+ if (sig_param->mode != ir_var_function_out
+ && sig_param->mode != ir_var_function_inout) {
ir_rvalue *new_param = param;
handle_rvalue(&new_param);
if (new_param != param)
@@ -431,6 +454,8 @@ ir_constant_propagation_visitor::add_constant(ir_assignment *ir)
this->acp->push_tail(entry);
}
+} /* unnamed namespace */
+
/**
* Does a constant propagation pass on the code present in the instruction stream.
*/
diff --git a/dist/Mesa/src/glsl/opt_constant_variable.cpp b/dist/Mesa/src/glsl/opt_constant_variable.cpp
index 3fa7c3bad..cbe6450c6 100644
--- a/dist/Mesa/src/glsl/opt_constant_variable.cpp
+++ b/dist/Mesa/src/glsl/opt_constant_variable.cpp
@@ -37,6 +37,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
struct assignment_entry {
exec_node link;
int assignment_count;
@@ -55,6 +57,8 @@ public:
exec_list list;
};
+} /* unnamed namespace */
+
static struct assignment_entry *
get_assignment_entry(ir_variable *var, exec_list *list)
{
@@ -127,13 +131,14 @@ ir_constant_variable_visitor::visit_enter(ir_assignment *ir)
ir_visitor_status
ir_constant_variable_visitor::visit_enter(ir_call *ir)
{
- exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
+ /* Mark any out parameters as assigned to */
+ exec_list_iterator sig_iter = ir->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) {
+ if (param->mode == ir_var_function_out ||
+ param->mode == ir_var_function_inout) {
ir_variable *var = param_rval->variable_referenced();
struct assignment_entry *entry;
@@ -143,6 +148,17 @@ ir_constant_variable_visitor::visit_enter(ir_call *ir)
}
sig_iter.next();
}
+
+ /* Mark the return storage as having been assigned to */
+ if (ir->return_deref != NULL) {
+ ir_variable *var = ir->return_deref->variable_referenced();
+ struct assignment_entry *entry;
+
+ assert(var);
+ entry = get_assignment_entry(var, &this->list);
+ entry->assignment_count++;
+ }
+
return visit_continue;
}
diff --git a/dist/Mesa/src/glsl/opt_copy_propagation.cpp b/dist/Mesa/src/glsl/opt_copy_propagation.cpp
index efa3afda3..7282b611e 100644
--- a/dist/Mesa/src/glsl/opt_copy_propagation.cpp
+++ b/dist/Mesa/src/glsl/opt_copy_propagation.cpp
@@ -38,6 +38,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -107,6 +109,8 @@ public:
void *mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_visitor::visit_enter(ir_function_signature *ir)
{
@@ -181,11 +185,12 @@ 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();
+ exec_list_iterator sig_param_iter = ir->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) {
+ if (sig_param->mode != ir_var_function_out
+ && sig_param->mode != ir_var_function_inout) {
ir->accept(this);
}
sig_param_iter.next();
diff --git a/dist/Mesa/src/glsl/opt_copy_propagation_elements.cpp b/dist/Mesa/src/glsl/opt_copy_propagation_elements.cpp
index a91e624cb..6a19da40d 100644
--- a/dist/Mesa/src/glsl/opt_copy_propagation_elements.cpp
+++ b/dist/Mesa/src/glsl/opt_copy_propagation_elements.cpp
@@ -49,6 +49,8 @@
static bool debug = false;
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -93,6 +95,7 @@ public:
ir_copy_propagation_elements_visitor()
{
this->progress = false;
+ this->killed_all = false;
this->mem_ctx = ralloc_context(NULL);
this->shader_mem_ctx = NULL;
this->acp = new(mem_ctx) exec_list;
@@ -108,6 +111,7 @@ public:
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 *);
+ virtual ir_visitor_status visit_leave(class ir_swizzle *);
void handle_rvalue(ir_rvalue **rvalue);
@@ -133,6 +137,8 @@ public:
void *shader_mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir)
{
@@ -179,6 +185,15 @@ ir_copy_propagation_elements_visitor::visit_leave(ir_assignment *ir)
return visit_continue;
}
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_leave(ir_swizzle *ir)
+{
+ /* Don't visit the values of swizzles since they are handled while
+ * visiting the swizzle itself.
+ */
+ return visit_continue;
+}
+
/**
* Replaces dereferences of ACP RHS variables with ACP LHS variables.
*
@@ -278,11 +293,12 @@ ir_visitor_status
ir_copy_propagation_elements_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();
+ exec_list_iterator sig_param_iter = ir->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) {
+ if (sig_param->mode != ir_var_function_out
+ && sig_param->mode != ir_var_function_inout) {
ir->accept(this);
}
sig_param_iter.next();
@@ -451,7 +467,20 @@ ir_copy_propagation_elements_visitor::add_copy(ir_assignment *ir)
swizzle[i] = orig_swizzle[j++];
}
- entry = new(this->mem_ctx) acp_entry(lhs->var, rhs->var, ir->write_mask,
+ int write_mask = ir->write_mask;
+ if (lhs->var == rhs->var) {
+ /* If this is a copy from the variable to itself, then we need
+ * to be sure not to include the updated channels from this
+ * instruction in the set of new source channels to be
+ * copy-propagated from.
+ */
+ for (int i = 0; i < 4; i++) {
+ if (ir->write_mask & (1 << orig_swizzle[i]))
+ write_mask &= ~(1 << i);
+ }
+ }
+
+ entry = new(this->mem_ctx) acp_entry(lhs->var, rhs->var, write_mask,
swizzle);
this->acp->push_tail(entry);
}
diff --git a/dist/Mesa/src/glsl/opt_dead_code_local.cpp b/dist/Mesa/src/glsl/opt_dead_code_local.cpp
index 39962bd60..8c31802a6 100644
--- a/dist/Mesa/src/glsl/opt_dead_code_local.cpp
+++ b/dist/Mesa/src/glsl/opt_dead_code_local.cpp
@@ -40,19 +40,25 @@
static bool debug = false;
+namespace {
+
class assignment_entry : public exec_node
{
public:
- assignment_entry(ir_variable *lhs, ir_instruction *ir)
+ assignment_entry(ir_variable *lhs, ir_assignment *ir)
{
assert(lhs);
assert(ir);
this->lhs = lhs;
this->ir = ir;
+ this->available = ir->write_mask;
}
ir_variable *lhs;
- ir_instruction *ir;
+ ir_assignment *ir;
+
+ /* bitmask of xyzw channels written that haven't been used so far. */
+ int available;
};
class kill_for_derefs_visitor : public ir_hierarchical_visitor {
@@ -62,23 +68,52 @@ public:
this->assignments = assignments;
}
- virtual ir_visitor_status visit(ir_dereference_variable *ir)
+ void kill_channels(ir_variable *const var, int used)
{
- 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();
+ if (var->type->is_scalar() || var->type->is_vector()) {
+ if (debug)
+ printf("kill %s (0x%01x - 0x%01x)\n", entry->lhs->name,
+ entry->available, used);
+ entry->available &= ~used;
+ if (!entry->available)
+ entry->remove();
+ } else {
+ if (debug)
+ printf("kill %s\n", entry->lhs->name);
+ entry->remove();
+ }
}
}
+ }
+
+ virtual ir_visitor_status visit(ir_dereference_variable *ir)
+ {
+ kill_channels(ir->var, ~0);
return visit_continue;
}
+ virtual ir_visitor_status visit(ir_swizzle *ir)
+ {
+ ir_dereference_variable *deref = ir->val->as_dereference_variable();
+ if (!deref)
+ return visit_continue;
+
+ int used = 0;
+ used |= 1 << ir->mask.x;
+ used |= 1 << ir->mask.y;
+ used |= 1 << ir->mask.z;
+ used |= 1 << ir->mask.w;
+
+ kill_channels(deref->var, used);
+
+ return visit_continue_with_parent;
+ }
+
private:
exec_list *assignments;
};
@@ -105,6 +140,7 @@ public:
ir_hierarchical_visitor *visitor;
};
+} /* unnamed namespace */
/**
* Adds an entry to the available copy list if it's a plain assignment
@@ -130,31 +166,96 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments)
assert(var);
/* Now, check if we did a whole-variable assignment. */
- if (!ir->condition && (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 (!ir->condition) {
+ ir_dereference_variable *deref_var = ir->lhs->as_dereference_variable();
- if (entry->lhs == var) {
- if (debug)
- printf("removing %s\n", var->name);
- entry->ir->remove();
- entry->remove();
- progress = true;
+ /* If it's a vector type, we can do per-channel elimination of
+ * use of the RHS.
+ */
+ if (deref_var && (deref_var->var->type->is_scalar() ||
+ deref_var->var->type->is_vector())) {
+
+ if (debug)
+ printf("looking for %s.0x%01x to remove\n", var->name,
+ ir->write_mask);
+
+ foreach_iter(exec_list_iterator, iter, *assignments) {
+ assignment_entry *entry = (assignment_entry *)iter.get();
+
+ if (entry->lhs != var)
+ continue;
+
+ int remove = entry->available & ir->write_mask;
+ if (debug) {
+ printf("%s 0x%01x - 0x%01x = 0x%01x\n",
+ var->name,
+ entry->ir->write_mask,
+ remove, entry->ir->write_mask & ~remove);
+ }
+ if (remove) {
+ progress = true;
+
+ if (debug) {
+ printf("rewriting:\n ");
+ entry->ir->print();
+ printf("\n");
+ }
+
+ entry->ir->write_mask &= ~remove;
+ entry->available &= ~remove;
+ if (entry->ir->write_mask == 0) {
+ /* Delete the dead assignment. */
+ entry->ir->remove();
+ entry->remove();
+ } else {
+ void *mem_ctx = ralloc_parent(entry->ir);
+ /* Reswizzle the RHS arguments according to the new
+ * write_mask.
+ */
+ unsigned components[4];
+ unsigned channels = 0;
+ unsigned next = 0;
+
+ for (int i = 0; i < 4; i++) {
+ if ((entry->ir->write_mask | remove) & (1 << i)) {
+ if (!(remove & (1 << i)))
+ components[channels++] = next;
+ next++;
+ }
+ }
+
+ entry->ir->rhs = new(mem_ctx) ir_swizzle(entry->ir->rhs,
+ components,
+ channels);
+ if (debug) {
+ printf("to:\n ");
+ entry->ir->print();
+ printf("\n");
+ }
+ }
+ }
+ }
+ } else if (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;
-
+ /* Add this instruction to the assignment list available to be removed. */
assignment_entry *entry = new(ctx) assignment_entry(var, ir);
assignments->push_tail(entry);
@@ -165,7 +266,7 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments)
foreach_iter(exec_list_iterator, iter, *assignments) {
assignment_entry *entry = (assignment_entry *)iter.get();
- printf(" %s\n", entry->lhs->name);
+ printf(" %s (0x%01x)\n", entry->lhs->name, entry->available);
}
}
diff --git a/dist/Mesa/src/glsl/opt_dead_functions.cpp b/dist/Mesa/src/glsl/opt_dead_functions.cpp
index 51c77e3b9..cd3b2c12e 100644
--- a/dist/Mesa/src/glsl/opt_dead_functions.cpp
+++ b/dist/Mesa/src/glsl/opt_dead_functions.cpp
@@ -32,6 +32,8 @@
#include "ir_expression_flattening.h"
#include "glsl_types.h"
+namespace {
+
class signature_entry : public exec_node
{
public:
@@ -62,13 +64,12 @@ public:
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;
};
+} /* unnamed namespace */
signature_entry *
ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
@@ -103,7 +104,7 @@ ir_dead_functions_visitor::visit_enter(ir_function_signature *ir)
ir_visitor_status
ir_dead_functions_visitor::visit_enter(ir_call *ir)
{
- signature_entry *entry = this->get_signature_entry(ir->get_callee());
+ signature_entry *entry = this->get_signature_entry(ir->callee);
entry->used = true;
diff --git a/dist/Mesa/src/glsl/opt_discard_simplification.cpp b/dist/Mesa/src/glsl/opt_discard_simplification.cpp
deleted file mode 100644
index a19947ddd..000000000
--- a/dist/Mesa/src/glsl/opt_discard_simplification.cpp
+++ /dev/null
@@ -1,204 +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 *);
- ir_visitor_status visit_enter(ir_assignment *);
-
- bool progress;
-};
-
-static ir_discard *
-find_unconditional_discard(exec_list &instructions)
-{
- foreach_list(n, &instructions) {
- ir_instruction *ir = (ir_instruction *)n;
-
- if (ir->ir_type == ir_type_return ||
- ir->ir_type == ir_type_loop_jump)
- return NULL;
-
- /* So far, this code doesn't know how to look inside of flow
- * control to see if a discard later on at this level is
- * unconditional.
- */
- if (ir->ir_type == ir_type_if ||
- ir->ir_type == ir_type_loop)
- return NULL;
-
- ir_discard *discard = ir->as_discard();
- if (discard != NULL && discard->condition == NULL)
- return discard;
- }
- return NULL;
-}
-
-static bool
-is_only_instruction(ir_discard *discard)
-{
- return (discard->prev->is_head_sentinel() &&
- discard->next->is_tail_sentinel());
-}
-
-/* We only care about the top level instructions, so don't descend
- * into expressions.
- */
-ir_visitor_status
-discard_simplifier::visit_enter(ir_assignment *ir)
-{
- return visit_continue_with_parent;
-}
-
-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/dist/Mesa/src/glsl/opt_function_inlining.cpp b/dist/Mesa/src/glsl/opt_function_inlining.cpp
index 8fef358cc..0733d5180 100644
--- a/dist/Mesa/src/glsl/opt_function_inlining.cpp
+++ b/dist/Mesa/src/glsl/opt_function_inlining.cpp
@@ -27,7 +27,6 @@
* 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"
@@ -40,6 +39,8 @@ do_sampler_replacement(exec_list *instructions,
ir_variable *sampler,
ir_dereference *deref);
+namespace {
+
class ir_function_inlining_visitor : public ir_hierarchical_visitor {
public:
ir_function_inlining_visitor()
@@ -54,7 +55,6 @@ public:
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 *);
@@ -62,25 +62,13 @@ public:
bool progress;
};
-
-bool
-automatic_inlining_predicate(ir_instruction *ir)
-{
- ir_call *call = ir->as_call();
-
- if (call && can_inline(call))
- return true;
-
- return false;
-}
+} /* unnamed namespace */
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;
@@ -90,12 +78,12 @@ static void
replace_return_with_assignment(ir_instruction *ir, void *data)
{
void *ctx = ralloc_parent(ir);
- ir_variable *retval = (ir_variable *)data;
+ ir_dereference *orig_deref = (ir_dereference *) data;
ir_return *ret = ir->as_return();
if (ret) {
if (ret->value) {
- ir_rvalue *lhs = new(ctx) ir_dereference_variable(retval);
+ ir_rvalue *lhs = orig_deref->clone(ctx, NULL);
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
@@ -107,14 +95,13 @@ replace_return_with_assignment(ir_instruction *ir, void *data)
}
}
-ir_rvalue *
+void
ir_call::generate_inline(ir_instruction *next_ir)
{
void *ctx = ralloc_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);
@@ -125,13 +112,6 @@ ir_call::generate_inline(ir_instruction *next_ir)
parameters = new ir_variable *[num_parameters];
- /* Generate storage for the return value. */
- if (!this->callee->return_type->is_void()) {
- 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.
*/
@@ -164,9 +144,9 @@ ir_call::generate_inline(ir_instruction *next_ir)
}
/* Move the actual param into our param variable if it's an 'in' type. */
- if (parameters[i] && (sig_param->mode == ir_var_in ||
+ if (parameters[i] && (sig_param->mode == ir_var_function_in ||
sig_param->mode == ir_var_const_in ||
- sig_param->mode == ir_var_inout)) {
+ sig_param->mode == ir_var_function_inout)) {
ir_assignment *assign;
assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(parameters[i]),
@@ -186,7 +166,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
ir_instruction *new_ir = ir->clone(ctx, ht);
new_instructions.push_tail(new_ir);
- visit_tree(new_ir, replace_return_with_assignment, retval);
+ visit_tree(new_ir, replace_return_with_assignment, this->return_deref);
}
/* If any samplers were passed in, replace any deref of the sampler
@@ -222,8 +202,8 @@ ir_call::generate_inline(ir_instruction *next_ir)
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)) {
+ if (parameters[i] && (sig_param->mode == ir_var_function_out ||
+ sig_param->mode == ir_var_function_inout)) {
ir_assignment *assign;
assign = new(ctx) ir_assignment(param->clone(ctx, NULL)->as_rvalue(),
@@ -239,11 +219,6 @@ ir_call::generate_inline(ir_instruction *next_ir)
delete [] parameters;
hash_table_dtor(ht);
-
- if (retval)
- return new(ctx) ir_dereference_variable(retval);
- else
- return NULL;
}
@@ -283,13 +258,7 @@ 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->generate_inline(ir);
ir->remove();
this->progress = true;
}
@@ -298,25 +267,6 @@ ir_function_inlining_visitor::visit_enter(ir_call *ir)
}
-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."
*
diff --git a/dist/Mesa/src/glsl/opt_if_simplification.cpp b/dist/Mesa/src/glsl/opt_if_simplification.cpp
index 29b1d18aa..db59b131d 100644
--- a/dist/Mesa/src/glsl/opt_if_simplification.cpp
+++ b/dist/Mesa/src/glsl/opt_if_simplification.cpp
@@ -25,11 +25,14 @@
* \file opt_if_simplification.cpp
*
* Moves constant branches of if statements out to the surrounding
- * instruction stream.
+ * instruction stream, and inverts if conditionals to avoid empty
+ * "then" blocks.
*/
#include "ir.h"
+namespace {
+
class ir_if_simplification_visitor : public ir_hierarchical_visitor {
public:
ir_if_simplification_visitor()
@@ -43,12 +46,15 @@ public:
bool made_progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level "if" instructions, so don't
* descend into expressions.
*/
ir_visitor_status
ir_if_simplification_visitor::visit_enter(ir_assignment *ir)
{
+ (void) ir;
return visit_continue_with_parent;
}
@@ -65,6 +71,14 @@ do_if_simplification(exec_list *instructions)
ir_visitor_status
ir_if_simplification_visitor::visit_leave(ir_if *ir)
{
+ /* If the if statement has nothing on either side, remove it. */
+ if (ir->then_instructions.is_empty() &&
+ ir->else_instructions.is_empty()) {
+ ir->remove();
+ this->made_progress = true;
+ return visit_continue;
+ }
+
/* 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
@@ -88,6 +102,30 @@ ir_if_simplification_visitor::visit_leave(ir_if *ir)
}
ir->remove();
this->made_progress = true;
+ return visit_continue;
+ }
+
+ /* Turn:
+ *
+ * if (cond) {
+ * } else {
+ * do_work();
+ * }
+ *
+ * into :
+ *
+ * if (!cond)
+ * do_work();
+ *
+ * which avoids control flow for "else" (which is usually more
+ * expensive than normal operations), and the "not" can usually be
+ * folded into the generation of "cond" anyway.
+ */
+ if (ir->then_instructions.is_empty()) {
+ ir->condition = new(ralloc_parent(ir->condition))
+ ir_expression(ir_unop_logic_not, ir->condition);
+ ir->else_instructions.move_nodes_to(&ir->then_instructions);
+ this->made_progress = true;
}
return visit_continue;
diff --git a/dist/Mesa/src/glsl/opt_redundant_jumps.cpp b/dist/Mesa/src/glsl/opt_redundant_jumps.cpp
index f350fa947..8606dcbb7 100644
--- a/dist/Mesa/src/glsl/opt_redundant_jumps.cpp
+++ b/dist/Mesa/src/glsl/opt_redundant_jumps.cpp
@@ -28,6 +28,8 @@
#include "ir.h"
+namespace {
+
class redundant_jumps_visitor : public ir_hierarchical_visitor {
public:
redundant_jumps_visitor()
@@ -42,6 +44,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level instructions, so don't descend
* into expressions.
*/
diff --git a/dist/Mesa/src/glsl/opt_structure_splitting.cpp b/dist/Mesa/src/glsl/opt_structure_splitting.cpp
index 2c1f6bb22..9f4b3dd8f 100644
--- a/dist/Mesa/src/glsl/opt_structure_splitting.cpp
+++ b/dist/Mesa/src/glsl/opt_structure_splitting.cpp
@@ -34,20 +34,17 @@
#include "ir.h"
#include "ir_visitor.h"
-#include "ir_print_visitor.h"
#include "ir_rvalue_visitor.h"
#include "glsl_types.h"
+namespace {
+
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
+class variable_entry : public exec_node
{
public:
- variable_entry2(ir_variable *var)
+ variable_entry(ir_variable *var)
{
this->var = var;
this->whole_structure_access = 0;
@@ -61,7 +58,11 @@ public:
/** 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 */
+ /* If the variable had a decl we can work with in the instruction
+ * stream. We can't do splitting on function arguments, which
+ * don't get this variable set.
+ */
+ bool declaration;
ir_variable **components;
@@ -89,7 +90,7 @@ public:
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);
+ variable_entry *get_variable_entry(ir_variable *var);
/* List of variable_entry */
exec_list variable_list;
@@ -97,21 +98,22 @@ public:
void *mem_ctx;
};
-variable_entry2 *
-ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
+variable_entry *
+ir_structure_reference_visitor::get_variable_entry(ir_variable *var)
{
assert(var);
- if (!var->type->is_record() || var->mode == ir_var_uniform)
+ if (!var->type->is_record() || var->mode == ir_var_uniform
+ || var->mode == ir_var_shader_in || var->mode == ir_var_shader_out)
return NULL;
foreach_iter(exec_list_iterator, iter, this->variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (entry->var == var)
return entry;
}
- variable_entry2 *entry = new(mem_ctx) variable_entry2(var);
+ variable_entry *entry = new(mem_ctx) variable_entry(var);
this->variable_list.push_tail(entry);
return entry;
}
@@ -120,7 +122,7 @@ ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
ir_visitor_status
ir_structure_reference_visitor::visit(ir_variable *ir)
{
- variable_entry2 *entry = this->get_variable_entry2(ir);
+ variable_entry *entry = this->get_variable_entry(ir);
if (entry)
entry->declaration = true;
@@ -132,7 +134,7 @@ 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);
+ variable_entry *entry = this->get_variable_entry(var);
if (entry)
entry->whole_structure_access++;
@@ -171,8 +173,9 @@ ir_structure_reference_visitor::visit_enter(ir_assignment *ir)
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.
+ /* We don't have logic for structure-splitting function arguments,
+ * so just look at the body instructions and not the parameter
+ * declarations.
*/
visit_list_elements(this, &ir->body);
return visit_continue_with_parent;
@@ -193,13 +196,12 @@ public:
void split_deref(ir_dereference **deref);
void handle_rvalue(ir_rvalue **rvalue);
- variable_entry2 *get_splitting_entry(ir_variable *var);
+ variable_entry *get_splitting_entry(ir_variable *var);
exec_list *variable_list;
- void *mem_ctx;
};
-variable_entry2 *
+variable_entry *
ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
{
assert(var);
@@ -208,7 +210,7 @@ ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
return NULL;
foreach_iter(exec_list_iterator, iter, *this->variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (entry->var == var) {
return entry;
}
@@ -228,7 +230,7 @@ ir_structure_splitting_visitor::split_deref(ir_dereference **deref)
if (!deref_var)
return;
- variable_entry2 *entry = get_splitting_entry(deref_var->var);
+ variable_entry *entry = get_splitting_entry(deref_var->var);
if (!entry)
return;
@@ -263,8 +265,8 @@ 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;
+ variable_entry *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL;
+ variable_entry *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) {
@@ -303,6 +305,8 @@ ir_structure_splitting_visitor::visit_leave(ir_assignment *ir)
return visit_continue;
}
+} /* unnamed namespace */
+
bool
do_structure_splitting(exec_list *instructions)
{
@@ -312,7 +316,7 @@ do_structure_splitting(exec_list *instructions)
/* Trim out variables we can't split. */
foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (debug) {
printf("structure %s@%p: decl %d, whole_access %d\n",
@@ -334,7 +338,7 @@ do_structure_splitting(exec_list *instructions)
* components.
*/
foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
const struct glsl_type *type = entry->var->type;
entry->mem_ctx = ralloc_parent(entry->var);
diff --git a/dist/Mesa/src/glsl/opt_tree_grafting.cpp b/dist/Mesa/src/glsl/opt_tree_grafting.cpp
index 1ef940f9c..9aceb134d 100644
--- a/dist/Mesa/src/glsl/opt_tree_grafting.cpp
+++ b/dist/Mesa/src/glsl/opt_tree_grafting.cpp
@@ -54,6 +54,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
static bool debug = false;
class ir_tree_grafting_visitor : public ir_hierarchical_visitor {
@@ -76,6 +78,8 @@ public:
virtual ir_visitor_status visit_enter(class ir_swizzle *);
virtual ir_visitor_status visit_enter(class ir_texture *);
+ ir_visitor_status check_graft(ir_instruction *ir, ir_variable *var);
+
bool do_graft(ir_rvalue **rvalue);
bool progress;
@@ -148,18 +152,17 @@ ir_tree_grafting_visitor::visit_enter(ir_loop *ir)
return visit_stop;
}
+/**
+ * Check if we can continue grafting after writing to a variable. If the
+ * expression we're trying to graft references the variable, we must stop.
+ *
+ * \param ir An instruction that writes to a variable.
+ * \param var The variable being updated.
+ */
ir_visitor_status
-ir_tree_grafting_visitor::visit_leave(ir_assignment *ir)
+ir_tree_grafting_visitor::check_graft(ir_instruction *ir, ir_variable *var)
{
- 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 (dereferences_variable(this->graft_assign->rhs, var)) {
if (debug) {
printf("graft killed by: ");
ir->print();
@@ -172,6 +175,19 @@ ir_tree_grafting_visitor::visit_leave(ir_assignment *ir)
}
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.
+ */
+ return check_graft(ir, ir->lhs->variable_referenced());
+}
+
+ir_visitor_status
ir_tree_grafting_visitor::visit_enter(ir_function *ir)
{
(void) ir;
@@ -188,15 +204,19 @@ ir_tree_grafting_visitor::visit_enter(ir_function_signature *ir)
ir_visitor_status
ir_tree_grafting_visitor::visit_enter(ir_call *ir)
{
- exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator();
+ exec_list_iterator sig_iter = ir->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 && sig_param->mode != ir_var_const_in)
+ if (sig_param->mode != ir_var_function_in
+ && sig_param->mode != ir_var_const_in) {
+ if (check_graft(ir, sig_param) == visit_stop)
+ return visit_stop;
continue;
+ }
if (do_graft(&new_ir)) {
ir->replace_with(new_ir);
@@ -205,6 +225,9 @@ ir_tree_grafting_visitor::visit_enter(ir_call *ir)
sig_iter.next();
}
+ if (ir->return_deref && check_graft(ir, ir->return_deref->var) == visit_stop)
+ return visit_stop;
+
return visit_continue;
}
@@ -251,6 +274,7 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
switch (ir->op) {
case ir_tex:
+ case ir_lod:
break;
case ir_txb:
if (do_graft(&ir->lod_info.bias))
@@ -258,9 +282,14 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
break;
case ir_txf:
case ir_txl:
+ case ir_txs:
if (do_graft(&ir->lod_info.lod))
return visit_stop;
break;
+ case ir_txf_ms:
+ if (do_graft(&ir->lod_info.sample_index))
+ return visit_stop;
+ break;
case ir_txd:
if (do_graft(&ir->lod_info.grad.dPdx) ||
do_graft(&ir->lod_info.grad.dPdy))
@@ -327,11 +356,12 @@ tree_grafting_basic_block(ir_instruction *bb_first,
if (!lhs_var)
continue;
- if (lhs_var->mode == ir_var_out ||
- lhs_var->mode == ir_var_inout)
+ if (lhs_var->mode == ir_var_function_out ||
+ lhs_var->mode == ir_var_function_inout ||
+ lhs_var->mode == ir_var_shader_out)
continue;
- variable_entry *entry = info->refs->get_variable_entry(lhs_var);
+ ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var);
if (!entry->declaration ||
entry->assigned_count != 1 ||
@@ -348,6 +378,8 @@ tree_grafting_basic_block(ir_instruction *bb_first,
}
}
+} /* unnamed namespace */
+
/**
* Does a copy propagation pass on the code present in the instruction stream.
*/
diff --git a/dist/Mesa/src/glsl/program.h b/dist/Mesa/src/glsl/program.h
index 437ca1462..f15113a08 100644
--- a/dist/Mesa/src/glsl/program.h
+++ b/dist/Mesa/src/glsl/program.h
@@ -16,20 +16,37 @@
* 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.
+ * 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"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void
+_mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
+ bool dump_ast, bool dump_hir);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
extern void
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog);
extern void
-linker_error(gl_shader_program *prog, const char *fmt, ...)
+linker_error(struct gl_shader_program *prog, const char *fmt, ...)
PRINTFLIKE(2, 3);
extern void
-linker_warning(gl_shader_program *prog, const char *fmt, ...)
+linker_warning(struct gl_shader_program *prog, const char *fmt, ...)
PRINTFLIKE(2, 3);
+
+extern long
+parse_program_resource_name(const GLchar *name,
+ const GLchar **out_base_name_end);
diff --git a/dist/Mesa/src/glsl/ralloc.c b/dist/Mesa/src/glsl/ralloc.c
index 6a5eac6b9..e79dad764 100644
--- a/dist/Mesa/src/glsl/ralloc.c
+++ b/dist/Mesa/src/glsl/ralloc.c
@@ -28,16 +28,19 @@
#include <string.h>
#include <stdint.h>
-#include "ralloc.h"
+/* Android defines SIZE_MAX in limits.h, instead of the standard stdint.h */
+#ifdef ANDROID
+#include <limits.h>
+#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)
+/* Some versions of MinGW are missing _vscprintf's declaration, although they
+ * still provide the symbol in the import library. */
+#ifdef __MINGW32__
+_CRTIMP int _vscprintf(const char *format, va_list argptr);
#endif
+#include "ralloc.h"
+
#ifndef va_copy
#ifdef __va_copy
#define va_copy(dest, src) __va_copy((dest), (src))
@@ -104,9 +107,13 @@ void *
ralloc_size(const void *ctx, size_t size)
{
void *block = calloc(1, size + sizeof(ralloc_header));
+ ralloc_header *info;
+ ralloc_header *parent;
- ralloc_header *info = (ralloc_header *) block;
- ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL;
+ if (unlikely(block == NULL))
+ return NULL;
+ info = (ralloc_header *) block;
+ parent = ctx != NULL ? get_header(ctx) : NULL;
add_child(parent, info);
@@ -267,7 +274,7 @@ ralloc_parent(const void *ptr)
return NULL;
info = get_header(ptr);
- return PTR_FROM_HEADER(info->parent);
+ return info->parent ? PTR_FROM_HEADER(info->parent) : NULL;
}
static void *autofree_context = NULL;
@@ -392,7 +399,7 @@ printf_length(const char *fmt, va_list untouched_args)
va_list args;
va_copy(args, untouched_args);
-#ifdef _MSC_VER
+#ifdef _WIN32
/* We need to use _vcsprintf to calculate the size as vsnprintf returns -1
* if the number of characters to write is greater than count.
*/
@@ -434,7 +441,28 @@ ralloc_asprintf_append(char **str, const char *fmt, ...)
bool
ralloc_vasprintf_append(char **str, const char *fmt, va_list args)
{
- size_t existing_length, new_length;
+ size_t existing_length;
+ assert(str != NULL);
+ existing_length = *str ? strlen(*str) : 0;
+ return ralloc_vasprintf_rewrite_tail(str, &existing_length, fmt, args);
+}
+
+bool
+ralloc_asprintf_rewrite_tail(char **str, size_t *start, const char *fmt, ...)
+{
+ bool success;
+ va_list args;
+ va_start(args, fmt);
+ success = ralloc_vasprintf_rewrite_tail(str, start, fmt, args);
+ va_end(args);
+ return success;
+}
+
+bool
+ralloc_vasprintf_rewrite_tail(char **str, size_t *start, const char *fmt,
+ va_list args)
+{
+ size_t new_length;
char *ptr;
assert(str != NULL);
@@ -445,14 +473,14 @@ ralloc_vasprintf_append(char **str, const char *fmt, va_list args)
return true;
}
- existing_length = strlen(*str);
new_length = printf_length(fmt, args);
- ptr = resize(*str, existing_length + new_length + 1);
+ ptr = resize(*str, *start + new_length + 1);
if (unlikely(ptr == NULL))
return false;
- vsnprintf(ptr + existing_length, new_length + 1, fmt, args);
+ vsnprintf(ptr + *start, new_length + 1, fmt, args);
*str = ptr;
+ *start += new_length;
return true;
}
diff --git a/dist/Mesa/src/glsl/s_expression.cpp b/dist/Mesa/src/glsl/s_expression.cpp
index e704a3be2..1bdf6bca6 100644
--- a/dist/Mesa/src/glsl/s_expression.cpp
+++ b/dist/Mesa/src/glsl/s_expression.cpp
@@ -23,6 +23,7 @@
*/
#include <assert.h>
+#include <limits>
#include "s_expression.h"
s_symbol::s_symbol(const char *str, size_t n)
@@ -64,21 +65,28 @@ read_atom(void *ctx, const char *&src, char *&symbol_buffer)
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);
+ // Check for the special symbol '+INF', which means +Infinity. Note: C99
+ // requires strtof to parse '+INF' as +Infinity, but we still support some
+ // non-C99-compliant compilers (e.g. MSVC).
+ if (n == 4 && strncmp(src, "+INF", 4) == 0) {
+ expr = new(ctx) s_float(std::numeric_limits<float>::infinity());
} else {
- // Not a number; return a symbol.
- symbol_buffer[n] = '\0';
- expr = new(ctx) s_symbol(symbol_buffer, n);
+ // Check if the atom is a number.
+ char *float_end = NULL;
+ float f = glsl_strtof(src, &float_end);
+ if (float_end != src) {
+ char *int_end = NULL;
+ int i = strtol(src, &int_end, 10);
+ // If strtof 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.
+ symbol_buffer[n] = '\0';
+ expr = new(ctx) s_symbol(symbol_buffer, n);
+ }
}
src += n;