summaryrefslogtreecommitdiff
path: root/thirdparty/glslang
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/glslang')
-rw-r--r--thirdparty/glslang/LICENSE.txt282
-rw-r--r--thirdparty/glslang/SPIRV/CInterface/spirv_c_interface.cpp110
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.EXT.h1
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.KHR.h7
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/SPIRV/GlslangToSpv.cpp953
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/SPIRV/GlslangToSpv.h0
-rw-r--r--thirdparty/glslang/SPIRV/Logger.cpp2
-rw-r--r--thirdparty/glslang/SPIRV/NonSemanticDebugPrintf.h50
-rw-r--r--thirdparty/glslang/SPIRV/SPVRemapper.cpp3
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.cpp194
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.h138
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.cpp101
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.h16
-rw-r--r--thirdparty/glslang/SPIRV/disassemble.cpp13
-rw-r--r--thirdparty/glslang/SPIRV/doc.cpp289
-rw-r--r--thirdparty/glslang/SPIRV/doc.h1
-rw-r--r--thirdparty/glslang/SPIRV/hex_float.h4
-rw-r--r--thirdparty/glslang/SPIRV/spirv.hpp200
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/SPIRV/spvIR.h27
-rw-r--r--thirdparty/glslang/StandAlone/DirStackFileIncluder.h141
-rw-r--r--thirdparty/glslang/StandAlone/ResourceLimits.cpp496
-rw-r--r--thirdparty/glslang/StandAlone/ResourceLimits.h (renamed from thirdparty/glslang/glslang/MachineIndependent/pch.cpp)30
-rw-r--r--thirdparty/glslang/glslang/CInterface/glslang_c_interface.cpp428
-rw-r--r--thirdparty/glslang/glslang/Include/BaseTypes.h90
-rw-r--r--thirdparty/glslang/glslang/Include/Common.h27
-rw-r--r--thirdparty/glslang/glslang/Include/ConstantUnion.h2
-rw-r--r--thirdparty/glslang/glslang/Include/ResourceLimits.h1
-rw-r--r--thirdparty/glslang/glslang/Include/Types.h60
-rw-r--r--thirdparty/glslang/glslang/Include/glslang_c_interface.h249
-rw-r--r--thirdparty/glslang/glslang/Include/glslang_c_shader_types.h185
-rw-r--r--thirdparty/glslang/glslang/Include/intermediate.h43
-rw-r--r--thirdparty/glslang/glslang/Include/revision.h3
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Constant.cpp11
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp723
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp385
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/LiveTraverser.h38
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp11
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp562
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h11
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Scan.cpp54
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp102
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp8
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h12
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.cpp146
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.h24
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/gl_types.h8
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang.y115
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp7328
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h513
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp40
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp106
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.h19
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp142
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/localintermediate.h145
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp18
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/parseVersions.h13
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp36
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp3
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h5
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp82
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp0
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp2
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/reflection.cpp263
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/reflection.h4
-rw-r--r--thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp26
-rw-r--r--thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js39
-rw-r--r--[-rwxr-xr-x]thirdparty/glslang/glslang/Public/ShaderLang.h311
-rw-r--r--thirdparty/glslang/glslang/build_info.h62
68 files changed, 10176 insertions, 5337 deletions
diff --git a/thirdparty/glslang/LICENSE.txt b/thirdparty/glslang/LICENSE.txt
index a10c0944f8..5f58565dc4 100644
--- a/thirdparty/glslang/LICENSE.txt
+++ b/thirdparty/glslang/LICENSE.txt
@@ -1,6 +1,6 @@
Here, glslang proper means core GLSL parsing, HLSL parsing, and SPIR-V code
-generation. Glslang proper requires use of two licenses, one that covers
-non-preprocessing and an additional one that covers preprocessing.
+generation. Glslang proper requires use of a number of licenses, one that covers
+preprocessing and others that covers non-preprocessing.
Bison was removed long ago. You can build glslang from the source grammar,
using tools of your choice, without using bison or any bison files.
@@ -23,6 +23,10 @@ Other parts, outside of glslang proper, include:
The core of glslang-proper, minus the preprocessor is licenced as follows:
+--------------------------------------------------------------------------------
+3-Clause BSD License
+--------------------------------------------------------------------------------
+
//
// Copyright (C) 2015-2018 Google, Inc.
// Copyright (C) <various other dates and companies>
@@ -59,9 +63,281 @@ The core of glslang-proper, minus the preprocessor is licenced as follows:
// POSSIBILITY OF SUCH DAMAGE.
//
+
+--------------------------------------------------------------------------------
+2-Clause BSD License
+--------------------------------------------------------------------------------
+
+Copyright 2020 The Khronos Group Inc
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+--------------------------------------------------------------------------------
+The MIT License
+--------------------------------------------------------------------------------
+
+Copyright 2020 The Khronos Group Inc
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+--------------------------------------------------------------------------------
+APACHE LICENSE, VERSION 2.0
+--------------------------------------------------------------------------------
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+--------------------------------------------------------------------------------
+GPL 3 with special bison exception
+--------------------------------------------------------------------------------
+
+ Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison.
+
+--------------------------------------------------------------------------------
+================================================================================
--------------------------------------------------------------------------------
-The preprocessor has the core license stated above, plus an additional licence:
+The preprocessor has the core licenses stated above, plus an additional licence:
/****************************************************************************\
Copyright (c) 2002, NVIDIA Corporation.
diff --git a/thirdparty/glslang/SPIRV/CInterface/spirv_c_interface.cpp b/thirdparty/glslang/SPIRV/CInterface/spirv_c_interface.cpp
new file mode 100644
index 0000000000..a0790f48f1
--- /dev/null
+++ b/thirdparty/glslang/SPIRV/CInterface/spirv_c_interface.cpp
@@ -0,0 +1,110 @@
+/**
+ This code is based on the glslang_c_interface implementation by Viktor Latypov
+**/
+
+/**
+BSD 2-Clause License
+
+Copyright (c) 2019, Viktor Latypov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+**/
+
+#include "glslang/Include/glslang_c_interface.h"
+
+#include "SPIRV/GlslangToSpv.h"
+#include "SPIRV/Logger.h"
+#include "SPIRV/SpvTools.h"
+
+typedef struct glslang_program_s {
+ glslang::TProgram* program;
+ std::vector<unsigned int> spirv;
+ std::string loggerMessages;
+} glslang_program_t;
+
+static EShLanguage c_shader_stage(glslang_stage_t stage)
+{
+ switch (stage) {
+ case GLSLANG_STAGE_VERTEX:
+ return EShLangVertex;
+ case GLSLANG_STAGE_TESSCONTROL:
+ return EShLangTessControl;
+ case GLSLANG_STAGE_TESSEVALUATION:
+ return EShLangTessEvaluation;
+ case GLSLANG_STAGE_GEOMETRY:
+ return EShLangGeometry;
+ case GLSLANG_STAGE_FRAGMENT:
+ return EShLangFragment;
+ case GLSLANG_STAGE_COMPUTE:
+ return EShLangCompute;
+ case GLSLANG_STAGE_RAYGEN_NV:
+ return EShLangRayGen;
+ case GLSLANG_STAGE_INTERSECT_NV:
+ return EShLangIntersect;
+ case GLSLANG_STAGE_ANYHIT_NV:
+ return EShLangAnyHit;
+ case GLSLANG_STAGE_CLOSESTHIT_NV:
+ return EShLangClosestHit;
+ case GLSLANG_STAGE_MISS_NV:
+ return EShLangMiss;
+ case GLSLANG_STAGE_CALLABLE_NV:
+ return EShLangCallable;
+ case GLSLANG_STAGE_TASK_NV:
+ return EShLangTaskNV;
+ case GLSLANG_STAGE_MESH_NV:
+ return EShLangMeshNV;
+ default:
+ break;
+ }
+ return EShLangCount;
+}
+
+GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage)
+{
+ spv::SpvBuildLogger logger;
+ glslang::SpvOptions spvOptions;
+ spvOptions.validate = true;
+
+ const glslang::TIntermediate* intermediate = program->program->getIntermediate(c_shader_stage(stage));
+
+ glslang::GlslangToSpv(*intermediate, program->spirv, &logger, &spvOptions);
+
+ program->loggerMessages = logger.getAllMessages();
+}
+
+GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program) { return program->spirv.size(); }
+
+GLSLANG_EXPORT void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int* out)
+{
+ memcpy(out, program->spirv.data(), program->spirv.size() * sizeof(unsigned int));
+}
+
+GLSLANG_EXPORT unsigned int* glslang_program_SPIRV_get_ptr(glslang_program_t* program)
+{
+ return program->spirv.data();
+}
+
+GLSLANG_EXPORT const char* glslang_program_SPIRV_get_messages(glslang_program_t* program)
+{
+ return program->loggerMessages.empty() ? nullptr : program->loggerMessages.c_str();
+}
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
index 40164b6187..6eb0eeeada 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
@@ -35,5 +35,6 @@ static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shade
static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fully_covered";
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
+static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
#endif // #ifndef GLSLextEXT_H
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
index e58e836a8d..d783a8f299 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
@@ -1,5 +1,6 @@
/*
-** Copyright (c) 2014-2016 The Khronos Group Inc.
+** Copyright (c) 2014-2020 The Khronos Group Inc.
+** Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
@@ -44,5 +45,7 @@ static const char* const E_SPV_EXT_physical_storage_buffer = "SPV_EXT_physi
static const char* const E_SPV_KHR_physical_storage_buffer = "SPV_KHR_physical_storage_buffer";
static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragment_shader_interlock";
static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock";
-
+static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info";
+static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing";
+static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
#endif // #ifndef GLSLextKHR_H
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
index 0c8a87e3ce..c85541603f 100755..100644
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
@@ -1,7 +1,8 @@
//
// Copyright (C) 2014-2016 LunarG, Inc.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -48,13 +49,16 @@ namespace spv {
#include "GLSL.ext.EXT.h"
#include "GLSL.ext.AMD.h"
#include "GLSL.ext.NV.h"
+ #include "NonSemanticDebugPrintf.h"
}
// Glslang includes
#include "../glslang/MachineIndependent/localintermediate.h"
#include "../glslang/MachineIndependent/SymbolTable.h"
#include "../glslang/Include/Common.h"
-#include "../glslang/Include/revision.h"
+
+// Build-time generated includes
+#include "glslang/build_info.h"
#include <fstream>
#include <iomanip>
@@ -187,7 +191,8 @@ protected:
void makeGlobalInitializers(const glslang::TIntermSequence&);
void visitFunctions(const glslang::TIntermSequence&);
void handleFunctionEntry(const glslang::TIntermAggregate* node);
- void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
+ void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
+ spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
void translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments);
spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node);
spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*);
@@ -196,28 +201,36 @@ protected:
glslang::TBasicType typeProxy, bool reduceComparison = true);
spv::Id createBinaryMatrixOperation(spv::Op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right);
spv::Id createUnaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id operand,
- glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
+ glslang::TBasicType typeProxy,
+ const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
spv::Id createUnaryMatrixOperation(spv::Op op, OpDecorations&, spv::Id typeId, spv::Id operand,
glslang::TBasicType typeProxy);
spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand,
glslang::TBasicType typeProxy);
spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize);
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
- spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
- spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
- spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector<spv::Id>& operands);
- spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
- spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
+ spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId,
+ std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
+ const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags);
+ spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands,
+ glslang::TBasicType typeProxy);
+ spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation,
+ spv::Id typeId, std::vector<spv::Id>& operands);
+ spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands,
+ glslang::TBasicType typeProxy);
+ spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId,
+ std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId);
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier);
spv::Id createSpvConstant(const glslang::TIntermTyped&);
- spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant);
+ spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&,
+ int& nextConst, bool specConstant);
bool isTrivialLeaf(const glslang::TIntermTyped* node);
bool isTrivial(const glslang::TIntermTyped* node);
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
spv::Id getExtBuiltins(const char* name);
- std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
+ std::pair<spv::Id, spv::Id> getForcedType(glslang::TBuiltInVariable builtIn, const glslang::TType&);
spv::Id translateForcedType(spv::Id object);
spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
@@ -233,15 +246,18 @@ protected:
spv::Builder builder;
bool inEntryPoint;
bool entryPointTerminated;
- bool linkageOnly; // true when visiting the set of objects in the AST present only for establishing interface, whether or not they were statically used
+ bool linkageOnly; // true when visiting the set of objects in the AST present only for
+ // establishing interface, whether or not they were statically used
std::set<spv::Id> iOSet; // all input/output variables from either static use or declaration of interface
const glslang::TIntermediate* glslangIntermediate;
bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp
spv::Id stdBuiltins;
+ spv::Id nonSemanticDebugPrintf;
std::unordered_map<const char*, spv::Id> extBuiltinMap;
std::unordered_map<int, spv::Id> symbolValues;
- std::unordered_set<int> rValueParameters; // set of formal function parameters passed as rValues, rather than a pointer
+ std::unordered_set<int> rValueParameters; // set of formal function parameters passed as rValues,
+ // rather than a pointer
std::unordered_map<std::string, spv::Function*> functionMap;
std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
// for mapping glslang block indices to spv indices (e.g., due to hidden members):
@@ -267,6 +283,8 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
{
#ifdef GLSLANG_WEB
return spv::SourceLanguageESSL;
+#elif defined(GLSLANG_ANGLE)
+ return spv::SourceLanguageGLSL;
#endif
switch (source) {
@@ -299,12 +317,12 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
case EShLangTessControl: return spv::ExecutionModelTessellationControl;
case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
case EShLangGeometry: return spv::ExecutionModelGeometry;
- case EShLangRayGenNV: return spv::ExecutionModelRayGenerationNV;
- case EShLangIntersectNV: return spv::ExecutionModelIntersectionNV;
- case EShLangAnyHitNV: return spv::ExecutionModelAnyHitNV;
- case EShLangClosestHitNV: return spv::ExecutionModelClosestHitNV;
- case EShLangMissNV: return spv::ExecutionModelMissNV;
- case EShLangCallableNV: return spv::ExecutionModelCallableNV;
+ case EShLangRayGen: return spv::ExecutionModelRayGenerationKHR;
+ case EShLangIntersect: return spv::ExecutionModelIntersectionKHR;
+ case EShLangAnyHit: return spv::ExecutionModelAnyHitKHR;
+ case EShLangClosestHit: return spv::ExecutionModelClosestHitKHR;
+ case EShLangMiss: return spv::ExecutionModelMissKHR;
+ case EShLangCallable: return spv::ExecutionModelCallableKHR;
case EShLangTaskNV: return spv::ExecutionModelTaskNV;
case EShLangMeshNV: return spv::ExecutionModelMeshNV;
#endif
@@ -358,11 +376,11 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
case glslang::EvqVaryingIn: return spv::DecorationBlock;
case glslang::EvqVaryingOut: return spv::DecorationBlock;
#ifndef GLSLANG_WEB
- case glslang::EvqPayloadNV: return spv::DecorationBlock;
- case glslang::EvqPayloadInNV: return spv::DecorationBlock;
- case glslang::EvqHitAttrNV: return spv::DecorationBlock;
- case glslang::EvqCallableDataNV: return spv::DecorationBlock;
- case glslang::EvqCallableDataInNV: return spv::DecorationBlock;
+ case glslang::EvqPayload: return spv::DecorationBlock;
+ case glslang::EvqPayloadIn: return spv::DecorationBlock;
+ case glslang::EvqHitAttr: return spv::DecorationBlock;
+ case glslang::EvqCallableData: return spv::DecorationBlock;
+ case glslang::EvqCallableDataIn: return spv::DecorationBlock;
#endif
default:
assert(0);
@@ -374,7 +392,8 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
}
// Translate glslang type to SPIR-V memory decorations.
-void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory, bool useVulkanMemoryModel)
+void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory,
+ bool useVulkanMemoryModel)
{
if (!useVulkanMemoryModel) {
if (qualifier.isCoherent())
@@ -433,11 +452,11 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
}
return spv::DecorationMax;
#ifndef GLSLANG_WEB
- case glslang::EvqPayloadNV:
- case glslang::EvqPayloadInNV:
- case glslang::EvqHitAttrNV:
- case glslang::EvqCallableDataNV:
- case glslang::EvqCallableDataInNV:
+ case glslang::EvqPayload:
+ case glslang::EvqPayloadIn:
+ case glslang::EvqHitAttr:
+ case glslang::EvqCallableData:
+ case glslang::EvqCallableDataIn:
return spv::DecorationMax;
#endif
default:
@@ -529,15 +548,11 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(
if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage)
return mask;
- if (coherentFlags.volatil ||
- coherentFlags.coherent ||
- coherentFlags.devicecoherent ||
- coherentFlags.queuefamilycoherent ||
- coherentFlags.workgroupcoherent ||
- coherentFlags.subgroupcoherent) {
+ if (coherentFlags.isVolatile() || coherentFlags.anyCoherent()) {
mask = mask | spv::MemoryAccessMakePointerAvailableKHRMask |
spv::MemoryAccessMakePointerVisibleKHRMask;
}
+
if (coherentFlags.nonprivate) {
mask = mask | spv::MemoryAccessNonPrivatePointerKHRMask;
}
@@ -562,11 +577,7 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands(
return mask;
if (coherentFlags.volatil ||
- coherentFlags.coherent ||
- coherentFlags.devicecoherent ||
- coherentFlags.queuefamilycoherent ||
- coherentFlags.workgroupcoherent ||
- coherentFlags.subgroupcoherent) {
+ coherentFlags.anyCoherent()) {
mask = mask | spv::ImageOperandsMakeTexelAvailableKHRMask |
spv::ImageOperandsMakeTexelVisibleKHRMask;
}
@@ -595,14 +606,11 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere
flags.workgroupcoherent = type.getQualifier().workgroupcoherent ||
type.getQualifier().storage == glslang::EvqShared;
flags.subgroupcoherent = type.getQualifier().subgroupcoherent;
+ flags.shadercallcoherent = type.getQualifier().shadercallcoherent;
flags.volatil = type.getQualifier().volatil;
// *coherent variables are implicitly nonprivate in GLSL
flags.nonprivate = type.getQualifier().nonprivate ||
- flags.subgroupcoherent ||
- flags.workgroupcoherent ||
- flags.queuefamilycoherent ||
- flags.devicecoherent ||
- flags.coherent ||
+ flags.anyCoherent() ||
flags.volatil;
flags.isImage = type.getBasicType() == glslang::EbtSampler;
#endif
@@ -626,6 +634,8 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(
scope = spv::ScopeWorkgroup;
} else if (coherentFlags.subgroupcoherent) {
scope = spv::ScopeSubgroup;
+ } else if (coherentFlags.shadercallcoherent) {
+ scope = spv::ScopeShaderCallKHR;
}
if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::ScopeDevice) {
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
@@ -640,7 +650,8 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(
// is generated only when using the variable in an executable instruction, but not when
// just declaring a struct member variable with it. This is true for PointSize,
// ClipDistance, and CullDistance.
-spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn, bool memberDeclaration)
+spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn,
+ bool memberDeclaration)
{
switch (builtIn) {
case glslang::EbvPointSize:
@@ -933,34 +944,38 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return spv::BuiltInInvocationsPerPixelNV;
// ray tracing
- case glslang::EbvLaunchIdNV:
- return spv::BuiltInLaunchIdNV;
- case glslang::EbvLaunchSizeNV:
- return spv::BuiltInLaunchSizeNV;
- case glslang::EbvWorldRayOriginNV:
- return spv::BuiltInWorldRayOriginNV;
- case glslang::EbvWorldRayDirectionNV:
- return spv::BuiltInWorldRayDirectionNV;
- case glslang::EbvObjectRayOriginNV:
- return spv::BuiltInObjectRayOriginNV;
- case glslang::EbvObjectRayDirectionNV:
- return spv::BuiltInObjectRayDirectionNV;
- case glslang::EbvRayTminNV:
- return spv::BuiltInRayTminNV;
- case glslang::EbvRayTmaxNV:
- return spv::BuiltInRayTmaxNV;
- case glslang::EbvInstanceCustomIndexNV:
- return spv::BuiltInInstanceCustomIndexNV;
- case glslang::EbvHitTNV:
- return spv::BuiltInHitTNV;
- case glslang::EbvHitKindNV:
- return spv::BuiltInHitKindNV;
- case glslang::EbvObjectToWorldNV:
- return spv::BuiltInObjectToWorldNV;
- case glslang::EbvWorldToObjectNV:
- return spv::BuiltInWorldToObjectNV;
- case glslang::EbvIncomingRayFlagsNV:
- return spv::BuiltInIncomingRayFlagsNV;
+ case glslang::EbvLaunchId:
+ return spv::BuiltInLaunchIdKHR;
+ case glslang::EbvLaunchSize:
+ return spv::BuiltInLaunchSizeKHR;
+ case glslang::EbvWorldRayOrigin:
+ return spv::BuiltInWorldRayOriginKHR;
+ case glslang::EbvWorldRayDirection:
+ return spv::BuiltInWorldRayDirectionKHR;
+ case glslang::EbvObjectRayOrigin:
+ return spv::BuiltInObjectRayOriginKHR;
+ case glslang::EbvObjectRayDirection:
+ return spv::BuiltInObjectRayDirectionKHR;
+ case glslang::EbvRayTmin:
+ return spv::BuiltInRayTminKHR;
+ case glslang::EbvRayTmax:
+ return spv::BuiltInRayTmaxKHR;
+ case glslang::EbvInstanceCustomIndex:
+ return spv::BuiltInInstanceCustomIndexKHR;
+ case glslang::EbvHitT:
+ return spv::BuiltInHitTKHR;
+ case glslang::EbvHitKind:
+ return spv::BuiltInHitKindKHR;
+ case glslang::EbvObjectToWorld:
+ case glslang::EbvObjectToWorld3x4:
+ return spv::BuiltInObjectToWorldKHR;
+ case glslang::EbvWorldToObject:
+ case glslang::EbvWorldToObject3x4:
+ return spv::BuiltInWorldToObjectKHR;
+ case glslang::EbvIncomingRayFlags:
+ return spv::BuiltInIncomingRayFlagsKHR;
+ case glslang::EbvGeometryIndex:
+ return spv::BuiltInRayGeometryIndexKHR;
// barycentrics
case glslang::EbvBaryCoordNV:
@@ -1106,7 +1121,8 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
}
}
-spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(const glslang::TIntermSelection& selectionNode) const
+spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(
+ const glslang::TIntermSelection& selectionNode) const
{
if (selectionNode.getFlatten())
return spv::SelectionControlFlattenMask;
@@ -1115,7 +1131,8 @@ spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(cons
return spv::SelectionControlMaskNone;
}
-spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSwitchControl(const glslang::TIntermSwitch& switchNode) const
+spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSwitchControl(const glslang::TIntermSwitch& switchNode)
+ const
{
if (switchNode.getFlatten())
return spv::SelectionControlFlattenMask;
@@ -1169,6 +1186,8 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
// Translate glslang type to SPIR-V storage class.
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
{
+ if (type.getBasicType() == glslang::EbtRayQuery)
+ return spv::StorageClassFunction;
if (type.getQualifier().isPipeInput())
return spv::StorageClassInput;
if (type.getQualifier().isPipeOutput())
@@ -1183,8 +1202,8 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
}
if (type.getQualifier().isUniformOrBuffer() &&
- type.getQualifier().isShaderRecordNV()) {
- return spv::StorageClassShaderRecordBufferNV;
+ type.getQualifier().isShaderRecord()) {
+ return spv::StorageClassShaderRecordBufferKHR;
}
if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
@@ -1206,11 +1225,11 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
case glslang::EvqTemporary: return spv::StorageClassFunction;
case glslang::EvqShared: return spv::StorageClassWorkgroup;
#ifndef GLSLANG_WEB
- case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNV;
- case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNV;
- case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNV;
- case glslang::EvqCallableDataNV: return spv::StorageClassCallableDataNV;
- case glslang::EvqCallableDataInNV: return spv::StorageClassIncomingCallableDataNV;
+ case glslang::EvqPayload: return spv::StorageClassRayPayloadKHR;
+ case glslang::EvqPayloadIn: return spv::StorageClassIncomingRayPayloadKHR;
+ case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
+ case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
+ case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
#endif
default:
assert(0);
@@ -1270,14 +1289,15 @@ bool IsDescriptorResource(const glslang::TType& type)
// uniform and buffer blocks are included, unless it is a push_constant
if (type.getBasicType() == glslang::EbtBlock)
return type.getQualifier().isUniformOrBuffer() &&
- ! type.getQualifier().isShaderRecordNV() &&
+ ! type.getQualifier().isShaderRecord() &&
! type.getQualifier().isPushConstant();
// non block...
// basically samplerXXX/subpass/sampler/texture are all included
// if they are the global-scope-class, not the function parameter
// (or local, if they ever exist) class.
- if (type.getBasicType() == glslang::EbtSampler)
+ if (type.getBasicType() == glslang::EbtSampler ||
+ type.getBasicType() == glslang::EbtAccStruct)
return type.getQualifier().isUniformOrBuffer();
// None of the above.
@@ -1320,6 +1340,8 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
child.workgroupcoherent = true;
if (parent.subgroupcoherent)
child.subgroupcoherent = true;
+ if (parent.shadercallcoherent)
+ child.shadercallcoherent = true;
if (parent.nonprivate)
child.nonprivate = true;
if (parent.volatil)
@@ -1350,16 +1372,18 @@ bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifie
// Implement the TGlslangToSpvTraverser class.
//
-TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate* glslangIntermediate,
- spv::SpvBuildLogger* buildLogger, glslang::SpvOptions& options)
- : TIntermTraverser(true, false, true),
- options(options),
- shaderEntry(nullptr), currentFunction(nullptr),
- sequenceDepth(0), logger(buildLogger),
- builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger),
- inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
- glslangIntermediate(glslangIntermediate),
- nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp())
+TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
+ const glslang::TIntermediate* glslangIntermediate,
+ spv::SpvBuildLogger* buildLogger, glslang::SpvOptions& options) :
+ TIntermTraverser(true, false, true),
+ options(options),
+ shaderEntry(nullptr), currentFunction(nullptr),
+ sequenceDepth(0), logger(buildLogger),
+ builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger),
+ inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
+ glslangIntermediate(glslangIntermediate),
+ nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp()),
+ nonSemanticDebugPrintf(0)
{
spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
@@ -1402,7 +1426,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
- };
+ }
if (glslangIntermediate->usingVulkanMemoryModel()) {
memoryModel = spv::MemoryModelVulkanKHR;
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
@@ -1429,6 +1453,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addExecutionMode(shaderEntry, spv::ExecutionModeXfb);
}
+ if (glslangIntermediate->getLayoutPrimitiveCulling()) {
+ builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingProvisionalKHR);
+ }
+
unsigned int mode;
switch (glslangIntermediate->getStage()) {
case EShLangVertex:
@@ -1458,6 +1486,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
#ifndef GLSLANG_WEB
+
switch(glslangIntermediate->getDepth()) {
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
@@ -1495,7 +1524,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
}
#endif
- break;
+ break;
case EShLangCompute:
builder.addCapability(spv::CapabilityShader);
@@ -1520,7 +1549,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
glslang::TLayoutGeometry primitive;
if (glslangIntermediate->getStage() == EShLangTessControl) {
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices,
+ glslangIntermediate->getVertices());
primitive = glslangIntermediate->getOutputPrimitive();
} else {
primitive = glslangIntermediate->getInputPrimitive();
@@ -1582,15 +1612,24 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
break;
- case EShLangRayGenNV:
- case EShLangIntersectNV:
- case EShLangAnyHitNV:
- case EShLangClosestHitNV:
- case EShLangMissNV:
- case EShLangCallableNV:
- builder.addCapability(spv::CapabilityRayTracingNV);
- builder.addExtension("SPV_NV_ray_tracing");
+ case EShLangRayGen:
+ case EShLangIntersect:
+ case EShLangAnyHit:
+ case EShLangClosestHit:
+ case EShLangMiss:
+ case EShLangCallable:
+ {
+ auto& extensions = glslangIntermediate->getRequestedExtensions();
+ if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
+ builder.addCapability(spv::CapabilityRayTracingProvisionalKHR);
+ builder.addExtension("SPV_KHR_ray_tracing");
+ }
+ else {
+ builder.addCapability(spv::CapabilityRayTracingNV);
+ builder.addExtension("SPV_NV_ray_tracing");
+ }
break;
+ }
case EShLangTaskNV:
case EShLangMeshNV:
builder.addCapability(spv::CapabilityMeshShadingNV);
@@ -1599,8 +1638,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
glslangIntermediate->getLocalSize(1),
glslangIntermediate->getLocalSize(2));
if (glslangIntermediate->getStage() == EShLangMeshNV) {
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
- builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputPrimitivesNV, glslangIntermediate->getPrimitives());
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices,
+ glslangIntermediate->getVertices());
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputPrimitivesNV,
+ glslangIntermediate->getPrimitives());
switch (glslangIntermediate->getOutputPrimitive()) {
case glslang::ElgPoints: mode = spv::ExecutionModeOutputPoints; break;
@@ -1674,20 +1715,24 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
spv::Id id = getSymbolId(symbol);
if (builder.isPointer(id)) {
- // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
- // Consider adding to the OpEntryPoint interface list.
- // Only looking at structures if they have at least one member.
- if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0) {
- spv::StorageClass sc = builder.getStorageClass(id);
- // Before SPIR-V 1.4, we only want to include Input and Output.
- // Starting with SPIR-V 1.4, we want all globals.
- if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && sc != spv::StorageClassFunction) ||
- (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)) {
- iOSet.insert(id);
+ if (!symbol->getType().getQualifier().isParamInput() &&
+ !symbol->getType().getQualifier().isParamOutput()) {
+ // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
+ // Consider adding to the OpEntryPoint interface list.
+ // Only looking at structures if they have at least one member.
+ if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0) {
+ spv::StorageClass sc = builder.getStorageClass(id);
+ // Before SPIR-V 1.4, we only want to include Input and Output.
+ // Starting with SPIR-V 1.4, we want all globals.
+ if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalStorage(id)) ||
+ (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)) {
+ iOSet.insert(id);
+ }
}
}
- // If the SPIR-V type is required to be different than the AST type,
+ // If the SPIR-V type is required to be different than the AST type
+ // (for ex SubgroupMasks or 3x4 ObjectToWorld/WorldToObject matrices),
// translate now from the SPIR-V type to the AST type, for the consuming
// operation.
// Note this turns it from an l-value to an r-value.
@@ -1847,7 +1892,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
int dummySize;
builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()),
TranslateCoherent(node->getLeft()->getType()),
- glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(), dummySize));
+ glslangIntermediate->getBaseAlignmentScalar(
+ node->getLeft()->getType(), dummySize));
} else {
// Load through a block reference is performed with a dot operator that
@@ -1877,7 +1923,9 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
}
// normal case for indexing array or structure or block
- builder.accessChainPush(builder.makeIntConstant(spvIndex), TranslateCoherent(node->getLeft()->getType()), node->getLeft()->getType().getBufferReferenceAlignment());
+ builder.accessChainPush(builder.makeIntConstant(spvIndex),
+ TranslateCoherent(node->getLeft()->getType()),
+ node->getLeft()->getType().getBufferReferenceAlignment());
// Add capabilities here for accessing PointSize and clip/cull distance.
// We have deferred generation of associated capabilities until now.
@@ -1914,9 +1962,11 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
int dummySize;
builder.accessChainPushComponent(index, convertGlslangToSpvType(node->getLeft()->getType()),
TranslateCoherent(node->getLeft()->getType()),
- glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(), dummySize));
+ glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(),
+ dummySize));
} else
- builder.accessChainPush(index, TranslateCoherent(node->getLeft()->getType()), node->getLeft()->getType().getBufferReferenceAlignment());
+ builder.accessChainPush(index, TranslateCoherent(node->getLeft()->getType()),
+ node->getLeft()->getType().getBufferReferenceAlignment());
}
return false;
case glslang::EOpVectorSwizzle:
@@ -1927,7 +1977,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
int dummySize;
builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()),
TranslateCoherent(node->getLeft()->getType()),
- glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(), dummySize));
+ glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(),
+ dummySize));
}
return false;
case glslang::EOpMatrixSwizzle:
@@ -1943,7 +1994,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
if (isTrivial(node->getRight()->getAsTyped()))
break; // handle below as a normal binary operation
// otherwise, we need to do dynamic short circuiting on the right operand
- spv::Id result = createShortCircuit(node->getOp(), *node->getLeft()->getAsTyped(), *node->getRight()->getAsTyped());
+ spv::Id result = createShortCircuit(node->getOp(), *node->getLeft()->getAsTyped(),
+ *node->getRight()->getAsTyped());
builder.clearAccessChain();
builder.setAccessChainRValue(result);
}
@@ -1985,16 +2037,16 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
// Figure out what, if any, type changes are needed when accessing a specific built-in.
// Returns <the type SPIR-V requires for declarion, the type to translate to on use>.
// Also see comment for 'forceType', regarding tracking SPIR-V-required types.
-std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(spv::BuiltIn builtIn,
+std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(glslang::TBuiltInVariable glslangBuiltIn,
const glslang::TType& glslangType)
{
- switch(builtIn)
+ switch(glslangBuiltIn)
{
- case spv::BuiltInSubgroupEqMask:
- case spv::BuiltInSubgroupGeMask:
- case spv::BuiltInSubgroupGtMask:
- case spv::BuiltInSubgroupLeMask:
- case spv::BuiltInSubgroupLtMask: {
+ case glslang::EbvSubGroupEqMask:
+ case glslang::EbvSubGroupGeMask:
+ case glslang::EbvSubGroupGtMask:
+ case glslang::EbvSubGroupLeMask:
+ case glslang::EbvSubGroupLtMask: {
// these require changing a 64-bit scaler -> a vector of 32-bit components
if (glslangType.isVector())
break;
@@ -2002,6 +2054,15 @@ std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(spv::BuiltIn b
builder.makeUintType(64));
return ret;
}
+ // There are no SPIR-V builtins defined for these and map onto original non-transposed
+ // builtins. During visitBinary we insert a transpose
+ case glslang::EbvWorldToObject3x4:
+ case glslang::EbvObjectToWorld3x4: {
+ spv::Id mat43 = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
+ spv::Id mat34 = builder.makeMatrixType(builder.makeFloatType(32), 3, 4);
+ std::pair<spv::Id, spv::Id> ret(mat43, mat34);
+ return ret;
+ }
default:
break;
}
@@ -2040,7 +2101,15 @@ spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object)
} else {
logger->missingFunctionality("forcing 32-bit vector type to non 64-bit scalar");
}
- } else {
+ } else if (builder.isMatrixType(objectTypeId)) {
+ // There are no SPIR-V builtins defined for 3x4 variants of ObjectToWorld/WorldToObject
+ // and we insert a transpose after loading the original non-transposed builtins
+ builder.clearAccessChain();
+ builder.setAccessChainLValue(object);
+ object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, objectTypeId);
+ return builder.createUnaryOp(spv::OpTranspose, desiredTypeId, object);
+
+ } else {
logger->missingFunctionality("forcing non 32-bit vector type");
}
@@ -2091,7 +2160,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
} else {
glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft();
block->traverse(this);
- unsigned int member = node->getOperand()->getAsBinaryNode()->getRight()->getAsConstantUnion()->getConstArray()[0].getUConst();
+ unsigned int member = node->getOperand()->getAsBinaryNode()->getRight()->getAsConstantUnion()
+ ->getConstArray()[0].getUConst();
length = builder.createArrayLength(builder.accessChainGetLValue(), member);
}
@@ -2117,7 +2187,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// Does it need a swizzle inversion? If so, evaluation is inverted;
// operate first on the swizzle base, then apply the swizzle.
spv::Id invertedType = spv::NoType;
- auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ? invertedType : convertGlslangToSpvType(node->getType()); };
+ auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ?
+ invertedType : convertGlslangToSpvType(node->getType()); };
if (node->getOp() == glslang::EOpInterpolateAtCentroid)
invertedType = getInvertedSwizzleType(*node->getOperand());
@@ -2138,7 +2209,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
node->getOp() == glslang::EOpAtomicCounter ||
- node->getOp() == glslang::EOpInterpolateAtCentroid) {
+ node->getOp() == glslang::EOpInterpolateAtCentroid ||
+ node->getOp() == glslang::EOpRayQueryProceed ||
+ node->getOp() == glslang::EOpRayQueryGetRayTMin ||
+ node->getOp() == glslang::EOpRayQueryGetRayFlags ||
+ node->getOp() == glslang::EOpRayQueryGetWorldRayOrigin ||
+ node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
+ node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
+ node->getOp() == glslang::EOpRayQueryTerminate ||
+ node->getOp() == glslang::EOpRayQueryConfirmIntersection) {
operand = builder.accessChainGetLValue(); // Special case l-value operands
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
@@ -2154,11 +2233,13 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// it could be a conversion
if (! result)
- result = createConversion(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType());
+ result = createConversion(node->getOp(), decorations, resultType(), operand,
+ node->getOperand()->getBasicType());
// if not, then possibly an operation
if (! result)
- result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags);
+ result = createUnaryOperation(node->getOp(), decorations, resultType(), operand,
+ node->getOperand()->getBasicType(), lvalueCoherentFlags);
if (result) {
if (invertedType) {
@@ -2229,6 +2310,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
case glslang::EOpEndStreamPrimitive:
builder.createNoResultOp(spv::OpEndStreamPrimitive, operand);
return false;
+ case glslang::EOpRayQueryTerminate:
+ builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operand);
+ return false;
+ case glslang::EOpRayQueryConfirmIntersection:
+ builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
+ return false;
#endif
default:
@@ -2251,7 +2338,8 @@ spv::Id TGlslangToSpvTraverser::createCompositeConstruct(spv::Id resultTypeId, s
std::vector<spv::Id> rTypeConstituents;
int numrTypeConstituents = builder.getNumTypeConstituents(rType);
for (int i = 0; i < numrTypeConstituents; ++i) {
- rTypeConstituents.push_back(builder.createCompositeExtract(constituent, builder.getContainedTypeId(rType, i), i));
+ rTypeConstituents.push_back(builder.createCompositeExtract(constituent,
+ builder.getContainedTypeId(rType, i), i));
}
constituents[c] = createCompositeConstruct(lType, rTypeConstituents);
} else {
@@ -2277,8 +2365,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
spv::Id result = spv::NoResult;
- spv::Id invertedType = spv::NoType; // to use to override the natural type of the node
- auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ? invertedType : convertGlslangToSpvType(node->getType()); };
+ spv::Id invertedType = spv::NoType; // to use to override the natural type of the node
+ std::vector<spv::Builder::AccessChain> complexLvalues; // for holding swizzling l-values too complex for
+ // SPIR-V, for an out parameter
+ std::vector<spv::Id> temporaryLvalues; // temporaries to pass, as proxies for complexLValues
+
+ auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ?
+ invertedType :
+ convertGlslangToSpvType(node->getType()); };
// try texturing
result = createImageTextureFunctionCall(node);
@@ -2382,7 +2476,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
if (node->isUserDefined())
result = handleUserFunctionCall(node);
- // assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done
if (result) {
builder.clearAccessChain();
builder.setAccessChainRValue(result);
@@ -2633,13 +2726,43 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
binOp = node->getOp();
break;
- case glslang::EOpIgnoreIntersectionNV:
- case glslang::EOpTerminateRayNV:
- case glslang::EOpTraceNV:
- case glslang::EOpExecuteCallableNV:
+ case glslang::EOpIgnoreIntersection:
+ case glslang::EOpTerminateRay:
+ case glslang::EOpTrace:
+ case glslang::EOpExecuteCallable:
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
noReturnValue = true;
break;
+ case glslang::EOpRayQueryInitialize:
+ case glslang::EOpRayQueryTerminate:
+ case glslang::EOpRayQueryGenerateIntersection:
+ case glslang::EOpRayQueryConfirmIntersection:
+ builder.addExtension("SPV_KHR_ray_query");
+ builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
+ noReturnValue = true;
+ break;
+ case glslang::EOpRayQueryProceed:
+ case glslang::EOpRayQueryGetIntersectionType:
+ case glslang::EOpRayQueryGetRayTMin:
+ case glslang::EOpRayQueryGetRayFlags:
+ case glslang::EOpRayQueryGetIntersectionT:
+ case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
+ case glslang::EOpRayQueryGetIntersectionInstanceId:
+ case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
+ case glslang::EOpRayQueryGetIntersectionGeometryIndex:
+ case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
+ case glslang::EOpRayQueryGetIntersectionBarycentrics:
+ case glslang::EOpRayQueryGetIntersectionFrontFace:
+ case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
+ case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
+ case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
+ case glslang::EOpRayQueryGetWorldRayDirection:
+ case glslang::EOpRayQueryGetWorldRayOrigin:
+ case glslang::EOpRayQueryGetIntersectionObjectToWorld:
+ case glslang::EOpRayQueryGetIntersectionWorldToObject:
+ builder.addExtension("SPV_KHR_ray_query");
+ builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
+ break;
case glslang::EOpCooperativeMatrixLoad:
case glslang::EOpCooperativeMatrixStore:
noReturnValue = true;
@@ -2651,6 +2774,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
break;
#endif
+ case glslang::EOpDebugPrintf:
+ noReturnValue = true;
+ break;
+
default:
break;
}
@@ -2702,6 +2829,28 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
lvalue = true;
break;
+ case glslang::EOpRayQueryInitialize:
+ case glslang::EOpRayQueryTerminate:
+ case glslang::EOpRayQueryConfirmIntersection:
+ case glslang::EOpRayQueryProceed:
+ case glslang::EOpRayQueryGenerateIntersection:
+ case glslang::EOpRayQueryGetIntersectionType:
+ case glslang::EOpRayQueryGetIntersectionT:
+ case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
+ case glslang::EOpRayQueryGetIntersectionInstanceId:
+ case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
+ case glslang::EOpRayQueryGetIntersectionGeometryIndex:
+ case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
+ case glslang::EOpRayQueryGetIntersectionBarycentrics:
+ case glslang::EOpRayQueryGetIntersectionFrontFace:
+ case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
+ case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
+ case glslang::EOpRayQueryGetIntersectionObjectToWorld:
+ case glslang::EOpRayQueryGetIntersectionWorldToObject:
+ if (arg == 0)
+ lvalue = true;
+ break;
+
case glslang::EOpAtomicAdd:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
@@ -2727,9 +2876,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// Does it need a swizzle inversion? If so, evaluation is inverted;
// operate first on the swizzle base, then apply the swizzle.
+ // That is, we transform
+ //
+ // interpolate(v.zy) -> interpolate(v).zy
+ //
if (glslangOperands[0]->getAsOperator() &&
glslangOperands[0]->getAsOperator()->getOp() == glslang::EOpVectorSwizzle)
- invertedType = convertGlslangToSpvType(glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
+ invertedType = convertGlslangToSpvType(
+ glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
}
break;
case glslang::EOpAtomicLoad:
@@ -2789,8 +2943,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.setAccessChain(save);
// Point to the first element of the array.
- builder.accessChainPush(elementId, TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()),
- glslangOperands[arg]->getAsTyped()->getType().getBufferReferenceAlignment());
+ builder.accessChainPush(elementId,
+ TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()),
+ glslangOperands[arg]->getAsTyped()->getType().getBufferReferenceAlignment());
spv::Builder::AccessChain::CoherentFlags coherentFlags = builder.getAccessChain().coherentFlags;
unsigned int alignment = builder.getAccessChain().alignment;
@@ -2800,7 +2955,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask;
if (node->getOp() == glslang::EOpCooperativeMatrixStore)
memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask;
- if (builder.getStorageClass(builder.getAccessChain().base) == spv::StorageClassPhysicalStorageBufferEXT) {
+ if (builder.getStorageClass(builder.getAccessChain().base) ==
+ spv::StorageClassPhysicalStorageBufferEXT) {
memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask);
}
@@ -2810,8 +2966,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
memoryAccessOperands.push_back(spv::IdImmediate(false, alignment));
}
- if (memoryAccess & (spv::MemoryAccessMakePointerAvailableKHRMask | spv::MemoryAccessMakePointerVisibleKHRMask)) {
- memoryAccessOperands.push_back(spv::IdImmediate(true, builder.makeUintConstant(TranslateMemoryScope(coherentFlags))));
+ if (memoryAccess &
+ (spv::MemoryAccessMakePointerAvailableKHRMask | spv::MemoryAccessMakePointerVisibleKHRMask)) {
+ memoryAccessOperands.push_back(spv::IdImmediate(true,
+ builder.makeUintConstant(TranslateMemoryScope(coherentFlags))));
}
} else if (arg == 2) {
continue;
@@ -2819,13 +2977,48 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
}
#endif
+ // for l-values, pass the address, for r-values, pass the value
if (lvalue) {
- operands.push_back(builder.accessChainGetLValue());
+ if (invertedType == spv::NoType && !builder.isSpvLvalue()) {
+ // SPIR-V cannot represent an l-value containing a swizzle that doesn't
+ // reduce to a simple access chain. So, we need a temporary vector to
+ // receive the result, and must later swizzle that into the original
+ // l-value.
+ complexLvalues.push_back(builder.getAccessChain());
+ temporaryLvalues.push_back(builder.createVariable(
+ spv::NoPrecision, spv::StorageClassFunction,
+ builder.accessChainGetInferredType(), "swizzleTemp"));
+ operands.push_back(temporaryLvalues.back());
+ } else {
+ operands.push_back(builder.accessChainGetLValue());
+ }
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType());
} else {
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
- operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
+ glslang::TOperator glslangOp = node->getOp();
+ if (arg == 1 &&
+ (glslangOp == glslang::EOpRayQueryGetIntersectionType ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionT ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionInstanceCustomIndex ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionInstanceId ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionGeometryIndex ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionPrimitiveIndex ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionBarycentrics ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionFrontFace ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld ||
+ glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject
+ )) {
+ bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
+ operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
+ }
+ else {
+ operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
+ }
+
}
}
@@ -2861,7 +3054,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
#endif
if (atomic) {
// Handle all atomics
- result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
+ result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(),
+ lvalueCoherentFlags);
+ } else if (node->getOp() == glslang::EOpDebugPrintf) {
+ if (!nonSemanticDebugPrintf) {
+ nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf");
+ }
+ result = builder.createBuiltinCall(builder.makeVoidType(), nonSemanticDebugPrintf, spv::NonSemanticDebugPrintfDebugPrintf, operands);
+ builder.addExtension(spv::E_SPV_KHR_non_semantic_info);
} else {
// Pass through to generic operations.
switch (glslangOperands.size()) {
@@ -2883,8 +3083,14 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
result = createMiscOperation(node->getOp(), precision, resultType(), operands, node->getBasicType());
break;
}
- if (invertedType)
+
+ if (invertedType != spv::NoResult)
result = createInvertedSwizzle(precision, *glslangOperands[0]->getAsBinaryNode(), result);
+
+ for (unsigned int i = 0; i < temporaryLvalues.size(); ++i) {
+ builder.setAccessChain(complexLvalues[i]);
+ builder.accessChainStore(builder.createLoad(temporaryLvalues[i], spv::NoPrecision));
+ }
}
if (noReturnValue)
@@ -3000,7 +3206,8 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
} else {
// We need control flow to select the result.
// TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path.
- result = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType()));
+ result = builder.createVariable(TranslatePrecisionDecoration(node->getType()),
+ spv::StorageClassFunction, convertGlslangToSpvType(node->getType()));
// Selection control:
const spv::SelectionControlMask control = TranslateSelectionControl(*node);
@@ -3025,8 +3232,10 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
// Execute the one side needed, as per the condition
const auto executeOneSide = [&]() {
// Always emit control flow.
- if (node->getBasicType() != glslang::EbtVoid)
- result = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType()));
+ if (node->getBasicType() != glslang::EbtVoid) {
+ result = builder.createVariable(TranslatePrecisionDecoration(node->getType()), spv::StorageClassFunction,
+ convertGlslangToSpvType(node->getType()));
+ }
// Selection control:
const spv::SelectionControlMask control = TranslateSelectionControl(*node);
@@ -3091,7 +3300,8 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
defaultSegment = (int)codeSegments.size();
else if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpCase) {
valueIndexToSegment[caseValues.size()] = (int)codeSegments.size();
- caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion()->getConstArray()[0].getIConst());
+ caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion()
+ ->getConstArray()[0].getIConst());
} else
codeSegments.push_back(child);
}
@@ -3104,7 +3314,8 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
// make the switch statement
std::vector<spv::Block*> segmentBlocks; // returned, as the blocks allocated in the call
- builder.makeSwitch(selector, control, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
+ builder.makeSwitch(selector, control, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment,
+ segmentBlocks);
// emit all the code in the segments
breakForLoop.push(false);
@@ -3221,15 +3432,17 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
builder.createLoopContinue();
break;
case glslang::EOpReturn:
- if (node->getExpression()) {
+ if (node->getExpression() != nullptr) {
const glslang::TType& glslangReturnType = node->getExpression()->getType();
spv::Id returnId = accessChainLoad(glslangReturnType);
- if (builder.getTypeId(returnId) != currentFunction->getReturnType()) {
+ if (builder.getTypeId(returnId) != currentFunction->getReturnType() ||
+ TranslatePrecisionDecoration(glslangReturnType) != currentFunction->getReturnPrecision()) {
builder.clearAccessChain();
- spv::Id copyId = builder.createVariable(spv::StorageClassFunction, currentFunction->getReturnType());
+ spv::Id copyId = builder.createVariable(currentFunction->getReturnPrecision(),
+ spv::StorageClassFunction, currentFunction->getReturnType());
builder.setAccessChainLValue(copyId);
multiTypeStore(glslangReturnType, returnId);
- returnId = builder.createLoad(copyId);
+ returnId = builder.createLoad(copyId, currentFunction->getReturnPrecision());
}
builder.makeReturn(false, returnId);
} else
@@ -3325,7 +3538,18 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
if (glslang::IsAnonymous(name))
name = "";
- return builder.createVariable(storageClass, spvType, name);
+ spv::Id initializer = spv::NoResult;
+
+ if (node->getType().getQualifier().storage == glslang::EvqUniform &&
+ !node->getConstArray().empty()) {
+ int nextConst = 0;
+ initializer = createSpvConstantFromConstUnionArray(node->getType(),
+ node->getConstArray(),
+ nextConst,
+ false /* specConst */);
+ }
+
+ return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer);
}
// Return type Id of the sampled type.
@@ -3361,7 +3585,8 @@ spv::Id TGlslangToSpvTraverser::getInvertedSwizzleType(const glslang::TIntermTyp
// When inverting a swizzle with a parent op, this function
// will apply the swizzle operation to a completed parent operation.
-spv::Id TGlslangToSpvTraverser::createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped& node, spv::Id parentResult)
+spv::Id TGlslangToSpvTraverser::createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped& node,
+ spv::Id parentResult)
{
std::vector<unsigned> swizzle;
convertSwizzle(*node.getAsBinaryNode()->getRight()->getAsAggregate(), swizzle);
@@ -3444,8 +3669,11 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
builder.addCapability(spv::CapabilityAtomicStorage);
spvType = builder.makeUintType(32);
break;
- case glslang::EbtAccStructNV:
- spvType = builder.makeAccelerationStructureNVType();
+ case glslang::EbtAccStruct:
+ spvType = builder.makeAccelerationStructureType();
+ break;
+ case glslang::EbtRayQuery:
+ spvType = builder.makeRayQueryType();
break;
case glslang::EbtReference:
{
@@ -3501,6 +3729,9 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
spvType = convertGlslangStructToSpvType(type, glslangMembers, explicitLayout, qualifier);
}
break;
+ case glslang::EbtString:
+ // no type used for OpString
+ return 0;
default:
assert(0);
break;
@@ -3626,7 +3857,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
{
// Create a vector of struct types for SPIR-V to consume
std::vector<spv::Id> spvMembers;
- int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0, except sometimes for blocks
+ int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0,
+ // except sometimes for blocks
std::vector<std::pair<glslang::TType*, glslang::TQualifier> > deferredForwardPointers;
for (int i = 0; i < (int)glslangMembers->size(); i++) {
glslang::TType& glslangMember = *(*glslangMembers)[i].type;
@@ -3662,10 +3894,12 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
deferredForwardPointers.push_back(std::make_pair(&glslangMember, memberQualifier));
}
spvMembers.push_back(
- convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember, true));
+ convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember,
+ true));
} else {
spvMembers.push_back(
- convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember, false));
+ convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember,
+ false));
}
}
}
@@ -3853,11 +4087,11 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
alignment |= type.getBufferReferenceAlignment();
spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type),
- TranslateNonUniformDecoration(type.getQualifier()),
- nominalTypeId,
- spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask),
- TranslateMemoryScope(coherentFlags),
- alignment);
+ TranslateNonUniformDecoration(type.getQualifier()),
+ nominalTypeId,
+ spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask),
+ TranslateMemoryScope(coherentFlags),
+ alignment);
// Need to convert to abstract types when necessary
if (type.getBasicType() == glslang::EbtBool) {
@@ -3871,7 +4105,8 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
int vecSize = builder.getNumTypeComponents(nominalTypeId);
spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize);
if (nominalTypeId != bvecType)
- loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId, makeSmearedConstant(builder.makeUintConstant(0), vecSize));
+ loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId,
+ makeSmearedConstant(builder.makeUintConstant(0), vecSize));
}
}
@@ -3920,7 +4155,8 @@ void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::I
alignment |= type.getBufferReferenceAlignment();
builder.accessChainStore(rvalue,
- spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerVisibleKHRMask),
+ spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) &
+ ~spv::MemoryAccessMakePointerVisibleKHRMask),
TranslateMemoryScope(coherentFlags), alignment);
}
@@ -3981,7 +4217,8 @@ void TGlslangToSpvTraverser::multiTypeStore(const glslang::TType& type, spv::Id
// set up the target storage
builder.clearAccessChain();
builder.setAccessChainLValue(lValue);
- builder.accessChainPush(builder.makeIntConstant(index), TranslateCoherent(type), type.getBufferReferenceAlignment());
+ builder.accessChainPush(builder.makeIntConstant(index), TranslateCoherent(type),
+ type.getBufferReferenceAlignment());
// store the member
multiTypeStore(glslangElementType, elementRValue);
@@ -4001,7 +4238,8 @@ void TGlslangToSpvTraverser::multiTypeStore(const glslang::TType& type, spv::Id
// set up the target storage
builder.clearAccessChain();
builder.setAccessChainLValue(lValue);
- builder.accessChainPush(builder.makeIntConstant(m), TranslateCoherent(type), type.getBufferReferenceAlignment());
+ builder.accessChainPush(builder.makeIntConstant(m), TranslateCoherent(type),
+ type.getBufferReferenceAlignment());
// store the member
multiTypeStore(glslangMemberType, memberRValue);
@@ -4036,18 +4274,21 @@ glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang:
}
// Given an array type, returns the integer stride required for that array
-int TGlslangToSpvTraverser::getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+int TGlslangToSpvTraverser::getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking explicitLayout,
+ glslang::TLayoutMatrix matrixLayout)
{
int size;
int stride;
- glslangIntermediate->getMemberAlignment(arrayType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor);
+ glslangIntermediate->getMemberAlignment(arrayType, size, stride, explicitLayout,
+ matrixLayout == glslang::ElmRowMajor);
return stride;
}
// Given a matrix type, or array (of array) of matrixes type, returns the integer stride required for that matrix
// when used as a member of an interface block
-int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking explicitLayout,
+ glslang::TLayoutMatrix matrixLayout)
{
glslang::TType elementType;
elementType.shallowCopy(matrixType);
@@ -4055,7 +4296,8 @@ int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, gl
int size;
int stride;
- glslangIntermediate->getMemberAlignment(elementType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor);
+ glslangIntermediate->getMemberAlignment(elementType, size, stride, explicitLayout,
+ matrixLayout == glslang::ElmRowMajor);
return stride;
}
@@ -4066,8 +4308,8 @@ int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, gl
// 'currentOffset' should be passed in already initialized, ready to modify, and reflecting
// the migration of data from nextOffset -> currentOffset. It should be -1 on the first call.
// -1 means a non-forced member offset (no decoration needed).
-void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset,
- glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType,
+ int& currentOffset, int& nextOffset, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
{
// this will get a positive value when deemed necessary
nextOffset = -1;
@@ -4097,7 +4339,8 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType
int memberSize;
int dummyStride;
- int memberAlignment = glslangIntermediate->getMemberAlignment(memberType, memberSize, dummyStride, explicitLayout, matrixLayout == glslang::ElmRowMajor);
+ int memberAlignment = glslangIntermediate->getMemberAlignment(memberType, memberSize, dummyStride, explicitLayout,
+ matrixLayout == glslang::ElmRowMajor);
// Adjust alignment for HLSL rules
// TODO: make this consistent in early phases of code:
@@ -4116,7 +4359,8 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType
glslang::RoundToPow2(currentOffset, memberAlignment);
// Bump up to vec4 if there is a bad straddle
- if (explicitLayout != glslang::ElpScalar && glslangIntermediate->improperStraddle(memberType, memberSize, currentOffset))
+ if (explicitLayout != glslang::ElpScalar && glslangIntermediate->improperStraddle(memberType, memberSize,
+ currentOffset))
glslang::RoundToPow2(currentOffset, 16);
nextOffset = currentOffset + memberSize;
@@ -4169,8 +4413,10 @@ bool TGlslangToSpvTraverser::writableParam(glslang::TStorageQualifier qualifier)
assert(qualifier == glslang::EvqIn ||
qualifier == glslang::EvqOut ||
qualifier == glslang::EvqInOut ||
+ qualifier == glslang::EvqUniform ||
qualifier == glslang::EvqConstReadOnly);
- return qualifier != glslang::EvqConstReadOnly;
+ return qualifier != glslang::EvqConstReadOnly &&
+ qualifier != glslang::EvqUniform;
}
// Is parameter pass-by-original?
@@ -4188,7 +4434,8 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier,
// Make all the functions, skeletally, without actually visiting their bodies.
void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslFunctions)
{
- const auto getParamDecorations = [&](std::vector<spv::Decoration>& decorations, const glslang::TType& type, bool useVulkanMemoryModel) {
+ const auto getParamDecorations = [&](std::vector<spv::Decoration>& decorations, const glslang::TType& type,
+ bool useVulkanMemoryModel) {
spv::Decoration paramPrecision = TranslatePrecisionDecoration(type);
if (paramPrecision != spv::NoPrecision)
decorations.push_back(paramPrecision);
@@ -4286,7 +4533,8 @@ void TGlslangToSpvTraverser::makeGlobalInitializers(const glslang::TIntermSequen
builder.setBuildPoint(shaderEntry->getLastBlock());
for (int i = 0; i < (int)initializers.size(); ++i) {
glslang::TIntermAggregate* initializer = initializers[i]->getAsAggregate();
- if (initializer && initializer->getOp() != glslang::EOpFunction && initializer->getOp() != glslang::EOpLinkerObjects) {
+ if (initializer && initializer->getOp() != glslang::EOpFunction && initializer->getOp() !=
+ glslang::EOpLinkerObjects) {
// We're on a top-level node that's not a function. Treat as an initializer, whose
// code goes into the beginning of the entry point.
@@ -4314,7 +4562,8 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate
builder.setBuildPoint(functionBlock);
}
-void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
+void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
+ spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
const glslang::TIntermSequence& glslangArguments = node.getSequence();
@@ -4327,7 +4576,8 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
sampler = glslangArguments[0]->getAsTyped()->getType().getSampler();
cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
#ifndef GLSLANG_WEB
- f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16;
+ f16ShadowCompare = sampler.shadow &&
+ glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16;
#endif
}
@@ -4490,7 +4740,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
translateArguments(*node->getAsAggregate(), arguments, lvalueCoherentFlags);
else
translateArguments(*node->getAsUnaryNode(), arguments);
- spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
+ spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
spv::Builder::TextureParameters params = { };
params.sampler = arguments[0];
@@ -4703,7 +4953,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
operands.push_back(imageOperand);
}
if (mask & spv::ImageOperandsMakeTexelVisibleKHRMask) {
- spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) };
+ spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope(
+ TranslateCoherent(imageType))) };
operands.push_back(imageOperand);
}
@@ -4731,18 +4982,22 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// imageAtomicStore has a void return type so base the pointer type on
// the type of the value operand.
if (node->getOp() == glslang::EOpImageAtomicStore) {
- resultTypeId = builder.makePointer(spv::StorageClassImage, builder.getTypeId(operands[2].word));
+ resultTypeId = builder.makePointer(spv::StorageClassImage, builder.getTypeId(*opIt));
} else {
resultTypeId = builder.makePointer(spv::StorageClassImage, resultType());
}
spv::Id pointer = builder.createOp(spv::OpImageTexelPointer, resultTypeId, operands);
+ if (imageType.getQualifier().nonUniform) {
+ builder.addDecoration(pointer, spv::DecorationNonUniformEXT);
+ }
std::vector<spv::Id> operands;
operands.push_back(pointer);
for (; opIt != arguments.end(); ++opIt)
operands.push_back(*opIt);
- return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(), lvalueCoherentFlags);
+ return createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(),
+ lvalueCoherentFlags);
}
}
@@ -4767,7 +5022,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
std::vector<spv::Id> comps;
comps.push_back(zero);
comps.push_back(zero);
- operands.push_back(builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps));
+ operands.push_back(builder.makeCompositeConstant(
+ builder.makeVectorType(builder.makeIntType(32), 2), comps));
}
for (; opIt != arguments.end(); ++opIt)
@@ -4856,7 +5112,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
else
dRefComp = builder.getNumComponents(params.coords) - 1;
indexes.push_back(dRefComp);
- params.Dref = builder.createCompositeExtract(params.coords, builder.getScalarTypeId(builder.getTypeId(params.coords)), indexes);
+ params.Dref = builder.createCompositeExtract(params.coords,
+ builder.getScalarTypeId(builder.getTypeId(params.coords)), indexes);
}
// lod
@@ -4981,7 +5238,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
flags.clear();
builder.accessChainPush(builder.makeIntConstant(i), flags, 0);
- builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1), i+1));
+ builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1),
+ i+1));
}
return builder.createCompositeExtract(res, resultType(), 0);
}
@@ -5004,10 +5262,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// copy the projective coordinate if we have to
if (projTargetComp != projSourceComp) {
spv::Id projComp = builder.createCompositeExtract(params.coords,
- builder.getScalarTypeId(builder.getTypeId(params.coords)),
- projSourceComp);
+ builder.getScalarTypeId(builder.getTypeId(params.coords)), projSourceComp);
params.coords = builder.createCompositeInsert(projComp, params.coords,
- builder.getTypeId(params.coords), projTargetComp);
+ builder.getTypeId(params.coords), projTargetComp);
}
}
@@ -5087,7 +5344,8 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
++lValueCount;
} else if (writableParam(qualifiers[a])) {
// need space to hold the copy
- arg = builder.createVariable(spv::StorageClassFunction, builder.getContainedTypeId(function->getParamType(a)), "param");
+ arg = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction,
+ builder.getContainedTypeId(function->getParamType(a)), "param");
if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) {
// need to copy the input into output space
builder.setAccessChain(lValues[lValueCount]);
@@ -5099,12 +5357,14 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
++lValueCount;
} else {
// process r-value, which involves a copy for a type mismatch
- if (function->getParamType(a) != convertGlslangToSpvType(*argTypes[a])) {
- spv::Id argCopy = builder.createVariable(spv::StorageClassFunction, function->getParamType(a), "arg");
+ if (function->getParamType(a) != convertGlslangToSpvType(*argTypes[a]) ||
+ TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a))
+ {
+ spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction, function->getParamType(a), "arg");
builder.clearAccessChain();
builder.setAccessChainLValue(argCopy);
multiTypeStore(*argTypes[a], rValues[rValueCount]);
- arg = builder.createLoad(argCopy);
+ arg = builder.createLoad(argCopy, function->getParamPrecision(a));
} else
arg = rValues[rValueCount];
++rValueCount;
@@ -5123,7 +5383,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
++lValueCount;
else if (writableParam(qualifiers[a])) {
if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) {
- spv::Id copy = builder.createLoad(spvArgs[a]);
+ spv::Id copy = builder.createLoad(spvArgs[a], spv::NoPrecision);
builder.setAccessChain(lValues[lValueCount]);
multiTypeStore(*argTypes[a], copy);
}
@@ -5368,7 +5628,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
case glslang::EOpNotEqual:
case glslang::EOpVectorNotEqual:
if (isFloat)
- binOp = spv::OpFOrdNotEqual;
+ binOp = spv::OpFUnordNotEqual;
else if (isBool)
binOp = spv::OpLogicalNotEqual;
else
@@ -5502,7 +5762,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecora
}
spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId,
- spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
+ spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
spv::Op unaryOp = spv::OpNop;
int extBuiltins = -1;
@@ -5763,6 +6023,24 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpFwidthCoarse:
unaryOp = spv::OpFwidthCoarse;
break;
+ case glslang::EOpRayQueryProceed:
+ unaryOp = spv::OpRayQueryProceedKHR;
+ break;
+ case glslang::EOpRayQueryGetRayTMin:
+ unaryOp = spv::OpRayQueryGetRayTMinKHR;
+ break;
+ case glslang::EOpRayQueryGetRayFlags:
+ unaryOp = spv::OpRayQueryGetRayFlagsKHR;
+ break;
+ case glslang::EOpRayQueryGetWorldRayOrigin:
+ unaryOp = spv::OpRayQueryGetWorldRayOriginKHR;
+ break;
+ case glslang::EOpRayQueryGetWorldRayDirection:
+ unaryOp = spv::OpRayQueryGetWorldRayDirectionKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
+ unaryOp = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR;
+ break;
case glslang::EOpInterpolateAtCentroid:
if (typeProxy == glslang::EbtFloat16)
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
@@ -6048,7 +6326,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
case glslang::EOpConvFloatToBool:
zero = builder.makeFloatConstant(0.0F);
zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+ return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero);
case glslang::EOpConvBoolToFloat:
convOp = spv::OpSelect;
zero = builder.makeFloatConstant(0.0F);
@@ -6197,11 +6475,11 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
case glslang::EOpConvDoubleToBool:
zero = builder.makeDoubleConstant(0.0);
zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+ return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero);
case glslang::EOpConvFloat16ToBool:
zero = builder.makeFloat16Constant(0.0F);
zero = makeSmearedConstant(zero, vectorSize);
- return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+ return builder.createBinOp(spv::OpFUnordNotEqual, destType, operand, zero);
case glslang::EOpConvBoolToDouble:
convOp = spv::OpSelect;
zero = builder.makeDoubleConstant(0.0);
@@ -6395,7 +6673,9 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector
}
// For glslang ops that map to SPV atomic opCodes
-spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
+spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/,
+ spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
+ const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags)
{
spv::Op opCode = spv::OpNop;
@@ -6404,6 +6684,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
case glslang::EOpImageAtomicAdd:
case glslang::EOpAtomicCounterAdd:
opCode = spv::OpAtomicIAdd;
+ if (typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
+ opCode = spv::OpAtomicFAddEXT;
+ builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add);
+ if (typeProxy == glslang::EbtFloat)
+ builder.addCapability(spv::CapabilityAtomicFloat32AddEXT);
+ else
+ builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
+ }
break;
case glslang::EOpAtomicCounterSubtract:
opCode = spv::OpAtomicISub;
@@ -6411,12 +6699,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
case glslang::EOpAtomicMin:
case glslang::EOpImageAtomicMin:
case glslang::EOpAtomicCounterMin:
- opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMin : spv::OpAtomicSMin;
+ opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
+ spv::OpAtomicUMin : spv::OpAtomicSMin;
break;
case glslang::EOpAtomicMax:
case glslang::EOpImageAtomicMax:
case glslang::EOpAtomicCounterMax:
- opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMax : spv::OpAtomicSMax;
+ opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
+ spv::OpAtomicUMax : spv::OpAtomicSMax;
break;
case glslang::EOpAtomicAnd:
case glslang::EOpImageAtomicAnd:
@@ -6481,7 +6771,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
scopeId = builder.makeUintConstant(spv::ScopeDevice);
}
// semantics default to relaxed
- spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ?
+ spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() &&
+ glslangIntermediate->usingVulkanMemoryModel() ?
spv::MemorySemanticsVolatileMask :
spv::MemorySemanticsMaskNone);
spv::Id semanticsId2 = semanticsId;
@@ -6494,20 +6785,24 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
valueId = operands[2];
if (operands.size() > 3) {
scopeId = operands[3];
- semanticsId = builder.makeUintConstant(builder.getConstantScalar(operands[4]) | builder.getConstantScalar(operands[5]));
- semanticsId2 = builder.makeUintConstant(builder.getConstantScalar(operands[6]) | builder.getConstantScalar(operands[7]));
+ semanticsId = builder.makeUintConstant(
+ builder.getConstantScalar(operands[4]) | builder.getConstantScalar(operands[5]));
+ semanticsId2 = builder.makeUintConstant(
+ builder.getConstantScalar(operands[6]) | builder.getConstantScalar(operands[7]));
}
} else if (opCode == spv::OpAtomicLoad) {
if (operands.size() > 1) {
scopeId = operands[1];
- semanticsId = builder.makeUintConstant(builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]));
+ semanticsId = builder.makeUintConstant(
+ builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]));
}
} else {
// atomic store or RMW
valueId = operands[1];
if (operands.size() > 2) {
scopeId = operands[2];
- semanticsId = builder.makeUintConstant(builder.getConstantScalar(operands[3]) | builder.getConstantScalar(operands[4]));
+ semanticsId = builder.makeUintConstant
+ (builder.getConstantScalar(operands[3]) | builder.getConstantScalar(operands[4]));
}
}
@@ -6552,7 +6847,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
}
// Create group invocation operations.
-spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
+spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId,
+ std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
{
bool isUnsigned = isTypeUnsignedInt(typeProxy);
bool isFloat = isTypeFloat(typeProxy);
@@ -6766,8 +7062,10 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
op == spv::OpSubgroupReadInvocationKHR ||
- op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD || op == spv::OpGroupSMinNonUniformAMD ||
- op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD || op == spv::OpGroupSMaxNonUniformAMD ||
+ op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD ||
+ op == spv::OpGroupSMinNonUniformAMD ||
+ op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD ||
+ op == spv::OpGroupSMaxNonUniformAMD ||
op == spv::OpGroupFAddNonUniformAMD || op == spv::OpGroupIAddNonUniformAMD);
// Handle group invocation operations scalar by scalar.
@@ -7156,7 +7454,8 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
return builder.createOp(opCode, typeId, spvGroupOperands);
}
-spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
+spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision,
+ spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
{
bool isUnsigned = isTypeUnsignedInt(typeProxy);
bool isFloat = isTypeFloat(typeProxy);
@@ -7258,14 +7557,16 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
unsigned int executionScope = builder.getConstantScalar(operands[0]);
unsigned int memoryScope = builder.getConstantScalar(operands[1]);
unsigned int semantics = builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3]);
- builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope, (spv::MemorySemanticsMask)semantics);
+ builder.createControlBarrier((spv::Scope)executionScope, (spv::Scope)memoryScope,
+ (spv::MemorySemanticsMask)semantics);
if (semantics & (spv::MemorySemanticsMakeAvailableKHRMask |
spv::MemorySemanticsMakeVisibleKHRMask |
spv::MemorySemanticsOutputMemoryKHRMask |
spv::MemorySemanticsVolatileMask)) {
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
}
- if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice || memoryScope == spv::ScopeDevice)) {
+ if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::ScopeDevice ||
+ memoryScope == spv::ScopeDevice)) {
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
}
return 0;
@@ -7348,7 +7649,8 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
if (builder.getNumComponents(operands[0]) == 1)
frexpIntType = builder.makeIntegerType(width, true);
else
- frexpIntType = builder.makeVectorType(builder.makeIntegerType(width, true), builder.getNumComponents(operands[0]));
+ frexpIntType = builder.makeVectorType(builder.makeIntegerType(width, true),
+ builder.getNumComponents(operands[0]));
typeId = builder.makeStructResultType(typeId0, frexpIntType);
consumedOperands = 1;
}
@@ -7451,24 +7753,105 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall = spv::InterpolateAtVertexAMD;
break;
- case glslang::EOpReportIntersectionNV:
- {
+ case glslang::EOpReportIntersection:
typeId = builder.makeBoolType();
- opCode = spv::OpReportIntersectionNV;
- }
- break;
- case glslang::EOpTraceNV:
- {
- builder.createNoResultOp(spv::OpTraceNV, operands);
+ opCode = spv::OpReportIntersectionKHR;
+ break;
+ case glslang::EOpTrace:
+ builder.createNoResultOp(spv::OpTraceRayKHR, operands);
return 0;
- }
- break;
- case glslang::EOpExecuteCallableNV:
- {
- builder.createNoResultOp(spv::OpExecuteCallableNV, operands);
+ case glslang::EOpExecuteCallable:
+ builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
return 0;
- }
- break;
+
+ case glslang::EOpRayQueryInitialize:
+ builder.createNoResultOp(spv::OpRayQueryInitializeKHR, operands);
+ return 0;
+ case glslang::EOpRayQueryTerminate:
+ builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operands);
+ return 0;
+ case glslang::EOpRayQueryGenerateIntersection:
+ builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR, operands);
+ return 0;
+ case glslang::EOpRayQueryConfirmIntersection:
+ builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operands);
+ return 0;
+ case glslang::EOpRayQueryProceed:
+ typeId = builder.makeBoolType();
+ opCode = spv::OpRayQueryProceedKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionType:
+ typeId = builder.makeUintType(32);
+ opCode = spv::OpRayQueryGetIntersectionTypeKHR;
+ break;
+ case glslang::EOpRayQueryGetRayTMin:
+ typeId = builder.makeFloatType(32);
+ opCode = spv::OpRayQueryGetRayTMinKHR;
+ break;
+ case glslang::EOpRayQueryGetRayFlags:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetRayFlagsKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionT:
+ typeId = builder.makeFloatType(32);
+ opCode = spv::OpRayQueryGetIntersectionTKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetIntersectionInstanceCustomIndexKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionInstanceId:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionGeometryIndex:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetIntersectionGeometryIndexKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
+ typeId = builder.makeIntType(32);
+ opCode = spv::OpRayQueryGetIntersectionPrimitiveIndexKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionBarycentrics:
+ typeId = builder.makeVectorType(builder.makeFloatType(32), 2);
+ opCode = spv::OpRayQueryGetIntersectionBarycentricsKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionFrontFace:
+ typeId = builder.makeBoolType();
+ opCode = spv::OpRayQueryGetIntersectionFrontFaceKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
+ typeId = builder.makeBoolType();
+ opCode = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
+ typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
+ opCode = spv::OpRayQueryGetIntersectionObjectRayDirectionKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
+ typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
+ opCode = spv::OpRayQueryGetIntersectionObjectRayOriginKHR;
+ break;
+ case glslang::EOpRayQueryGetWorldRayDirection:
+ typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
+ opCode = spv::OpRayQueryGetWorldRayDirectionKHR;
+ break;
+ case glslang::EOpRayQueryGetWorldRayOrigin:
+ typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
+ opCode = spv::OpRayQueryGetWorldRayOriginKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionObjectToWorld:
+ typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
+ opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR;
+ break;
+ case glslang::EOpRayQueryGetIntersectionWorldToObject:
+ typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
+ opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR;
+ break;
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
return 0;
@@ -7558,7 +7941,8 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId)
{
// GLSL memory barriers use queuefamily scope in new model, device scope in old model
- spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
+ spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ?
+ spv::ScopeQueueFamilyKHR : spv::ScopeDevice;
switch (op) {
case glslang::EOpBarrier:
@@ -7664,13 +8048,24 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
return builder.setPrecision(id, precision);
}
- case glslang::EOpIgnoreIntersectionNV:
- builder.createNoResultOp(spv::OpIgnoreIntersectionNV);
+ case glslang::EOpIgnoreIntersection:
+ builder.createNoResultOp(spv::OpIgnoreIntersectionKHR);
return 0;
- case glslang::EOpTerminateRayNV:
- builder.createNoResultOp(spv::OpTerminateRayNV);
+ case glslang::EOpTerminateRay:
+ builder.createNoResultOp(spv::OpTerminateRayKHR);
+ return 0;
+ case glslang::EOpRayQueryInitialize:
+ builder.createNoResultOp(spv::OpRayQueryInitializeKHR);
+ return 0;
+ case glslang::EOpRayQueryTerminate:
+ builder.createNoResultOp(spv::OpRayQueryTerminateKHR);
+ return 0;
+ case glslang::EOpRayQueryGenerateIntersection:
+ builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR);
+ return 0;
+ case glslang::EOpRayQueryConfirmIntersection:
+ builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR);
return 0;
-
case glslang::EOpBeginInvocationInterlock:
builder.createNoResultOp(spv::OpBeginInvocationInterlockEXT);
return 0;
@@ -7722,7 +8117,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
// it was not found, create it
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
- auto forcedType = getForcedType(builtIn, symbol->getType());
+ auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType());
id = createSpvVariable(symbol, forcedType.first);
symbolValues[symbol->getId()] = id;
if (forcedType.second != spv::NoType)
@@ -7787,7 +8182,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
#ifndef GLSLANG_WEB
if (symbol->getType().isImage()) {
std::vector<spv::Decoration> memory;
- TranslateMemoryDecoration(symbol->getType().getQualifier(), memory, glslangIntermediate->usingVulkanMemoryModel());
+ TranslateMemoryDecoration(symbol->getType().getQualifier(), memory,
+ glslangIntermediate->usingVulkanMemoryModel());
for (unsigned int i = 0; i < memory.size(); ++i)
builder.addDecoration(id, memory[i]);
}
@@ -7841,7 +8237,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
}
if (symbol->isReference()) {
- builder.addDecoration(id, symbol->getType().getQualifier().restrict ? spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
+ builder.addDecoration(id, symbol->getType().getQualifier().restrict ?
+ spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
}
#endif
@@ -7903,12 +8300,25 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
// hand off to the non-spec-constant path
assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr);
int nextConst = 0;
- return createSpvConstantFromConstUnionArray(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(),
- nextConst, false);
+ return createSpvConstantFromConstUnionArray(node.getType(), node.getAsConstantUnion() ?
+ node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(),
+ nextConst, false);
}
// We now know we have a specialization constant to build
+ // Extra capabilities may be needed.
+ if (node.getType().contains8BitInt())
+ builder.addCapability(spv::CapabilityInt8);
+ if (node.getType().contains16BitFloat())
+ builder.addCapability(spv::CapabilityFloat16);
+ if (node.getType().contains16BitInt())
+ builder.addCapability(spv::CapabilityInt16);
+ if (node.getType().contains64BitInt())
+ builder.addCapability(spv::CapabilityInt64);
+ if (node.getType().containsDouble())
+ builder.addCapability(spv::CapabilityFloat64);
+
// gl_WorkGroupSize is a special case until the front-end handles hierarchical specialization constants,
// even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ...
if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) {
@@ -7957,7 +8367,8 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
// If there are not enough elements present in 'consts', 0 will be substituted;
// an empty 'consts' can be used to create a fully zeroed SPIR-V constant.
//
-spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glslang::TType& glslangType, const glslang::TConstUnionArray& consts, int& nextConst, bool specConstant)
+spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glslang::TType& glslangType,
+ const glslang::TConstUnionArray& consts, int& nextConst, bool specConstant)
{
// vector of constants for SPIR-V
std::vector<spv::Id> spvConsts;
@@ -8075,6 +8486,9 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla
scalar = builder.createUnaryOp(spv::OpBitcast, typeId, scalar);
break;
#endif
+ case glslang::EbtString:
+ scalar = builder.getStringId(consts[nextConst].getSConst()->c_str());
+ break;
default:
assert(0);
break;
@@ -8175,7 +8589,8 @@ bool TGlslangToSpvTraverser::isTrivial(const glslang::TIntermTyped* node)
// Emit short-circuiting code, where 'right' is never evaluated unless
// the left side is true (for &&) or false (for ||).
-spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslang::TIntermTyped& left, glslang::TIntermTyped& right)
+spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslang::TIntermTyped& left,
+ glslang::TIntermTyped& right)
{
spv::Id boolTypeId = builder.makeBoolType();
@@ -8259,7 +8674,9 @@ int GetSpirvGeneratorVersion()
// return 6; // revert version 5 change, which makes a different (new) kind of incorrect code,
// versions 4 and 6 each generate OpArrayLength as it has long been done
// return 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent
- return 8; // switch to new dead block eliminator; use OpUnreachable
+ // return 8; // switch to new dead block eliminator; use OpUnreachable
+ // return 9; // don't include opaque function parameters in OpEntryPoint global's operand list
+ return 10; // Generate OpFUnordNotEqual for != comparisons
}
// Write SPIR-V out to a binary file
@@ -8279,14 +8696,15 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
// Write SPIR-V out to a text file with 32-bit hexadecimal words
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
{
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
std::ofstream out;
out.open(baseName, std::ios::binary | std::ios::out);
if (out.fail())
printf("ERROR: Failed to open file: %s\n", baseName);
- out << "\t// " <<
- GetSpirvGeneratorVersion() << "." << GLSLANG_MINOR_VERSION << "." << GLSLANG_PATCH_LEVEL <<
- std::endl;
+ out << "\t// " <<
+ GetSpirvGeneratorVersion() <<
+ GLSLANG_VERSION_MAJOR << "." << GLSLANG_VERSION_MINOR << "." << GLSLANG_VERSION_PATCH <<
+ GLSLANG_VERSION_FLAVOR << std::endl;
if (varName != nullptr) {
out << "\t #pragma once" << std::endl;
out << "const uint32_t " << varName << "[] = {" << std::endl;
@@ -8305,6 +8723,7 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
}
if (varName != nullptr) {
out << "};";
+ out << std::endl;
}
out.close();
#endif
@@ -8342,10 +8761,14 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>&
// If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan
// eg. forward and remove memory writes of opaque types.
bool prelegalization = intermediate.getSource() == EShSourceHlsl;
- if ((intermediate.getSource() == EShSourceHlsl || options->optimizeSize) && !options->disableOptimizer) {
- SpirvToolsLegalize(intermediate, spirv, logger, options);
+ if ((prelegalization || options->optimizeSize) && !options->disableOptimizer) {
+ SpirvToolsTransform(intermediate, spirv, logger, options);
prelegalization = false;
}
+ else if (options->stripDebugInfo) {
+ // Strip debug info even if optimization is disabled.
+ SpirvToolsStripDebugInfo(intermediate, spirv, logger);
+ }
if (options->validate)
SpirvToolsValidate(intermediate, spirv, logger, prelegalization);
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.h b/thirdparty/glslang/SPIRV/GlslangToSpv.h
index 3907be43b7..3907be43b7 100755..100644
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.h
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.h
diff --git a/thirdparty/glslang/SPIRV/Logger.cpp b/thirdparty/glslang/SPIRV/Logger.cpp
index 7ea0c6342b..cdc8469c44 100644
--- a/thirdparty/glslang/SPIRV/Logger.cpp
+++ b/thirdparty/glslang/SPIRV/Logger.cpp
@@ -69,4 +69,4 @@ std::string SpvBuildLogger::getAllMessages() const {
} // end spv namespace
-#endif \ No newline at end of file
+#endif
diff --git a/thirdparty/glslang/SPIRV/NonSemanticDebugPrintf.h b/thirdparty/glslang/SPIRV/NonSemanticDebugPrintf.h
new file mode 100644
index 0000000000..83796d75e5
--- /dev/null
+++ b/thirdparty/glslang/SPIRV/NonSemanticDebugPrintf.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE 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
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
+#define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ NonSemanticDebugPrintfRevision = 1,
+ NonSemanticDebugPrintfRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum NonSemanticDebugPrintfInstructions {
+ NonSemanticDebugPrintfDebugPrintf = 1,
+ NonSemanticDebugPrintfInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
diff --git a/thirdparty/glslang/SPIRV/SPVRemapper.cpp b/thirdparty/glslang/SPIRV/SPVRemapper.cpp
index fd0bb8950c..1adc6a3042 100644
--- a/thirdparty/glslang/SPIRV/SPVRemapper.cpp
+++ b/thirdparty/glslang/SPIRV/SPVRemapper.cpp
@@ -625,6 +625,9 @@ namespace spv {
break;
}
+ case spv::OperandVariableLiteralStrings:
+ return nextInst;
+
// Execution mode might have extra literal operands. Skip them.
case spv::OperandExecutionMode:
return nextInst;
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.cpp b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
index bd208952e0..9680331469 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.cpp
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
@@ -1,6 +1,7 @@
//
// Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2015-2018 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -496,7 +497,8 @@ Id Builder::makeFunctionType(Id returnType, const std::vector<Id>& paramTypes)
return type->getResultId();
}
-Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format)
+Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled,
+ ImageFormat format)
{
assert(sampled == 1 || sampled == 2);
@@ -601,16 +603,31 @@ Id Builder::makeSampledImageType(Id imageType)
}
#ifndef GLSLANG_WEB
-Id Builder::makeAccelerationStructureNVType()
+Id Builder::makeAccelerationStructureType()
{
Instruction *type;
- if (groupedTypes[OpTypeAccelerationStructureNV].size() == 0) {
- type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureNV);
- groupedTypes[OpTypeAccelerationStructureNV].push_back(type);
+ if (groupedTypes[OpTypeAccelerationStructureKHR].size() == 0) {
+ type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureKHR);
+ groupedTypes[OpTypeAccelerationStructureKHR].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
} else {
- type = groupedTypes[OpTypeAccelerationStructureNV].back();
+ type = groupedTypes[OpTypeAccelerationStructureKHR].back();
+ }
+
+ return type->getResultId();
+}
+
+Id Builder::makeRayQueryType()
+{
+ Instruction *type;
+ if (groupedTypes[OpTypeRayQueryProvisionalKHR].size() == 0) {
+ type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryProvisionalKHR);
+ groupedTypes[OpTypeRayQueryProvisionalKHR].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+ } else {
+ type = groupedTypes[OpTypeRayQueryProvisionalKHR].back();
}
return type->getResultId();
@@ -1166,6 +1183,28 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val
executionModes.push_back(std::unique_ptr<Instruction>(instr));
}
+void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector<unsigned>& literals)
+{
+ Instruction* instr = new Instruction(OpExecutionMode);
+ instr->addIdOperand(entryPoint->getId());
+ instr->addImmediateOperand(mode);
+ for (auto literal : literals)
+ instr->addImmediateOperand(literal);
+
+ executionModes.push_back(std::unique_ptr<Instruction>(instr));
+}
+
+void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector<Id>& operandIds)
+{
+ Instruction* instr = new Instruction(OpExecutionModeId);
+ instr->addIdOperand(entryPoint->getId());
+ instr->addImmediateOperand(mode);
+ for (auto operandId : operandIds)
+ instr->addIdOperand(operandId);
+
+ executionModes.push_back(std::unique_ptr<Instruction>(instr));
+}
+
void Builder::addName(Id id, const char* string)
{
Instruction* name = new Instruction(OpName);
@@ -1204,7 +1243,7 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s)
if (decoration == spv::DecorationMax)
return;
- Instruction* dec = new Instruction(OpDecorateStringGOOGLE);
+ Instruction* dec = new Instruction(OpDecorateString);
dec->addIdOperand(id);
dec->addImmediateOperand(decoration);
dec->addStringOperand(s);
@@ -1212,6 +1251,34 @@ void Builder::addDecoration(Id id, Decoration decoration, const char* s)
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
+void Builder::addDecoration(Id id, Decoration decoration, const std::vector<unsigned>& literals)
+{
+ if (decoration == spv::DecorationMax)
+ return;
+
+ Instruction* dec = new Instruction(OpDecorate);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(decoration);
+ for (auto literal : literals)
+ dec->addImmediateOperand(literal);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
+void Builder::addDecoration(Id id, Decoration decoration, const std::vector<const char*>& strings)
+{
+ if (decoration == spv::DecorationMax)
+ return;
+
+ Instruction* dec = new Instruction(OpDecorateString);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(decoration);
+ for (auto string : strings)
+ dec->addStringOperand(string);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
{
if (decoration == spv::DecorationMax)
@@ -1225,6 +1292,21 @@ void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration)
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
+void Builder::addDecorationId(Id id, Decoration decoration, const std::vector<Id>& operandIds)
+{
+ if(decoration == spv::DecorationMax)
+ return;
+
+ Instruction* dec = new Instruction(OpDecorateId);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(decoration);
+
+ for (auto operandId : operandIds)
+ dec->addIdOperand(operandId);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
{
if (decoration == spv::DecorationMax)
@@ -1254,6 +1336,36 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat
decorations.push_back(std::unique_ptr<Instruction>(dec));
}
+void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<unsigned>& literals)
+{
+ if (decoration == spv::DecorationMax)
+ return;
+
+ Instruction* dec = new Instruction(OpMemberDecorate);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(member);
+ dec->addImmediateOperand(decoration);
+ for (auto literal : literals)
+ dec->addImmediateOperand(literal);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
+void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector<const char*>& strings)
+{
+ if (decoration == spv::DecorationMax)
+ return;
+
+ Instruction* dec = new Instruction(OpMemberDecorateString);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(member);
+ dec->addImmediateOperand(decoration);
+ for (auto string : strings)
+ dec->addStringOperand(string);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
// Comments in header
Function* Builder::makeEntryPoint(const char* entryPoint)
{
@@ -1270,7 +1382,8 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
// Comments in header
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name,
- const std::vector<Id>& paramTypes, const std::vector<std::vector<Decoration>>& decorations, Block **entry)
+ const std::vector<Id>& paramTypes,
+ const std::vector<std::vector<Decoration>>& decorations, Block **entry)
{
// Make the function and initial instructions in it
Id typeId = makeFunctionType(returnType, paramTypes);
@@ -1279,9 +1392,12 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const
// Set up the precisions
setPrecision(function->getId(), precision);
+ function->setReturnPrecision(precision);
for (unsigned p = 0; p < (unsigned)decorations.size(); ++p) {
- for (int d = 0; d < (int)decorations[p].size(); ++d)
+ for (int d = 0; d < (int)decorations[p].size(); ++d) {
addDecoration(firstParamId + p, decorations[p][d]);
+ function->addParamPrecision(p, decorations[p][d]);
+ }
}
// CFG
@@ -1338,7 +1454,7 @@ void Builder::makeDiscard()
}
// Comments in header
-Id Builder::createVariable(StorageClass storageClass, Id type, const char* name, Id initializer)
+Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name, Id initializer)
{
Id pointerType = makePointer(storageClass, type);
Instruction* inst = new Instruction(getUniqueId(), pointerType, OpVariable);
@@ -1360,6 +1476,7 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name,
if (name)
addName(inst->getResultId(), name);
+ setPrecision(inst->getResultId(), precision);
return inst->getResultId();
}
@@ -1373,7 +1490,8 @@ Id Builder::createUndefined(Id type)
}
// av/vis/nonprivate are unnecessary and illegal for some storage classes.
-spv::MemoryAccessMask Builder::sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc) const
+spv::MemoryAccessMask Builder::sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc)
+ const
{
switch (sc) {
case spv::StorageClassUniform:
@@ -1392,7 +1510,8 @@ spv::MemoryAccessMask Builder::sanitizeMemoryAccessForStorageClass(spv::MemoryAc
}
// Comments in header
-void Builder::createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
+void Builder::createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope scope,
+ unsigned int alignment)
{
Instruction* store = new Instruction(OpStore);
store->addIdOperand(lValue);
@@ -1414,7 +1533,8 @@ void Builder::createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAcce
}
// Comments in header
-Id Builder::createLoad(Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
+Id Builder::createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMask memoryAccess,
+ spv::Scope scope, unsigned int alignment)
{
Instruction* load = new Instruction(getUniqueId(), getDerefTypeId(lValue), OpLoad);
load->addIdOperand(lValue);
@@ -1432,6 +1552,7 @@ Id Builder::createLoad(Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope
}
buildPoint->addInstruction(std::unique_ptr<Instruction>(load));
+ setPrecision(load->getResultId(), precision);
return load->getResultId();
}
@@ -1495,7 +1616,8 @@ Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index)
// Generate code for spec constants if in spec constant operation
// generation mode.
if (generatingOpCodeForSpecConst) {
- return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite), std::vector<Id>(1, index));
+ return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite),
+ std::vector<Id>(1, index));
}
Instruction* extract = new Instruction(getUniqueId(), typeId, OpCompositeExtract);
extract->addIdOperand(composite);
@@ -1697,7 +1819,8 @@ Id Builder::createOp(Op opCode, Id typeId, const std::vector<IdImmediate>& opera
return op->getResultId();
}
-Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector<Id>& operands, const std::vector<unsigned>& literals)
+Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector<Id>& operands,
+ const std::vector<unsigned>& literals)
{
Instruction* op = new Instruction(getUniqueId(), typeId, OpSpecConstantOp);
op->addImmediateOperand((unsigned) opCode);
@@ -2144,7 +2267,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
Op op;
switch (getMostBasicTypeClass(valueType)) {
case OpTypeFloat:
- op = equal ? OpFOrdEqual : OpFOrdNotEqual;
+ op = equal ? OpFOrdEqual : OpFUnordNotEqual;
break;
case OpTypeInt:
default:
@@ -2187,7 +2310,8 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
if (constituent == 0)
resultId = subResultId;
else
- resultId = setPrecision(createBinOp(equal ? OpLogicalAnd : OpLogicalOr, boolType, resultId, subResultId), precision);
+ resultId = setPrecision(createBinOp(equal ? OpLogicalAnd : OpLogicalOr, boolType, resultId, subResultId),
+ precision);
}
return resultId;
@@ -2196,7 +2320,8 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
// OpCompositeConstruct
Id Builder::createCompositeConstruct(Id typeId, const std::vector<Id>& constituents)
{
- assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 && getNumTypeConstituents(typeId) == (int)constituents.size()));
+ assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 &&
+ getNumTypeConstituents(typeId) == (int)constituents.size()));
if (generatingOpCodeForSpecConst) {
// Sometime, even in spec-constant-op mode, the constant composite to be
@@ -2609,7 +2734,8 @@ void Builder::clearAccessChain()
}
// Comments in header
-void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment)
+void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType,
+ AccessChain::CoherentFlags coherentFlags, unsigned int alignment)
{
accessChain.coherentFlags |= coherentFlags;
accessChain.alignment |= alignment;
@@ -2649,7 +2775,7 @@ void Builder::accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess, sp
// If swizzle still exists, it is out-of-order or not full, we must load the target vector,
// extract and insert elements to perform writeMask and/or swizzle.
if (accessChain.swizzle.size() > 0) {
- Id tempBaseId = createLoad(base);
+ Id tempBaseId = createLoad(base, spv::NoPrecision);
source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle);
}
@@ -2663,7 +2789,8 @@ void Builder::accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess, sp
}
// Comments in header
-Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resultType, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
+Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resultType,
+ spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment)
{
Id id;
@@ -2687,17 +2814,19 @@ Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resu
if (constant) {
id = createCompositeExtract(accessChain.base, swizzleBase, indexes);
+ setPrecision(id, precision);
} else {
Id lValue = NoResult;
- if (spvVersion >= Spv_1_4) {
+ if (spvVersion >= Spv_1_4 && isValidInitializer(accessChain.base)) {
// make a new function variable for this r-value, using an initializer,
// and mark it as NonWritable so that downstream it can be detected as a lookup
// table
- lValue = createVariable(StorageClassFunction, getTypeId(accessChain.base), "indexable",
- accessChain.base);
+ lValue = createVariable(NoPrecision, StorageClassFunction, getTypeId(accessChain.base),
+ "indexable", accessChain.base);
addDecoration(lValue, DecorationNonWritable);
} else {
- lValue = createVariable(StorageClassFunction, getTypeId(accessChain.base), "indexable");
+ lValue = createVariable(NoPrecision, StorageClassFunction, getTypeId(accessChain.base),
+ "indexable");
// store into it
createStore(accessChain.base, lValue);
}
@@ -2706,9 +2835,8 @@ Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resu
accessChain.isRValue = false;
// load through the access chain
- id = createLoad(collapseAccessChain());
+ id = createLoad(collapseAccessChain(), precision);
}
- setPrecision(id, precision);
} else
id = accessChain.base; // no precision, it was set when this was defined
} else {
@@ -2721,8 +2849,13 @@ Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resu
}
// load through the access chain
- id = createLoad(collapseAccessChain(), memoryAccess, scope, alignment);
- setPrecision(id, precision);
+ id = collapseAccessChain();
+ // Apply nonuniform both to the access chain and the loaded value.
+ // Buffer accesses need the access chain decorated, and this is where
+ // loaded image types get decorated. TODO: This should maybe move to
+ // createImageTextureFunctionCall.
+ addDecoration(id, nonUniform);
+ id = createLoad(id, precision, memoryAccess, scope, alignment);
addDecoration(id, nonUniform);
}
@@ -3075,7 +3208,8 @@ void Builder::dumpSourceInstructions(std::vector<unsigned int>& out) const
dumpSourceInstructions(iItr->first, *iItr->second, out);
}
-void Builder::dumpInstructions(std::vector<unsigned int>& out, const std::vector<std::unique_ptr<Instruction> >& instructions) const
+void Builder::dumpInstructions(std::vector<unsigned int>& out,
+ const std::vector<std::unique_ptr<Instruction> >& instructions) const
{
for (int i = 0; i < (int)instructions.size(); ++i) {
instructions[i]->dump(out);
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.h b/thirdparty/glslang/SPIRV/SpvBuilder.h
index 31fee975fc..077945e77b 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.h
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.h
@@ -1,7 +1,8 @@
//
// Copyright (C) 2014-2015 LunarG, Inc.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -94,6 +95,7 @@ public:
const char* file_c_str = str.c_str();
fileString->addStringOperand(file_c_str);
strings.push_back(std::unique_ptr<Instruction>(fileString));
+ module.mapInstruction(fileString);
stringIds[file_c_str] = strId;
return strId;
}
@@ -181,7 +183,9 @@ public:
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
// accelerationStructureNV type
- Id makeAccelerationStructureNVType();
+ Id makeAccelerationStructureType();
+ // rayQueryEXT type
+ Id makeRayQueryType();
// For querying about types.
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
@@ -196,7 +200,8 @@ public:
Id getContainedTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId, int) const;
StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); }
- ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
+ ImageFormat getImageTypeFormat(Id typeId) const
+ { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
@@ -206,12 +211,17 @@ public:
bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); }
bool isSampledImage(Id resultId) const { return isSampledImageType(getTypeId(resultId)); }
- bool isBoolType(Id typeId) { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); }
- bool isIntType(Id typeId) const { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) != 0; }
- bool isUintType(Id typeId) const { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) == 0; }
+ bool isBoolType(Id typeId)
+ { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); }
+ bool isIntType(Id typeId) const
+ { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) != 0; }
+ bool isUintType(Id typeId) const
+ { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) == 0; }
bool isFloatType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat; }
bool isPointerType(Id typeId) const { return getTypeClass(typeId) == OpTypePointer; }
- bool isScalarType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat || getTypeClass(typeId) == OpTypeInt || getTypeClass(typeId) == OpTypeBool; }
+ bool isScalarType(Id typeId) const
+ { return getTypeClass(typeId) == OpTypeFloat || getTypeClass(typeId) == OpTypeInt ||
+ getTypeClass(typeId) == OpTypeBool; }
bool isVectorType(Id typeId) const { return getTypeClass(typeId) == OpTypeVector; }
bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; }
bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
@@ -221,7 +231,8 @@ public:
#else
bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
#endif
- bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
+ bool isAggregateType(Id typeId) const
+ { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampler; }
bool isSampledImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampledImage; }
@@ -233,9 +244,17 @@ public:
bool isConstant(Id resultId) const { return isConstantOpCode(getOpCode(resultId)); }
bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
bool isSpecConstant(Id resultId) const { return isSpecConstantOpCode(getOpCode(resultId)); }
- unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); }
+ unsigned int getConstantScalar(Id resultId) const
+ { return module.getInstruction(resultId)->getImmediateOperand(0); }
StorageClass getStorageClass(Id resultId) const { return getTypeStorageClass(getTypeId(resultId)); }
+ bool isVariableOpCode(Op opcode) const { return opcode == OpVariable; }
+ bool isVariable(Id resultId) const { return isVariableOpCode(getOpCode(resultId)); }
+ bool isGlobalStorage(Id resultId) const { return getStorageClass(resultId) != StorageClassFunction; }
+ bool isGlobalVariable(Id resultId) const { return isVariable(resultId) && isGlobalStorage(resultId); }
+ // See if a resultId is valid for use as an initializer.
+ bool isValidInitializer(Id resultId) const { return isConstant(resultId) || isGlobalVariable(resultId); }
+
int getScalarTypeWidth(Id typeId) const
{
Id scalarTypeId = getScalarTypeId(typeId);
@@ -275,14 +294,22 @@ public:
// For making new constants (will return old constant if the requested one was already made).
Id makeBoolConstant(bool b, bool specConstant = false);
- Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); }
- Id makeUint8Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(8), u, specConstant); }
- Id makeInt16Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)i, specConstant); }
- Id makeUint16Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(16), u, specConstant); }
- Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
- Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); }
- Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); }
- Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); }
+ Id makeInt8Constant(int i, bool specConstant = false)
+ { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); }
+ Id makeUint8Constant(unsigned u, bool specConstant = false)
+ { return makeIntConstant(makeUintType(8), u, specConstant); }
+ Id makeInt16Constant(int i, bool specConstant = false)
+ { return makeIntConstant(makeIntType(16), (unsigned)i, specConstant); }
+ Id makeUint16Constant(unsigned u, bool specConstant = false)
+ { return makeIntConstant(makeUintType(16), u, specConstant); }
+ Id makeIntConstant(int i, bool specConstant = false)
+ { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
+ Id makeUintConstant(unsigned u, bool specConstant = false)
+ { return makeIntConstant(makeUintType(32), u, specConstant); }
+ Id makeInt64Constant(long long i, bool specConstant = false)
+ { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); }
+ Id makeUint64Constant(unsigned long long u, bool specConstant = false)
+ { return makeInt64Constant(makeUintType(64), u, specConstant); }
Id makeFloatConstant(float f, bool specConstant = false);
Id makeDoubleConstant(double d, bool specConstant = false);
Id makeFloat16Constant(float f16, bool specConstant = false);
@@ -294,13 +321,20 @@ public:
// Methods for adding information outside the CFG.
Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1);
+ void addExecutionMode(Function*, ExecutionMode mode, const std::vector<unsigned>& literals);
+ void addExecutionModeId(Function*, ExecutionMode mode, const std::vector<Id>& operandIds);
void addName(Id, const char* name);
void addMemberName(Id, int member, const char* name);
void addDecoration(Id, Decoration, int num = -1);
void addDecoration(Id, Decoration, const char*);
+ void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
+ void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
void addDecorationId(Id id, Decoration, Id idDecoration);
+ void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
void addMemberDecoration(Id, unsigned int member, Decoration, const char*);
+ void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<unsigned>& literals);
+ void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<const char*>& strings);
// At the end of what block do the next create*() instructions go?
void setBuildPoint(Block* bp) { buildPoint = bp; }
@@ -313,8 +347,8 @@ public:
// Make a shader-style function, and create its entry block if entry is non-zero.
// Return the function, pass back the entry.
// The returned pointer is only valid for the lifetime of this builder.
- Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, const std::vector<Id>& paramTypes,
- const std::vector<std::vector<Decoration>>& precisions, Block **entry = 0);
+ Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name,
+ const std::vector<Id>& paramTypes, const std::vector<std::vector<Decoration>>& precisions, Block **entry = 0);
// Create a return. An 'implicit' return is one not appearing in the source
// code. In the case of an implicit return, no post-return block is inserted.
@@ -327,16 +361,20 @@ public:
void makeDiscard();
// Create a global or function local or IO variable.
- Id createVariable(StorageClass, Id type, const char* name = 0, Id initializer = NoResult);
+ Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,
+ Id initializer = NoResult);
// Create an intermediate with an undefined value.
Id createUndefined(Id type);
// Store into an Id and return the l-value
- void createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
+ void createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone,
+ spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
// Load from an Id and return it
- Id createLoad(Id lValue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
+ Id createLoad(Id lValue, spv::Decoration precision,
+ spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone,
+ spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
// Create an OpAccessChain instruction
Id createAccessChain(StorageClass, Id base, const std::vector<Id>& offsets);
@@ -495,7 +533,7 @@ public:
// recursion stack can hold the memory for it.
//
void makeSwitch(Id condition, unsigned int control, int numSegments, const std::vector<int>& caseValues,
- const std::vector<int>& valueToSegment, int defaultSegment, std::vector<Block*>& segmentBB); // return argument
+ const std::vector<int>& valueToSegment, int defaultSegment, std::vector<Block*>& segmentBB);
// Add a branch to the innermost switch's merge block.
void addSwitchBreak();
@@ -512,7 +550,7 @@ public:
Block &head, &body, &merge, &continue_target;
private:
LoopBlocks();
- LoopBlocks& operator=(const LoopBlocks&);
+ LoopBlocks& operator=(const LoopBlocks&) = delete;
};
// Start a new loop and prepare the builder to generate code for it. Until
@@ -569,10 +607,13 @@ public:
std::vector<Id> indexChain;
Id instr; // cache the instruction that generates this access chain
std::vector<unsigned> swizzle; // each std::vector element selects the next GLSL component number
- Id component; // a dynamic component index, can coexist with a swizzle, done after the swizzle, NoResult if not present
- Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present
+ Id component; // a dynamic component index, can coexist with a swizzle,
+ // done after the swizzle, NoResult if not present
+ Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied;
+ // NoType unless a swizzle or component is present
bool isRValue; // true if 'base' is an r-value, otherwise, base is an l-value
- unsigned int alignment; // bitwise OR of alignment values passed in. Accumulates worst alignment. Only tracks base and (optional) component selection alignment.
+ unsigned int alignment; // bitwise OR of alignment values passed in. Accumulates worst alignment.
+ // Only tracks base and (optional) component selection alignment.
// Accumulate whether anything in the chain of structures has coherent decorations.
struct CoherentFlags {
@@ -583,12 +624,17 @@ public:
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
#else
bool isVolatile() const { return volatil; }
+ bool anyCoherent() const {
+ return coherent || devicecoherent || queuefamilycoherent || workgroupcoherent ||
+ subgroupcoherent || shadercallcoherent;
+ }
unsigned coherent : 1;
unsigned devicecoherent : 1;
unsigned queuefamilycoherent : 1;
unsigned workgroupcoherent : 1;
unsigned subgroupcoherent : 1;
+ unsigned shadercallcoherent : 1;
unsigned nonprivate : 1;
unsigned volatil : 1;
unsigned isImage : 1;
@@ -599,6 +645,7 @@ public:
queuefamilycoherent = 0;
workgroupcoherent = 0;
subgroupcoherent = 0;
+ shadercallcoherent = 0;
nonprivate = 0;
volatil = 0;
isImage = 0;
@@ -610,6 +657,7 @@ public:
queuefamilycoherent |= other.queuefamilycoherent;
workgroupcoherent |= other.workgroupcoherent;
subgroupcoherent |= other.subgroupcoherent;
+ shadercallcoherent |= other.shadercallcoherent;
nonprivate |= other.nonprivate;
volatil |= other.volatil;
isImage |= other.isImage;
@@ -655,11 +703,13 @@ public:
}
// push new swizzle onto the end of any existing swizzle, merging into a single swizzle
- void accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment);
+ void accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType,
+ AccessChain::CoherentFlags coherentFlags, unsigned int alignment);
// push a dynamic component selection onto the access chain, only applicable with a
// non-trivial swizzle or no swizzle
- void accessChainPushComponent(Id component, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment)
+ void accessChainPushComponent(Id component, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags,
+ unsigned int alignment)
{
if (accessChain.swizzle.size() != 1) {
accessChain.component = component;
@@ -671,10 +721,18 @@ public:
}
// use accessChain and swizzle to store value
- void accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
+ void accessChainStore(Id rvalue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone,
+ spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
// use accessChain and swizzle to load an r-value
- Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax, unsigned int alignment = 0);
+ Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType,
+ spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMaskNone, spv::Scope scope = spv::ScopeMax,
+ unsigned int alignment = 0);
+
+ // Return whether or not the access chain can be represented in SPIR-V
+ // as an l-value.
+ // E.g., a[3].yx cannot be, while a[3].y and a[3].y[x] can be.
+ bool isSpvLvalue() const { return accessChain.swizzle.size() <= 1; }
// get the direct pointer for an l-value
Id accessChainGetLValue();
@@ -703,7 +761,8 @@ public:
void createBranch(Block* block);
void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock);
- void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, const std::vector<unsigned int>& operands);
+ void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control,
+ const std::vector<unsigned int>& operands);
// Sets to generate opcode for specialization constants.
void setToSpecConstCodeGenMode() { generatingOpCodeForSpecConst = true; }
@@ -729,7 +788,8 @@ public:
void dumpSourceInstructions(const spv::Id fileId, const std::string& text, std::vector<unsigned int>&) const;
void dumpInstructions(std::vector<unsigned int>&, const std::vector<std::unique_ptr<Instruction> >&) const;
void dumpModuleProcesses(std::vector<unsigned int>&) const;
- spv::MemoryAccessMask sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc) const;
+ spv::MemoryAccessMask sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc)
+ const;
unsigned int spvVersion; // the version of SPIR-V to emit in the header
SourceLanguage source;
@@ -764,10 +824,14 @@ public:
std::vector<std::unique_ptr<Instruction> > externals;
std::vector<std::unique_ptr<Function> > functions;
- // not output, internally used for quick & dirty canonical (unique) creation
- std::unordered_map<unsigned int, std::vector<Instruction*>> groupedConstants; // map type opcodes to constant inst.
- std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants; // map struct-id to constant instructions
- std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes; // map type opcodes to type instructions
+ // not output, internally used for quick & dirty canonical (unique) creation
+
+ // map type opcodes to constant inst.
+ std::unordered_map<unsigned int, std::vector<Instruction*>> groupedConstants;
+ // map struct-id to constant instructions
+ std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
+ // map type opcodes to type instructions
+ std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
// stack of switches
std::stack<Block*> switchMerges;
diff --git a/thirdparty/glslang/SPIRV/SpvTools.cpp b/thirdparty/glslang/SPIRV/SpvTools.cpp
index 97bd4e7427..112ac33c5c 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.cpp
+++ b/thirdparty/glslang/SPIRV/SpvTools.cpp
@@ -1,6 +1,6 @@
//
// Copyright (C) 2014-2016 LunarG, Inc.
-// Copyright (C) 2018 Google, Inc.
+// Copyright (C) 2018-2020 Google, Inc.
//
// All rights reserved.
//
@@ -80,6 +80,39 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
}
+// Callback passed to spvtools::Optimizer::SetMessageConsumer
+void OptimizerMesssageConsumer(spv_message_level_t level, const char *source,
+ const spv_position_t &position, const char *message)
+{
+ auto &out = std::cerr;
+ switch (level)
+ {
+ case SPV_MSG_FATAL:
+ case SPV_MSG_INTERNAL_ERROR:
+ case SPV_MSG_ERROR:
+ out << "error: ";
+ break;
+ case SPV_MSG_WARNING:
+ out << "warning: ";
+ break;
+ case SPV_MSG_INFO:
+ case SPV_MSG_DEBUG:
+ out << "info: ";
+ break;
+ default:
+ break;
+ }
+ if (source)
+ {
+ out << source << ":";
+ }
+ out << position.line << ":" << position.column << ":" << position.index << ":";
+ if (message)
+ {
+ out << " " << message;
+ }
+ out << std::endl;
+}
// Use the SPIRV-Tools disassembler to print SPIR-V.
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv)
@@ -128,45 +161,14 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
spvContextDestroy(context);
}
-// Apply the SPIRV-Tools optimizer to generated SPIR-V, for the purpose of
-// legalizing HLSL SPIR-V.
-void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>& spirv,
- spv::SpvBuildLogger*, const SpvOptions* options)
+// Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process.
+void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
+ spv::SpvBuildLogger* logger, const SpvOptions* options)
{
- spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2;
+ spv_target_env target_env = MapToSpirvToolsEnv(intermediate.getSpv(), logger);
spvtools::Optimizer optimizer(target_env);
- optimizer.SetMessageConsumer(
- [](spv_message_level_t level, const char *source, const spv_position_t &position, const char *message) {
- auto &out = std::cerr;
- switch (level)
- {
- case SPV_MSG_FATAL:
- case SPV_MSG_INTERNAL_ERROR:
- case SPV_MSG_ERROR:
- out << "error: ";
- break;
- case SPV_MSG_WARNING:
- out << "warning: ";
- break;
- case SPV_MSG_INFO:
- case SPV_MSG_DEBUG:
- out << "info: ";
- break;
- default:
- break;
- }
- if (source)
- {
- out << source << ":";
- }
- out << position.line << ":" << position.column << ":" << position.index << ":";
- if (message)
- {
- out << " " << message;
- }
- out << std::endl;
- });
+ optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
// If debug (specifically source line info) is being generated, propagate
// line information into all SPIR-V instructions. This avoids loss of
@@ -175,6 +177,9 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
if (options->generateDebugInfo) {
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
}
+ else if (options->stripDebugInfo) {
+ optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass());
+ }
optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass());
optimizer.RegisterPass(spvtools::CreateMergeReturnPass());
@@ -207,7 +212,27 @@ void SpirvToolsLegalize(const glslang::TIntermediate&, std::vector<unsigned int>
}
spvtools::OptimizerOptions spvOptOptions;
- spvOptOptions.set_run_validator(false); // The validator may run as a seperate step later on
+ optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
+ spvOptOptions.set_run_validator(false); // The validator may run as a separate step later on
+ optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
+}
+
+// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
+// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
+// optimization is disabled.
+void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
+ std::vector<unsigned int>& spirv, spv::SpvBuildLogger* logger)
+{
+ spv_target_env target_env = MapToSpirvToolsEnv(intermediate.getSpv(), logger);
+
+ spvtools::Optimizer optimizer(target_env);
+ optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
+
+ optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass());
+
+ spvtools::OptimizerOptions spvOptOptions;
+ optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
+ spvOptOptions.set_run_validator(false); // The validator may run as a separate step later on
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
}
diff --git a/thirdparty/glslang/SPIRV/SpvTools.h b/thirdparty/glslang/SPIRV/SpvTools.h
index 59c914da0b..7779dfa779 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.h
+++ b/thirdparty/glslang/SPIRV/SpvTools.h
@@ -52,9 +52,10 @@
namespace glslang {
struct SpvOptions {
- SpvOptions() : generateDebugInfo(false), disableOptimizer(true),
+ SpvOptions() : generateDebugInfo(false), stripDebugInfo(false), disableOptimizer(true),
optimizeSize(false), disassemble(false), validate(false) { }
bool generateDebugInfo;
+ bool stripDebugInfo;
bool disableOptimizer;
bool optimizeSize;
bool disassemble;
@@ -70,10 +71,15 @@ void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& s
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*, bool prelegalization);
-// Apply the SPIRV-Tools optimizer to generated SPIR-V, for the purpose of
-// legalizing HLSL SPIR-V.
-void SpirvToolsLegalize(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
- spv::SpvBuildLogger*, const SpvOptions*);
+// Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process.
+void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
+ spv::SpvBuildLogger*, const SpvOptions*);
+
+// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
+// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
+// optimization is disabled.
+void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
+ std::vector<unsigned int>& spirv, spv::SpvBuildLogger*);
#endif
diff --git a/thirdparty/glslang/SPIRV/disassemble.cpp b/thirdparty/glslang/SPIRV/disassemble.cpp
index 930e799493..a95ded49d2 100644
--- a/thirdparty/glslang/SPIRV/disassemble.cpp
+++ b/thirdparty/glslang/SPIRV/disassemble.cpp
@@ -75,6 +75,7 @@ enum ExtInstSet {
GLSLextAMDInst,
GLSLextNVInst,
OpenCLExtInst,
+ NonSemanticDebugPrintfExtInst,
};
// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
@@ -480,8 +481,12 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
if (opCode == OpExtInst) {
ExtInstSet extInstSet = GLSL450Inst;
const char* name = idDescriptor[stream[word - 2]].c_str();
- if (0 == memcmp("OpenCL", name, 6)) {
+ if (strcmp("OpenCL.std", name) == 0) {
extInstSet = OpenCLExtInst;
+ } else if (strcmp("OpenCL.DebugInfo.100", name) == 0) {
+ extInstSet = OpenCLExtInst;
+ } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
+ extInstSet = NonSemanticDebugPrintfExtInst;
} else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
@@ -505,6 +510,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
}
else if (extInstSet == GLSLextNVInst) {
out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
+ } else if (extInstSet == NonSemanticDebugPrintfExtInst) {
+ out << "(DebugPrintf)";
}
}
break;
@@ -512,6 +519,10 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
case OperandLiteralString:
numOperands -= disassembleString();
break;
+ case OperandVariableLiteralStrings:
+ while (numOperands > 0)
+ numOperands -= disassembleString();
+ return;
case OperandMemoryAccess:
outputMask(OperandMemoryAccess, stream[word++]);
--numOperands;
diff --git a/thirdparty/glslang/SPIRV/doc.cpp b/thirdparty/glslang/SPIRV/doc.cpp
index bee5c79729..1d052f8c29 100644
--- a/thirdparty/glslang/SPIRV/doc.cpp
+++ b/thirdparty/glslang/SPIRV/doc.cpp
@@ -1,5 +1,6 @@
//
// Copyright (C) 2014-2015 LunarG, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -99,12 +100,12 @@ const char* ExecutionModelString(int model)
default: return "Bad";
- case ExecutionModelRayGenerationNV: return "RayGenerationNV";
- case ExecutionModelIntersectionNV: return "IntersectionNV";
- case ExecutionModelAnyHitNV: return "AnyHitNV";
- case ExecutionModelClosestHitNV: return "ClosestHitNV";
- case ExecutionModelMissNV: return "MissNV";
- case ExecutionModelCallableNV: return "CallableNV";
+ case ExecutionModelRayGenerationKHR: return "RayGenerationKHR";
+ case ExecutionModelIntersectionKHR: return "IntersectionKHR";
+ case ExecutionModelAnyHitKHR: return "AnyHitKHR";
+ case ExecutionModelClosestHitKHR: return "ClosestHitKHR";
+ case ExecutionModelMissKHR: return "MissKHR";
+ case ExecutionModelCallableKHR: return "CallableKHR";
}
}
@@ -133,7 +134,7 @@ const char* MemoryString(int mem)
}
}
-const int ExecutionModeCeiling = 33;
+const int ExecutionModeCeiling = 40;
const char* ExecutionModeString(int mode)
{
@@ -172,7 +173,21 @@ const char* ExecutionModeString(int mode)
case 31: return "ContractionOff";
case 32: return "Bad";
- case 4446: return "PostDepthCoverage";
+ case ExecutionModeInitializer: return "Initializer";
+ case ExecutionModeFinalizer: return "Finalizer";
+ case ExecutionModeSubgroupSize: return "SubgroupSize";
+ case ExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup";
+ case ExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId";
+ case ExecutionModeLocalSizeId: return "LocalSizeId";
+ case ExecutionModeLocalSizeHintId: return "LocalSizeHintId";
+
+ case ExecutionModePostDepthCoverage: return "PostDepthCoverage";
+ case ExecutionModeDenormPreserve: return "DenormPreserve";
+ case ExecutionModeDenormFlushToZero: return "DenormFlushToZero";
+ case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve";
+ case ExecutionModeRoundingModeRTE: return "RoundingModeRTE";
+ case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ";
+ case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT";
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
@@ -187,6 +202,11 @@ const char* ExecutionModeString(int mode)
case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT";
case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT";
+ case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL";
+ case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL";
+ case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL";
+ case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL";
+
case ExecutionModeCeiling:
default: return "Bad";
}
@@ -209,12 +229,12 @@ const char* StorageClassString(int StorageClass)
case 11: return "Image";
case 12: return "StorageBuffer";
- case StorageClassRayPayloadNV: return "RayPayloadNV";
- case StorageClassHitAttributeNV: return "HitAttributeNV";
- case StorageClassIncomingRayPayloadNV: return "IncomingRayPayloadNV";
- case StorageClassShaderRecordBufferNV: return "ShaderRecordBufferNV";
- case StorageClassCallableDataNV: return "CallableDataNV";
- case StorageClassIncomingCallableDataNV: return "IncomingCallableDataNV";
+ case StorageClassRayPayloadKHR: return "RayPayloadKHR";
+ case StorageClassHitAttributeKHR: return "HitAttributeKHR";
+ case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR";
+ case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR";
+ case StorageClassCallableDataKHR: return "CallableDataKHR";
+ case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR";
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
@@ -361,32 +381,33 @@ const char* BuiltInString(int builtIn)
case 4996: return "BaryCoordSmoothCentroidAMD";
case 4997: return "BaryCoordSmoothSampleAMD";
case 4998: return "BaryCoordPullModelAMD";
- case BuiltInLaunchIdNV: return "LaunchIdNV";
- case BuiltInLaunchSizeNV: return "LaunchSizeNV";
- case BuiltInWorldRayOriginNV: return "WorldRayOriginNV";
- case BuiltInWorldRayDirectionNV: return "WorldRayDirectionNV";
- case BuiltInObjectRayOriginNV: return "ObjectRayOriginNV";
- case BuiltInObjectRayDirectionNV: return "ObjectRayDirectionNV";
- case BuiltInRayTminNV: return "RayTminNV";
- case BuiltInRayTmaxNV: return "RayTmaxNV";
- case BuiltInInstanceCustomIndexNV: return "InstanceCustomIndexNV";
- case BuiltInObjectToWorldNV: return "ObjectToWorldNV";
- case BuiltInWorldToObjectNV: return "WorldToObjectNV";
- case BuiltInHitTNV: return "HitTNV";
- case BuiltInHitKindNV: return "HitKindNV";
- case BuiltInIncomingRayFlagsNV: return "IncomingRayFlagsNV";
- case BuiltInViewportMaskNV: return "ViewportMaskNV";
- case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
- case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
- case BuiltInPositionPerViewNV: return "PositionPerViewNV";
- case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
+ case BuiltInLaunchIdKHR: return "LaunchIdKHR";
+ case BuiltInLaunchSizeKHR: return "LaunchSizeKHR";
+ case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR";
+ case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR";
+ case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR";
+ case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR";
+ case BuiltInRayTminKHR: return "RayTminKHR";
+ case BuiltInRayTmaxKHR: return "RayTmaxKHR";
+ case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR";
+ case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
+ case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
+ case BuiltInWorldToObjectKHR: return "WorldToObjectKHR";
+ case BuiltInHitTKHR: return "HitTKHR";
+ case BuiltInHitKindKHR: return "HitKindKHR";
+ case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR";
+ case BuiltInViewportMaskNV: return "ViewportMaskNV";
+ case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
+ case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
+ case BuiltInPositionPerViewNV: return "PositionPerViewNV";
+ case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
// case BuiltInFragmentSizeNV: return "FragmentSizeNV"; // superseded by BuiltInFragSizeEXT
// case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
- case BuiltInBaryCoordNV: return "BaryCoordNV";
- case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
+ case BuiltInBaryCoordNV: return "BaryCoordNV";
+ case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
- case BuiltInFragSizeEXT: return "FragSizeEXT";
- case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
+ case BuiltInFragSizeEXT: return "FragSizeEXT";
+ case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
case 5264: return "FullyCoveredEXT";
@@ -890,6 +911,9 @@ const char* CapabilityString(int info)
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
case CapabilityRayTracingNV: return "RayTracingNV";
+ case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
+ case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR";
+ case CapabilityRayTraversalPrimitiveCullingProvisionalKHR: return "RayTraversalPrimitiveCullingProvisionalKHR";
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
@@ -933,6 +957,9 @@ const char* CapabilityString(int info)
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
+ case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT";
+ case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT";
+
default: return "Bad";
}
}
@@ -1264,6 +1291,7 @@ const char* OpcodeString(int op)
case 320: return "OpImageSparseRead";
case OpModuleProcessed: return "OpModuleProcessed";
+ case OpExecutionModeId: return "OpExecutionModeId";
case OpDecorateId: return "OpDecorateId";
case 333: return "OpGroupNonUniformElect";
@@ -1308,6 +1336,8 @@ const char* OpcodeString(int op)
case 4430: return "OpSubgroupAllEqualKHR";
case 4432: return "OpSubgroupReadInvocationKHR";
+ case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
+
case 5000: return "OpGroupIAddNonUniformAMD";
case 5001: return "OpGroupFAddNonUniformAMD";
case 5002: return "OpGroupFMinNonUniformAMD";
@@ -1326,15 +1356,40 @@ const char* OpcodeString(int op)
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
- case OpReportIntersectionNV: return "OpReportIntersectionNV";
- case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
- case OpTerminateRayNV: return "OpTerminateRayNV";
- case OpTraceNV: return "OpTraceNV";
- case OpTypeAccelerationStructureNV: return "OpTypeAccelerationStructureNV";
- case OpExecuteCallableNV: return "OpExecuteCallableNV";
+ case OpReportIntersectionKHR: return "OpReportIntersectionKHR";
+ case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR";
+ case OpTerminateRayKHR: return "OpTerminateRayKHR";
+ case OpTraceRayKHR: return "OpTraceRayKHR";
+ case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
+ case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
+ case OpTypeRayQueryProvisionalKHR: return "OpTypeRayQueryProvisionalKHR";
+ case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
+ case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
+ case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR";
+ case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR";
+ case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR";
+ case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR";
+ case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR";
+ case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR";
+ case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR";
+ case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR";
+ case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR";
+ case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR";
+ case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR";
+ case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR";
+ case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR";
+ case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR";
+ case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR";
+ case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR";
+ case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR";
+ case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR";
+ case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR";
+ case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR";
+ case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR";
+
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
@@ -1388,6 +1443,7 @@ void Parameterize()
InstructionDesc[OpMemoryModel].setResultAndType(false, false);
InstructionDesc[OpEntryPoint].setResultAndType(false, false);
InstructionDesc[OpExecutionMode].setResultAndType(false, false);
+ InstructionDesc[OpExecutionModeId].setResultAndType(false, false);
InstructionDesc[OpTypeVoid].setResultAndType(true, false);
InstructionDesc[OpTypeBool].setResultAndType(true, false);
InstructionDesc[OpTypeInt].setResultAndType(true, false);
@@ -1574,6 +1630,10 @@ void Parameterize()
InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'");
InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution_Mode,Execution Mode>>");
+ InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'");
+ InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'");
+ InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <<Execution_Mode,Execution Mode>>");
+
InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'");
InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'");
@@ -1667,7 +1727,7 @@ void Parameterize()
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
- InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
+ InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
@@ -1677,7 +1737,7 @@ void Parameterize()
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
- InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
+ InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
@@ -2230,6 +2290,11 @@ void Parameterize()
InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'");
+
InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
@@ -2694,31 +2759,125 @@ void Parameterize()
InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
- InstructionDesc[OpTypeAccelerationStructureNV].setResultAndType(true, false);
+ InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'NV Acceleration Structure'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
- InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
- InstructionDesc[OpTraceNV].setResultAndType(false, false);
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'NV Acceleration Structure'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'");
+ InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'");
+ InstructionDesc[OpTraceRayKHR].setResultAndType(false, false);
- InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Parameter'");
- InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Kind'");
+ InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
+ InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
- InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
+ InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
- InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
+ InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
- InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
- InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
- InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
+ InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
+ InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
+ InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
+
+ // Ray Query
+ InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
+ InstructionDesc[OpTypeRayQueryProvisionalKHR].setResultAndType(true, false);
+
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'");
+ InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'");
+ InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false);
+
+ InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false);
+
+ InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'");
+ InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false);
+
+ InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false);
+
+ InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true);
+
+ InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'");
+ InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
+ InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
diff --git a/thirdparty/glslang/SPIRV/doc.h b/thirdparty/glslang/SPIRV/doc.h
index 293256a2c6..2a0b28c6b3 100644
--- a/thirdparty/glslang/SPIRV/doc.h
+++ b/thirdparty/glslang/SPIRV/doc.h
@@ -125,6 +125,7 @@ enum OperandClass {
OperandVariableLiteralId,
OperandLiteralNumber,
OperandLiteralString,
+ OperandVariableLiteralStrings,
OperandSource,
OperandExecutionModel,
OperandAddressing,
diff --git a/thirdparty/glslang/SPIRV/hex_float.h b/thirdparty/glslang/SPIRV/hex_float.h
index 905b21a45a..8be8e9f7e3 100644
--- a/thirdparty/glslang/SPIRV/hex_float.h
+++ b/thirdparty/glslang/SPIRV/hex_float.h
@@ -784,8 +784,8 @@ inline std::istream& ParseNormalFloat(std::istream& is, bool negate_value,
if (val.isInfinity()) {
// Fail the parse. Emulate standard behaviour by setting the value to
// the closest normal value, and set the fail bit on the stream.
- value.set_value((value.isNegative() | negate_value) ? T::lowest()
- : T::max());
+ value.set_value((value.isNegative() || negate_value) ? T::lowest()
+ : T::max());
is.setstate(std::ios_base::failbit);
}
return is;
diff --git a/thirdparty/glslang/SPIRV/spirv.hpp b/thirdparty/glslang/SPIRV/spirv.hpp
index 1e96f7b4a9..35482ea5e2 100644
--- a/thirdparty/glslang/SPIRV/spirv.hpp
+++ b/thirdparty/glslang/SPIRV/spirv.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -49,12 +49,12 @@ namespace spv {
typedef unsigned int Id;
-#define SPV_VERSION 0x10400
-#define SPV_REVISION 1
+#define SPV_VERSION 0x10500
+#define SPV_REVISION 3
static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010400;
-static const unsigned int Revision = 1;
+static const unsigned int Version = 0x00010500;
+static const unsigned int Revision = 3;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -78,11 +78,17 @@ enum ExecutionModel {
ExecutionModelKernel = 6,
ExecutionModelTaskNV = 5267,
ExecutionModelMeshNV = 5268,
+ ExecutionModelRayGenerationKHR = 5313,
ExecutionModelRayGenerationNV = 5313,
+ ExecutionModelIntersectionKHR = 5314,
ExecutionModelIntersectionNV = 5314,
+ ExecutionModelAnyHitKHR = 5315,
ExecutionModelAnyHitNV = 5315,
+ ExecutionModelClosestHitKHR = 5316,
ExecutionModelClosestHitNV = 5316,
+ ExecutionModelMissKHR = 5317,
ExecutionModelMissNV = 5317,
+ ExecutionModelCallableKHR = 5318,
ExecutionModelCallableNV = 5318,
ExecutionModelMax = 0x7fffffff,
};
@@ -162,6 +168,10 @@ enum ExecutionMode {
ExecutionModeSampleInterlockUnorderedEXT = 5369,
ExecutionModeShadingRateInterlockOrderedEXT = 5370,
ExecutionModeShadingRateInterlockUnorderedEXT = 5371,
+ ExecutionModeMaxWorkgroupSizeINTEL = 5893,
+ ExecutionModeMaxWorkDimINTEL = 5894,
+ ExecutionModeNoGlobalOffsetINTEL = 5895,
+ ExecutionModeNumSIMDWorkitemsINTEL = 5896,
ExecutionModeMax = 0x7fffffff,
};
@@ -179,14 +189,21 @@ enum StorageClass {
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
StorageClassStorageBuffer = 12,
+ StorageClassCallableDataKHR = 5328,
StorageClassCallableDataNV = 5328,
+ StorageClassIncomingCallableDataKHR = 5329,
StorageClassIncomingCallableDataNV = 5329,
+ StorageClassRayPayloadKHR = 5338,
StorageClassRayPayloadNV = 5338,
+ StorageClassHitAttributeKHR = 5339,
StorageClassHitAttributeNV = 5339,
+ StorageClassIncomingRayPayloadKHR = 5342,
StorageClassIncomingRayPayloadNV = 5342,
+ StorageClassShaderRecordBufferKHR = 5343,
StorageClassShaderRecordBufferNV = 5343,
StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349,
+ StorageClassCodeSectionINTEL = 5605,
StorageClassMax = 0x7fffffff,
};
@@ -465,11 +482,24 @@ enum Decoration {
DecorationRestrictPointerEXT = 5355,
DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356,
+ DecorationReferencedIndirectlyINTEL = 5602,
DecorationCounterBuffer = 5634,
DecorationHlslCounterBufferGOOGLE = 5634,
DecorationHlslSemanticGOOGLE = 5635,
DecorationUserSemantic = 5635,
DecorationUserTypeGOOGLE = 5636,
+ DecorationRegisterINTEL = 5825,
+ DecorationMemoryINTEL = 5826,
+ DecorationNumbanksINTEL = 5827,
+ DecorationBankwidthINTEL = 5828,
+ DecorationMaxPrivateCopiesINTEL = 5829,
+ DecorationSinglepumpINTEL = 5830,
+ DecorationDoublepumpINTEL = 5831,
+ DecorationMaxReplicatesINTEL = 5832,
+ DecorationSimpleDualPortINTEL = 5833,
+ DecorationMergeINTEL = 5834,
+ DecorationBankBitsINTEL = 5835,
+ DecorationForcePow2DepthINTEL = 5836,
DecorationMax = 0x7fffffff,
};
@@ -558,20 +588,35 @@ enum BuiltIn {
BuiltInFragmentSizeNV = 5292,
BuiltInFragInvocationCountEXT = 5293,
BuiltInInvocationsPerPixelNV = 5293,
+ BuiltInLaunchIdKHR = 5319,
BuiltInLaunchIdNV = 5319,
+ BuiltInLaunchSizeKHR = 5320,
BuiltInLaunchSizeNV = 5320,
+ BuiltInWorldRayOriginKHR = 5321,
BuiltInWorldRayOriginNV = 5321,
+ BuiltInWorldRayDirectionKHR = 5322,
BuiltInWorldRayDirectionNV = 5322,
+ BuiltInObjectRayOriginKHR = 5323,
BuiltInObjectRayOriginNV = 5323,
+ BuiltInObjectRayDirectionKHR = 5324,
BuiltInObjectRayDirectionNV = 5324,
+ BuiltInRayTminKHR = 5325,
BuiltInRayTminNV = 5325,
+ BuiltInRayTmaxKHR = 5326,
BuiltInRayTmaxNV = 5326,
+ BuiltInInstanceCustomIndexKHR = 5327,
BuiltInInstanceCustomIndexNV = 5327,
+ BuiltInObjectToWorldKHR = 5330,
BuiltInObjectToWorldNV = 5330,
+ BuiltInWorldToObjectKHR = 5331,
BuiltInWorldToObjectNV = 5331,
+ BuiltInHitTKHR = 5332,
BuiltInHitTNV = 5332,
+ BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
+ BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
+ BuiltInRayGeometryIndexKHR = 5352,
BuiltInWarpsPerSMNV = 5374,
BuiltInSMCountNV = 5375,
BuiltInWarpIDNV = 5376,
@@ -601,6 +646,13 @@ enum LoopControlShift {
LoopControlIterationMultipleShift = 6,
LoopControlPeelCountShift = 7,
LoopControlPartialCountShift = 8,
+ LoopControlInitiationIntervalINTELShift = 16,
+ LoopControlMaxConcurrencyINTELShift = 17,
+ LoopControlDependencyArrayINTELShift = 18,
+ LoopControlPipelineEnableINTELShift = 19,
+ LoopControlLoopCoalesceINTELShift = 20,
+ LoopControlMaxInterleavingINTELShift = 21,
+ LoopControlSpeculatedIterationsINTELShift = 22,
LoopControlMax = 0x7fffffff,
};
@@ -615,6 +667,13 @@ enum LoopControlMask {
LoopControlIterationMultipleMask = 0x00000040,
LoopControlPeelCountMask = 0x00000080,
LoopControlPartialCountMask = 0x00000100,
+ LoopControlInitiationIntervalINTELMask = 0x00010000,
+ LoopControlMaxConcurrencyINTELMask = 0x00020000,
+ LoopControlDependencyArrayINTELMask = 0x00040000,
+ LoopControlPipelineEnableINTELMask = 0x00080000,
+ LoopControlLoopCoalesceINTELMask = 0x00100000,
+ LoopControlMaxInterleavingINTELMask = 0x00200000,
+ LoopControlSpeculatedIterationsINTELMask = 0x00400000,
};
enum FunctionControlShift {
@@ -709,6 +768,7 @@ enum Scope {
ScopeInvocation = 4,
ScopeQueueFamily = 5,
ScopeQueueFamilyKHR = 5,
+ ScopeShaderCallKHR = 6,
ScopeMax = 0x7fffffff,
};
@@ -833,6 +893,8 @@ enum Capability {
CapabilitySignedZeroInfNanPreserve = 4466,
CapabilityRoundingModeRTE = 4467,
CapabilityRoundingModeRTZ = 4468,
+ CapabilityRayQueryProvisionalKHR = 4471,
+ CapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478,
CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010,
@@ -886,6 +948,7 @@ enum Capability {
CapabilityPhysicalStorageBufferAddresses = 5347,
CapabilityPhysicalStorageBufferAddressesEXT = 5347,
CapabilityComputeDerivativeGroupLinearNV = 5350,
+ CapabilityRayTracingProvisionalKHR = 5353,
CapabilityCooperativeMatrixNV = 5357,
CapabilityFragmentShaderSampleInterlockEXT = 5363,
CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
@@ -897,12 +960,70 @@ enum Capability {
CapabilitySubgroupImageBlockIOINTEL = 5570,
CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
CapabilityIntegerFunctions2INTEL = 5584,
+ CapabilityFunctionPointersINTEL = 5603,
+ CapabilityIndirectReferencesINTEL = 5604,
CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
+ CapabilityFPGAMemoryAttributesINTEL = 5824,
+ CapabilityUnstructuredLoopControlsINTEL = 5886,
+ CapabilityFPGALoopControlsINTEL = 5888,
+ CapabilityKernelAttributesINTEL = 5892,
+ CapabilityFPGAKernelAttributesINTEL = 5897,
+ CapabilityBlockingPipesINTEL = 5945,
+ CapabilityFPGARegINTEL = 5948,
+ CapabilityAtomicFloat32AddEXT = 6033,
+ CapabilityAtomicFloat64AddEXT = 6034,
CapabilityMax = 0x7fffffff,
};
+enum RayFlagsShift {
+ RayFlagsOpaqueKHRShift = 0,
+ RayFlagsNoOpaqueKHRShift = 1,
+ RayFlagsTerminateOnFirstHitKHRShift = 2,
+ RayFlagsSkipClosestHitShaderKHRShift = 3,
+ RayFlagsCullBackFacingTrianglesKHRShift = 4,
+ RayFlagsCullFrontFacingTrianglesKHRShift = 5,
+ RayFlagsCullOpaqueKHRShift = 6,
+ RayFlagsCullNoOpaqueKHRShift = 7,
+ RayFlagsSkipTrianglesKHRShift = 8,
+ RayFlagsSkipAABBsKHRShift = 9,
+ RayFlagsMax = 0x7fffffff,
+};
+
+enum RayFlagsMask {
+ RayFlagsMaskNone = 0,
+ RayFlagsOpaqueKHRMask = 0x00000001,
+ RayFlagsNoOpaqueKHRMask = 0x00000002,
+ RayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
+ RayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
+ RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
+ RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
+ RayFlagsCullOpaqueKHRMask = 0x00000040,
+ RayFlagsCullNoOpaqueKHRMask = 0x00000080,
+ RayFlagsSkipTrianglesKHRMask = 0x00000100,
+ RayFlagsSkipAABBsKHRMask = 0x00000200,
+};
+
+enum RayQueryIntersection {
+ RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
+ RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
+ RayQueryIntersectionMax = 0x7fffffff,
+};
+
+enum RayQueryCommittedIntersectionType {
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
+ RayQueryCommittedIntersectionTypeMax = 0x7fffffff,
+};
+
+enum RayQueryCandidateIntersectionType {
+ RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
+ RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
+};
+
enum Op {
OpNop = 0,
OpUndef = 1,
@@ -1254,6 +1375,13 @@ enum Op {
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1268,11 +1396,17 @@ enum Op {
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1307,6 +1441,8 @@ enum Op {
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
+ OpFunctionPointerINTEL = 5600,
+ OpFunctionPointerCallINTEL = 5601,
OpDecorateString = 5632,
OpDecorateStringGOOGLE = 5632,
OpMemberDecorateString = 5633,
@@ -1429,6 +1565,28 @@ enum Op {
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpLoopControlINTEL = 5887,
+ OpReadPipeBlockingINTEL = 5946,
+ OpWritePipeBlockingINTEL = 5947,
+ OpFPGARegINTEL = 5949,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
+ OpAtomicFAddEXT = 6035,
OpMax = 0x7fffffff,
};
@@ -1787,6 +1945,13 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
+ case OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
+ case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
@@ -1840,6 +2005,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+ case OpFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
case OpDecorateString: *hasResult = false; *hasResultType = false; break;
case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
@@ -1960,6 +2127,28 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
+ case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
+ case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
}
}
#endif /* SPV_ENABLE_UTILITY_CODE */
@@ -1974,6 +2163,7 @@ inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
} // end namespace spv
diff --git a/thirdparty/glslang/SPIRV/spvIR.h b/thirdparty/glslang/SPIRV/spvIR.h
index cf6a71159a..868b9bf82d 100755..100644
--- a/thirdparty/glslang/SPIRV/spvIR.h
+++ b/thirdparty/glslang/SPIRV/spvIR.h
@@ -55,6 +55,7 @@
#include <iostream>
#include <memory>
#include <vector>
+#include <set>
namespace spv {
@@ -235,8 +236,7 @@ public:
assert(instructions.size() > 0);
instructions.resize(1);
successors.clear();
- Instruction* unreachable = new Instruction(OpUnreachable);
- addInstruction(std::unique_ptr<Instruction>(unreachable));
+ addInstruction(std::unique_ptr<Instruction>(new Instruction(OpUnreachable)));
}
// Change this block into a canonical dead continue target branching to the
// given header ID. Delete instructions as necessary. A canonical dead continue
@@ -352,10 +352,28 @@ public:
const std::vector<Block*>& getBlocks() const { return blocks; }
void addLocalVariable(std::unique_ptr<Instruction> inst);
Id getReturnType() const { return functionInstruction.getTypeId(); }
+ void setReturnPrecision(Decoration precision)
+ {
+ if (precision == DecorationRelaxedPrecision)
+ reducedPrecisionReturn = true;
+ }
+ Decoration getReturnPrecision() const
+ { return reducedPrecisionReturn ? DecorationRelaxedPrecision : NoPrecision; }
void setImplicitThis() { implicitThis = true; }
bool hasImplicitThis() const { return implicitThis; }
+ void addParamPrecision(unsigned param, Decoration precision)
+ {
+ if (precision == DecorationRelaxedPrecision)
+ reducedPrecisionParams.insert(param);
+ }
+ Decoration getParamPrecision(unsigned param) const
+ {
+ return reducedPrecisionParams.find(param) != reducedPrecisionParams.end() ?
+ DecorationRelaxedPrecision : NoPrecision;
+ }
+
void dump(std::vector<unsigned int>& out) const
{
// OpFunction
@@ -380,6 +398,8 @@ protected:
std::vector<Instruction*> parameterInstructions;
std::vector<Block*> blocks;
bool implicitThis; // true if this is a member function expecting to be passed a 'this' as the first argument
+ bool reducedPrecisionReturn;
+ std::set<int> reducedPrecisionParams; // list of parameter indexes that need a relaxed precision arg
};
//
@@ -440,7 +460,8 @@ protected:
// - the OpFunction instruction
// - all the OpFunctionParameter instructions
__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent)
- : parent(parent), functionInstruction(id, resultType, OpFunction), implicitThis(false)
+ : parent(parent), functionInstruction(id, resultType, OpFunction), implicitThis(false),
+ reducedPrecisionReturn(false)
{
// OpFunction
functionInstruction.addImmediateOperand(FunctionControlMaskNone);
diff --git a/thirdparty/glslang/StandAlone/DirStackFileIncluder.h b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h
new file mode 100644
index 0000000000..18734130e7
--- /dev/null
+++ b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h
@@ -0,0 +1,141 @@
+//
+// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+// Copyright (C) 2017 Google, Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+#pragma once
+
+#include <vector>
+#include <string>
+#include <fstream>
+#include <algorithm>
+
+#include "./../glslang/Public/ShaderLang.h"
+
+// Default include class for normal include convention of search backward
+// through the stack of active include paths (for nested includes).
+// Can be overridden to customize.
+class DirStackFileIncluder : public glslang::TShader::Includer {
+public:
+ DirStackFileIncluder() : externalLocalDirectoryCount(0) { }
+
+ virtual IncludeResult* includeLocal(const char* headerName,
+ const char* includerName,
+ size_t inclusionDepth) override
+ {
+ return readLocalPath(headerName, includerName, (int)inclusionDepth);
+ }
+
+ virtual IncludeResult* includeSystem(const char* headerName,
+ const char* /*includerName*/,
+ size_t /*inclusionDepth*/) override
+ {
+ return readSystemPath(headerName);
+ }
+
+ // Externally set directories. E.g., from a command-line -I<dir>.
+ // - Most-recently pushed are checked first.
+ // - All these are checked after the parse-time stack of local directories
+ // is checked.
+ // - This only applies to the "local" form of #include.
+ // - Makes its own copy of the path.
+ virtual void pushExternalLocalDirectory(const std::string& dir)
+ {
+ directoryStack.push_back(dir);
+ externalLocalDirectoryCount = (int)directoryStack.size();
+ }
+
+ virtual void releaseInclude(IncludeResult* result) override
+ {
+ if (result != nullptr) {
+ delete [] static_cast<tUserDataElement*>(result->userData);
+ delete result;
+ }
+ }
+
+ virtual ~DirStackFileIncluder() override { }
+
+protected:
+ typedef char tUserDataElement;
+ std::vector<std::string> directoryStack;
+ int externalLocalDirectoryCount;
+
+ // Search for a valid "local" path based on combining the stack of include
+ // directories and the nominal name of the header.
+ virtual IncludeResult* readLocalPath(const char* headerName, const char* includerName, int depth)
+ {
+ // Discard popped include directories, and
+ // initialize when at parse-time first level.
+ directoryStack.resize(depth + externalLocalDirectoryCount);
+ if (depth == 1)
+ directoryStack.back() = getDirectory(includerName);
+
+ // Find a directory that works, using a reverse search of the include stack.
+ for (auto it = directoryStack.rbegin(); it != directoryStack.rend(); ++it) {
+ std::string path = *it + '/' + headerName;
+ std::replace(path.begin(), path.end(), '\\', '/');
+ std::ifstream file(path, std::ios_base::binary | std::ios_base::ate);
+ if (file) {
+ directoryStack.push_back(getDirectory(path));
+ return newIncludeResult(path, file, (int)file.tellg());
+ }
+ }
+
+ return nullptr;
+ }
+
+ // Search for a valid <system> path.
+ // Not implemented yet; returning nullptr signals failure to find.
+ virtual IncludeResult* readSystemPath(const char* /*headerName*/) const
+ {
+ return nullptr;
+ }
+
+ // Do actual reading of the file, filling in a new include result.
+ virtual IncludeResult* newIncludeResult(const std::string& path, std::ifstream& file, int length) const
+ {
+ char* content = new tUserDataElement [length];
+ file.seekg(0, file.beg);
+ file.read(content, length);
+ return new IncludeResult(path, content, length, content);
+ }
+
+ // If no path markers, return current working directory.
+ // Otherwise, strip file name and return path leading up to it.
+ virtual std::string getDirectory(const std::string path) const
+ {
+ size_t last = path.find_last_of("/\\");
+ return last == std::string::npos ? "." : path.substr(0, last);
+ }
+};
diff --git a/thirdparty/glslang/StandAlone/ResourceLimits.cpp b/thirdparty/glslang/StandAlone/ResourceLimits.cpp
new file mode 100644
index 0000000000..7c7f4c4e49
--- /dev/null
+++ b/thirdparty/glslang/StandAlone/ResourceLimits.cpp
@@ -0,0 +1,496 @@
+//
+// Copyright (C) 2016 Google, Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+#include <cstdlib>
+#include <cstring>
+#include <sstream>
+#include <cctype>
+
+#include "ResourceLimits.h"
+
+namespace glslang {
+
+const TBuiltInResource DefaultTBuiltInResource = {
+ /* .MaxLights = */ 32,
+ /* .MaxClipPlanes = */ 6,
+ /* .MaxTextureUnits = */ 32,
+ /* .MaxTextureCoords = */ 32,
+ /* .MaxVertexAttribs = */ 64,
+ /* .MaxVertexUniformComponents = */ 4096,
+ /* .MaxVaryingFloats = */ 64,
+ /* .MaxVertexTextureImageUnits = */ 32,
+ /* .MaxCombinedTextureImageUnits = */ 80,
+ /* .MaxTextureImageUnits = */ 32,
+ /* .MaxFragmentUniformComponents = */ 4096,
+ /* .MaxDrawBuffers = */ 32,
+ /* .MaxVertexUniformVectors = */ 128,
+ /* .MaxVaryingVectors = */ 8,
+ /* .MaxFragmentUniformVectors = */ 16,
+ /* .MaxVertexOutputVectors = */ 16,
+ /* .MaxFragmentInputVectors = */ 15,
+ /* .MinProgramTexelOffset = */ -8,
+ /* .MaxProgramTexelOffset = */ 7,
+ /* .MaxClipDistances = */ 8,
+ /* .MaxComputeWorkGroupCountX = */ 65535,
+ /* .MaxComputeWorkGroupCountY = */ 65535,
+ /* .MaxComputeWorkGroupCountZ = */ 65535,
+ /* .MaxComputeWorkGroupSizeX = */ 1024,
+ /* .MaxComputeWorkGroupSizeY = */ 1024,
+ /* .MaxComputeWorkGroupSizeZ = */ 64,
+ /* .MaxComputeUniformComponents = */ 1024,
+ /* .MaxComputeTextureImageUnits = */ 16,
+ /* .MaxComputeImageUniforms = */ 8,
+ /* .MaxComputeAtomicCounters = */ 8,
+ /* .MaxComputeAtomicCounterBuffers = */ 1,
+ /* .MaxVaryingComponents = */ 60,
+ /* .MaxVertexOutputComponents = */ 64,
+ /* .MaxGeometryInputComponents = */ 64,
+ /* .MaxGeometryOutputComponents = */ 128,
+ /* .MaxFragmentInputComponents = */ 128,
+ /* .MaxImageUnits = */ 8,
+ /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
+ /* .MaxCombinedShaderOutputResources = */ 8,
+ /* .MaxImageSamples = */ 0,
+ /* .MaxVertexImageUniforms = */ 0,
+ /* .MaxTessControlImageUniforms = */ 0,
+ /* .MaxTessEvaluationImageUniforms = */ 0,
+ /* .MaxGeometryImageUniforms = */ 0,
+ /* .MaxFragmentImageUniforms = */ 8,
+ /* .MaxCombinedImageUniforms = */ 8,
+ /* .MaxGeometryTextureImageUnits = */ 16,
+ /* .MaxGeometryOutputVertices = */ 256,
+ /* .MaxGeometryTotalOutputComponents = */ 1024,
+ /* .MaxGeometryUniformComponents = */ 1024,
+ /* .MaxGeometryVaryingComponents = */ 64,
+ /* .MaxTessControlInputComponents = */ 128,
+ /* .MaxTessControlOutputComponents = */ 128,
+ /* .MaxTessControlTextureImageUnits = */ 16,
+ /* .MaxTessControlUniformComponents = */ 1024,
+ /* .MaxTessControlTotalOutputComponents = */ 4096,
+ /* .MaxTessEvaluationInputComponents = */ 128,
+ /* .MaxTessEvaluationOutputComponents = */ 128,
+ /* .MaxTessEvaluationTextureImageUnits = */ 16,
+ /* .MaxTessEvaluationUniformComponents = */ 1024,
+ /* .MaxTessPatchComponents = */ 120,
+ /* .MaxPatchVertices = */ 32,
+ /* .MaxTessGenLevel = */ 64,
+ /* .MaxViewports = */ 16,
+ /* .MaxVertexAtomicCounters = */ 0,
+ /* .MaxTessControlAtomicCounters = */ 0,
+ /* .MaxTessEvaluationAtomicCounters = */ 0,
+ /* .MaxGeometryAtomicCounters = */ 0,
+ /* .MaxFragmentAtomicCounters = */ 8,
+ /* .MaxCombinedAtomicCounters = */ 8,
+ /* .MaxAtomicCounterBindings = */ 1,
+ /* .MaxVertexAtomicCounterBuffers = */ 0,
+ /* .MaxTessControlAtomicCounterBuffers = */ 0,
+ /* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
+ /* .MaxGeometryAtomicCounterBuffers = */ 0,
+ /* .MaxFragmentAtomicCounterBuffers = */ 1,
+ /* .MaxCombinedAtomicCounterBuffers = */ 1,
+ /* .MaxAtomicCounterBufferSize = */ 16384,
+ /* .MaxTransformFeedbackBuffers = */ 4,
+ /* .MaxTransformFeedbackInterleavedComponents = */ 64,
+ /* .MaxCullDistances = */ 8,
+ /* .MaxCombinedClipAndCullDistances = */ 8,
+ /* .MaxSamples = */ 4,
+ /* .maxMeshOutputVerticesNV = */ 256,
+ /* .maxMeshOutputPrimitivesNV = */ 512,
+ /* .maxMeshWorkGroupSizeX_NV = */ 32,
+ /* .maxMeshWorkGroupSizeY_NV = */ 1,
+ /* .maxMeshWorkGroupSizeZ_NV = */ 1,
+ /* .maxTaskWorkGroupSizeX_NV = */ 32,
+ /* .maxTaskWorkGroupSizeY_NV = */ 1,
+ /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+ /* .maxMeshViewCountNV = */ 4,
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
+
+ /* .limits = */ {
+ /* .nonInductiveForLoops = */ 1,
+ /* .whileLoops = */ 1,
+ /* .doWhileLoops = */ 1,
+ /* .generalUniformIndexing = */ 1,
+ /* .generalAttributeMatrixVectorIndexing = */ 1,
+ /* .generalVaryingIndexing = */ 1,
+ /* .generalSamplerIndexing = */ 1,
+ /* .generalVariableIndexing = */ 1,
+ /* .generalConstantMatrixVectorIndexing = */ 1,
+ }};
+
+std::string GetDefaultTBuiltInResourceString()
+{
+ std::ostringstream ostream;
+
+ ostream << "MaxLights " << DefaultTBuiltInResource.maxLights << "\n"
+ << "MaxClipPlanes " << DefaultTBuiltInResource.maxClipPlanes << "\n"
+ << "MaxTextureUnits " << DefaultTBuiltInResource.maxTextureUnits << "\n"
+ << "MaxTextureCoords " << DefaultTBuiltInResource.maxTextureCoords << "\n"
+ << "MaxVertexAttribs " << DefaultTBuiltInResource.maxVertexAttribs << "\n"
+ << "MaxVertexUniformComponents " << DefaultTBuiltInResource.maxVertexUniformComponents << "\n"
+ << "MaxVaryingFloats " << DefaultTBuiltInResource.maxVaryingFloats << "\n"
+ << "MaxVertexTextureImageUnits " << DefaultTBuiltInResource.maxVertexTextureImageUnits << "\n"
+ << "MaxCombinedTextureImageUnits " << DefaultTBuiltInResource.maxCombinedTextureImageUnits << "\n"
+ << "MaxTextureImageUnits " << DefaultTBuiltInResource.maxTextureImageUnits << "\n"
+ << "MaxFragmentUniformComponents " << DefaultTBuiltInResource.maxFragmentUniformComponents << "\n"
+ << "MaxDrawBuffers " << DefaultTBuiltInResource.maxDrawBuffers << "\n"
+ << "MaxVertexUniformVectors " << DefaultTBuiltInResource.maxVertexUniformVectors << "\n"
+ << "MaxVaryingVectors " << DefaultTBuiltInResource.maxVaryingVectors << "\n"
+ << "MaxFragmentUniformVectors " << DefaultTBuiltInResource.maxFragmentUniformVectors << "\n"
+ << "MaxVertexOutputVectors " << DefaultTBuiltInResource.maxVertexOutputVectors << "\n"
+ << "MaxFragmentInputVectors " << DefaultTBuiltInResource.maxFragmentInputVectors << "\n"
+ << "MinProgramTexelOffset " << DefaultTBuiltInResource.minProgramTexelOffset << "\n"
+ << "MaxProgramTexelOffset " << DefaultTBuiltInResource.maxProgramTexelOffset << "\n"
+ << "MaxClipDistances " << DefaultTBuiltInResource.maxClipDistances << "\n"
+ << "MaxComputeWorkGroupCountX " << DefaultTBuiltInResource.maxComputeWorkGroupCountX << "\n"
+ << "MaxComputeWorkGroupCountY " << DefaultTBuiltInResource.maxComputeWorkGroupCountY << "\n"
+ << "MaxComputeWorkGroupCountZ " << DefaultTBuiltInResource.maxComputeWorkGroupCountZ << "\n"
+ << "MaxComputeWorkGroupSizeX " << DefaultTBuiltInResource.maxComputeWorkGroupSizeX << "\n"
+ << "MaxComputeWorkGroupSizeY " << DefaultTBuiltInResource.maxComputeWorkGroupSizeY << "\n"
+ << "MaxComputeWorkGroupSizeZ " << DefaultTBuiltInResource.maxComputeWorkGroupSizeZ << "\n"
+ << "MaxComputeUniformComponents " << DefaultTBuiltInResource.maxComputeUniformComponents << "\n"
+ << "MaxComputeTextureImageUnits " << DefaultTBuiltInResource.maxComputeTextureImageUnits << "\n"
+ << "MaxComputeImageUniforms " << DefaultTBuiltInResource.maxComputeImageUniforms << "\n"
+ << "MaxComputeAtomicCounters " << DefaultTBuiltInResource.maxComputeAtomicCounters << "\n"
+ << "MaxComputeAtomicCounterBuffers " << DefaultTBuiltInResource.maxComputeAtomicCounterBuffers << "\n"
+ << "MaxVaryingComponents " << DefaultTBuiltInResource.maxVaryingComponents << "\n"
+ << "MaxVertexOutputComponents " << DefaultTBuiltInResource.maxVertexOutputComponents << "\n"
+ << "MaxGeometryInputComponents " << DefaultTBuiltInResource.maxGeometryInputComponents << "\n"
+ << "MaxGeometryOutputComponents " << DefaultTBuiltInResource.maxGeometryOutputComponents << "\n"
+ << "MaxFragmentInputComponents " << DefaultTBuiltInResource.maxFragmentInputComponents << "\n"
+ << "MaxImageUnits " << DefaultTBuiltInResource.maxImageUnits << "\n"
+ << "MaxCombinedImageUnitsAndFragmentOutputs " << DefaultTBuiltInResource.maxCombinedImageUnitsAndFragmentOutputs << "\n"
+ << "MaxCombinedShaderOutputResources " << DefaultTBuiltInResource.maxCombinedShaderOutputResources << "\n"
+ << "MaxImageSamples " << DefaultTBuiltInResource.maxImageSamples << "\n"
+ << "MaxVertexImageUniforms " << DefaultTBuiltInResource.maxVertexImageUniforms << "\n"
+ << "MaxTessControlImageUniforms " << DefaultTBuiltInResource.maxTessControlImageUniforms << "\n"
+ << "MaxTessEvaluationImageUniforms " << DefaultTBuiltInResource.maxTessEvaluationImageUniforms << "\n"
+ << "MaxGeometryImageUniforms " << DefaultTBuiltInResource.maxGeometryImageUniforms << "\n"
+ << "MaxFragmentImageUniforms " << DefaultTBuiltInResource.maxFragmentImageUniforms << "\n"
+ << "MaxCombinedImageUniforms " << DefaultTBuiltInResource.maxCombinedImageUniforms << "\n"
+ << "MaxGeometryTextureImageUnits " << DefaultTBuiltInResource.maxGeometryTextureImageUnits << "\n"
+ << "MaxGeometryOutputVertices " << DefaultTBuiltInResource.maxGeometryOutputVertices << "\n"
+ << "MaxGeometryTotalOutputComponents " << DefaultTBuiltInResource.maxGeometryTotalOutputComponents << "\n"
+ << "MaxGeometryUniformComponents " << DefaultTBuiltInResource.maxGeometryUniformComponents << "\n"
+ << "MaxGeometryVaryingComponents " << DefaultTBuiltInResource.maxGeometryVaryingComponents << "\n"
+ << "MaxTessControlInputComponents " << DefaultTBuiltInResource.maxTessControlInputComponents << "\n"
+ << "MaxTessControlOutputComponents " << DefaultTBuiltInResource.maxTessControlOutputComponents << "\n"
+ << "MaxTessControlTextureImageUnits " << DefaultTBuiltInResource.maxTessControlTextureImageUnits << "\n"
+ << "MaxTessControlUniformComponents " << DefaultTBuiltInResource.maxTessControlUniformComponents << "\n"
+ << "MaxTessControlTotalOutputComponents " << DefaultTBuiltInResource.maxTessControlTotalOutputComponents << "\n"
+ << "MaxTessEvaluationInputComponents " << DefaultTBuiltInResource.maxTessEvaluationInputComponents << "\n"
+ << "MaxTessEvaluationOutputComponents " << DefaultTBuiltInResource.maxTessEvaluationOutputComponents << "\n"
+ << "MaxTessEvaluationTextureImageUnits " << DefaultTBuiltInResource.maxTessEvaluationTextureImageUnits << "\n"
+ << "MaxTessEvaluationUniformComponents " << DefaultTBuiltInResource.maxTessEvaluationUniformComponents << "\n"
+ << "MaxTessPatchComponents " << DefaultTBuiltInResource.maxTessPatchComponents << "\n"
+ << "MaxPatchVertices " << DefaultTBuiltInResource.maxPatchVertices << "\n"
+ << "MaxTessGenLevel " << DefaultTBuiltInResource.maxTessGenLevel << "\n"
+ << "MaxViewports " << DefaultTBuiltInResource.maxViewports << "\n"
+ << "MaxVertexAtomicCounters " << DefaultTBuiltInResource.maxVertexAtomicCounters << "\n"
+ << "MaxTessControlAtomicCounters " << DefaultTBuiltInResource.maxTessControlAtomicCounters << "\n"
+ << "MaxTessEvaluationAtomicCounters " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounters << "\n"
+ << "MaxGeometryAtomicCounters " << DefaultTBuiltInResource.maxGeometryAtomicCounters << "\n"
+ << "MaxFragmentAtomicCounters " << DefaultTBuiltInResource.maxFragmentAtomicCounters << "\n"
+ << "MaxCombinedAtomicCounters " << DefaultTBuiltInResource.maxCombinedAtomicCounters << "\n"
+ << "MaxAtomicCounterBindings " << DefaultTBuiltInResource.maxAtomicCounterBindings << "\n"
+ << "MaxVertexAtomicCounterBuffers " << DefaultTBuiltInResource.maxVertexAtomicCounterBuffers << "\n"
+ << "MaxTessControlAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessControlAtomicCounterBuffers << "\n"
+ << "MaxTessEvaluationAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounterBuffers << "\n"
+ << "MaxGeometryAtomicCounterBuffers " << DefaultTBuiltInResource.maxGeometryAtomicCounterBuffers << "\n"
+ << "MaxFragmentAtomicCounterBuffers " << DefaultTBuiltInResource.maxFragmentAtomicCounterBuffers << "\n"
+ << "MaxCombinedAtomicCounterBuffers " << DefaultTBuiltInResource.maxCombinedAtomicCounterBuffers << "\n"
+ << "MaxAtomicCounterBufferSize " << DefaultTBuiltInResource.maxAtomicCounterBufferSize << "\n"
+ << "MaxTransformFeedbackBuffers " << DefaultTBuiltInResource.maxTransformFeedbackBuffers << "\n"
+ << "MaxTransformFeedbackInterleavedComponents " << DefaultTBuiltInResource.maxTransformFeedbackInterleavedComponents << "\n"
+ << "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n"
+ << "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
+ << "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n"
+ << "MaxMeshOutputVerticesNV " << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
+ << "MaxMeshOutputPrimitivesNV " << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
+ << "MaxMeshWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
+ << "MaxMeshWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
+ << "MaxMeshWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
+ << "MaxTaskWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
+ << "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
+ << "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
+ << "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
+ << "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n"
+ << "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
+ << "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
+ << "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
+ << "generalUniformIndexing " << DefaultTBuiltInResource.limits.generalUniformIndexing << "\n"
+ << "generalAttributeMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalAttributeMatrixVectorIndexing << "\n"
+ << "generalVaryingIndexing " << DefaultTBuiltInResource.limits.generalVaryingIndexing << "\n"
+ << "generalSamplerIndexing " << DefaultTBuiltInResource.limits.generalSamplerIndexing << "\n"
+ << "generalVariableIndexing " << DefaultTBuiltInResource.limits.generalVariableIndexing << "\n"
+ << "generalConstantMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalConstantMatrixVectorIndexing << "\n"
+ ;
+
+ return ostream.str();
+}
+
+void DecodeResourceLimits(TBuiltInResource* resources, char* config)
+{
+ static const char* delims = " \t\n\r";
+
+ size_t pos = 0;
+ std::string configStr(config);
+
+ while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) {
+ const size_t token_s = pos;
+ const size_t token_e = configStr.find_first_of(delims, token_s);
+ const size_t value_s = configStr.find_first_not_of(delims, token_e);
+ const size_t value_e = configStr.find_first_of(delims, value_s);
+ pos = value_e;
+
+ // Faster to use compare(), but prefering readability.
+ const std::string tokenStr = configStr.substr(token_s, token_e-token_s);
+ const std::string valueStr = configStr.substr(value_s, value_e-value_s);
+
+ if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) {
+ printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n",
+ valueStr.c_str());
+ return;
+ }
+
+ const int value = std::atoi(valueStr.c_str());
+
+ if (tokenStr == "MaxLights")
+ resources->maxLights = value;
+ else if (tokenStr == "MaxClipPlanes")
+ resources->maxClipPlanes = value;
+ else if (tokenStr == "MaxTextureUnits")
+ resources->maxTextureUnits = value;
+ else if (tokenStr == "MaxTextureCoords")
+ resources->maxTextureCoords = value;
+ else if (tokenStr == "MaxVertexAttribs")
+ resources->maxVertexAttribs = value;
+ else if (tokenStr == "MaxVertexUniformComponents")
+ resources->maxVertexUniformComponents = value;
+ else if (tokenStr == "MaxVaryingFloats")
+ resources->maxVaryingFloats = value;
+ else if (tokenStr == "MaxVertexTextureImageUnits")
+ resources->maxVertexTextureImageUnits = value;
+ else if (tokenStr == "MaxCombinedTextureImageUnits")
+ resources->maxCombinedTextureImageUnits = value;
+ else if (tokenStr == "MaxTextureImageUnits")
+ resources->maxTextureImageUnits = value;
+ else if (tokenStr == "MaxFragmentUniformComponents")
+ resources->maxFragmentUniformComponents = value;
+ else if (tokenStr == "MaxDrawBuffers")
+ resources->maxDrawBuffers = value;
+ else if (tokenStr == "MaxVertexUniformVectors")
+ resources->maxVertexUniformVectors = value;
+ else if (tokenStr == "MaxVaryingVectors")
+ resources->maxVaryingVectors = value;
+ else if (tokenStr == "MaxFragmentUniformVectors")
+ resources->maxFragmentUniformVectors = value;
+ else if (tokenStr == "MaxVertexOutputVectors")
+ resources->maxVertexOutputVectors = value;
+ else if (tokenStr == "MaxFragmentInputVectors")
+ resources->maxFragmentInputVectors = value;
+ else if (tokenStr == "MinProgramTexelOffset")
+ resources->minProgramTexelOffset = value;
+ else if (tokenStr == "MaxProgramTexelOffset")
+ resources->maxProgramTexelOffset = value;
+ else if (tokenStr == "MaxClipDistances")
+ resources->maxClipDistances = value;
+ else if (tokenStr == "MaxComputeWorkGroupCountX")
+ resources->maxComputeWorkGroupCountX = value;
+ else if (tokenStr == "MaxComputeWorkGroupCountY")
+ resources->maxComputeWorkGroupCountY = value;
+ else if (tokenStr == "MaxComputeWorkGroupCountZ")
+ resources->maxComputeWorkGroupCountZ = value;
+ else if (tokenStr == "MaxComputeWorkGroupSizeX")
+ resources->maxComputeWorkGroupSizeX = value;
+ else if (tokenStr == "MaxComputeWorkGroupSizeY")
+ resources->maxComputeWorkGroupSizeY = value;
+ else if (tokenStr == "MaxComputeWorkGroupSizeZ")
+ resources->maxComputeWorkGroupSizeZ = value;
+ else if (tokenStr == "MaxComputeUniformComponents")
+ resources->maxComputeUniformComponents = value;
+ else if (tokenStr == "MaxComputeTextureImageUnits")
+ resources->maxComputeTextureImageUnits = value;
+ else if (tokenStr == "MaxComputeImageUniforms")
+ resources->maxComputeImageUniforms = value;
+ else if (tokenStr == "MaxComputeAtomicCounters")
+ resources->maxComputeAtomicCounters = value;
+ else if (tokenStr == "MaxComputeAtomicCounterBuffers")
+ resources->maxComputeAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxVaryingComponents")
+ resources->maxVaryingComponents = value;
+ else if (tokenStr == "MaxVertexOutputComponents")
+ resources->maxVertexOutputComponents = value;
+ else if (tokenStr == "MaxGeometryInputComponents")
+ resources->maxGeometryInputComponents = value;
+ else if (tokenStr == "MaxGeometryOutputComponents")
+ resources->maxGeometryOutputComponents = value;
+ else if (tokenStr == "MaxFragmentInputComponents")
+ resources->maxFragmentInputComponents = value;
+ else if (tokenStr == "MaxImageUnits")
+ resources->maxImageUnits = value;
+ else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs")
+ resources->maxCombinedImageUnitsAndFragmentOutputs = value;
+ else if (tokenStr == "MaxCombinedShaderOutputResources")
+ resources->maxCombinedShaderOutputResources = value;
+ else if (tokenStr == "MaxImageSamples")
+ resources->maxImageSamples = value;
+ else if (tokenStr == "MaxVertexImageUniforms")
+ resources->maxVertexImageUniforms = value;
+ else if (tokenStr == "MaxTessControlImageUniforms")
+ resources->maxTessControlImageUniforms = value;
+ else if (tokenStr == "MaxTessEvaluationImageUniforms")
+ resources->maxTessEvaluationImageUniforms = value;
+ else if (tokenStr == "MaxGeometryImageUniforms")
+ resources->maxGeometryImageUniforms = value;
+ else if (tokenStr == "MaxFragmentImageUniforms")
+ resources->maxFragmentImageUniforms = value;
+ else if (tokenStr == "MaxCombinedImageUniforms")
+ resources->maxCombinedImageUniforms = value;
+ else if (tokenStr == "MaxGeometryTextureImageUnits")
+ resources->maxGeometryTextureImageUnits = value;
+ else if (tokenStr == "MaxGeometryOutputVertices")
+ resources->maxGeometryOutputVertices = value;
+ else if (tokenStr == "MaxGeometryTotalOutputComponents")
+ resources->maxGeometryTotalOutputComponents = value;
+ else if (tokenStr == "MaxGeometryUniformComponents")
+ resources->maxGeometryUniformComponents = value;
+ else if (tokenStr == "MaxGeometryVaryingComponents")
+ resources->maxGeometryVaryingComponents = value;
+ else if (tokenStr == "MaxTessControlInputComponents")
+ resources->maxTessControlInputComponents = value;
+ else if (tokenStr == "MaxTessControlOutputComponents")
+ resources->maxTessControlOutputComponents = value;
+ else if (tokenStr == "MaxTessControlTextureImageUnits")
+ resources->maxTessControlTextureImageUnits = value;
+ else if (tokenStr == "MaxTessControlUniformComponents")
+ resources->maxTessControlUniformComponents = value;
+ else if (tokenStr == "MaxTessControlTotalOutputComponents")
+ resources->maxTessControlTotalOutputComponents = value;
+ else if (tokenStr == "MaxTessEvaluationInputComponents")
+ resources->maxTessEvaluationInputComponents = value;
+ else if (tokenStr == "MaxTessEvaluationOutputComponents")
+ resources->maxTessEvaluationOutputComponents = value;
+ else if (tokenStr == "MaxTessEvaluationTextureImageUnits")
+ resources->maxTessEvaluationTextureImageUnits = value;
+ else if (tokenStr == "MaxTessEvaluationUniformComponents")
+ resources->maxTessEvaluationUniformComponents = value;
+ else if (tokenStr == "MaxTessPatchComponents")
+ resources->maxTessPatchComponents = value;
+ else if (tokenStr == "MaxPatchVertices")
+ resources->maxPatchVertices = value;
+ else if (tokenStr == "MaxTessGenLevel")
+ resources->maxTessGenLevel = value;
+ else if (tokenStr == "MaxViewports")
+ resources->maxViewports = value;
+ else if (tokenStr == "MaxVertexAtomicCounters")
+ resources->maxVertexAtomicCounters = value;
+ else if (tokenStr == "MaxTessControlAtomicCounters")
+ resources->maxTessControlAtomicCounters = value;
+ else if (tokenStr == "MaxTessEvaluationAtomicCounters")
+ resources->maxTessEvaluationAtomicCounters = value;
+ else if (tokenStr == "MaxGeometryAtomicCounters")
+ resources->maxGeometryAtomicCounters = value;
+ else if (tokenStr == "MaxFragmentAtomicCounters")
+ resources->maxFragmentAtomicCounters = value;
+ else if (tokenStr == "MaxCombinedAtomicCounters")
+ resources->maxCombinedAtomicCounters = value;
+ else if (tokenStr == "MaxAtomicCounterBindings")
+ resources->maxAtomicCounterBindings = value;
+ else if (tokenStr == "MaxVertexAtomicCounterBuffers")
+ resources->maxVertexAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxTessControlAtomicCounterBuffers")
+ resources->maxTessControlAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers")
+ resources->maxTessEvaluationAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxGeometryAtomicCounterBuffers")
+ resources->maxGeometryAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxFragmentAtomicCounterBuffers")
+ resources->maxFragmentAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxCombinedAtomicCounterBuffers")
+ resources->maxCombinedAtomicCounterBuffers = value;
+ else if (tokenStr == "MaxAtomicCounterBufferSize")
+ resources->maxAtomicCounterBufferSize = value;
+ else if (tokenStr == "MaxTransformFeedbackBuffers")
+ resources->maxTransformFeedbackBuffers = value;
+ else if (tokenStr == "MaxTransformFeedbackInterleavedComponents")
+ resources->maxTransformFeedbackInterleavedComponents = value;
+ else if (tokenStr == "MaxCullDistances")
+ resources->maxCullDistances = value;
+ else if (tokenStr == "MaxCombinedClipAndCullDistances")
+ resources->maxCombinedClipAndCullDistances = value;
+ else if (tokenStr == "MaxSamples")
+ resources->maxSamples = value;
+ else if (tokenStr == "MaxMeshOutputVerticesNV")
+ resources->maxMeshOutputVerticesNV = value;
+ else if (tokenStr == "MaxMeshOutputPrimitivesNV")
+ resources->maxMeshOutputPrimitivesNV = value;
+ else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
+ resources->maxMeshWorkGroupSizeX_NV = value;
+ else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
+ resources->maxMeshWorkGroupSizeY_NV = value;
+ else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
+ resources->maxMeshWorkGroupSizeZ_NV = value;
+ else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
+ resources->maxTaskWorkGroupSizeX_NV = value;
+ else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
+ resources->maxTaskWorkGroupSizeY_NV = value;
+ else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
+ resources->maxTaskWorkGroupSizeZ_NV = value;
+ else if (tokenStr == "MaxMeshViewCountNV")
+ resources->maxMeshViewCountNV = value;
+ else if (tokenStr == "nonInductiveForLoops")
+ resources->limits.nonInductiveForLoops = (value != 0);
+ else if (tokenStr == "whileLoops")
+ resources->limits.whileLoops = (value != 0);
+ else if (tokenStr == "doWhileLoops")
+ resources->limits.doWhileLoops = (value != 0);
+ else if (tokenStr == "generalUniformIndexing")
+ resources->limits.generalUniformIndexing = (value != 0);
+ else if (tokenStr == "generalAttributeMatrixVectorIndexing")
+ resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
+ else if (tokenStr == "generalVaryingIndexing")
+ resources->limits.generalVaryingIndexing = (value != 0);
+ else if (tokenStr == "generalSamplerIndexing")
+ resources->limits.generalSamplerIndexing = (value != 0);
+ else if (tokenStr == "generalVariableIndexing")
+ resources->limits.generalVariableIndexing = (value != 0);
+ else if (tokenStr == "generalConstantMatrixVectorIndexing")
+ resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
+ else
+ printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str());
+
+ }
+}
+
+} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/pch.cpp b/thirdparty/glslang/StandAlone/ResourceLimits.h
index b7a08654a5..736248eb39 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/pch.cpp
+++ b/thirdparty/glslang/StandAlone/ResourceLimits.h
@@ -1,5 +1,6 @@
//
-// Copyright (C) 2018 The Khronos Group Inc.
+// Copyright (C) 2016 Google, Inc.
+//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -14,7 +15,7 @@
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
-// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
@@ -30,6 +31,27 @@
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-//
-#include "pch.h"
+#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+
+#include <string>
+
+#include "../glslang/Include/ResourceLimits.h"
+
+namespace glslang {
+
+// These are the default resources for TBuiltInResources, used for both
+// - parsing this string for the case where the user didn't supply one,
+// - dumping out a template for user construction of a config file.
+extern const TBuiltInResource DefaultTBuiltInResource;
+
+// Returns the DefaultTBuiltInResource as a human-readable string.
+std::string GetDefaultTBuiltInResourceString();
+
+// Decodes the resource limits from |config| to |resources|.
+void DecodeResourceLimits(TBuiltInResource* resources, char* config);
+
+} // end namespace glslang
+
+#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
diff --git a/thirdparty/glslang/glslang/CInterface/glslang_c_interface.cpp b/thirdparty/glslang/glslang/CInterface/glslang_c_interface.cpp
new file mode 100644
index 0000000000..2e04f53ace
--- /dev/null
+++ b/thirdparty/glslang/glslang/CInterface/glslang_c_interface.cpp
@@ -0,0 +1,428 @@
+/**
+ This code is based on the glslang_c_interface implementation by Viktor Latypov
+**/
+
+/**
+BSD 2-Clause License
+
+Copyright (c) 2019, Viktor Latypov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+**/
+
+#include "glslang/Include/glslang_c_interface.h"
+
+#include "StandAlone/DirStackFileIncluder.h"
+#include "StandAlone/ResourceLimits.h"
+#include "glslang/Include/ShHandle.h"
+
+#include "glslang/Include/ResourceLimits.h"
+#include "glslang/MachineIndependent/Versions.h"
+
+static_assert(int(GLSLANG_STAGE_COUNT) == EShLangCount, "");
+static_assert(int(GLSLANG_STAGE_MASK_COUNT) == EShLanguageMaskCount, "");
+static_assert(int(GLSLANG_SOURCE_COUNT) == glslang::EShSourceCount, "");
+static_assert(int(GLSLANG_CLIENT_COUNT) == glslang::EShClientCount, "");
+static_assert(int(GLSLANG_TARGET_COUNT) == glslang::EShTargetCount, "");
+static_assert(int(GLSLANG_TARGET_CLIENT_VERSION_COUNT) == glslang::EShTargetClientVersionCount, "");
+static_assert(int(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT) == glslang::EShTargetLanguageVersionCount, "");
+static_assert(int(GLSLANG_OPT_LEVEL_COUNT) == EshOptLevelCount, "");
+static_assert(int(GLSLANG_TEX_SAMP_TRANS_COUNT) == EShTexSampTransCount, "");
+static_assert(int(GLSLANG_MSG_COUNT) == EShMsgCount, "");
+static_assert(int(GLSLANG_REFLECTION_COUNT) == EShReflectionCount, "");
+static_assert(int(GLSLANG_PROFILE_COUNT) == EProfileCount, "");
+static_assert(sizeof(glslang_limits_t) == sizeof(TLimits), "");
+static_assert(sizeof(glslang_resource_t) == sizeof(TBuiltInResource), "");
+
+typedef struct glslang_shader_s {
+ glslang::TShader* shader;
+ std::string preprocessedGLSL;
+} glslang_shader_t;
+
+typedef struct glslang_program_s {
+ glslang::TProgram* program;
+ std::vector<unsigned int> spirv;
+ std::string loggerMessages;
+} glslang_program_t;
+
+/* Wrapper/Adapter for C glsl_include_callbacks_t functions
+
+ This class contains a 'glsl_include_callbacks_t' structure
+ with C include_local/include_system callback pointers.
+
+ This class implement TShader::Includer interface
+ by redirecting C++ virtual methods to C callbacks.
+
+ The 'IncludeResult' instances produced by this Includer
+ contain a reference to glsl_include_result_t C structure
+ to allow its lifetime management by another C callback
+ (CallbackIncluder::callbacks::free_include_result)
+*/
+class CallbackIncluder : public glslang::TShader::Includer {
+public:
+ /* Wrapper of IncludeResult which stores a glsl_include_result object internally */
+ class CallbackIncludeResult : public glslang::TShader::Includer::IncludeResult {
+ public:
+ CallbackIncludeResult(const std::string& headerName, const char* const headerData, const size_t headerLength,
+ void* userData, glsl_include_result_t* includeResult)
+ : glslang::TShader::Includer::IncludeResult(headerName, headerData, headerLength, userData),
+ includeResult(includeResult)
+ {
+ }
+
+ virtual ~CallbackIncludeResult() {}
+
+ protected:
+ friend class CallbackIncluder;
+
+ glsl_include_result_t* includeResult;
+ };
+
+public:
+ CallbackIncluder(glsl_include_callbacks_t _callbacks, void* _context) : callbacks(_callbacks), context(_context) {}
+
+ virtual ~CallbackIncluder() {}
+
+ virtual IncludeResult* includeSystem(const char* headerName, const char* includerName,
+ size_t inclusionDepth) override
+ {
+ if (this->callbacks.include_system) {
+ glsl_include_result_t* result =
+ this->callbacks.include_system(this->context, headerName, includerName, inclusionDepth);
+
+ return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length,
+ nullptr, result);
+ }
+
+ return glslang::TShader::Includer::includeSystem(headerName, includerName, inclusionDepth);
+ }
+
+ virtual IncludeResult* includeLocal(const char* headerName, const char* includerName,
+ size_t inclusionDepth) override
+ {
+ if (this->callbacks.include_local) {
+ glsl_include_result_t* result =
+ this->callbacks.include_local(this->context, headerName, includerName, inclusionDepth);
+
+ return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length,
+ nullptr, result);
+ }
+
+ return glslang::TShader::Includer::includeLocal(headerName, includerName, inclusionDepth);
+ }
+
+ /* This function only calls free_include_result callback
+ when the IncludeResult instance is allocated by a C function */
+ virtual void releaseInclude(IncludeResult* result) override
+ {
+ if (result == nullptr)
+ return;
+
+ if (this->callbacks.free_include_result && (result->userData == nullptr)) {
+ CallbackIncludeResult* innerResult = static_cast<CallbackIncludeResult*>(result);
+ /* use internal free() function */
+ this->callbacks.free_include_result(this->context, innerResult->includeResult);
+ /* ignore internal fields of TShader::Includer::IncludeResult */
+ delete result;
+ return;
+ }
+
+ delete[] static_cast<char*>(result->userData);
+ delete result;
+ }
+
+private:
+ CallbackIncluder() {}
+
+ /* C callback pointers */
+ glsl_include_callbacks_t callbacks;
+ /* User-defined context */
+ void* context;
+};
+
+GLSLANG_EXPORT int glslang_initialize_process() { return static_cast<int>(glslang::InitializeProcess()); }
+
+GLSLANG_EXPORT void glslang_finalize_process() { glslang::FinalizeProcess(); }
+
+static EShLanguage c_shader_stage(glslang_stage_t stage)
+{
+ switch (stage) {
+ case GLSLANG_STAGE_VERTEX:
+ return EShLangVertex;
+ case GLSLANG_STAGE_TESSCONTROL:
+ return EShLangTessControl;
+ case GLSLANG_STAGE_TESSEVALUATION:
+ return EShLangTessEvaluation;
+ case GLSLANG_STAGE_GEOMETRY:
+ return EShLangGeometry;
+ case GLSLANG_STAGE_FRAGMENT:
+ return EShLangFragment;
+ case GLSLANG_STAGE_COMPUTE:
+ return EShLangCompute;
+ case GLSLANG_STAGE_RAYGEN_NV:
+ return EShLangRayGen;
+ case GLSLANG_STAGE_INTERSECT_NV:
+ return EShLangIntersect;
+ case GLSLANG_STAGE_ANYHIT_NV:
+ return EShLangAnyHit;
+ case GLSLANG_STAGE_CLOSESTHIT_NV:
+ return EShLangClosestHit;
+ case GLSLANG_STAGE_MISS_NV:
+ return EShLangMiss;
+ case GLSLANG_STAGE_CALLABLE_NV:
+ return EShLangCallable;
+ case GLSLANG_STAGE_TASK_NV:
+ return EShLangTaskNV;
+ case GLSLANG_STAGE_MESH_NV:
+ return EShLangMeshNV;
+ default:
+ break;
+ }
+ return EShLangCount;
+}
+
+static int c_shader_messages(glslang_messages_t messages)
+{
+#define CONVERT_MSG(in, out) \
+ if ((messages & in) == in) \
+ res |= out;
+
+ int res = 0;
+
+ CONVERT_MSG(GLSLANG_MSG_RELAXED_ERRORS_BIT, EShMsgRelaxedErrors);
+ CONVERT_MSG(GLSLANG_MSG_SUPPRESS_WARNINGS_BIT, EShMsgSuppressWarnings);
+ CONVERT_MSG(GLSLANG_MSG_AST_BIT, EShMsgAST);
+ CONVERT_MSG(GLSLANG_MSG_SPV_RULES_BIT, EShMsgSpvRules);
+ CONVERT_MSG(GLSLANG_MSG_VULKAN_RULES_BIT, EShMsgVulkanRules);
+ CONVERT_MSG(GLSLANG_MSG_ONLY_PREPROCESSOR_BIT, EShMsgOnlyPreprocessor);
+ CONVERT_MSG(GLSLANG_MSG_READ_HLSL_BIT, EShMsgReadHlsl);
+ CONVERT_MSG(GLSLANG_MSG_CASCADING_ERRORS_BIT, EShMsgCascadingErrors);
+ CONVERT_MSG(GLSLANG_MSG_KEEP_UNCALLED_BIT, EShMsgKeepUncalled);
+ CONVERT_MSG(GLSLANG_MSG_HLSL_OFFSETS_BIT, EShMsgHlslOffsets);
+ CONVERT_MSG(GLSLANG_MSG_DEBUG_INFO_BIT, EShMsgDebugInfo);
+ CONVERT_MSG(GLSLANG_MSG_HLSL_ENABLE_16BIT_TYPES_BIT, EShMsgHlslEnable16BitTypes);
+ CONVERT_MSG(GLSLANG_MSG_HLSL_LEGALIZATION_BIT, EShMsgHlslLegalization);
+ CONVERT_MSG(GLSLANG_MSG_HLSL_DX9_COMPATIBLE_BIT, EShMsgHlslDX9Compatible);
+ CONVERT_MSG(GLSLANG_MSG_BUILTIN_SYMBOL_TABLE_BIT, EShMsgBuiltinSymbolTable);
+ return res;
+#undef CONVERT_MSG
+}
+
+static glslang::EShTargetLanguageVersion
+c_shader_target_language_version(glslang_target_language_version_t target_language_version)
+{
+ switch (target_language_version) {
+ case GLSLANG_TARGET_SPV_1_0:
+ return glslang::EShTargetSpv_1_0;
+ case GLSLANG_TARGET_SPV_1_1:
+ return glslang::EShTargetSpv_1_1;
+ case GLSLANG_TARGET_SPV_1_2:
+ return glslang::EShTargetSpv_1_2;
+ case GLSLANG_TARGET_SPV_1_3:
+ return glslang::EShTargetSpv_1_3;
+ case GLSLANG_TARGET_SPV_1_4:
+ return glslang::EShTargetSpv_1_4;
+ case GLSLANG_TARGET_SPV_1_5:
+ return glslang::EShTargetSpv_1_5;
+ default:
+ break;
+ }
+ return glslang::EShTargetSpv_1_0;
+}
+
+static glslang::EShClient c_shader_client(glslang_client_t client)
+{
+ switch (client) {
+ case GLSLANG_CLIENT_VULKAN:
+ return glslang::EShClientVulkan;
+ case GLSLANG_CLIENT_OPENGL:
+ return glslang::EShClientOpenGL;
+ default:
+ break;
+ }
+
+ return glslang::EShClientNone;
+}
+
+static glslang::EShTargetClientVersion c_shader_client_version(glslang_target_client_version_t client_version)
+{
+ switch (client_version) {
+ case GLSLANG_TARGET_VULKAN_1_1:
+ return glslang::EShTargetVulkan_1_1;
+ case GLSLANG_TARGET_OPENGL_450:
+ return glslang::EShTargetOpenGL_450;
+ default:
+ break;
+ }
+
+ return glslang::EShTargetVulkan_1_0;
+}
+
+static glslang::EShTargetLanguage c_shader_target_language(glslang_target_language_t target_language)
+{
+ if (target_language == GLSLANG_TARGET_NONE)
+ return glslang::EShTargetNone;
+
+ return glslang::EShTargetSpv;
+}
+
+static glslang::EShSource c_shader_source(glslang_source_t source)
+{
+ switch (source) {
+ case GLSLANG_SOURCE_GLSL:
+ return glslang::EShSourceGlsl;
+ case GLSLANG_SOURCE_HLSL:
+ return glslang::EShSourceHlsl;
+ default:
+ break;
+ }
+
+ return glslang::EShSourceNone;
+}
+
+static EProfile c_shader_profile(glslang_profile_t profile)
+{
+ switch (profile) {
+ case GLSLANG_BAD_PROFILE:
+ return EBadProfile;
+ case GLSLANG_NO_PROFILE:
+ return ENoProfile;
+ case GLSLANG_CORE_PROFILE:
+ return ECoreProfile;
+ case GLSLANG_COMPATIBILITY_PROFILE:
+ return ECompatibilityProfile;
+ case GLSLANG_ES_PROFILE:
+ return EEsProfile;
+ case GLSLANG_PROFILE_COUNT: // Should not use this
+ break;
+ }
+
+ return EProfile();
+}
+
+GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input)
+{
+ if (!input || !input->code) {
+ printf("Error creating shader: null input(%p)/input->code\n", input);
+
+ if (input)
+ printf("input->code = %p\n", input->code);
+
+ return nullptr;
+ }
+
+ glslang_shader_t* shader = new glslang_shader_t();
+
+ shader->shader = new glslang::TShader(c_shader_stage(input->stage));
+ shader->shader->setStrings(&input->code, 1);
+ shader->shader->setEnvInput(c_shader_source(input->language), c_shader_stage(input->stage),
+ c_shader_client(input->client), input->default_version);
+ shader->shader->setEnvClient(c_shader_client(input->client), c_shader_client_version(input->client_version));
+ shader->shader->setEnvTarget(c_shader_target_language(input->target_language),
+ c_shader_target_language_version(input->target_language_version));
+
+ return shader;
+}
+
+GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader)
+{
+ return shader->preprocessedGLSL.c_str();
+}
+
+GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input)
+{
+ DirStackFileIncluder Includer;
+ /* TODO: use custom callbacks if they are available in 'i->callbacks' */
+ return shader->shader->preprocess(
+ reinterpret_cast<const TBuiltInResource*>(input->resource),
+ input->default_version,
+ c_shader_profile(input->default_profile),
+ input->force_default_version_and_profile != 0,
+ input->forward_compatible != 0,
+ (EShMessages)c_shader_messages(input->messages),
+ &shader->preprocessedGLSL,
+ Includer
+ );
+}
+
+GLSLANG_EXPORT int glslang_shader_parse(glslang_shader_t* shader, const glslang_input_t* input)
+{
+ const char* preprocessedCStr = shader->preprocessedGLSL.c_str();
+ shader->shader->setStrings(&preprocessedCStr, 1);
+
+ return shader->shader->parse(
+ reinterpret_cast<const TBuiltInResource*>(input->resource),
+ input->default_version,
+ input->forward_compatible != 0,
+ (EShMessages)c_shader_messages(input->messages)
+ );
+}
+
+GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader) { return shader->shader->getInfoLog(); }
+
+GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader) { return shader->shader->getInfoDebugLog(); }
+
+GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader)
+{
+ if (!shader)
+ return;
+
+ delete (shader->shader);
+ delete (shader);
+}
+
+GLSLANG_EXPORT glslang_program_t* glslang_program_create()
+{
+ glslang_program_t* p = new glslang_program_t();
+ p->program = new glslang::TProgram();
+ return p;
+}
+
+GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program)
+{
+ if (!program)
+ return;
+
+ delete (program->program);
+ delete (program);
+}
+
+GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader)
+{
+ program->program->addShader(shader->shader);
+}
+
+GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages)
+{
+ return (int)program->program->link((EShMessages)messages);
+}
+
+GLSLANG_EXPORT const char* glslang_program_get_info_log(glslang_program_t* program)
+{
+ return program->program->getInfoLog();
+}
+
+GLSLANG_EXPORT const char* glslang_program_get_info_debug_log(glslang_program_t* program)
+{
+ return program->program->getInfoDebugLog();
+}
diff --git a/thirdparty/glslang/glslang/Include/BaseTypes.h b/thirdparty/glslang/glslang/Include/BaseTypes.h
index 6d4b4ff8e3..b69eaebf2d 100644
--- a/thirdparty/glslang/glslang/Include/BaseTypes.h
+++ b/thirdparty/glslang/glslang/Include/BaseTypes.h
@@ -2,6 +2,7 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -61,8 +62,9 @@ enum TBasicType {
EbtSampler,
EbtStruct,
EbtBlock,
- EbtAccStructNV,
+ EbtAccStruct,
EbtReference,
+ EbtRayQuery,
// HLSL types that live only temporarily.
EbtString,
@@ -90,11 +92,11 @@ enum TStorageQualifier {
EvqBuffer, // read/write, shared with app
EvqShared, // compute shader's read/write 'shared' qualifier
- EvqPayloadNV,
- EvqPayloadInNV,
- EvqHitAttrNV,
- EvqCallableDataNV,
- EvqCallableDataInNV,
+ EvqPayload,
+ EvqPayloadIn,
+ EvqHitAttr,
+ EvqCallableData,
+ EvqCallableDataIn,
// parameters
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
@@ -229,6 +231,9 @@ enum TBuiltInVariable {
EbvFragSizeEXT,
EbvFragInvocationCountEXT,
+ EbvSecondaryFragDataEXT,
+ EbvSecondaryFragColorEXT,
+
EbvViewportMaskNV,
EbvSecondaryPositionNV,
EbvSecondaryViewportMaskNV,
@@ -238,20 +243,23 @@ enum TBuiltInVariable {
EbvFragmentSizeNV,
EbvInvocationsPerPixelNV,
// ray tracing
- EbvLaunchIdNV,
- EbvLaunchSizeNV,
- EbvInstanceCustomIndexNV,
- EbvWorldRayOriginNV,
- EbvWorldRayDirectionNV,
- EbvObjectRayOriginNV,
- EbvObjectRayDirectionNV,
- EbvRayTminNV,
- EbvRayTmaxNV,
- EbvHitTNV,
- EbvHitKindNV,
- EbvObjectToWorldNV,
- EbvWorldToObjectNV,
- EbvIncomingRayFlagsNV,
+ EbvLaunchId,
+ EbvLaunchSize,
+ EbvInstanceCustomIndex,
+ EbvGeometryIndex,
+ EbvWorldRayOrigin,
+ EbvWorldRayDirection,
+ EbvObjectRayOrigin,
+ EbvObjectRayDirection,
+ EbvRayTmin,
+ EbvRayTmax,
+ EbvHitT,
+ EbvHitKind,
+ EbvObjectToWorld,
+ EbvObjectToWorld3x4,
+ EbvWorldToObject,
+ EbvWorldToObject3x4,
+ EbvIncomingRayFlags,
// barycentrics
EbvBaryCoordNV,
EbvBaryCoordNoPerspNV,
@@ -328,11 +336,11 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
case EvqPointCoord: return "gl_PointCoord"; break;
case EvqFragColor: return "fragColor"; break;
case EvqFragDepth: return "gl_FragDepth"; break;
- case EvqPayloadNV: return "rayPayloadNV"; break;
- case EvqPayloadInNV: return "rayPayloadInNV"; break;
- case EvqHitAttrNV: return "hitAttributeNV"; break;
- case EvqCallableDataNV: return "callableDataNV"; break;
- case EvqCallableDataInNV: return "callableDataInNV"; break;
+ case EvqPayload: return "rayPayloadNV"; break;
+ case EvqPayloadIn: return "rayPayloadInNV"; break;
+ case EvqHitAttr: return "hitAttributeNV"; break;
+ case EvqCallableData: return "callableDataNV"; break;
+ case EvqCallableDataIn: return "callableDataInNV"; break;
default: return "unknown qualifier";
}
}
@@ -428,6 +436,9 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvFragSizeEXT: return "FragSizeEXT";
case EbvFragInvocationCountEXT: return "FragInvocationCountEXT";
+ case EbvSecondaryFragDataEXT: return "SecondaryFragDataEXT";
+ case EbvSecondaryFragColorEXT: return "SecondaryFragColorEXT";
+
case EbvViewportMaskNV: return "ViewportMaskNV";
case EbvSecondaryPositionNV: return "SecondaryPositionNV";
case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
@@ -436,20 +447,21 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
case EbvFragmentSizeNV: return "FragmentSizeNV";
case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV";
- case EbvLaunchIdNV: return "LaunchIdNV";
- case EbvLaunchSizeNV: return "LaunchSizeNV";
- case EbvInstanceCustomIndexNV: return "InstanceCustomIndexNV";
- case EbvWorldRayOriginNV: return "WorldRayOriginNV";
- case EbvWorldRayDirectionNV: return "WorldRayDirectionNV";
- case EbvObjectRayOriginNV: return "ObjectRayOriginNV";
- case EbvObjectRayDirectionNV: return "ObjectRayDirectionNV";
- case EbvRayTminNV: return "ObjectRayTminNV";
- case EbvRayTmaxNV: return "ObjectRayTmaxNV";
- case EbvHitTNV: return "HitTNV";
- case EbvHitKindNV: return "HitKindNV";
- case EbvIncomingRayFlagsNV: return "IncomingRayFlagsNV";
- case EbvObjectToWorldNV: return "ObjectToWorldNV";
- case EbvWorldToObjectNV: return "WorldToObjectNV";
+ case EbvLaunchId: return "LaunchIdNV";
+ case EbvLaunchSize: return "LaunchSizeNV";
+ case EbvInstanceCustomIndex: return "InstanceCustomIndexNV";
+ case EbvGeometryIndex: return "GeometryIndexEXT";
+ case EbvWorldRayOrigin: return "WorldRayOriginNV";
+ case EbvWorldRayDirection: return "WorldRayDirectionNV";
+ case EbvObjectRayOrigin: return "ObjectRayOriginNV";
+ case EbvObjectRayDirection: return "ObjectRayDirectionNV";
+ case EbvRayTmin: return "ObjectRayTminNV";
+ case EbvRayTmax: return "ObjectRayTmaxNV";
+ case EbvHitT: return "HitTNV";
+ case EbvHitKind: return "HitKindNV";
+ case EbvIncomingRayFlags: return "IncomingRayFlagsNV";
+ case EbvObjectToWorld: return "ObjectToWorldNV";
+ case EbvWorldToObject: return "WorldToObjectNV";
case EbvBaryCoordNV: return "BaryCoordNV";
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
diff --git a/thirdparty/glslang/glslang/Include/Common.h b/thirdparty/glslang/glslang/Include/Common.h
index 2c511bc1c5..b628cdc2f0 100644
--- a/thirdparty/glslang/glslang/Include/Common.h
+++ b/thirdparty/glslang/glslang/Include/Common.h
@@ -37,6 +37,17 @@
#ifndef _COMMON_INCLUDED_
#define _COMMON_INCLUDED_
+#include <algorithm>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
+#include <list>
+#include <map>
+#include <set>
+#include <string>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700)
#include <sstream>
@@ -50,9 +61,7 @@ std::string to_string(const T& val) {
}
#endif
-// -- GODOT start --
-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) /* || defined MINGW_HAS_SECURE_API */
-// -- GODOT end --
+#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
#include <basetsd.h>
#ifndef snprintf
#define snprintf sprintf_s
@@ -95,18 +104,6 @@ std::string to_string(const T& val) {
#pragma warning(disable : 4201) // nameless union
#endif
-#include <set>
-#include <unordered_set>
-#include <vector>
-#include <map>
-#include <unordered_map>
-#include <list>
-#include <algorithm>
-#include <string>
-#include <cstdio>
-#include <cstdlib>
-#include <cassert>
-
#include "PoolAlloc.h"
//
diff --git a/thirdparty/glslang/glslang/Include/ConstantUnion.h b/thirdparty/glslang/glslang/Include/ConstantUnion.h
index 76b2d9c08b..c4ffb85771 100644
--- a/thirdparty/glslang/glslang/Include/ConstantUnion.h
+++ b/thirdparty/glslang/glslang/Include/ConstantUnion.h
@@ -921,7 +921,7 @@ public:
else
unionArray = new TConstUnionVector(size);
}
- TConstUnionArray(const TConstUnionArray& a) : unionArray(a.unionArray) { }
+ TConstUnionArray(const TConstUnionArray& a) = default;
TConstUnionArray(const TConstUnionArray& a, int start, int size)
{
unionArray = new TConstUnionVector(size);
diff --git a/thirdparty/glslang/glslang/Include/ResourceLimits.h b/thirdparty/glslang/glslang/Include/ResourceLimits.h
index 106b21d9ca..b670cf163f 100644
--- a/thirdparty/glslang/glslang/Include/ResourceLimits.h
+++ b/thirdparty/glslang/glslang/Include/ResourceLimits.h
@@ -142,6 +142,7 @@ struct TBuiltInResource {
int maxTaskWorkGroupSizeY_NV;
int maxTaskWorkGroupSizeZ_NV;
int maxMeshViewCountNV;
+ int maxDualSourceDrawBuffersEXT;
TLimits limits;
};
diff --git a/thirdparty/glslang/glslang/Include/Types.h b/thirdparty/glslang/glslang/Include/Types.h
index 3572099e3d..235ea3f1d5 100644
--- a/thirdparty/glslang/glslang/Include/Types.h
+++ b/thirdparty/glslang/glslang/Include/Types.h
@@ -3,6 +3,7 @@
// Copyright (C) 2012-2016 LunarG, Inc.
// Copyright (C) 2015-2016 Google, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -472,6 +473,18 @@ enum TInterlockOrdering {
EioCount,
};
+enum TShaderInterface
+{
+ // Includes both uniform blocks and buffer blocks
+ EsiUniform = 0,
+ EsiInput,
+ EsiOutput,
+ EsiNone,
+
+ EsiCount
+};
+
+
class TQualifier {
public:
static const int layoutNotSet = -1;
@@ -532,6 +545,7 @@ public:
queuefamilycoherent = false;
workgroupcoherent = false;
subgroupcoherent = false;
+ shadercallcoherent = false;
nonprivate = false;
volatil = false;
restrict = false;
@@ -553,6 +567,7 @@ public:
// having a constant_id is not sufficient: expressions have no id, but are still specConstant
bool specConstant : 1;
bool nonUniform : 1;
+ bool explicitOffset : 1;
#ifdef GLSLANG_WEB
bool isWriteOnly() const { return false; }
@@ -590,6 +605,7 @@ public:
bool queuefamilycoherent : 1;
bool workgroupcoherent : 1;
bool subgroupcoherent : 1;
+ bool shadercallcoherent : 1;
bool nonprivate : 1;
bool isWriteOnly() const { return writeonly; }
bool isReadOnly() const { return readonly; }
@@ -599,11 +615,11 @@ public:
bool isSample() const { return sample; }
bool isMemory() const
{
- return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
+ return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
}
bool isMemoryQualifierImageAndSSBOOnly() const
{
- return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
+ return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
}
bool bufferReferenceNeedsVulkanMemoryModel() const
{
@@ -773,7 +789,7 @@ public:
layoutViewportRelative = false;
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
layoutSecondaryViewportRelativeOffset = -2048;
- layoutShaderRecordNV = false;
+ layoutShaderRecord = false;
layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd;
layoutFormat = ElfNone;
#endif
@@ -812,7 +828,7 @@ public:
hasAnyLocation() ||
hasStream() ||
hasFormat() ||
- isShaderRecordNV() ||
+ isShaderRecord() ||
isPushConstant() ||
hasBufferReference();
}
@@ -871,7 +887,7 @@ public:
bool layoutPassthrough;
bool layoutViewportRelative;
int layoutSecondaryViewportRelativeOffset;
- bool layoutShaderRecordNV;
+ bool layoutShaderRecord;
#endif
bool hasUniformLayout() const
@@ -942,7 +958,7 @@ public:
bool hasAttachment() const { return false; }
TLayoutFormat getFormat() const { return ElfNone; }
bool isPushConstant() const { return false; }
- bool isShaderRecordNV() const { return false; }
+ bool isShaderRecord() const { return false; }
bool hasBufferReference() const { return false; }
bool hasBufferReferenceAlign() const { return false; }
bool isNonUniform() const { return false; }
@@ -993,7 +1009,7 @@ public:
}
TLayoutFormat getFormat() const { return layoutFormat; }
bool isPushConstant() const { return layoutPushConstant; }
- bool isShaderRecordNV() const { return layoutShaderRecordNV; }
+ bool isShaderRecord() const { return layoutShaderRecord; }
bool hasBufferReference() const { return layoutBufferReference; }
bool hasBufferReferenceAlign() const
{
@@ -1219,6 +1235,7 @@ struct TShaderQualifiers {
bool layoutDerivativeGroupQuads; // true if layout derivative_group_quadsNV set
bool layoutDerivativeGroupLinear; // true if layout derivative_group_linearNV set
int primitives; // mesh shader "max_primitives"DerivativeGroupLinear; // true if layout derivative_group_linearNV set
+ bool layoutPrimitiveCulling; // true if layout primitive_culling set
TLayoutDepth getDepth() const { return layoutDepth; }
#else
TLayoutDepth getDepth() const { return EldNone; }
@@ -1252,6 +1269,7 @@ struct TShaderQualifiers {
layoutOverrideCoverage = false;
layoutDerivativeGroupQuads = false;
layoutDerivativeGroupLinear = false;
+ layoutPrimitiveCulling = false;
primitives = TQualifier::layoutNotSet;
interlockOrdering = EioNone;
#endif
@@ -1315,6 +1333,8 @@ struct TShaderQualifiers {
primitives = src.primitives;
if (src.interlockOrdering != EioNone)
interlockOrdering = src.interlockOrdering;
+ if (src.layoutPrimitiveCulling)
+ layoutPrimitiveCulling = src.layoutPrimitiveCulling;
#endif
}
};
@@ -1612,6 +1632,23 @@ public:
assert(fieldName);
return *fieldName;
}
+ TShaderInterface getShaderInterface() const
+ {
+ if (basicType != EbtBlock)
+ return EsiNone;
+
+ switch (qualifier.storage) {
+ default:
+ return EsiNone;
+ case EvqVaryingIn:
+ return EsiInput;
+ case EvqVaryingOut:
+ return EsiOutput;
+ case EvqUniform:
+ case EvqBuffer:
+ return EsiUniform;
+ }
+ }
virtual TBasicType getBasicType() const { return basicType; }
virtual const TSampler& getSampler() const { return sampler; }
@@ -1670,7 +1707,7 @@ public:
}
virtual bool isOpaque() const { return basicType == EbtSampler
#ifndef GLSLANG_WEB
- || basicType == EbtAtomicUint || basicType == EbtAccStructNV
+ || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
#endif
; }
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
@@ -1946,7 +1983,8 @@ public:
case EbtAtomicUint: return "atomic_uint";
case EbtStruct: return "structure";
case EbtBlock: return "block";
- case EbtAccStructNV: return "accelerationStructureNV";
+ case EbtAccStruct: return "accelerationStructureNV";
+ case EbtRayQuery: return "rayQueryEXT";
case EbtReference: return "reference";
#endif
default: return "unknown type";
@@ -2056,7 +2094,7 @@ public:
appendStr(" layoutSecondaryViewportRelativeOffset=");
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
}
- if (qualifier.layoutShaderRecordNV)
+ if (qualifier.layoutShaderRecord)
appendStr(" shaderRecordNV");
appendStr(")");
@@ -2099,6 +2137,8 @@ public:
appendStr(" workgroupcoherent");
if (qualifier.subgroupcoherent)
appendStr(" subgroupcoherent");
+ if (qualifier.shadercallcoherent)
+ appendStr(" shadercallcoherent");
if (qualifier.nonprivate)
appendStr(" nonprivate");
if (qualifier.volatil)
diff --git a/thirdparty/glslang/glslang/Include/glslang_c_interface.h b/thirdparty/glslang/glslang/Include/glslang_c_interface.h
new file mode 100644
index 0000000000..4b32e2b85f
--- /dev/null
+++ b/thirdparty/glslang/glslang/Include/glslang_c_interface.h
@@ -0,0 +1,249 @@
+/**
+ This code is based on the glslang_c_interface implementation by Viktor Latypov
+**/
+
+/**
+BSD 2-Clause License
+
+Copyright (c) 2019, Viktor Latypov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+**/
+
+#ifndef GLSLANG_C_IFACE_H_INCLUDED
+#define GLSLANG_C_IFACE_H_INCLUDED
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+#include "glslang_c_shader_types.h"
+
+typedef struct glslang_shader_s glslang_shader_t;
+typedef struct glslang_program_s glslang_program_t;
+
+/* TLimits counterpart */
+typedef struct glslang_limits_s {
+ bool non_inductive_for_loops;
+ bool while_loops;
+ bool do_while_loops;
+ bool general_uniform_indexing;
+ bool general_attribute_matrix_vector_indexing;
+ bool general_varying_indexing;
+ bool general_sampler_indexing;
+ bool general_variable_indexing;
+ bool general_constant_matrix_vector_indexing;
+} glslang_limits_t;
+
+/* TBuiltInResource counterpart */
+typedef struct glslang_resource_s {
+ int max_lights;
+ int max_clip_planes;
+ int max_texture_units;
+ int max_texture_coords;
+ int max_vertex_attribs;
+ int max_vertex_uniform_components;
+ int max_varying_floats;
+ int max_vertex_texture_image_units;
+ int max_combined_texture_image_units;
+ int max_texture_image_units;
+ int max_fragment_uniform_components;
+ int max_draw_buffers;
+ int max_vertex_uniform_vectors;
+ int max_varying_vectors;
+ int max_fragment_uniform_vectors;
+ int max_vertex_output_vectors;
+ int max_fragment_input_vectors;
+ int min_program_texel_offset;
+ int max_program_texel_offset;
+ int max_clip_distances;
+ int max_compute_work_group_count_x;
+ int max_compute_work_group_count_y;
+ int max_compute_work_group_count_z;
+ int max_compute_work_group_size_x;
+ int max_compute_work_group_size_y;
+ int max_compute_work_group_size_z;
+ int max_compute_uniform_components;
+ int max_compute_texture_image_units;
+ int max_compute_image_uniforms;
+ int max_compute_atomic_counters;
+ int max_compute_atomic_counter_buffers;
+ int max_varying_components;
+ int max_vertex_output_components;
+ int max_geometry_input_components;
+ int max_geometry_output_components;
+ int max_fragment_input_components;
+ int max_image_units;
+ int max_combined_image_units_and_fragment_outputs;
+ int max_combined_shader_output_resources;
+ int max_image_samples;
+ int max_vertex_image_uniforms;
+ int max_tess_control_image_uniforms;
+ int max_tess_evaluation_image_uniforms;
+ int max_geometry_image_uniforms;
+ int max_fragment_image_uniforms;
+ int max_combined_image_uniforms;
+ int max_geometry_texture_image_units;
+ int max_geometry_output_vertices;
+ int max_geometry_total_output_components;
+ int max_geometry_uniform_components;
+ int max_geometry_varying_components;
+ int max_tess_control_input_components;
+ int max_tess_control_output_components;
+ int max_tess_control_texture_image_units;
+ int max_tess_control_uniform_components;
+ int max_tess_control_total_output_components;
+ int max_tess_evaluation_input_components;
+ int max_tess_evaluation_output_components;
+ int max_tess_evaluation_texture_image_units;
+ int max_tess_evaluation_uniform_components;
+ int max_tess_patch_components;
+ int max_patch_vertices;
+ int max_tess_gen_level;
+ int max_viewports;
+ int max_vertex_atomic_counters;
+ int max_tess_control_atomic_counters;
+ int max_tess_evaluation_atomic_counters;
+ int max_geometry_atomic_counters;
+ int max_fragment_atomic_counters;
+ int max_combined_atomic_counters;
+ int max_atomic_counter_bindings;
+ int max_vertex_atomic_counter_buffers;
+ int max_tess_control_atomic_counter_buffers;
+ int max_tess_evaluation_atomic_counter_buffers;
+ int max_geometry_atomic_counter_buffers;
+ int max_fragment_atomic_counter_buffers;
+ int max_combined_atomic_counter_buffers;
+ int max_atomic_counter_buffer_size;
+ int max_transform_feedback_buffers;
+ int max_transform_feedback_interleaved_components;
+ int max_cull_distances;
+ int max_combined_clip_and_cull_distances;
+ int max_samples;
+ int max_mesh_output_vertices_nv;
+ int max_mesh_output_primitives_nv;
+ int max_mesh_work_group_size_x_nv;
+ int max_mesh_work_group_size_y_nv;
+ int max_mesh_work_group_size_z_nv;
+ int max_task_work_group_size_x_nv;
+ int max_task_work_group_size_y_nv;
+ int max_task_work_group_size_z_nv;
+ int max_mesh_view_count_nv;
+ int maxDualSourceDrawBuffersEXT;
+
+ glslang_limits_t limits;
+} glslang_resource_t;
+
+typedef struct glslang_input_s {
+ glslang_source_t language;
+ glslang_stage_t stage;
+ glslang_client_t client;
+ glslang_target_client_version_t client_version;
+ glslang_target_language_t target_language;
+ glslang_target_language_version_t target_language_version;
+ /** Shader source code */
+ const char* code;
+ int default_version;
+ glslang_profile_t default_profile;
+ int force_default_version_and_profile;
+ int forward_compatible;
+ glslang_messages_t messages;
+ const glslang_resource_t* resource;
+} glslang_input_t;
+
+/* Inclusion result structure allocated by C include_local/include_system callbacks */
+typedef struct glsl_include_result_s {
+ /* Header file name or NULL if inclusion failed */
+ const char* header_name;
+
+ /* Header contents or NULL */
+ const char* header_data;
+ size_t header_length;
+
+} glsl_include_result_t;
+
+/* Callback for local file inclusion */
+typedef glsl_include_result_t* (*glsl_include_local_func)(void* ctx, const char* header_name, const char* includer_name,
+ size_t include_depth);
+
+/* Callback for system file inclusion */
+typedef glsl_include_result_t* (*glsl_include_system_func)(void* ctx, const char* header_name,
+ const char* includer_name, size_t include_depth);
+
+/* Callback for include result destruction */
+typedef int (*glsl_free_include_result_func)(void* ctx, glsl_include_result_t* result);
+
+/* Collection of callbacks for GLSL preprocessor */
+typedef struct glsl_include_callbacks_s {
+ glsl_include_system_func include_system;
+ glsl_include_local_func include_local;
+ glsl_free_include_result_func free_include_result;
+} glsl_include_callbacks_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef GLSLANG_IS_SHARED_LIBRARY
+ #ifdef _WIN32
+ #ifdef GLSLANG_EXPORTING
+ #define GLSLANG_EXPORT __declspec(dllexport)
+ #else
+ #define GLSLANG_EXPORT __declspec(dllimport)
+ #endif
+ #elif __GNUC__ >= 4
+ #define GLSLANG_EXPORT __attribute__((visibility("default")))
+ #endif
+#endif // GLSLANG_IS_SHARED_LIBRARY
+
+#ifndef GLSLANG_EXPORT
+#define GLSLANG_EXPORT
+#endif
+
+GLSLANG_EXPORT int glslang_initialize_process();
+GLSLANG_EXPORT void glslang_finalize_process();
+
+GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input);
+GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader);
+GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input);
+GLSLANG_EXPORT int glslang_shader_parse(glslang_shader_t* shader, const glslang_input_t* input);
+GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader);
+GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader);
+GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader);
+
+GLSLANG_EXPORT glslang_program_t* glslang_program_create();
+GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program);
+GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader);
+GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t
+GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage);
+GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program);
+GLSLANG_EXPORT void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int*);
+GLSLANG_EXPORT unsigned int* glslang_program_SPIRV_get_ptr(glslang_program_t* program);
+GLSLANG_EXPORT const char* glslang_program_SPIRV_get_messages(glslang_program_t* program);
+GLSLANG_EXPORT const char* glslang_program_get_info_log(glslang_program_t* program);
+GLSLANG_EXPORT const char* glslang_program_get_info_debug_log(glslang_program_t* program);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifdef GLSLANG_C_IFACE_INCLUDED */
diff --git a/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h
new file mode 100644
index 0000000000..d01a115f69
--- /dev/null
+++ b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h
@@ -0,0 +1,185 @@
+/**
+ This code is based on the glslang_c_interface implementation by Viktor Latypov
+**/
+
+/**
+BSD 2-Clause License
+
+Copyright (c) 2019, Viktor Latypov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+**/
+
+#ifndef C_SHADER_TYPES_H_INCLUDED
+#define C_SHADER_TYPES_H_INCLUDED
+
+#define LAST_ELEMENT_MARKER(x) x
+
+/* EShLanguage counterpart */
+typedef enum {
+ GLSLANG_STAGE_VERTEX,
+ GLSLANG_STAGE_TESSCONTROL,
+ GLSLANG_STAGE_TESSEVALUATION,
+ GLSLANG_STAGE_GEOMETRY,
+ GLSLANG_STAGE_FRAGMENT,
+ GLSLANG_STAGE_COMPUTE,
+ GLSLANG_STAGE_RAYGEN_NV,
+ GLSLANG_STAGE_INTERSECT_NV,
+ GLSLANG_STAGE_ANYHIT_NV,
+ GLSLANG_STAGE_CLOSESTHIT_NV,
+ GLSLANG_STAGE_MISS_NV,
+ GLSLANG_STAGE_CALLABLE_NV,
+ GLSLANG_STAGE_TASK_NV,
+ GLSLANG_STAGE_MESH_NV,
+ LAST_ELEMENT_MARKER(GLSLANG_STAGE_COUNT),
+} glslang_stage_t; // would be better as stage, but this is ancient now
+
+/* EShLanguageMask counterpart */
+typedef enum {
+ GLSLANG_STAGE_VERTEX_MASK = (1 << GLSLANG_STAGE_VERTEX),
+ GLSLANG_STAGE_TESSCONTROL_MASK = (1 << GLSLANG_STAGE_TESSCONTROL),
+ GLSLANG_STAGE_TESSEVALUATION_MASK = (1 << GLSLANG_STAGE_TESSEVALUATION),
+ GLSLANG_STAGE_GEOMETRY_MASK = (1 << GLSLANG_STAGE_GEOMETRY),
+ GLSLANG_STAGE_FRAGMENT_MASK = (1 << GLSLANG_STAGE_FRAGMENT),
+ GLSLANG_STAGE_COMPUTE_MASK = (1 << GLSLANG_STAGE_COMPUTE),
+ GLSLANG_STAGE_RAYGEN_NV_MASK = (1 << GLSLANG_STAGE_RAYGEN_NV),
+ GLSLANG_STAGE_INTERSECT_NV_MASK = (1 << GLSLANG_STAGE_INTERSECT_NV),
+ GLSLANG_STAGE_ANYHIT_NV_MASK = (1 << GLSLANG_STAGE_ANYHIT_NV),
+ GLSLANG_STAGE_CLOSESTHIT_NV_MASK = (1 << GLSLANG_STAGE_CLOSESTHIT_NV),
+ GLSLANG_STAGE_MISS_NV_MASK = (1 << GLSLANG_STAGE_MISS_NV),
+ GLSLANG_STAGE_CALLABLE_NV_MASK = (1 << GLSLANG_STAGE_CALLABLE_NV),
+ GLSLANG_STAGE_TASK_NV_MASK = (1 << GLSLANG_STAGE_TASK_NV),
+ GLSLANG_STAGE_MESH_NV_MASK = (1 << GLSLANG_STAGE_MESH_NV),
+ LAST_ELEMENT_MARKER(GLSLANG_STAGE_MASK_COUNT),
+} glslang_stage_mask_t;
+
+/* EShSource counterpart */
+typedef enum {
+ GLSLANG_SOURCE_NONE,
+ GLSLANG_SOURCE_GLSL,
+ GLSLANG_SOURCE_HLSL,
+ LAST_ELEMENT_MARKER(GLSLANG_SOURCE_COUNT),
+} glslang_source_t;
+
+/* EShClient counterpart */
+typedef enum {
+ GLSLANG_CLIENT_NONE,
+ GLSLANG_CLIENT_VULKAN,
+ GLSLANG_CLIENT_OPENGL,
+ LAST_ELEMENT_MARKER(GLSLANG_CLIENT_COUNT),
+} glslang_client_t;
+
+/* EShTargetLanguage counterpart */
+typedef enum {
+ GLSLANG_TARGET_NONE,
+ GLSLANG_TARGET_SPV,
+ LAST_ELEMENT_MARKER(GLSLANG_TARGET_COUNT),
+} glslang_target_language_t;
+
+/* SH_TARGET_ClientVersion counterpart */
+typedef enum {
+ GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
+ GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
+ GLSLANG_TARGET_OPENGL_450 = 450,
+ LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT),
+} glslang_target_client_version_t;
+
+/* SH_TARGET_LanguageVersion counterpart */
+typedef enum {
+ GLSLANG_TARGET_SPV_1_0 = (1 << 16),
+ GLSLANG_TARGET_SPV_1_1 = (1 << 16) | (1 << 8),
+ GLSLANG_TARGET_SPV_1_2 = (1 << 16) | (2 << 8),
+ GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
+ GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
+ GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
+ LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT),
+} glslang_target_language_version_t;
+
+/* EShExecutable counterpart */
+typedef enum { GLSLANG_EX_VERTEX_FRAGMENT, GLSLANG_EX_FRAGMENT } glslang_executable_t;
+
+/* EShOptimizationLevel counterpart */
+typedef enum {
+ GLSLANG_OPT_NO_GENERATION,
+ GLSLANG_OPT_NONE,
+ GLSLANG_OPT_SIMPLE,
+ GLSLANG_OPT_FULL,
+ LAST_ELEMENT_MARKER(GLSLANG_OPT_LEVEL_COUNT),
+} glslang_optimization_level_t;
+
+/* EShTextureSamplerTransformMode counterpart */
+typedef enum {
+ GLSLANG_TEX_SAMP_TRANS_KEEP,
+ GLSLANG_TEX_SAMP_TRANS_UPGRADE_TEXTURE_REMOVE_SAMPLER,
+ LAST_ELEMENT_MARKER(GLSLANG_TEX_SAMP_TRANS_COUNT),
+} glslang_texture_sampler_transform_mode_t;
+
+/* EShMessages counterpart */
+typedef enum {
+ GLSLANG_MSG_DEFAULT_BIT = 0,
+ GLSLANG_MSG_RELAXED_ERRORS_BIT = (1 << 0),
+ GLSLANG_MSG_SUPPRESS_WARNINGS_BIT = (1 << 1),
+ GLSLANG_MSG_AST_BIT = (1 << 2),
+ GLSLANG_MSG_SPV_RULES_BIT = (1 << 3),
+ GLSLANG_MSG_VULKAN_RULES_BIT = (1 << 4),
+ GLSLANG_MSG_ONLY_PREPROCESSOR_BIT = (1 << 5),
+ GLSLANG_MSG_READ_HLSL_BIT = (1 << 6),
+ GLSLANG_MSG_CASCADING_ERRORS_BIT = (1 << 7),
+ GLSLANG_MSG_KEEP_UNCALLED_BIT = (1 << 8),
+ GLSLANG_MSG_HLSL_OFFSETS_BIT = (1 << 9),
+ GLSLANG_MSG_DEBUG_INFO_BIT = (1 << 10),
+ GLSLANG_MSG_HLSL_ENABLE_16BIT_TYPES_BIT = (1 << 11),
+ GLSLANG_MSG_HLSL_LEGALIZATION_BIT = (1 << 12),
+ GLSLANG_MSG_HLSL_DX9_COMPATIBLE_BIT = (1 << 13),
+ GLSLANG_MSG_BUILTIN_SYMBOL_TABLE_BIT = (1 << 14),
+ LAST_ELEMENT_MARKER(GLSLANG_MSG_COUNT),
+} glslang_messages_t;
+
+/* EShReflectionOptions counterpart */
+typedef enum {
+ GLSLANG_REFLECTION_DEFAULT_BIT = 0,
+ GLSLANG_REFLECTION_STRICT_ARRAY_SUFFIX_BIT = (1 << 0),
+ GLSLANG_REFLECTION_BASIC_ARRAY_SUFFIX_BIT = (1 << 1),
+ GLSLANG_REFLECTION_INTERMEDIATE_IOO_BIT = (1 << 2),
+ GLSLANG_REFLECTION_SEPARATE_BUFFERS_BIT = (1 << 3),
+ GLSLANG_REFLECTION_ALL_BLOCK_VARIABLES_BIT = (1 << 4),
+ GLSLANG_REFLECTION_UNWRAP_IO_BLOCKS_BIT = (1 << 5),
+ GLSLANG_REFLECTION_ALL_IO_VARIABLES_BIT = (1 << 6),
+ GLSLANG_REFLECTION_SHARED_STD140_SSBO_BIT = (1 << 7),
+ GLSLANG_REFLECTION_SHARED_STD140_UBO_BIT = (1 << 8),
+ LAST_ELEMENT_MARKER(GLSLANG_REFLECTION_COUNT),
+} glslang_reflection_options_t;
+
+/* EProfile counterpart (from Versions.h) */
+typedef enum {
+ GLSLANG_BAD_PROFILE = 0,
+ GLSLANG_NO_PROFILE = (1 << 0),
+ GLSLANG_CORE_PROFILE = (1 << 1),
+ GLSLANG_COMPATIBILITY_PROFILE = (1 << 2),
+ GLSLANG_ES_PROFILE = (1 << 3),
+ LAST_ELEMENT_MARKER(GLSLANG_PROFILE_COUNT),
+} glslang_profile_t;
+
+#undef LAST_ELEMENT_MARKER
+
+#endif
diff --git a/thirdparty/glslang/glslang/Include/intermediate.h b/thirdparty/glslang/glslang/Include/intermediate.h
index 29d58ca635..30cb6fb171 100644
--- a/thirdparty/glslang/glslang/Include/intermediate.h
+++ b/thirdparty/glslang/glslang/Include/intermediate.h
@@ -2,6 +2,7 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2016 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -621,6 +622,8 @@ enum TOperator {
EOpIsHelperInvocation,
+ EOpDebugPrintf,
+
//
// Branch
//
@@ -908,12 +911,41 @@ enum TOperator {
EOpAverageRounded,
EOpMul32x16,
- EOpTraceNV,
- EOpReportIntersectionNV,
- EOpIgnoreIntersectionNV,
- EOpTerminateRayNV,
- EOpExecuteCallableNV,
+ EOpTrace,
+ EOpReportIntersection,
+ EOpIgnoreIntersection,
+ EOpTerminateRay,
+ EOpExecuteCallable,
EOpWritePackedPrimitiveIndices4x8NV,
+
+ //
+ // GL_EXT_ray_query operations
+ //
+
+ EOpRayQueryInitialize,
+ EOpRayQueryTerminate,
+ EOpRayQueryGenerateIntersection,
+ EOpRayQueryConfirmIntersection,
+ EOpRayQueryProceed,
+ EOpRayQueryGetIntersectionType,
+ EOpRayQueryGetRayTMin,
+ EOpRayQueryGetRayFlags,
+ EOpRayQueryGetIntersectionT,
+ EOpRayQueryGetIntersectionInstanceCustomIndex,
+ EOpRayQueryGetIntersectionInstanceId,
+ EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset,
+ EOpRayQueryGetIntersectionGeometryIndex,
+ EOpRayQueryGetIntersectionPrimitiveIndex,
+ EOpRayQueryGetIntersectionBarycentrics,
+ EOpRayQueryGetIntersectionFrontFace,
+ EOpRayQueryGetIntersectionCandidateAABBOpaque,
+ EOpRayQueryGetIntersectionObjectRayDirection,
+ EOpRayQueryGetIntersectionObjectRayOrigin,
+ EOpRayQueryGetWorldRayDirection,
+ EOpRayQueryGetWorldRayOrigin,
+ EOpRayQueryGetIntersectionObjectToWorld,
+ EOpRayQueryGetIntersectionWorldToObject,
+
//
// HLSL operations
//
@@ -1199,6 +1231,7 @@ public:
TOperator getFlowOp() const { return flowOp; }
TIntermTyped* getExpression() const { return expression; }
void setExpression(TIntermTyped* pExpression) { expression = pExpression; }
+ void updatePrecision(TPrecisionQualifier parentPrecision);
protected:
TOperator flowOp;
TIntermTyped* expression;
diff --git a/thirdparty/glslang/glslang/Include/revision.h b/thirdparty/glslang/glslang/Include/revision.h
deleted file mode 100644
index a0e4b2066c..0000000000
--- a/thirdparty/glslang/glslang/Include/revision.h
+++ /dev/null
@@ -1,3 +0,0 @@
-// This header is generated by the make-revision script.
-
-#define GLSLANG_PATCH_LEVEL 3559
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
index 98c2666fbb..e21cf427f0 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
@@ -2,7 +2,7 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
-// Copyright (C) 2018 Google, Inc.
+// Copyright (C) 2018-2020 Google, Inc.
//
// All rights reserved.
//
@@ -1012,6 +1012,7 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
case EOpMin:
case EOpMax:
case EOpMix:
+ case EOpMod:
case EOpClamp:
case EOpLessThan:
case EOpGreaterThan:
@@ -1074,6 +1075,14 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
case EOpPow:
newConstArray[comp].setDConst(pow(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()));
break;
+ case EOpMod:
+ {
+ double arg0 = childConstUnions[0][arg0comp].getDConst();
+ double arg1 = childConstUnions[1][arg1comp].getDConst();
+ double result = arg0 - arg1 * floor(arg0 / arg1);
+ newConstArray[comp].setDConst(result);
+ break;
+ }
case EOpMin:
switch(children[0]->getAsTyped()->getBasicType()) {
case EbtFloat16:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
index de55742649..8d5d04fb43 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
@@ -1,8 +1,9 @@
//
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2016 LunarG, Inc.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -125,8 +126,6 @@ enum ArgClass {
};
// Mixtures of the above, to help the function tables
const ArgClass ClassV1FIOCV = (ArgClass)(ClassV1 | ClassFIO | ClassCV);
-const ArgClass ClassV1FOCV = (ArgClass)(ClassV1 | ClassFO | ClassCV);
-const ArgClass ClassV1CV = (ArgClass)(ClassV1 | ClassCV);
const ArgClass ClassBNS = (ArgClass)(ClassB | ClassNS);
const ArgClass ClassRSNS = (ArgClass)(ClassRS | ClassNS);
@@ -147,17 +146,21 @@ EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECo
// Declare pointers to put into the table for versioning.
#ifdef GLSLANG_WEB
const Versioning* Es300Desktop130 = nullptr;
- const Versioning* Es310Desktop430 = nullptr;
+ const Versioning* Es310Desktop420 = nullptr;
+#elif defined(GLSLANG_ANGLE)
+ const Versioning* Es300Desktop130 = nullptr;
+ const Versioning* Es310Desktop420 = nullptr;
+ const Versioning* Es310Desktop450 = nullptr;
#else
const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr },
{ EDesktopProfile, 0, 130, 0, nullptr },
{ EBadProfile } };
const Versioning* Es300Desktop130 = &Es300Desktop130Version[0];
- const Versioning Es310Desktop430Version[] = { { EEsProfile, 0, 310, 0, nullptr },
- { EDesktopProfile, 0, 430, 0, nullptr },
+ const Versioning Es310Desktop420Version[] = { { EEsProfile, 0, 310, 0, nullptr },
+ { EDesktopProfile, 0, 420, 0, nullptr },
{ EBadProfile } };
- const Versioning* Es310Desktop430 = &Es310Desktop430Version[0];
+ const Versioning* Es310Desktop420 = &Es310Desktop420Version[0];
const Versioning Es310Desktop450Version[] = { { EEsProfile, 0, 310, 0, nullptr },
{ EDesktopProfile, 0, 450, 0, nullptr },
@@ -257,14 +260,14 @@ const BuiltInFunction BaseFunctions[] = {
{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
{ EOpVectorEqual, "equal", 2, TypeU, ClassBNS, Es300Desktop130 },
{ EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
- { EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop430 },
- { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop430 },
+ { EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
+ { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop420 },
#ifndef GLSLANG_WEB
{ EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 },
{ EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 },
@@ -416,7 +419,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
// See if the tabled versioning information allows the current version.
bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */)
{
-#ifdef GLSLANG_WEB
+#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
// all entries in table are valid
return true;
#endif
@@ -500,7 +503,7 @@ TBuiltIns::TBuiltIns()
prefixes[EbtFloat] = "";
prefixes[EbtInt] = "i";
prefixes[EbtUint] = "u";
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
prefixes[EbtFloat16] = "f16";
prefixes[EbtInt8] = "i8";
prefixes[EbtUint8] = "u8";
@@ -517,7 +520,9 @@ TBuiltIns::TBuiltIns()
dimMap[Esd3D] = 3;
dimMap[EsdCube] = 3;
#ifndef GLSLANG_WEB
+#ifndef GLSLANG_ANGLE
dimMap[Esd1D] = 1;
+#endif
dimMap[EsdRect] = 2;
dimMap[EsdBuffer] = 1;
dimMap[EsdSubpass] = 2; // potentially unused for now
@@ -542,6 +547,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
+#elif defined(GLSLANG_ANGLE)
+ version = 450;
+ profile = ECoreProfile;
#endif
addTabledBuiltins(version, profile, spvVersion);
@@ -587,6 +595,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec4 fwidthCoarse(vec4 p);"
);
+#ifndef GLSLANG_ANGLE
TString derivativesAndControl16bits (
"float16_t dFdx(float16_t);"
"f16vec2 dFdx(f16vec2);"
@@ -1174,6 +1183,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n"
);
}
+#endif // !GLSLANG_ANGLE
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 430)) {
@@ -1211,6 +1221,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 440) {
commonBuiltins.append(
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
@@ -1242,11 +1253,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
+ " float atomicAdd(coherent volatile inout float, float);"
+ " float atomicAdd(coherent volatile inout float, float, int, int, int);"
+ " double atomicAdd(coherent volatile inout double, double);"
+ " double atomicAdd(coherent volatile inout double, double, int, int, int);"
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t);"
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
+ " float atomicExchange(coherent volatile inout float, float);"
+ " float atomicExchange(coherent volatile inout float, float, int, int, int);"
+ " double atomicExchange(coherent volatile inout double, double);"
+ " double atomicExchange(coherent volatile inout double, double, int, int, int);"
"uint64_t atomicCompSwap(coherent volatile inout uint64_t, uint64_t, uint64_t);"
" int64_t atomicCompSwap(coherent volatile inout int64_t, int64_t, int64_t);"
@@ -1255,15 +1274,20 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
+ " float atomicLoad(coherent volatile in float, int, int, int);"
+ " double atomicLoad(coherent volatile in double, int, int, int);"
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
+ "void atomicStore(coherent volatile out float, float, int, int, int);"
+ "void atomicStore(coherent volatile out double, double, int, int, int);"
"\n");
}
-#endif
+#endif // !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
if ((profile == EEsProfile && version >= 300) ||
- (profile != EEsProfile && version >= 330)) {
+ (profile != EEsProfile && version >= 150)) { // GL_ARB_shader_bit_encoding
commonBuiltins.append(
"int floatBitsToInt(highp float value);"
"ivec2 floatBitsToInt(highp vec2 value);"
@@ -1300,6 +1324,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double fma(double, double, double);"
@@ -1308,6 +1333,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"dvec4 fma(dvec4, dvec4, dvec4 );"
"\n");
}
+#endif
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 400)) {
@@ -1325,6 +1351,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
commonBuiltins.append(
"double frexp(double, out int);"
@@ -1343,9 +1370,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
#endif
+#endif
if ((profile == EEsProfile && version >= 300) ||
- (profile != EEsProfile && version >= 400)) {
+ (profile != EEsProfile && version >= 150)) {
commonBuiltins.append(
"highp uint packUnorm2x16(vec2);"
"vec2 unpackUnorm2x16(highp uint);"
@@ -1353,7 +1381,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
if ((profile == EEsProfile && version >= 300) ||
- (profile != EEsProfile && version >= 420)) {
+ (profile != EEsProfile && version >= 150)) {
commonBuiltins.append(
"highp uint packSnorm2x16(vec2);"
" vec2 unpackSnorm2x16(highp uint);"
@@ -1365,7 +1393,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append(
"mediump vec2 unpackHalf2x16(highp uint);"
"\n");
- } else if (profile != EEsProfile && version >= 420) {
+ } else if (profile != EEsProfile && version >= 150) {
commonBuiltins.append(
" vec2 unpackHalf2x16(highp uint);"
"\n");
@@ -1373,7 +1401,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
#ifndef GLSLANG_WEB
if ((profile == EEsProfile && version >= 310) ||
- (profile != EEsProfile && version >= 400)) {
+ (profile != EEsProfile && version >= 150)) {
commonBuiltins.append(
"highp uint packSnorm4x8(vec4);"
"highp uint packUnorm4x8(vec4);"
@@ -1385,7 +1413,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"mediump vec4 unpackSnorm4x8(highp uint);"
"mediump vec4 unpackUnorm4x8(highp uint);"
"\n");
- } else if (profile != EEsProfile && version >= 400) {
+ } else if (profile != EEsProfile && version >= 150) {
commonBuiltins.append(
"vec4 unpackSnorm4x8(highp uint);"
"vec4 unpackUnorm4x8(highp uint);"
@@ -1451,6 +1479,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
#ifndef GLSLANG_WEB
+#ifndef GLSLANG_ANGLE
//
// Original-style texture functions existing in all stages.
// (Per-stage functions below.)
@@ -1599,6 +1628,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
}
+#endif // !GLSLANG_ANGLE
// Bitfield
if ((profile == EEsProfile && version >= 310) ||
@@ -1741,6 +1771,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#ifndef GLSLANG_ANGLE
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append(
@@ -3061,7 +3092,27 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);"
"\n");
}
+#endif // !GLSLANG_ANGLE
+
+ if ((profile == EEsProfile && version >= 300 && version < 310) ||
+ (profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix
+ commonBuiltins.append("int mix(int, int, bool);"
+ "ivec2 mix(ivec2, ivec2, bvec2);"
+ "ivec3 mix(ivec3, ivec3, bvec3);"
+ "ivec4 mix(ivec4, ivec4, bvec4);"
+ "uint mix(uint, uint, bool );"
+ "uvec2 mix(uvec2, uvec2, bvec2);"
+ "uvec3 mix(uvec3, uvec3, bvec3);"
+ "uvec4 mix(uvec4, uvec4, bvec4);"
+ "bool mix(bool, bool, bool );"
+ "bvec2 mix(bvec2, bvec2, bvec2);"
+ "bvec3 mix(bvec3, bvec3, bvec3);"
+ "bvec4 mix(bvec4, bvec4, bvec4);"
+
+ "\n");
+ }
+#ifndef GLSLANG_ANGLE
// GL_AMD_gpu_shader_half_float/Explicit types
if (profile != EEsProfile && version >= 450) {
commonBuiltins.append(
@@ -3912,28 +3963,30 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"f64vec3 log2(f64vec3);"
"f64vec4 log2(f64vec4);"
"\n");
- }
- if (profile != EEsProfile && version >= 450) {
- stageBuiltins[EShLangFragment].append(derivativesAndControl64bits);
- stageBuiltins[EShLangFragment].append(
- "float64_t interpolateAtCentroid(float64_t);"
- "f64vec2 interpolateAtCentroid(f64vec2);"
- "f64vec3 interpolateAtCentroid(f64vec3);"
- "f64vec4 interpolateAtCentroid(f64vec4);"
+ }
- "float64_t interpolateAtSample(float64_t, int);"
- "f64vec2 interpolateAtSample(f64vec2, int);"
- "f64vec3 interpolateAtSample(f64vec3, int);"
- "f64vec4 interpolateAtSample(f64vec4, int);"
+ if (profile != EEsProfile && version >= 450) {
+ stageBuiltins[EShLangFragment].append(derivativesAndControl64bits);
+ stageBuiltins[EShLangFragment].append(
+ "float64_t interpolateAtCentroid(float64_t);"
+ "f64vec2 interpolateAtCentroid(f64vec2);"
+ "f64vec3 interpolateAtCentroid(f64vec3);"
+ "f64vec4 interpolateAtCentroid(f64vec4);"
- "float64_t interpolateAtOffset(float64_t, f64vec2);"
- "f64vec2 interpolateAtOffset(f64vec2, f64vec2);"
- "f64vec3 interpolateAtOffset(f64vec3, f64vec2);"
- "f64vec4 interpolateAtOffset(f64vec4, f64vec2);"
+ "float64_t interpolateAtSample(float64_t, int);"
+ "f64vec2 interpolateAtSample(f64vec2, int);"
+ "f64vec3 interpolateAtSample(f64vec3, int);"
+ "f64vec4 interpolateAtSample(f64vec4, int);"
- "\n");
+ "float64_t interpolateAtOffset(float64_t, f64vec2);"
+ "f64vec2 interpolateAtOffset(f64vec2, f64vec2);"
+ "f64vec3 interpolateAtOffset(f64vec3, f64vec2);"
+ "f64vec4 interpolateAtOffset(f64vec4, f64vec2);"
+
+ "\n");
}
+#endif // !GLSLANG_ANGLE
//============================================================================
//
@@ -3949,6 +4002,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
stageBuiltins[EShLangVertex].append("vec4 ftransform();");
+#ifndef GLSLANG_ANGLE
//
// Original-style texture Functions with lod.
//
@@ -4008,6 +4062,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
}
+#endif // !GLSLANG_ANGLE
if ((profile != EEsProfile && version >= 150) ||
(profile == EEsProfile && version >= 310)) {
@@ -4028,7 +4083,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void EndPrimitive();"
"\n");
}
-#endif
+#endif // !GLSLANG_WEB
//============================================================================
//
@@ -4067,10 +4122,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
#ifndef GLSLANG_WEB
if ((profile != EEsProfile && version >= 420) || esBarrier) {
- commonBuiltins.append(
- "void memoryBarrierAtomicCounter();"
- "void memoryBarrierImage();"
- );
+ if (spvVersion.vulkan == 0) {
+ commonBuiltins.append("void memoryBarrierAtomicCounter();");
+ }
+ commonBuiltins.append("void memoryBarrierImage();");
}
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
stageBuiltins[EShLangMeshNV].append(
@@ -4086,6 +4141,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append("void controlBarrier(int, int, int, int);\n"
"void memoryBarrier(int, int, int);\n");
+ commonBuiltins.append("void debugPrintfEXT();\n");
+
+#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 450) {
// coopMatStoreNV perhaps ought to have "out" on the buf parameter, but
// adding it introduces undesirable tempArgs on the stack. What we want
@@ -4209,6 +4267,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+#endif // !GLSLANG_ANGLE
// GL_ARB_derivative_control
if (profile != EEsProfile && version >= 400) {
@@ -4246,6 +4305,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bool helperInvocationEXT();"
"\n");
+#ifndef GLSLANG_ANGLE
// GL_AMD_shader_explicit_vertex_parameter
if (profile != EEsProfile && version >= 450) {
stageBuiltins[EShLangFragment].append(
@@ -4320,37 +4380,74 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
- // Builtins for GL_NV_ray_tracing
+ // Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing/GL_EXT_ray_query
if (profile != EEsProfile && version >= 460) {
- stageBuiltins[EShLangRayGenNV].append(
+ commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
+ "void rayQueryTerminateEXT(rayQueryEXT);"
+ "void rayQueryGenerateIntersectionEXT(rayQueryEXT, float);"
+ "void rayQueryConfirmIntersectionEXT(rayQueryEXT);"
+ "bool rayQueryProceedEXT(rayQueryEXT);"
+ "uint rayQueryGetIntersectionTypeEXT(rayQueryEXT, bool);"
+ "float rayQueryGetRayTMinEXT(rayQueryEXT);"
+ "uint rayQueryGetRayFlagsEXT(rayQueryEXT);"
+ "vec3 rayQueryGetWorldRayOriginEXT(rayQueryEXT);"
+ "vec3 rayQueryGetWorldRayDirectionEXT(rayQueryEXT);"
+ "float rayQueryGetIntersectionTEXT(rayQueryEXT, bool);"
+ "int rayQueryGetIntersectionInstanceCustomIndexEXT(rayQueryEXT, bool);"
+ "int rayQueryGetIntersectionInstanceIdEXT(rayQueryEXT, bool);"
+ "uint rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQueryEXT, bool);"
+ "int rayQueryGetIntersectionGeometryIndexEXT(rayQueryEXT, bool);"
+ "int rayQueryGetIntersectionPrimitiveIndexEXT(rayQueryEXT, bool);"
+ "vec2 rayQueryGetIntersectionBarycentricsEXT(rayQueryEXT, bool);"
+ "bool rayQueryGetIntersectionFrontFaceEXT(rayQueryEXT, bool);"
+ "bool rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQueryEXT);"
+ "vec3 rayQueryGetIntersectionObjectRayDirectionEXT(rayQueryEXT, bool);"
+ "vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);"
+ "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);"
+ "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);"
+ "\n");
+
+ stageBuiltins[EShLangRayGen].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
+ "void executeCallableEXT(uint, int);"
"\n");
- stageBuiltins[EShLangIntersectNV].append(
+ stageBuiltins[EShLangIntersect].append(
"bool reportIntersectionNV(float, uint);"
+ "bool reportIntersectionEXT(float, uint);"
"\n");
- stageBuiltins[EShLangAnyHitNV].append(
+ stageBuiltins[EShLangAnyHit].append(
"void ignoreIntersectionNV();"
+ "void ignoreIntersectionEXT();"
"void terminateRayNV();"
+ "void terminateRayEXT();"
"\n");
- stageBuiltins[EShLangClosestHitNV].append(
+ stageBuiltins[EShLangClosestHit].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
+ "void executeCallableEXT(uint, int);"
"\n");
- stageBuiltins[EShLangMissNV].append(
+ stageBuiltins[EShLangMiss].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
+ "void executeCallableEXT(uint, int);"
"\n");
- stageBuiltins[EShLangCallableNV].append(
+ stageBuiltins[EShLangCallable].append(
"void executeCallableNV(uint, int);"
+ "void executeCallableEXT(uint, int);"
"\n");
}
+#endif // !GLSLANG_ANGLE
//E_SPV_NV_compute_shader_derivatives
if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) {
stageBuiltins[EShLangCompute].append(derivativeControls);
stageBuiltins[EShLangCompute].append("\n");
}
+#ifndef GLSLANG_ANGLE
if (profile != EEsProfile && version >= 450) {
stageBuiltins[EShLangCompute].append(derivativesAndControl16bits);
stageBuiltins[EShLangCompute].append(derivativesAndControl64bits);
@@ -4363,7 +4460,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"void writePackedPrimitiveIndices4x8NV(uint, uint);"
"\n");
}
-#endif
+#endif // !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
//============================================================================
//
@@ -4400,7 +4498,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
//
// Matrix state. p. 31, 32, 37, 39, 40.
@@ -4518,7 +4616,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
-#endif
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
//============================================================================
//
@@ -4549,6 +4647,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
#ifndef GLSLANG_WEB
+#ifndef GLSLANG_ANGLE
//============================================================================
//
// Define the interface to the mesh/task shader.
@@ -4636,6 +4735,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
}
+#endif // !GLSLANG_ANGLE
//============================================================================
//
@@ -5306,6 +5406,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
#ifndef GLSLANG_WEB
+ if ((profile != EEsProfile && version >= 140) ||
+ (profile == EEsProfile && version >= 310)) {
+ stageBuiltins[EShLangFragment].append(
+ "flat in highp int gl_DeviceIndex;" // GL_EXT_device_group
+ "flat in highp int gl_ViewIndex;" // GL_EXT_multiview
+ "\n");
+ }
+
+#ifndef GLSLANG_ANGLE
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
const char* ballotDecls =
@@ -5336,14 +5445,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangTaskNV] .append(ballotDecls);
}
- if ((profile != EEsProfile && version >= 140) ||
- (profile == EEsProfile && version >= 310)) {
- stageBuiltins[EShLangFragment].append(
- "flat in highp int gl_DeviceIndex;" // GL_EXT_device_group
- "flat in highp int gl_ViewIndex;" // GL_EXT_multiview
- "\n");
- }
-
// GL_KHR_shader_subgroup
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 140)) {
@@ -5391,118 +5492,173 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls);
stageBuiltins[EShLangTaskNV] .append(subgroupDecls);
stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls);
- stageBuiltins[EShLangRayGenNV] .append(subgroupDecls);
- stageBuiltins[EShLangIntersectNV] .append(subgroupDecls);
- stageBuiltins[EShLangAnyHitNV] .append(subgroupDecls);
- stageBuiltins[EShLangClosestHitNV] .append(subgroupDecls);
- stageBuiltins[EShLangMissNV] .append(subgroupDecls);
- stageBuiltins[EShLangCallableNV] .append(subgroupDecls);
+ stageBuiltins[EShLangRayGen] .append(subgroupDecls);
+ stageBuiltins[EShLangIntersect] .append(subgroupDecls);
+ stageBuiltins[EShLangAnyHit] .append(subgroupDecls);
+ stageBuiltins[EShLangClosestHit] .append(subgroupDecls);
+ stageBuiltins[EShLangMiss] .append(subgroupDecls);
+ stageBuiltins[EShLangCallable] .append(subgroupDecls);
}
- // GL_NV_ray_tracing
+ // GL_NV_ray_tracing/GL_EXT_ray_tracing
if (profile != EEsProfile && version >= 460) {
const char *constRayFlags =
"const uint gl_RayFlagsNoneNV = 0U;"
+ "const uint gl_RayFlagsNoneEXT = 0U;"
"const uint gl_RayFlagsOpaqueNV = 1U;"
+ "const uint gl_RayFlagsOpaqueEXT = 1U;"
"const uint gl_RayFlagsNoOpaqueNV = 2U;"
+ "const uint gl_RayFlagsNoOpaqueEXT = 2U;"
"const uint gl_RayFlagsTerminateOnFirstHitNV = 4U;"
+ "const uint gl_RayFlagsTerminateOnFirstHitEXT = 4U;"
"const uint gl_RayFlagsSkipClosestHitShaderNV = 8U;"
+ "const uint gl_RayFlagsSkipClosestHitShaderEXT = 8U;"
"const uint gl_RayFlagsCullBackFacingTrianglesNV = 16U;"
+ "const uint gl_RayFlagsCullBackFacingTrianglesEXT = 16U;"
"const uint gl_RayFlagsCullFrontFacingTrianglesNV = 32U;"
+ "const uint gl_RayFlagsCullFrontFacingTrianglesEXT = 32U;"
"const uint gl_RayFlagsCullOpaqueNV = 64U;"
+ "const uint gl_RayFlagsCullOpaqueEXT = 64U;"
"const uint gl_RayFlagsCullNoOpaqueNV = 128U;"
+ "const uint gl_RayFlagsCullNoOpaqueEXT = 128U;"
+ "const uint gl_RayFlagsSkipTrianglesEXT = 256U;"
+ "const uint gl_RayFlagsSkipAABBEXT = 512U;"
+ "const uint gl_HitKindFrontFacingTriangleEXT = 254U;"
+ "const uint gl_HitKindBackFacingTriangleEXT = 255U;"
"\n";
+
+ const char *constRayQueryIntersection =
+ "const uint gl_RayQueryCandidateIntersectionEXT = 0U;"
+ "const uint gl_RayQueryCommittedIntersectionEXT = 1U;"
+ "const uint gl_RayQueryCommittedIntersectionNoneEXT = 0U;"
+ "const uint gl_RayQueryCommittedIntersectionTriangleEXT = 1U;"
+ "const uint gl_RayQueryCommittedIntersectionGeneratedEXT = 2U;"
+ "const uint gl_RayQueryCandidateIntersectionTriangleEXT = 0U;"
+ "const uint gl_RayQueryCandidateIntersectionAABBEXT = 1U;"
+ "\n";
+
const char *rayGenDecls =
"in uvec3 gl_LaunchIDNV;"
+ "in uvec3 gl_LaunchIDEXT;"
"in uvec3 gl_LaunchSizeNV;"
+ "in uvec3 gl_LaunchSizeEXT;"
"\n";
const char *intersectDecls =
"in uvec3 gl_LaunchIDNV;"
+ "in uvec3 gl_LaunchIDEXT;"
"in uvec3 gl_LaunchSizeNV;"
+ "in uvec3 gl_LaunchSizeEXT;"
"in int gl_PrimitiveID;"
"in int gl_InstanceID;"
"in int gl_InstanceCustomIndexNV;"
+ "in int gl_InstanceCustomIndexEXT;"
+ "in int gl_GeometryIndexEXT;"
"in vec3 gl_WorldRayOriginNV;"
+ "in vec3 gl_WorldRayOriginEXT;"
"in vec3 gl_WorldRayDirectionNV;"
+ "in vec3 gl_WorldRayDirectionEXT;"
"in vec3 gl_ObjectRayOriginNV;"
+ "in vec3 gl_ObjectRayOriginEXT;"
"in vec3 gl_ObjectRayDirectionNV;"
+ "in vec3 gl_ObjectRayDirectionEXT;"
"in float gl_RayTminNV;"
+ "in float gl_RayTminEXT;"
"in float gl_RayTmaxNV;"
+ "in float gl_RayTmaxEXT;"
"in mat4x3 gl_ObjectToWorldNV;"
+ "in mat4x3 gl_ObjectToWorldEXT;"
+ "in mat3x4 gl_ObjectToWorld3x4EXT;"
"in mat4x3 gl_WorldToObjectNV;"
+ "in mat4x3 gl_WorldToObjectEXT;"
+ "in mat3x4 gl_WorldToObject3x4EXT;"
"in uint gl_IncomingRayFlagsNV;"
+ "in uint gl_IncomingRayFlagsEXT;"
"\n";
const char *hitDecls =
"in uvec3 gl_LaunchIDNV;"
+ "in uvec3 gl_LaunchIDEXT;"
"in uvec3 gl_LaunchSizeNV;"
+ "in uvec3 gl_LaunchSizeEXT;"
"in int gl_PrimitiveID;"
"in int gl_InstanceID;"
"in int gl_InstanceCustomIndexNV;"
+ "in int gl_InstanceCustomIndexEXT;"
+ "in int gl_GeometryIndexEXT;"
"in vec3 gl_WorldRayOriginNV;"
+ "in vec3 gl_WorldRayOriginEXT;"
"in vec3 gl_WorldRayDirectionNV;"
+ "in vec3 gl_WorldRayDirectionEXT;"
"in vec3 gl_ObjectRayOriginNV;"
+ "in vec3 gl_ObjectRayOriginEXT;"
"in vec3 gl_ObjectRayDirectionNV;"
+ "in vec3 gl_ObjectRayDirectionEXT;"
"in float gl_RayTminNV;"
+ "in float gl_RayTminEXT;"
"in float gl_RayTmaxNV;"
+ "in float gl_RayTmaxEXT;"
"in float gl_HitTNV;"
+ "in float gl_HitTEXT;"
"in uint gl_HitKindNV;"
+ "in uint gl_HitKindEXT;"
"in mat4x3 gl_ObjectToWorldNV;"
+ "in mat4x3 gl_ObjectToWorldEXT;"
+ "in mat3x4 gl_ObjectToWorld3x4EXT;"
"in mat4x3 gl_WorldToObjectNV;"
+ "in mat4x3 gl_WorldToObjectEXT;"
+ "in mat3x4 gl_WorldToObject3x4EXT;"
"in uint gl_IncomingRayFlagsNV;"
+ "in uint gl_IncomingRayFlagsEXT;"
"\n";
const char *missDecls =
"in uvec3 gl_LaunchIDNV;"
+ "in uvec3 gl_LaunchIDEXT;"
"in uvec3 gl_LaunchSizeNV;"
+ "in uvec3 gl_LaunchSizeEXT;"
"in vec3 gl_WorldRayOriginNV;"
+ "in vec3 gl_WorldRayOriginEXT;"
"in vec3 gl_WorldRayDirectionNV;"
+ "in vec3 gl_WorldRayDirectionEXT;"
"in vec3 gl_ObjectRayOriginNV;"
"in vec3 gl_ObjectRayDirectionNV;"
"in float gl_RayTminNV;"
+ "in float gl_RayTminEXT;"
"in float gl_RayTmaxNV;"
+ "in float gl_RayTmaxEXT;"
"in uint gl_IncomingRayFlagsNV;"
+ "in uint gl_IncomingRayFlagsEXT;"
"\n";
const char *callableDecls =
"in uvec3 gl_LaunchIDNV;"
+ "in uvec3 gl_LaunchIDEXT;"
"in uvec3 gl_LaunchSizeNV;"
+ "in uvec3 gl_LaunchSizeEXT;"
"\n";
- stageBuiltins[EShLangRayGenNV].append(rayGenDecls);
- stageBuiltins[EShLangRayGenNV].append(constRayFlags);
- stageBuiltins[EShLangIntersectNV].append(intersectDecls);
- stageBuiltins[EShLangIntersectNV].append(constRayFlags);
+ commonBuiltins.append(constRayQueryIntersection);
+ commonBuiltins.append(constRayFlags);
- stageBuiltins[EShLangAnyHitNV].append(hitDecls);
- stageBuiltins[EShLangAnyHitNV].append(constRayFlags);
-
- stageBuiltins[EShLangClosestHitNV].append(hitDecls);
- stageBuiltins[EShLangClosestHitNV].append(constRayFlags);
-
- stageBuiltins[EShLangMissNV].append(missDecls);
- stageBuiltins[EShLangMissNV].append(constRayFlags);
-
- stageBuiltins[EShLangCallableNV].append(callableDecls);
- stageBuiltins[EShLangCallableNV].append(constRayFlags);
+ stageBuiltins[EShLangRayGen].append(rayGenDecls);
+ stageBuiltins[EShLangIntersect].append(intersectDecls);
+ stageBuiltins[EShLangAnyHit].append(hitDecls);
+ stageBuiltins[EShLangClosestHit].append(hitDecls);
+ stageBuiltins[EShLangMiss].append(missDecls);
+ stageBuiltins[EShLangCallable].append(callableDecls);
}
+
if ((profile != EEsProfile && version >= 140)) {
const char *deviceIndex =
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
"\n";
- stageBuiltins[EShLangRayGenNV].append(deviceIndex);
- stageBuiltins[EShLangIntersectNV].append(deviceIndex);
- stageBuiltins[EShLangAnyHitNV].append(deviceIndex);
- stageBuiltins[EShLangClosestHitNV].append(deviceIndex);
- stageBuiltins[EShLangMissNV].append(deviceIndex);
- }
-
- if (version >= 300 /* both ES and non-ES */) {
- stageBuiltins[EShLangFragment].append(
- "flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
- "\n");
+ stageBuiltins[EShLangRayGen].append(deviceIndex);
+ stageBuiltins[EShLangIntersect].append(deviceIndex);
+ stageBuiltins[EShLangAnyHit].append(deviceIndex);
+ stageBuiltins[EShLangClosestHit].append(deviceIndex);
+ stageBuiltins[EShLangMiss].append(deviceIndex);
}
if ((profile != EEsProfile && version >= 420) ||
@@ -5512,6 +5668,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append("const int gl_ScopeSubgroup = 3;\n");
commonBuiltins.append("const int gl_ScopeInvocation = 4;\n");
commonBuiltins.append("const int gl_ScopeQueueFamily = 5;\n");
+ commonBuiltins.append("const int gl_ScopeShaderCallEXT = 6;\n");
commonBuiltins.append("const int gl_SemanticsRelaxed = 0x0;\n");
commonBuiltins.append("const int gl_SemanticsAcquire = 0x2;\n");
@@ -5527,7 +5684,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append("const int gl_StorageSemanticsImage = 0x800;\n");
commonBuiltins.append("const int gl_StorageSemanticsOutput = 0x1000;\n");
}
-#endif
+
+#endif // !GLSLANG_ANGLE
+
+ if (version >= 300 /* both ES and non-ES */) {
+ stageBuiltins[EShLangFragment].append(
+ "flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
+ "\n");
+ }
+#endif // !GLSLANG_WEB
// printf("%s\n", commonBuiltins.c_str());
// printf("%s\n", stageBuiltins[EShLangFragment].c_str());
@@ -5545,13 +5710,16 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
//
// enumerate all the types
+ const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+ EbtFloat16
+#endif
+ };
#ifdef GLSLANG_WEB
- const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint };
bool skipBuffer = true;
bool skipCubeArrayed = true;
const int image = 0;
#else
- const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint, EbtFloat16 };
bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140);
bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130);
for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler
@@ -5577,7 +5745,11 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
#ifdef GLSLANG_WEB
for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
#else
+#if defined(GLSLANG_ANGLE)
+ for (int dim = Esd2D; dim < EsdNumDims; ++dim) { // 2D, ..., buffer, subpass
+#else
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
+#endif
if (dim == EsdSubpass && spvVersion.vulkan == 0)
continue;
if (dim == EsdSubpass && (image || shadow || arrayed))
@@ -5708,7 +5880,7 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
return;
#endif
- if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430)))
+ if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420)))
return;
if (profile == EEsProfile)
@@ -5747,9 +5919,9 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
//
// textureQueryLod(), fragment stage only
- //
+ // Also enabled with extension GL_ARB_texture_query_lod
- if (profile != EEsProfile && version >= 400 && sampler.isCombined() && sampler.dim != EsdRect &&
+ if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect &&
! sampler.isMultiSample() && ! sampler.isBuffer()) {
for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) {
if (f16TexAddr && sampler.type != EbtFloat16)
@@ -5898,11 +6070,38 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
// not int or uint
// GL_ARB_ES3_1_compatibility
// TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers?
- if ((profile != EEsProfile && version >= 450) ||
- (profile == EEsProfile && version >= 310)) {
+ if (profile == EEsProfile && version >= 310) {
+ commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float);\n");
+ }
+ if (profile != EEsProfile && version >= 450) {
+ commonBuiltins.append("float imageAtomicAdd(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float);\n");
+
+ commonBuiltins.append("float imageAtomicAdd(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float");
+ commonBuiltins.append(", int, int, int);\n");
+
commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
commonBuiltins.append(imageParams);
commonBuiltins.append(", float);\n");
+
+ commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float");
+ commonBuiltins.append(", int, int, int);\n");
+
+ commonBuiltins.append("float imageAtomicLoad(readonly volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", int, int, int);\n");
+
+ commonBuiltins.append("void imageAtomicStore(writeonly volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float");
+ commonBuiltins.append(", int, int, int);\n");
}
}
}
@@ -5971,6 +6170,9 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
+#elif defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
#endif
//
@@ -6047,7 +6249,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
continue;
// loop over 16-bit floating-point texel addressing
-#ifdef GLSLANG_WEB
+#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
const int f16TexAddr = 0;
#else
for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
@@ -6060,7 +6262,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
totalDims--;
}
// loop over "bool" lod clamp
-#ifdef GLSLANG_WEB
+#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
const int lodClamp = 0;
#else
for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
@@ -6072,7 +6274,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
continue;
// loop over "bool" sparse or not
-#ifdef GLSLANG_WEB
+#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
const int sparse = 0;
#else
for (int sparse = 0; sparse <= 1; ++sparse)
@@ -6127,7 +6329,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append("Offset");
if (lodClamp)
s.append("Clamp");
- if (lodClamp || sparse)
+ if (lodClamp != 0 || sparse)
s.append("ARB");
s.append("(");
@@ -6227,7 +6429,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append(");\n");
// Add to the per-language set of built-ins
- if (bias || lodClamp) {
+ if (bias || lodClamp != 0) {
stageBuiltins[EShLangFragment].append(s);
stageBuiltins[EShLangCompute].append(s);
} else
@@ -6256,6 +6458,9 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
+#elif defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
#endif
switch (sampler.dim) {
@@ -6499,6 +6704,9 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
+#elif defined(GLSLANG_ANGLE)
+ version = 450;
+ profile = ECoreProfile;
#endif
//
@@ -6624,6 +6832,35 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
}
}
+ if (version >= 320) {
+ // tessellation
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlImageUniforms = %d;", resources.maxTessControlImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationImageUniforms = %d;", resources.maxTessEvaluationImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounters = %d;", resources.maxTessControlAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounters = %d;", resources.maxTessEvaluationAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounterBuffers = %d;", resources.maxTessControlAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounterBuffers = %d;", resources.maxTessEvaluationAtomicCounterBuffers);
+ s.append(builtInConstant);
+ }
+
+ if (version >= 100) {
+ // GL_EXT_blend_func_extended
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxDualSourceDrawBuffersEXT = %d;", resources.maxDualSourceDrawBuffersEXT);
+ s.append(builtInConstant);
+ // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxDualSourceDrawBuffersEXT
+ if (language == EShLangFragment) {
+ s.append(
+ "mediump vec4 gl_SecondaryFragColorEXT;"
+ "mediump vec4 gl_SecondaryFragDataEXT[gl_MaxDualSourceDrawBuffersEXT];"
+ "\n");
+ }
+ }
} else {
// non-ES profile
@@ -6898,6 +7135,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append("\n");
}
+#ifndef GLSLANG_ANGLE
// atomic counters (some in compute below)
if ((profile == EEsProfile && version >= 310) ||
(profile != EEsProfile && version >= 420)) {
@@ -6934,6 +7172,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append("\n");
}
+#endif // !GLSLANG_ANGLE
// GL_ARB_cull_distance
if (profile != EEsProfile && version >= 450) {
@@ -6950,6 +7189,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append(builtInConstant);
}
+#ifndef GLSLANG_ANGLE
// SPV_NV_mesh_shader
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
@@ -6973,6 +7213,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
s.append("\n");
}
#endif
+#endif
s.append("\n");
}
@@ -7056,6 +7297,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
#ifdef GLSLANG_WEB
version = 310;
profile = EEsProfile;
+#elif defined(GLSLANG_ANGLE)
+ version = 450;
+ profile = ECoreProfile;
#endif
//
@@ -7245,7 +7489,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
case EShLangTessEvaluation:
case EShLangGeometry:
-#endif
+#endif // !GLSLANG_WEB
SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable);
SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable);
@@ -7406,7 +7650,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
}
-#endif
+#endif // !GLSLANG_WEB
break;
case EShLangFragment:
@@ -7436,6 +7680,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
}
+ if (profile != EEsProfile && version < 400) {
+ symbolTable.setFunctionExtensions("textureQueryLod", 1, &E_GL_ARB_texture_query_lod);
+ }
+
+ if (profile != EEsProfile && version >= 460) {
+ symbolTable.setFunctionExtensions("rayQueryInitializeEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryTerminateEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGenerateIntersectionEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryConfirmIntersectionEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryProceedEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionTypeEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionTEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetRayFlagsEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetRayTMinEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceCustomIndexEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceIdEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionGeometryIndexEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionPrimitiveIndexEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionBarycentricsEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionFrontFaceEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionCandidateAABBOpaqueEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayDirectionEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayOriginEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectToWorldEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query);
+ symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
+ symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
+ }
+
if ((profile != EEsProfile && version >= 130) ||
(profile == EEsProfile && version >= 310)) {
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
@@ -7674,6 +7950,45 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic);
}
+ if (profile != EEsProfile && version < 330 ) {
+ symbolTable.setFunctionExtensions("floatBitsToInt", 1, &E_GL_ARB_shader_bit_encoding);
+ symbolTable.setFunctionExtensions("floatBitsToUint", 1, &E_GL_ARB_shader_bit_encoding);
+ symbolTable.setFunctionExtensions("intBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding);
+ symbolTable.setFunctionExtensions("uintBitsToFloat", 1, &E_GL_ARB_shader_bit_encoding);
+ }
+
+ if (profile != EEsProfile && version < 430 ) {
+ symbolTable.setFunctionExtensions("imageSize", 1, &E_GL_ARB_shader_image_size);
+ }
+
+ // GL_ARB_shader_storage_buffer_object
+ if (profile != EEsProfile && version < 430 ) {
+ symbolTable.setFunctionExtensions("atomicAdd", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicMin", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicMax", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicAnd", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicOr", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicXor", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicExchange", 1, &E_GL_ARB_shader_storage_buffer_object);
+ symbolTable.setFunctionExtensions("atomicCompSwap", 1, &E_GL_ARB_shader_storage_buffer_object);
+ }
+
+ // GL_ARB_shading_language_packing
+ if (profile != EEsProfile && version < 400 ) {
+ symbolTable.setFunctionExtensions("packUnorm2x16", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("unpackUnorm2x16", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("packSnorm4x8", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("packUnorm4x8", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("unpackSnorm4x8", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("unpackUnorm4x8", 1, &E_GL_ARB_shading_language_packing);
+ }
+ if (profile != EEsProfile && version < 420 ) {
+ symbolTable.setFunctionExtensions("packSnorm2x16", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("unpackSnorm2x16", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("unpackHalf2x16", 1, &E_GL_ARB_shading_language_packing);
+ symbolTable.setFunctionExtensions("packHalf2x16", 1, &E_GL_ARB_shading_language_packing);
+ }
+
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview);
@@ -7841,7 +8156,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
}
symbolTable.setFunctionExtensions("helperInvocationEXT", 1, &E_GL_EXT_demote_to_helper_invocation);
-#endif
+#endif // !GLSLANG_WEB
break;
case EShLangCompute:
@@ -7885,7 +8200,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_ARB_compute_shader);
}
+
symbolTable.setFunctionExtensions("controlBarrier", 1, &E_GL_KHR_memory_scope_semantics);
+ symbolTable.setFunctionExtensions("debugPrintfEXT", 1, &E_GL_EXT_debug_printf);
// GL_ARB_shader_ballot
if (profile != EEsProfile) {
@@ -7971,53 +8288,101 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("dFdyCoarse", 1, &E_GL_NV_compute_shader_derivatives);
symbolTable.setFunctionExtensions("fwidthCoarse", 1, &E_GL_NV_compute_shader_derivatives);
}
-#endif
+#endif // !GLSLANG_WEB
break;
-#ifndef GLSLANG_WEB
- case EShLangRayGenNV:
- case EShLangIntersectNV:
- case EShLangAnyHitNV:
- case EShLangClosestHitNV:
- case EShLangMissNV:
- case EShLangCallableNV:
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+ case EShLangRayGen:
+ case EShLangIntersect:
+ case EShLangAnyHit:
+ case EShLangClosestHit:
+ case EShLangMiss:
+ case EShLangCallable:
if (profile != EEsProfile && version >= 460) {
+ const char *rtexts[] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing };
symbolTable.setVariableExtensions("gl_LaunchIDNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_LaunchIDEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_LaunchSizeNV", 1, &E_GL_NV_ray_tracing);
- symbolTable.setVariableExtensions("gl_PrimitiveID", 1, &E_GL_NV_ray_tracing);
- symbolTable.setVariableExtensions("gl_InstanceID", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_LaunchSizeEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setVariableExtensions("gl_PrimitiveID", 2, rtexts);
+ symbolTable.setVariableExtensions("gl_InstanceID", 2, rtexts);
symbolTable.setVariableExtensions("gl_InstanceCustomIndexNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_InstanceCustomIndexEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setVariableExtensions("gl_GeometryIndexEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_WorldRayOriginNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_WorldRayOriginEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_WorldRayDirectionNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_WorldRayDirectionEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_ObjectRayOriginNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_ObjectRayOriginEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_ObjectRayDirectionNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_ObjectRayDirectionEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_RayTminNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_RayTminEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_RayTmaxNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_RayTmaxEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_HitTNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_HitTEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_HitKindNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_HitKindEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_ObjectToWorldNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_ObjectToWorldEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setVariableExtensions("gl_ObjectToWorld3x4EXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_WorldToObjectNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_WorldToObjectEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
- BuiltInVariable("gl_LaunchIDNV", EbvLaunchIdNV, symbolTable);
- BuiltInVariable("gl_LaunchSizeNV", EbvLaunchSizeNV, symbolTable);
- BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
- BuiltInVariable("gl_InstanceID", EbvInstanceId, symbolTable);
- BuiltInVariable("gl_InstanceCustomIndexNV", EbvInstanceCustomIndexNV,symbolTable);
- BuiltInVariable("gl_WorldRayOriginNV", EbvWorldRayOriginNV, symbolTable);
- BuiltInVariable("gl_WorldRayDirectionNV", EbvWorldRayDirectionNV, symbolTable);
- BuiltInVariable("gl_ObjectRayOriginNV", EbvObjectRayOriginNV, symbolTable);
- BuiltInVariable("gl_ObjectRayDirectionNV", EbvObjectRayDirectionNV, symbolTable);
- BuiltInVariable("gl_RayTminNV", EbvRayTminNV, symbolTable);
- BuiltInVariable("gl_RayTmaxNV", EbvRayTmaxNV, symbolTable);
- BuiltInVariable("gl_HitTNV", EbvHitTNV, symbolTable);
- BuiltInVariable("gl_HitKindNV", EbvHitKindNV, symbolTable);
- BuiltInVariable("gl_ObjectToWorldNV", EbvObjectToWorldNV, symbolTable);
- BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObjectNV, symbolTable);
- BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlagsNV, symbolTable);
- BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
+
+ symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setFunctionExtensions("ignoreIntersectionNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("ignoreIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setFunctionExtensions("terminateRayNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("terminateRayEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing);
+
+
+ BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable);
+ BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable);
+ BuiltInVariable("gl_LaunchSizeNV", EbvLaunchSize, symbolTable);
+ BuiltInVariable("gl_LaunchSizeEXT", EbvLaunchSize, symbolTable);
+ BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
+ BuiltInVariable("gl_InstanceID", EbvInstanceId, symbolTable);
+ BuiltInVariable("gl_InstanceCustomIndexNV", EbvInstanceCustomIndex,symbolTable);
+ BuiltInVariable("gl_InstanceCustomIndexEXT", EbvInstanceCustomIndex,symbolTable);
+ BuiltInVariable("gl_GeometryIndexEXT", EbvGeometryIndex, symbolTable);
+ BuiltInVariable("gl_WorldRayOriginNV", EbvWorldRayOrigin, symbolTable);
+ BuiltInVariable("gl_WorldRayOriginEXT", EbvWorldRayOrigin, symbolTable);
+ BuiltInVariable("gl_WorldRayDirectionNV", EbvWorldRayDirection, symbolTable);
+ BuiltInVariable("gl_WorldRayDirectionEXT", EbvWorldRayDirection, symbolTable);
+ BuiltInVariable("gl_ObjectRayOriginNV", EbvObjectRayOrigin, symbolTable);
+ BuiltInVariable("gl_ObjectRayOriginEXT", EbvObjectRayOrigin, symbolTable);
+ BuiltInVariable("gl_ObjectRayDirectionNV", EbvObjectRayDirection, symbolTable);
+ BuiltInVariable("gl_ObjectRayDirectionEXT", EbvObjectRayDirection, symbolTable);
+ BuiltInVariable("gl_RayTminNV", EbvRayTmin, symbolTable);
+ BuiltInVariable("gl_RayTminEXT", EbvRayTmin, symbolTable);
+ BuiltInVariable("gl_RayTmaxNV", EbvRayTmax, symbolTable);
+ BuiltInVariable("gl_RayTmaxEXT", EbvRayTmax, symbolTable);
+ BuiltInVariable("gl_HitTNV", EbvHitT, symbolTable);
+ BuiltInVariable("gl_HitTEXT", EbvHitT, symbolTable);
+ BuiltInVariable("gl_HitKindNV", EbvHitKind, symbolTable);
+ BuiltInVariable("gl_HitKindEXT", EbvHitKind, symbolTable);
+ BuiltInVariable("gl_ObjectToWorldNV", EbvObjectToWorld, symbolTable);
+ BuiltInVariable("gl_ObjectToWorldEXT", EbvObjectToWorld, symbolTable);
+ BuiltInVariable("gl_ObjectToWorld3x4EXT", EbvObjectToWorld3x4, symbolTable);
+ BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObject, symbolTable);
+ BuiltInVariable("gl_WorldToObjectEXT", EbvWorldToObject, symbolTable);
+ BuiltInVariable("gl_WorldToObject3x4EXT", EbvWorldToObject3x4, symbolTable);
+ BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable);
+ BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
+ BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
// GL_ARB_shader_ballot
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
@@ -8434,6 +8799,8 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("average", EOpAverage);
symbolTable.relateToOperator("averageRounded", EOpAverageRounded);
symbolTable.relateToOperator("multiply32x16", EOpMul32x16);
+ symbolTable.relateToOperator("debugPrintfEXT", EOpDebugPrintf);
+
if (PureOperatorBuiltins) {
symbolTable.relateToOperator("imageSize", EOpImageQuerySize);
@@ -8723,6 +9090,33 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
symbolTable.relateToOperator("fwidthCoarse", EOpFwidthCoarse);
}
+
+ if (profile != EEsProfile && version >= 460) {
+ symbolTable.relateToOperator("rayQueryInitializeEXT", EOpRayQueryInitialize);
+ symbolTable.relateToOperator("rayQueryTerminateEXT", EOpRayQueryTerminate);
+ symbolTable.relateToOperator("rayQueryGenerateIntersectionEXT", EOpRayQueryGenerateIntersection);
+ symbolTable.relateToOperator("rayQueryConfirmIntersectionEXT", EOpRayQueryConfirmIntersection);
+ symbolTable.relateToOperator("rayQueryProceedEXT", EOpRayQueryProceed);
+ symbolTable.relateToOperator("rayQueryGetIntersectionTypeEXT", EOpRayQueryGetIntersectionType);
+ symbolTable.relateToOperator("rayQueryGetRayTMinEXT", EOpRayQueryGetRayTMin);
+ symbolTable.relateToOperator("rayQueryGetRayFlagsEXT", EOpRayQueryGetRayFlags);
+ symbolTable.relateToOperator("rayQueryGetIntersectionTEXT", EOpRayQueryGetIntersectionT);
+ symbolTable.relateToOperator("rayQueryGetIntersectionInstanceCustomIndexEXT", EOpRayQueryGetIntersectionInstanceCustomIndex);
+ symbolTable.relateToOperator("rayQueryGetIntersectionInstanceIdEXT", EOpRayQueryGetIntersectionInstanceId);
+ symbolTable.relateToOperator("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset);
+ symbolTable.relateToOperator("rayQueryGetIntersectionGeometryIndexEXT", EOpRayQueryGetIntersectionGeometryIndex);
+ symbolTable.relateToOperator("rayQueryGetIntersectionPrimitiveIndexEXT", EOpRayQueryGetIntersectionPrimitiveIndex);
+ symbolTable.relateToOperator("rayQueryGetIntersectionBarycentricsEXT", EOpRayQueryGetIntersectionBarycentrics);
+ symbolTable.relateToOperator("rayQueryGetIntersectionFrontFaceEXT", EOpRayQueryGetIntersectionFrontFace);
+ symbolTable.relateToOperator("rayQueryGetIntersectionCandidateAABBOpaqueEXT", EOpRayQueryGetIntersectionCandidateAABBOpaque);
+ symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayDirectionEXT", EOpRayQueryGetIntersectionObjectRayDirection);
+ symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayOriginEXT", EOpRayQueryGetIntersectionObjectRayOrigin);
+ symbolTable.relateToOperator("rayQueryGetWorldRayDirectionEXT", EOpRayQueryGetWorldRayDirection);
+ symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin);
+ symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld);
+ symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject);
+ }
+
symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid);
symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
@@ -8754,27 +9148,34 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd);
break;
- case EShLangRayGenNV:
- case EShLangClosestHitNV:
- case EShLangMissNV:
+ case EShLangRayGen:
+ case EShLangClosestHit:
+ case EShLangMiss:
if (profile != EEsProfile && version >= 460) {
- symbolTable.relateToOperator("traceNV", EOpTraceNV);
- symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
+ symbolTable.relateToOperator("traceNV", EOpTrace);
+ symbolTable.relateToOperator("traceRayEXT", EOpTrace);
+ symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable);
+ symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable);
}
break;
- case EShLangIntersectNV:
- if (profile != EEsProfile && version >= 460)
- symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersectionNV);
+ case EShLangIntersect:
+ if (profile != EEsProfile && version >= 460) {
+ symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection);
+ symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection);
+ }
break;
- case EShLangAnyHitNV:
+ case EShLangAnyHit:
if (profile != EEsProfile && version >= 460) {
- symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersectionNV);
- symbolTable.relateToOperator("terminateRayNV", EOpTerminateRayNV);
+ symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersection);
+ symbolTable.relateToOperator("ignoreIntersectionEXT", EOpIgnoreIntersection);
+ symbolTable.relateToOperator("terminateRayNV", EOpTerminateRay);
+ symbolTable.relateToOperator("terminateRayEXT", EOpTerminateRay);
}
break;
- case EShLangCallableNV:
+ case EShLangCallable:
if (profile != EEsProfile && version >= 460) {
- symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
+ symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable);
+ symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable);
}
break;
case EShLangMeshNV:
@@ -8793,7 +9194,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
default:
assert(false && "Language not supported");
}
-#endif
+#endif // !GLSLANG_WEB
}
//
@@ -8808,6 +9209,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
{
#ifndef GLSLANG_WEB
+#if defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
+#endif
if (profile != EEsProfile && version >= 430 && version < 440) {
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);
@@ -8831,6 +9236,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData));
SpecialQualifier("gl_FragData", EvqFragColor, EbvFragData, symbolTable);
}
+
+ // GL_EXT_blend_func_extended
+ if (profile == EEsProfile && version >= 100) {
+ symbolTable.setVariableExtensions("gl_MaxDualSourceDrawBuffersEXT", 1, &E_GL_EXT_blend_func_extended);
+ symbolTable.setVariableExtensions("gl_SecondaryFragColorEXT", 1, &E_GL_EXT_blend_func_extended);
+ symbolTable.setVariableExtensions("gl_SecondaryFragDataEXT", 1, &E_GL_EXT_blend_func_extended);
+ SpecialQualifier("gl_SecondaryFragColorEXT", EvqVaryingOut, EbvSecondaryFragColorEXT, symbolTable);
+ SpecialQualifier("gl_SecondaryFragDataEXT", EvqVaryingOut, EbvSecondaryFragDataEXT, symbolTable);
+ }
+
break;
case EShLangTessControl:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
index d0f86e6389..b8c220d781 100755..100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
@@ -1,7 +1,7 @@
//
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2015 LunarG, Inc.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
// Copyright (C) 2017 ARM Limited.
//
// All rights reserved.
@@ -113,14 +113,14 @@ TIntermSymbol* TIntermediate::addSymbol(const TType& type, const TSourceLoc& loc
//
// Returns nullptr if the working conversions and promotions could not be found.
//
-TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc)
+TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc)
{
// No operations work on blocks
if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock)
return nullptr;
// Convert "reference +/- int" and "reference - reference" to integer math
- if ((op == EOpAdd || op == EOpSub) && extensionRequested(E_GL_EXT_buffer_reference2)) {
+ if (op == EOpAdd || op == EOpSub) {
// No addressing math on struct with unsized array.
if ((left->isReference() && left->getType().getReferentType()->containsUnsizedArray()) ||
@@ -140,43 +140,44 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
node = addBuiltInFunctionCall(loc, EOpConvUint64ToPtr, true, node, referenceType);
return node;
}
+ }
- if (op == EOpAdd && right->isReference() && isTypeInt(left->getBasicType())) {
- const TType& referenceType = right->getType();
- TIntermConstantUnion* size = addConstantUnion((unsigned long long)computeBufferReferenceTypeSize(right->getType()), loc, true);
- right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64));
+ if (op == EOpAdd && right->isReference() && isTypeInt(left->getBasicType())) {
+ const TType& referenceType = right->getType();
+ TIntermConstantUnion* size =
+ addConstantUnion((unsigned long long)computeBufferReferenceTypeSize(right->getType()), loc, true);
+ right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64));
- left = createConversion(EbtInt64, left);
- left = addBinaryMath(EOpMul, left, size, loc);
+ left = createConversion(EbtInt64, left);
+ left = addBinaryMath(EOpMul, left, size, loc);
- TIntermTyped *node = addBinaryMath(op, left, right, loc);
- node = addBuiltInFunctionCall(loc, EOpConvUint64ToPtr, true, node, referenceType);
- return node;
- }
+ TIntermTyped *node = addBinaryMath(op, left, right, loc);
+ node = addBuiltInFunctionCall(loc, EOpConvUint64ToPtr, true, node, referenceType);
+ return node;
+ }
- if (op == EOpSub && left->isReference() && right->isReference()) {
- TIntermConstantUnion* size = addConstantUnion((long long)computeBufferReferenceTypeSize(left->getType()), loc, true);
+ if (op == EOpSub && left->isReference() && right->isReference()) {
+ TIntermConstantUnion* size =
+ addConstantUnion((long long)computeBufferReferenceTypeSize(left->getType()), loc, true);
- left = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, left, TType(EbtUint64));
- right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64));
+ left = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, left, TType(EbtUint64));
+ right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64));
- left = addBuiltInFunctionCall(loc, EOpConvUint64ToInt64, true, left, TType(EbtInt64));
- right = addBuiltInFunctionCall(loc, EOpConvUint64ToInt64, true, right, TType(EbtInt64));
+ left = addBuiltInFunctionCall(loc, EOpConvUint64ToInt64, true, left, TType(EbtInt64));
+ right = addBuiltInFunctionCall(loc, EOpConvUint64ToInt64, true, right, TType(EbtInt64));
- left = addBinaryMath(EOpSub, left, right, loc);
+ left = addBinaryMath(EOpSub, left, right, loc);
- TIntermTyped *node = addBinaryMath(EOpDiv, left, size, loc);
- return node;
- }
-
- // No other math operators supported on references
- if (left->isReference() || right->isReference()) {
- return nullptr;
- }
+ TIntermTyped *node = addBinaryMath(EOpDiv, left, size, loc);
+ return node;
}
+ // No other math operators supported on references
+ if (left->isReference() || right->isReference())
+ return nullptr;
+
// Try converting the children's base types to compatible types.
- auto children = addConversion(op, left, right);
+ auto children = addPairConversion(op, left, right);
left = std::get<0>(children);
right = std::get<1>(children);
@@ -226,13 +227,12 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
//
// Low level: add binary node (no promotions or other argument modifications)
//
-TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc) const
+TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right,
+ const TSourceLoc& loc) const
{
// build the node
TIntermBinary* node = new TIntermBinary(op);
- if (loc.line == 0)
- loc = left->getLoc();
- node->setLoc(loc);
+ node->setLoc(loc.line != 0 ? loc : left->getLoc());
node->setLeft(left);
node->setRight(right);
@@ -242,7 +242,8 @@ TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TI
//
// like non-type form, but sets node's type.
//
-TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc, const TType& type) const
+TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right,
+ const TSourceLoc& loc, const TType& type) const
{
TIntermBinary* node = addBinaryNode(op, left, right, loc);
node->setType(type);
@@ -252,12 +253,10 @@ TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TI
//
// Low level: add unary node (no promotions or other argument modifications)
//
-TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc loc) const
+TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc& loc) const
{
TIntermUnary* node = new TIntermUnary(op);
- if (loc.line == 0)
- loc = child->getLoc();
- node->setLoc(loc);
+ node->setLoc(loc.line != 0 ? loc : child->getLoc());
node->setOperand(child);
return node;
@@ -266,7 +265,8 @@ TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, TSo
//
// like non-type form, but sets node's type.
//
-TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc loc, const TType& type) const
+TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc& loc, const TType& type)
+ const
{
TIntermUnary* node = addUnaryNode(op, child, loc);
node->setType(type);
@@ -281,7 +281,8 @@ TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, TSo
// Returns nullptr if the 'right' type could not be converted to match the 'left' type,
// or the resulting operation cannot be properly promoted.
//
-TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc)
+TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right,
+ const TSourceLoc& loc)
{
// No block assignment
if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock)
@@ -290,9 +291,7 @@ TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TInterm
// Convert "reference += int" to "reference = reference + int". We need this because the
// "reference + int" calculation involves a cast back to the original type, which makes it
// not an lvalue.
- if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference() &&
- extensionRequested(E_GL_EXT_buffer_reference2)) {
-
+ if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference()) {
if (!(right->getType().isScalar() && right->getType().isIntegerDomain()))
return nullptr;
@@ -338,7 +337,8 @@ TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TInterm
// Returns the added node.
// The caller should set the type of the returned node.
//
-TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc loc)
+TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index,
+ const TSourceLoc& loc)
{
// caller should set the type
return addBinaryNode(op, base, index, loc);
@@ -349,7 +349,8 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT
//
// Returns the added node.
//
-TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSourceLoc loc)
+TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
+ const TSourceLoc& loc)
{
if (child == 0)
return nullptr;
@@ -495,7 +496,8 @@ TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOper
// Returns an aggregate node, which could be the one passed in if
// it was already an aggregate.
//
-TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, const TType& type, TSourceLoc loc)
+TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, const TType& type,
+ const TSourceLoc& loc)
{
TIntermAggregate* aggNode;
@@ -510,8 +512,6 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o
//
aggNode = new TIntermAggregate();
aggNode->getSequence().push_back(node);
- if (loc.line == 0)
- loc = node->getLoc();
}
} else
aggNode = new TIntermAggregate();
@@ -520,8 +520,8 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o
// Set the operator.
//
aggNode->setOperator(op);
- if (loc.line != 0)
- aggNode->setLoc(loc);
+ if (loc.line != 0 || node != nullptr)
+ aggNode->setLoc(loc.line != 0 ? loc : node->getLoc());
aggNode->setType(type);
@@ -538,7 +538,7 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
return false;
case EbtAtomicUint:
case EbtSampler:
- case EbtAccStructNV:
+ case EbtAccStruct:
// opaque types can be passed to functions
if (op == EOpFunction)
break;
@@ -819,22 +819,25 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
node->getBasicType() == EbtFloat ||
node->getBasicType() == EbtDouble);
- if (! getArithemeticInt8Enabled()) {
- if (((convertTo == EbtInt8 || convertTo == EbtUint8) && ! convertFromIntTypes) ||
- ((node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8) && ! convertToIntTypes))
+ if (((convertTo == EbtInt8 || convertTo == EbtUint8) && ! convertFromIntTypes) ||
+ ((node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8) && ! convertToIntTypes)) {
+ if (! getArithemeticInt8Enabled()) {
return nullptr;
+ }
}
- if (! getArithemeticInt16Enabled()) {
- if (((convertTo == EbtInt16 || convertTo == EbtUint16) && ! convertFromIntTypes) ||
- ((node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16) && ! convertToIntTypes))
+ if (((convertTo == EbtInt16 || convertTo == EbtUint16) && ! convertFromIntTypes) ||
+ ((node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16) && ! convertToIntTypes)) {
+ if (! getArithemeticInt16Enabled()) {
return nullptr;
+ }
}
- if (! getArithemeticFloat16Enabled()) {
- if ((convertTo == EbtFloat16 && ! convertFromFloatTypes) ||
- (node->getBasicType() == EbtFloat16 && ! convertToFloatTypes))
+ if ((convertTo == EbtFloat16 && ! convertFromFloatTypes) ||
+ (node->getBasicType() == EbtFloat16 && ! convertToFloatTypes)) {
+ if (! getArithemeticFloat16Enabled()) {
return nullptr;
+ }
}
#endif
@@ -887,7 +890,7 @@ TIntermTyped* TIntermediate::addConversion(TBasicType convertTo, TIntermTyped* n
// Returns the converted pair of nodes.
// Returns <nullptr, nullptr> when there is no conversion.
std::tuple<TIntermTyped*, TIntermTyped*>
-TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1)
+TIntermediate::addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1)
{
if (!isConversionAllowed(op, node0) || !isConversionAllowed(op, node1))
return std::make_tuple(nullptr, nullptr);
@@ -940,7 +943,7 @@ TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* no
if (node0->getBasicType() == node1->getBasicType())
return std::make_tuple(node0, node1);
- promoteTo = getConversionDestinatonType(node0->getBasicType(), node1->getBasicType(), op);
+ promoteTo = getConversionDestinationType(node0->getBasicType(), node1->getBasicType(), op);
if (std::get<0>(promoteTo) == EbtNumTypes || std::get<1>(promoteTo) == EbtNumTypes)
return std::make_tuple(nullptr, nullptr);
@@ -1040,64 +1043,30 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
// Note: callers are responsible for other aspects of shape,
// like vector and matrix sizes.
- TBasicType promoteTo;
- // GL_EXT_shader_16bit_storage can't do OpConstantComposite with
- // 16-bit types, so disable promotion for those types.
- bool canPromoteConstant = true;
-
switch (op) {
//
// Explicit conversions (unary operations)
//
case EOpConstructBool:
- promoteTo = EbtBool;
- break;
case EOpConstructFloat:
- promoteTo = EbtFloat;
- break;
case EOpConstructInt:
- promoteTo = EbtInt;
- break;
case EOpConstructUint:
- promoteTo = EbtUint;
- break;
#ifndef GLSLANG_WEB
case EOpConstructDouble:
- promoteTo = EbtDouble;
- break;
case EOpConstructFloat16:
- promoteTo = EbtFloat16;
- canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16);
- break;
case EOpConstructInt8:
- promoteTo = EbtInt8;
- canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8);
- break;
case EOpConstructUint8:
- promoteTo = EbtUint8;
- canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8);
- break;
case EOpConstructInt16:
- promoteTo = EbtInt16;
- canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
- break;
case EOpConstructUint16:
- promoteTo = EbtUint16;
- canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
- break;
case EOpConstructInt64:
- promoteTo = EbtInt64;
- break;
case EOpConstructUint64:
- promoteTo = EbtUint64;
break;
+
#endif
+ //
+ // Implicit conversions
+ //
case EOpLogicalNot:
case EOpFunctionCall:
@@ -1152,9 +1121,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
if (type.getBasicType() == node->getType().getBasicType())
return node;
- if (canImplicitlyPromote(node->getBasicType(), type.getBasicType(), op))
- promoteTo = type.getBasicType();
- else
+ if (! canImplicitlyPromote(node->getBasicType(), type.getBasicType(), op))
return nullptr;
break;
@@ -1164,9 +1131,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpLeftShiftAssign:
case EOpRightShiftAssign:
{
- if (getSource() == EShSourceHlsl && node->getType().getBasicType() == EbtBool)
- promoteTo = type.getBasicType();
- else {
+ if (!(getSource() == EShSourceHlsl && node->getType().getBasicType() == EbtBool)) {
if (isTypeInt(type.getBasicType()) && isTypeInt(node->getBasicType()))
return node;
else
@@ -1184,13 +1149,44 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
return nullptr;
}
+ bool canPromoteConstant = true;
+#ifndef GLSLANG_WEB
+ // GL_EXT_shader_16bit_storage can't do OpConstantComposite with
+ // 16-bit types, so disable promotion for those types.
+ // Many issues with this, from JohnK:
+ // - this isn't really right to discuss SPIR-V here
+ // - this could easily be entirely about scalars, so is overstepping
+ // - we should be looking at what the shader asked for, and saying whether or
+ // not it can be done, in the parser, by calling requireExtensions(), not
+ // changing language sementics on the fly by asking what extensions are in use
+ // - at the time of this writing (14-Aug-2020), no test results are changed by this.
+ switch (op) {
+ case EOpConstructFloat16:
+ canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16);
+ break;
+ case EOpConstructInt8:
+ case EOpConstructUint8:
+ canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8);
+ break;
+ case EOpConstructInt16:
+ case EOpConstructUint16:
+ canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16);
+ break;
+ default:
+ break;
+ }
+#endif
+
if (canPromoteConstant && node->getAsConstantUnion())
- return promoteConstantUnion(promoteTo, node->getAsConstantUnion());
+ return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion());
//
// Add a new newNode for the conversion.
//
- TIntermTyped* newNode = createConversion(promoteTo, node);
+ TIntermTyped* newNode = createConversion(type.getBasicType(), node);
return newNode;
}
@@ -1620,7 +1616,7 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
//
bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op) const
{
- if (isEsProfile() || version == 110)
+ if ((isEsProfile() && version < 310 ) || version == 110)
return false;
if (from == to)
@@ -1659,46 +1655,51 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
}
}
- bool explicitTypesEnabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int32) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int64) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float32) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float64);
-
- if (explicitTypesEnabled) {
- // integral promotions
- if (isIntegralPromotion(from, to)) {
- return true;
- }
-
- // floating-point promotions
- if (isFPPromotion(from, to)) {
- return true;
- }
-
- // integral conversions
- if (isIntegralConversion(from, to)) {
+ if (getSource() == EShSourceHlsl) {
+ // HLSL
+ if (from == EbtBool && (to == EbtInt || to == EbtUint || to == EbtFloat))
return true;
- }
-
- // floating-point conversions
- if (isFPConversion(from, to)) {
- return true;
- }
-
- // floating-integral conversions
- if (isFPIntegralConversion(from, to)) {
- return true;
- }
-
- // hlsl supported conversions
- if (getSource() == EShSourceHlsl) {
- if (from == EbtBool && (to == EbtInt || to == EbtUint || to == EbtFloat))
+ } else {
+ // GLSL
+ if (isIntegralPromotion(from, to) ||
+ isFPPromotion(from, to) ||
+ isIntegralConversion(from, to) ||
+ isFPConversion(from, to) ||
+ isFPIntegralConversion(from, to)) {
+
+ if (numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int32) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int64) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float32) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float64)) {
return true;
+ }
}
+ }
+
+ if (isEsProfile()) {
+ switch (to) {
+ case EbtFloat:
+ switch (from) {
+ case EbtInt:
+ case EbtUint:
+ return numericFeatures.contains(TNumericFeatures::shader_implicit_conversions);
+ default:
+ return false;
+ }
+ case EbtUint:
+ switch (from) {
+ case EbtInt:
+ return numericFeatures.contains(TNumericFeatures::shader_implicit_conversions);
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
} else {
switch (to) {
case EbtDouble:
@@ -1708,13 +1709,14 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt64:
case EbtUint64:
case EbtFloat:
- case EbtDouble:
- return true;
+ return version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64);
case EbtInt16:
case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return (version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64)) &&
+ numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
case EbtFloat16:
- return extensionRequested(E_GL_AMD_gpu_shader_half_float);
+ return (version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64)) &&
+ numericFeatures.contains(TNumericFeatures::gpu_shader_half_float);
default:
return false;
}
@@ -1722,16 +1724,14 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
switch (from) {
case EbtInt:
case EbtUint:
- case EbtFloat:
return true;
case EbtBool:
return getSource() == EShSourceHlsl;
case EbtInt16:
case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
case EbtFloat16:
- return
- extensionRequested(E_GL_AMD_gpu_shader_half_float) ||
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_half_float) ||
getSource() == EShSourceHlsl;
default:
return false;
@@ -1739,25 +1739,21 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtUint:
switch (from) {
case EbtInt:
- return version >= 400 || getSource() == EShSourceHlsl;
- case EbtUint:
- return true;
+ return version >= 400 || getSource() == EShSourceHlsl;
case EbtBool:
return getSource() == EShSourceHlsl;
case EbtInt16:
case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
return false;
}
case EbtInt:
switch (from) {
- case EbtInt:
- return true;
case EbtBool:
return getSource() == EShSourceHlsl;
case EbtInt16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
return false;
}
@@ -1766,21 +1762,19 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt:
case EbtUint:
case EbtInt64:
- case EbtUint64:
return true;
case EbtInt16:
case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
return false;
}
case EbtInt64:
switch (from) {
case EbtInt:
- case EbtInt64:
return true;
case EbtInt16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
return false;
}
@@ -1788,9 +1782,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
switch (from) {
case EbtInt16:
case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
- case EbtFloat16:
- return extensionRequested(E_GL_AMD_gpu_shader_half_float);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
break;
}
@@ -1798,8 +1790,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtUint16:
switch (from) {
case EbtInt16:
- case EbtUint16:
- return extensionRequested(E_GL_AMD_gpu_shader_int16);
+ return numericFeatures.contains(TNumericFeatures::gpu_shader_int16);
default:
break;
}
@@ -1926,12 +1917,14 @@ static TBasicType getCorrespondingUnsignedType(TBasicType type)
// integer type corresponding to the type of the operand with signed
// integer type.
-std::tuple<TBasicType, TBasicType> TIntermediate::getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const
+std::tuple<TBasicType, TBasicType> TIntermediate::getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const
{
TBasicType res0 = EbtNumTypes;
TBasicType res1 = EbtNumTypes;
- if (isEsProfile() || version == 110)
+ if ((isEsProfile() &&
+ (version < 310 || !numericFeatures.contains(TNumericFeatures::shader_implicit_conversions))) ||
+ version == 110)
return std::make_tuple(res0, res1);
if (getSource() == EShSourceHlsl) {
@@ -2463,7 +2456,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
//
// Get compatible types.
//
- auto children = addConversion(EOpSequence, trueBlock, falseBlock);
+ auto children = addPairConversion(EOpSequence, trueBlock, falseBlock);
trueBlock = std::get<0>(children);
falseBlock = std::get<1>(children);
@@ -2750,6 +2743,22 @@ TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expres
return node;
}
+// Propagate precision from formal function return type to actual return type,
+// and on to its subtree.
+void TIntermBranch::updatePrecision(TPrecisionQualifier parentPrecision)
+{
+ TIntermTyped* exp = getExpression();
+ if (exp == nullptr)
+ return;
+
+ if (exp->getBasicType() == EbtInt || exp->getBasicType() == EbtUint ||
+ exp->getBasicType() == EbtFloat || exp->getBasicType() == EbtFloat16) {
+ if (parentPrecision != EpqNone && exp->getQualifier().precision == EpqNone) {
+ exp->propagatePrecision(parentPrecision);
+ }
+ }
+}
+
//
// This is to be executed after the final root is put on top by the parsing
// process.
@@ -2774,6 +2783,9 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
case EShTexSampTransUpgradeTextureRemoveSampler:
performTextureUpgradeAndSamplerRemovalTransformation(root);
break;
+ case EShTexSampTransCount:
+ assert(0);
+ break;
}
#endif
@@ -3234,10 +3246,17 @@ bool TIntermediate::promoteUnary(TIntermUnary& node)
return false;
break;
-
default:
- if (operand->getBasicType() != EbtFloat)
+ // HLSL uses this path for initial function signature finding for built-ins
+ // taking a single argument, which generally don't participate in
+ // operator-based type promotion (type conversion will occur later).
+ // For now, scalar argument cases are relying on the setType() call below.
+ if (getSource() == EShSourceHlsl)
+ break;
+ // GLSL only allows integer arguments for the cases identified above in the
+ // case statements.
+ if (operand->getBasicType() != EbtFloat)
return false;
}
@@ -3247,9 +3266,11 @@ bool TIntermediate::promoteUnary(TIntermUnary& node)
return true;
}
+// Propagate precision qualifiers *up* from children to parent.
void TIntermUnary::updatePrecision()
{
- if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
+ if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
+ getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
if (operand->getQualifier().precision > getQualifier().precision)
getQualifier().precision = operand->getQualifier().precision;
}
@@ -3745,9 +3766,12 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node)
return false;
}
+// Propagate precision qualifiers *up* from children to parent, and then
+// back *down* again to the children's subtrees.
void TIntermBinary::updatePrecision()
{
- if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
+ if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
+ getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
if (getQualifier().precision != EpqNone) {
left->propagatePrecision(getQualifier().precision);
@@ -3756,9 +3780,14 @@ void TIntermBinary::updatePrecision()
}
}
+// Recursively propagate precision qualifiers *down* the subtree of the current node,
+// until reaching a node that already has a precision qualifier or otherwise does
+// not participate in precision propagation.
void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision)
{
- if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat && getBasicType() != EbtFloat16))
+ if (getQualifier().precision != EpqNone ||
+ (getBasicType() != EbtInt && getBasicType() != EbtUint &&
+ getBasicType() != EbtFloat && getBasicType() != EbtFloat16))
return;
getQualifier().precision = newPrecision;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/LiveTraverser.h b/thirdparty/glslang/glslang/MachineIndependent/LiveTraverser.h
index 7333bc964e..9b39b5983f 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/LiveTraverser.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/LiveTraverser.h
@@ -74,14 +74,33 @@ public:
for (unsigned int f = 0; f < globals.size(); ++f) {
TIntermAggregate* candidate = globals[f]->getAsAggregate();
if (candidate && candidate->getOp() == EOpFunction && candidate->getName() == name) {
- functions.push_back(candidate);
+ destinations.push_back(candidate);
break;
}
}
}
- typedef std::list<TIntermAggregate*> TFunctionStack;
- TFunctionStack functions;
+ void pushGlobalReference(const TString& name)
+ {
+ TIntermSequence& globals = intermediate.getTreeRoot()->getAsAggregate()->getSequence();
+ for (unsigned int f = 0; f < globals.size(); ++f) {
+ TIntermAggregate* candidate = globals[f]->getAsAggregate();
+ if (candidate && candidate->getOp() == EOpSequence &&
+ candidate->getSequence().size() == 1 &&
+ candidate->getSequence()[0]->getAsBinaryNode()) {
+ TIntermBinary* binary = candidate->getSequence()[0]->getAsBinaryNode();
+ TIntermSymbol* symbol = binary->getLeft()->getAsSymbolNode();
+ if (symbol && symbol->getQualifier().storage == EvqGlobal &&
+ symbol->getName() == name) {
+ destinations.push_back(candidate);
+ break;
+ }
+ }
+ }
+ }
+
+ typedef std::list<TIntermAggregate*> TDestinationStack;
+ TDestinationStack destinations;
protected:
// To catch which function calls are not dead, and hence which functions must be visited.
@@ -117,16 +136,27 @@ protected:
// and only visit each function once.
void addFunctionCall(TIntermAggregate* call)
{
- // // just use the map to ensure we process each function at most once
+ // just use the map to ensure we process each function at most once
if (liveFunctions.find(call->getName()) == liveFunctions.end()) {
liveFunctions.insert(call->getName());
pushFunction(call->getName());
}
}
+ void addGlobalReference(const TString& name)
+ {
+ // just use the map to ensure we process each global at most once
+ if (liveGlobals.find(name) == liveGlobals.end()) {
+ liveGlobals.insert(name);
+ pushGlobalReference(name);
+ }
+ }
+
const TIntermediate& intermediate;
typedef std::unordered_set<TString> TLiveFunctions;
TLiveFunctions liveFunctions;
+ typedef std::unordered_set<TString> TLiveGlobals;
+ TLiveGlobals liveGlobals;
bool traverseAll;
private:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
index 282ecca0e0..b46400914c 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
@@ -157,11 +157,11 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
case EvqBuffer:
if (node->getQualifier().isReadOnly())
message = "can't modify a readonly buffer";
- if (node->getQualifier().isShaderRecordNV())
+ if (node->getQualifier().isShaderRecord())
message = "can't modify a shaderrecordnv qualified buffer";
break;
- case EvqHitAttrNV:
- if (language != EShLangIntersectNV)
+ case EvqHitAttr:
+ if (language != EShLangIntersect)
message = "cannot modify hitAttributeNV in this stage";
break;
#endif
@@ -181,9 +181,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
case EbtAtomicUint:
message = "can't modify an atomic_uint";
break;
- case EbtAccStructNV:
+ case EbtAccStruct:
message = "can't modify accelerationStructureNV";
break;
+ case EbtRayQuery:
+ message = "can't modify rayQueryEXT";
+ break;
#endif
default:
break;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
index a2224e1609..86a5a37866 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
@@ -3,6 +3,7 @@
// Copyright (C) 2012-2015 LunarG, Inc.
// Copyright (C) 2015-2018 Google, Inc.
// Copyright (C) 2017, 2019 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -245,7 +246,9 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
else if (tokens[2].compare("off") == 0)
contextPragma.optimize = false;
else {
- error(loc, "\"on\" or \"off\" expected after '(' for 'optimize' pragma", "#pragma", "");
+ if(relaxedErrors())
+ // If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma.
+ warn(loc, "\"on\" or \"off\" expected after '(' for 'optimize' pragma", "#pragma", "");
return;
}
@@ -269,7 +272,9 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
else if (tokens[2].compare("off") == 0)
contextPragma.debug = false;
else {
- error(loc, "\"on\" or \"off\" expected after '(' for 'debug' pragma", "#pragma", "");
+ if(relaxedErrors())
+ // If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma.
+ warn(loc, "\"on\" or \"off\" expected after '(' for 'debug' pragma", "#pragma", "");
return;
}
@@ -427,8 +432,18 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
#ifndef GLSLANG_WEB
if (base->isReference() && ! base->isArray()) {
requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference indexing");
- result = intermediate.addBinaryMath(EOpAdd, base, index, loc);
- result->setType(base->getType());
+ if (base->getType().getReferentType()->containsUnsizedArray()) {
+ error(loc, "cannot index reference to buffer containing an unsized array", "", "");
+ result = nullptr;
+ } else {
+ result = intermediate.addBinaryMath(EOpAdd, base, index, loc);
+ if (result != nullptr)
+ result->setType(base->getType());
+ }
+ if (result == nullptr) {
+ error(loc, "cannot index buffer reference", "", "");
+ result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
+ }
return result;
}
if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
@@ -740,8 +755,11 @@ TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char*
}
TIntermTyped* result = nullptr;
- if (allowed)
+ if (allowed) {
+ if ((left->isReference() || right->isReference()))
+ requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference math");
result = intermediate.addBinaryMath(op, left, right, loc);
+ }
if (result == nullptr)
binaryOpError(loc, str, left->getCompleteString(), right->getCompleteString());
@@ -821,50 +839,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
TIntermTyped* result = base;
if ((base->isVector() || base->isScalar()) &&
(base->isFloatingDomain() || base->isIntegerDomain() || base->getBasicType() == EbtBool)) {
- if (base->isScalar()) {
- const char* dotFeature = "scalar swizzle";
- requireProfile(loc, ~EEsProfile, dotFeature);
- profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, dotFeature);
- }
-
- TSwizzleSelectors<TVectorSelector> selectors;
- parseSwizzleSelector(loc, field, base->getVectorSize(), selectors);
-
- if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitFloat())
- requireFloat16Arithmetic(loc, ".", "can't swizzle types containing float16");
- if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitInt())
- requireInt16Arithmetic(loc, ".", "can't swizzle types containing (u)int16");
- if (base->isVector() && selectors.size() != 1 && base->getType().contains8BitInt())
- requireInt8Arithmetic(loc, ".", "can't swizzle types containing (u)int8");
-
- if (base->isScalar()) {
- if (selectors.size() == 1)
- return result;
- else {
- TType type(base->getBasicType(), EvqTemporary, selectors.size());
- // Swizzle operations propagate specialization-constantness
- if (base->getQualifier().isSpecConstant())
- type.getQualifier().makeSpecConstant();
- return addConstructor(loc, base, type);
- }
- }
-
- if (base->getType().getQualifier().isFrontEndConstant())
- result = intermediate.foldSwizzle(base, selectors, loc);
- else {
- if (selectors.size() == 1) {
- TIntermTyped* index = intermediate.addConstantUnion(selectors[0], loc);
- result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
- result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision));
- } else {
- TIntermTyped* index = intermediate.addSwizzle(selectors, loc);
- result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc);
- result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, selectors.size()));
- }
- // Swizzle operations propagate specialization-constantness
- if (base->getType().getQualifier().isSpecConstant())
- result->getWritableType().getQualifier().makeSpecConstant();
- }
+ result = handleDotSwizzle(loc, base, field);
} else if (base->isStruct() || base->isReference()) {
const TTypeList* fields = base->isReference() ?
base->getType().getReferentType()->getStruct() :
@@ -905,6 +880,60 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
return result;
}
+//
+// Handle seeing a base.swizzle, a subset of base.identifier in the grammar.
+//
+TIntermTyped* TParseContext::handleDotSwizzle(const TSourceLoc& loc, TIntermTyped* base, const TString& field)
+{
+ TIntermTyped* result = base;
+ if (base->isScalar()) {
+ const char* dotFeature = "scalar swizzle";
+ requireProfile(loc, ~EEsProfile, dotFeature);
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, dotFeature);
+ }
+
+ TSwizzleSelectors<TVectorSelector> selectors;
+ parseSwizzleSelector(loc, field, base->getVectorSize(), selectors);
+
+ if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitFloat())
+ requireFloat16Arithmetic(loc, ".", "can't swizzle types containing float16");
+ if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitInt())
+ requireInt16Arithmetic(loc, ".", "can't swizzle types containing (u)int16");
+ if (base->isVector() && selectors.size() != 1 && base->getType().contains8BitInt())
+ requireInt8Arithmetic(loc, ".", "can't swizzle types containing (u)int8");
+
+ if (base->isScalar()) {
+ if (selectors.size() == 1)
+ return result;
+ else {
+ TType type(base->getBasicType(), EvqTemporary, selectors.size());
+ // Swizzle operations propagate specialization-constantness
+ if (base->getQualifier().isSpecConstant())
+ type.getQualifier().makeSpecConstant();
+ return addConstructor(loc, base, type);
+ }
+ }
+
+ if (base->getType().getQualifier().isFrontEndConstant())
+ result = intermediate.foldSwizzle(base, selectors, loc);
+ else {
+ if (selectors.size() == 1) {
+ TIntermTyped* index = intermediate.addConstantUnion(selectors[0], loc);
+ result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision));
+ } else {
+ TIntermTyped* index = intermediate.addSwizzle(selectors, loc);
+ result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, selectors.size()));
+ }
+ // Swizzle operations propagate specialization-constantness
+ if (base->getType().getQualifier().isSpecConstant())
+ result->getWritableType().getQualifier().makeSpecConstant();
+ }
+
+ return result;
+}
+
void TParseContext::blockMemberExtensionCheck(const TSourceLoc& loc, const TIntermTyped* base, int member, const TString& memberName)
{
// a block that needs extension checking is either 'base', or if arrayed,
@@ -1273,7 +1302,7 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo
TIntermTyped *result = intermediate.addBuiltInFunctionCall(loc, function.getBuiltInOp(),
function.getParamCount() == 1,
arguments, function.getType());
- if (obeyPrecisionQualifiers())
+ if (result != nullptr && obeyPrecisionQualifiers())
computeBuiltinPrecisions(*result, function);
if (result == nullptr) {
@@ -1353,6 +1382,9 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction
case EOpInterpolateAtSample:
numArgs = 1;
break;
+ case EOpDebugPrintf:
+ numArgs = 0;
+ break;
default:
break;
}
@@ -1390,23 +1422,28 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType
#endif
functionReturnsValue = true;
+ TIntermBranch* branch = nullptr;
if (currentFunctionType->getBasicType() == EbtVoid) {
error(loc, "void function cannot return a value", "return", "");
- return intermediate.addBranch(EOpReturn, loc);
+ branch = intermediate.addBranch(EOpReturn, loc);
} else if (*currentFunctionType != value->getType()) {
TIntermTyped* converted = intermediate.addConversion(EOpReturn, *currentFunctionType, value);
if (converted) {
if (*currentFunctionType != converted->getType())
error(loc, "cannot convert return value to function return type", "return", "");
if (version < 420)
- warn(loc, "type conversion on return values was not explicitly allowed until version 420", "return", "");
- return intermediate.addBranch(EOpReturn, converted, loc);
+ warn(loc, "type conversion on return values was not explicitly allowed until version 420",
+ "return", "");
+ branch = intermediate.addBranch(EOpReturn, converted, loc);
} else {
error(loc, "type does not match, or is not convertible to, the function's return type", "return", "");
- return intermediate.addBranch(EOpReturn, value, loc);
+ branch = intermediate.addBranch(EOpReturn, value, loc);
}
} else
- return intermediate.addBranch(EOpReturn, value, loc);
+ branch = intermediate.addBranch(EOpReturn, value, loc);
+
+ branch->updatePrecision(currentFunctionType->getQualifier().precision);
+ return branch;
}
// See if the operation is being done in an illegal location.
@@ -1650,6 +1687,14 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct
#endif
}
+TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right)
+{
+ if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference())
+ requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "+= and -= on a buffer reference");
+
+ return intermediate.addAssign(op, left, right, loc);
+}
+
void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& fnCandidate, const TIntermOperator& callNode)
{
const TIntermSequence* argp = &callNode.getAsAggregate()->getSequence();
@@ -1672,6 +1717,9 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
unsigned int semantics = 0, storageClassSemantics = 0;
unsigned int semantics2 = 0, storageClassSemantics2 = 0;
+ const TIntermTyped* arg0 = (*argp)[0]->getAsTyped();
+ const bool isMS = arg0->getBasicType() == EbtSampler && arg0->getType().getSampler().isMultiSample();
+
// Grab the semantics and storage class semantics from the operands, based on opcode
switch (callNode.getOp()) {
case EOpAtomicAdd:
@@ -1704,18 +1752,18 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
case EOpImageAtomicXor:
case EOpImageAtomicExchange:
case EOpImageAtomicStore:
- storageClassSemantics = (*argp)[4]->getAsConstantUnion()->getConstArray()[0].getIConst();
- semantics = (*argp)[5]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ storageClassSemantics = (*argp)[isMS ? 5 : 4]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ semantics = (*argp)[isMS ? 6 : 5]->getAsConstantUnion()->getConstArray()[0].getIConst();
break;
case EOpImageAtomicLoad:
- storageClassSemantics = (*argp)[3]->getAsConstantUnion()->getConstArray()[0].getIConst();
- semantics = (*argp)[4]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ storageClassSemantics = (*argp)[isMS ? 4 : 3]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ semantics = (*argp)[isMS ? 5 : 4]->getAsConstantUnion()->getConstArray()[0].getIConst();
break;
case EOpImageAtomicCompSwap:
- storageClassSemantics = (*argp)[5]->getAsConstantUnion()->getConstArray()[0].getIConst();
- semantics = (*argp)[6]->getAsConstantUnion()->getConstArray()[0].getIConst();
- storageClassSemantics2 = (*argp)[7]->getAsConstantUnion()->getConstArray()[0].getIConst();
- semantics2 = (*argp)[8]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ storageClassSemantics = (*argp)[isMS ? 6 : 5]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ semantics = (*argp)[isMS ? 7 : 6]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ storageClassSemantics2 = (*argp)[isMS ? 8 : 7]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ semantics2 = (*argp)[isMS ? 9 : 8]->getAsConstantUnion()->getConstArray()[0].getIConst();
break;
case EOpBarrier:
@@ -2006,18 +2054,20 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (arg > 0) {
#ifndef GLSLANG_WEB
- bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow;
+ bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 &&
+ arg0->getType().getSampler().shadow;
if (f16ShadowCompare)
++arg;
#endif
- if (! (*argp)[arg]->getAsConstantUnion())
+ if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant())
error(loc, "argument must be compile-time constant", "texel offset", "");
- else {
+ else if ((*argp)[arg]->getAsConstantUnion()) {
const TType& type = (*argp)[arg]->getAsTyped()->getType();
for (int c = 0; c < type.getVectorSize(); ++c) {
int offset = (*argp)[arg]->getAsConstantUnion()->getConstArray()[c].getIConst();
if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset)
- error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
+ error(loc, "value is out of range:", "texel offset",
+ "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
}
}
}
@@ -2026,15 +2076,32 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
}
#ifndef GLSLANG_WEB
- case EOpTraceNV:
+ case EOpTrace:
if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", "");
break;
- case EOpExecuteCallableNV:
+ case EOpExecuteCallable:
if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "callable data number", "");
break;
+ case EOpRayQueryGetIntersectionType:
+ case EOpRayQueryGetIntersectionT:
+ case EOpRayQueryGetIntersectionInstanceCustomIndex:
+ case EOpRayQueryGetIntersectionInstanceId:
+ case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
+ case EOpRayQueryGetIntersectionGeometryIndex:
+ case EOpRayQueryGetIntersectionPrimitiveIndex:
+ case EOpRayQueryGetIntersectionBarycentrics:
+ case EOpRayQueryGetIntersectionFrontFace:
+ case EOpRayQueryGetIntersectionObjectRayDirection:
+ case EOpRayQueryGetIntersectionObjectRayOrigin:
+ case EOpRayQueryGetIntersectionObjectToWorld:
+ case EOpRayQueryGetIntersectionWorldToObject:
+ if (!(*argp)[1]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "committed", "");
+ break;
+
case EOpTextureQuerySamples:
case EOpImageQuerySamples:
// GL_ARB_shader_texture_image_samples
@@ -2058,7 +2125,14 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui)
error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
} else {
- if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)
+ bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
+ (fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
+ (fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0) ||
+ (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0));
+ if (imageType.getSampler().type == EbtFloat && isImageAtomicOnFloatAllowed &&
+ (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)) // imageAtomicExchange doesn't require GL_EXT_shader_atomic_float
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
+ if (!isImageAtomicOnFloatAllowed)
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
@@ -2087,10 +2161,18 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (argp->size() > 3) {
requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str());
memorySemanticsCheck(loc, fnCandidate, callNode);
+ if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
+ callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) &&
+ (arg0->getType().isFloatingDomain())) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
+ }
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
const char* const extensions[2] = { E_GL_NV_shader_atomic_int64,
E_GL_EXT_shader_atomic_int64 };
requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str());
+ } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) &&
+ (arg0->getType().isFloatingDomain())) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
}
break;
}
@@ -2172,6 +2254,28 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
memorySemanticsCheck(loc, fnCandidate, callNode);
}
break;
+
+ case EOpMix:
+ if (profile == EEsProfile && version < 310) {
+ // Look for specific signatures
+ if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat &&
+ (*argp)[1]->getAsTyped()->getBasicType() != EbtFloat &&
+ (*argp)[2]->getAsTyped()->getBasicType() == EbtBool) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_integer_mix, "specific signature of builtin mix");
+ }
+ }
+
+ if (profile != EEsProfile && version < 450) {
+ if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat &&
+ (*argp)[0]->getAsTyped()->getBasicType() != EbtDouble &&
+ (*argp)[1]->getAsTyped()->getBasicType() != EbtFloat &&
+ (*argp)[1]->getAsTyped()->getBasicType() != EbtDouble &&
+ (*argp)[2]->getAsTyped()->getBasicType() == EbtBool) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_integer_mix, fnCandidate.getName().c_str());
+ }
+ }
+
+ break;
#endif
default:
@@ -2698,7 +2802,10 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
if (strncmp(identifier, "GL_", 3) == 0)
ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier);
else if (strncmp(identifier, "defined", 8) == 0)
- ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
+ if (relaxedErrors())
+ ppWarn(loc, "\"defined\" is (un)defined:", op, identifier);
+ else
+ ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
else if (strstr(identifier, "__") != 0) {
if (isEsProfile() && version >= 300 &&
(strcmp(identifier, "__LINE__") == 0 ||
@@ -2706,7 +2813,7 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
strcmp(identifier, "__VERSION__") == 0))
ppError(loc, "predefined names can't be (un)defined:", op, identifier);
else {
- if (isEsProfile() && version < 300)
+ if (isEsProfile() && version < 300 && !relaxedErrors())
ppError(loc, "names containing consecutive underscores are reserved, and an error if version < 300:", op, identifier);
else
ppWarn(loc, "names containing consecutive underscores are reserved:", op, identifier);
@@ -3083,7 +3190,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
error(loc, "constructor argument does not have a type", "constructor", "");
return true;
}
- if (op != EOpConstructStruct && typed->getBasicType() == EbtSampler) {
+ if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) {
error(loc, "cannot convert a sampler", "constructor", "");
return true;
}
@@ -3128,7 +3235,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
if (function[0].type->getBasicType() != EbtSampler ||
! function[0].type->getSampler().isTexture() ||
function[0].type->isArray()) {
- error(loc, "sampler-constructor first argument must be a scalar textureXXX type", token, "");
+ error(loc, "sampler-constructor first argument must be a scalar *texture* type", token, "");
return true;
}
// simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
@@ -3136,7 +3243,8 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
texture.setCombined(false);
texture.shadow = false;
if (texture != function[0].type->getSampler()) {
- error(loc, "sampler-constructor first argument must match type and dimensionality of constructor type", token, "");
+ error(loc, "sampler-constructor first argument must be a *texture* type"
+ " matching the dimensionality and sampled type of the constructor", token, "");
return true;
}
@@ -3146,7 +3254,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
if ( function[1].type->getBasicType() != EbtSampler ||
! function[1].type->getSampler().isPureSampler() ||
function[1].type->isArray()) {
- error(loc, "sampler-constructor second argument must be a scalar type 'sampler'", token, "");
+ error(loc, "sampler-constructor second argument must be a scalar sampler or samplerShadow", token, "");
return true;
}
@@ -3222,14 +3330,14 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co
error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
}
-void TParseContext::accStructNVCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
+void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
if (type.getQualifier().storage == EvqUniform)
return;
- if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStructNV))
+ if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStruct))
error(loc, "non-uniform struct contains an accelerationStructureNV:", type.getBasicTypeString().c_str(), identifier.c_str());
- else if (type.getBasicType() == EbtAccStructNV && type.getQualifier().storage != EvqUniform)
+ else if (type.getBasicType() == EbtAccStruct && type.getQualifier().storage != EvqUniform)
error(loc, "accelerationStructureNV can only be used in uniform variables or function parameters:",
type.getBasicTypeString().c_str(), identifier.c_str());
@@ -3327,6 +3435,11 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
!qualifier.hasBufferReference())
error(loc, "buffers can be declared only as blocks", "buffer", "");
+ if (qualifier.storage != EvqVaryingIn && publicType.basicType == EbtDouble &&
+ extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit) && language == EShLangVertex &&
+ version < 400) {
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 410, E_GL_ARB_gpu_shader_fp64, "vertex-shader `double` type");
+ }
if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut)
return;
@@ -3377,7 +3490,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays");
}
if (publicType.basicType == EbtDouble)
- profileRequires(loc, ~EEsProfile, 410, nullptr, "vertex-shader `double` type input");
+ profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_vertex_attrib_64bit, "vertex-shader `double` type input");
if (qualifier.isAuxiliary() || qualifier.isInterpolation() || qualifier.isMemory() || qualifier.invariant)
error(loc, "vertex input cannot be further qualified", "", "");
break;
@@ -3513,12 +3626,14 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
dst.precision = src.precision;
#ifndef GLSLANG_WEB
- if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
- (src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
- (src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
- (src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent)) ||
- (src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent)))) {
- error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), "");
+ if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
+ (src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
+ (src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
+ (src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
+ (src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.shadercallcoherent)) ||
+ (src.shadercallcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)))) {
+ error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed",
+ GetPrecisionQualifierString(src.precision), "");
}
#endif
// Layout qualifiers
@@ -3546,6 +3661,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
MERGE_SINGLETON(queuefamilycoherent);
MERGE_SINGLETON(workgroupcoherent);
MERGE_SINGLETON(subgroupcoherent);
+ MERGE_SINGLETON(shadercallcoherent);
MERGE_SINGLETON(nonprivate);
MERGE_SINGLETON(volatil);
MERGE_SINGLETON(restrict);
@@ -3983,7 +4099,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
}
// check for additional things allowed by GL_EXT_nonuniform_qualifier
- if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStructNV ||
+ if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery ||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
else
@@ -4487,6 +4603,7 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
type.getQualifier().queuefamilycoherent = qualifier.queuefamilycoherent;
type.getQualifier().workgroupcoherent = qualifier.workgroupcoherent;
type.getQualifier().subgroupcoherent = qualifier.subgroupcoherent;
+ type.getQualifier().shadercallcoherent = qualifier.shadercallcoherent;
type.getQualifier().nonprivate = qualifier.nonprivate;
type.getQualifier().readonly = qualifier.readonly;
type.getQualifier().writeonly = qualifier.writeonly;
@@ -4868,7 +4985,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
#ifndef GLSLANG_WEB
if (id == TQualifier::getLayoutPackingString(ElpStd430)) {
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430");
- profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "std430");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "std430");
profileRequires(loc, EEsProfile, 310, nullptr, "std430");
publicType.qualifier.layoutPacking = ElpStd430;
return;
@@ -5067,13 +5184,19 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
return;
}
} else {
- if (language == EShLangRayGenNV || language == EShLangIntersectNV ||
- language == EShLangAnyHitNV || language == EShLangClosestHitNV ||
- language == EShLangMissNV || language == EShLangCallableNV) {
- if (id == "shaderrecordnv") {
- publicType.qualifier.layoutShaderRecordNV = true;
+ if (language == EShLangRayGen || language == EShLangIntersect ||
+ language == EShLangAnyHit || language == EShLangClosestHit ||
+ language == EShLangMiss || language == EShLangCallable) {
+ if (id == "shaderrecordnv" || id == "shaderrecordext") {
+ if (id == "shaderrecordnv") {
+ requireExtensions(loc, 1, &E_GL_NV_ray_tracing, "shader record NV");
+ } else {
+ requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "shader record EXT");
+ }
+ publicType.qualifier.layoutShaderRecord = true;
return;
}
+
}
}
if (language == EShLangCompute) {
@@ -5088,6 +5211,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
}
}
+
+ if (id == "primitive_culling") {
+ requireExtensions(loc, 1, &E_GL_EXT_ray_flags_primitive_culling, "primitive culling");
+ publicType.shaderQualifiers.layoutPrimitiveCulling = true;
+ return;
+ }
#endif
error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), "");
@@ -5135,6 +5264,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
profileRequires(loc, EEsProfile, 310, nullptr, feature);
}
publicType.qualifier.layoutOffset = value;
+ publicType.qualifier.explicitOffset = true;
if (nonLiteral)
error(loc, "needs a literal integer", "offset", "");
return;
@@ -5347,10 +5477,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
case EShLangFragment:
if (id == "index") {
- requireProfile(loc, ECompatibilityProfile | ECoreProfile, "index layout qualifier on fragment output");
+ requireProfile(loc, ECompatibilityProfile | ECoreProfile | EEsProfile, "index layout qualifier on fragment output");
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
profileRequires(loc, ECompatibilityProfile | ECoreProfile, 330, 2, exts, "index layout qualifier on fragment output");
-
+ profileRequires(loc, EEsProfile ,310, E_GL_EXT_blend_func_extended, "index layout qualifier on fragment output");
// "It is also a compile-time error if a fragment shader sets a layout index to less than 0 or greater than 1."
if (value < 0 || value > 1) {
value = 0;
@@ -5514,8 +5644,8 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
dst.layoutViewportRelative = true;
if (src.layoutSecondaryViewportRelativeOffset != -2048)
dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset;
- if (src.layoutShaderRecordNV)
- dst.layoutShaderRecordNV = true;
+ if (src.layoutShaderRecord)
+ dst.layoutShaderRecord = true;
if (src.pervertexNV)
dst.pervertexNV = true;
#endif
@@ -5583,7 +5713,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
error(loc, "cannot specify on a variable declaration", "align", "");
if (qualifier.isPushConstant())
error(loc, "can only specify on a uniform block", "push_constant", "");
- if (qualifier.isShaderRecordNV())
+ if (qualifier.isShaderRecord())
error(loc, "can only specify on a buffer block", "shaderRecordNV", "");
}
break;
@@ -5657,11 +5787,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
error(loc, "cannot apply to uniform or buffer block", "location", "");
break;
#ifndef GLSLANG_WEB
- case EvqPayloadNV:
- case EvqPayloadInNV:
- case EvqHitAttrNV:
- case EvqCallableDataNV:
- case EvqCallableDataInNV:
+ case EvqPayload:
+ case EvqPayloadIn:
+ case EvqHitAttr:
+ case EvqCallableData:
+ case EvqCallableDataIn:
break;
#endif
default:
@@ -5684,6 +5814,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
int repeated = intermediate.addXfbBufferOffset(type);
if (repeated >= 0)
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
+ if (type.isUnsizedArray())
+ error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
// "The offset must be a multiple of the size of the first component of the first
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
@@ -5756,7 +5888,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
if (spvVersion.spv > 0) {
if (qualifier.isUniformOrBuffer()) {
if (type.getBasicType() == EbtBlock && !qualifier.isPushConstant() &&
- !qualifier.isShaderRecordNV() &&
+ !qualifier.isShaderRecord() &&
!qualifier.hasAttachment() &&
!qualifier.hasBufferReference())
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
@@ -5813,7 +5945,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "buffer_reference", "");
- if (qualifier.isShaderRecordNV() && type.getBasicType() != EbtBlock)
+ if (qualifier.isShaderRecord() && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "shaderRecordNV", "");
// input attachment
@@ -5958,7 +6090,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
if (qualifier.storage != EvqBuffer)
error(loc, "can only be used with buffer", "buffer_reference", "");
}
- if (qualifier.isShaderRecordNV()) {
+ if (qualifier.isShaderRecord()) {
if (qualifier.storage != EvqBuffer)
error(loc, "can only be used with a buffer", "shaderRecordNV", "");
if (qualifier.hasBinding())
@@ -5967,7 +6099,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
error(loc, "cannot be used with shaderRecordNV", "set", "");
}
- if (qualifier.storage == EvqHitAttrNV && qualifier.hasLayout()) {
+ if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) {
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
}
}
@@ -6018,6 +6150,8 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
error(loc, message, "num_views", "");
if (shaderQualifiers.interlockOrdering != EioNone)
error(loc, message, TQualifier::getInterlockOrderingString(shaderQualifiers.interlockOrdering), "");
+ if (shaderQualifiers.layoutPrimitiveCulling)
+ error(loc, "can only be applied as standalone", "primitive_culling", "");
#endif
}
@@ -6079,6 +6213,15 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
#endif
const TFunction* function = nullptr;
+
+ // debugPrintfEXT has var args and is in the symbol table as "debugPrintfEXT()",
+ // mangled to "debugPrintfEXT("
+ if (call.getName() == "debugPrintfEXT") {
+ TSymbol* symbol = symbolTable.find("debugPrintfEXT(", &builtIn);
+ if (symbol)
+ return symbol->getAsFunction();
+ }
+
bool explicitTypesEnabled = extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) ||
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8) ||
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16) ||
@@ -6088,7 +6231,10 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32) ||
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64);
- if (isEsProfile() || version < 120)
+ if (isEsProfile())
+ function = (extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) ?
+ findFunction120(loc, call, builtIn) : findFunctionExact(loc, call, builtIn);
+ else if (version < 120)
function = findFunctionExact(loc, call, builtIn);
else if (version < 400)
function = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn);
@@ -6422,6 +6568,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
type.copyArrayInnerSizes(publicType.arraySizes);
arrayOfArrayVersionCheck(loc, type.getArraySizes());
+ if (initializer) {
+ if (type.getBasicType() == EbtRayQuery) {
+ error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str());
+ }
+ }
+
if (type.isCoopMat()) {
intermediate.setUseVulkanMemoryModel();
intermediate.setUseStorageBuffer();
@@ -6461,7 +6613,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
transparentOpaqueCheck(loc, type, identifier);
#ifndef GLSLANG_WEB
atomicUintCheck(loc, type, identifier);
- accStructNVCheck(loc, type, identifier);
+ accStructCheck(loc, type, identifier);
checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
#endif
if (type.getQualifier().storage == EvqConst && type.containsReference()) {
@@ -7177,6 +7329,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
if (!node->getType().isCoopMat()) {
if (type.getBasicType() != node->getType().getBasicType()) {
node = intermediate.addConversion(type.getBasicType(), node);
+ if (node == nullptr)
+ return nullptr;
}
node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc());
} else {
@@ -7355,8 +7509,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
arraySizesCheck(memberLoc, currentBlockQualifier, memberType.getArraySizes(), nullptr, member == typeList.size() - 1);
if (memberQualifier.hasOffset()) {
if (spvVersion.spv == 0) {
- requireProfile(memberLoc, ~EEsProfile, "offset on block member");
- profileRequires(memberLoc, ~EEsProfile, 440, E_GL_ARB_enhanced_layouts, "offset on block member");
+ profileRequires(memberLoc, ~EEsProfile, 440, E_GL_ARB_enhanced_layouts, "\"offset\" on block member");
+ profileRequires(memberLoc, EEsProfile, 300, E_GL_ARB_enhanced_layouts, "\"offset\" on block member");
}
}
@@ -7395,7 +7549,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
// Special case for "push_constant uniform", which has a default of std430,
// contrary to normal uniform defaults, and can't have a default tracked for it.
if ((currentBlockQualifier.isPushConstant() && !currentBlockQualifier.hasPacking()) ||
- (currentBlockQualifier.isShaderRecordNV() && !currentBlockQualifier.hasPacking()))
+ (currentBlockQualifier.isShaderRecord() && !currentBlockQualifier.hasPacking()))
currentBlockQualifier.layoutPacking = ElpStd430;
// Special case for "taskNV in/out", which has a default of std430,
@@ -7495,6 +7649,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation);
fixXfbOffsets(currentBlockQualifier, typeList);
fixBlockUniformOffsets(currentBlockQualifier, typeList);
+ fixBlockUniformLayoutMatrix(currentBlockQualifier, &typeList, nullptr);
+ fixBlockUniformLayoutPacking(currentBlockQualifier, &typeList, nullptr);
for (unsigned int member = 0; member < typeList.size(); ++member)
layoutTypeCheck(typeList[member].loc, *typeList[member].type);
@@ -7612,6 +7768,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
// with a particular stage.
void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
{
+ const char *extsrt[2] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing };
switch (qualifier.storage) {
case EvqUniform:
profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
@@ -7621,7 +7778,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
break;
case EvqBuffer:
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "buffer block");
- profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "buffer block");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "buffer block");
profileRequires(loc, EEsProfile, 310, nullptr, "buffer block");
break;
case EvqVaryingIn:
@@ -7650,28 +7807,28 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
}
break;
#ifndef GLSLANG_WEB
- case EvqPayloadNV:
- profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV block");
- requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
+ case EvqPayload:
+ profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block");
+ requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask),
"rayPayloadNV block");
break;
- case EvqPayloadInNV:
- profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV block");
- requireStage(loc, (EShLanguageMask)(EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
+ case EvqPayloadIn:
+ profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadInNV block");
+ requireStage(loc, (EShLanguageMask)(EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask),
"rayPayloadInNV block");
break;
- case EvqHitAttrNV:
- profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV block");
- requireStage(loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask), "hitAttributeNV block");
+ case EvqHitAttr:
+ profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "hitAttributeNV block");
+ requireStage(loc, (EShLanguageMask)(EShLangIntersectMask | EShLangAnyHitMask | EShLangClosestHitMask), "hitAttributeNV block");
break;
- case EvqCallableDataNV:
- profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "callableDataNV block");
- requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask),
+ case EvqCallableData:
+ profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataNV block");
+ requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask),
"callableDataNV block");
break;
- case EvqCallableDataInNV:
- profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV block");
- requireStage(loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV block");
+ case EvqCallableDataIn:
+ profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block");
+ requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block");
break;
#endif
default:
@@ -7710,8 +7867,8 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
if (qualifier.isPushConstant())
intermediate.addPushConstantCount();
- if (qualifier.isShaderRecordNV())
- intermediate.addShaderRecordNVCount();
+ if (qualifier.isShaderRecord())
+ intermediate.addShaderRecordCount();
if (qualifier.isTaskMemory())
intermediate.addTaskNVCount();
}
@@ -7864,6 +8021,101 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ
}
}
+//
+// Spread LayoutMatrix to uniform block member, if a uniform block member is a struct,
+// we need spread LayoutMatrix to this struct member too. and keep this rule for recursive.
+//
+void TParseContext::fixBlockUniformLayoutMatrix(TQualifier& qualifier, TTypeList* originTypeList,
+ TTypeList* tmpTypeList)
+{
+ assert(tmpTypeList == nullptr || originTypeList->size() == tmpTypeList->size());
+ for (unsigned int member = 0; member < originTypeList->size(); ++member) {
+ if (qualifier.layoutPacking != ElpNone) {
+ if (tmpTypeList == nullptr) {
+ if (((*originTypeList)[member].type->isMatrix() ||
+ (*originTypeList)[member].type->getBasicType() == EbtStruct) &&
+ (*originTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) {
+ (*originTypeList)[member].type->getQualifier().layoutMatrix = qualifier.layoutMatrix;
+ }
+ } else {
+ if (((*tmpTypeList)[member].type->isMatrix() ||
+ (*tmpTypeList)[member].type->getBasicType() == EbtStruct) &&
+ (*tmpTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) {
+ (*tmpTypeList)[member].type->getQualifier().layoutMatrix = qualifier.layoutMatrix;
+ }
+ }
+ }
+
+ if ((*originTypeList)[member].type->getBasicType() == EbtStruct) {
+ TQualifier* memberQualifier = nullptr;
+ // block member can be declare a matrix style, so it should be update to the member's style
+ if ((*originTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) {
+ memberQualifier = &qualifier;
+ } else {
+ memberQualifier = &((*originTypeList)[member].type->getQualifier());
+ }
+
+ const TType* tmpType = tmpTypeList == nullptr ?
+ (*originTypeList)[member].type->clone() : (*tmpTypeList)[member].type;
+
+ fixBlockUniformLayoutMatrix(*memberQualifier, (*originTypeList)[member].type->getWritableStruct(),
+ tmpType->getWritableStruct());
+
+ const TTypeList* structure = recordStructCopy(matrixFixRecord, (*originTypeList)[member].type, tmpType);
+
+ if (tmpTypeList == nullptr) {
+ (*originTypeList)[member].type->setStruct(const_cast<TTypeList*>(structure));
+ }
+ if (tmpTypeList != nullptr) {
+ (*tmpTypeList)[member].type->setStruct(const_cast<TTypeList*>(structure));
+ }
+ }
+ }
+}
+
+//
+// Spread LayoutPacking to block member, if a block member is a struct, we need spread LayoutPacking to
+// this struct member too. and keep this rule for recursive.
+//
+void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeList* originTypeList,
+ TTypeList* tmpTypeList)
+{
+ assert(tmpTypeList == nullptr || originTypeList->size() == tmpTypeList->size());
+ for (unsigned int member = 0; member < originTypeList->size(); ++member) {
+ if (qualifier.layoutPacking != ElpNone) {
+ if (tmpTypeList == nullptr) {
+ if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+ (*originTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
+ }
+ } else {
+ if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+ (*tmpTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
+ }
+ }
+ }
+
+ if ((*originTypeList)[member].type->getBasicType() == EbtStruct) {
+ // Deep copy the type in pool.
+ // Because, struct use in different block may have different layout qualifier.
+ // We have to new a object to distinguish between them.
+ const TType* tmpType = tmpTypeList == nullptr ?
+ (*originTypeList)[member].type->clone() : (*tmpTypeList)[member].type;
+
+ fixBlockUniformLayoutPacking(qualifier, (*originTypeList)[member].type->getWritableStruct(),
+ tmpType->getWritableStruct());
+
+ const TTypeList* structure = recordStructCopy(packingFixRecord, (*originTypeList)[member].type, tmpType);
+
+ if (tmpTypeList == nullptr) {
+ (*originTypeList)[member].type->setStruct(const_cast<TTypeList*>(structure));
+ }
+ if (tmpTypeList != nullptr) {
+ (*tmpTypeList)[member].type->setStruct(const_cast<TTypeList*>(structure));
+ }
+ }
+ }
+}
+
// For an identifier that is already declared, add more qualification to it.
void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, const TString& identifier)
{
@@ -8172,6 +8424,16 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
{
checkIoArraysConsistency(loc);
}
+
+ if (publicType.shaderQualifiers.layoutPrimitiveCulling) {
+ if (publicType.qualifier.storage != EvqTemporary)
+ error(loc, "layout qualifier can not have storage qualifiers", "primitive_culling","", "");
+ else {
+ intermediate.setLayoutPrimitiveCulling();
+ }
+ // Exit early as further checks are not valid
+ return;
+ }
#endif
const TQualifier& qualifier = publicType.qualifier;
@@ -8233,7 +8495,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
error(loc, "cannot declare a default, can only be used on a block", "buffer_reference", "");
if (qualifier.hasSpecConstantId())
error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", "");
- if (qualifier.isShaderRecordNV())
+ if (qualifier.isShaderRecord())
error(loc, "cannot declare a default, can only be used on a block", "shaderRecordNV", "");
}
@@ -8322,5 +8584,43 @@ TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expre
return switchNode;
}
+//
+// When a struct used in block, and has it's own layout packing, layout matrix,
+// record the origin structure of a struct to map, and Record the structure copy to the copy table,
+//
+const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TType* originType, const TType* tmpType)
+{
+ size_t memberCount = tmpType->getStruct()->size();
+ size_t originHash = 0, tmpHash = 0;
+ std::hash<size_t> hasher;
+ for (size_t i = 0; i < memberCount; i++) {
+ size_t originMemberHash = hasher(originType->getStruct()->at(i).type->getQualifier().layoutPacking +
+ originType->getStruct()->at(i).type->getQualifier().layoutMatrix);
+ size_t tmpMemberHash = hasher(tmpType->getStruct()->at(i).type->getQualifier().layoutPacking +
+ tmpType->getStruct()->at(i).type->getQualifier().layoutMatrix);
+ originHash = hasher((originHash ^ originMemberHash) << 1);
+ tmpHash = hasher((tmpHash ^ tmpMemberHash) << 1);
+ }
+ const TTypeList* originStruct = originType->getStruct();
+ const TTypeList* tmpStruct = tmpType->getStruct();
+ if (originHash != tmpHash) {
+ auto fixRecords = record.find(originStruct);
+ if (fixRecords != record.end()) {
+ auto fixRecord = fixRecords->second.find(tmpHash);
+ if (fixRecord != fixRecords->second.end()) {
+ return fixRecord->second;
+ } else {
+ record[originStruct][tmpHash] = tmpStruct;
+ return tmpStruct;
+ }
+ } else {
+ record[originStruct] = std::map<size_t, const TTypeList*>();
+ record[originStruct][tmpHash] = tmpStruct;
+ return tmpStruct;
+ }
+ }
+ return originStruct;
+}
+
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
index 39363f1a2a..0f09adaffc 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
@@ -68,6 +68,7 @@ class TScanContext;
class TPpContext;
typedef std::set<int> TIdSetType;
+typedef std::map<const TTypeList*, std::map<size_t, const TTypeList*>> TStructRecord;
//
// Sharable code (as well as what's in TParseVersions) across
@@ -83,6 +84,7 @@ public:
scopeMangler("::"),
symbolTable(symbolTable),
statementNestingLevel(0), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0),
+ currentFunctionType(nullptr),
postEntryPointReturn(false),
contextPragma(true, false),
beginInvocationInterlockCount(0), endInvocationInterlockCount(0),
@@ -315,6 +317,7 @@ public:
TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right);
TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode);
TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field);
+ TIntermTyped* handleDotSwizzle(const TSourceLoc&, TIntermTyped* base, const TString& field);
void blockMemberExtensionCheck(const TSourceLoc&, const TIntermTyped* base, int member, const TString& memberName);
TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&);
@@ -326,6 +329,7 @@ public:
TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*);
void addInputArgumentConversions(const TFunction&, TIntermNode*&) const;
TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const;
+ TIntermTyped* addAssign(const TSourceLoc&, TOperator op, TIntermTyped* left, TIntermTyped* right);
void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
void nonOpBuiltInCheck(const TSourceLoc&, const TFunction&, TIntermAggregate&);
void userFunctionCallCheck(const TSourceLoc&, TIntermAggregate&);
@@ -358,7 +362,7 @@ public:
void boolCheck(const TSourceLoc&, const TPublicType&);
void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
- void accStructNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
+ void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
void memberQualifierCheck(glslang::TPublicType&);
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
@@ -417,12 +421,15 @@ public:
void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
void fixXfbOffsets(TQualifier&, TTypeList&);
void fixBlockUniformOffsets(TQualifier&, TTypeList&);
+ void fixBlockUniformLayoutMatrix(TQualifier&, TTypeList*, TTypeList*);
+ void fixBlockUniformLayoutPacking(TQualifier&, TTypeList*, TTypeList*);
void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier);
void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
void invariantCheck(const TSourceLoc&, const TQualifier&);
void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
+ const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*);
#ifndef GLSLANG_WEB
TAttributeType attributeFromName(const TString& name) const;
@@ -483,6 +490,8 @@ protected:
bool anyIndexLimits;
TIdSetType inductiveLoopIds;
TVector<TIntermTyped*> needsIndexLimitationChecking;
+ TStructRecord matrixFixRecord;
+ TStructRecord packingFixRecord;
//
// Geometry shader input arrays:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
index fd18fd4d7d..bd3181a74f 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
@@ -2,6 +2,8 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
+// Copyright (C) 2020 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -187,17 +189,15 @@ bool TInputScanner::scanVersion(int& version, EProfile& profile, bool& notFirstT
if (lookingInMiddle) {
notFirstToken = true;
// make forward progress by finishing off the current line plus extra new lines
- if (peek() == '\n' || peek() == '\r') {
- while (peek() == '\n' || peek() == '\r')
- get();
- } else
+ if (peek() != '\n' && peek() != '\r') {
do {
c = get();
} while (c != EndOfInput && c != '\n' && c != '\r');
- while (peek() == '\n' || peek() == '\r')
- get();
- if (peek() == EndOfInput)
- return true;
+ }
+ while (peek() == '\n' || peek() == '\r')
+ get();
+ if (peek() == EndOfInput)
+ return true;
}
lookingInMiddle = true;
@@ -416,6 +416,7 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["queuefamilycoherent"] = QUEUEFAMILYCOHERENT;
(*KeywordMap)["workgroupcoherent"] = WORKGROUPCOHERENT;
(*KeywordMap)["subgroupcoherent"] = SUBGROUPCOHERENT;
+ (*KeywordMap)["shadercallcoherent"] = SHADERCALLCOHERENT;
(*KeywordMap)["nonprivate"] = NONPRIVATE;
(*KeywordMap)["restrict"] = RESTRICT;
(*KeywordMap)["readonly"] = READONLY;
@@ -704,11 +705,18 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["precise"] = PRECISE;
(*KeywordMap)["rayPayloadNV"] = PAYLOADNV;
+ (*KeywordMap)["rayPayloadEXT"] = PAYLOADEXT;
(*KeywordMap)["rayPayloadInNV"] = PAYLOADINNV;
+ (*KeywordMap)["rayPayloadInEXT"] = PAYLOADINEXT;
(*KeywordMap)["hitAttributeNV"] = HITATTRNV;
+ (*KeywordMap)["hitAttributeEXT"] = HITATTREXT;
(*KeywordMap)["callableDataNV"] = CALLDATANV;
+ (*KeywordMap)["callableDataEXT"] = CALLDATAEXT;
(*KeywordMap)["callableDataInNV"] = CALLDATAINNV;
+ (*KeywordMap)["callableDataInEXT"] = CALLDATAINEXT;
(*KeywordMap)["accelerationStructureNV"] = ACCSTRUCTNV;
+ (*KeywordMap)["accelerationStructureEXT"] = ACCSTRUCTEXT;
+ (*KeywordMap)["rayQueryEXT"] = RAYQUERYEXT;
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
(*KeywordMap)["perviewNV"] = PERVIEWNV;
(*KeywordMap)["taskNV"] = PERTASKNV;
@@ -843,6 +851,7 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
parseContext.error(loc, "not supported", "::", "");
break;
+ case PpAtomConstString: parserToken->sType.lex.string = NewPoolTString(tokenText); return STRING_LITERAL;
case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT;
case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
@@ -908,7 +917,8 @@ int TScanContext::tokenizeIdentifier()
case BUFFER:
afterBuffer = true;
if ((parseContext.isEsProfile() && parseContext.version < 310) ||
- (!parseContext.isEsProfile() && parseContext.version < 430))
+ (!parseContext.isEsProfile() && (parseContext.version < 430 &&
+ !parseContext.extensionTurnedOn(E_GL_ARB_shader_storage_buffer_object))))
return identifierOrType();
return keyword;
@@ -1014,6 +1024,23 @@ int TScanContext::tokenizeIdentifier()
parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))
return keyword;
return identifierOrType();
+ case PAYLOADEXT:
+ case PAYLOADINEXT:
+ case HITATTREXT:
+ case CALLDATAEXT:
+ case CALLDATAINEXT:
+ case ACCSTRUCTEXT:
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) ||
+ parseContext.extensionTurnedOn(E_GL_EXT_ray_query))
+ return keyword;
+ return identifierOrType();
+ case RAYQUERYEXT:
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ (!parseContext.isEsProfile() && parseContext.version >= 460
+ && parseContext.extensionTurnedOn(E_GL_EXT_ray_query)))
+ return keyword;
+ return identifierOrType();
case ATOMIC_UINT:
if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
@@ -1025,6 +1052,7 @@ int TScanContext::tokenizeIdentifier()
case QUEUEFAMILYCOHERENT:
case WORKGROUPCOHERENT:
case SUBGROUPCOHERENT:
+ case SHADERCALLCOHERENT:
case NONPRIVATE:
case RESTRICT:
case READONLY:
@@ -1168,8 +1196,8 @@ int TScanContext::tokenizeIdentifier()
afterType = true;
if (parseContext.isEsProfile() || parseContext.version < 150 ||
(!parseContext.symbolTable.atBuiltInLevel() &&
- parseContext.version < 400 &&
- !parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)))
+ (parseContext.version < 400 && !parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) &&
+ (parseContext.version < 410 && !parseContext.extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit)))))
reservedWord();
return keyword;
@@ -1746,7 +1774,9 @@ int TScanContext::dMat()
if (!parseContext.isEsProfile() && (parseContext.version >= 400 ||
parseContext.symbolTable.atBuiltInLevel() ||
- (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64))))
+ (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)) ||
+ (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit)
+ && parseContext.language == EShLangVertex)))
return keyword;
if (parseContext.isForwardCompatible())
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
index 44ce1c19d1..9d7f37b098 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
@@ -1,7 +1,7 @@
//
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2013-2016 LunarG, Inc.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
//
// All rights reserved.
//
@@ -51,9 +51,9 @@
#include "ScanContext.h"
#ifdef ENABLE_HLSL
-#include "../../hlsl/hlslParseHelper.h"
-#include "../../hlsl/hlslParseables.h"
-#include "../../hlsl/hlslScanContext.h"
+#include "../HLSL/hlslParseHelper.h"
+#include "../HLSL/hlslParseables.h"
+#include "../HLSL/hlslScanContext.h"
#endif
#include "../Include/ShHandle.h"
@@ -72,6 +72,9 @@
// token to print ", but none of that seems appropriate for this file.
#include "preprocessor/PpTokens.h"
+// Build-time generated includes
+#include "glslang/build_info.h"
+
namespace { // anonymous namespace for file-local functions and symbols
// Total number of successful initializers of glslang: a refcount
@@ -291,6 +294,9 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
+#elif defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
#endif
(*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
@@ -312,6 +318,9 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
+#elif defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
#endif
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
@@ -351,7 +360,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
(profile == EEsProfile && version >= 310))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangGeometry, source,
infoSink, commonTable, symbolTables);
-#endif
// check for compute
if ((profile != EEsProfile && version >= 420) ||
@@ -359,19 +367,20 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
infoSink, commonTable, symbolTables);
+#ifndef GLSLANG_ANGLE
// check for ray tracing stages
if (profile != EEsProfile && version >= 450) {
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGenNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
infoSink, commonTable, symbolTables);
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersectNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersect, source,
infoSink, commonTable, symbolTables);
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHitNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHit, source,
infoSink, commonTable, symbolTables);
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHitNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHit, source,
infoSink, commonTable, symbolTables);
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMissNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMiss, source,
infoSink, commonTable, symbolTables);
- InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallableNV, source,
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallable, source,
infoSink, commonTable, symbolTables);
}
@@ -386,6 +395,8 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
infoSink, commonTable, symbolTables);
+#endif // !GLSLANG_ANGLE
+#endif // !GLSLANG_WEB
return true;
}
@@ -487,7 +498,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
// Function to Print all builtins
void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
{
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
infoSink.debug << "BuiltinSymbolTable {\n";
symbolTable.dump(infoSink, true);
@@ -591,7 +602,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
// Correct for stage type...
switch (stage) {
case EShLangGeometry:
@@ -623,12 +634,12 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
version = profile == EEsProfile ? 310 : 420;
}
break;
- case EShLangRayGenNV:
- case EShLangIntersectNV:
- case EShLangAnyHitNV:
- case EShLangClosestHitNV:
- case EShLangMissNV:
- case EShLangCallableNV:
+ case EShLangRayGen:
+ case EShLangIntersect:
+ case EShLangAnyHit:
+ case EShLangClosestHit:
+ case EShLangMiss:
+ case EShLangCallable:
if (profile == EEsProfile || version < 460) {
correct = false;
infoSink.info.message(EPrefixError, "#version: ray tracing shaders require non-es profile with version 460 or above");
@@ -716,6 +727,9 @@ void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages
case EShClientOpenGL:
spvVersion.openGl = environment->input.dialectVersion;
break;
+ case EShClientCount:
+ assert(0);
+ break;
}
switch (environment->input.languageFamily) {
case EShSourceNone:
@@ -728,6 +742,9 @@ void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages
source = EShSourceHlsl;
messages = static_cast<EShMessages>(messages | EShMsgReadHlsl);
break;
+ case EShSourceCount:
+ assert(0);
+ break;
}
}
@@ -861,7 +878,7 @@ bool ProcessDeferred(
: userInput.scanVersion(version, profile, versionNotFirstToken);
bool versionNotFound = version == 0;
if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
(version != defaultVersion || profile != defaultProfile)) {
compiler->infoSink.info << "Warning, (version, profile) forced to be ("
@@ -884,10 +901,13 @@ bool ProcessDeferred(
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
+#elif defined(GLSLANG_ANGLE)
+ profile = ECoreProfile;
+ version = 450;
#endif
bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
bool warnVersionNotFirst = false;
if (! versionWillBeError && versionNotFirstToken) {
if (messages & EShMsgRelaxedErrors)
@@ -957,7 +977,7 @@ bool ProcessDeferred(
parseContext->setLimits(*resources);
if (! goodVersion)
parseContext->addError();
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
if (warnVersionNotFirst) {
TSourceLoc loc;
loc.init();
@@ -994,7 +1014,7 @@ bool ProcessDeferred(
return success;
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
// Responsible for keeping track of the most recent source string and line in
// the preprocessor and outputting newlines appropriately if the source string
@@ -1217,14 +1237,16 @@ struct DoFullParse{
parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
}
+#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate.output(parseContext.infoSink, true);
+#endif
return success;
}
};
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
// Take a single compilation unit, and run the preprocessor on it.
// Return: True if there were no issues found in preprocessing,
// False if during preprocessing any unknown version, pragmas or
@@ -1678,19 +1700,29 @@ int ShGetUniformLocation(const ShHandle handle, const char* name)
namespace glslang {
-#include "../Include/revision.h"
+Version GetVersion()
+{
+ Version version;
+ version.major = GLSLANG_VERSION_MAJOR;
+ version.minor = GLSLANG_VERSION_MINOR;
+ version.patch = GLSLANG_VERSION_PATCH;
+ version.flavor = GLSLANG_VERSION_FLAVOR;
+ return version;
+}
#define QUOTE(s) #s
#define STR(n) QUOTE(n)
const char* GetEsslVersionString()
{
- return "OpenGL ES GLSL 3.20 glslang Khronos. " STR(GLSLANG_MINOR_VERSION) "." STR(GLSLANG_PATCH_LEVEL);
+ return "OpenGL ES GLSL 3.20 glslang Khronos. " STR(GLSLANG_VERSION_MAJOR) "." STR(GLSLANG_VERSION_MINOR) "." STR(
+ GLSLANG_VERSION_PATCH) GLSLANG_VERSION_FLAVOR;
}
const char* GetGlslVersionString()
{
- return "4.60 glslang Khronos. " STR(GLSLANG_MINOR_VERSION) "." STR(GLSLANG_PATCH_LEVEL);
+ return "4.60 glslang Khronos. " STR(GLSLANG_VERSION_MAJOR) "." STR(GLSLANG_VERSION_MINOR) "." STR(
+ GLSLANG_VERSION_PATCH) GLSLANG_VERSION_FLAVOR;
}
int GetKhronosToolId()
@@ -1771,6 +1803,8 @@ void TShader::setSourceEntryPoint(const char* name)
sourceEntryPointName = name;
}
+// Log initial settings and transforms.
+// See comment for class TProcesses.
void TShader::addProcesses(const std::vector<std::string>& p)
{
intermediate->addProcesses(p);
@@ -1852,7 +1886,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
&environment);
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
// Fill in a string with the result of preprocessing ShaderStrings
// Returns true if all extensions, pragmas and version strings were valid.
//
@@ -1890,7 +1924,7 @@ const char* TShader::getInfoDebugLog()
}
TProgram::TProgram() :
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
reflection(0),
#endif
linked(false)
@@ -1906,7 +1940,7 @@ TProgram::TProgram() :
TProgram::~TProgram()
{
delete infoSink;
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
delete reflection;
#endif
@@ -1953,7 +1987,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
if (stages[stage].size() == 0)
return true;
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
int numEsShaders = 0, numNonEsShaders = 0;
for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
if ((*it)->intermediate->getProfile() == EEsProfile) {
@@ -2007,8 +2041,10 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
#endif
intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
+#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate[stage]->output(*infoSink, true);
+#endif
return intermediate[stage]->getNumErrors() == 0;
}
@@ -2023,7 +2059,7 @@ const char* TProgram::getInfoDebugLog()
return infoSink->debug.c_str();
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
//
// Reflection implementation.
@@ -2105,6 +2141,6 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
return ioMapper->doMap(pResolver, *infoSink);
}
-#endif // GLSLANG_WEB
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
index 44682379f7..007f22c1b4 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
@@ -3,6 +3,7 @@
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
// Copyright (C) 2015-2018 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -74,7 +75,8 @@ void TType::buildMangledName(TString& mangledName) const
case EbtInt64: mangledName += "i64"; break;
case EbtUint64: mangledName += "u64"; break;
case EbtAtomicUint: mangledName += "au"; break;
- case EbtAccStructNV: mangledName += "asnv"; break;
+ case EbtAccStruct: mangledName += "as"; break;
+ case EbtRayQuery: mangledName += "rq"; break;
#endif
case EbtSampler:
switch (sampler.type) {
@@ -120,7 +122,7 @@ void TType::buildMangledName(TString& mangledName) const
mangledName += "-tx-struct";
char text[16]; // plenty enough space for the small integers.
- snprintf(text, sizeof(text), "%d-", sampler.getStructReturnIndex());
+ snprintf(text, sizeof(text), "%u-", sampler.getStructReturnIndex());
mangledName += text;
} else {
switch (sampler.getVectorSize()) {
@@ -176,7 +178,7 @@ void TType::buildMangledName(TString& mangledName) const
}
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
//
// Dump functions.
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
index 40ca3da532..ec4bc3c599 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
@@ -117,7 +117,7 @@ public:
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
virtual const char** getExtensions() const { return extensions->data(); }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
void dumpExtensions(TInfoSink& infoSink) const;
#endif
@@ -196,7 +196,7 @@ public:
}
virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
virtual void dump(TInfoSink& infoSink, bool complete = false) const;
#endif
@@ -319,7 +319,7 @@ public:
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
virtual const TParameter& operator[](int i) const { return parameters[i]; }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
#endif
@@ -381,7 +381,7 @@ public:
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
virtual int getAnonId() const { return anonId; }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
#endif
@@ -551,7 +551,7 @@ public:
void relateToOperator(const char* name, TOperator op);
void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
void dump(TInfoSink& infoSink, bool complete = false) const;
#endif
TSymbolTableLevel* clone() const;
@@ -854,7 +854,7 @@ public:
}
int getMaxSymbolId() { return uniqueId; }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
void dump(TInfoSink& infoSink, bool complete = false) const;
#endif
void copyTable(const TSymbolTable& copyOf);
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
index e549074df8..896fd5ae20 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
@@ -2,7 +2,8 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2020 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -63,6 +64,7 @@
// checkDeprecated()
// requireNotRemoved()
// requireExtensions()
+// extensionRequires()
//
// Typically, only the first two calls are needed. They go into a code path that
// implements Feature F, and will log the proper error/warning messages. Parsing
@@ -77,9 +79,11 @@
// const char* const XXX_extension_X = "XXX_extension_X";
//
// 2) Add extension initialization to TParseVersions::initializeExtensionBehavior(),
-// the first function below:
+// the first function below and optionally a entry to extensionData for additional
+// error checks:
//
// extensionBehavior[XXX_extension_X] = EBhDisable;
+// (Optional) exts[] = {XXX_extension_X, EShTargetSpv_1_4}
//
// 3) Add any preprocessor directives etc. in the next function, TParseVersions::getPreamble():
//
@@ -139,6 +143,8 @@
// set of extensions that both enable them and are necessary, given the version of the symbol
// table. (There is a different symbol table for each version.)
//
+// 7) If the extension has additional requirements like minimum SPIR-V version required, add them
+// to extensionRequires()
#include "parseVersions.h"
#include "localintermediate.h"
@@ -154,6 +160,20 @@ namespace glslang {
//
void TParseVersions::initializeExtensionBehavior()
{
+ typedef struct {
+ const char *const extensionName;
+ EShTargetLanguageVersion minSpvVersion;
+ } extensionData;
+
+ const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4} };
+
+ for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
+ // Add only extensions which require > spv1.0 to save space in map
+ if (exts[ii].minSpvVersion > EShTargetSpv_1_0) {
+ extensionMinSpv[E_GL_EXT_ray_tracing] = exts[ii].minSpvVersion;
+ }
+ }
+
extensionBehavior[E_GL_OES_texture_3D] = EBhDisable;
extensionBehavior[E_GL_OES_standard_derivatives] = EBhDisable;
extensionBehavior[E_GL_EXT_frag_depth] = EBhDisable;
@@ -196,6 +216,12 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_shader_clock] = EBhDisable;
extensionBehavior[E_GL_ARB_uniform_buffer_object] = EBhDisable;
extensionBehavior[E_GL_ARB_sample_shading] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_bit_encoding] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_image_size] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_storage_buffer_object] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable;
+ extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable;
+ extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable;
extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable;
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
@@ -221,6 +247,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_buffer_reference2] = EBhDisable;
extensionBehavior[E_GL_EXT_buffer_reference_uvec2] = EBhDisable;
extensionBehavior[E_GL_EXT_demote_to_helper_invocation] = EBhDisable;
+ extensionBehavior[E_GL_EXT_debug_printf] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
@@ -289,11 +316,17 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_OES_tessellation_point_size] = EBhDisable;
extensionBehavior[E_GL_OES_texture_buffer] = EBhDisable;
extensionBehavior[E_GL_OES_texture_cube_map_array] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_integer_mix] = EBhDisable;
// EXT extensions
- extensionBehavior[E_GL_EXT_device_group] = EBhDisable;
- extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
- extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
+ extensionBehavior[E_GL_EXT_device_group] = EBhDisable;
+ extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
+ extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable;
+ extensionBehavior[E_GL_EXT_ray_query] = EBhDisable;
+ extensionBehavior[E_GL_EXT_ray_flags_primitive_culling] = EBhDisable;
+ extensionBehavior[E_GL_EXT_blend_func_extended] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable;
// OVR extensions
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
@@ -314,7 +347,9 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int16] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
}
+
#endif // GLSLANG_WEB
// Get code that is not part of a shared symbol table, is specific to this shader,
@@ -352,6 +387,9 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_tessellation_point_size 1\n"
"#define GL_EXT_texture_buffer 1\n"
"#define GL_EXT_texture_cube_map_array 1\n"
+ "#define GL_EXT_shader_implicit_conversions 1\n"
+ "#define GL_EXT_shader_integer_mix 1\n"
+ "#define GL_EXT_blend_func_extended 1\n"
// OES matching AEP
"#define GL_OES_geometry_shader 1\n"
@@ -400,10 +438,16 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_ARB_sparse_texture_clamp 1\n"
"#define GL_ARB_shader_stencil_export 1\n"
"#define GL_ARB_sample_shading 1\n"
+ "#define GL_ARB_shader_image_size 1\n"
+ "#define GL_ARB_shading_language_packing 1\n"
// "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members
"#define GL_ARB_post_depth_coverage 1\n"
"#define GL_ARB_fragment_shader_interlock 1\n"
"#define GL_ARB_uniform_buffer_object 1\n"
+ "#define GL_ARB_shader_bit_encoding 1\n"
+ "#define GL_ARB_shader_storage_buffer_object 1\n"
+ "#define GL_ARB_texture_query_lod 1\n"
+ "#define GL_ARB_vertex_attrib_64bit 1\n"
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
"#define GL_EXT_shader_image_load_formatted 1\n"
"#define GL_EXT_post_depth_coverage 1\n"
@@ -418,6 +462,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_buffer_reference2 1\n"
"#define GL_EXT_buffer_reference_uvec2 1\n"
"#define GL_EXT_demote_to_helper_invocation 1\n"
+ "#define GL_EXT_debug_printf 1\n"
// GL_KHR_shader_subgroup
"#define GL_KHR_shader_subgroup_basic 1\n"
@@ -429,8 +474,11 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_KHR_shader_subgroup_clustered 1\n"
"#define GL_KHR_shader_subgroup_quad 1\n"
- "#define E_GL_EXT_shader_atomic_int64 1\n"
- "#define E_GL_EXT_shader_realtime_clock 1\n"
+ "#define GL_EXT_shader_atomic_int64 1\n"
+ "#define GL_EXT_shader_realtime_clock 1\n"
+ "#define GL_EXT_ray_tracing 1\n"
+ "#define GL_EXT_ray_query 1\n"
+ "#define GL_EXT_ray_flags_primitive_culling 1\n"
"#define GL_AMD_shader_ballot 1\n"
"#define GL_AMD_shader_trinary_minmax 1\n"
@@ -473,6 +521,8 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_shader_subgroup_extended_types_int16 1\n"
"#define GL_EXT_shader_subgroup_extended_types_int64 1\n"
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
+
+ "#define GL_EXT_shader_atomic_float 1\n"
;
if (version >= 150) {
@@ -544,12 +594,12 @@ const char* StageName(EShLanguage stage)
case EShLangTessControl: return "tessellation control";
case EShLangTessEvaluation: return "tessellation evaluation";
case EShLangGeometry: return "geometry";
- case EShLangRayGenNV: return "ray-generation";
- case EShLangIntersectNV: return "intersection";
- case EShLangAnyHitNV: return "any-hit";
- case EShLangClosestHitNV: return "closest-hit";
- case EShLangMissNV: return "miss";
- case EShLangCallableNV: return "callable";
+ case EShLangRayGen: return "ray-generation";
+ case EShLangIntersect: return "intersection";
+ case EShLangAnyHit: return "any-hit";
+ case EShLangClosestHit: return "closest-hit";
+ case EShLangMiss: return "miss";
+ case EShLangCallable: return "callable";
case EShLangMeshNV: return "mesh";
case EShLangTaskNV: return "task";
#endif
@@ -712,7 +762,8 @@ bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExte
// Use when there are no profile/version to check, it's just an error if one of the
// extensions is not present.
//
-void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
+void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[],
+ const char* featureDesc)
{
if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc))
return;
@@ -731,7 +782,8 @@ void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions,
// Use by preprocessor when there are no profile/version to check, it's just an error if one of the
// extensions is not present.
//
-void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
+void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[],
+ const char* featureDesc)
{
if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc))
return;
@@ -797,10 +849,14 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
error(getCurrentLoc(), "behavior not supported:", "#extension", behaviorString);
return;
}
+ bool on = behavior != EBhDisable;
// check if extension is used with correct shader stage
checkExtensionStage(getCurrentLoc(), extension);
+ // check if extension has additional requirements
+ extensionRequires(getCurrentLoc(), extension ,behaviorString);
+
// update the requested extension
updateExtensionBehavior(extension, behavior);
@@ -863,6 +919,32 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int64", behaviorString);
else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_float16") == 0)
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_float16", behaviorString);
+
+ // see if we need to update the numeric features
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int8") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int8, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int16") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int16, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int32") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int32, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int64") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int64, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float16") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float16, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float32") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float32, on);
+ else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float64") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float64, on);
+ else if (strcmp(extension, "GL_EXT_shader_implicit_conversions") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::shader_implicit_conversions, on);
+ else if (strcmp(extension, "GL_ARB_gpu_shader_fp64") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_fp64, on);
+ else if (strcmp(extension, "GL_AMD_gpu_shader_int16") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_int16, on);
+ else if (strcmp(extension, "GL_AMD_gpu_shader_half_float") == 0)
+ intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_half_float, on);
}
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
@@ -898,7 +980,7 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
} else {
if (iter->second == EBhDisablePartial)
warn(getCurrentLoc(), "extension is only partially supported:", "#extension", extension);
- if (behavior == EBhEnable || behavior == EBhRequire)
+ if (behavior != EBhDisable)
intermediate.addRequestedExtension(extension);
iter->second = behavior;
}
@@ -917,6 +999,24 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
}
}
+// Check if extension has additional requirements
+void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const extension, const char *behaviorString)
+{
+ bool isEnabled = false;
+ if (!strcmp("require", behaviorString))
+ isEnabled = true;
+ else if (!strcmp("enable", behaviorString))
+ isEnabled = true;
+
+ if (isEnabled) {
+ unsigned int minSpvVersion = 0;
+ auto iter = extensionMinSpv.find(TString(extension));
+ if (iter != extensionMinSpv.end())
+ minSpvVersion = iter->second;
+ requireSpv(loc, extension, minSpvVersion);
+ }
+}
+
// Call for any operation needing full GLSL integer data-type support.
void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
{
@@ -927,8 +1027,13 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
// Call for any operation needing GLSL double data-type support.
void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op)
{
+
//requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
- profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op);
+ if (language == EShLangVertex) {
+ const char* const f64_Extensions[] = {E_GL_ARB_gpu_shader_fp64, E_GL_ARB_vertex_attrib_64bit};
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, 2, f64_Extensions, op);
+ } else
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op);
}
// Call for any operation needing GLSL float16 data-type support.
@@ -1169,5 +1274,12 @@ void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
error(loc, "only allowed when generating SPIR-V", op, "");
#endif
}
+void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version)
+{
+#ifndef GLSLANG_WEB
+ if (spvVersion.spv < version)
+ error(loc, "not supported for current targeted SPIR-V version", op, "");
+#endif
+}
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.h b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
index 58558e595a..f52f605ea8 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
@@ -3,6 +3,7 @@
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
// Copyright (C) 2015-2018 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -35,9 +36,12 @@
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
+
#ifndef _VERSIONS_INCLUDED_
#define _VERSIONS_INCLUDED_
+#define LAST_ELEMENT_MARKER(x) x
+
//
// Help manage multiple profiles, versions, extensions etc.
//
@@ -49,12 +53,13 @@
// Don't maintain an ordinal set of enums (0,1,2,3...) to avoid all possible
// defects from mixing the two different forms.
//
-typedef enum {
+typedef enum : unsigned {
EBadProfile = 0,
ENoProfile = (1 << 0), // only for desktop, before profiles showed up
ECoreProfile = (1 << 1),
ECompatibilityProfile = (1 << 2),
- EEsProfile = (1 << 3)
+ EEsProfile = (1 << 3),
+ LAST_ELEMENT_MARKER(EProfileCount),
} EProfile;
namespace glslang {
@@ -148,6 +153,12 @@ const char* const E_GL_ARB_fragment_shader_interlock = "GL_ARB_fragment_shade
const char* const E_GL_ARB_shader_clock = "GL_ARB_shader_clock";
const char* const E_GL_ARB_uniform_buffer_object = "GL_ARB_uniform_buffer_object";
const char* const E_GL_ARB_sample_shading = "GL_ARB_sample_shading";
+const char* const E_GL_ARB_shader_bit_encoding = "GL_ARB_shader_bit_encoding";
+const char* const E_GL_ARB_shader_image_size = "GL_ARB_shader_image_size";
+const char* const E_GL_ARB_shader_storage_buffer_object = "GL_ARB_shader_storage_buffer_object";
+const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing";
+const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod";
+const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit";
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
@@ -182,6 +193,12 @@ const char* const E_GL_EXT_buffer_reference2 = "GL_EXT_buffer_ref
const char* const E_GL_EXT_buffer_reference_uvec2 = "GL_EXT_buffer_reference_uvec2";
const char* const E_GL_EXT_demote_to_helper_invocation = "GL_EXT_demote_to_helper_invocation";
const char* const E_GL_EXT_shader_realtime_clock = "GL_EXT_shader_realtime_clock";
+const char* const E_GL_EXT_debug_printf = "GL_EXT_debug_printf";
+const char* const E_GL_EXT_ray_tracing = "GL_EXT_ray_tracing";
+const char* const E_GL_EXT_ray_query = "GL_EXT_ray_query";
+const char* const E_GL_EXT_ray_flags_primitive_culling = "GL_EXT_ray_flags_primitive_culling";
+const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func_extended";
+const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions";
// Arrays of extensions for the above viewportEXTs duplications
@@ -253,6 +270,7 @@ const char* const E_GL_EXT_tessellation_shader = "GL_EXT_tessel
const char* const E_GL_EXT_tessellation_point_size = "GL_EXT_tessellation_point_size";
const char* const E_GL_EXT_texture_buffer = "GL_EXT_texture_buffer";
const char* const E_GL_EXT_texture_cube_map_array = "GL_EXT_texture_cube_map_array";
+const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix";
// OES matching AEP
const char* const E_GL_OES_geometry_shader = "GL_OES_geometry_shader";
@@ -280,6 +298,8 @@ const char* const E_GL_EXT_shader_subgroup_extended_types_int16 = "GL_EXT_shad
const char* const E_GL_EXT_shader_subgroup_extended_types_int64 = "GL_EXT_shader_subgroup_extended_types_int64";
const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shader_subgroup_extended_types_float16";
+const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
+
// Arrays of extensions for the above AEP duplications
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
diff --git a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
index b6f613bced..b9372d4bbb 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
@@ -52,6 +52,14 @@
#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FE5
#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FE6
#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FE7
+#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
+#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
+#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
+
+#define GL_INT16_NV 0x8FE4
+#define GL_INT16_VEC2_NV 0x8FE5
+#define GL_INT16_VEC3_NV 0x8FE6
+#define GL_INT16_VEC4_NV 0x8FE7
#define GL_BOOL 0x8B56
#define GL_BOOL_VEC2 0x8B57
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang.y b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
index 9f30fdb2ab..23adcb057e 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang.y
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
@@ -2,7 +2,8 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2013 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
-// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) 2015-2019 Google, Inc.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -204,6 +205,8 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
%token <lex> ATOMIC_UINT
%token <lex> ACCSTRUCTNV
+%token <lex> ACCSTRUCTEXT
+%token <lex> RAYQUERYEXT
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
// combined image/sampler
@@ -263,6 +266,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
%token <lex> MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN
%token <lex> SUB_ASSIGN
+%token <lex> STRING_LITERAL
%token <lex> LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT
%token <lex> COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT
@@ -285,9 +289,10 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> INT64CONSTANT UINT64CONSTANT
%token <lex> SUBROUTINE DEMOTE
%token <lex> PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
+%token <lex> PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT
%token <lex> PATCH SAMPLE NONUNIFORM
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
-%token <lex> SUBGROUPCOHERENT NONPRIVATE
+%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
%token <lex> PRECISE
@@ -377,6 +382,9 @@ primary_expression
$$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
}
+ | STRING_LITERAL {
+ $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true);
+ }
| INT32CONSTANT {
parseContext.explicitInt32Check($1.loc, "32-bit signed literal");
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
@@ -770,7 +778,7 @@ assignment_expression
parseContext.specializationCheck($2.loc, $1->getType(), "=");
parseContext.lValueErrorCheck($2.loc, "assign", $1);
parseContext.rValueErrorCheck($2.loc, "assign", $3);
- $$ = parseContext.intermediate.addAssign($2.op, $1, $3, $2.loc);
+ $$ = parseContext.addAssign($2.loc, $2.op, $1, $3);
if ($$ == 0) {
parseContext.assignError($2.loc, "assign", $1->getCompleteString(), $3->getCompleteString());
$$ = $1;
@@ -1415,42 +1423,81 @@ storage_qualifier
}
| HITATTRNV {
parseContext.globalCheck($1.loc, "hitAttributeNV");
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
- | EShLangAnyHitNVMask), "hitAttributeNV");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
+ | EShLangAnyHitMask), "hitAttributeNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
$$.init($1.loc);
- $$.qualifier.storage = EvqHitAttrNV;
+ $$.qualifier.storage = EvqHitAttr;
+ }
+ | HITATTREXT {
+ parseContext.globalCheck($1.loc, "hitAttributeEXT");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
+ | EShLangAnyHitMask), "hitAttributeEXT");
+ parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqHitAttr;
}
| PAYLOADNV {
parseContext.globalCheck($1.loc, "rayPayloadNV");
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
- EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
$$.init($1.loc);
- $$.qualifier.storage = EvqPayloadNV;
+ $$.qualifier.storage = EvqPayload;
+ }
+ | PAYLOADEXT {
+ parseContext.globalCheck($1.loc, "rayPayloadEXT");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT");
+ parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqPayload;
}
| PAYLOADINNV {
parseContext.globalCheck($1.loc, "rayPayloadInNV");
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
- EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
$$.init($1.loc);
- $$.qualifier.storage = EvqPayloadInNV;
+ $$.qualifier.storage = EvqPayloadIn;
+ }
+ | PAYLOADINEXT {
+ parseContext.globalCheck($1.loc, "rayPayloadInEXT");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT");
+ parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqPayloadIn;
}
| CALLDATANV {
parseContext.globalCheck($1.loc, "callableDataNV");
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask |
- EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
+ EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
$$.init($1.loc);
- $$.qualifier.storage = EvqCallableDataNV;
+ $$.qualifier.storage = EvqCallableData;
+ }
+ | CALLDATAEXT {
+ parseContext.globalCheck($1.loc, "callableDataEXT");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
+ EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT");
+ parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqCallableData;
}
| CALLDATAINNV {
parseContext.globalCheck($1.loc, "callableDataInNV");
- parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV");
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
$$.init($1.loc);
- $$.qualifier.storage = EvqCallableDataInNV;
+ $$.qualifier.storage = EvqCallableDataIn;
+ }
+ | CALLDATAINEXT {
+ parseContext.globalCheck($1.loc, "callableDataInEXT");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT");
+ parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqCallableDataIn;
}
| COHERENT {
$$.init($1.loc);
@@ -1481,6 +1528,11 @@ storage_qualifier
parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate");
$$.qualifier.nonprivate = true;
}
+ | SHADERCALLCOHERENT {
+ $$.init($1.loc);
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent");
+ $$.qualifier.shadercallcoherent = true;
+ }
| VOLATILE {
$$.init($1.loc);
$$.qualifier.volatil = true;
@@ -2350,7 +2402,15 @@ type_specifier_nonarray
}
| ACCSTRUCTNV {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
- $$.basicType = EbtAccStructNV;
+ $$.basicType = EbtAccStruct;
+ }
+ | ACCSTRUCTEXT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtAccStruct;
+ }
+ | RAYQUERYEXT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtRayQuery;
}
| ATOMIC_UINT {
parseContext.vulkanRemoved($1.loc, "atomic counter types");
@@ -3782,6 +3842,14 @@ function_definition
: function_prototype {
$1.function = parseContext.handleFunctionDeclarator($1.loc, *$1.function, false /* not prototype */);
$1.intermNode = parseContext.handleFunctionDefinition($1.loc, *$1.function);
+
+ // For ES 100 only, according to ES shading language 100 spec: A function
+ // body has a scope nested inside the function's definition.
+ if (parseContext.profile == EEsProfile && parseContext.version == 100)
+ {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ }
}
compound_statement_no_new_scope {
// May be best done as post process phase on intermediate code
@@ -3797,6 +3865,17 @@ function_definition
$$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
$$->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
$$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable);
+
+ // Set currentFunctionType to empty pointer when goes outside of the function
+ parseContext.currentFunctionType = nullptr;
+
+ // For ES 100 only, according to ES shading language 100 spec: A function
+ // body has a scope nested inside the function's definition.
+ if (parseContext.profile == EEsProfile && parseContext.version == 100)
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ }
}
;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
index 2a47faada4..ac35797797 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
@@ -62,7 +62,7 @@
/* Copy the first part of user declarations. */
-#line 68 "MachineIndependent/glslang.y" /* yacc.c:339 */
+#line 69 "MachineIndependent/glslang.y" /* yacc.c:339 */
/* Based on:
@@ -281,256 +281,265 @@ extern int yydebug;
F64MAT4X4 = 413,
ATOMIC_UINT = 414,
ACCSTRUCTNV = 415,
- FCOOPMATNV = 416,
- ICOOPMATNV = 417,
- UCOOPMATNV = 418,
- SAMPLERCUBEARRAY = 419,
- SAMPLERCUBEARRAYSHADOW = 420,
- ISAMPLERCUBEARRAY = 421,
- USAMPLERCUBEARRAY = 422,
- SAMPLER1D = 423,
- SAMPLER1DARRAY = 424,
- SAMPLER1DARRAYSHADOW = 425,
- ISAMPLER1D = 426,
- SAMPLER1DSHADOW = 427,
- SAMPLER2DRECT = 428,
- SAMPLER2DRECTSHADOW = 429,
- ISAMPLER2DRECT = 430,
- USAMPLER2DRECT = 431,
- SAMPLERBUFFER = 432,
- ISAMPLERBUFFER = 433,
- USAMPLERBUFFER = 434,
- SAMPLER2DMS = 435,
- ISAMPLER2DMS = 436,
- USAMPLER2DMS = 437,
- SAMPLER2DMSARRAY = 438,
- ISAMPLER2DMSARRAY = 439,
- USAMPLER2DMSARRAY = 440,
- SAMPLEREXTERNALOES = 441,
- SAMPLEREXTERNAL2DY2YEXT = 442,
- ISAMPLER1DARRAY = 443,
- USAMPLER1D = 444,
- USAMPLER1DARRAY = 445,
- F16SAMPLER1D = 446,
- F16SAMPLER2D = 447,
- F16SAMPLER3D = 448,
- F16SAMPLER2DRECT = 449,
- F16SAMPLERCUBE = 450,
- F16SAMPLER1DARRAY = 451,
- F16SAMPLER2DARRAY = 452,
- F16SAMPLERCUBEARRAY = 453,
- F16SAMPLERBUFFER = 454,
- F16SAMPLER2DMS = 455,
- F16SAMPLER2DMSARRAY = 456,
- F16SAMPLER1DSHADOW = 457,
- F16SAMPLER2DSHADOW = 458,
- F16SAMPLER1DARRAYSHADOW = 459,
- F16SAMPLER2DARRAYSHADOW = 460,
- F16SAMPLER2DRECTSHADOW = 461,
- F16SAMPLERCUBESHADOW = 462,
- F16SAMPLERCUBEARRAYSHADOW = 463,
- IMAGE1D = 464,
- IIMAGE1D = 465,
- UIMAGE1D = 466,
- IMAGE2D = 467,
- IIMAGE2D = 468,
- UIMAGE2D = 469,
- IMAGE3D = 470,
- IIMAGE3D = 471,
- UIMAGE3D = 472,
- IMAGE2DRECT = 473,
- IIMAGE2DRECT = 474,
- UIMAGE2DRECT = 475,
- IMAGECUBE = 476,
- IIMAGECUBE = 477,
- UIMAGECUBE = 478,
- IMAGEBUFFER = 479,
- IIMAGEBUFFER = 480,
- UIMAGEBUFFER = 481,
- IMAGE1DARRAY = 482,
- IIMAGE1DARRAY = 483,
- UIMAGE1DARRAY = 484,
- IMAGE2DARRAY = 485,
- IIMAGE2DARRAY = 486,
- UIMAGE2DARRAY = 487,
- IMAGECUBEARRAY = 488,
- IIMAGECUBEARRAY = 489,
- UIMAGECUBEARRAY = 490,
- IMAGE2DMS = 491,
- IIMAGE2DMS = 492,
- UIMAGE2DMS = 493,
- IMAGE2DMSARRAY = 494,
- IIMAGE2DMSARRAY = 495,
- UIMAGE2DMSARRAY = 496,
- F16IMAGE1D = 497,
- F16IMAGE2D = 498,
- F16IMAGE3D = 499,
- F16IMAGE2DRECT = 500,
- F16IMAGECUBE = 501,
- F16IMAGE1DARRAY = 502,
- F16IMAGE2DARRAY = 503,
- F16IMAGECUBEARRAY = 504,
- F16IMAGEBUFFER = 505,
- F16IMAGE2DMS = 506,
- F16IMAGE2DMSARRAY = 507,
- TEXTURECUBEARRAY = 508,
- ITEXTURECUBEARRAY = 509,
- UTEXTURECUBEARRAY = 510,
- TEXTURE1D = 511,
- ITEXTURE1D = 512,
- UTEXTURE1D = 513,
- TEXTURE1DARRAY = 514,
- ITEXTURE1DARRAY = 515,
- UTEXTURE1DARRAY = 516,
- TEXTURE2DRECT = 517,
- ITEXTURE2DRECT = 518,
- UTEXTURE2DRECT = 519,
- TEXTUREBUFFER = 520,
- ITEXTUREBUFFER = 521,
- UTEXTUREBUFFER = 522,
- TEXTURE2DMS = 523,
- ITEXTURE2DMS = 524,
- UTEXTURE2DMS = 525,
- TEXTURE2DMSARRAY = 526,
- ITEXTURE2DMSARRAY = 527,
- UTEXTURE2DMSARRAY = 528,
- F16TEXTURE1D = 529,
- F16TEXTURE2D = 530,
- F16TEXTURE3D = 531,
- F16TEXTURE2DRECT = 532,
- F16TEXTURECUBE = 533,
- F16TEXTURE1DARRAY = 534,
- F16TEXTURE2DARRAY = 535,
- F16TEXTURECUBEARRAY = 536,
- F16TEXTUREBUFFER = 537,
- F16TEXTURE2DMS = 538,
- F16TEXTURE2DMSARRAY = 539,
- SUBPASSINPUT = 540,
- SUBPASSINPUTMS = 541,
- ISUBPASSINPUT = 542,
- ISUBPASSINPUTMS = 543,
- USUBPASSINPUT = 544,
- USUBPASSINPUTMS = 545,
- F16SUBPASSINPUT = 546,
- F16SUBPASSINPUTMS = 547,
- LEFT_OP = 548,
- RIGHT_OP = 549,
- INC_OP = 550,
- DEC_OP = 551,
- LE_OP = 552,
- GE_OP = 553,
- EQ_OP = 554,
- NE_OP = 555,
- AND_OP = 556,
- OR_OP = 557,
- XOR_OP = 558,
- MUL_ASSIGN = 559,
- DIV_ASSIGN = 560,
- ADD_ASSIGN = 561,
- MOD_ASSIGN = 562,
- LEFT_ASSIGN = 563,
- RIGHT_ASSIGN = 564,
- AND_ASSIGN = 565,
- XOR_ASSIGN = 566,
- OR_ASSIGN = 567,
- SUB_ASSIGN = 568,
- LEFT_PAREN = 569,
- RIGHT_PAREN = 570,
- LEFT_BRACKET = 571,
- RIGHT_BRACKET = 572,
- LEFT_BRACE = 573,
- RIGHT_BRACE = 574,
- DOT = 575,
- COMMA = 576,
- COLON = 577,
- EQUAL = 578,
- SEMICOLON = 579,
- BANG = 580,
- DASH = 581,
- TILDE = 582,
- PLUS = 583,
- STAR = 584,
- SLASH = 585,
- PERCENT = 586,
- LEFT_ANGLE = 587,
- RIGHT_ANGLE = 588,
- VERTICAL_BAR = 589,
- CARET = 590,
- AMPERSAND = 591,
- QUESTION = 592,
- INVARIANT = 593,
- HIGH_PRECISION = 594,
- MEDIUM_PRECISION = 595,
- LOW_PRECISION = 596,
- PRECISION = 597,
- PACKED = 598,
- RESOURCE = 599,
- SUPERP = 600,
- FLOATCONSTANT = 601,
- INTCONSTANT = 602,
- UINTCONSTANT = 603,
- BOOLCONSTANT = 604,
- IDENTIFIER = 605,
- TYPE_NAME = 606,
- CENTROID = 607,
- IN = 608,
- OUT = 609,
- INOUT = 610,
- STRUCT = 611,
- VOID = 612,
- WHILE = 613,
- BREAK = 614,
- CONTINUE = 615,
- DO = 616,
- ELSE = 617,
- FOR = 618,
- IF = 619,
- DISCARD = 620,
- RETURN = 621,
- SWITCH = 622,
- CASE = 623,
- DEFAULT = 624,
- UNIFORM = 625,
- SHARED = 626,
- BUFFER = 627,
- FLAT = 628,
- SMOOTH = 629,
- LAYOUT = 630,
- DOUBLECONSTANT = 631,
- INT16CONSTANT = 632,
- UINT16CONSTANT = 633,
- FLOAT16CONSTANT = 634,
- INT32CONSTANT = 635,
- UINT32CONSTANT = 636,
- INT64CONSTANT = 637,
- UINT64CONSTANT = 638,
- SUBROUTINE = 639,
- DEMOTE = 640,
- PAYLOADNV = 641,
- PAYLOADINNV = 642,
- HITATTRNV = 643,
- CALLDATANV = 644,
- CALLDATAINNV = 645,
- PATCH = 646,
- SAMPLE = 647,
- NONUNIFORM = 648,
- COHERENT = 649,
- VOLATILE = 650,
- RESTRICT = 651,
- READONLY = 652,
- WRITEONLY = 653,
- DEVICECOHERENT = 654,
- QUEUEFAMILYCOHERENT = 655,
- WORKGROUPCOHERENT = 656,
- SUBGROUPCOHERENT = 657,
- NONPRIVATE = 658,
- NOPERSPECTIVE = 659,
- EXPLICITINTERPAMD = 660,
- PERVERTEXNV = 661,
- PERPRIMITIVENV = 662,
- PERVIEWNV = 663,
- PERTASKNV = 664,
- PRECISE = 665
+ ACCSTRUCTEXT = 416,
+ RAYQUERYEXT = 417,
+ FCOOPMATNV = 418,
+ ICOOPMATNV = 419,
+ UCOOPMATNV = 420,
+ SAMPLERCUBEARRAY = 421,
+ SAMPLERCUBEARRAYSHADOW = 422,
+ ISAMPLERCUBEARRAY = 423,
+ USAMPLERCUBEARRAY = 424,
+ SAMPLER1D = 425,
+ SAMPLER1DARRAY = 426,
+ SAMPLER1DARRAYSHADOW = 427,
+ ISAMPLER1D = 428,
+ SAMPLER1DSHADOW = 429,
+ SAMPLER2DRECT = 430,
+ SAMPLER2DRECTSHADOW = 431,
+ ISAMPLER2DRECT = 432,
+ USAMPLER2DRECT = 433,
+ SAMPLERBUFFER = 434,
+ ISAMPLERBUFFER = 435,
+ USAMPLERBUFFER = 436,
+ SAMPLER2DMS = 437,
+ ISAMPLER2DMS = 438,
+ USAMPLER2DMS = 439,
+ SAMPLER2DMSARRAY = 440,
+ ISAMPLER2DMSARRAY = 441,
+ USAMPLER2DMSARRAY = 442,
+ SAMPLEREXTERNALOES = 443,
+ SAMPLEREXTERNAL2DY2YEXT = 444,
+ ISAMPLER1DARRAY = 445,
+ USAMPLER1D = 446,
+ USAMPLER1DARRAY = 447,
+ F16SAMPLER1D = 448,
+ F16SAMPLER2D = 449,
+ F16SAMPLER3D = 450,
+ F16SAMPLER2DRECT = 451,
+ F16SAMPLERCUBE = 452,
+ F16SAMPLER1DARRAY = 453,
+ F16SAMPLER2DARRAY = 454,
+ F16SAMPLERCUBEARRAY = 455,
+ F16SAMPLERBUFFER = 456,
+ F16SAMPLER2DMS = 457,
+ F16SAMPLER2DMSARRAY = 458,
+ F16SAMPLER1DSHADOW = 459,
+ F16SAMPLER2DSHADOW = 460,
+ F16SAMPLER1DARRAYSHADOW = 461,
+ F16SAMPLER2DARRAYSHADOW = 462,
+ F16SAMPLER2DRECTSHADOW = 463,
+ F16SAMPLERCUBESHADOW = 464,
+ F16SAMPLERCUBEARRAYSHADOW = 465,
+ IMAGE1D = 466,
+ IIMAGE1D = 467,
+ UIMAGE1D = 468,
+ IMAGE2D = 469,
+ IIMAGE2D = 470,
+ UIMAGE2D = 471,
+ IMAGE3D = 472,
+ IIMAGE3D = 473,
+ UIMAGE3D = 474,
+ IMAGE2DRECT = 475,
+ IIMAGE2DRECT = 476,
+ UIMAGE2DRECT = 477,
+ IMAGECUBE = 478,
+ IIMAGECUBE = 479,
+ UIMAGECUBE = 480,
+ IMAGEBUFFER = 481,
+ IIMAGEBUFFER = 482,
+ UIMAGEBUFFER = 483,
+ IMAGE1DARRAY = 484,
+ IIMAGE1DARRAY = 485,
+ UIMAGE1DARRAY = 486,
+ IMAGE2DARRAY = 487,
+ IIMAGE2DARRAY = 488,
+ UIMAGE2DARRAY = 489,
+ IMAGECUBEARRAY = 490,
+ IIMAGECUBEARRAY = 491,
+ UIMAGECUBEARRAY = 492,
+ IMAGE2DMS = 493,
+ IIMAGE2DMS = 494,
+ UIMAGE2DMS = 495,
+ IMAGE2DMSARRAY = 496,
+ IIMAGE2DMSARRAY = 497,
+ UIMAGE2DMSARRAY = 498,
+ F16IMAGE1D = 499,
+ F16IMAGE2D = 500,
+ F16IMAGE3D = 501,
+ F16IMAGE2DRECT = 502,
+ F16IMAGECUBE = 503,
+ F16IMAGE1DARRAY = 504,
+ F16IMAGE2DARRAY = 505,
+ F16IMAGECUBEARRAY = 506,
+ F16IMAGEBUFFER = 507,
+ F16IMAGE2DMS = 508,
+ F16IMAGE2DMSARRAY = 509,
+ TEXTURECUBEARRAY = 510,
+ ITEXTURECUBEARRAY = 511,
+ UTEXTURECUBEARRAY = 512,
+ TEXTURE1D = 513,
+ ITEXTURE1D = 514,
+ UTEXTURE1D = 515,
+ TEXTURE1DARRAY = 516,
+ ITEXTURE1DARRAY = 517,
+ UTEXTURE1DARRAY = 518,
+ TEXTURE2DRECT = 519,
+ ITEXTURE2DRECT = 520,
+ UTEXTURE2DRECT = 521,
+ TEXTUREBUFFER = 522,
+ ITEXTUREBUFFER = 523,
+ UTEXTUREBUFFER = 524,
+ TEXTURE2DMS = 525,
+ ITEXTURE2DMS = 526,
+ UTEXTURE2DMS = 527,
+ TEXTURE2DMSARRAY = 528,
+ ITEXTURE2DMSARRAY = 529,
+ UTEXTURE2DMSARRAY = 530,
+ F16TEXTURE1D = 531,
+ F16TEXTURE2D = 532,
+ F16TEXTURE3D = 533,
+ F16TEXTURE2DRECT = 534,
+ F16TEXTURECUBE = 535,
+ F16TEXTURE1DARRAY = 536,
+ F16TEXTURE2DARRAY = 537,
+ F16TEXTURECUBEARRAY = 538,
+ F16TEXTUREBUFFER = 539,
+ F16TEXTURE2DMS = 540,
+ F16TEXTURE2DMSARRAY = 541,
+ SUBPASSINPUT = 542,
+ SUBPASSINPUTMS = 543,
+ ISUBPASSINPUT = 544,
+ ISUBPASSINPUTMS = 545,
+ USUBPASSINPUT = 546,
+ USUBPASSINPUTMS = 547,
+ F16SUBPASSINPUT = 548,
+ F16SUBPASSINPUTMS = 549,
+ LEFT_OP = 550,
+ RIGHT_OP = 551,
+ INC_OP = 552,
+ DEC_OP = 553,
+ LE_OP = 554,
+ GE_OP = 555,
+ EQ_OP = 556,
+ NE_OP = 557,
+ AND_OP = 558,
+ OR_OP = 559,
+ XOR_OP = 560,
+ MUL_ASSIGN = 561,
+ DIV_ASSIGN = 562,
+ ADD_ASSIGN = 563,
+ MOD_ASSIGN = 564,
+ LEFT_ASSIGN = 565,
+ RIGHT_ASSIGN = 566,
+ AND_ASSIGN = 567,
+ XOR_ASSIGN = 568,
+ OR_ASSIGN = 569,
+ SUB_ASSIGN = 570,
+ STRING_LITERAL = 571,
+ LEFT_PAREN = 572,
+ RIGHT_PAREN = 573,
+ LEFT_BRACKET = 574,
+ RIGHT_BRACKET = 575,
+ LEFT_BRACE = 576,
+ RIGHT_BRACE = 577,
+ DOT = 578,
+ COMMA = 579,
+ COLON = 580,
+ EQUAL = 581,
+ SEMICOLON = 582,
+ BANG = 583,
+ DASH = 584,
+ TILDE = 585,
+ PLUS = 586,
+ STAR = 587,
+ SLASH = 588,
+ PERCENT = 589,
+ LEFT_ANGLE = 590,
+ RIGHT_ANGLE = 591,
+ VERTICAL_BAR = 592,
+ CARET = 593,
+ AMPERSAND = 594,
+ QUESTION = 595,
+ INVARIANT = 596,
+ HIGH_PRECISION = 597,
+ MEDIUM_PRECISION = 598,
+ LOW_PRECISION = 599,
+ PRECISION = 600,
+ PACKED = 601,
+ RESOURCE = 602,
+ SUPERP = 603,
+ FLOATCONSTANT = 604,
+ INTCONSTANT = 605,
+ UINTCONSTANT = 606,
+ BOOLCONSTANT = 607,
+ IDENTIFIER = 608,
+ TYPE_NAME = 609,
+ CENTROID = 610,
+ IN = 611,
+ OUT = 612,
+ INOUT = 613,
+ STRUCT = 614,
+ VOID = 615,
+ WHILE = 616,
+ BREAK = 617,
+ CONTINUE = 618,
+ DO = 619,
+ ELSE = 620,
+ FOR = 621,
+ IF = 622,
+ DISCARD = 623,
+ RETURN = 624,
+ SWITCH = 625,
+ CASE = 626,
+ DEFAULT = 627,
+ UNIFORM = 628,
+ SHARED = 629,
+ BUFFER = 630,
+ FLAT = 631,
+ SMOOTH = 632,
+ LAYOUT = 633,
+ DOUBLECONSTANT = 634,
+ INT16CONSTANT = 635,
+ UINT16CONSTANT = 636,
+ FLOAT16CONSTANT = 637,
+ INT32CONSTANT = 638,
+ UINT32CONSTANT = 639,
+ INT64CONSTANT = 640,
+ UINT64CONSTANT = 641,
+ SUBROUTINE = 642,
+ DEMOTE = 643,
+ PAYLOADNV = 644,
+ PAYLOADINNV = 645,
+ HITATTRNV = 646,
+ CALLDATANV = 647,
+ CALLDATAINNV = 648,
+ PAYLOADEXT = 649,
+ PAYLOADINEXT = 650,
+ HITATTREXT = 651,
+ CALLDATAEXT = 652,
+ CALLDATAINEXT = 653,
+ PATCH = 654,
+ SAMPLE = 655,
+ NONUNIFORM = 656,
+ COHERENT = 657,
+ VOLATILE = 658,
+ RESTRICT = 659,
+ READONLY = 660,
+ WRITEONLY = 661,
+ DEVICECOHERENT = 662,
+ QUEUEFAMILYCOHERENT = 663,
+ WORKGROUPCOHERENT = 664,
+ SUBGROUPCOHERENT = 665,
+ NONPRIVATE = 666,
+ SHADERCALLCOHERENT = 667,
+ NOPERSPECTIVE = 668,
+ EXPLICITINTERPAMD = 669,
+ PERVERTEXNV = 670,
+ PERPRIMITIVENV = 671,
+ PERVIEWNV = 672,
+ PERTASKNV = 673,
+ PRECISE = 674
};
#endif
@@ -539,7 +548,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 96 "MachineIndependent/glslang.y" /* yacc.c:355 */
+#line 97 "MachineIndependent/glslang.y" /* yacc.c:355 */
struct {
glslang::TSourceLoc loc;
@@ -575,7 +584,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
-#line 579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */
+#line 588 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
@@ -590,7 +599,7 @@ int yyparse (glslang::TParseContext* pParseContext);
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
/* Copy the second part of user declarations. */
-#line 132 "MachineIndependent/glslang.y" /* yacc.c:358 */
+#line 133 "MachineIndependent/glslang.y" /* yacc.c:358 */
/* windows only pragma */
@@ -606,7 +615,7 @@ int yyparse (glslang::TParseContext* pParseContext);
extern int yylex(YYSTYPE*, TParseContext&);
-#line 610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */
+#line 619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */
#ifdef short
# undef short
@@ -846,23 +855,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 386
+#define YYFINAL 394
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 9369
+#define YYLAST 9550
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 411
+#define YYNTOKENS 420
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 111
/* YYNRULES -- Number of rules. */
-#define YYNRULES 582
+#define YYNRULES 591
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 727
+#define YYNSTATES 736
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 665
+#define YYMAXUTOK 674
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -937,72 +946,74 @@ static const yytype_uint16 yytranslate[] =
375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 352, 352, 358, 361, 366, 369, 372, 376, 380,
- 384, 388, 392, 396, 400, 404, 408, 416, 419, 422,
- 425, 428, 433, 441, 448, 455, 461, 465, 472, 475,
- 481, 488, 498, 506, 511, 539, 548, 554, 558, 562,
- 582, 583, 584, 585, 591, 592, 597, 602, 611, 612,
- 617, 625, 626, 632, 641, 642, 647, 652, 657, 665,
- 666, 675, 687, 688, 697, 698, 707, 708, 717, 718,
- 726, 727, 735, 736, 744, 745, 745, 763, 764, 780,
- 784, 788, 792, 797, 801, 805, 809, 813, 817, 821,
- 828, 831, 842, 849, 854, 859, 866, 870, 874, 878,
- 883, 888, 897, 897, 908, 912, 919, 926, 929, 936,
- 944, 964, 987, 1002, 1027, 1038, 1048, 1058, 1068, 1077,
- 1080, 1084, 1088, 1093, 1101, 1108, 1113, 1118, 1123, 1132,
- 1142, 1169, 1178, 1185, 1193, 1200, 1207, 1215, 1225, 1232,
- 1243, 1249, 1252, 1259, 1263, 1267, 1276, 1286, 1289, 1300,
- 1303, 1306, 1310, 1314, 1319, 1323, 1330, 1334, 1339, 1345,
- 1351, 1358, 1363, 1371, 1377, 1389, 1403, 1409, 1414, 1422,
- 1430, 1438, 1446, 1453, 1457, 1462, 1467, 1472, 1477, 1482,
- 1486, 1490, 1494, 1498, 1504, 1515, 1522, 1525, 1534, 1539,
- 1549, 1554, 1562, 1566, 1576, 1579, 1585, 1591, 1598, 1608,
- 1612, 1616, 1620, 1625, 1629, 1634, 1639, 1644, 1649, 1654,
- 1659, 1664, 1669, 1674, 1680, 1686, 1692, 1697, 1702, 1707,
- 1712, 1717, 1722, 1727, 1732, 1737, 1742, 1747, 1753, 1758,
- 1763, 1768, 1773, 1778, 1783, 1788, 1793, 1798, 1803, 1808,
- 1813, 1819, 1825, 1831, 1837, 1843, 1849, 1855, 1861, 1867,
- 1873, 1879, 1885, 1891, 1897, 1903, 1909, 1915, 1921, 1927,
- 1933, 1939, 1945, 1951, 1957, 1963, 1969, 1975, 1981, 1987,
- 1993, 1999, 2005, 2011, 2017, 2023, 2029, 2035, 2041, 2047,
- 2053, 2059, 2065, 2071, 2077, 2083, 2089, 2095, 2101, 2107,
- 2113, 2119, 2125, 2131, 2137, 2143, 2149, 2155, 2161, 2167,
- 2173, 2179, 2185, 2191, 2197, 2203, 2209, 2215, 2221, 2227,
- 2233, 2239, 2245, 2251, 2257, 2263, 2269, 2275, 2281, 2287,
- 2293, 2299, 2305, 2311, 2317, 2321, 2326, 2332, 2337, 2342,
- 2347, 2352, 2357, 2362, 2368, 2373, 2378, 2383, 2388, 2393,
- 2399, 2405, 2411, 2417, 2423, 2429, 2435, 2441, 2447, 2453,
- 2459, 2465, 2471, 2477, 2482, 2487, 2492, 2497, 2502, 2507,
- 2513, 2518, 2523, 2528, 2533, 2538, 2543, 2548, 2554, 2559,
- 2564, 2569, 2574, 2579, 2584, 2589, 2594, 2599, 2604, 2609,
- 2614, 2619, 2624, 2630, 2635, 2640, 2646, 2652, 2657, 2662,
- 2667, 2673, 2678, 2683, 2688, 2694, 2699, 2704, 2709, 2715,
- 2720, 2725, 2730, 2736, 2742, 2748, 2754, 2759, 2765, 2771,
- 2777, 2782, 2787, 2792, 2797, 2802, 2808, 2813, 2818, 2823,
- 2829, 2834, 2839, 2844, 2850, 2855, 2860, 2865, 2871, 2876,
- 2881, 2886, 2892, 2897, 2902, 2907, 2913, 2918, 2923, 2928,
- 2934, 2939, 2944, 2949, 2955, 2960, 2965, 2970, 2976, 2981,
- 2986, 2991, 2997, 3002, 3007, 3012, 3018, 3023, 3028, 3033,
- 3039, 3044, 3049, 3054, 3060, 3065, 3070, 3075, 3081, 3086,
- 3091, 3096, 3102, 3107, 3112, 3118, 3124, 3130, 3136, 3143,
- 3150, 3156, 3162, 3168, 3174, 3180, 3186, 3193, 3198, 3214,
- 3219, 3224, 3232, 3232, 3243, 3243, 3253, 3256, 3269, 3291,
- 3318, 3322, 3328, 3333, 3344, 3348, 3354, 3365, 3368, 3375,
- 3379, 3380, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3394,
- 3400, 3409, 3410, 3414, 3410, 3426, 3427, 3431, 3431, 3438,
- 3438, 3452, 3455, 3463, 3471, 3482, 3483, 3487, 3491, 3498,
- 3505, 3509, 3517, 3521, 3534, 3538, 3545, 3545, 3565, 3568,
- 3574, 3586, 3598, 3602, 3609, 3609, 3624, 3624, 3640, 3640,
- 3661, 3664, 3670, 3673, 3679, 3683, 3690, 3695, 3700, 3707,
- 3710, 3719, 3723, 3732, 3735, 3739, 3748, 3748, 3771, 3777,
- 3780, 3785, 3788
+ 0, 357, 357, 363, 366, 371, 374, 377, 381, 385,
+ 388, 392, 396, 400, 404, 408, 412, 418, 426, 429,
+ 432, 435, 438, 443, 451, 458, 465, 471, 475, 482,
+ 485, 491, 498, 508, 516, 521, 549, 558, 564, 568,
+ 572, 592, 593, 594, 595, 601, 602, 607, 612, 621,
+ 622, 627, 635, 636, 642, 651, 652, 657, 662, 667,
+ 675, 676, 685, 697, 698, 707, 708, 717, 718, 727,
+ 728, 736, 737, 745, 746, 754, 755, 755, 773, 774,
+ 790, 794, 798, 802, 807, 811, 815, 819, 823, 827,
+ 831, 838, 841, 852, 859, 864, 869, 876, 880, 884,
+ 888, 893, 898, 907, 907, 918, 922, 929, 936, 939,
+ 946, 954, 974, 997, 1012, 1037, 1048, 1058, 1068, 1078,
+ 1087, 1090, 1094, 1098, 1103, 1111, 1118, 1123, 1128, 1133,
+ 1142, 1152, 1179, 1188, 1195, 1203, 1210, 1217, 1225, 1235,
+ 1242, 1253, 1259, 1262, 1269, 1273, 1277, 1286, 1296, 1299,
+ 1310, 1313, 1316, 1320, 1324, 1329, 1333, 1340, 1344, 1349,
+ 1355, 1361, 1368, 1373, 1381, 1387, 1399, 1413, 1419, 1424,
+ 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1495, 1502,
+ 1506, 1511, 1516, 1521, 1526, 1531, 1536, 1540, 1544, 1548,
+ 1552, 1558, 1569, 1576, 1579, 1588, 1593, 1603, 1608, 1616,
+ 1620, 1630, 1633, 1639, 1645, 1652, 1662, 1666, 1670, 1674,
+ 1679, 1683, 1688, 1693, 1698, 1703, 1708, 1713, 1718, 1723,
+ 1728, 1734, 1740, 1746, 1751, 1756, 1761, 1766, 1771, 1776,
+ 1781, 1786, 1791, 1796, 1801, 1807, 1814, 1819, 1824, 1829,
+ 1834, 1839, 1844, 1849, 1854, 1859, 1864, 1869, 1877, 1885,
+ 1893, 1899, 1905, 1911, 1917, 1923, 1929, 1935, 1941, 1947,
+ 1953, 1959, 1965, 1971, 1977, 1983, 1989, 1995, 2001, 2007,
+ 2013, 2019, 2025, 2031, 2037, 2043, 2049, 2055, 2061, 2067,
+ 2073, 2079, 2085, 2091, 2099, 2107, 2115, 2123, 2131, 2139,
+ 2147, 2155, 2163, 2171, 2179, 2187, 2193, 2199, 2205, 2211,
+ 2217, 2223, 2229, 2235, 2241, 2247, 2253, 2259, 2265, 2271,
+ 2277, 2283, 2289, 2295, 2301, 2307, 2313, 2319, 2325, 2331,
+ 2337, 2343, 2349, 2355, 2361, 2367, 2373, 2379, 2385, 2391,
+ 2397, 2403, 2407, 2411, 2415, 2420, 2426, 2431, 2436, 2441,
+ 2446, 2451, 2456, 2462, 2467, 2472, 2477, 2482, 2487, 2493,
+ 2499, 2505, 2511, 2517, 2523, 2529, 2535, 2541, 2547, 2553,
+ 2559, 2565, 2571, 2576, 2581, 2586, 2591, 2596, 2601, 2607,
+ 2612, 2617, 2622, 2627, 2632, 2637, 2642, 2648, 2653, 2658,
+ 2663, 2668, 2673, 2678, 2683, 2688, 2693, 2698, 2703, 2708,
+ 2713, 2718, 2724, 2729, 2734, 2740, 2746, 2751, 2756, 2761,
+ 2767, 2772, 2777, 2782, 2788, 2793, 2798, 2803, 2809, 2814,
+ 2819, 2824, 2830, 2836, 2842, 2848, 2853, 2859, 2865, 2871,
+ 2876, 2881, 2886, 2891, 2896, 2902, 2907, 2912, 2917, 2923,
+ 2928, 2933, 2938, 2944, 2949, 2954, 2959, 2965, 2970, 2975,
+ 2980, 2986, 2991, 2996, 3001, 3007, 3012, 3017, 3022, 3028,
+ 3033, 3038, 3043, 3049, 3054, 3059, 3064, 3070, 3075, 3080,
+ 3085, 3091, 3096, 3101, 3106, 3112, 3117, 3122, 3127, 3133,
+ 3138, 3143, 3148, 3154, 3159, 3164, 3169, 3175, 3180, 3185,
+ 3190, 3196, 3201, 3206, 3212, 3218, 3224, 3230, 3237, 3244,
+ 3250, 3256, 3262, 3268, 3274, 3280, 3287, 3292, 3308, 3313,
+ 3318, 3326, 3326, 3337, 3337, 3347, 3350, 3363, 3385, 3412,
+ 3416, 3422, 3427, 3438, 3442, 3448, 3459, 3462, 3469, 3473,
+ 3474, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3488, 3494,
+ 3503, 3504, 3508, 3504, 3520, 3521, 3525, 3525, 3532, 3532,
+ 3546, 3549, 3557, 3565, 3576, 3577, 3581, 3585, 3592, 3599,
+ 3603, 3611, 3615, 3628, 3632, 3639, 3639, 3659, 3662, 3668,
+ 3680, 3692, 3696, 3703, 3703, 3718, 3718, 3734, 3734, 3755,
+ 3758, 3764, 3767, 3773, 3777, 3784, 3789, 3794, 3801, 3804,
+ 3813, 3817, 3826, 3829, 3833, 3842, 3842, 3884, 3890, 3893,
+ 3898, 3901
};
#endif
@@ -1039,16 +1050,17 @@ static const char *const yytname[] =
"F32MAT3X2", "F32MAT3X3", "F32MAT3X4", "F32MAT4X2", "F32MAT4X3",
"F32MAT4X4", "F64MAT2X2", "F64MAT2X3", "F64MAT2X4", "F64MAT3X2",
"F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", "F64MAT4X4",
- "ATOMIC_UINT", "ACCSTRUCTNV", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV",
- "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY",
- "USAMPLERCUBEARRAY", "SAMPLER1D", "SAMPLER1DARRAY",
- "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", "SAMPLER1DSHADOW", "SAMPLER2DRECT",
- "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT",
- "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS",
- "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY",
- "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT",
- "ISAMPLER1DARRAY", "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D",
- "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE",
+ "ATOMIC_UINT", "ACCSTRUCTNV", "ACCSTRUCTEXT", "RAYQUERYEXT",
+ "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", "SAMPLERCUBEARRAY",
+ "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY",
+ "SAMPLER1D", "SAMPLER1DARRAY", "SAMPLER1DARRAYSHADOW", "ISAMPLER1D",
+ "SAMPLER1DSHADOW", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW",
+ "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER",
+ "USAMPLERBUFFER", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS",
+ "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY",
+ "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", "ISAMPLER1DARRAY",
+ "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", "F16SAMPLER2D",
+ "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE",
"F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY", "F16SAMPLERCUBEARRAY",
"F16SAMPLERBUFFER", "F16SAMPLER2DMS", "F16SAMPLER2DMSARRAY",
"F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW", "F16SAMPLER1DARRAYSHADOW",
@@ -1078,28 +1090,30 @@ static const char *const yytname[] =
"F16SUBPASSINPUTMS", "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", "LEFT_PAREN",
- "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE",
- "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG",
- "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE",
- "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION",
- "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION", "LOW_PRECISION",
- "PRECISION", "PACKED", "RESOURCE", "SUPERP", "FLOATCONSTANT",
- "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "IDENTIFIER", "TYPE_NAME",
- "CENTROID", "IN", "OUT", "INOUT", "STRUCT", "VOID", "WHILE", "BREAK",
- "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH",
- "CASE", "DEFAULT", "UNIFORM", "SHARED", "BUFFER", "FLAT", "SMOOTH",
- "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", "UINT16CONSTANT",
- "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INT64CONSTANT",
- "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "PAYLOADNV", "PAYLOADINNV",
- "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PATCH", "SAMPLE",
- "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY",
+ "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL",
+ "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET",
+ "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL",
+ "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT",
+ "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND",
+ "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION",
+ "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP",
+ "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT",
+ "IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT",
+ "VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF",
+ "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "UNIFORM", "SHARED",
+ "BUFFER", "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT",
+ "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT",
+ "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "PAYLOADNV",
+ "PAYLOADINNV", "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PAYLOADEXT",
+ "PAYLOADINEXT", "HITATTREXT", "CALLDATAEXT", "CALLDATAINEXT", "PATCH",
+ "SAMPLE", "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY",
"WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT",
- "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", "NOPERSPECTIVE",
- "EXPLICITINTERPAMD", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV",
- "PERTASKNV", "PRECISE", "$accept", "variable_identifier",
- "primary_expression", "postfix_expression", "integer_expression",
- "function_call", "function_call_or_method", "function_call_generic",
+ "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE",
+ "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD",
+ "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", "PERTASKNV", "PRECISE",
+ "$accept", "variable_identifier", "primary_expression",
+ "postfix_expression", "integer_expression", "function_call",
+ "function_call_or_method", "function_call_generic",
"function_call_header_no_parameters",
"function_call_header_with_parameters", "function_call_header",
"function_identifier", "unary_expression", "unary_operator",
@@ -1185,16 +1199,16 @@ static const yytype_uint16 yytoknum[] =
635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
- 665
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674
};
# endif
-#define YYPACT_NINF -453
+#define YYPACT_NINF -457
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-453)))
+ (!!((Yystate) == (-457)))
-#define YYTABLE_NINF -528
+#define YYTABLE_NINF -537
#define yytable_value_is_error(Yytable_value) \
0
@@ -1203,79 +1217,80 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 3994, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, 97, -453, -453, -453,
- -453, -453, 6, -453, -453, -453, -453, -453, -453, -307,
- -241, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -3, 95, 36,
- 125, 6034, 82, -453, -22, -453, -453, -453, -453, 4402,
- -453, -453, -453, -453, 131, -453, -453, 730, -453, -453,
- 11, -453, 153, -28, 127, -453, 7, -453, 157, -453,
- 6034, -453, -453, -453, 6034, 129, 134, -453, 13, -453,
- 73, -453, -453, 8391, 162, -453, -453, -453, 161, 6034,
- -453, 163, -453, -309, -453, -453, 27, 6831, -453, 16,
- 1138, -453, -453, -453, -453, 162, 23, -453, 7221, 49,
- -453, 138, -453, 87, 8391, 8391, 8391, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, 68, -453, -453, -453,
- 174, 60, 8781, 176, -453, 8391, -453, -453, -320, 175,
- -453, 6034, 142, 4810, -453, 6034, 8391, -453, -28, -453,
- 143, -453, -453, 119, 128, 32, 21, 38, 158, 160,
- 165, 195, 194, 18, 183, 7611, -453, 185, 184, -453,
- -453, 188, 180, 181, -453, 196, 197, 190, 8001, 198,
- 8391, 187, 193, 122, -453, -453, 91, -453, 95, 204,
- 205, -453, -453, -453, -453, -453, 1546, -453, -453, -453,
- -453, -453, -453, -453, -453, -453, -353, 175, 7221, 69,
- 7221, -453, -453, 7221, 6034, -453, 170, -453, -453, -453,
- 78, -453, -453, 8391, 171, -453, -453, 8391, 207, -453,
- -453, -453, 8391, -453, 142, 162, 93, -453, -453, -453,
- 5218, -453, -453, -453, -453, 8391, 8391, 8391, 8391, 8391,
- 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391, 8391,
- 8391, 8391, 8391, 8391, -453, -453, -453, 206, 177, -453,
- 1954, -453, -453, -453, 1954, -453, 8391, -453, -453, 100,
- 8391, 144, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, -453, -453, -453, 8391, 8391, -453, -453, -453,
- -453, -453, -453, -453, 7221, -453, 140, -453, 5626, -453,
- -453, 209, 208, -453, -453, -453, 123, 175, 142, -453,
- -453, -453, -453, -453, 119, 119, 128, 128, 32, 32,
- 32, 32, 21, 21, 38, 158, 160, 165, 195, 194,
- 8391, -453, 214, 56, -453, 1954, 3586, 172, 3178, 80,
- -453, 81, -453, -453, -453, -453, -453, 6441, -453, -453,
- -453, -453, 146, 8391, 215, 177, 212, 208, 186, 6034,
- 219, 221, -453, -453, 3586, 220, -453, -453, -453, 8391,
- 222, -453, -453, -453, 216, 2362, 8391, -453, 217, 227,
- 182, 225, 2770, -453, 229, -453, -453, 7221, -453, -453,
- -453, 89, 8391, 2362, 220, -453, -453, 1954, -453, 224,
- 208, -453, -453, 1954, 226, -453, -453
+ 4075, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, 132, -457,
+ -457, -457, -457, -457, -1, -457, -457, -457, -457, -457,
+ -457, -301, -298, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, 11, -249, 17, 30, 6160,
+ 20, -457, 28, -457, -457, -457, -457, 4492, -457, -457,
+ -457, -457, 50, -457, -457, 739, -457, -457, 16, -457,
+ 81, -29, 69, -457, -313, -457, 111, -457, 6160, -457,
+ -457, -457, 6160, 103, 106, -457, -314, -457, 72, -457,
+ -457, 8566, 142, -457, -457, -457, 136, 6160, -457, 144,
+ -457, 53, -457, -457, 76, 6974, -457, -312, 1156, -457,
+ -457, -457, -457, 142, -309, -457, 7372, -308, -457, 119,
+ -457, 65, 8566, 8566, -457, 8566, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, 36, -457, -457, -457, 171,
+ 85, 8964, 173, -457, 8566, -457, -457, -323, 174, -457,
+ 6160, 139, 4909, -457, 6160, 8566, -457, -29, -457, 141,
+ -457, -457, 145, 99, 35, 26, 71, 156, 159, 161,
+ 196, 195, 23, 181, 7770, -457, 183, 182, -457, -457,
+ 186, 179, 180, -457, 191, 192, 187, 8168, 193, 8566,
+ 188, 189, 127, -457, -457, 96, -457, -249, 200, 201,
+ -457, -457, -457, -457, -457, 1573, -457, -457, -457, -457,
+ -457, -457, -457, -457, -457, -24, 174, 7372, 13, 7372,
+ -457, -457, 7372, 6160, -457, 166, -457, -457, -457, 86,
+ -457, -457, 8566, 168, -457, -457, 8566, 205, -457, -457,
+ -457, 8566, -457, 139, 142, 124, -457, -457, -457, 5326,
+ -457, -457, -457, -457, 8566, 8566, 8566, 8566, 8566, 8566,
+ 8566, 8566, 8566, 8566, 8566, 8566, 8566, 8566, 8566, 8566,
+ 8566, 8566, 8566, -457, -457, -457, 206, 172, -457, 1990,
+ -457, -457, -457, 1990, -457, 8566, -457, -457, 130, 8566,
+ 125, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, -457, -457, 8566, 8566, -457, -457, -457, -457,
+ -457, -457, -457, 7372, -457, 94, -457, 5743, -457, -457,
+ 207, 204, -457, -457, -457, 131, 174, 139, -457, -457,
+ -457, -457, -457, 145, 145, 99, 99, 35, 35, 35,
+ 35, 26, 26, 71, 156, 159, 161, 196, 195, 8566,
+ -457, 212, 60, -457, 1990, 3658, 169, 3241, 87, -457,
+ 89, -457, -457, -457, -457, -457, 6576, -457, -457, -457,
+ -457, 143, 8566, 211, 172, 210, 204, 184, 6160, 217,
+ 219, -457, -457, 3658, 218, -457, -457, -457, 8566, 220,
+ -457, -457, -457, 214, 2407, 8566, -457, 216, 223, 185,
+ 224, 2824, -457, 225, -457, -457, 7372, -457, -457, -457,
+ 97, 8566, 2407, 218, -457, -457, 1990, -457, 222, 204,
+ -457, -457, 1990, 229, -457, -457
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1283,113 +1298,114 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 156, 203, 201, 202, 200, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 204, 205, 206, 216, 217,
- 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
- 327, 328, 329, 330, 331, 332, 333, 353, 354, 355,
- 356, 357, 358, 359, 368, 381, 382, 369, 370, 372,
- 371, 373, 374, 375, 376, 377, 378, 379, 380, 164,
- 165, 229, 230, 228, 231, 238, 239, 236, 237, 234,
- 235, 232, 233, 261, 262, 263, 273, 274, 275, 258,
- 259, 260, 270, 271, 272, 255, 256, 257, 267, 268,
- 269, 252, 253, 254, 264, 265, 266, 240, 241, 242,
- 276, 277, 278, 243, 244, 245, 288, 289, 290, 246,
- 247, 248, 300, 301, 302, 249, 250, 251, 312, 313,
- 314, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 291, 292, 293, 294, 295, 296, 297, 298, 299, 303,
- 304, 305, 306, 307, 308, 309, 310, 311, 315, 316,
- 317, 318, 319, 320, 321, 322, 323, 325, 324, 484,
- 485, 486, 337, 338, 361, 364, 326, 335, 336, 352,
- 334, 383, 384, 387, 388, 389, 391, 392, 393, 395,
- 396, 397, 399, 400, 474, 475, 360, 362, 363, 339,
- 340, 341, 385, 342, 346, 347, 350, 390, 394, 398,
- 343, 344, 348, 349, 386, 345, 351, 430, 432, 433,
- 434, 436, 437, 438, 440, 441, 442, 444, 445, 446,
- 448, 449, 450, 452, 453, 454, 456, 457, 458, 460,
- 461, 462, 464, 465, 466, 468, 469, 470, 472, 473,
- 431, 435, 439, 443, 447, 455, 459, 463, 451, 467,
- 471, 365, 366, 367, 401, 410, 412, 406, 411, 413,
- 414, 416, 417, 418, 420, 421, 422, 424, 425, 426,
- 428, 429, 402, 403, 404, 415, 405, 407, 408, 409,
- 419, 423, 427, 476, 477, 480, 481, 482, 483, 478,
- 479, 575, 131, 489, 490, 491, 0, 488, 160, 158,
- 159, 157, 0, 199, 161, 162, 163, 133, 132, 0,
- 183, 169, 170, 168, 171, 172, 166, 167, 185, 173,
- 179, 180, 181, 182, 174, 175, 176, 177, 178, 134,
- 135, 136, 137, 138, 139, 146, 574, 0, 576, 0,
- 108, 107, 0, 119, 124, 153, 152, 150, 154, 0,
- 147, 149, 155, 129, 195, 151, 487, 0, 571, 573,
- 0, 494, 0, 0, 0, 96, 0, 93, 0, 106,
- 0, 115, 109, 117, 0, 118, 0, 94, 125, 99,
- 0, 148, 130, 0, 188, 194, 1, 572, 0, 0,
- 492, 143, 145, 0, 141, 186, 0, 0, 97, 0,
- 0, 577, 110, 114, 116, 112, 120, 111, 0, 126,
- 102, 0, 100, 0, 0, 0, 0, 42, 41, 43,
- 40, 5, 6, 7, 8, 2, 15, 13, 14, 16,
- 9, 10, 11, 12, 3, 17, 36, 19, 24, 25,
- 0, 0, 29, 0, 197, 0, 35, 33, 0, 189,
- 95, 0, 0, 0, 496, 0, 0, 140, 0, 184,
- 0, 190, 44, 48, 51, 54, 59, 62, 64, 66,
- 68, 70, 72, 74, 0, 0, 98, 0, 522, 531,
- 535, 0, 0, 0, 556, 0, 0, 0, 0, 0,
- 0, 0, 0, 44, 77, 90, 0, 509, 0, 155,
- 129, 512, 533, 511, 519, 510, 0, 513, 514, 537,
- 515, 544, 516, 517, 552, 518, 0, 113, 0, 121,
- 0, 504, 128, 0, 0, 104, 0, 101, 37, 38,
- 0, 21, 22, 0, 0, 27, 26, 0, 199, 30,
- 32, 39, 0, 196, 0, 502, 0, 500, 495, 497,
- 0, 92, 144, 142, 187, 0, 0, 0, 0, 0,
+ 0, 157, 210, 208, 209, 207, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 211, 212, 213, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 336, 337, 338, 339, 340, 341, 342, 362, 363, 364,
+ 365, 366, 367, 368, 377, 390, 391, 378, 379, 381,
+ 380, 382, 383, 384, 385, 386, 387, 388, 389, 165,
+ 166, 236, 237, 235, 238, 245, 246, 243, 244, 241,
+ 242, 239, 240, 268, 269, 270, 280, 281, 282, 265,
+ 266, 267, 277, 278, 279, 262, 263, 264, 274, 275,
+ 276, 259, 260, 261, 271, 272, 273, 247, 248, 249,
+ 283, 284, 285, 250, 251, 252, 295, 296, 297, 253,
+ 254, 255, 307, 308, 309, 256, 257, 258, 319, 320,
+ 321, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 334, 331, 332,
+ 333, 493, 494, 495, 346, 347, 370, 373, 335, 344,
+ 345, 361, 343, 392, 393, 396, 397, 398, 400, 401,
+ 402, 404, 405, 406, 408, 409, 483, 484, 369, 371,
+ 372, 348, 349, 350, 394, 351, 355, 356, 359, 399,
+ 403, 407, 352, 353, 357, 358, 395, 354, 360, 439,
+ 441, 442, 443, 445, 446, 447, 449, 450, 451, 453,
+ 454, 455, 457, 458, 459, 461, 462, 463, 465, 466,
+ 467, 469, 470, 471, 473, 474, 475, 477, 478, 479,
+ 481, 482, 440, 444, 448, 452, 456, 464, 468, 472,
+ 460, 476, 480, 374, 375, 376, 410, 419, 421, 415,
+ 420, 422, 423, 425, 426, 427, 429, 430, 431, 433,
+ 434, 435, 437, 438, 411, 412, 413, 424, 414, 416,
+ 417, 418, 428, 432, 436, 485, 486, 489, 490, 491,
+ 492, 487, 488, 584, 132, 498, 499, 500, 0, 497,
+ 161, 159, 160, 158, 0, 206, 162, 163, 164, 134,
+ 133, 0, 190, 171, 173, 169, 175, 177, 172, 174,
+ 170, 176, 178, 167, 168, 192, 179, 186, 187, 188,
+ 189, 180, 181, 182, 183, 184, 185, 135, 136, 137,
+ 138, 139, 140, 147, 583, 0, 585, 0, 109, 108,
+ 0, 120, 125, 154, 153, 151, 155, 0, 148, 150,
+ 156, 130, 202, 152, 496, 0, 580, 582, 0, 503,
+ 0, 0, 0, 97, 0, 94, 0, 107, 0, 116,
+ 110, 118, 0, 119, 0, 95, 126, 100, 0, 149,
+ 131, 0, 195, 201, 1, 581, 0, 0, 501, 144,
+ 146, 0, 142, 193, 0, 0, 98, 0, 0, 586,
+ 111, 115, 117, 113, 121, 112, 0, 127, 103, 0,
+ 101, 0, 0, 0, 9, 0, 43, 42, 44, 41,
+ 5, 6, 7, 8, 2, 16, 14, 15, 17, 10,
+ 11, 12, 13, 3, 18, 37, 20, 25, 26, 0,
+ 0, 30, 0, 204, 0, 36, 34, 0, 196, 96,
+ 0, 0, 0, 505, 0, 0, 141, 0, 191, 0,
+ 197, 45, 49, 52, 55, 60, 63, 65, 67, 69,
+ 71, 73, 75, 0, 0, 99, 0, 531, 540, 544,
+ 0, 0, 0, 565, 0, 0, 0, 0, 0, 0,
+ 0, 0, 45, 78, 91, 0, 518, 0, 156, 130,
+ 521, 542, 520, 528, 519, 0, 522, 523, 546, 524,
+ 553, 525, 526, 561, 527, 0, 114, 0, 122, 0,
+ 513, 129, 0, 0, 105, 0, 102, 38, 39, 0,
+ 22, 23, 0, 0, 28, 27, 0, 206, 31, 33,
+ 40, 0, 203, 0, 511, 0, 509, 504, 506, 0,
+ 93, 145, 143, 194, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 75, 191, 192, 0, 0, 521,
- 0, 554, 567, 566, 0, 558, 0, 570, 568, 0,
- 0, 0, 551, 520, 80, 81, 83, 82, 85, 86,
- 87, 88, 89, 84, 79, 0, 0, 536, 532, 534,
- 538, 545, 553, 123, 0, 507, 0, 127, 0, 105,
- 4, 0, 23, 20, 31, 198, 0, 503, 0, 498,
- 493, 45, 46, 47, 50, 49, 52, 53, 57, 58,
- 55, 56, 60, 61, 63, 65, 67, 69, 71, 73,
- 0, 193, 581, 0, 579, 523, 0, 0, 0, 0,
- 569, 0, 550, 78, 91, 122, 505, 0, 103, 18,
- 499, 501, 0, 0, 0, 0, 0, 542, 0, 0,
- 0, 0, 561, 560, 563, 529, 546, 506, 508, 0,
- 0, 578, 580, 524, 0, 0, 0, 562, 0, 0,
- 541, 0, 0, 539, 0, 76, 582, 0, 526, 555,
- 525, 0, 564, 0, 529, 528, 530, 548, 543, 0,
- 565, 559, 540, 549, 0, 557, 547
+ 0, 0, 0, 76, 198, 199, 0, 0, 530, 0,
+ 563, 576, 575, 0, 567, 0, 579, 577, 0, 0,
+ 0, 560, 529, 81, 82, 84, 83, 86, 87, 88,
+ 89, 90, 85, 80, 0, 0, 545, 541, 543, 547,
+ 554, 562, 124, 0, 516, 0, 128, 0, 106, 4,
+ 0, 24, 21, 32, 205, 0, 512, 0, 507, 502,
+ 46, 47, 48, 51, 50, 53, 54, 58, 59, 56,
+ 57, 61, 62, 64, 66, 68, 70, 72, 74, 0,
+ 200, 590, 0, 588, 532, 0, 0, 0, 0, 578,
+ 0, 559, 79, 92, 123, 514, 0, 104, 19, 508,
+ 510, 0, 0, 0, 0, 0, 551, 0, 0, 0,
+ 0, 570, 569, 572, 538, 555, 515, 517, 0, 0,
+ 587, 589, 533, 0, 0, 0, 571, 0, 0, 550,
+ 0, 0, 548, 0, 77, 591, 0, 535, 564, 534,
+ 0, 573, 0, 538, 537, 539, 557, 552, 0, 574,
+ 568, 549, 558, 0, 566, 556
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
- -453, -453, 8696, -453, -89, -88, -122, -84, -19, -18,
- -17, -16, -20, -15, -453, -85, -453, -98, -453, -110,
- -119, 2, -453, -453, -453, 4, -453, -453, -453, 189,
- 191, 192, -453, -453, -339, -453, -453, -453, -453, 98,
- -453, -37, -44, -453, 9, -453, 0, -71, -453, -453,
- -453, -453, 261, -453, -453, -453, -452, -137, 20, -68,
- -209, -453, -96, -198, -326, -453, -136, -453, -453, -146,
- -144, -453, -453, 200, -265, -87, -453, 57, -453, -112,
- -453, 59, -453, -453, -453, -453, 61, -453, -453, -453,
- -453, -453, -453, -453, -453, 228, -453, -453, -453, -453,
- -99
+ -457, -457, -457, -457, -457, -457, -457, -457, -457, -457,
+ -457, -457, 8868, -457, -87, -84, -127, -93, -33, -31,
+ -27, -25, -28, -26, -457, -86, -457, -103, -457, -111,
+ -125, 2, -457, -457, -457, 4, -457, -457, -457, 176,
+ 194, 178, -457, -457, -337, -457, -457, -457, -457, 95,
+ -457, -37, -46, -457, 9, -457, 0, -63, -457, -457,
+ -457, -457, 263, -457, -457, -457, -456, -140, 10, -73,
+ -211, -457, -102, -198, -321, -457, -144, -457, -457, -155,
+ -154, -457, -457, 198, -274, -97, -457, 46, -457, -118,
+ -457, 51, -457, -457, -457, -457, 52, -457, -457, -457,
+ -457, -457, -457, -457, -457, 213, -457, -457, -457, -457,
+ -105
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 434, 435, 436, 621, 437, 438, 439, 440, 441,
- 442, 443, 493, 445, 463, 464, 465, 466, 467, 468,
- 469, 470, 471, 472, 473, 494, 650, 495, 605, 496,
- 552, 497, 337, 524, 413, 498, 339, 340, 341, 371,
- 372, 373, 342, 343, 344, 345, 346, 347, 393, 394,
- 348, 349, 350, 351, 446, 396, 447, 399, 384, 385,
- 448, 354, 355, 356, 455, 389, 453, 454, 546, 547,
- 522, 616, 501, 502, 503, 504, 505, 580, 676, 709,
- 700, 701, 702, 710, 506, 507, 508, 509, 703, 680,
- 510, 511, 704, 724, 512, 513, 514, 656, 584, 658,
- 684, 698, 699, 515, 357, 358, 359, 368, 516, 653,
- 654
+ -1, 443, 444, 445, 630, 446, 447, 448, 449, 450,
+ 451, 452, 502, 454, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 503, 659, 504, 614, 505,
+ 561, 506, 345, 533, 421, 507, 347, 348, 349, 379,
+ 380, 381, 350, 351, 352, 353, 354, 355, 401, 402,
+ 356, 357, 358, 359, 455, 404, 456, 407, 392, 393,
+ 457, 362, 363, 364, 464, 397, 462, 463, 555, 556,
+ 531, 625, 510, 511, 512, 513, 514, 589, 685, 718,
+ 709, 710, 711, 719, 515, 516, 517, 518, 712, 689,
+ 519, 520, 713, 733, 521, 522, 523, 665, 593, 667,
+ 693, 707, 708, 524, 365, 366, 367, 376, 525, 662,
+ 663
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1397,161 +1413,122 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 353, 542, 336, 550, 338, 481, 457, 363, 484, 352,
- 485, 486, 458, 543, 489, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 618, 364, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 374, 381, 530, 409, 609, 613,
- 521, 615, 474, 449, 617, 655, 549, 678, 562, 563,
- 573, 365, 391, 397, 361, 560, 561, 407, 378, 397,
- 381, 398, 475, 374, 517, 519, 408, 566, 567, 397,
- 476, 375, 459, 392, 539, 678, 518, 366, 460, 382,
- 352, 369, 451, 564, 565, 574, 362, 353, 352, 336,
- 388, 338, 297, 531, 532, 475, 352, 302, 303, 708,
- 375, 551, 523, 674, 375, 536, 716, 675, 589, 352,
- 591, 537, -34, 352, 533, 475, 657, 708, 534, 452,
- 577, 410, 614, 620, 411, 685, 686, 412, 352, 606,
- 500, 606, 606, 376, 719, 665, 377, 381, 526, 499,
- 606, 527, 606, 549, 628, 607, 451, 629, 451, 367,
- 521, 606, 521, 622, 660, 521, 594, 595, 596, 597,
- 598, 599, 600, 601, 602, 603, 293, 294, 295, 624,
- 638, 639, 640, 641, 628, 604, 370, 670, 555, 556,
- 557, 544, 723, 452, 558, 452, 559, 609, 688, 666,
- 352, 667, 352, 383, 352, 606, 662, 606, 689, 634,
- 635, 390, 636, 637, 627, 400, 659, 395, 397, 405,
- 661, 549, 642, 643, 406, 450, 456, 451, 525, 535,
- 540, 475, 545, 554, 568, 569, 571, 572, 718, 570,
- 575, 578, 581, 579, 582, 583, 500, 663, 664, 592,
- 585, 586, 590, 451, 587, 499, 521, 593, -35, -33,
- 619, 623, -28, 651, 452, 609, 669, 652, 673, 606,
- 681, 693, 691, 352, 695, 696, 694, 706, -527, 707,
- 672, 712, 713, 478, 714, 726, 677, 717, 725, 644,
- 452, 645, 648, 646, 690, 647, 553, 360, 649, 352,
- 671, 402, 682, 403, 626, 715, 404, 721, 401, 521,
- 722, 683, 697, 610, 677, 611, 692, 612, 0, 0,
- 500, 451, 0, 0, 500, 387, 711, 0, 551, 499,
- 0, 705, 0, 499, 0, 0, 0, 0, 0, 0,
- 0, 0, 720, 0, 0, 0, 0, 0, 0, 521,
- 0, 0, 0, 0, 0, 0, 0, 0, 452, 679,
- 0, 0, 0, 0, 0, 0, 0, 352, 0, 0,
- 0, 0, 0, 0, 0, 381, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 679, 0, 0,
- 0, 0, 0, 0, 0, 500, 500, 0, 500, 0,
- 0, 0, 0, 0, 499, 499, 0, 499, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 382,
- 0, 0, 0, 0, 500, 0, 0, 0, 352, 0,
- 0, 0, 0, 499, 0, 500, 0, 0, 0, 0,
- 0, 0, 500, 0, 499, 0, 0, 0, 0, 0,
- 0, 499, 0, 500, 0, 0, 0, 500, 0, 0,
- 0, 0, 499, 500, 0, 0, 499, 0, 0, 0,
- 386, 0, 499, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
- 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
- 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
- 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
- 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227,
- 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
- 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
- 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
- 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 0, 0, 0, 0, 0, 0, 0,
+ 361, 551, 344, 415, 346, 405, 405, 484, 559, 360,
+ 405, 484, 416, 552, 406, 485, 371, 527, 532, 372,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 627, 375, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 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, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 389, 382, 530, 539, 664, 622, 618, 624, 483,
+ 369, 626, 558, 417, 399, 571, 572, 582, 687, 458,
+ 569, 570, 484, 540, 541, 377, 389, 490, 373, 623,
+ 493, 382, 494, 495, 384, 400, 498, 385, 548, 383,
+ 526, 528, 370, -35, 378, 542, 687, 390, 360, 543,
+ 460, 573, 574, 583, 374, 361, 360, 344, 396, 346,
+ 299, 466, 575, 576, 360, 304, 305, 467, 383, 560,
+ 683, 386, 383, 717, 684, 391, 598, 360, 600, 535,
+ 725, 360, 536, 418, 468, 666, 419, 461, 586, 420,
+ 469, 717, 398, 545, 629, 694, 360, 695, 509, 546,
+ 615, 615, 674, 615, 389, 728, 675, 508, 676, 558,
+ 615, 615, 403, 616, 530, 460, 530, 460, 567, 530,
+ 568, 631, 408, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 633, 647, 648, 649, 650, 637, 615,
+ 671, 638, 732, 613, 615, 637, 413, 669, 679, 414,
+ 553, 405, 461, 459, 461, 697, 618, 615, 698, 360,
+ 465, 360, 534, 360, 295, 296, 297, 564, 565, 566,
+ 643, 644, 651, 652, 668, 645, 646, 558, 670, 544,
+ 549, 636, 554, 484, 563, 577, 460, 578, 579, 580,
+ 581, 584, 587, 590, 588, 727, 591, 592, 594, 595,
+ 599, 672, 673, 601, 596, 509, 602, -36, -34, 628,
+ 530, 632, 460, -29, 508, 661, 660, 678, 615, 682,
+ 690, 700, 702, 461, 618, 704, 705, 703, 715, -536,
+ 716, 722, 360, 721, 653, 487, 726, 654, 681, 734,
+ 723, 735, 655, 657, 686, 656, 658, 699, 411, 461,
+ 412, 368, 562, 635, 680, 691, 724, 730, 360, 731,
+ 692, 619, 410, 530, 409, 706, 620, 621, 395, 701,
+ 0, 0, 686, 0, 0, 0, 0, 0, 0, 509,
+ 460, 0, 0, 509, 720, 714, 560, 0, 508, 0,
+ 0, 0, 508, 0, 0, 0, 0, 0, 0, 0,
+ 729, 0, 0, 530, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 461, 688, 0,
+ 0, 0, 0, 0, 0, 0, 360, 0, 0, 0,
+ 0, 0, 389, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 688, 0, 0, 0,
+ 0, 0, 0, 0, 509, 509, 0, 509, 0, 0,
+ 0, 0, 0, 508, 508, 0, 508, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 390, 0,
+ 0, 0, 0, 509, 0, 0, 0, 360, 0, 0,
+ 0, 0, 508, 0, 509, 0, 0, 0, 0, 0,
+ 0, 509, 0, 508, 0, 0, 0, 0, 0, 0,
+ 508, 0, 509, 0, 0, 0, 509, 0, 0, 0,
+ 0, 508, 509, 0, 0, 508, 0, 0, 0, 394,
+ 0, 508, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 293, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 291, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
- 294, 295, 296, 0, 0, 0, 0, 0, 0, 0,
- 0, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 294, 295, 296, 297, 298, 0, 0, 0, 0, 0,
+ 0, 0, 0, 299, 300, 301, 302, 303, 304, 305,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 304, 305, 306, 307, 308, 309, 0, 0, 0, 0,
- 0, 0, 0, 0, 310, 0, 311, 312, 313, 314,
+ 0, 0, 306, 307, 308, 309, 310, 311, 0, 0,
+ 0, 0, 0, 0, 0, 0, 312, 0, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
- 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 0, 0, 414, 415, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 416, 0, 477, 0, 478, 479, 0, 0,
- 0, 0, 480, 417, 418, 419, 420, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
- 296, 0, 0, 0, 421, 422, 423, 424, 425, 297,
- 298, 299, 300, 301, 302, 303, 481, 482, 483, 484,
- 0, 485, 486, 487, 488, 489, 490, 491, 304, 305,
- 306, 307, 308, 309, 426, 427, 428, 429, 430, 431,
- 432, 433, 310, 492, 311, 312, 313, 314, 315, 316,
- 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
- 327, 328, 329, 330, 331, 332, 333, 334, 335, 1,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
@@ -1580,19 +1557,145 @@ static const yytype_int16 yytable[] =
252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 0,
- 0, 414, 415, 0, 0, 0, 0, 0, 0, 0,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 0, 422, 423, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 416, 0, 477, 0, 478, 608, 0, 0, 0, 0,
- 480, 417, 418, 419, 420, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 292, 293, 294, 295, 296, 0,
- 0, 0, 421, 422, 423, 424, 425, 297, 298, 299,
- 300, 301, 302, 303, 481, 482, 483, 484, 0, 485,
- 486, 487, 488, 489, 490, 491, 304, 305, 306, 307,
- 308, 309, 426, 427, 428, 429, 430, 431, 432, 433,
- 310, 492, 311, 312, 313, 314, 315, 316, 317, 318,
- 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
- 329, 330, 331, 332, 333, 334, 335, 1, 2, 3,
+ 0, 0, 424, 425, 0, 486, 0, 487, 488, 0,
+ 0, 0, 0, 489, 426, 427, 428, 429, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 294, 295, 296,
+ 297, 298, 0, 0, 0, 430, 431, 432, 433, 434,
+ 299, 300, 301, 302, 303, 304, 305, 490, 491, 492,
+ 493, 0, 494, 495, 496, 497, 498, 499, 500, 306,
+ 307, 308, 309, 310, 311, 435, 436, 437, 438, 439,
+ 440, 441, 442, 312, 501, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 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, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 0,
+ 422, 423, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 424,
+ 425, 0, 486, 0, 487, 617, 0, 0, 0, 0,
+ 489, 426, 427, 428, 429, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 294, 295, 296, 297, 298, 0,
+ 0, 0, 430, 431, 432, 433, 434, 299, 300, 301,
+ 302, 303, 304, 305, 490, 491, 492, 493, 0, 494,
+ 495, 496, 497, 498, 499, 500, 306, 307, 308, 309,
+ 310, 311, 435, 436, 437, 438, 439, 440, 441, 442,
+ 312, 501, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 0, 422, 423, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 424, 425, 0, 486,
+ 0, 487, 0, 0, 0, 0, 0, 489, 426, 427,
+ 428, 429, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 294, 295, 296, 297, 298, 0, 0, 0, 430,
+ 431, 432, 433, 434, 299, 300, 301, 302, 303, 304,
+ 305, 490, 491, 492, 493, 0, 494, 495, 496, 497,
+ 498, 499, 500, 306, 307, 308, 309, 310, 311, 435,
+ 436, 437, 438, 439, 440, 441, 442, 312, 501, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 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,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 0, 422, 423, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 424, 425, 0, 486, 0, 408, 0,
+ 0, 0, 0, 0, 489, 426, 427, 428, 429, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 294, 295,
+ 296, 297, 298, 0, 0, 0, 430, 431, 432, 433,
+ 434, 299, 300, 301, 302, 303, 304, 305, 490, 491,
+ 492, 493, 0, 494, 495, 496, 497, 498, 499, 500,
+ 306, 307, 308, 309, 310, 311, 435, 436, 437, 438,
+ 439, 440, 441, 442, 312, 501, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
@@ -1621,19 +1724,145 @@ static const yytype_int16 yytable[] =
254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 0, 0, 414,
- 415, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 416, 0,
- 477, 0, 478, 0, 0, 0, 0, 0, 480, 417,
- 418, 419, 420, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 292, 293, 294, 295, 296, 0, 0, 0,
- 421, 422, 423, 424, 425, 297, 298, 299, 300, 301,
- 302, 303, 481, 482, 483, 484, 0, 485, 486, 487,
- 488, 489, 490, 491, 304, 305, 306, 307, 308, 309,
- 426, 427, 428, 429, 430, 431, 432, 433, 310, 492,
- 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
- 331, 332, 333, 334, 335, 1, 2, 3, 4, 5,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 0, 422, 423, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 424, 425, 0, 486, 0, 0, 0, 0, 0, 0,
+ 0, 489, 426, 427, 428, 429, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 294, 295, 296, 297, 298,
+ 0, 0, 0, 430, 431, 432, 433, 434, 299, 300,
+ 301, 302, 303, 304, 305, 490, 491, 492, 493, 0,
+ 494, 495, 496, 497, 498, 499, 500, 306, 307, 308,
+ 309, 310, 311, 435, 436, 437, 438, 439, 440, 441,
+ 442, 312, 501, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 0, 422, 423,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 424, 425, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 489, 426,
+ 427, 428, 429, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 294, 295, 296, 297, 298, 0, 0, 0,
+ 430, 431, 432, 433, 434, 299, 300, 301, 302, 303,
+ 304, 305, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 306, 307, 308, 309, 310, 311,
+ 435, 436, 437, 438, 439, 440, 441, 442, 312, 0,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 0, 422, 423, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 424, 425, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 426, 427, 428, 429,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 294,
+ 295, 296, 297, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 299, 300, 301, 302, 303, 304, 305, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 306, 307, 308, 309, 310, 311, 435, 436, 437,
+ 438, 439, 440, 441, 442, 312, 0, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 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, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 293, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 294, 295, 296, 297,
+ 298, 0, 0, 0, 0, 0, 0, 0, 0, 299,
+ 300, 301, 302, 303, 304, 305, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 306, 307,
+ 308, 309, 310, 311, 0, 0, 0, 0, 0, 0,
+ 0, 0, 312, 0, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
@@ -1662,19 +1891,145 @@ static const yytype_int16 yytable[] =
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 287, 288, 289, 290, 0, 0, 414, 415, 0,
+ 286, 287, 288, 289, 290, 291, 292, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 416, 0, 477, 0,
- 400, 0, 0, 0, 0, 0, 480, 417, 418, 419,
- 420, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 292, 293, 294, 295, 296, 0, 0, 0, 421, 422,
- 423, 424, 425, 297, 298, 299, 300, 301, 302, 303,
- 481, 482, 483, 484, 0, 485, 486, 487, 488, 489,
- 490, 491, 304, 305, 306, 307, 308, 309, 426, 427,
- 428, 429, 430, 431, 432, 433, 310, 492, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
- 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
- 333, 334, 335, 1, 2, 3, 4, 5, 6, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 387,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 294, 295, 296, 297, 0, 0, 0,
+ 0, 0, 0, 0, 0, 388, 299, 300, 301, 302,
+ 303, 304, 305, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 306, 307, 308, 309, 310,
+ 311, 0, 0, 0, 0, 0, 0, 0, 0, 312,
+ 0, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 557, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 294, 295, 296, 297, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 299, 300, 301, 302, 303, 304, 305,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 306, 307, 308, 309, 310, 311, 0, 0,
+ 0, 0, 0, 0, 0, 0, 312, 0, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 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, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 639, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 294, 295, 296,
+ 297, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 299, 300, 301, 302, 303, 304, 305, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 306,
+ 307, 308, 309, 310, 311, 0, 0, 0, 0, 0,
+ 0, 0, 0, 312, 0, 313, 314, 315, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 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, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 677, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 294, 295, 296, 297, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 299, 300, 301,
+ 302, 303, 304, 305, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 306, 307, 308, 309,
+ 310, 311, 0, 0, 0, 0, 0, 0, 0, 0,
+ 312, 0, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
@@ -1703,65 +2058,25 @@ static const yytype_int16 yytable[] =
258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 0, 0, 414, 415, 0, 0, 0,
+ 288, 289, 290, 291, 292, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 416, 0, 477, 0, 0, 0,
- 0, 0, 0, 0, 480, 417, 418, 419, 420, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
- 294, 295, 296, 0, 0, 0, 421, 422, 423, 424,
- 425, 297, 298, 299, 300, 301, 302, 303, 481, 482,
- 483, 484, 0, 485, 486, 487, 488, 489, 490, 491,
- 304, 305, 306, 307, 308, 309, 426, 427, 428, 429,
- 430, 431, 432, 433, 310, 492, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
- 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 0, 0, 414, 415, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 416, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 480, 417, 418, 419, 420, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
- 296, 0, 0, 0, 421, 422, 423, 424, 425, 297,
- 298, 299, 300, 301, 302, 303, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 304, 305,
- 306, 307, 308, 309, 426, 427, 428, 429, 430, 431,
- 432, 433, 310, 0, 311, 312, 313, 314, 315, 316,
- 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
- 327, 328, 329, 330, 331, 332, 333, 334, 335, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 294, 295, 296, 297, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 299, 300, 301, 302, 303, 304,
+ 305, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 306, 307, 308, 309, 310, 311, 0,
+ 0, 0, 0, 0, 0, 0, 0, 312, 0, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 52, 53, 54, 55, 56, 57, 58, 0, 0, 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,
@@ -1784,25 +2099,24 @@ static const yytype_int16 yytable[] =
252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 0,
- 0, 414, 415, 0, 0, 0, 0, 0, 0, 0,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 0, 422, 423, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 416, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 417, 418, 419, 420, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 292, 293, 294, 295, 0, 0,
- 0, 0, 421, 422, 423, 424, 425, 297, 298, 299,
- 300, 301, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 304, 305, 306, 307,
- 308, 309, 426, 427, 428, 429, 430, 431, 432, 433,
- 310, 0, 311, 312, 313, 314, 315, 316, 317, 318,
- 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
- 329, 330, 331, 332, 333, 334, 335, 1, 2, 3,
+ 0, 0, 424, 425, 0, 0, 0, 529, 696, 0,
+ 0, 0, 0, 0, 426, 427, 428, 429, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 299, 0, 0, 0, 0, 304, 305, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 435, 436, 437, 438, 439,
+ 440, 441, 442, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 325, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 54, 55, 56, 57, 58, 0, 0, 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,
@@ -1825,25 +2139,24 @@ static const yytype_int16 yytable[] =
254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 0, 0, 0,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 0, 422, 423, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 424, 425, 0, 0, 470, 0, 0, 0, 0, 0,
+ 0, 0, 426, 427, 428, 429, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 291, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 299, 0,
+ 0, 0, 0, 304, 305, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 292, 293, 294, 295, 296, 0, 0, 0,
- 0, 0, 0, 0, 0, 297, 298, 299, 300, 301,
- 302, 303, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
- 0, 0, 0, 0, 0, 0, 0, 0, 310, 0,
- 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
- 331, 332, 333, 334, 335, 1, 2, 3, 4, 5,
+ 0, 0, 0, 435, 436, 437, 438, 439, 440, 441,
+ 442, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 325, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 56, 57, 58, 0, 0, 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,
@@ -1866,25 +2179,24 @@ static const yytype_int16 yytable[] =
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 287, 288, 289, 290, 0, 0, 0, 0, 0,
+ 286, 287, 288, 289, 290, 291, 292, 0, 0, 422,
+ 423, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 424, 425,
+ 0, 0, 0, 529, 0, 0, 0, 0, 0, 0,
+ 426, 427, 428, 429, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 430, 431, 432, 433, 434, 299, 0, 0, 0,
+ 0, 304, 305, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 379, 0, 0, 0,
+ 0, 435, 436, 437, 438, 439, 440, 441, 442, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 292, 293, 294, 295, 0, 0, 0, 0, 0, 0,
- 0, 0, 380, 297, 298, 299, 300, 301, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 304, 305, 306, 307, 308, 309, 0, 0,
- 0, 0, 0, 0, 0, 0, 310, 0, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
- 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
- 333, 334, 335, 1, 2, 3, 4, 5, 6, 7,
+ 0, 0, 0, 325, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 58, 0, 0, 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,
@@ -1907,25 +2219,24 @@ static const yytype_int16 yytable[] =
258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 548,
+ 288, 289, 290, 291, 292, 0, 0, 422, 423, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 292, 293,
- 294, 295, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 0, 0, 0, 0, 0, 0, 424, 425, 0, 0,
+ 585, 0, 0, 0, 0, 0, 0, 0, 426, 427,
+ 428, 429, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 430,
+ 431, 432, 433, 434, 299, 0, 0, 0, 0, 304,
+ 305, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 435,
+ 436, 437, 438, 439, 440, 441, 442, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 304, 305, 306, 307, 308, 309, 0, 0, 0, 0,
- 0, 0, 0, 0, 310, 0, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 0, 325, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 0,
+ 0, 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,
@@ -1948,24 +2259,23 @@ static const yytype_int16 yytable[] =
260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 290, 291, 292, 0, 0, 422, 423, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 630, 0, 0,
+ 0, 0, 0, 0, 424, 425, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 597, 426, 427, 428, 429,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 292, 293, 294, 295,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 297,
- 298, 299, 300, 301, 302, 303, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 304, 305,
- 306, 307, 308, 309, 0, 0, 0, 0, 0, 0,
- 0, 0, 310, 0, 311, 312, 313, 314, 315, 316,
- 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
- 327, 328, 329, 330, 331, 332, 333, 334, 335, 1,
+ 0, 0, 0, 0, 0, 0, 0, 430, 431, 432,
+ 433, 434, 299, 0, 0, 0, 0, 304, 305, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 435, 436, 437,
+ 438, 439, 440, 441, 442, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 325,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 52, 53, 54, 55, 56, 57, 58, 0, 0, 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,
@@ -1988,25 +2298,24 @@ static const yytype_int16 yytable[] =
252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 0,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 0, 422, 423, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 424, 425, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 426, 427, 428, 429, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 668, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 430, 431, 432, 433, 434,
+ 299, 0, 0, 0, 0, 304, 305, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 292, 293, 294, 295, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 297, 298, 299,
- 300, 301, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 304, 305, 306, 307,
- 308, 309, 0, 0, 0, 0, 0, 0, 0, 0,
- 310, 0, 311, 312, 313, 314, 315, 316, 317, 318,
- 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
- 329, 330, 331, 332, 333, 334, 335, 1, 2, 3,
+ 0, 0, 0, 0, 0, 435, 436, 437, 438, 439,
+ 440, 441, 442, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 325, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 54, 55, 56, 57, 58, 0, 0, 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,
@@ -2029,259 +2338,205 @@ static const yytype_int16 yytable[] =
254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 0, 0, 0,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 453,
+ 0, 422, 423, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 471, 0, 0, 0, 0, 0, 0,
+ 424, 425, 0, 0, 0, 0, 0, 0, 0, 0,
+ 537, 538, 426, 427, 428, 429, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 430, 431, 432, 433, 434, 299, 0,
+ 0, 0, 550, 304, 547, 0, 0, 0, 0, 0,
+ 0, 0, 0, 471, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 435, 436, 437, 438, 439, 440, 441,
+ 442, 0, 471, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 325, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 292, 293, 294, 295, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 297, 298, 299, 300, 301,
- 302, 303, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
- 0, 0, 0, 0, 0, 0, 0, 0, 310, 0,
- 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
- 331, 332, 333, 334, 335, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 0, 520,
- 687, 0, 0, 0, 0, 0, 417, 418, 419, 420,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 634,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
+ 0, 0, 640, 641, 642, 471, 471, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 461, 0,
- 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 0, 520,
- 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 576, 0,
- 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 588, 417, 418, 419, 420,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 416, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 303, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 318, 2, 3, 4, 5, 6,
+ 471
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 0, 324, 0, 317, 0, 319, 319, 319, 464, 0,
+ 319, 319, 326, 336, 327, 327, 317, 326, 326, 317,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 533, 327, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 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, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 357, 349, 416, 425, 589, 527, 515, 529, 405,
+ 321, 532, 462, 386, 353, 299, 300, 304, 665, 392,
+ 295, 296, 319, 297, 298, 318, 382, 361, 327, 326,
+ 364, 378, 366, 367, 324, 374, 370, 327, 451, 349,
+ 413, 414, 353, 317, 324, 319, 693, 357, 349, 323,
+ 397, 335, 336, 340, 353, 365, 357, 365, 368, 365,
+ 354, 318, 301, 302, 365, 359, 360, 324, 378, 465,
+ 320, 353, 382, 704, 324, 335, 497, 378, 499, 324,
+ 711, 382, 327, 321, 318, 593, 324, 397, 484, 327,
+ 324, 722, 321, 318, 318, 318, 397, 318, 408, 324,
+ 324, 324, 623, 324, 460, 318, 322, 408, 324, 559,
+ 324, 324, 353, 327, 527, 462, 529, 464, 329, 532,
+ 331, 542, 321, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 546, 571, 572, 573, 574, 324, 324,
+ 325, 327, 726, 326, 324, 324, 353, 327, 327, 353,
+ 460, 319, 462, 327, 464, 676, 664, 324, 325, 460,
+ 326, 462, 353, 464, 342, 343, 344, 332, 333, 334,
+ 567, 568, 575, 576, 595, 569, 570, 627, 599, 318,
+ 317, 554, 353, 319, 353, 339, 533, 338, 337, 303,
+ 305, 320, 319, 317, 322, 716, 327, 327, 317, 317,
+ 317, 614, 615, 325, 327, 515, 327, 317, 317, 353,
+ 623, 353, 559, 318, 515, 353, 320, 320, 324, 317,
+ 361, 320, 322, 533, 732, 318, 317, 353, 318, 321,
+ 326, 318, 533, 327, 577, 321, 321, 578, 659, 327,
+ 365, 322, 579, 581, 665, 580, 582, 682, 382, 559,
+ 382, 298, 467, 553, 637, 667, 710, 722, 559, 723,
+ 667, 525, 378, 676, 376, 693, 525, 525, 365, 684,
+ -1, -1, 693, -1, -1, -1, -1, -1, -1, 589,
+ 627, -1, -1, 593, 705, 698, 682, -1, 589, -1,
+ -1, -1, 593, -1, -1, -1, -1, -1, -1, -1,
+ 721, -1, -1, 716, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 627, 665, -1,
+ -1, -1, -1, -1, -1, -1, 627, -1, -1, -1,
+ -1, -1, 688, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 693, -1, -1, -1,
+ -1, -1, -1, -1, 664, 665, -1, 667, -1, -1,
+ -1, -1, -1, 664, 665, -1, 667, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 688, -1,
+ -1, -1, -1, 693, -1, -1, -1, 688, -1, -1,
+ -1, -1, 693, -1, 704, -1, -1, -1, -1, -1,
+ -1, 711, -1, 704, -1, -1, -1, -1, -1, -1,
+ 711, -1, 722, -1, -1, -1, 726, -1, -1, -1,
+ -1, 722, 732, -1, -1, 726, -1, -1, -1, 0,
+ -1, 732, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 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,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 327, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 341, 342, 343, 344, 345, -1, -1, -1, -1, -1,
+ -1, -1, -1, 354, 355, 356, 357, 358, 359, 360,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 373, 374, 375, 376, 377, 378, -1, -1,
+ -1, -1, -1, -1, -1, -1, 387, -1, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 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, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, -1, -1, 297, 298, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 316, 317, -1, 319, -1, 321, 322, -1,
+ -1, -1, -1, 327, 328, 329, 330, 331, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 341, 342, 343,
+ 344, 345, -1, -1, -1, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, -1, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
+ 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,
@@ -2304,114 +2559,20 @@ static const yytype_int16 yytable[] =
257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 0, 0, 414, 415, 0, 444,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 462, 0, 416, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 417, 418, 419, 420,
- 528, 529, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 422, 423,
- 424, 425, 297, 0, 0, 0, 0, 302, 538, 0,
- 0, 541, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 462, 0, 0, 0, 0, 426, 427, 428,
- 429, 430, 431, 432, 433, 0, 0, 0, 0, 0,
- 0, 462, 0, 0, 318, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 625, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 631, 632, 633, 462, 462, 462, 462, 462, 462,
- 462, 462, 462, 462, 462, 462, 462, 462, 462, 462,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 462
-};
-
-static const yytype_int16 yycheck[] =
-{
- 0, 321, 0, 455, 0, 358, 315, 314, 361, 0,
- 363, 364, 321, 333, 367, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 524, 314, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, 341, 349, 416, 378, 506, 518,
- 408, 520, 397, 384, 523, 580, 453, 656, 297, 298,
- 302, 324, 350, 316, 318, 293, 294, 314, 350, 316,
- 374, 324, 316, 370, 405, 406, 323, 299, 300, 316,
- 324, 341, 315, 371, 442, 684, 323, 350, 321, 349,
- 341, 315, 389, 332, 333, 337, 350, 357, 349, 357,
- 360, 357, 351, 295, 296, 316, 357, 356, 357, 695,
- 370, 456, 323, 317, 374, 315, 702, 321, 488, 370,
- 490, 321, 314, 374, 316, 316, 584, 713, 320, 389,
- 475, 318, 323, 315, 321, 315, 315, 324, 389, 321,
- 400, 321, 321, 321, 315, 614, 324, 451, 321, 400,
- 321, 324, 321, 550, 321, 324, 453, 324, 455, 324,
- 518, 321, 520, 533, 324, 523, 304, 305, 306, 307,
- 308, 309, 310, 311, 312, 313, 339, 340, 341, 537,
- 562, 563, 564, 565, 321, 323, 321, 324, 329, 330,
- 331, 451, 717, 453, 326, 455, 328, 655, 667, 319,
- 451, 321, 453, 332, 455, 321, 322, 321, 322, 558,
- 559, 318, 560, 561, 545, 318, 586, 350, 316, 350,
- 590, 618, 566, 567, 350, 324, 323, 524, 350, 315,
- 314, 316, 350, 350, 336, 335, 301, 303, 707, 334,
- 317, 316, 314, 319, 324, 324, 506, 605, 606, 322,
- 314, 314, 314, 550, 324, 506, 614, 324, 314, 314,
- 350, 350, 315, 317, 524, 723, 317, 350, 314, 321,
- 358, 319, 317, 524, 315, 314, 350, 315, 318, 323,
- 650, 324, 315, 318, 362, 319, 656, 318, 324, 568,
- 550, 569, 572, 570, 673, 571, 458, 296, 573, 550,
- 628, 370, 658, 374, 544, 701, 374, 713, 368, 667,
- 714, 658, 684, 516, 684, 516, 675, 516, -1, -1,
- 580, 618, -1, -1, 584, 357, 696, -1, 673, 580,
- -1, 689, -1, 584, -1, -1, -1, -1, -1, -1,
- -1, -1, 712, -1, -1, -1, -1, -1, -1, 707,
- -1, -1, -1, -1, -1, -1, -1, -1, 618, 656,
- -1, -1, -1, -1, -1, -1, -1, 618, -1, -1,
- -1, -1, -1, -1, -1, 679, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 684, -1, -1,
- -1, -1, -1, -1, -1, 655, 656, -1, 658, -1,
- -1, -1, -1, -1, 655, 656, -1, 658, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 679,
- -1, -1, -1, -1, 684, -1, -1, -1, 679, -1,
- -1, -1, -1, 684, -1, 695, -1, -1, -1, -1,
- -1, -1, 702, -1, 695, -1, -1, -1, -1, -1,
- -1, 702, -1, 713, -1, -1, -1, 717, -1, -1,
- -1, -1, 713, 723, -1, -1, 717, -1, -1, -1,
- 0, -1, 723, 3, 4, 5, 6, 7, 8, 9,
+ 287, 288, 289, 290, 291, 292, 293, 294, -1, -1,
+ 297, 298, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 316,
+ 317, -1, 319, -1, 321, 322, -1, -1, -1, -1,
+ 327, 328, 329, 330, 331, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 341, 342, 343, 344, 345, -1,
+ -1, -1, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, -1, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
@@ -2440,100 +2601,61 @@ static const yytype_int16 yycheck[] =
260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 291, 292, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 324, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
- 340, 341, 342, -1, -1, -1, -1, -1, -1, -1,
- -1, 351, 352, 353, 354, 355, 356, 357, -1, -1,
+ 290, 291, 292, 293, 294, -1, -1, 297, 298, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 370, 371, 372, 373, 374, 375, -1, -1, -1, -1,
- -1, -1, -1, -1, 384, -1, 386, 387, 388, 389,
+ -1, -1, -1, -1, -1, -1, 316, 317, -1, 319,
+ -1, 321, -1, -1, -1, -1, -1, 327, 328, 329,
+ 330, 331, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 341, 342, 343, 344, 345, -1, -1, -1, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, -1, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
- 410, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 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, 221,
- 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
- 292, -1, -1, 295, 296, -1, -1, -1, -1, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 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, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, -1, -1, 297, 298, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 314, -1, 316, -1, 318, 319, -1, -1,
- -1, -1, 324, 325, 326, 327, 328, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
- 342, -1, -1, -1, 346, 347, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
- -1, 363, 364, 365, 366, 367, 368, 369, 370, 371,
- 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
- 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
- 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
- 402, 403, 404, 405, 406, 407, 408, 409, 410, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 194, 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, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 291, 292, -1,
- -1, 295, 296, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 314, -1, 316, -1, 318, 319, -1, -1, -1, -1,
- 324, 325, 326, 327, 328, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 338, 339, 340, 341, 342, -1,
- -1, -1, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 359, 360, 361, -1, 363,
- 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
- 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
- 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
- 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
- 404, 405, 406, 407, 408, 409, 410, 3, 4, 5,
+ -1, -1, -1, 316, 317, -1, 319, -1, 321, -1,
+ -1, -1, -1, -1, 327, 328, 329, 330, 331, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 341, 342,
+ 343, 344, 345, -1, -1, -1, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, -1, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
@@ -2562,19 +2684,145 @@ static const yytype_int16 yycheck[] =
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 287, 288, 289, 290, 291, 292, -1, -1, 295,
- 296, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 314, -1,
- 316, -1, 318, -1, -1, -1, -1, -1, 324, 325,
- 326, 327, 328, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 338, 339, 340, 341, 342, -1, -1, -1,
- 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
- 356, 357, 358, 359, 360, 361, -1, 363, 364, 365,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, -1,
+ -1, 297, 298, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 316, 317, -1, 319, -1, -1, -1, -1, -1, -1,
+ -1, 327, 328, 329, 330, 331, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 341, 342, 343, 344, 345,
+ -1, -1, -1, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, -1,
366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
- 406, 407, 408, 409, 410, 3, 4, 5, 6, 7,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, -1, -1, 297, 298,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 316, 317, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 327, 328,
+ 329, 330, 331, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 341, 342, 343, 344, 345, -1, -1, -1,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, -1,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 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, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, -1, -1, 297, 298, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 316, 317, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 328, 329, 330, 331,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 341,
+ 342, 343, 344, -1, -1, -1, -1, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, -1, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 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, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 327, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 341, 342, 343, 344,
+ 345, -1, -1, -1, -1, -1, -1, -1, -1, 354,
+ 355, 356, 357, 358, 359, 360, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 373, 374,
+ 375, 376, 377, 378, -1, -1, -1, -1, -1, -1,
+ -1, -1, 387, -1, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
@@ -2603,19 +2851,145 @@ static const yytype_int16 yycheck[] =
258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 291, 292, -1, -1, 295, 296, -1,
+ 288, 289, 290, 291, 292, 293, 294, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 327,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 314, -1, 316, -1,
- 318, -1, -1, -1, -1, -1, 324, 325, 326, 327,
- 328, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 338, 339, 340, 341, 342, -1, -1, -1, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
- 358, 359, 360, 361, -1, 363, 364, 365, 366, 367,
- 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
- 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
- 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ -1, -1, -1, 341, 342, 343, 344, -1, -1, -1,
+ -1, -1, -1, -1, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 373, 374, 375, 376, 377,
+ 378, -1, -1, -1, -1, -1, -1, -1, -1, 387,
+ -1, 389, 390, 391, 392, 393, 394, 395, 396, 397,
398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
- 408, 409, 410, 3, 4, 5, 6, 7, 8, 9,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 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,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 322, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 341, 342, 343, 344, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 354, 355, 356, 357, 358, 359, 360,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 373, 374, 375, 376, 377, 378, -1, -1,
+ -1, -1, -1, -1, -1, -1, 387, -1, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 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, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 322, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 341, 342, 343,
+ 344, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 354, 355, 356, 357, 358, 359, 360, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 373,
+ 374, 375, 376, 377, 378, -1, -1, -1, -1, -1,
+ -1, -1, -1, 387, -1, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 322, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 341, 342, 343, 344, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 354, 355, 356,
+ 357, 358, 359, 360, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 373, 374, 375, 376,
+ 377, 378, -1, -1, -1, -1, -1, -1, -1, -1,
+ 387, -1, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
@@ -2644,65 +3018,25 @@ static const yytype_int16 yycheck[] =
260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 291, 292, -1, -1, 295, 296, -1, -1, -1,
+ 290, 291, 292, 293, 294, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 314, -1, 316, -1, -1, -1,
- -1, -1, -1, -1, 324, 325, 326, 327, 328, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
- 340, 341, 342, -1, -1, -1, 346, 347, 348, 349,
- 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
- 360, 361, -1, 363, 364, 365, 366, 367, 368, 369,
- 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
- 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 341, 342, 343, 344, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 354, 355, 356, 357, 358, 359,
+ 360, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 373, 374, 375, 376, 377, 378, -1,
+ -1, -1, -1, -1, -1, -1, -1, 387, -1, 389,
390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
- 410, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 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, 221,
- 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
- 292, -1, -1, 295, 296, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 314, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 324, 325, 326, 327, 328, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
- 342, -1, -1, -1, 346, 347, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 370, 371,
- 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
- 382, 383, 384, -1, 386, 387, 388, 389, 390, 391,
- 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
- 402, 403, 404, 405, 406, 407, 408, 409, 410, 3,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 54, 55, 56, 57, 58, 59, 60, -1, -1, 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,
@@ -2725,25 +3059,24 @@ static const yytype_int16 yycheck[] =
254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 291, 292, -1,
- -1, 295, 296, -1, -1, -1, -1, -1, -1, -1,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, -1, -1, 297, 298, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 314, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 325, 326, 327, 328, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 338, 339, 340, 341, -1, -1,
- -1, -1, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 370, 371, 372, 373,
- 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
- 384, -1, 386, 387, 388, 389, 390, 391, 392, 393,
- 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
- 404, 405, 406, 407, 408, 409, 410, 3, 4, 5,
+ -1, -1, 316, 317, -1, -1, -1, 321, 322, -1,
+ -1, -1, -1, -1, 328, 329, 330, 331, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 349, 350, 351, 352, 353,
+ 354, -1, -1, -1, -1, 359, 360, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 379, 380, 381, 382, 383,
+ 384, 385, 386, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 401, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 56, 57, 58, 59, 60, -1, -1, 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,
@@ -2766,25 +3099,24 @@ static const yytype_int16 yycheck[] =
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 287, 288, 289, 290, 291, 292, -1, -1, -1,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, -1,
+ -1, 297, 298, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 316, 317, -1, -1, 320, -1, -1, -1, -1, -1,
+ -1, -1, 328, 329, 330, 331, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 324, -1,
+ -1, -1, -1, 349, 350, 351, 352, 353, 354, -1,
+ -1, -1, -1, 359, 360, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 338, 339, 340, 341, 342, -1, -1, -1,
- -1, -1, -1, -1, -1, 351, 352, 353, 354, 355,
- 356, 357, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 370, 371, 372, 373, 374, 375,
- -1, -1, -1, -1, -1, -1, -1, -1, 384, -1,
- 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
- 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
- 406, 407, 408, 409, 410, 3, 4, 5, 6, 7,
+ -1, -1, -1, 379, 380, 381, 382, 383, 384, 385,
+ 386, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 401, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 58, 59, 60, -1, -1, 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,
@@ -2807,25 +3139,24 @@ static const yytype_int16 yycheck[] =
258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 291, 292, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 288, 289, 290, 291, 292, 293, 294, -1, -1, 297,
+ 298, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 316, 317,
+ -1, -1, -1, 321, -1, -1, -1, -1, -1, -1,
+ 328, 329, 330, 331, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 324, -1, -1, -1,
+ -1, 349, 350, 351, 352, 353, 354, -1, -1, -1,
+ -1, 359, 360, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 338, 339, 340, 341, -1, -1, -1, -1, -1, -1,
- -1, -1, 350, 351, 352, 353, 354, 355, 356, 357,
+ -1, 379, 380, 381, 382, 383, 384, 385, 386, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 370, 371, 372, 373, 374, 375, -1, -1,
- -1, -1, -1, -1, -1, -1, 384, -1, 386, 387,
- 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
- 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
- 408, 409, 410, 3, 4, 5, 6, 7, 8, 9,
+ -1, -1, -1, 401, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 60, -1, -1, 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,
@@ -2848,25 +3179,24 @@ static const yytype_int16 yycheck[] =
260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
- 290, 291, 292, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 319,
+ 290, 291, 292, 293, 294, -1, -1, 297, 298, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
- 340, 341, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 351, 352, 353, 354, 355, 356, 357, -1, -1,
+ -1, -1, -1, -1, -1, -1, 316, 317, -1, -1,
+ 320, -1, -1, -1, -1, -1, -1, -1, 328, 329,
+ 330, 331, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 349,
+ 350, 351, 352, 353, 354, -1, -1, -1, -1, 359,
+ 360, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 379,
+ 380, 381, 382, 383, 384, 385, 386, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 370, 371, 372, 373, 374, 375, -1, -1, -1, -1,
- -1, -1, -1, -1, 384, -1, 386, 387, 388, 389,
- 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
- 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
- 410, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ -1, 401, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
+ -1, 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,
@@ -2889,24 +3219,23 @@ static const yytype_int16 yycheck[] =
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
- 292, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 292, 293, 294, -1, -1, 297, 298, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 319, -1, -1,
+ -1, -1, -1, -1, 316, 317, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 327, 328, 329, 330, 331,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 338, 339, 340, 341,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 351,
- 352, 353, 354, 355, 356, 357, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 370, 371,
- 372, 373, 374, 375, -1, -1, -1, -1, -1, -1,
- -1, -1, 384, -1, 386, 387, 388, 389, 390, 391,
- 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
- 402, 403, 404, 405, 406, 407, 408, 409, 410, 3,
+ -1, -1, -1, -1, -1, -1, -1, 349, 350, 351,
+ 352, 353, 354, -1, -1, -1, -1, 359, 360, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 379, 380, 381,
+ 382, 383, 384, 385, 386, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 401,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 54, 55, 56, 57, 58, 59, 60, -1, -1, 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,
@@ -2929,25 +3258,24 @@ static const yytype_int16 yycheck[] =
254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 291, 292, -1,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, -1, -1, 297, 298, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 316, 317, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 328, 329, 330, 331, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 319, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 349, 350, 351, 352, 353,
+ 354, -1, -1, -1, -1, 359, 360, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 338, 339, 340, 341, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 351, 352, 353,
- 354, 355, 356, 357, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 370, 371, 372, 373,
- 374, 375, -1, -1, -1, -1, -1, -1, -1, -1,
- 384, -1, 386, 387, 388, 389, 390, 391, 392, 393,
- 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
- 404, 405, 406, 407, 408, 409, 410, 3, 4, 5,
+ -1, -1, -1, -1, -1, 379, 380, 381, 382, 383,
+ 384, 385, 386, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 401, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 56, 57, 58, 59, 60, -1, -1, 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,
@@ -2970,311 +3298,37 @@ static const yytype_int16 yycheck[] =
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
- 286, 287, 288, 289, 290, 291, 292, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 338, 339, 340, 341, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 351, 352, 353, 354, 355,
- 356, 357, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 370, 371, 372, 373, 374, 375,
- -1, -1, -1, -1, -1, -1, -1, -1, 384, -1,
- 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
- 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
- 406, 407, 408, 409, 410, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 391,
+ -1, 297, 298, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 405, -1, -1, -1, -1, -1, -1,
+ 316, 317, -1, -1, -1, -1, -1, -1, -1, -1,
+ 422, 423, 328, 329, 330, 331, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, -1, 318,
- 319, -1, -1, -1, -1, -1, 325, 326, 327, 328,
+ -1, -1, -1, 349, 350, 351, 352, 353, 354, -1,
+ -1, -1, 454, 359, 360, -1, -1, -1, -1, -1,
+ -1, -1, -1, 465, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 379, 380, 381, 382, 383, 384, 385,
+ 386, -1, 484, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 401, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, 317, -1,
- -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 551,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
+ -1, -1, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, -1, 318,
- -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, 317, -1,
- -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 324, 325, 326, 327, 328,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 314, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 393, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 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, 221, 222, 223, 224, 225, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
- 289, 290, 291, 292, -1, -1, 295, 296, -1, 383,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 397, -1, 314, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 325, 326, 327, 328,
- 414, 415, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 346, 347, 348,
- 349, 350, 351, -1, -1, -1, -1, 356, 357, -1,
- -1, 445, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 456, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, 383, -1, -1, -1, -1, -1,
- -1, 475, -1, -1, 393, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 542, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 555, 556, 557, 558, 559, 560, 561, 562, 563,
- 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 673
+ 682
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -3310,140 +3364,142 @@ static const yytype_uint16 yystos[] =
262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
- 292, 324, 338, 339, 340, 341, 342, 351, 352, 353,
- 354, 355, 356, 357, 370, 371, 372, 373, 374, 375,
- 384, 386, 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 442, 443, 446, 447,
- 448, 449, 453, 454, 455, 456, 457, 458, 461, 462,
- 463, 464, 465, 467, 472, 473, 474, 515, 516, 517,
- 473, 318, 350, 314, 314, 324, 350, 324, 518, 315,
- 321, 450, 451, 452, 462, 467, 321, 324, 350, 324,
- 350, 463, 467, 332, 469, 470, 0, 516, 467, 476,
- 318, 350, 371, 459, 460, 350, 466, 316, 324, 468,
- 318, 494, 451, 450, 452, 350, 350, 314, 323, 468,
- 318, 321, 324, 445, 295, 296, 314, 325, 326, 327,
- 328, 346, 347, 348, 349, 350, 376, 377, 378, 379,
- 380, 381, 382, 383, 412, 413, 414, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 465, 467, 471, 468,
- 324, 462, 467, 477, 478, 475, 323, 315, 321, 315,
- 321, 317, 423, 425, 426, 427, 428, 429, 430, 431,
- 432, 433, 434, 435, 436, 316, 324, 316, 318, 319,
- 324, 358, 359, 360, 361, 363, 364, 365, 366, 367,
- 368, 369, 385, 423, 436, 438, 440, 442, 446, 465,
- 467, 483, 484, 485, 486, 487, 495, 496, 497, 498,
- 501, 502, 505, 506, 507, 514, 519, 468, 323, 468,
- 318, 438, 481, 323, 444, 350, 321, 324, 423, 423,
- 440, 295, 296, 316, 320, 315, 315, 321, 357, 438,
- 314, 423, 321, 333, 467, 350, 479, 480, 319, 478,
- 477, 436, 441, 460, 350, 329, 330, 331, 326, 328,
- 293, 294, 297, 298, 332, 333, 299, 300, 336, 335,
- 334, 301, 303, 302, 337, 317, 317, 436, 316, 319,
- 488, 314, 324, 324, 509, 314, 314, 324, 324, 440,
- 314, 440, 322, 324, 304, 305, 306, 307, 308, 309,
- 310, 311, 312, 313, 323, 439, 321, 324, 319, 484,
- 498, 502, 507, 481, 323, 481, 482, 481, 477, 350,
- 315, 415, 440, 350, 438, 423, 479, 468, 321, 324,
- 319, 423, 423, 423, 425, 425, 426, 426, 427, 427,
- 427, 427, 428, 428, 429, 430, 431, 432, 433, 434,
- 437, 317, 350, 520, 521, 495, 508, 484, 510, 440,
- 324, 440, 322, 438, 438, 481, 319, 321, 319, 317,
- 324, 480, 440, 314, 317, 321, 489, 440, 455, 462,
- 500, 358, 483, 496, 511, 315, 315, 319, 481, 322,
- 441, 317, 521, 319, 350, 315, 314, 500, 512, 513,
- 491, 492, 493, 499, 503, 438, 315, 323, 485, 490,
- 494, 440, 324, 315, 362, 487, 485, 318, 481, 315,
- 440, 490, 491, 495, 504, 324, 319
+ 292, 293, 294, 327, 341, 342, 343, 344, 345, 354,
+ 355, 356, 357, 358, 359, 360, 373, 374, 375, 376,
+ 377, 378, 387, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 451, 452, 455, 456, 457, 458,
+ 462, 463, 464, 465, 466, 467, 470, 471, 472, 473,
+ 474, 476, 481, 482, 483, 524, 525, 526, 482, 321,
+ 353, 317, 317, 327, 353, 327, 527, 318, 324, 459,
+ 460, 461, 471, 476, 324, 327, 353, 327, 353, 472,
+ 476, 335, 478, 479, 0, 525, 476, 485, 321, 353,
+ 374, 468, 469, 353, 475, 319, 327, 477, 321, 503,
+ 460, 459, 461, 353, 353, 317, 326, 477, 321, 324,
+ 327, 454, 297, 298, 316, 317, 328, 329, 330, 331,
+ 349, 350, 351, 352, 353, 379, 380, 381, 382, 383,
+ 384, 385, 386, 421, 422, 423, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 474, 476, 480, 477, 327,
+ 471, 476, 486, 487, 484, 326, 318, 324, 318, 324,
+ 320, 432, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 319, 327, 319, 321, 322, 327,
+ 361, 362, 363, 364, 366, 367, 368, 369, 370, 371,
+ 372, 388, 432, 445, 447, 449, 451, 455, 474, 476,
+ 492, 493, 494, 495, 496, 504, 505, 506, 507, 510,
+ 511, 514, 515, 516, 523, 528, 477, 326, 477, 321,
+ 447, 490, 326, 453, 353, 324, 327, 432, 432, 449,
+ 297, 298, 319, 323, 318, 318, 324, 360, 447, 317,
+ 432, 324, 336, 476, 353, 488, 489, 322, 487, 486,
+ 445, 450, 469, 353, 332, 333, 334, 329, 331, 295,
+ 296, 299, 300, 335, 336, 301, 302, 339, 338, 337,
+ 303, 305, 304, 340, 320, 320, 445, 319, 322, 497,
+ 317, 327, 327, 518, 317, 317, 327, 327, 449, 317,
+ 449, 325, 327, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 326, 448, 324, 327, 322, 493, 507,
+ 511, 516, 490, 326, 490, 491, 490, 486, 353, 318,
+ 424, 449, 353, 447, 432, 488, 477, 324, 327, 322,
+ 432, 432, 432, 434, 434, 435, 435, 436, 436, 436,
+ 436, 437, 437, 438, 439, 440, 441, 442, 443, 446,
+ 320, 353, 529, 530, 504, 517, 493, 519, 449, 327,
+ 449, 325, 447, 447, 490, 322, 324, 322, 320, 327,
+ 489, 449, 317, 320, 324, 498, 449, 464, 471, 509,
+ 361, 492, 505, 520, 318, 318, 322, 490, 325, 450,
+ 320, 530, 322, 353, 318, 317, 509, 521, 522, 500,
+ 501, 502, 508, 512, 447, 318, 326, 494, 499, 503,
+ 449, 327, 318, 365, 496, 494, 321, 490, 318, 449,
+ 499, 500, 504, 513, 327, 322
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 411, 412, 413, 413, 413, 413, 413, 413, 413,
- 413, 413, 413, 413, 413, 413, 413, 414, 414, 414,
- 414, 414, 414, 415, 416, 417, 418, 418, 419, 419,
- 420, 420, 421, 422, 422, 422, 423, 423, 423, 423,
- 424, 424, 424, 424, 425, 425, 425, 425, 426, 426,
- 426, 427, 427, 427, 428, 428, 428, 428, 428, 429,
- 429, 429, 430, 430, 431, 431, 432, 432, 433, 433,
- 434, 434, 435, 435, 436, 437, 436, 438, 438, 439,
- 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
- 440, 440, 441, 442, 442, 442, 442, 442, 442, 442,
- 442, 442, 444, 443, 445, 445, 446, 447, 447, 448,
- 448, 449, 450, 450, 451, 451, 451, 451, 452, 453,
- 453, 453, 453, 453, 454, 454, 454, 454, 454, 455,
- 455, 456, 457, 457, 457, 457, 457, 457, 457, 457,
- 458, 459, 459, 460, 460, 460, 461, 462, 462, 463,
- 463, 463, 463, 463, 463, 463, 464, 464, 464, 464,
- 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
- 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
- 464, 464, 464, 464, 464, 465, 466, 466, 467, 467,
- 468, 468, 468, 468, 469, 469, 470, 471, 471, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
- 472, 472, 472, 472, 472, 472, 472, 472, 472, 473,
- 473, 473, 475, 474, 476, 474, 477, 477, 478, 478,
- 479, 479, 480, 480, 481, 481, 481, 482, 482, 483,
- 484, 484, 485, 485, 485, 485, 485, 485, 485, 485,
- 486, 487, 488, 489, 487, 490, 490, 492, 491, 493,
- 491, 494, 494, 495, 495, 496, 496, 497, 497, 498,
- 499, 499, 500, 500, 501, 501, 503, 502, 504, 504,
- 505, 505, 506, 506, 508, 507, 509, 507, 510, 507,
- 511, 511, 512, 512, 513, 513, 514, 514, 514, 514,
- 514, 515, 515, 516, 516, 516, 518, 517, 519, 520,
- 520, 521, 521
+ 0, 420, 421, 422, 422, 422, 422, 422, 422, 422,
+ 422, 422, 422, 422, 422, 422, 422, 422, 423, 423,
+ 423, 423, 423, 423, 424, 425, 426, 427, 427, 428,
+ 428, 429, 429, 430, 431, 431, 431, 432, 432, 432,
+ 432, 433, 433, 433, 433, 434, 434, 434, 434, 435,
+ 435, 435, 436, 436, 436, 437, 437, 437, 437, 437,
+ 438, 438, 438, 439, 439, 440, 440, 441, 441, 442,
+ 442, 443, 443, 444, 444, 445, 446, 445, 447, 447,
+ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 449, 449, 450, 451, 451, 451, 451, 451, 451,
+ 451, 451, 451, 453, 452, 454, 454, 455, 456, 456,
+ 457, 457, 458, 459, 459, 460, 460, 460, 460, 461,
+ 462, 462, 462, 462, 462, 463, 463, 463, 463, 463,
+ 464, 464, 465, 466, 466, 466, 466, 466, 466, 466,
+ 466, 467, 468, 468, 469, 469, 469, 470, 471, 471,
+ 472, 472, 472, 472, 472, 472, 472, 473, 473, 473,
+ 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
+ 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
+ 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
+ 473, 473, 474, 475, 475, 476, 476, 477, 477, 477,
+ 477, 478, 478, 479, 480, 480, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 482, 482,
+ 482, 484, 483, 485, 483, 486, 486, 487, 487, 488,
+ 488, 489, 489, 490, 490, 490, 491, 491, 492, 493,
+ 493, 494, 494, 494, 494, 494, 494, 494, 494, 495,
+ 496, 497, 498, 496, 499, 499, 501, 500, 502, 500,
+ 503, 503, 504, 504, 505, 505, 506, 506, 507, 508,
+ 508, 509, 509, 510, 510, 512, 511, 513, 513, 514,
+ 514, 515, 515, 517, 516, 518, 516, 519, 516, 520,
+ 520, 521, 521, 522, 522, 523, 523, 523, 523, 523,
+ 524, 524, 525, 525, 525, 527, 526, 528, 529, 529,
+ 530, 530
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 1, 1, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
- 3, 2, 2, 1, 1, 1, 2, 2, 2, 1,
- 2, 3, 2, 1, 1, 1, 1, 2, 2, 2,
- 1, 1, 1, 1, 1, 3, 3, 3, 1, 3,
- 3, 1, 3, 3, 1, 3, 3, 3, 3, 1,
- 3, 3, 1, 3, 1, 3, 1, 3, 1, 3,
- 1, 3, 1, 3, 1, 0, 6, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
+ 1, 3, 2, 2, 1, 1, 1, 2, 2, 2,
+ 1, 2, 3, 2, 1, 1, 1, 1, 2, 2,
+ 2, 1, 1, 1, 1, 1, 3, 3, 3, 1,
+ 3, 3, 1, 3, 3, 1, 3, 3, 3, 3,
+ 1, 3, 3, 1, 3, 1, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 0, 6, 1, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 1, 2, 2, 4, 2, 3, 4, 2,
- 3, 4, 0, 6, 2, 3, 2, 1, 1, 2,
- 3, 3, 2, 3, 2, 1, 2, 1, 1, 1,
- 3, 4, 6, 5, 1, 2, 3, 5, 4, 1,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 4, 1, 3, 1, 3, 1, 1, 1, 2, 1,
+ 1, 1, 3, 1, 2, 2, 4, 2, 3, 4,
+ 2, 3, 4, 0, 6, 2, 3, 2, 1, 1,
+ 2, 3, 3, 2, 3, 2, 1, 2, 1, 1,
+ 1, 3, 4, 6, 5, 1, 2, 3, 5, 4,
+ 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 1, 3, 1, 3, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 4, 1, 1, 3, 2, 3,
- 2, 3, 3, 4, 1, 0, 3, 1, 3, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 1, 1, 3, 2, 3, 2, 3, 3,
+ 4, 1, 0, 3, 1, 3, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3472,16 +3528,17 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
- 1, 3, 1, 2, 1, 3, 4, 1, 3, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 0, 0, 5, 1, 1, 0, 2, 0,
- 2, 2, 3, 1, 2, 1, 2, 1, 2, 5,
- 3, 1, 1, 4, 1, 2, 0, 8, 0, 1,
- 3, 2, 1, 2, 0, 6, 0, 8, 0, 7,
- 1, 1, 1, 0, 2, 3, 2, 2, 2, 3,
- 2, 1, 2, 1, 1, 1, 0, 3, 5, 1,
- 3, 1, 4
+ 1, 0, 6, 0, 5, 1, 2, 3, 4, 1,
+ 3, 1, 2, 1, 3, 4, 1, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 0, 0, 5, 1, 1, 0, 2, 0, 2,
+ 2, 3, 1, 2, 1, 2, 1, 2, 5, 3,
+ 1, 1, 4, 1, 2, 0, 8, 0, 1, 3,
+ 2, 1, 2, 0, 6, 0, 8, 0, 7, 1,
+ 1, 1, 0, 2, 3, 2, 2, 2, 3, 2,
+ 1, 2, 1, 1, 1, 0, 3, 5, 1, 3,
+ 1, 4
};
@@ -4164,252 +4221,260 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 352 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 357 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string);
}
-#line 4172 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4229 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 3:
-#line 358 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4237 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 4:
-#line 361 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 366 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
(yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
-#line 4190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4247 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 5:
-#line 366 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 371 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
}
-#line 4198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 6:
-#line 369 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 374 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 7:
-#line 372 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 377 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4215 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4272 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 8:
-#line 376 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 381 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
}
-#line 4223 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 9:
-#line 380 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 385 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true);
+ }
+#line 4288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 10:
+#line 388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4297 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 10:
-#line 384 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 11:
+#line 392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 11:
-#line 388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 12:
+#line 396 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true);
}
-#line 4250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4315 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 12:
-#line 392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 13:
+#line 400 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true);
}
-#line 4259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 13:
-#line 396 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 14:
+#line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 14:
-#line 400 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 15:
+#line 408 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 15:
-#line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 16:
+#line 412 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
}
-#line 4286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4353 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 16:
-#line 408 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 17:
+#line 418 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true);
}
-#line 4295 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4362 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 17:
-#line 416 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 18:
+#line 426 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 18:
-#line 419 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 19:
+#line 429 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode));
}
-#line 4311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 19:
-#line 422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 20:
+#line 432 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4319 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 20:
-#line 425 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 21:
+#line 435 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string);
}
-#line 4327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 21:
-#line 428 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 22:
+#line 438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode));
}
-#line 4337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4404 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 22:
-#line 433 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 23:
+#line 443 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode));
}
-#line 4347 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4414 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 23:
-#line 441 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 24:
+#line 451 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4423 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 24:
-#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 25:
+#line 458 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode);
delete (yyvsp[0].interm).function;
}
-#line 4365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4432 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 25:
-#line 455 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 26:
+#line 465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4373 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4440 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 26:
-#line 461 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 27:
+#line 471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4382 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 27:
-#line 465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 28:
+#line 475 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4458 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 28:
-#line 472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 29:
+#line 482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 29:
-#line 475 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 30:
+#line 485 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 30:
-#line 481 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 31:
+#line 491 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4417,11 +4482,11 @@ yyreduce:
(yyval.interm).function = (yyvsp[-1].interm).function;
(yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
}
-#line 4419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 31:
-#line 488 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 32:
+#line 498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4429,29 +4494,29 @@ yyreduce:
(yyval.interm).function = (yyvsp[-2].interm).function;
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
}
-#line 4431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 32:
-#line 498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 33:
+#line 508 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 33:
-#line 506 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 34:
+#line 516 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 34:
-#line 511 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 35:
+#line 521 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// Should be a method or subroutine call, but we haven't recognized the arguments yet.
@@ -4479,50 +4544,50 @@ yyreduce:
(yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull);
}
}
-#line 4481 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4548 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 35:
-#line 539 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 36:
+#line 549 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4491 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 36:
-#line 548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 37:
+#line 558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.variableCheck((yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode())
parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), "");
}
-#line 4502 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 37:
-#line 554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 38:
+#line 564 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode));
}
-#line 4511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 38:
-#line 558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 39:
+#line 568 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode));
}
-#line 4520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 39:
-#line 562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 40:
+#line 572 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm).op != EOpNull) {
char errorOp[2] = {0, 0};
@@ -4539,179 +4604,179 @@ yyreduce:
(yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
}
-#line 4541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 40:
-#line 582 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 41:
+#line 592 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; }
-#line 4547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 41:
-#line 583 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 42:
+#line 593 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; }
-#line 4553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 42:
-#line 584 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 43:
+#line 594 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; }
-#line 4559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 43:
-#line 585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 44:
+#line 595 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot;
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); }
-#line 4566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4633 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 44:
-#line 591 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 45:
+#line 601 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 45:
-#line 592 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 46:
+#line 602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 46:
-#line 597 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 47:
+#line 607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 47:
-#line 602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 48:
+#line 612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 48:
-#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 49:
+#line 621 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 49:
-#line 612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 50:
+#line 622 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 50:
-#line 617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 51:
+#line 627 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 51:
-#line 625 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 52:
+#line 635 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4635 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 52:
-#line 626 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 53:
+#line 636 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4713 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 53:
-#line 632 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 54:
+#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4724 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 54:
-#line 641 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 55:
+#line 651 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 55:
-#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 56:
+#line 652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4740 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 56:
-#line 647 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 57:
+#line 657 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4750 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 57:
-#line 652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 58:
+#line 662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 58:
-#line 657 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 59:
+#line 667 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 59:
-#line 665 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 60:
+#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4776 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 60:
-#line 666 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 61:
+#line 676 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "==");
@@ -4721,11 +4786,11 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 61:
-#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 62:
+#line 685 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!=");
@@ -4735,124 +4800,124 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4804 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 62:
-#line 687 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 63:
+#line 697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4743 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 63:
-#line 688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 64:
+#line 698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4754 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4821 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 64:
-#line 697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 65:
+#line 707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4827 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 65:
-#line 698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 66:
+#line 708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4838 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 66:
-#line 707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 67:
+#line 717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4777 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4844 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 67:
-#line 708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 68:
+#line 718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 4788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4855 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 68:
-#line 717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 69:
+#line 727 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4794 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4861 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 69:
-#line 718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 70:
+#line 728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4804 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4871 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 70:
-#line 726 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 71:
+#line 736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4877 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 71:
-#line 727 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 72:
+#line 737 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4887 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 72:
-#line 735 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 73:
+#line 745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4893 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 73:
-#line 736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 74:
+#line 746 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 4836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4903 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 74:
-#line 744 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 75:
+#line 754 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4909 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 75:
-#line 745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 76:
+#line 755 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.controlFlowNestingLevel;
}
-#line 4850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4917 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 76:
-#line 748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 77:
+#line 758 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.controlFlowNestingLevel;
parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode));
@@ -4865,17 +4930,17 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 4867 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4934 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 77:
-#line 763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 78:
+#line 773 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4873 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 78:
-#line 764 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 79:
+#line 774 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment");
parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
@@ -4883,125 +4948,125 @@ yyreduce:
parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode));
parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode));
- (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc);
+ (yyval.interm.intermTypedNode) = parseContext.addAssign((yyvsp[-1].interm).loc, (yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0) {
parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
}
-#line 4891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 79:
-#line 780 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 80:
+#line 790 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAssign;
}
-#line 4900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4967 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 80:
-#line 784 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 81:
+#line 794 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpMulAssign;
}
-#line 4909 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4976 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 81:
-#line 788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 82:
+#line 798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpDivAssign;
}
-#line 4918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4985 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 82:
-#line 792 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 83:
+#line 802 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%=");
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpModAssign;
}
-#line 4928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 4995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 83:
-#line 797 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 84:
+#line 807 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAddAssign;
}
-#line 4937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 84:
-#line 801 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 85:
+#line 811 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpSubAssign;
}
-#line 4946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5013 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 85:
-#line 805 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 86:
+#line 815 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign;
}
-#line 4955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5022 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 86:
-#line 809 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 87:
+#line 819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign;
}
-#line 4964 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 87:
-#line 813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 88:
+#line 823 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign;
}
-#line 4973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 88:
-#line 817 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 89:
+#line 827 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign;
}
-#line 4982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5049 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 89:
-#line 821 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 90:
+#line 831 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign;
}
-#line 4991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5058 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 90:
-#line 828 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 91:
+#line 838 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 91:
-#line 831 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 92:
+#line 841 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
@@ -5010,40 +5075,40 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 5012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5079 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 92:
-#line 842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 93:
+#line 852 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), "");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 5021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5088 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 93:
-#line 849 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 94:
+#line 859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */);
(yyval.interm.intermNode) = 0;
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
}
-#line 5031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5098 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 94:
-#line 854 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 95:
+#line 864 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate())
(yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode;
}
-#line 5041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5108 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 95:
-#line 859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 96:
+#line 869 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement");
// lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope
@@ -5051,75 +5116,75 @@ yyreduce:
parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision);
(yyval.interm.intermNode) = 0;
}
-#line 5053 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 96:
-#line 866 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 97:
+#line 876 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList);
(yyval.interm.intermNode) = 0;
}
-#line 5062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 97:
-#line 870 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 98:
+#line 880 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string);
(yyval.interm.intermNode) = 0;
}
-#line 5071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5138 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 98:
-#line 874 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 99:
+#line 884 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes);
(yyval.interm.intermNode) = 0;
}
-#line 5080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 99:
-#line 878 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 100:
+#line 888 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type));
(yyval.interm.intermNode) = 0;
}
-#line 5090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 100:
-#line 883 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 101:
+#line 893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers);
parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string);
(yyval.interm.intermNode) = 0;
}
-#line 5100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 101:
-#line 888 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 102:
+#line 898 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers);
(yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string);
parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList));
(yyval.interm.intermNode) = 0;
}
-#line 5111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5178 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 102:
-#line 897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 103:
+#line 907 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); }
-#line 5117 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5184 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 103:
-#line 897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 104:
+#line 907 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.structNestingLevel;
parseContext.blockName = (yyvsp[-4].lex).string;
@@ -5129,54 +5194,54 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-5].interm.type).loc;
(yyval.interm).typeList = (yyvsp[-1].interm.typeList);
}
-#line 5131 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 104:
-#line 908 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 105:
+#line 918 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.identifierList) = new TIdentifierList;
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5207 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 105:
-#line 912 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 106:
+#line 922 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList);
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 106:
-#line 919 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 107:
+#line 929 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).function = (yyvsp[-1].interm.function);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 5158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 107:
-#line 926 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 108:
+#line 936 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 108:
-#line 929 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 109:
+#line 939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 109:
-#line 936 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 110:
+#line 946 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// Add the parameter
(yyval.interm.function) = (yyvsp[-1].interm.function);
@@ -5185,11 +5250,11 @@ yyreduce:
else
delete (yyvsp[0].interm).param.type;
}
-#line 5187 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 110:
-#line 944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 111:
+#line 954 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// Only first parameter of one-parameter functions can be void
@@ -5207,11 +5272,11 @@ yyreduce:
(yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
}
}
-#line 5209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 111:
-#line 964 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 112:
+#line 974 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) {
parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return",
@@ -5231,11 +5296,11 @@ yyreduce:
function = new TFunction((yyvsp[-1].lex).string, type);
(yyval.interm.function) = function;
}
-#line 5233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 112:
-#line 987 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 113:
+#line 997 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5251,11 +5316,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).param = param;
}
-#line 5253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 113:
-#line 1002 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 114:
+#line 1012 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5275,11 +5340,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).param = param;
}
-#line 5277 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5344 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 114:
-#line 1027 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 115:
+#line 1037 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5291,11 +5356,11 @@ yyreduce:
parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
}
-#line 5293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 115:
-#line 1038 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 116:
+#line 1048 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5303,11 +5368,11 @@ yyreduce:
parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
}
-#line 5305 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5372 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 116:
-#line 1048 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 117:
+#line 1058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5318,11 +5383,11 @@ yyreduce:
parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type);
parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
}
-#line 5320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 117:
-#line 1058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 118:
+#line 1068 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5330,68 +5395,68 @@ yyreduce:
parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
}
-#line 5332 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 118:
-#line 1068 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 119:
+#line 1078 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
(yyval.interm).param = param;
if ((yyvsp[0].interm.type).arraySizes)
parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes);
}
-#line 5343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 119:
-#line 1077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 120:
+#line 1087 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 5351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 120:
-#line 1080 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 121:
+#line 1090 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-2].interm);
parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type);
}
-#line 5360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5427 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 121:
-#line 1084 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 122:
+#line 1094 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-3].interm);
parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes);
}
-#line 5369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 122:
-#line 1088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 123:
+#line 1098 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-5].interm).type;
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
}
-#line 5379 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 123:
-#line 1093 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 124:
+#line 1103 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-4].interm).type;
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
}
-#line 5389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 124:
-#line 1101 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 125:
+#line 1111 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[0].interm.type);
(yyval.interm).intermNode = 0;
@@ -5399,51 +5464,51 @@ yyreduce:
parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type);
}
-#line 5401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5468 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 125:
-#line 1108 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 126:
+#line 1118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-1].interm.type);
(yyval.interm).intermNode = 0;
parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type));
}
-#line 5411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 126:
-#line 1113 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 127:
+#line 1123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-2].interm.type);
(yyval.interm).intermNode = 0;
parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes);
}
-#line 5421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5488 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 127:
-#line 1118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 128:
+#line 1128 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-4].interm.type);
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
}
-#line 5431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 128:
-#line 1123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 129:
+#line 1133 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).type = (yyvsp[-3].interm.type);
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
}
-#line 5441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 129:
-#line 1132 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 130:
+#line 1142 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
@@ -5454,11 +5519,11 @@ yyreduce:
}
parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier);
}
-#line 5456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 130:
-#line 1142 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 131:
+#line 1152 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type));
@@ -5483,22 +5548,22 @@ yyreduce:
(parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn)))
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5552 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 131:
-#line 1169 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 132:
+#line 1179 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "invariant");
parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.invariant = true;
}
-#line 5496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 132:
-#line 1178 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 133:
+#line 1188 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "smooth");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth");
@@ -5506,11 +5571,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 133:
-#line 1185 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 134:
+#line 1195 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "flat");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat");
@@ -5518,11 +5583,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.flat = true;
}
-#line 5520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 134:
-#line 1193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 135:
+#line 1203 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
@@ -5530,11 +5595,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.nopersp = true;
}
-#line 5532 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 135:
-#line 1200 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 136:
+#line 1210 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
@@ -5542,11 +5607,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.explicitInterp = true;
}
-#line 5544 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5611 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 136:
-#line 1207 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 137:
+#line 1217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
@@ -5555,11 +5620,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.pervertexNV = true;
}
-#line 5557 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5624 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 137:
-#line 1215 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 138:
+#line 1225 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV");
@@ -5570,11 +5635,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perPrimitiveNV = true;
}
-#line 5572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 138:
-#line 1225 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 139:
+#line 1235 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV");
@@ -5582,11 +5647,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perViewNV = true;
}
-#line 5584 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5651 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 139:
-#line 1232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 140:
+#line 1242 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV");
@@ -5594,84 +5659,84 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perTaskNV = true;
}
-#line 5596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 140:
-#line 1243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 141:
+#line 1253 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
}
-#line 5604 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5671 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 141:
-#line 1249 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 142:
+#line 1259 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 142:
-#line 1252 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 143:
+#line 1262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-2].interm.type);
(yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
}
-#line 5622 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 143:
-#line 1259 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 144:
+#line 1269 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string);
}
-#line 5631 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 144:
-#line 1263 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 145:
+#line 1273 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[-2].lex).loc);
parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode));
}
-#line 5640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 145:
-#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 146:
+#line 1277 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // because "shared" is both an identifier and a keyword
(yyval.interm.type).init((yyvsp[0].lex).loc);
TString strShared("shared");
parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared);
}
-#line 5650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 146:
-#line 1276 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 147:
+#line 1286 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.noContraction = true;
}
-#line 5661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 147:
-#line 1286 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 148:
+#line 1296 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 148:
-#line 1289 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 149:
+#line 1299 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
if ((yyval.interm.type).basicType == EbtVoid)
@@ -5680,112 +5745,112 @@ yyreduce:
(yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
}
-#line 5682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
- break;
-
- case 149:
-#line 1300 "MachineIndependent/glslang.y" /* yacc.c:1646 */
- {
- (yyval.interm.type) = (yyvsp[0].interm.type);
- }
-#line 5690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5749 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 150:
-#line 1303 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1310 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5757 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 151:
-#line 1306 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1313 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision);
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5765 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 152:
-#line 1310 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1316 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
- // allow inheritance of storage qualifier from block declaration
+ parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision);
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 153:
-#line 1314 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1320 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 154:
-#line 1319 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1324 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5734 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 155:
-#line 1323 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1329 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
+ // allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 5742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
case 156:
-#line 1330 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+#line 1333 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 5809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 157:
+#line 1340 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
}
-#line 5751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 157:
-#line 1334 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 158:
+#line 1344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "inout");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqInOut;
}
-#line 5761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5828 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 158:
-#line 1339 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 159:
+#line 1349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "in");
(yyval.interm.type).init((yyvsp[0].lex).loc);
// whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
(yyval.interm.type).qualifier.storage = EvqIn;
}
-#line 5772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5839 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 159:
-#line 1345 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 160:
+#line 1355 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "out");
(yyval.interm.type).init((yyvsp[0].lex).loc);
// whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
(yyval.interm.type).qualifier.storage = EvqOut;
}
-#line 5783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 160:
-#line 1351 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 161:
+#line 1361 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid");
@@ -5793,21 +5858,21 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.centroid = true;
}
-#line 5795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 161:
-#line 1358 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 162:
+#line 1368 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "uniform");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqUniform;
}
-#line 5805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 162:
-#line 1363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 163:
+#line 1373 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "shared");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
@@ -5816,21 +5881,21 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqShared;
}
-#line 5818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 163:
-#line 1371 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 164:
+#line 1381 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "buffer");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqBuffer;
}
-#line 5828 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 164:
-#line 1377 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 165:
+#line 1387 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute");
parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute");
@@ -5843,11 +5908,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 5845 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5912 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 165:
-#line 1389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 166:
+#line 1399 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying");
parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying");
@@ -5862,250 +5927,324 @@ yyreduce:
else
(yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 5864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5931 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 166:
-#line 1403 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 167:
+#line 1413 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "patch");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.patch = true;
}
-#line 5875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 167:
-#line 1409 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 168:
+#line 1419 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "sample");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.sample = true;
}
-#line 5885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 168:
-#line 1414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 169:
+#line 1424 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
- | EShLangAnyHitNVMask), "hitAttributeNV");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
+ | EShLangAnyHitMask), "hitAttributeNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqHitAttrNV;
+ (yyval.interm.type).qualifier.storage = EvqHitAttr;
}
-#line 5898 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 169:
-#line 1422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 170:
+#line 1432 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
+ | EShLangAnyHitMask), "hitAttributeEXT");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqHitAttr;
+ }
+#line 5978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 171:
+#line 1440 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
- EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqPayloadNV;
+ (yyval.interm.type).qualifier.storage = EvqPayload;
}
-#line 5911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 5991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 170:
-#line 1430 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 172:
+#line 1448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqPayload;
+ }
+#line 6004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 173:
+#line 1456 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitNVMask |
- EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqPayloadInNV;
+ (yyval.interm.type).qualifier.storage = EvqPayloadIn;
}
-#line 5924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 171:
-#line 1438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 174:
+#line 1464 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask |
+ EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqPayloadIn;
+ }
+#line 6030 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 175:
+#line 1472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenNVMask |
- EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask |
+ EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqCallableDataNV;
+ (yyval.interm.type).qualifier.storage = EvqCallableData;
}
-#line 5937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6043 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 172:
-#line 1446 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 176:
+#line 1480 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask |
+ EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqCallableData;
+ }
+#line 6056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 177:
+#line 1488 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV");
- parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
(yyval.interm.type).init((yyvsp[0].lex).loc);
- (yyval.interm.type).qualifier.storage = EvqCallableDataInNV;
+ (yyval.interm.type).qualifier.storage = EvqCallableDataIn;
}
-#line 5949 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 173:
-#line 1453 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 178:
+#line 1495 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqCallableDataIn;
+ }
+#line 6080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 179:
+#line 1502 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.coherent = true;
}
-#line 5958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6089 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 174:
-#line 1457 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 180:
+#line 1506 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent");
(yyval.interm.type).qualifier.devicecoherent = true;
}
-#line 5968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6099 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 175:
-#line 1462 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 181:
+#line 1511 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent");
(yyval.interm.type).qualifier.queuefamilycoherent = true;
}
-#line 5978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6109 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 176:
-#line 1467 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 182:
+#line 1516 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent");
(yyval.interm.type).qualifier.workgroupcoherent = true;
}
-#line 5988 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 177:
-#line 1472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 183:
+#line 1521 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent");
(yyval.interm.type).qualifier.subgroupcoherent = true;
}
-#line 5998 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 178:
-#line 1477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 184:
+#line 1526 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate");
(yyval.interm.type).qualifier.nonprivate = true;
}
-#line 6008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 179:
-#line 1482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 185:
+#line 1531 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent");
+ (yyval.interm.type).qualifier.shadercallcoherent = true;
+ }
+#line 6149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 186:
+#line 1536 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.volatil = true;
}
-#line 6017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 180:
-#line 1486 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 187:
+#line 1540 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.restrict = true;
}
-#line 6026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 181:
-#line 1490 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 188:
+#line 1544 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.readonly = true;
}
-#line 6035 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 182:
-#line 1494 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 189:
+#line 1548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.writeonly = true;
}
-#line 6044 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6185 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 183:
-#line 1498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 190:
+#line 1552 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine");
parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine");
parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine");
(yyval.interm.type).init((yyvsp[0].lex).loc);
}
-#line 6055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 184:
-#line 1504 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 191:
+#line 1558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine");
parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine");
parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine");
(yyval.interm.type).init((yyvsp[-3].lex).loc);
}
-#line 6066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6207 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 185:
-#line 1515 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 192:
+#line 1569 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.nonUniform = true;
}
-#line 6075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 186:
-#line 1522 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 193:
+#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// TODO
}
-#line 6083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 187:
-#line 1525 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 194:
+#line 1579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// TODO: 4.0 semantics: subroutines
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
// 2) save all of the identifiers for future comparison with the declared function
}
-#line 6093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 188:
-#line 1534 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 195:
+#line 1588 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
(yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
(yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters);
}
-#line 6103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 189:
-#line 1539 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 196:
+#line 1593 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes);
(yyval.interm.type) = (yyvsp[-2].interm.type);
@@ -6113,21 +6252,21 @@ yyreduce:
(yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters);
(yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
}
-#line 6115 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6256 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 190:
-#line 1549 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 197:
+#line 1603 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6125 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6266 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 191:
-#line 1554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 198:
+#line 1608 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm).loc = (yyvsp[-2].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
@@ -6136,20 +6275,20 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6138 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 192:
-#line 1562 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 199:
+#line 1616 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-2].interm);
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 193:
-#line 1566 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 200:
+#line 1620 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm) = (yyvsp[-3].interm);
@@ -6157,35 +6296,35 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 194:
-#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 201:
+#line 1630 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters);
}
-#line 6167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6308 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 195:
-#line 1579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 202:
+#line 1633 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = 0;
}
-#line 6175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6316 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 196:
-#line 1585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 203:
+#line 1639 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters);
}
-#line 6183 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 197:
-#line 1591 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 204:
+#line 1645 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = new TArraySizes;
@@ -6193,11 +6332,11 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 198:
-#line 1598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 205:
+#line 1652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters);
@@ -6205,300 +6344,300 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6207 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 199:
-#line 1608 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 206:
+#line 1662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtVoid;
}
-#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 200:
-#line 1612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 207:
+#line 1666 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
}
-#line 6225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 201:
-#line 1616 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 208:
+#line 1670 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
}
-#line 6234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 202:
-#line 1620 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 209:
+#line 1674 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
}
-#line 6244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 203:
-#line 1625 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 210:
+#line 1679 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
}
-#line 6253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 204:
-#line 1629 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 211:
+#line 1683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(2);
}
-#line 6263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6404 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 205:
-#line 1634 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 212:
+#line 1688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(3);
}
-#line 6273 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6414 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 206:
-#line 1639 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 213:
+#line 1693 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(4);
}
-#line 6283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 207:
-#line 1644 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 214:
+#line 1698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(2);
}
-#line 6293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 208:
-#line 1649 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 215:
+#line 1703 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(3);
}
-#line 6303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 209:
-#line 1654 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 216:
+#line 1708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(4);
}
-#line 6313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6454 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 210:
-#line 1659 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 217:
+#line 1713 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(2);
}
-#line 6323 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6464 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 211:
-#line 1664 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 218:
+#line 1718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(3);
}
-#line 6333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 212:
-#line 1669 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 219:
+#line 1723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(4);
}
-#line 6343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6484 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 213:
-#line 1674 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 220:
+#line 1728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(2);
}
-#line 6354 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 214:
-#line 1680 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 221:
+#line 1734 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(3);
}
-#line 6365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 215:
-#line 1686 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 222:
+#line 1740 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(4);
}
-#line 6376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 216:
-#line 1692 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 223:
+#line 1746 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 6386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6527 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 217:
-#line 1697 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 224:
+#line 1751 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 6396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 218:
-#line 1702 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 225:
+#line 1756 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 6406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 219:
-#line 1707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 226:
+#line 1761 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 6416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6557 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 220:
-#line 1712 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 227:
+#line 1766 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 6426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 221:
-#line 1717 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 228:
+#line 1771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 6436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6577 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 222:
-#line 1722 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 229:
+#line 1776 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 6446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 223:
-#line 1727 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 230:
+#line 1781 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 6456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 224:
-#line 1732 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 231:
+#line 1786 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 6466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6607 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 225:
-#line 1737 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 232:
+#line 1791 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 6476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 226:
-#line 1742 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 233:
+#line 1796 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 6486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6627 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 227:
-#line 1747 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 234:
+#line 1801 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 6496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6637 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 228:
-#line 1753 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 235:
+#line 1807 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -6506,121 +6645,121 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
}
-#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 229:
-#line 1758 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 236:
+#line 1814 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
}
-#line 6516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 230:
-#line 1763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 237:
+#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
}
-#line 6526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 231:
-#line 1768 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 238:
+#line 1824 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
}
-#line 6536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 232:
-#line 1773 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 239:
+#line 1829 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
}
-#line 6546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 233:
-#line 1778 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 240:
+#line 1834 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
}
-#line 6556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 234:
-#line 1783 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 241:
+#line 1839 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
}
-#line 6566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 235:
-#line 1788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 242:
+#line 1844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
}
-#line 6576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 236:
-#line 1793 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 243:
+#line 1849 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
}
-#line 6586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 237:
-#line 1798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 244:
+#line 1854 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
}
-#line 6596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 238:
-#line 1803 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 245:
+#line 1859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
}
-#line 6606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6749 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 239:
-#line 1808 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 246:
+#line 1864 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
}
-#line 6616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 240:
-#line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 247:
+#line 1869 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -6629,11 +6768,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 6627 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 241:
-#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 248:
+#line 1877 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -6642,11 +6781,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 6638 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6785 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 242:
-#line 1825 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 249:
+#line 1885 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -6655,374 +6794,374 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 6649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6798 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 243:
-#line 1831 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 250:
+#line 1893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(2);
}
-#line 6660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 244:
-#line 1837 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 251:
+#line 1899 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(3);
}
-#line 6671 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 245:
-#line 1843 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 252:
+#line 1905 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(4);
}
-#line 6682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 246:
-#line 1849 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 253:
+#line 1911 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(2);
}
-#line 6693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 247:
-#line 1855 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 254:
+#line 1917 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(3);
}
-#line 6704 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 248:
-#line 1861 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 255:
+#line 1923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(4);
}
-#line 6715 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 249:
-#line 1867 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 256:
+#line 1929 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 6726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 250:
-#line 1873 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 257:
+#line 1935 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 6737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 251:
-#line 1879 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 258:
+#line 1941 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 6748 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6897 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 252:
-#line 1885 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 259:
+#line 1947 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(2);
}
-#line 6759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 253:
-#line 1891 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 260:
+#line 1953 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(3);
}
-#line 6770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6919 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 254:
-#line 1897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 261:
+#line 1959 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(4);
}
-#line 6781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6930 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 255:
-#line 1903 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 262:
+#line 1965 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(2);
}
-#line 6792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 256:
-#line 1909 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 263:
+#line 1971 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(3);
}
-#line 6803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 257:
-#line 1915 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 264:
+#line 1977 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(4);
}
-#line 6814 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6963 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 258:
-#line 1921 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 265:
+#line 1983 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(2);
}
-#line 6825 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 259:
-#line 1927 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 266:
+#line 1989 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(3);
}
-#line 6836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6985 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 260:
-#line 1933 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 267:
+#line 1995 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(4);
}
-#line 6847 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 6996 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 261:
-#line 1939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 268:
+#line 2001 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(2);
}
-#line 6858 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7007 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 262:
-#line 1945 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 269:
+#line 2007 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(3);
}
-#line 6869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 263:
-#line 1951 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 270:
+#line 2013 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(4);
}
-#line 6880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7029 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 264:
-#line 1957 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 271:
+#line 2019 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(2);
}
-#line 6891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 265:
-#line 1963 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 272:
+#line 2025 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(3);
}
-#line 6902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7051 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 266:
-#line 1969 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 273:
+#line 2031 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(4);
}
-#line 6913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 267:
-#line 1975 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 274:
+#line 2037 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(2);
}
-#line 6924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7073 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 268:
-#line 1981 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 275:
+#line 2043 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(3);
}
-#line 6935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7084 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 269:
-#line 1987 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 276:
+#line 2049 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(4);
}
-#line 6946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 270:
-#line 1993 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 277:
+#line 2055 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(2);
}
-#line 6957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 271:
-#line 1999 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 278:
+#line 2061 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(3);
}
-#line 6968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7117 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 272:
-#line 2005 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 279:
+#line 2067 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(4);
}
-#line 6979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7128 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 273:
-#line 2011 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 280:
+#line 2073 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(2);
}
-#line 6990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 274:
-#line 2017 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 281:
+#line 2079 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(3);
}
-#line 7001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 275:
-#line 2023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 282:
+#line 2085 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(4);
}
-#line 7012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 276:
-#line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 283:
+#line 2091 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7031,11 +7170,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 277:
-#line 2035 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 284:
+#line 2099 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7044,11 +7183,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7187 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 278:
-#line 2041 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 285:
+#line 2107 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7057,11 +7196,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 279:
-#line 2047 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 286:
+#line 2115 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7070,11 +7209,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7213 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 280:
-#line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 287:
+#line 2123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7083,11 +7222,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 281:
-#line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 288:
+#line 2131 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7096,11 +7235,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7078 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7239 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 282:
-#line 2065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 289:
+#line 2139 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7109,11 +7248,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7089 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7252 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 283:
-#line 2071 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 290:
+#line 2147 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7122,11 +7261,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 284:
-#line 2077 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 291:
+#line 2155 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7135,11 +7274,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7278 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 285:
-#line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 292:
+#line 2163 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7148,11 +7287,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 286:
-#line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 293:
+#line 2171 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7161,11 +7300,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 287:
-#line 2095 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 294:
+#line 2179 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7174,1990 +7313,2008 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7144 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 288:
-#line 2101 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 295:
+#line 2187 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7328 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 289:
-#line 2107 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 296:
+#line 2193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7339 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 290:
-#line 2113 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 297:
+#line 2199 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7350 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 291:
-#line 2119 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 298:
+#line 2205 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7188 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 292:
-#line 2125 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 299:
+#line 2211 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7372 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 293:
-#line 2131 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 300:
+#line 2217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7383 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 294:
-#line 2137 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 301:
+#line 2223 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 295:
-#line 2143 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 302:
+#line 2229 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7405 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 296:
-#line 2149 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 303:
+#line 2235 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 297:
-#line 2155 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 304:
+#line 2241 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7427 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 298:
-#line 2161 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 305:
+#line 2247 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7438 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 299:
-#line 2167 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 306:
+#line 2253 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 300:
-#line 2173 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 307:
+#line 2259 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7287 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 301:
-#line 2179 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 308:
+#line 2265 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7298 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 302:
-#line 2185 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 309:
+#line 2271 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7482 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 303:
-#line 2191 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 310:
+#line 2277 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7493 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 304:
-#line 2197 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 311:
+#line 2283 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7504 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 305:
-#line 2203 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 312:
+#line 2289 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7515 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 306:
-#line 2209 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 313:
+#line 2295 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7353 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 307:
-#line 2215 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 314:
+#line 2301 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 308:
-#line 2221 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 315:
+#line 2307 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7548 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 309:
-#line 2227 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 316:
+#line 2313 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 310:
-#line 2233 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 317:
+#line 2319 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7397 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 311:
-#line 2239 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 318:
+#line 2325 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7408 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7581 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 312:
-#line 2245 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 319:
+#line 2331 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 313:
-#line 2251 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 320:
+#line 2337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7430 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 314:
-#line 2257 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 321:
+#line 2343 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 315:
-#line 2263 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 322:
+#line 2349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7452 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7625 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 316:
-#line 2269 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 323:
+#line 2355 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 317:
-#line 2275 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 324:
+#line 2361 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7647 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 318:
-#line 2281 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 325:
+#line 2367 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7658 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 319:
-#line 2287 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 326:
+#line 2373 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 320:
-#line 2293 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 327:
+#line 2379 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 321:
-#line 2299 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 328:
+#line 2385 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7518 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 322:
-#line 2305 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 329:
+#line 2391 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 323:
-#line 2311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 330:
+#line 2397 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7713 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 324:
-#line 2317 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 331:
+#line 2403 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
- (yyval.interm.type).basicType = EbtAccStructNV;
+ (yyval.interm.type).basicType = EbtAccStruct;
}
-#line 7549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 325:
-#line 2321 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 332:
+#line 2407 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtAccStruct;
+ }
+#line 7731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 333:
+#line 2411 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtRayQuery;
+ }
+#line 7740 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 334:
+#line 2415 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtAtomicUint;
}
-#line 7559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7750 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 326:
-#line 2326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 335:
+#line 2420 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D);
}
-#line 7569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 327:
-#line 2332 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 336:
+#line 2426 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
}
-#line 7579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 328:
-#line 2337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 337:
+#line 2431 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd3D);
}
-#line 7589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 329:
-#line 2342 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 338:
+#line 2436 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube);
}
-#line 7599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 330:
-#line 2347 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 339:
+#line 2441 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true);
}
-#line 7609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 331:
-#line 2352 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 340:
+#line 2446 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true);
}
-#line 7619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 332:
-#line 2357 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 341:
+#line 2451 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
}
-#line 7629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 333:
-#line 2362 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 342:
+#line 2456 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true);
}
-#line 7639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7830 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 334:
-#line 2368 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 343:
+#line 2462 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true);
}
-#line 7649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 335:
-#line 2373 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 344:
+#line 2467 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
}
-#line 7659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 336:
-#line 2378 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 345:
+#line 2472 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true);
}
-#line 7669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 337:
-#line 2383 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 346:
+#line 2477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, true);
}
-#line 7679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 338:
-#line 2388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 347:
+#line 2482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true);
}
-#line 7689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 339:
-#line 2393 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 348:
+#line 2487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D);
}
-#line 7700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 340:
-#line 2399 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 349:
+#line 2493 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D);
}
-#line 7711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 341:
-#line 2405 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 350:
+#line 2499 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd3D);
}
-#line 7722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 342:
-#line 2411 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 351:
+#line 2505 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube);
}
-#line 7733 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 343:
-#line 2417 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 352:
+#line 2511 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true);
}
-#line 7744 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 344:
-#line 2423 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 353:
+#line 2517 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true);
}
-#line 7755 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 345:
-#line 2429 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 354:
+#line 2523 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true);
}
-#line 7766 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 346:
-#line 2435 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 355:
+#line 2529 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true);
}
-#line 7777 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 347:
-#line 2441 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 356:
+#line 2535 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true);
}
-#line 7788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 348:
-#line 2447 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 357:
+#line 2541 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true);
}
-#line 7799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 7990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 349:
-#line 2453 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 358:
+#line 2547 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true);
}
-#line 7810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 350:
-#line 2459 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 359:
+#line 2553 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true);
}
-#line 7821 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 351:
-#line 2465 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 360:
+#line 2559 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true);
}
-#line 7832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 352:
-#line 2471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 361:
+#line 2565 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd1D);
}
-#line 7842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8033 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 353:
-#line 2477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 362:
+#line 2571 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D);
}
-#line 7852 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8043 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 354:
-#line 2482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 363:
+#line 2576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd3D);
}
-#line 7862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8053 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 355:
-#line 2487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 364:
+#line 2581 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdCube);
}
-#line 7872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8063 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 356:
-#line 2492 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 365:
+#line 2586 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
}
-#line 7882 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8073 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 357:
-#line 2497 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 366:
+#line 2591 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D);
}
-#line 7892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 358:
-#line 2502 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 367:
+#line 2596 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd3D);
}
-#line 7902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 359:
-#line 2507 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 368:
+#line 2601 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdCube);
}
-#line 7912 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 360:
-#line 2513 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 369:
+#line 2607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
}
-#line 7922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8113 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 361:
-#line 2518 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 370:
+#line 2612 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
}
-#line 7932 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 362:
-#line 2523 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 371:
+#line 2617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd1D);
}
-#line 7942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 363:
-#line 2528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 372:
+#line 2622 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd1D, true);
}
-#line 7952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8143 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 364:
-#line 2533 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 373:
+#line 2627 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
}
-#line 7962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8153 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 365:
-#line 2538 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 374:
+#line 2632 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true);
}
-#line 7972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8163 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 366:
-#line 2543 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 375:
+#line 2637 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
}
-#line 7982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 367:
-#line 2548 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 376:
+#line 2642 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
}
-#line 7992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8183 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 368:
-#line 2554 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 377:
+#line 2648 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
}
-#line 8002 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8193 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 369:
-#line 2559 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 378:
+#line 2653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
}
-#line 8012 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8203 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 370:
-#line 2564 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 379:
+#line 2658 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D);
}
-#line 8022 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8213 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 371:
-#line 2569 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 380:
+#line 2663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
}
-#line 8032 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8223 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 372:
-#line 2574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 381:
+#line 2668 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
}
-#line 8042 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 373:
-#line 2579 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 382:
+#line 2673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
}
-#line 8052 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 374:
-#line 2584 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 383:
+#line 2678 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd3D);
}
-#line 8062 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 375:
-#line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 384:
+#line 2683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdCube);
}
-#line 8072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 376:
-#line 2594 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 385:
+#line 2688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true);
}
-#line 8082 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8273 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 377:
-#line 2599 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 386:
+#line 2693 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D);
}
-#line 8092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 378:
-#line 2604 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 387:
+#line 2698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd3D);
}
-#line 8102 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 379:
-#line 2609 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 388:
+#line 2703 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
}
-#line 8112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 380:
-#line 2614 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 389:
+#line 2708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
}
-#line 8122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 381:
-#line 2619 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 390:
+#line 2713 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setPureSampler(false);
}
-#line 8132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8323 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 382:
-#line 2624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 391:
+#line 2718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setPureSampler(true);
}
-#line 8142 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 383:
-#line 2630 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 392:
+#line 2724 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdRect);
}
-#line 8152 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 384:
-#line 2635 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 393:
+#line 2729 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true);
}
-#line 8162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8353 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 385:
-#line 2640 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 394:
+#line 2734 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdRect);
}
-#line 8173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 386:
-#line 2646 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 395:
+#line 2740 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true);
}
-#line 8184 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 387:
-#line 2652 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 396:
+#line 2746 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdRect);
}
-#line 8194 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 388:
-#line 2657 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 397:
+#line 2751 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdRect);
}
-#line 8204 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 389:
-#line 2662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 398:
+#line 2756 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
}
-#line 8214 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8405 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 390:
-#line 2667 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 399:
+#line 2761 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer);
}
-#line 8225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 391:
-#line 2673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 400:
+#line 2767 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
}
-#line 8235 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 392:
-#line 2678 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 401:
+#line 2772 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
}
-#line 8245 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 393:
-#line 2683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 402:
+#line 2777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true);
}
-#line 8255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 394:
-#line 2688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 403:
+#line 2782 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true);
}
-#line 8266 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 395:
-#line 2694 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 404:
+#line 2788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true);
}
-#line 8276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 396:
-#line 2699 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 405:
+#line 2793 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true);
}
-#line 8286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8477 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 397:
-#line 2704 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 406:
+#line 2798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true);
}
-#line 8296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 398:
-#line 2709 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 407:
+#line 2803 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true);
}
-#line 8307 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 399:
-#line 2715 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 408:
+#line 2809 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true);
}
-#line 8317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 400:
-#line 2720 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 409:
+#line 2814 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true);
}
-#line 8327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8518 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 401:
-#line 2725 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 410:
+#line 2819 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D);
}
-#line 8337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 402:
-#line 2730 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 411:
+#line 2824 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D);
}
-#line 8348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 403:
-#line 2736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 412:
+#line 2830 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D);
}
-#line 8359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 404:
-#line 2742 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 413:
+#line 2836 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D);
}
-#line 8370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8561 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 405:
-#line 2748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 414:
+#line 2842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube);
}
-#line 8381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 406:
-#line 2754 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 415:
+#line 2848 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true);
}
-#line 8391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 407:
-#line 2759 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 416:
+#line 2853 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true);
}
-#line 8402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8593 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 408:
-#line 2765 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 417:
+#line 2859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true);
}
-#line 8413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8604 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 409:
-#line 2771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 418:
+#line 2865 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true);
}
-#line 8424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8615 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 410:
-#line 2777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 419:
+#line 2871 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
}
-#line 8434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8625 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 411:
-#line 2782 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 420:
+#line 2876 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true);
}
-#line 8444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8635 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 412:
-#line 2787 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 421:
+#line 2881 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd1D);
}
-#line 8454 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8645 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 413:
-#line 2792 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 422:
+#line 2886 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
}
-#line 8464 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8655 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 414:
-#line 2797 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 423:
+#line 2891 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect);
}
-#line 8474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 415:
-#line 2802 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 424:
+#line 2896 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect);
}
-#line 8485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 416:
-#line 2808 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 425:
+#line 2902 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdRect);
}
-#line 8495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 417:
-#line 2813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 426:
+#line 2907 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdRect);
}
-#line 8505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 418:
-#line 2818 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 427:
+#line 2912 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer);
}
-#line 8515 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8706 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 419:
-#line 2823 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 428:
+#line 2917 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer);
}
-#line 8526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 420:
-#line 2829 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 429:
+#line 2923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer);
}
-#line 8536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8727 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 421:
-#line 2834 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 430:
+#line 2928 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer);
}
-#line 8546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 422:
-#line 2839 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 431:
+#line 2933 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true);
}
-#line 8556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 423:
-#line 2844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 432:
+#line 2938 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true);
}
-#line 8567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 424:
-#line 2850 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 433:
+#line 2944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true);
}
-#line 8577 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8768 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 425:
-#line 2855 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 434:
+#line 2949 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true);
}
-#line 8587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 426:
-#line 2860 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 435:
+#line 2954 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true);
}
-#line 8597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 427:
-#line 2865 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 436:
+#line 2959 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true);
}
-#line 8608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 428:
-#line 2871 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 437:
+#line 2965 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true);
}
-#line 8618 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 429:
-#line 2876 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 438:
+#line 2970 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true);
}
-#line 8628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 430:
-#line 2881 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 439:
+#line 2975 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd1D);
}
-#line 8638 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 431:
-#line 2886 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 440:
+#line 2980 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D);
}
-#line 8649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 432:
-#line 2892 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 441:
+#line 2986 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd1D);
}
-#line 8659 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 433:
-#line 2897 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 442:
+#line 2991 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd1D);
}
-#line 8669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 434:
-#line 2902 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 443:
+#line 2996 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D);
}
-#line 8679 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 435:
-#line 2907 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 444:
+#line 3001 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D);
}
-#line 8690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8881 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 436:
-#line 2913 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 445:
+#line 3007 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D);
}
-#line 8700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 437:
-#line 2918 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 446:
+#line 3012 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D);
}
-#line 8710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8901 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 438:
-#line 2923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 447:
+#line 3017 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd3D);
}
-#line 8720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 439:
-#line 2928 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 448:
+#line 3022 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D);
}
-#line 8731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 440:
-#line 2934 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 449:
+#line 3028 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd3D);
}
-#line 8741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8932 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 441:
-#line 2939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 450:
+#line 3033 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd3D);
}
-#line 8751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 442:
-#line 2944 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 451:
+#line 3038 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdRect);
}
-#line 8761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 443:
-#line 2949 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 452:
+#line 3043 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect);
}
-#line 8772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8963 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 444:
-#line 2955 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 453:
+#line 3049 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdRect);
}
-#line 8782 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 445:
-#line 2960 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 454:
+#line 3054 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdRect);
}
-#line 8792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8983 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 446:
-#line 2965 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 455:
+#line 3059 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdCube);
}
-#line 8802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 8993 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 447:
-#line 2970 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 456:
+#line 3064 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube);
}
-#line 8813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 448:
-#line 2976 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 457:
+#line 3070 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdCube);
}
-#line 8823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 449:
-#line 2981 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 458:
+#line 3075 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdCube);
}
-#line 8833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 450:
-#line 2986 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 459:
+#line 3080 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer);
}
-#line 8843 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 451:
-#line 2991 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 460:
+#line 3085 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer);
}
-#line 8854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 452:
-#line 2997 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 461:
+#line 3091 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer);
}
-#line 8864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 453:
-#line 3002 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 462:
+#line 3096 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer);
}
-#line 8874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9065 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 454:
-#line 3007 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 463:
+#line 3101 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true);
}
-#line 8884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 455:
-#line 3012 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 464:
+#line 3106 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true);
}
-#line 8895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 456:
-#line 3018 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 465:
+#line 3112 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true);
}
-#line 8905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9096 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 457:
-#line 3023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 466:
+#line 3117 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true);
}
-#line 8915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 458:
-#line 3028 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 467:
+#line 3122 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true);
}
-#line 8925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 459:
-#line 3033 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 468:
+#line 3127 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true);
}
-#line 8936 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9127 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 460:
-#line 3039 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 469:
+#line 3133 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true);
}
-#line 8946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9137 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 461:
-#line 3044 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 470:
+#line 3138 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true);
}
-#line 8956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 462:
-#line 3049 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 471:
+#line 3143 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true);
}
-#line 8966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 463:
-#line 3054 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 472:
+#line 3148 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true);
}
-#line 8977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9168 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 464:
-#line 3060 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 473:
+#line 3154 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true);
}
-#line 8987 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9178 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 465:
-#line 3065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 474:
+#line 3159 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true);
}
-#line 8997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9188 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 466:
-#line 3070 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 475:
+#line 3164 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true);
}
-#line 9007 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 467:
-#line 3075 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 476:
+#line 3169 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true);
}
-#line 9018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 468:
-#line 3081 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 477:
+#line 3175 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true);
}
-#line 9028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9219 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 469:
-#line 3086 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 478:
+#line 3180 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true);
}
-#line 9038 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9229 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 470:
-#line 3091 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 479:
+#line 3185 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true);
}
-#line 9048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9239 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 471:
-#line 3096 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 480:
+#line 3190 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true);
}
-#line 9059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 472:
-#line 3102 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 481:
+#line 3196 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true);
}
-#line 9069 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9260 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 473:
-#line 3107 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 482:
+#line 3201 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true);
}
-#line 9079 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 474:
-#line 3112 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 483:
+#line 3206 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // GL_OES_EGL_image_external
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
(yyval.interm.type).sampler.external = true;
}
-#line 9090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 475:
-#line 3118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 484:
+#line 3212 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ // GL_EXT_YUV_target
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
(yyval.interm.type).sampler.yuv = true;
}
-#line 9101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9292 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 476:
-#line 3124 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 485:
+#line 3218 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat);
}
-#line 9112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 477:
-#line 3130 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 486:
+#line 3224 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat, true);
}
-#line 9123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 478:
-#line 3136 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 487:
+#line 3230 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
@@ -9165,11 +9322,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat16);
}
-#line 9135 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 479:
-#line 3143 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 488:
+#line 3237 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
@@ -9177,98 +9334,98 @@ yyreduce:
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat16, true);
}
-#line 9147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9338 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 480:
-#line 3150 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 489:
+#line 3244 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtInt);
}
-#line 9158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9349 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 481:
-#line 3156 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 490:
+#line 3250 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtInt, true);
}
-#line 9169 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 482:
-#line 3162 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 491:
+#line 3256 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtUint);
}
-#line 9180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9371 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 483:
-#line 3168 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 492:
+#line 3262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtUint, true);
}
-#line 9191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9382 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 484:
-#line 3174 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 493:
+#line 3268 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).coopmat = true;
}
-#line 9202 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9393 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 485:
-#line 3180 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 494:
+#line 3274 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).coopmat = true;
}
-#line 9213 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9404 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 486:
-#line 3186 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 495:
+#line 3280 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).coopmat = true;
}
-#line 9224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9415 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 487:
-#line 3193 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 496:
+#line 3287 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.type) = (yyvsp[0].interm.type);
(yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type));
}
-#line 9234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9425 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 488:
-#line 3198 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 497:
+#line 3292 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
//
// This is for user defined type names. The lexical phase looked up the
@@ -9282,47 +9439,47 @@ yyreduce:
} else
parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), "");
}
-#line 9252 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9443 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 489:
-#line 3214 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 498:
+#line 3308 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh);
}
-#line 9262 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9453 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 490:
-#line 3219 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 499:
+#line 3313 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium);
}
-#line 9272 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 491:
-#line 3224 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 500:
+#line 3318 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow);
}
-#line 9282 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9473 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 492:
-#line 3232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 501:
+#line 3326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedStructCheck((yyvsp[-2].lex).loc); }
-#line 9288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 493:
-#line 3232 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 502:
+#line 3326 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string);
parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure);
@@ -9334,17 +9491,17 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 9304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 494:
-#line 3243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 503:
+#line 3337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ parseContext.nestedStructCheck((yyvsp[-1].lex).loc); }
-#line 9310 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 495:
-#line 3243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 504:
+#line 3337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
TType* structure = new TType((yyvsp[-1].interm.typeList), TString(""));
(yyval.interm.type).init((yyvsp[-4].lex).loc);
@@ -9352,19 +9509,19 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 9322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 496:
-#line 3253 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 505:
+#line 3347 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = (yyvsp[0].interm.typeList);
}
-#line 9330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9521 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 497:
-#line 3256 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 506:
+#line 3350 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) {
@@ -9375,11 +9532,11 @@ yyreduce:
(yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]);
}
}
-#line 9345 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 498:
-#line 3269 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 507:
+#line 3363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -9402,11 +9559,11 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 9372 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 499:
-#line 3291 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 508:
+#line 3385 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -9431,38 +9588,38 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 9401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 500:
-#line 3318 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 509:
+#line 3412 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList) = new TTypeList;
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 9410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9601 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 501:
-#line 3322 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 510:
+#line 3416 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 9418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 502:
-#line 3328 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 511:
+#line 3422 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.typeLine).type = new TType(EbtVoid);
(yyval.interm.typeLine).loc = (yyvsp[0].lex).loc;
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string);
}
-#line 9428 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 503:
-#line 3333 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 512:
+#line 3427 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes);
@@ -9471,235 +9628,235 @@ yyreduce:
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string);
(yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes);
}
-#line 9441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 504:
-#line 3344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 513:
+#line 3438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 9449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 505:
-#line 3348 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 514:
+#line 3442 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
const char* initFeature = "{ } style initializers";
parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature);
parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
(yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
}
-#line 9460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9651 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 506:
-#line 3354 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 515:
+#line 3448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
const char* initFeature = "{ } style initializers";
parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature);
parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 9471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 507:
-#line 3365 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 516:
+#line 3459 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc());
}
-#line 9479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 508:
-#line 3368 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 517:
+#line 3462 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
}
-#line 9487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 509:
-#line 3375 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 518:
+#line 3469 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9493 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9684 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 510:
-#line 3379 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 519:
+#line 3473 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9499 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 511:
-#line 3380 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 520:
+#line 3474 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 512:
-#line 3386 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 521:
+#line 3480 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 513:
-#line 3387 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 522:
+#line 3481 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9708 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 514:
-#line 3388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 523:
+#line 3482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9714 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 515:
-#line 3389 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 524:
+#line 3483 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 516:
-#line 3390 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 525:
+#line 3484 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9535 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 517:
-#line 3391 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 526:
+#line 3485 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9732 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 518:
-#line 3392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 527:
+#line 3486 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 519:
-#line 3394 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 528:
+#line 3488 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9744 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 520:
-#line 3400 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 529:
+#line 3494 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "demote");
parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDemote, (yyvsp[-1].lex).loc);
}
-#line 9563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9754 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 521:
-#line 3409 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 530:
+#line 3503 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = 0; }
-#line 9569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 522:
-#line 3410 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 531:
+#line 3504 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
}
-#line 9578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 523:
-#line 3414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 532:
+#line 3508 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
}
-#line 9587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 524:
-#line 3418 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 533:
+#line 3512 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate())
(yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode);
}
-#line 9597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 525:
-#line 3426 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 534:
+#line 3520 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9794 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 526:
-#line 3427 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 535:
+#line 3521 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 9609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 527:
-#line 3431 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 536:
+#line 3525 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.controlFlowNestingLevel;
}
-#line 9617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9808 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 528:
-#line 3434 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 537:
+#line 3528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9817 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 529:
-#line 3438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 538:
+#line 3532 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9827 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 530:
-#line 3443 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 539:
+#line 3537 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9647 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9838 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 531:
-#line 3452 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 540:
+#line 3546 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
}
-#line 9655 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9846 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 532:
-#line 3455 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 541:
+#line 3549 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate())
(yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode);
}
-#line 9665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9856 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 533:
-#line 3463 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 542:
+#line 3557 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode));
if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
@@ -9708,11 +9865,11 @@ yyreduce:
(yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case
}
}
-#line 9678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 534:
-#line 3471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 543:
+#line 3565 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
(yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) {
@@ -9721,76 +9878,76 @@ yyreduce:
} else
(yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
}
-#line 9691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9882 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 535:
-#line 3482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 544:
+#line 3576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = 0; }
-#line 9697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9888 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 536:
-#line 3483 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 545:
+#line 3577 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
-#line 9703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9894 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 537:
-#line 3487 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 546:
+#line 3581 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 538:
-#line 3491 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 547:
+#line 3585 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 539:
-#line 3498 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 548:
+#line 3592 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode));
(yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc);
}
-#line 9729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9920 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 540:
-#line 3505 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 549:
+#line 3599 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
}
-#line 9738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 541:
-#line 3509 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 550:
+#line 3603 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 9747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9938 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 542:
-#line 3517 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 551:
+#line 3611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode));
}
-#line 9756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9947 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 543:
-#line 3521 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 552:
+#line 3615 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type));
@@ -9801,28 +9958,28 @@ yyreduce:
else
(yyval.interm.intermTypedNode) = 0;
}
-#line 9771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 544:
-#line 3534 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 553:
+#line 3628 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 545:
-#line 3538 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 554:
+#line 3632 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 546:
-#line 3545 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 555:
+#line 3639 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// start new switch sequence on the switch stack
++parseContext.controlFlowNestingLevel;
@@ -9831,11 +9988,11 @@ yyreduce:
parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
parseContext.symbolTable.push();
}
-#line 9801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 9992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 547:
-#line 3553 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 556:
+#line 3647 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0);
delete parseContext.switchSequenceStack.back();
@@ -9845,27 +10002,27 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 548:
-#line 3565 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 557:
+#line 3659 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
}
-#line 9823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 549:
-#line 3568 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 558:
+#line 3662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10022 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 550:
-#line 3574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 559:
+#line 3668 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -9878,11 +10035,11 @@ yyreduce:
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
}
}
-#line 9848 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10039 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 551:
-#line 3586 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 560:
+#line 3680 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -9892,28 +10049,28 @@ yyreduce:
else
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc);
}
-#line 9862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10053 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 552:
-#line 3598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 561:
+#line 3692 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 553:
-#line 3602 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 562:
+#line 3696 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 554:
-#line 3609 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 563:
+#line 3703 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", "");
@@ -9922,11 +10079,11 @@ yyreduce:
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 555:
-#line 3617 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 564:
+#line 3711 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
(yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc);
@@ -9934,21 +10091,21 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 556:
-#line 3624 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 565:
+#line 3718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10105 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 557:
-#line 3629 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 566:
+#line 3723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", "");
@@ -9960,22 +10117,22 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9930 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10121 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 558:
-#line 3640 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 567:
+#line 3734 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.push();
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 9941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 559:
-#line 3646 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 568:
+#line 3740 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
(yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc);
@@ -9988,81 +10145,81 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 9958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 560:
-#line 3661 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 569:
+#line 3755 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 561:
-#line 3664 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 570:
+#line 3758 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 9974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10165 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 562:
-#line 3670 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 571:
+#line 3764 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 9982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 563:
-#line 3673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 572:
+#line 3767 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermTypedNode) = 0;
}
-#line 9990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 564:
-#line 3679 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 573:
+#line 3773 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 9999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 565:
-#line 3683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 574:
+#line 3777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
}
-#line 10008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 566:
-#line 3690 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 575:
+#line 3784 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (parseContext.loopNestingLevel <= 0)
parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", "");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc);
}
-#line 10018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 567:
-#line 3695 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 576:
+#line 3789 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0)
parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", "");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc);
}
-#line 10028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10219 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 568:
-#line 3700 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 577:
+#line 3794 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc);
if (parseContext.currentFunctionType->getBasicType() != EbtVoid)
@@ -10070,83 +10227,91 @@ yyreduce:
if (parseContext.inMain)
parseContext.postEntryPointReturn = true;
}
-#line 10040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 569:
-#line 3707 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 578:
+#line 3801 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10239 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 570:
-#line 3710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 579:
+#line 3804 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc);
}
-#line 10057 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 571:
-#line 3719 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 580:
+#line 3813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
}
-#line 10066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10257 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 572:
-#line 3723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 581:
+#line 3817 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
if ((yyvsp[0].interm.intermNode) != nullptr) {
(yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
}
}
-#line 10077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 573:
-#line 3732 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 582:
+#line 3826 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10085 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 574:
-#line 3735 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 583:
+#line 3829 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10284 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 575:
-#line 3739 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 584:
+#line 3833 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon");
parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
(yyval.interm.intermNode) = nullptr;
}
-#line 10103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10294 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 576:
-#line 3748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 585:
+#line 3842 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */);
(yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function);
+
+ // For ES 100 only, according to ES shading language 100 spec: A function
+ // body has a scope nested inside the function's definition.
+ if (parseContext.profile == EEsProfile && parseContext.version == 100)
+ {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ }
}
-#line 10112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 577:
-#line 3752 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 586:
+#line 3854 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
// May be best done as post process phase on intermediate code
if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
@@ -10161,53 +10326,64 @@ yyreduce:
(yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
(yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
(yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable);
+
+ // Set currentFunctionType to empty pointer when goes outside of the function
+ parseContext.currentFunctionType = nullptr;
+
+ // For ES 100 only, according to ES shading language 100 spec: A function
+ // body has a scope nested inside the function's definition.
+ if (parseContext.profile == EEsProfile && parseContext.version == 100)
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ }
}
-#line 10132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 578:
-#line 3771 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 587:
+#line 3884 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = (yyvsp[-2].interm.attributes);
parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
}
-#line 10141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 579:
-#line 3777 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 588:
+#line 3890 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = (yyvsp[0].interm.attributes);
}
-#line 10149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10359 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 580:
-#line 3780 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 589:
+#line 3893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes));
}
-#line 10157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10367 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 581:
-#line 3785 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 590:
+#line 3898 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string);
}
-#line 10165 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
- case 582:
-#line 3788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ case 591:
+#line 3901 "MachineIndependent/glslang.y" /* yacc.c:1646 */
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10383 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
break;
-#line 10177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+#line 10387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -10435,5 +10611,5 @@ yyreturn:
#endif
return yyresult;
}
-#line 3793 "MachineIndependent/glslang.y" /* yacc.c:1906 */
+#line 3906 "MachineIndependent/glslang.y" /* yacc.c:1906 */
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
index f4f4114730..78b72a246b 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
@@ -203,256 +203,265 @@ extern int yydebug;
F64MAT4X4 = 413,
ATOMIC_UINT = 414,
ACCSTRUCTNV = 415,
- FCOOPMATNV = 416,
- ICOOPMATNV = 417,
- UCOOPMATNV = 418,
- SAMPLERCUBEARRAY = 419,
- SAMPLERCUBEARRAYSHADOW = 420,
- ISAMPLERCUBEARRAY = 421,
- USAMPLERCUBEARRAY = 422,
- SAMPLER1D = 423,
- SAMPLER1DARRAY = 424,
- SAMPLER1DARRAYSHADOW = 425,
- ISAMPLER1D = 426,
- SAMPLER1DSHADOW = 427,
- SAMPLER2DRECT = 428,
- SAMPLER2DRECTSHADOW = 429,
- ISAMPLER2DRECT = 430,
- USAMPLER2DRECT = 431,
- SAMPLERBUFFER = 432,
- ISAMPLERBUFFER = 433,
- USAMPLERBUFFER = 434,
- SAMPLER2DMS = 435,
- ISAMPLER2DMS = 436,
- USAMPLER2DMS = 437,
- SAMPLER2DMSARRAY = 438,
- ISAMPLER2DMSARRAY = 439,
- USAMPLER2DMSARRAY = 440,
- SAMPLEREXTERNALOES = 441,
- SAMPLEREXTERNAL2DY2YEXT = 442,
- ISAMPLER1DARRAY = 443,
- USAMPLER1D = 444,
- USAMPLER1DARRAY = 445,
- F16SAMPLER1D = 446,
- F16SAMPLER2D = 447,
- F16SAMPLER3D = 448,
- F16SAMPLER2DRECT = 449,
- F16SAMPLERCUBE = 450,
- F16SAMPLER1DARRAY = 451,
- F16SAMPLER2DARRAY = 452,
- F16SAMPLERCUBEARRAY = 453,
- F16SAMPLERBUFFER = 454,
- F16SAMPLER2DMS = 455,
- F16SAMPLER2DMSARRAY = 456,
- F16SAMPLER1DSHADOW = 457,
- F16SAMPLER2DSHADOW = 458,
- F16SAMPLER1DARRAYSHADOW = 459,
- F16SAMPLER2DARRAYSHADOW = 460,
- F16SAMPLER2DRECTSHADOW = 461,
- F16SAMPLERCUBESHADOW = 462,
- F16SAMPLERCUBEARRAYSHADOW = 463,
- IMAGE1D = 464,
- IIMAGE1D = 465,
- UIMAGE1D = 466,
- IMAGE2D = 467,
- IIMAGE2D = 468,
- UIMAGE2D = 469,
- IMAGE3D = 470,
- IIMAGE3D = 471,
- UIMAGE3D = 472,
- IMAGE2DRECT = 473,
- IIMAGE2DRECT = 474,
- UIMAGE2DRECT = 475,
- IMAGECUBE = 476,
- IIMAGECUBE = 477,
- UIMAGECUBE = 478,
- IMAGEBUFFER = 479,
- IIMAGEBUFFER = 480,
- UIMAGEBUFFER = 481,
- IMAGE1DARRAY = 482,
- IIMAGE1DARRAY = 483,
- UIMAGE1DARRAY = 484,
- IMAGE2DARRAY = 485,
- IIMAGE2DARRAY = 486,
- UIMAGE2DARRAY = 487,
- IMAGECUBEARRAY = 488,
- IIMAGECUBEARRAY = 489,
- UIMAGECUBEARRAY = 490,
- IMAGE2DMS = 491,
- IIMAGE2DMS = 492,
- UIMAGE2DMS = 493,
- IMAGE2DMSARRAY = 494,
- IIMAGE2DMSARRAY = 495,
- UIMAGE2DMSARRAY = 496,
- F16IMAGE1D = 497,
- F16IMAGE2D = 498,
- F16IMAGE3D = 499,
- F16IMAGE2DRECT = 500,
- F16IMAGECUBE = 501,
- F16IMAGE1DARRAY = 502,
- F16IMAGE2DARRAY = 503,
- F16IMAGECUBEARRAY = 504,
- F16IMAGEBUFFER = 505,
- F16IMAGE2DMS = 506,
- F16IMAGE2DMSARRAY = 507,
- TEXTURECUBEARRAY = 508,
- ITEXTURECUBEARRAY = 509,
- UTEXTURECUBEARRAY = 510,
- TEXTURE1D = 511,
- ITEXTURE1D = 512,
- UTEXTURE1D = 513,
- TEXTURE1DARRAY = 514,
- ITEXTURE1DARRAY = 515,
- UTEXTURE1DARRAY = 516,
- TEXTURE2DRECT = 517,
- ITEXTURE2DRECT = 518,
- UTEXTURE2DRECT = 519,
- TEXTUREBUFFER = 520,
- ITEXTUREBUFFER = 521,
- UTEXTUREBUFFER = 522,
- TEXTURE2DMS = 523,
- ITEXTURE2DMS = 524,
- UTEXTURE2DMS = 525,
- TEXTURE2DMSARRAY = 526,
- ITEXTURE2DMSARRAY = 527,
- UTEXTURE2DMSARRAY = 528,
- F16TEXTURE1D = 529,
- F16TEXTURE2D = 530,
- F16TEXTURE3D = 531,
- F16TEXTURE2DRECT = 532,
- F16TEXTURECUBE = 533,
- F16TEXTURE1DARRAY = 534,
- F16TEXTURE2DARRAY = 535,
- F16TEXTURECUBEARRAY = 536,
- F16TEXTUREBUFFER = 537,
- F16TEXTURE2DMS = 538,
- F16TEXTURE2DMSARRAY = 539,
- SUBPASSINPUT = 540,
- SUBPASSINPUTMS = 541,
- ISUBPASSINPUT = 542,
- ISUBPASSINPUTMS = 543,
- USUBPASSINPUT = 544,
- USUBPASSINPUTMS = 545,
- F16SUBPASSINPUT = 546,
- F16SUBPASSINPUTMS = 547,
- LEFT_OP = 548,
- RIGHT_OP = 549,
- INC_OP = 550,
- DEC_OP = 551,
- LE_OP = 552,
- GE_OP = 553,
- EQ_OP = 554,
- NE_OP = 555,
- AND_OP = 556,
- OR_OP = 557,
- XOR_OP = 558,
- MUL_ASSIGN = 559,
- DIV_ASSIGN = 560,
- ADD_ASSIGN = 561,
- MOD_ASSIGN = 562,
- LEFT_ASSIGN = 563,
- RIGHT_ASSIGN = 564,
- AND_ASSIGN = 565,
- XOR_ASSIGN = 566,
- OR_ASSIGN = 567,
- SUB_ASSIGN = 568,
- LEFT_PAREN = 569,
- RIGHT_PAREN = 570,
- LEFT_BRACKET = 571,
- RIGHT_BRACKET = 572,
- LEFT_BRACE = 573,
- RIGHT_BRACE = 574,
- DOT = 575,
- COMMA = 576,
- COLON = 577,
- EQUAL = 578,
- SEMICOLON = 579,
- BANG = 580,
- DASH = 581,
- TILDE = 582,
- PLUS = 583,
- STAR = 584,
- SLASH = 585,
- PERCENT = 586,
- LEFT_ANGLE = 587,
- RIGHT_ANGLE = 588,
- VERTICAL_BAR = 589,
- CARET = 590,
- AMPERSAND = 591,
- QUESTION = 592,
- INVARIANT = 593,
- HIGH_PRECISION = 594,
- MEDIUM_PRECISION = 595,
- LOW_PRECISION = 596,
- PRECISION = 597,
- PACKED = 598,
- RESOURCE = 599,
- SUPERP = 600,
- FLOATCONSTANT = 601,
- INTCONSTANT = 602,
- UINTCONSTANT = 603,
- BOOLCONSTANT = 604,
- IDENTIFIER = 605,
- TYPE_NAME = 606,
- CENTROID = 607,
- IN = 608,
- OUT = 609,
- INOUT = 610,
- STRUCT = 611,
- VOID = 612,
- WHILE = 613,
- BREAK = 614,
- CONTINUE = 615,
- DO = 616,
- ELSE = 617,
- FOR = 618,
- IF = 619,
- DISCARD = 620,
- RETURN = 621,
- SWITCH = 622,
- CASE = 623,
- DEFAULT = 624,
- UNIFORM = 625,
- SHARED = 626,
- BUFFER = 627,
- FLAT = 628,
- SMOOTH = 629,
- LAYOUT = 630,
- DOUBLECONSTANT = 631,
- INT16CONSTANT = 632,
- UINT16CONSTANT = 633,
- FLOAT16CONSTANT = 634,
- INT32CONSTANT = 635,
- UINT32CONSTANT = 636,
- INT64CONSTANT = 637,
- UINT64CONSTANT = 638,
- SUBROUTINE = 639,
- DEMOTE = 640,
- PAYLOADNV = 641,
- PAYLOADINNV = 642,
- HITATTRNV = 643,
- CALLDATANV = 644,
- CALLDATAINNV = 645,
- PATCH = 646,
- SAMPLE = 647,
- NONUNIFORM = 648,
- COHERENT = 649,
- VOLATILE = 650,
- RESTRICT = 651,
- READONLY = 652,
- WRITEONLY = 653,
- DEVICECOHERENT = 654,
- QUEUEFAMILYCOHERENT = 655,
- WORKGROUPCOHERENT = 656,
- SUBGROUPCOHERENT = 657,
- NONPRIVATE = 658,
- NOPERSPECTIVE = 659,
- EXPLICITINTERPAMD = 660,
- PERVERTEXNV = 661,
- PERPRIMITIVENV = 662,
- PERVIEWNV = 663,
- PERTASKNV = 664,
- PRECISE = 665
+ ACCSTRUCTEXT = 416,
+ RAYQUERYEXT = 417,
+ FCOOPMATNV = 418,
+ ICOOPMATNV = 419,
+ UCOOPMATNV = 420,
+ SAMPLERCUBEARRAY = 421,
+ SAMPLERCUBEARRAYSHADOW = 422,
+ ISAMPLERCUBEARRAY = 423,
+ USAMPLERCUBEARRAY = 424,
+ SAMPLER1D = 425,
+ SAMPLER1DARRAY = 426,
+ SAMPLER1DARRAYSHADOW = 427,
+ ISAMPLER1D = 428,
+ SAMPLER1DSHADOW = 429,
+ SAMPLER2DRECT = 430,
+ SAMPLER2DRECTSHADOW = 431,
+ ISAMPLER2DRECT = 432,
+ USAMPLER2DRECT = 433,
+ SAMPLERBUFFER = 434,
+ ISAMPLERBUFFER = 435,
+ USAMPLERBUFFER = 436,
+ SAMPLER2DMS = 437,
+ ISAMPLER2DMS = 438,
+ USAMPLER2DMS = 439,
+ SAMPLER2DMSARRAY = 440,
+ ISAMPLER2DMSARRAY = 441,
+ USAMPLER2DMSARRAY = 442,
+ SAMPLEREXTERNALOES = 443,
+ SAMPLEREXTERNAL2DY2YEXT = 444,
+ ISAMPLER1DARRAY = 445,
+ USAMPLER1D = 446,
+ USAMPLER1DARRAY = 447,
+ F16SAMPLER1D = 448,
+ F16SAMPLER2D = 449,
+ F16SAMPLER3D = 450,
+ F16SAMPLER2DRECT = 451,
+ F16SAMPLERCUBE = 452,
+ F16SAMPLER1DARRAY = 453,
+ F16SAMPLER2DARRAY = 454,
+ F16SAMPLERCUBEARRAY = 455,
+ F16SAMPLERBUFFER = 456,
+ F16SAMPLER2DMS = 457,
+ F16SAMPLER2DMSARRAY = 458,
+ F16SAMPLER1DSHADOW = 459,
+ F16SAMPLER2DSHADOW = 460,
+ F16SAMPLER1DARRAYSHADOW = 461,
+ F16SAMPLER2DARRAYSHADOW = 462,
+ F16SAMPLER2DRECTSHADOW = 463,
+ F16SAMPLERCUBESHADOW = 464,
+ F16SAMPLERCUBEARRAYSHADOW = 465,
+ IMAGE1D = 466,
+ IIMAGE1D = 467,
+ UIMAGE1D = 468,
+ IMAGE2D = 469,
+ IIMAGE2D = 470,
+ UIMAGE2D = 471,
+ IMAGE3D = 472,
+ IIMAGE3D = 473,
+ UIMAGE3D = 474,
+ IMAGE2DRECT = 475,
+ IIMAGE2DRECT = 476,
+ UIMAGE2DRECT = 477,
+ IMAGECUBE = 478,
+ IIMAGECUBE = 479,
+ UIMAGECUBE = 480,
+ IMAGEBUFFER = 481,
+ IIMAGEBUFFER = 482,
+ UIMAGEBUFFER = 483,
+ IMAGE1DARRAY = 484,
+ IIMAGE1DARRAY = 485,
+ UIMAGE1DARRAY = 486,
+ IMAGE2DARRAY = 487,
+ IIMAGE2DARRAY = 488,
+ UIMAGE2DARRAY = 489,
+ IMAGECUBEARRAY = 490,
+ IIMAGECUBEARRAY = 491,
+ UIMAGECUBEARRAY = 492,
+ IMAGE2DMS = 493,
+ IIMAGE2DMS = 494,
+ UIMAGE2DMS = 495,
+ IMAGE2DMSARRAY = 496,
+ IIMAGE2DMSARRAY = 497,
+ UIMAGE2DMSARRAY = 498,
+ F16IMAGE1D = 499,
+ F16IMAGE2D = 500,
+ F16IMAGE3D = 501,
+ F16IMAGE2DRECT = 502,
+ F16IMAGECUBE = 503,
+ F16IMAGE1DARRAY = 504,
+ F16IMAGE2DARRAY = 505,
+ F16IMAGECUBEARRAY = 506,
+ F16IMAGEBUFFER = 507,
+ F16IMAGE2DMS = 508,
+ F16IMAGE2DMSARRAY = 509,
+ TEXTURECUBEARRAY = 510,
+ ITEXTURECUBEARRAY = 511,
+ UTEXTURECUBEARRAY = 512,
+ TEXTURE1D = 513,
+ ITEXTURE1D = 514,
+ UTEXTURE1D = 515,
+ TEXTURE1DARRAY = 516,
+ ITEXTURE1DARRAY = 517,
+ UTEXTURE1DARRAY = 518,
+ TEXTURE2DRECT = 519,
+ ITEXTURE2DRECT = 520,
+ UTEXTURE2DRECT = 521,
+ TEXTUREBUFFER = 522,
+ ITEXTUREBUFFER = 523,
+ UTEXTUREBUFFER = 524,
+ TEXTURE2DMS = 525,
+ ITEXTURE2DMS = 526,
+ UTEXTURE2DMS = 527,
+ TEXTURE2DMSARRAY = 528,
+ ITEXTURE2DMSARRAY = 529,
+ UTEXTURE2DMSARRAY = 530,
+ F16TEXTURE1D = 531,
+ F16TEXTURE2D = 532,
+ F16TEXTURE3D = 533,
+ F16TEXTURE2DRECT = 534,
+ F16TEXTURECUBE = 535,
+ F16TEXTURE1DARRAY = 536,
+ F16TEXTURE2DARRAY = 537,
+ F16TEXTURECUBEARRAY = 538,
+ F16TEXTUREBUFFER = 539,
+ F16TEXTURE2DMS = 540,
+ F16TEXTURE2DMSARRAY = 541,
+ SUBPASSINPUT = 542,
+ SUBPASSINPUTMS = 543,
+ ISUBPASSINPUT = 544,
+ ISUBPASSINPUTMS = 545,
+ USUBPASSINPUT = 546,
+ USUBPASSINPUTMS = 547,
+ F16SUBPASSINPUT = 548,
+ F16SUBPASSINPUTMS = 549,
+ LEFT_OP = 550,
+ RIGHT_OP = 551,
+ INC_OP = 552,
+ DEC_OP = 553,
+ LE_OP = 554,
+ GE_OP = 555,
+ EQ_OP = 556,
+ NE_OP = 557,
+ AND_OP = 558,
+ OR_OP = 559,
+ XOR_OP = 560,
+ MUL_ASSIGN = 561,
+ DIV_ASSIGN = 562,
+ ADD_ASSIGN = 563,
+ MOD_ASSIGN = 564,
+ LEFT_ASSIGN = 565,
+ RIGHT_ASSIGN = 566,
+ AND_ASSIGN = 567,
+ XOR_ASSIGN = 568,
+ OR_ASSIGN = 569,
+ SUB_ASSIGN = 570,
+ STRING_LITERAL = 571,
+ LEFT_PAREN = 572,
+ RIGHT_PAREN = 573,
+ LEFT_BRACKET = 574,
+ RIGHT_BRACKET = 575,
+ LEFT_BRACE = 576,
+ RIGHT_BRACE = 577,
+ DOT = 578,
+ COMMA = 579,
+ COLON = 580,
+ EQUAL = 581,
+ SEMICOLON = 582,
+ BANG = 583,
+ DASH = 584,
+ TILDE = 585,
+ PLUS = 586,
+ STAR = 587,
+ SLASH = 588,
+ PERCENT = 589,
+ LEFT_ANGLE = 590,
+ RIGHT_ANGLE = 591,
+ VERTICAL_BAR = 592,
+ CARET = 593,
+ AMPERSAND = 594,
+ QUESTION = 595,
+ INVARIANT = 596,
+ HIGH_PRECISION = 597,
+ MEDIUM_PRECISION = 598,
+ LOW_PRECISION = 599,
+ PRECISION = 600,
+ PACKED = 601,
+ RESOURCE = 602,
+ SUPERP = 603,
+ FLOATCONSTANT = 604,
+ INTCONSTANT = 605,
+ UINTCONSTANT = 606,
+ BOOLCONSTANT = 607,
+ IDENTIFIER = 608,
+ TYPE_NAME = 609,
+ CENTROID = 610,
+ IN = 611,
+ OUT = 612,
+ INOUT = 613,
+ STRUCT = 614,
+ VOID = 615,
+ WHILE = 616,
+ BREAK = 617,
+ CONTINUE = 618,
+ DO = 619,
+ ELSE = 620,
+ FOR = 621,
+ IF = 622,
+ DISCARD = 623,
+ RETURN = 624,
+ SWITCH = 625,
+ CASE = 626,
+ DEFAULT = 627,
+ UNIFORM = 628,
+ SHARED = 629,
+ BUFFER = 630,
+ FLAT = 631,
+ SMOOTH = 632,
+ LAYOUT = 633,
+ DOUBLECONSTANT = 634,
+ INT16CONSTANT = 635,
+ UINT16CONSTANT = 636,
+ FLOAT16CONSTANT = 637,
+ INT32CONSTANT = 638,
+ UINT32CONSTANT = 639,
+ INT64CONSTANT = 640,
+ UINT64CONSTANT = 641,
+ SUBROUTINE = 642,
+ DEMOTE = 643,
+ PAYLOADNV = 644,
+ PAYLOADINNV = 645,
+ HITATTRNV = 646,
+ CALLDATANV = 647,
+ CALLDATAINNV = 648,
+ PAYLOADEXT = 649,
+ PAYLOADINEXT = 650,
+ HITATTREXT = 651,
+ CALLDATAEXT = 652,
+ CALLDATAINEXT = 653,
+ PATCH = 654,
+ SAMPLE = 655,
+ NONUNIFORM = 656,
+ COHERENT = 657,
+ VOLATILE = 658,
+ RESTRICT = 659,
+ READONLY = 660,
+ WRITEONLY = 661,
+ DEVICECOHERENT = 662,
+ QUEUEFAMILYCOHERENT = 663,
+ WORKGROUPCOHERENT = 664,
+ SUBGROUPCOHERENT = 665,
+ NONPRIVATE = 666,
+ SHADERCALLCOHERENT = 667,
+ NOPERSPECTIVE = 668,
+ EXPLICITINTERPAMD = 669,
+ PERVERTEXNV = 670,
+ PERPRIMITIVENV = 671,
+ PERVIEWNV = 672,
+ PERTASKNV = 673,
+ PRECISE = 674
};
#endif
@@ -461,7 +470,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 96 "MachineIndependent/glslang.y" /* yacc.c:1909 */
+#line 97 "MachineIndependent/glslang.y" /* yacc.c:1909 */
struct {
glslang::TSourceLoc loc;
@@ -497,7 +506,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
-#line 501 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
+#line 510 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
index 3a93aedafb..f23a7058ab 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
@@ -2,6 +2,7 @@
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2012-2016 LunarG, Inc.
// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@@ -35,7 +36,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#include "localintermediate.h"
#include "../Include/InfoSink.h"
@@ -1078,18 +1079,43 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
- case EOpTraceNV: out.debug << "traceNV"; break;
- case EOpReportIntersectionNV: out.debug << "reportIntersectionNV"; break;
- case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break;
- case EOpTerminateRayNV: out.debug << "terminateRayNV"; break;
- case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break;
+ case EOpTrace: out.debug << "traceNV"; break;
+ case EOpReportIntersection: out.debug << "reportIntersectionNV"; break;
+ case EOpIgnoreIntersection: out.debug << "ignoreIntersectionNV"; break;
+ case EOpTerminateRay: out.debug << "terminateRayNV"; break;
+ case EOpExecuteCallable: out.debug << "executeCallableNV"; break;
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
+ case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break;
+ case EOpRayQueryTerminate: out.debug << "rayQueryTerminateEXT"; break;
+ case EOpRayQueryGenerateIntersection: out.debug << "rayQueryGenerateIntersectionEXT"; break;
+ case EOpRayQueryConfirmIntersection: out.debug << "rayQueryConfirmIntersectionEXT"; break;
+ case EOpRayQueryProceed: out.debug << "rayQueryProceedEXT"; break;
+ case EOpRayQueryGetIntersectionType: out.debug << "rayQueryGetIntersectionTypeEXT"; break;
+ case EOpRayQueryGetRayTMin: out.debug << "rayQueryGetRayTMinEXT"; break;
+ case EOpRayQueryGetRayFlags: out.debug << "rayQueryGetRayFlagsEXT"; break;
+ case EOpRayQueryGetIntersectionT: out.debug << "rayQueryGetIntersectionTEXT"; break;
+ case EOpRayQueryGetIntersectionInstanceCustomIndex: out.debug << "rayQueryGetIntersectionInstanceCustomIndexEXT"; break;
+ case EOpRayQueryGetIntersectionInstanceId: out.debug << "rayQueryGetIntersectionInstanceIdEXT"; break;
+ case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: out.debug << "rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT"; break;
+ case EOpRayQueryGetIntersectionGeometryIndex: out.debug << "rayQueryGetIntersectionGeometryIndexEXT"; break;
+ case EOpRayQueryGetIntersectionPrimitiveIndex: out.debug << "rayQueryGetIntersectionPrimitiveIndexEXT"; break;
+ case EOpRayQueryGetIntersectionBarycentrics: out.debug << "rayQueryGetIntersectionBarycentricsEXT"; break;
+ case EOpRayQueryGetIntersectionFrontFace: out.debug << "rayQueryGetIntersectionFrontFaceEXT"; break;
+ case EOpRayQueryGetIntersectionCandidateAABBOpaque: out.debug << "rayQueryGetIntersectionCandidateAABBOpaqueEXT"; break;
+ case EOpRayQueryGetIntersectionObjectRayDirection: out.debug << "rayQueryGetIntersectionObjectRayDirectionEXT"; break;
+ case EOpRayQueryGetIntersectionObjectRayOrigin: out.debug << "rayQueryGetIntersectionObjectRayOriginEXT"; break;
+ case EOpRayQueryGetWorldRayDirection: out.debug << "rayQueryGetWorldRayDirectionEXT"; break;
+ case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break;
+ case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
+ case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
+
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
+ case EOpDebugPrintf: out.debug << "Debug printf"; break;
default: out.debug.message(EPrefixError, "Bad aggregation op");
}
@@ -1536,4 +1562,4 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
} // end namespace glslang
-#endif // not GLSLANG_WEB \ No newline at end of file
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
index 3262c0a203..905cf65d6b 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
@@ -33,7 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#include "../Include/Common.h"
#include "../Include/InfoSink.h"
@@ -79,6 +79,11 @@ public:
target = &outputList;
else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant())
target = &uniformList;
+ // If a global is being visited, then we should also traverse it incase it's evaluation
+ // ends up visiting inputs we want to tag as live
+ else if (base->getQualifier().storage == EvqGlobal)
+ addGlobalReference(base->getName());
+
if (target) {
TVarEntryInfo ent = {base->getId(), base, ! traverseAll};
ent.stage = intermediate.getStage();
@@ -161,7 +166,7 @@ struct TNotifyUniformAdaptor
}
private:
- TNotifyUniformAdaptor& operator=(TNotifyUniformAdaptor&);
+ TNotifyUniformAdaptor& operator=(TNotifyUniformAdaptor&) = delete;
};
struct TNotifyInOutAdaptor
@@ -180,7 +185,7 @@ struct TNotifyInOutAdaptor
}
private:
- TNotifyInOutAdaptor& operator=(TNotifyInOutAdaptor&);
+ TNotifyInOutAdaptor& operator=(TNotifyInOutAdaptor&) = delete;
};
struct TResolverUniformAdaptor {
@@ -236,7 +241,7 @@ struct TResolverUniformAdaptor {
bool& error;
private:
- TResolverUniformAdaptor& operator=(TResolverUniformAdaptor&);
+ TResolverUniformAdaptor& operator=(TResolverUniformAdaptor&) = delete;
};
struct TResolverInOutAdaptor {
@@ -283,7 +288,7 @@ struct TResolverInOutAdaptor {
bool& error;
private:
- TResolverInOutAdaptor& operator=(TResolverInOutAdaptor&);
+ TResolverInOutAdaptor& operator=(TResolverInOutAdaptor&) = delete;
};
// The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings
@@ -309,26 +314,43 @@ struct TSymbolValidater
TIntermSymbol* base = ent1.symbol;
const TType& type = ent1.symbol->getType();
const TString& name = entKey.first;
- TString mangleName1, mangleName2;
- type.appendMangledName(mangleName1);
EShLanguage stage = ent1.stage;
+ TString mangleName1, mangleName2;
if (currentStage != stage) {
preStage = currentStage;
currentStage = stage;
nextStage = EShLangCount;
for (int i = currentStage + 1; i < EShLangCount; i++) {
- if (inVarMaps[i] != nullptr)
+ if (inVarMaps[i] != nullptr) {
nextStage = static_cast<EShLanguage>(i);
+ break;
+ }
}
}
+
+ if (type.getQualifier().isArrayedIo(stage)) {
+ TType subType(type, 0);
+ subType.appendMangledName(mangleName1);
+ } else {
+ type.appendMangledName(mangleName1);
+ }
+
if (base->getQualifier().storage == EvqVaryingIn) {
// validate stage in;
if (preStage == EShLangCount)
return;
+ if (name == "gl_PerVertex")
+ return;
if (outVarMaps[preStage] != nullptr) {
auto ent2 = outVarMaps[preStage]->find(name);
if (ent2 != outVarMaps[preStage]->end()) {
- ent2->second.symbol->getType().appendMangledName(mangleName2);
+ if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) {
+ TType subType(ent2->second.symbol->getType(), 0);
+ subType.appendMangledName(mangleName2);
+ }
+ else {
+ ent2->second.symbol->getType().appendMangledName(mangleName2);
+ }
if (mangleName1 == mangleName2)
return;
else {
@@ -343,10 +365,18 @@ struct TSymbolValidater
// validate stage out;
if (nextStage == EShLangCount)
return;
+ if (name == "gl_PerVertex")
+ return;
if (outVarMaps[nextStage] != nullptr) {
auto ent2 = inVarMaps[nextStage]->find(name);
if (ent2 != inVarMaps[nextStage]->end()) {
- ent2->second.symbol->getType().appendMangledName(mangleName2);
+ if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) {
+ TType subType(ent2->second.symbol->getType(), 0);
+ subType.appendMangledName(mangleName2);
+ }
+ else {
+ ent2->second.symbol->getType().appendMangledName(mangleName2);
+ }
if (mangleName1 == mangleName2)
return;
else {
@@ -384,7 +414,7 @@ struct TSymbolValidater
bool& hadError;
private:
- TSymbolValidater& operator=(TSymbolValidater&);
+ TSymbolValidater& operator=(TSymbolValidater&) = delete;
};
struct TSlotCollector {
@@ -398,7 +428,7 @@ struct TSlotCollector {
TInfoSink& infoSink;
private:
- TSlotCollector& operator=(TSlotCollector&);
+ TSlotCollector& operator=(TSlotCollector&) = delete;
};
TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate)
@@ -579,7 +609,7 @@ TDefaultGlslIoResolver::TDefaultGlslIoResolver(const TIntermediate& intermediate
int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
- const TString& name = ent.symbol->getName();
+ const TString& name = getAccessName(ent.symbol);
if (currentStage != stage) {
preStage = currentStage;
currentStage = stage;
@@ -627,7 +657,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
TVarSlotMap::iterator iter = storageSlotMap[resourceKey].find(name);
if (iter != storageSlotMap[resourceKey].end()) {
// If interface resource be found, set it has location and this symbol's new location
- // equal the symbol's explicit location declarated in pre or next stage.
+ // equal the symbol's explicit location declaration in pre or next stage.
//
// vs: out vec4 a;
// fs: layout(..., location = 3,...) in vec4 a;
@@ -663,7 +693,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
- const TString& name = ent.symbol->getName();
+ const TString& name = getAccessName(ent.symbol);
// kick out of not doing this
if (! doAutoLocationMapping()) {
return ent.newLocation = -1;
@@ -706,7 +736,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
TVarSlotMap::iterator iter = slotMap.find(name);
if (iter != slotMap.end()) {
// If uniform resource be found, set it has location and this symbol's new location
- // equal the uniform's explicit location declarated in other stage.
+ // equal the uniform's explicit location declaration in other stage.
//
// vs: uniform vec4 a;
// fs: layout(..., location = 3,...) uniform vec4 a;
@@ -714,7 +744,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
location = iter->second;
}
if (! hasLocation) {
- // No explicit location declaraten in other stage.
+ // No explicit location declaration in other stage.
// So we should find a new slot for this uniform.
//
// vs: uniform vec4 a;
@@ -723,7 +753,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
storageSlotMap[resourceKey][name] = location;
}
} else {
- // the first uniform declarated in a program.
+ // the first uniform declaration in a program.
TVarSlotMap varSlotMap;
location = getFreeSlot(resourceKey, 0, size);
varSlotMap[name] = location;
@@ -734,8 +764,8 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
- const TString& name = ent.symbol->getName();
- // On OpenGL arrays of opaque types take a seperate binding for each element
+ const TString& name = getAccessName(ent.symbol);
+ // On OpenGL arrays of opaque types take a separate binding for each element
int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
TResourceType resource = getResourceType(type);
// don't need to handle uniform symbol, it will be handled in resolveUniformLocation
@@ -809,7 +839,7 @@ void TDefaultGlslIoResolver::endCollect(EShLanguage /*stage*/) {
void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
const TType& type = ent.symbol->getType();
- const TString& name = ent.symbol->getName();
+ const TString& name = getAccessName(ent.symbol);
TStorageQualifier storage = type.getQualifier().storage;
EShLanguage stage(EShLangCount);
switch (storage) {
@@ -831,6 +861,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
@@ -856,6 +887,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
@@ -867,7 +899,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
const TType& type = ent.symbol->getType();
- const TString& name = ent.symbol->getName();
+ const TString& name = getAccessName(ent.symbol);
int resource = getResourceType(type);
if (type.getQualifier().hasBinding()) {
TVarSlotMap& varSlotMap = resourceSlotMap[resource];
@@ -884,11 +916,19 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != binding) {
TString errorMsg = "Invalid binding: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
}
+const TString& TDefaultGlslIoResolver::getAccessName(const TIntermSymbol* symbol)
+{
+ return symbol->getBasicType() == EbtBlock ?
+ symbol->getType().getTypeName() :
+ symbol->getName();
+}
+
//TDefaultGlslIoResolver end
/*
@@ -1070,11 +1110,12 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSi
TVarGatherTraverser iter_binding_live(intermediate, false, inVarMap, outVarMap, uniformVarMap);
root->traverse(&iter_binding_all);
iter_binding_live.pushFunction(intermediate.getEntryPointMangledName().c_str());
- while (! iter_binding_live.functions.empty()) {
- TIntermNode* function = iter_binding_live.functions.back();
- iter_binding_live.functions.pop_back();
- function->traverse(&iter_binding_live);
+ while (! iter_binding_live.destinations.empty()) {
+ TIntermNode* destination = iter_binding_live.destinations.back();
+ iter_binding_live.destinations.pop_back();
+ destination->traverse(&iter_binding_live);
}
+
// sort entries by priority. see TVarEntryInfo::TOrderByPriority for info.
std::for_each(inVarMap.begin(), inVarMap.end(),
[&inVector](TVarLivePair p) { inVector.push_back(p); });
@@ -1158,18 +1199,19 @@ bool TGlslIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TIn
resolver = &defaultResolver;
}
resolver->addStage(stage);
- inVarMaps[stage] = new TVarLiveMap, outVarMaps[stage] = new TVarLiveMap(), uniformVarMap[stage] = new TVarLiveMap();
+ inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap();
TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage],
*uniformVarMap[stage]);
TVarGatherTraverser iter_binding_live(intermediate, false, *inVarMaps[stage], *outVarMaps[stage],
*uniformVarMap[stage]);
root->traverse(&iter_binding_all);
iter_binding_live.pushFunction(intermediate.getEntryPointMangledName().c_str());
- while (! iter_binding_live.functions.empty()) {
- TIntermNode* function = iter_binding_live.functions.back();
- iter_binding_live.functions.pop_back();
- function->traverse(&iter_binding_live);
+ while (! iter_binding_live.destinations.empty()) {
+ TIntermNode* destination = iter_binding_live.destinations.back();
+ iter_binding_live.destinations.pop_back();
+ destination->traverse(&iter_binding_live);
}
+
TNotifyInOutAdaptor inOutNotify(stage, *resolver);
TNotifyUniformAdaptor uniformNotify(stage, *resolver);
// Resolve current stage input symbol location with previous stage output here,
@@ -1246,4 +1288,4 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
} // end namespace glslang
-#endif // GLSLANG_WEB
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
index 684e88d571..674132786e 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
@@ -33,7 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#ifndef _IOMAPPER_INCLUDED
#define _IOMAPPER_INCLUDED
@@ -129,6 +129,7 @@ public:
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
TSlotSetMap slots;
+ bool hasError = false;
protected:
TDefaultIoResolverBase(TDefaultIoResolverBase&);
@@ -185,7 +186,7 @@ protected:
}
};
-// Defaulf I/O resolver for OpenGL
+// Default I/O resolver for OpenGL
struct TDefaultGlslIoResolver : public TDefaultIoResolverBase {
public:
typedef std::map<TString, int> TVarSlotMap; // <resourceName, location/binding>
@@ -202,6 +203,7 @@ public:
void endCollect(EShLanguage) override;
void reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) override;
void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) override;
+ const TString& getAccessName(const TIntermSymbol*);
// in/out symbol and uniform symbol are stored in the same resourceSlotMap, the storage key is used to identify each type of symbol.
// We use stage and storage qualifier to construct a storage key. it can help us identify the same storage resource used in different stage.
// if a resource is a program resource and we don't need know it usage stage, we can use same stage to build storage key.
@@ -237,12 +239,13 @@ typedef std::map<TString, TVarEntryInfo> TVarLiveMap;
// In the future, if the vc++ compiler can handle such a situation,
// this part of the code will be removed.
struct TVarLivePair : std::pair<const TString, TVarEntryInfo> {
- TVarLivePair(std::pair<const TString, TVarEntryInfo>& _Right) : pair(_Right.first, _Right.second) {}
+ TVarLivePair(const std::pair<const TString, TVarEntryInfo>& _Right) : pair(_Right.first, _Right.second) {}
TVarLivePair& operator=(const TVarLivePair& _Right) {
const_cast<TString&>(first) = _Right.first;
second = _Right.second;
return (*this);
}
+ TVarLivePair(const TVarLivePair& src) : pair(src) { }
};
typedef std::vector<TVarLivePair> TVarLiveVector;
@@ -260,10 +263,10 @@ public:
class TGlslIoMapper : public TIoMapper {
public:
TGlslIoMapper() {
- memset(inVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
- memset(outVarMaps, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
- memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * (EShLangCount + 1));
- memset(intermediates, 0, sizeof(TIntermediate*) * (EShLangCount + 1));
+ memset(inVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
+ memset(outVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount);
+ memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * EShLangCount);
+ memset(intermediates, 0, sizeof(TIntermediate*) * EShLangCount);
}
virtual ~TGlslIoMapper() {
for (size_t stage = 0; stage < EShLangCount; stage++) {
@@ -296,4 +299,4 @@ public:
#endif // _IOMAPPER_INCLUDED
-#endif // GLSLANG_WEB
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
diff --git a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
index fe51ec93ff..a8e031bc6f 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
@@ -82,7 +82,7 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message)
//
void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
{
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
mergeCallGraphs(infoSink, unit);
mergeModes(infoSink, unit);
mergeTrees(infoSink, unit);
@@ -104,7 +104,7 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
}
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#define MERGE_MAX(member) member = std::max(member, unit.member)
#define MERGE_TRUE(member) if (unit.member) member = unit.member;
@@ -138,7 +138,11 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
MERGE_MAX(spvVersion.openGl);
numErrors += unit.getNumErrors();
- numPushConstants += unit.numPushConstants;
+ // Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant
+ // is the same for all units.
+ if (numPushConstants > 1 || unit.numPushConstants > 1)
+ error(infoSink, "Only one push_constant block is allowed per stage");
+ numPushConstants = std::min(numPushConstants + unit.numPushConstants, 1);
if (unit.invocations != TQualifier::layoutNotSet) {
if (invocations == TQualifier::layoutNotSet)
@@ -149,7 +153,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
if (vertices == TQualifier::layoutNotSet)
vertices = unit.vertices;
- else if (vertices != unit.vertices) {
+ else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) {
if (language == EShLangGeometry || language == EShLangMeshNV)
error(infoSink, "Contradictory layout max_vertices values");
else if (language == EShLangTessControl)
@@ -168,12 +172,12 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
if (inputPrimitive == ElgNone)
inputPrimitive = unit.inputPrimitive;
- else if (inputPrimitive != unit.inputPrimitive)
+ else if (unit.inputPrimitive != ElgNone && inputPrimitive != unit.inputPrimitive)
error(infoSink, "Contradictory input layout primitives");
if (outputPrimitive == ElgNone)
outputPrimitive = unit.outputPrimitive;
- else if (outputPrimitive != unit.outputPrimitive)
+ else if (unit.outputPrimitive != ElgNone && outputPrimitive != unit.outputPrimitive)
error(infoSink, "Contradictory output layout primitives");
if (originUpperLeft != unit.originUpperLeft || pixelCenterInteger != unit.pixelCenterInteger)
@@ -286,7 +290,7 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
}
// Getting this far means we have two existing trees to merge...
- numShaderRecordNVBlocks += unit.numShaderRecordNVBlocks;
+ numShaderRecordBlocks += unit.numShaderRecordBlocks;
numTaskNVBlocks += unit.numTaskNVBlocks;
// Get the top-level globals of each unit
@@ -299,10 +303,10 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
// Map by global name to unique ID to rationalize the same object having
// differing IDs in different trees.
- TMap<TString, int> idMap;
+ TIdMaps idMaps;
int maxId;
- seedIdMap(idMap, maxId);
- remapIds(idMap, maxId + 1, unit);
+ seedIdMap(idMaps, maxId);
+ remapIds(idMaps, maxId + 1, unit);
mergeBodies(infoSink, globals, unitGlobals);
mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
@@ -311,27 +315,40 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
#endif
+static const TString& getNameForIdMap(TIntermSymbol* symbol)
+{
+ TShaderInterface si = symbol->getType().getShaderInterface();
+ if (si == EsiNone)
+ return symbol->getName();
+ else
+ return symbol->getType().getTypeName();
+}
+
+
+
// Traverser that seeds an ID map with all built-ins, and tracks the
// maximum ID used.
// (It would be nice to put this in a function, but that causes warnings
// on having no bodies for the copy-constructor/operator=.)
class TBuiltInIdTraverser : public TIntermTraverser {
public:
- TBuiltInIdTraverser(TMap<TString, int>& idMap) : idMap(idMap), maxId(0) { }
+ TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), maxId(0) { }
// If it's a built in, add it to the map.
// Track the max ID.
virtual void visitSymbol(TIntermSymbol* symbol)
{
const TQualifier& qualifier = symbol->getType().getQualifier();
- if (qualifier.builtIn != EbvNone)
- idMap[symbol->getName()] = symbol->getId();
+ if (qualifier.builtIn != EbvNone) {
+ TShaderInterface si = symbol->getType().getShaderInterface();
+ idMaps[si][getNameForIdMap(symbol)] = symbol->getId();
+ }
maxId = std::max(maxId, symbol->getId());
}
int getMaxId() const { return maxId; }
protected:
TBuiltInIdTraverser(TBuiltInIdTraverser&);
TBuiltInIdTraverser& operator=(TBuiltInIdTraverser&);
- TMap<TString, int>& idMap;
+ TIdMaps& idMaps;
int maxId;
};
@@ -340,31 +357,33 @@ protected:
// on having no bodies for the copy-constructor/operator=.)
class TUserIdTraverser : public TIntermTraverser {
public:
- TUserIdTraverser(TMap<TString, int>& idMap) : idMap(idMap) { }
+ TUserIdTraverser(TIdMaps& idMaps) : idMaps(idMaps) { }
// If its a non-built-in global, add it to the map.
virtual void visitSymbol(TIntermSymbol* symbol)
{
const TQualifier& qualifier = symbol->getType().getQualifier();
- if (qualifier.builtIn == EbvNone)
- idMap[symbol->getName()] = symbol->getId();
+ if (qualifier.builtIn == EbvNone) {
+ TShaderInterface si = symbol->getType().getShaderInterface();
+ idMaps[si][getNameForIdMap(symbol)] = symbol->getId();
+ }
}
protected:
TUserIdTraverser(TUserIdTraverser&);
TUserIdTraverser& operator=(TUserIdTraverser&);
- TMap<TString, int>& idMap; // over biggest id
+ TIdMaps& idMaps; // over biggest id
};
// Initialize the the ID map with what we know of 'this' AST.
-void TIntermediate::seedIdMap(TMap<TString, int>& idMap, int& maxId)
+void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId)
{
// all built-ins everywhere need to align on IDs and contribute to the max ID
- TBuiltInIdTraverser builtInIdTraverser(idMap);
+ TBuiltInIdTraverser builtInIdTraverser(idMaps);
treeRoot->traverse(&builtInIdTraverser);
maxId = builtInIdTraverser.getMaxId();
// user variables in the linker object list need to align on ids
- TUserIdTraverser userIdTraverser(idMap);
+ TUserIdTraverser userIdTraverser(idMaps);
findLinkerObjects()->traverse(&userIdTraverser);
}
@@ -373,7 +392,7 @@ void TIntermediate::seedIdMap(TMap<TString, int>& idMap, int& maxId)
// on having no bodies for the copy-constructor/operator=.)
class TRemapIdTraverser : public TIntermTraverser {
public:
- TRemapIdTraverser(const TMap<TString, int>& idMap, int idShift) : idMap(idMap), idShift(idShift) { }
+ TRemapIdTraverser(const TIdMaps& idMaps, int idShift) : idMaps(idMaps), idShift(idShift) { }
// Do the mapping:
// - if the same symbol, adopt the 'this' ID
// - otherwise, ensure a unique ID by shifting to a new space
@@ -382,8 +401,9 @@ public:
const TQualifier& qualifier = symbol->getType().getQualifier();
bool remapped = false;
if (qualifier.isLinkable() || qualifier.builtIn != EbvNone) {
- auto it = idMap.find(symbol->getName());
- if (it != idMap.end()) {
+ TShaderInterface si = symbol->getType().getShaderInterface();
+ auto it = idMaps[si].find(getNameForIdMap(symbol));
+ if (it != idMaps[si].end()) {
symbol->changeId(it->second);
remapped = true;
}
@@ -394,14 +414,14 @@ public:
protected:
TRemapIdTraverser(TRemapIdTraverser&);
TRemapIdTraverser& operator=(TRemapIdTraverser&);
- const TMap<TString, int>& idMap;
+ const TIdMaps& idMaps;
int idShift;
};
-void TIntermediate::remapIds(const TMap<TString, int>& idMap, int idShift, TIntermediate& unit)
+void TIntermediate::remapIds(const TIdMaps& idMaps, int idShift, TIntermediate& unit)
{
// Remap all IDs to either share or be unique, as dictated by the idMap and idShift.
- TRemapIdTraverser idTraverser(idMap, idShift);
+ TRemapIdTraverser idTraverser(idMaps, idShift);
unit.getTreeRoot()->traverse(&idTraverser);
}
@@ -443,7 +463,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
assert(symbol && unitSymbol);
- if (symbol->getName() == unitSymbol->getName()) {
+
+ bool isSameSymbol = false;
+ // If they are both blocks in the same shader interface,
+ // match by the block-name, not the identifier name.
+ if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) {
+ if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) {
+ isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName();
+ }
+ }
+ else if (symbol->getName() == unitSymbol->getName())
+ isSameSymbol = true;
+
+ if (isSameSymbol) {
// filter out copy
merge = false;
@@ -462,6 +494,9 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
// Check for consistent types/qualification/initializers etc.
mergeErrorCheck(infoSink, *symbol, *unitSymbol, false);
}
+ // If different symbols, verify they arn't push_constant since there can only be one per stage
+ else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant())
+ error(infoSink, "Only one push_constant block is allowed per stage");
}
if (merge)
linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
@@ -498,7 +533,7 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
//
void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
{
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
bool writeTypeComparison = false;
// Types have to match
@@ -520,6 +555,22 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
writeTypeComparison = true;
}
+ // Uniform and buffer blocks must either both have an instance name, or
+ // must both be anonymous. The names don't need to match though.
+ if (symbol.getQualifier().isUniformOrBuffer() &&
+ (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) {
+ error(infoSink, "Matched Uniform or Storage blocks must all be anonymous,"
+ " or all be named:");
+ writeTypeComparison = true;
+ }
+
+ if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage &&
+ (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) ||
+ (!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) {
+ warn(infoSink, "Matched shader interfaces are using different instance names.");
+ writeTypeComparison = true;
+ }
+
// Precision...
if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
error(infoSink, "Precision qualifiers must match:");
@@ -555,6 +606,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent ||
symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent ||
symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent ||
+ symbol.getQualifier().shadercallcoherent!= unitSymbol.getQualifier().shadercallcoherent ||
symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate ||
symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil ||
symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict ||
@@ -589,9 +641,13 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
}
}
- if (writeTypeComparison)
- infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus \"" <<
- unitSymbol.getType().getCompleteString() << "\"\n";
+ if (writeTypeComparison) {
+ infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus ";
+ if (symbol.getName() != unitSymbol.getName())
+ infoSink.info << unitSymbol.getName() << ": ";
+
+ infoSink.info << "\"" << unitSymbol.getType().getCompleteString() << "\"\n";
+ }
#endif
}
@@ -721,13 +777,13 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
break;
case EShLangCompute:
break;
- case EShLangRayGenNV:
- case EShLangIntersectNV:
- case EShLangAnyHitNV:
- case EShLangClosestHitNV:
- case EShLangMissNV:
- case EShLangCallableNV:
- if (numShaderRecordNVBlocks > 1)
+ case EShLangRayGen:
+ case EShLangIntersect:
+ case EShLangAnyHit:
+ case EShLangClosestHit:
+ case EShLangMiss:
+ case EShLangCallable:
+ if (numShaderRecordBlocks > 1)
error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage");
break;
case EShLangMeshNV:
@@ -1306,9 +1362,9 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
// that component's size. Aggregate types are flattened down to the component
// level to get this sequence of components."
- if (type.isArray()) {
+ if (type.isSizedArray()) {
// TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
- assert(type.isSizedArray());
+ // Unsized array use to xfb should be a compile error.
TType elementType(type, 0);
return type.getOuterArraySize() * computeTypeXfbSize(elementType, contains64BitType, contains16BitType, contains16BitType);
}
@@ -1494,7 +1550,9 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, T
RoundToPow2(size, alignment);
stride = size; // uses full matrix size for stride of an array of matrices (not quite what rule 6/8, but what's expected)
// uses the assumption for rule 10 in the comment above
- size = stride * type.getOuterArraySize();
+ // use one element to represent the last member of SSBO which is unsized array
+ int arraySize = (type.isUnsizedArray() && (type.getOuterArraySize() == 0)) ? 1 : type.getOuterArraySize();
+ size = stride * arraySize;
return alignment;
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
index 683290af74..3cdc1f10cf 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
@@ -162,7 +162,10 @@ struct TXfbBuffer {
#endif
// Track a set of strings describing how the module was processed.
-// Using the form:
+// This includes command line options, transforms, etc., ideally inclusive enough
+// to reproduce the steps used to transform the input source to the output.
+// E.g., see SPIR-V OpModuleProcessed.
+// Each "process" or "transform" uses is expressed in the form:
// process arg0 arg1 arg2 ...
// process arg0 arg1 arg2 ...
// where everything is textual, and there can be zero or more arguments
@@ -222,6 +225,40 @@ enum ComputeDerivativeMode {
LayoutDerivativeGroupLinear, // derivative_group_linearNV
};
+class TIdMaps {
+public:
+ TMap<TString, int>& operator[](int i) { return maps[i]; }
+ const TMap<TString, int>& operator[](int i) const { return maps[i]; }
+private:
+ TMap<TString, int> maps[EsiCount];
+};
+
+class TNumericFeatures {
+public:
+ TNumericFeatures() : features(0) { }
+ TNumericFeatures(const TNumericFeatures&) = delete;
+ TNumericFeatures& operator=(const TNumericFeatures&) = delete;
+ typedef enum : unsigned int {
+ shader_explicit_arithmetic_types = 1 << 0,
+ shader_explicit_arithmetic_types_int8 = 1 << 1,
+ shader_explicit_arithmetic_types_int16 = 1 << 2,
+ shader_explicit_arithmetic_types_int32 = 1 << 3,
+ shader_explicit_arithmetic_types_int64 = 1 << 4,
+ shader_explicit_arithmetic_types_float16 = 1 << 5,
+ shader_explicit_arithmetic_types_float32 = 1 << 6,
+ shader_explicit_arithmetic_types_float64 = 1 << 7,
+ shader_implicit_conversions = 1 << 8,
+ gpu_shader_fp64 = 1 << 9,
+ gpu_shader_int16 = 1 << 10,
+ gpu_shader_half_float = 1 << 11,
+ } feature;
+ void insert(feature f) { features |= f; }
+ void erase(feature f) { features &= ~f; }
+ bool contains(feature f) const { return (features & f) != 0; }
+private:
+ unsigned int features;
+};
+
//
// Set of helper functions to help parse and build the tree.
//
@@ -229,7 +266,10 @@ class TIntermediate {
public:
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
language(l),
- profile(p), version(v), treeRoot(0),
+#ifndef GLSLANG_ANGLE
+ profile(p), version(v),
+#endif
+ treeRoot(0),
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
invertY(false),
useStorageBuffer(false),
@@ -244,15 +284,16 @@ public:
inputPrimitive(ElgNone), outputPrimitive(ElgNone),
pixelCenterInteger(false), originUpperLeft(false),
vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
- postDepthCoverage(false), depthLayout(EldNone),
+ postDepthCoverage(false), depthLayout(EldNone),
hlslFunctionality1(false),
blendEquations(0), xfbMode(false), multiStream(false),
layoutOverrideCoverage(false),
geoPassthroughEXT(false),
- numShaderRecordNVBlocks(0),
+ numShaderRecordBlocks(0),
computeDerivativeMode(LayoutDerivativeNone),
primitives(TQualifier::layoutNotSet),
numTaskNVBlocks(0),
+ layoutPrimitiveCulling(false),
autoMapBindings(false),
autoMapLocations(false),
flattenUniformArrays(false),
@@ -282,9 +323,20 @@ public:
#endif
}
- void setVersion(int v) { version = v; }
+ void setVersion(int v)
+ {
+#ifndef GLSLANG_ANGLE
+ version = v;
+#endif
+ }
+ void setProfile(EProfile p)
+ {
+#ifndef GLSLANG_ANGLE
+ profile = p;
+#endif
+ }
+
int getVersion() const { return version; }
- void setProfile(EProfile p) { profile = p; }
EProfile getProfile() const { return profile; }
void setSpv(const SpvVersion& s)
{
@@ -380,7 +432,7 @@ public:
void setSource(EShSource s) { source = s; }
EShSource getSource() const { return source; }
#else
- void setSource(EShSource s) { assert(s == EShSourceGlsl); }
+ void setSource(EShSource s) { assert(s == EShSourceGlsl); (void)s; }
EShSource getSource() const { return EShSourceGlsl; }
#endif
@@ -391,15 +443,15 @@ public:
TIntermSymbol* addSymbol(const TType&, const TSourceLoc&);
TIntermSymbol* addSymbol(const TIntermSymbol&);
TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*);
- std::tuple<TIntermTyped*, TIntermTyped*> addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1);
+ std::tuple<TIntermTyped*, TIntermTyped*> addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1);
TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*);
TIntermTyped* addConversion(TBasicType convertTo, TIntermTyped* node) const;
void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode);
TIntermTyped* addShapeConversion(const TType&, TIntermTyped*);
- TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, TSourceLoc);
- TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc);
- TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc);
- TIntermTyped* addUnaryMath(TOperator, TIntermTyped* child, TSourceLoc);
+ TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&);
+ TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&);
+ TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, const TSourceLoc&);
+ TIntermTyped* addUnaryMath(TOperator, TIntermTyped* child, const TSourceLoc&);
TIntermTyped* addBuiltInFunctionCall(const TSourceLoc& line, TOperator, bool unary, TIntermNode*, const TType& returnType);
bool canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op = EOpNull) const;
bool isIntegralPromotion(TBasicType from, TBasicType to) const;
@@ -413,7 +465,7 @@ public:
TIntermAggregate* makeAggregate(TIntermNode* node);
TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&);
TIntermAggregate* makeAggregate(const TSourceLoc&);
- TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, TSourceLoc);
+ TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, const TSourceLoc&);
bool areAllChildConst(TIntermAggregate* aggrNode);
TIntermSelection* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&);
TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&);
@@ -442,10 +494,11 @@ public:
// Low level functions to add nodes (no conversions or other higher level transformations)
// If a type is provided, the node's type will be set to it.
- TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc) const;
- TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc, const TType&) const;
- TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc) const;
- TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc, const TType&) const;
+ TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&) const;
+ TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&,
+ const TType&) const;
+ TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc&) const;
+ TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc&, const TType&) const;
// Constant folding (in Constant.cpp)
TIntermTyped* fold(TIntermAggregate* aggrNode);
@@ -460,11 +513,7 @@ public:
void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
- void setUseStorageBuffer()
- {
- useStorageBuffer = true;
- processes.addProcess("use-storage-buffer");
- }
+ void setUseStorageBuffer() { useStorageBuffer = true; }
bool usingStorageBuffer() const { return useStorageBuffer; }
void setDepthReplacing() { depthReplacing = true; }
bool isDepthReplacing() const { return depthReplacing; }
@@ -503,7 +552,7 @@ public:
bool getAutoMapBindings() const { return false; }
bool getAutoMapLocations() const { return false; }
int getNumPushConstants() const { return 0; }
- void addShaderRecordNVCount() { }
+ void addShaderRecordCount() { }
void addTaskNVCount() { }
void setUseVulkanMemoryModel() { }
bool usingVulkanMemoryModel() const { return false; }
@@ -583,7 +632,7 @@ public:
processes.addProcess("flatten-uniform-arrays");
}
bool getFlattenUniformArrays() const { return flattenUniformArrays; }
-#endif
+#endif
void setNoStorageFormat(bool b)
{
useUnknownFormat = b;
@@ -620,7 +669,7 @@ public:
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
int getNumPushConstants() const { return numPushConstants; }
- void addShaderRecordNVCount() { ++numShaderRecordNVBlocks; }
+ void addShaderRecordCount() { ++numShaderRecordBlocks; }
void addTaskNVCount() { ++numTaskNVBlocks; }
bool setInvocations(int i)
@@ -723,6 +772,8 @@ public:
void setLayoutDerivativeMode(ComputeDerivativeMode mode) { computeDerivativeMode = mode; }
bool hasLayoutDerivativeModeNone() const { return computeDerivativeMode != LayoutDerivativeNone; }
ComputeDerivativeMode getLayoutDerivativeModeNone() const { return computeDerivativeMode; }
+ void setLayoutPrimitiveCulling() { layoutPrimitiveCulling = true; }
+ bool getLayoutPrimitiveCulling() const { return layoutPrimitiveCulling; }
bool setPrimitives(int m)
{
if (primitives != TQualifier::layoutNotSet)
@@ -834,22 +885,25 @@ public:
bool getArithemeticInt8Enabled() const { return false; }
bool getArithemeticInt16Enabled() const { return false; }
bool getArithemeticFloat16Enabled() const { return false; }
+ void updateNumericFeature(TNumericFeatures::feature f, bool on) { }
#else
bool getArithemeticInt8Enabled() const {
- return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8);
+ return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8);
}
bool getArithemeticInt16Enabled() const {
- return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_AMD_gpu_shader_int16) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16);
+ return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::gpu_shader_int16) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16);
}
bool getArithemeticFloat16Enabled() const {
- return extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) ||
- extensionRequested(E_GL_AMD_gpu_shader_half_float) ||
- extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16);
+ return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
+ numericFeatures.contains(TNumericFeatures::gpu_shader_half_float) ||
+ numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16);
}
+ void updateNumericFeature(TNumericFeatures::feature f, bool on)
+ { on ? numericFeatures.insert(f) : numericFeatures.erase(f); }
#endif
protected:
@@ -859,8 +913,8 @@ protected:
void mergeCallGraphs(TInfoSink&, TIntermediate&);
void mergeModes(TInfoSink&, TIntermediate&);
void mergeTrees(TInfoSink&, TIntermediate&);
- void seedIdMap(TMap<TString, int>& idMap, int& maxId);
- void remapIds(const TMap<TString, int>& idMap, int idShift, TIntermediate&);
+ void seedIdMap(TIdMaps& idMaps, int& maxId);
+ void remapIds(const TIdMaps& idMaps, int idShift, TIntermediate&);
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
void mergeImplicitArraySizes(TType&, const TType&);
@@ -881,17 +935,7 @@ protected:
bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&);
void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root);
bool isConversionAllowed(TOperator op, TIntermTyped* node) const;
- std::tuple<TBasicType, TBasicType> getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const;
-
- // JohnK: I think this function should go away.
- // This data structure is just a log to pass on to back ends.
- // Versioning and extensions are handled in Version.cpp, with a rich
- // set of functions for querying stages, versions, extension enable/disabled, etc.
-#ifdef GLSLANG_WEB
- bool extensionRequested(const char *extension) const { return false; }
-#else
- bool extensionRequested(const char *extension) const {return requestedExtensions.find(extension) != requestedExtensions.end();}
-#endif
+ std::tuple<TBasicType, TBasicType> getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const;
static const char* getResourceName(TResourceType);
@@ -901,8 +945,13 @@ protected:
typedef std::list<TCall> TGraph;
TGraph callGraph;
+#ifdef GLSLANG_ANGLE
+ const EProfile profile = ECoreProfile;
+ const int version = 450;
+#else
EProfile profile; // source profile
int version; // source version
+#endif
SpvVersion spvVersion;
TIntermNode* treeRoot;
std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
@@ -945,10 +994,11 @@ protected:
bool multiStream;
bool layoutOverrideCoverage;
bool geoPassthroughEXT;
- int numShaderRecordNVBlocks;
+ int numShaderRecordBlocks;
ComputeDerivativeMode computeDerivativeMode;
int primitives;
int numTaskNVBlocks;
+ bool layoutPrimitiveCulling;
// Base shift values
std::array<unsigned int, EResCount> shiftBinding;
@@ -975,6 +1025,7 @@ protected:
std::unordered_map<std::string, int> uniformLocationOverrides;
int uniformLocationBase;
+ TNumericFeatures numericFeatures;
#endif
std::unordered_set<int> usedConstantId; // specialization constant ids used
diff --git a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
index 1a8e6d9987..7c04743ba6 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
@@ -165,17 +165,27 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
}
}
} else {
- // matrix from vector
+ // matrix from vector or scalar
int count = 0;
const int startIndex = index;
int nodeComps = node->getType().computeNumComponents();
for (int i = startIndex; i < endIndex; i++) {
if (i >= instanceSize)
return;
- if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
+ if (nodeComps == 1) {
+ // If there is a single scalar parameter to a matrix
+ // constructor, it is used to initialize all the
+ // components on the matrix's diagonal, with the
+ // remaining components initialized to 0.0.
+ if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
+ leftUnionArray[i] = rightUnionArray[count];
+ else
+ leftUnionArray[i].setDConst(0.0);
+ } else {
+ // construct the matrix in column-major order, from
+ // the components provided, in order
leftUnionArray[i] = rightUnionArray[count];
- else
- leftUnionArray[i].setDConst(0.0);
+ }
index++;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h b/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
index aa1964fc2e..7248354e4b 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/parseVersions.h
@@ -58,7 +58,7 @@ public:
const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
bool forwardCompatible, EShMessages messages)
:
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
forwardCompatible(forwardCompatible),
profile(profile),
#endif
@@ -101,6 +101,7 @@ public:
void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { }
void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { }
void checkExtensionStage(const TSourceLoc&, const char* const extension) { }
+ void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior) { }
void fullIntegerCheck(const TSourceLoc&, const char* op) { }
void doubleCheck(const TSourceLoc&, const char* op) { }
bool float16Arithmetic() { return false; }
@@ -116,8 +117,13 @@ public:
bool suppressWarnings() const { return true; }
bool isForwardCompatible() const { return false; }
#else
+#ifdef GLSLANG_ANGLE
+ const bool forwardCompatible = true;
+ const EProfile profile = ECoreProfile;
+#else
bool forwardCompatible; // true if errors are to be given for use of deprecated features
EProfile profile; // the declared profile in the shader (core by default)
+#endif
bool isEsProfile() const { return profile == EEsProfile; }
void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
@@ -139,6 +145,7 @@ public:
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[],
const char* featureDesc);
virtual void checkExtensionStage(const TSourceLoc&, const char* const extension);
+ virtual void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior);
virtual void fullIntegerCheck(const TSourceLoc&, const char* op);
virtual void unimplemented(const TSourceLoc&, const char* featureDesc);
@@ -170,6 +177,7 @@ public:
virtual void vulkanRemoved(const TSourceLoc&, const char* op);
virtual void requireVulkan(const TSourceLoc&, const char* op);
virtual void requireSpv(const TSourceLoc&, const char* op);
+ virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version);
#if defined(GLSLANG_WEB) && !defined(GLSLANG_WEB_DEVEL)
@@ -221,7 +229,8 @@ public:
TIntermediate& intermediate; // helper for making and hooking up pieces of the parse tree
protected:
- TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
+ TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is
+ TMap<TString, unsigned int> extensionMinSpv; // for each extension string, store minimum spirv required
EShMessages messages; // errors/warnings/rule-sets
int numErrors; // number of compile-time errors encountered
TInputScanner* currentScanner;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
index d7ff485c0a..a0a626f9b7 100755..100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
@@ -422,10 +422,10 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo
if (! parseContext.isReadingHLSL() && isMacroInput()) {
if (parseContext.relaxedErrors())
parseContext.ppWarn(ppToken->loc, "nonportable when expanded from macros for preprocessor expression",
- "defined", "");
+ "defined", "");
else
parseContext.ppError(ppToken->loc, "cannot use in preprocessor expression when expanded from macros",
- "defined", "");
+ "defined", "");
}
bool needclose = 0;
token = scanToken(ppToken);
@@ -621,14 +621,25 @@ int TPpContext::CPPinclude(TPpToken* ppToken)
{
const TSourceLoc directiveLoc = ppToken->loc;
bool startWithLocalSearch = true; // to additionally include the extra "" paths
- int token = scanToken(ppToken);
+ int token;
- // handle <header-name>-style #include
- if (token == '<') {
+ // Find the first non-whitespace char after #include
+ int ch = getChar();
+ while (ch == ' ' || ch == '\t') {
+ ch = getChar();
+ }
+ if (ch == '<') {
+ // <header-name> style
startWithLocalSearch = false;
token = scanHeaderName(ppToken, '>');
+ } else if (ch == '"') {
+ // "header-name" style
+ token = scanHeaderName(ppToken, '"');
+ } else {
+ // unexpected, get the full token to generate the error
+ ungetChar();
+ token = scanToken(ppToken);
}
- // otherwise ppToken already has the header name and it was "header-name" style
if (token != PpAtomConstString) {
parseContext.ppError(directiveLoc, "must be followed by a header name", "#include", "");
@@ -711,7 +722,9 @@ int TPpContext::CPPline(TPpToken* ppToken)
const char* sourceName = nullptr; // Optional source file name.
bool lineErr = false;
bool fileErr = false;
+ disableEscapeSequences = true;
token = eval(token, MIN_PRECEDENCE, false, lineRes, lineErr, ppToken);
+ disableEscapeSequences = false;
if (! lineErr) {
lineToken = lineRes;
if (token == '\n')
@@ -754,7 +767,9 @@ int TPpContext::CPPline(TPpToken* ppToken)
// Handle #error
int TPpContext::CPPerror(TPpToken* ppToken)
{
+ disableEscapeSequences = true;
int token = scanToken(ppToken);
+ disableEscapeSequences = false;
std::string message;
TSourceLoc loc = ppToken->loc;
@@ -1169,7 +1184,9 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
int macroAtom = atomStrings.getAtom(ppToken->name);
switch (macroAtom) {
case PpAtomLineMacro:
- ppToken->ival = parseContext.getCurrentLoc().line;
+ // Arguments which are macro have been replaced in the first stage.
+ if (ppToken->ival == 0)
+ ppToken->ival = parseContext.getCurrentLoc().line;
snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival);
UngetToken(PpAtomConstInt, ppToken);
return MacroExpandStarted;
@@ -1270,6 +1287,11 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
nestStack.push_back('}');
else if (nestStack.size() > 0 && token == nestStack.back())
nestStack.pop_back();
+
+ //Macro replacement list is expanded in the last stage.
+ if (atomStrings.getAtom(ppToken->name) == PpAtomLineMacro)
+ ppToken->ival = parseContext.getCurrentLoc().line;
+
in->args[arg]->putToken(token, ppToken);
tokenRecorded = true;
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
index cc003a8d12..1363ce2be0 100755..100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
@@ -87,7 +87,8 @@ namespace glslang {
TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) :
preamble(0), strings(0), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false),
rootFileName(rootFileName),
- currentSourceFile(rootFileName)
+ currentSourceFile(rootFileName),
+ disableEscapeSequences(false)
{
ifdepth = 0;
for (elsetracker = 0; elsetracker < maxIfNesting; elsetracker++)
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
index 8470e172a2..714b5eadba 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
@@ -105,13 +105,13 @@ public:
}
// Used for comparing macro definitions, so checks what is relevant for that.
- bool operator==(const TPpToken& right)
+ bool operator==(const TPpToken& right) const
{
return space == right.space &&
ival == right.ival && dval == right.dval && i64val == right.i64val &&
strncmp(name, right.name, MaxTokenLength) == 0;
}
- bool operator!=(const TPpToken& right) { return ! operator==(right); }
+ bool operator!=(const TPpToken& right) const { return ! operator==(right); }
TSourceLoc loc;
// True if a space (for white space or a removed comment) should also be
@@ -695,6 +695,7 @@ protected:
std::string currentSourceFile;
std::istringstream strtodStream;
+ bool disableEscapeSequences;
};
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
index c293af3c1e..e0f44f8b4f 100755..100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
@@ -1026,12 +1026,80 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
case '\'':
return pp->characterLiteral(ppToken);
case '"':
- // TODO: If this gets enhanced to handle escape sequences, or
- // anything that is different than what #include needs, then
- // #include needs to use scanHeaderName() for this.
+ // #include uses scanHeaderName() to ignore these escape sequences.
ch = getch();
while (ch != '"' && ch != '\n' && ch != EndOfInput) {
if (len < MaxTokenLength) {
+ if (ch == '\\' && !pp->disableEscapeSequences) {
+ int nextCh = getch();
+ switch (nextCh) {
+ case '\'': ch = 0x27; break;
+ case '"': ch = 0x22; break;
+ case '?': ch = 0x3f; break;
+ case '\\': ch = 0x5c; break;
+ case 'a': ch = 0x07; break;
+ case 'b': ch = 0x08; break;
+ case 'f': ch = 0x0c; break;
+ case 'n': ch = 0x0a; break;
+ case 'r': ch = 0x0d; break;
+ case 't': ch = 0x09; break;
+ case 'v': ch = 0x0b; break;
+ case 'x':
+ // Hex value, arbitrary number of characters. Terminated by the first
+ // non-hex digit
+ {
+ int numDigits = 0;
+ ch = 0;
+ while (true) {
+ nextCh = getch();
+ if (nextCh >= '0' && nextCh <= '9')
+ nextCh -= '0';
+ else if (nextCh >= 'A' && nextCh <= 'F')
+ nextCh -= 'A' - 10;
+ else if (nextCh >= 'a' && nextCh <= 'f')
+ nextCh -= 'a' - 10;
+ else {
+ ungetch();
+ break;
+ }
+ numDigits++;
+ ch = ch * 0x10 + nextCh;
+ }
+ if (numDigits == 0) {
+ pp->parseContext.ppError(ppToken->loc, "Expected hex value in escape sequence", "string", "");
+ }
+ break;
+ }
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ // Octal value, up to three octal digits
+ {
+ int numDigits = 1;
+ ch = nextCh - '0';
+ while (numDigits < 3) {
+ nextCh = getch();
+ if (nextCh >= '0' && nextCh <= '7')
+ nextCh -= '0';
+ else {
+ ungetch();
+ break;
+ }
+ numDigits++;
+ ch = ch * 8 + nextCh;
+ }
+ break;
+ }
+ default:
+ pp->parseContext.ppError(ppToken->loc, "Invalid escape sequence", "string", "");
+ break;
+ }
+ }
ppToken->name[len] = (char)ch;
len++;
ch = getch();
@@ -1120,10 +1188,12 @@ int TPpContext::tokenize(TPpToken& ppToken)
continue;
break;
case PpAtomConstString:
+ // HLSL allows string literals.
+ // GLSL allows string literals with GL_EXT_debug_printf.
if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) {
- // HLSL allows string literals.
- parseContext.ppError(ppToken.loc, "string literals not supported", "\"\"", "");
- continue;
+ parseContext.requireExtensions(ppToken.loc, 1, &E_GL_EXT_debug_printf, "string literal");
+ if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf))
+ continue;
}
break;
case '\'':
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
index 7ed58703f2..7ed58703f2 100755..100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
diff --git a/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp b/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
index 83a3230f51..9def592baf 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
@@ -867,4 +867,4 @@ void PropagateNoContraction(const glslang::TIntermediate& intermediate)
}
};
-#endif // GLSLANG_WEB \ No newline at end of file
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
index b09367113c..0aabf37fba 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
@@ -33,7 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#include "../Include/Common.h"
#include "reflection.h"
@@ -77,10 +77,10 @@ namespace glslang {
// This is in the glslang namespace directly so it can be a friend of TReflection.
//
-class TReflectionTraverser : public TLiveTraverser {
+class TReflectionTraverser : public TIntermTraverser {
public:
TReflectionTraverser(const TIntermediate& i, TReflection& r) :
- TLiveTraverser(i), reflection(r) { }
+ TIntermTraverser(), intermediate(i), reflection(r), updateStageMasks(true) { }
virtual bool visitBinary(TVisit, TIntermBinary* node);
virtual void visitSymbol(TIntermSymbol* base);
@@ -92,11 +92,28 @@ public:
if (processedDerefs.find(&base) == processedDerefs.end()) {
processedDerefs.insert(&base);
+ int blockIndex = -1;
+ int offset = -1;
+ TList<TIntermBinary*> derefs;
+ TString baseName = base.getName();
+
+ if (base.getType().getBasicType() == EbtBlock) {
+ offset = 0;
+ bool anonymous = IsAnonymous(baseName);
+ const TString& blockName = base.getType().getTypeName();
+
+ if (!anonymous)
+ baseName = blockName;
+ else
+ baseName = "";
+
+ blockIndex = addBlockName(blockName, base.getType(), intermediate.getBlockSize(base.getType()));
+ }
+
// Use a degenerate (empty) set of dereferences to immediately put as at the end of
// the dereference change expected by blowUpActiveAggregate.
- TList<TIntermBinary*> derefs;
- blowUpActiveAggregate(base.getType(), base.getName(), derefs, derefs.end(), -1, -1, 0, 0,
- base.getQualifier().storage, true);
+ blowUpActiveAggregate(base.getType(), baseName, derefs, derefs.end(), offset, blockIndex, 0, -1, 0,
+ base.getQualifier().storage, updateStageMasks);
}
}
@@ -155,9 +172,9 @@ public:
void getOffsets(const TType& type, TVector<int>& offsets)
{
const TTypeList& memberList = *type.getStruct();
-
int memberSize = 0;
int offset = 0;
+
for (size_t m = 0; m < offsets.size(); ++m) {
// if the user supplied an offset, snap to it now
if (memberList[m].type->getQualifier().hasOffset())
@@ -233,7 +250,7 @@ public:
// A value of 0 for arraySize will mean to use the full array's size.
void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList<TIntermBinary*>& derefs,
TList<TIntermBinary*>::const_iterator deref, int offset, int blockIndex, int arraySize,
- int topLevelArrayStride, TStorageQualifier baseStorage, bool active)
+ int topLevelArraySize, int topLevelArrayStride, TStorageQualifier baseStorage, bool active)
{
// when strictArraySuffix is enabled, we closely follow the rules from ARB_program_interface_query.
// Broadly:
@@ -262,14 +279,15 @@ public:
// Visit all the indices of this array, and for each one add on the remaining dereferencing
for (int i = 0; i < std::max(visitNode->getLeft()->getType().getOuterArraySize(), 1); ++i) {
TString newBaseName = name;
- if (strictArraySuffix && blockParent)
+ if (terminalType->getBasicType() == EbtBlock) {}
+ else if (strictArraySuffix && blockParent)
newBaseName.append(TString("[0]"));
else if (strictArraySuffix || baseType.getBasicType() != EbtBlock)
newBaseName.append(TString("[") + String(i) + "]");
TList<TIntermBinary*>::const_iterator nextDeref = deref;
++nextDeref;
blowUpActiveAggregate(*terminalType, newBaseName, derefs, nextDeref, offset, blockIndex, arraySize,
- topLevelArrayStride, baseStorage, active);
+ topLevelArraySize, topLevelArrayStride, baseStorage, active);
if (offset >= 0)
offset += stride;
@@ -282,9 +300,10 @@ public:
int stride = getArrayStride(baseType, visitNode->getLeft()->getType());
index = visitNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
- if (strictArraySuffix && blockParent) {
+ if (terminalType->getBasicType() == EbtBlock) {}
+ else if (strictArraySuffix && blockParent)
name.append(TString("[0]"));
- } else if (strictArraySuffix || baseType.getBasicType() != EbtBlock) {
+ else if (strictArraySuffix || baseType.getBasicType() != EbtBlock) {
name.append(TString("[") + String(index) + "]");
if (offset >= 0)
@@ -294,7 +313,10 @@ public:
if (topLevelArrayStride == 0)
topLevelArrayStride = stride;
- blockParent = false;
+ // expand top-level arrays in blocks with [0] suffix
+ if (topLevelArrayStride != 0 && visitNode->getLeft()->getType().isArray()) {
+ blockParent = false;
+ }
break;
}
case EOpIndexDirectStruct:
@@ -304,6 +326,12 @@ public:
if (name.size() > 0)
name.append(".");
name.append((*visitNode->getLeft()->getType().getStruct())[index].type->getFieldName());
+
+ // expand non top-level arrays with [x] suffix
+ if (visitNode->getLeft()->getType().getBasicType() != EbtBlock && terminalType->isArray())
+ {
+ blockParent = false;
+ }
break;
default:
break;
@@ -323,24 +351,27 @@ public:
if (offset >= 0)
stride = getArrayStride(baseType, *terminalType);
- if (topLevelArrayStride == 0)
- topLevelArrayStride = stride;
-
int arrayIterateSize = std::max(terminalType->getOuterArraySize(), 1);
// for top-level arrays in blocks, only expand [0] to avoid explosion of items
- if (strictArraySuffix && blockParent)
+ if ((strictArraySuffix && blockParent) ||
+ ((topLevelArraySize == arrayIterateSize) && (topLevelArrayStride == 0))) {
arrayIterateSize = 1;
+ }
+
+ if (topLevelArrayStride == 0)
+ topLevelArrayStride = stride;
for (int i = 0; i < arrayIterateSize; ++i) {
TString newBaseName = name;
- newBaseName.append(TString("[") + String(i) + "]");
+ if (terminalType->getBasicType() != EbtBlock)
+ newBaseName.append(TString("[") + String(i) + "]");
TType derefType(*terminalType, 0);
if (offset >= 0)
offset = baseOffset + stride * i;
blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0,
- topLevelArrayStride, baseStorage, active);
+ topLevelArraySize, topLevelArrayStride, baseStorage, active);
}
} else {
// Visit all members of this aggregate, and for each one,
@@ -369,8 +400,31 @@ public:
arrayStride = getArrayStride(baseType, derefType);
}
- blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0,
- arrayStride, baseStorage, active);
+ if (topLevelArraySize == -1 && arrayStride == 0 && blockParent)
+ topLevelArraySize = 1;
+
+ if (strictArraySuffix && blockParent) {
+ // if this member is an array, store the top-level array stride but start the explosion from
+ // the inner struct type.
+ if (derefType.isArray() && derefType.isStruct()) {
+ newBaseName.append("[0]");
+ auto dimSize = derefType.isUnsizedArray() ? 0 : derefType.getArraySizes()->getDimSize(0);
+ blowUpActiveAggregate(TType(derefType, 0), newBaseName, derefs, derefs.end(), memberOffsets[i],
+ blockIndex, 0, dimSize, arrayStride, terminalType->getQualifier().storage, false);
+ }
+ else if (derefType.isArray()) {
+ auto dimSize = derefType.isUnsizedArray() ? 0 : derefType.getArraySizes()->getDimSize(0);
+ blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), memberOffsets[i], blockIndex,
+ 0, dimSize, 0, terminalType->getQualifier().storage, false);
+ }
+ else {
+ blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), memberOffsets[i], blockIndex,
+ 0, 1, 0, terminalType->getQualifier().storage, false);
+ }
+ } else {
+ blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0,
+ topLevelArraySize, arrayStride, baseStorage, active);
+ }
}
}
@@ -406,6 +460,7 @@ public:
if ((reflection.options & EShReflectionSeparateBuffers) && terminalType->isAtomic())
reflection.atomicCounterUniformIndices.push_back(uniformIndex);
+ variables.back().topLevelArraySize = topLevelArraySize;
variables.back().topLevelArrayStride = topLevelArrayStride;
if ((reflection.options & EShReflectionAllBlockVariables) && active) {
@@ -537,65 +592,17 @@ public:
if (! anonymous)
baseName = blockName;
- if (base->getType().isArray()) {
- TType derefType(base->getType(), 0);
-
- assert(! anonymous);
- for (int e = 0; e < base->getType().getCumulativeArraySize(); ++e)
- blockIndex = addBlockName(blockName + "[" + String(e) + "]", derefType,
- intermediate.getBlockSize(base->getType()));
- baseName.append(TString("[0]"));
- } else
- blockIndex = addBlockName(blockName, base->getType(), intermediate.getBlockSize(base->getType()));
+ blockIndex = addBlockName(blockName, base->getType(), intermediate.getBlockSize(base->getType()));
if (reflection.options & EShReflectionAllBlockVariables) {
// Use a degenerate (empty) set of dereferences to immediately put as at the end of
// the dereference change expected by blowUpActiveAggregate.
TList<TIntermBinary*> derefs;
- // because we don't have any derefs, the first thing blowUpActiveAggregate will do is iterate over each
- // member in the struct definition. This will lose any information about whether the parent was a buffer
- // block. So if we're using strict array rules which don't expand the first child of a buffer block we
- // instead iterate over the children here.
- const bool strictArraySuffix = (reflection.options & EShReflectionStrictArraySuffix);
- bool blockParent = (base->getType().getBasicType() == EbtBlock && base->getQualifier().storage == EvqBuffer);
-
- if (strictArraySuffix && blockParent) {
- TType structDerefType(base->getType(), 0);
-
- const TType &structType = base->getType().isArray() ? structDerefType : base->getType();
- const TTypeList& typeList = *structType.getStruct();
-
- TVector<int> memberOffsets;
-
- memberOffsets.resize(typeList.size());
- getOffsets(structType, memberOffsets);
-
- for (int i = 0; i < (int)typeList.size(); ++i) {
- TType derefType(structType, i);
- TString name = baseName;
- if (name.size() > 0)
- name.append(".");
- name.append(typeList[i].type->getFieldName());
-
- // if this member is an array, store the top-level array stride but start the explosion from
- // the inner struct type.
- if (derefType.isArray() && derefType.isStruct()) {
- name.append("[0]");
- blowUpActiveAggregate(TType(derefType, 0), name, derefs, derefs.end(), memberOffsets[i],
- blockIndex, 0, getArrayStride(structType, derefType),
- base->getQualifier().storage, false);
- } else {
- blowUpActiveAggregate(derefType, name, derefs, derefs.end(), memberOffsets[i], blockIndex,
- 0, 0, base->getQualifier().storage, false);
- }
- }
- } else {
- // otherwise - if we're not using strict array suffix rules, or this isn't a block so we are
- // expanding root arrays anyway, just start the iteration from the base block type.
- blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.end(), 0, blockIndex, 0, 0,
+ // otherwise - if we're not using strict array suffix rules, or this isn't a block so we are
+ // expanding root arrays anyway, just start the iteration from the base block type.
+ blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.end(), 0, blockIndex, 0, -1, 0,
base->getQualifier().storage, false);
- }
}
}
@@ -626,30 +633,40 @@ public:
else
baseName = base->getName();
}
- blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.begin(), offset, blockIndex, arraySize, 0,
+ blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.begin(), offset, blockIndex, arraySize, -1, 0,
base->getQualifier().storage, true);
}
int addBlockName(const TString& name, const TType& type, int size)
{
- TReflection::TMapIndexToReflection& blocks = reflection.GetBlockMapForStorage(type.getQualifier().storage);
+ int blockIndex = 0;
+ if (type.isArray()) {
+ TType derefType(type, 0);
+ for (int e = 0; e < type.getOuterArraySize(); ++e) {
+ int memberBlockIndex = addBlockName(name + "[" + String(e) + "]", derefType, size);
+ if (e == 0)
+ blockIndex = memberBlockIndex;
+ }
+ } else {
+ TReflection::TMapIndexToReflection& blocks = reflection.GetBlockMapForStorage(type.getQualifier().storage);
- int blockIndex;
- TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name.c_str());
- if (reflection.nameToIndex.find(name.c_str()) == reflection.nameToIndex.end()) {
- blockIndex = (int)blocks.size();
- reflection.nameToIndex[name.c_str()] = blockIndex;
- blocks.push_back(TObjectReflection(name.c_str(), type, -1, -1, size, -1));
+ TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name.c_str());
+ if (reflection.nameToIndex.find(name.c_str()) == reflection.nameToIndex.end()) {
+ blockIndex = (int)blocks.size();
+ reflection.nameToIndex[name.c_str()] = blockIndex;
+ blocks.push_back(TObjectReflection(name.c_str(), type, -1, -1, size, blockIndex));
- blocks.back().numMembers = countAggregateMembers(type);
+ blocks.back().numMembers = countAggregateMembers(type);
- EShLanguageMask& stages = blocks.back().stages;
- stages = static_cast<EShLanguageMask>(stages | 1 << intermediate.getStage());
- } else {
- blockIndex = it->second;
+ EShLanguageMask& stages = blocks.back().stages;
+ stages = static_cast<EShLanguageMask>(stages | 1 << intermediate.getStage());
+ }
+ else {
+ blockIndex = it->second;
- EShLanguageMask& stages = blocks[blockIndex].stages;
- stages = static_cast<EShLanguageMask>(stages | 1 << intermediate.getStage());
+ EShLanguageMask& stages = blocks[blockIndex].stages;
+ stages = static_cast<EShLanguageMask>(stages | 1 << intermediate.getStage());
+ }
}
return blockIndex;
@@ -995,8 +1012,10 @@ public:
return type.isArray() ? type.getOuterArraySize() : 1;
}
+ const TIntermediate& intermediate;
TReflection& reflection;
std::set<const TIntermNode*> processedDerefs;
+ bool updateStageMasks;
protected:
TReflectionTraverser(TReflectionTraverser&);
@@ -1029,7 +1048,21 @@ bool TReflectionTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
// To reflect non-dereferenced objects.
void TReflectionTraverser::visitSymbol(TIntermSymbol* base)
{
- if (base->getQualifier().storage == EvqUniform)
+ if (base->getQualifier().storage == EvqUniform) {
+ if (base->getBasicType() == EbtBlock) {
+ if (reflection.options & EShReflectionSharedStd140UBO) {
+ addUniform(*base);
+ }
+ } else {
+ addUniform(*base);
+ }
+ }
+
+ // #TODO add std140/layout active rules for ssbo, same with ubo.
+ // Storage buffer blocks will be collected and expanding in this part.
+ if((reflection.options & EShReflectionSharedStd140SSBO) &&
+ (base->getQualifier().storage == EvqBuffer && base->getBasicType() == EbtBlock &&
+ (base->getQualifier().layoutPacking == ElpStd140 || base->getQualifier().layoutPacking == ElpShared)))
addUniform(*base);
if ((intermediate.getStage() == reflection.firstStage && base->getQualifier().isPipeInput()) ||
@@ -1135,15 +1168,47 @@ bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate)
TReflectionTraverser it(intermediate, *this);
- // put the entry point on the list of functions to process
- it.pushFunction(intermediate.getEntryPointMangledName().c_str());
-
- // process all the functions
- while (! it.functions.empty()) {
- TIntermNode* function = it.functions.back();
- it.functions.pop_back();
- function->traverse(&it);
+ for (auto& sequnence : intermediate.getTreeRoot()->getAsAggregate()->getSequence()) {
+ if (sequnence->getAsAggregate() != nullptr) {
+ if (sequnence->getAsAggregate()->getOp() == glslang::EOpLinkerObjects) {
+ it.updateStageMasks = false;
+ TIntermAggregate* linkerObjects = sequnence->getAsAggregate();
+ for (auto& sequnence : linkerObjects->getSequence()) {
+ auto pNode = sequnence->getAsSymbolNode();
+ if (pNode != nullptr) {
+ if ((pNode->getQualifier().storage == EvqUniform &&
+ (options & EShReflectionSharedStd140UBO)) ||
+ (pNode->getQualifier().storage == EvqBuffer &&
+ (options & EShReflectionSharedStd140SSBO))) {
+ // collect std140 and shared uniform block form AST
+ if ((pNode->getBasicType() == EbtBlock) &&
+ ((pNode->getQualifier().layoutPacking == ElpStd140) ||
+ (pNode->getQualifier().layoutPacking == ElpShared))) {
+ pNode->traverse(&it);
+ }
+ }
+ else if ((options & EShReflectionAllIOVariables) &&
+ (pNode->getQualifier().isPipeInput() || pNode->getQualifier().isPipeOutput()))
+ {
+ pNode->traverse(&it);
+ }
+ }
+ }
+ } else {
+ // This traverser will travers all function in AST.
+ // If we want reflect uncalled function, we need set linke message EShMsgKeepUncalled.
+ // When EShMsgKeepUncalled been set to true, all function will be keep in AST, even it is a uncalled function.
+ // This will keep some uniform variables in reflection, if those uniform variables is used in these uncalled function.
+ //
+ // If we just want reflect only live node, we can use a default link message or set EShMsgKeepUncalled false.
+ // When linke message not been set EShMsgKeepUncalled, linker won't keep uncalled function in AST.
+ // So, travers all function node can equivalent to travers live function.
+ it.updateStageMasks = true;
+ sequnence->getAsAggregate()->traverse(&it);
+ }
+ }
}
+ it.updateStageMasks = true;
buildCounterIndices(intermediate);
buildUniformStageMask(intermediate);
@@ -1188,7 +1253,7 @@ void TReflection::dump()
for (int dim=0; dim<3; ++dim)
if (getLocalSize(dim) > 1)
- printf("Local size %s: %d\n", axis[dim], getLocalSize(dim));
+ printf("Local size %s: %u\n", axis[dim], getLocalSize(dim));
printf("\n");
}
@@ -1201,4 +1266,4 @@ void TReflection::dump()
} // end namespace glslang
-#endif // GLSLANG_WEB
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.h b/thirdparty/glslang/glslang/MachineIndependent/reflection.h
index efdc8934fb..5af4467c1f 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/reflection.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.h
@@ -33,7 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
//
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#ifndef _REFLECTION_INCLUDED
#define _REFLECTION_INCLUDED
@@ -220,4 +220,4 @@ protected:
#endif // _REFLECTION_INCLUDED
-#endif // GLSLANG_WEB \ No newline at end of file
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
diff --git a/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp b/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp
index 6cb93fe27e..f2306a6092 100644
--- a/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp
+++ b/thirdparty/glslang/glslang/OSDependent/Web/glslang.js.cpp
@@ -141,6 +141,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
/* .maxTaskWorkGroupSizeY_NV = */ 1,
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
/* .maxMeshViewCountNV = */ 4,
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
/* .limits = */ {
/* .nonInductiveForLoops = */ 1,
@@ -176,7 +177,12 @@ extern "C" {
* If null, the compilation failed.
*/
EMSCRIPTEN_KEEPALIVE
-void* convert_glsl_to_spirv(const char* glsl, int stage_int, bool gen_debug, uint32_t** spirv, size_t* spirv_len)
+void* convert_glsl_to_spirv(const char* glsl,
+ int stage_int,
+ bool gen_debug,
+ glslang::EShTargetLanguageVersion spirv_version,
+ uint32_t** spirv,
+ size_t* spirv_len)
{
if (glsl == nullptr) {
fprintf(stderr, "Input pointer null\n");
@@ -194,6 +200,18 @@ void* convert_glsl_to_spirv(const char* glsl, int stage_int, bool gen_debug, uin
return nullptr;
}
EShLanguage stage = static_cast<EShLanguage>(stage_int);
+ switch (spirv_version) {
+ case glslang::EShTargetSpv_1_0:
+ case glslang::EShTargetSpv_1_1:
+ case glslang::EShTargetSpv_1_2:
+ case glslang::EShTargetSpv_1_3:
+ case glslang::EShTargetSpv_1_4:
+ case glslang::EShTargetSpv_1_5:
+ break;
+ default:
+ fprintf(stderr, "Invalid SPIR-V version number\n");
+ return nullptr;
+ }
if (!initialized) {
glslang::InitializeProcess();
@@ -203,8 +221,8 @@ void* convert_glsl_to_spirv(const char* glsl, int stage_int, bool gen_debug, uin
glslang::TShader shader(stage);
shader.setStrings(&glsl, 1);
shader.setEnvInput(glslang::EShSourceGlsl, stage, glslang::EShClientVulkan, 100);
- shader.setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_1);
- shader.setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_3);
+ shader.setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_0);
+ shader.setEnvTarget(glslang::EShTargetSpv, spirv_version);
if (!shader.parse(&DefaultTBuiltInResource, 100, true, EShMsgDefault)) {
fprintf(stderr, "Parse failed\n");
fprintf(stderr, "%s\n", shader.getInfoLog());
@@ -260,7 +278,7 @@ void main() { })";
uint32_t* output;
size_t output_len;
- void* id = convert_glsl_to_spirv(input, 4, false, &output, &output_len);
+ void* id = convert_glsl_to_spirv(input, 4, false, glslang::EShTargetSpv_1_0, &output, &output_len);
assert(output != nullptr);
assert(output_len != 0);
destroy_output_buffer(id);
diff --git a/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js b/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js
index 7d3fd0234c..46a569506d 100644
--- a/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js
+++ b/thirdparty/glslang/glslang/OSDependent/Web/glslang.pre.js
@@ -1,23 +1,34 @@
-Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug) {
+Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug, spirv_version) {
gen_debug = !!gen_debug;
- var shader_stage_int;
- if (shader_stage === 'vertex') {
- shader_stage_int = 0;
- } else if (shader_stage === 'fragment') {
- shader_stage_int = 4;
- } else if (shader_stage === 'compute') {
- shader_stage_int = 5;
- } else {
- throw new Error("shader_stage must be 'vertex', 'fragment', or 'compute'");
+ var shader_stage_int; // EShLanguage
+ switch (shader_stage) {
+ case 'vertex': shader_stage_int = 0; break;
+ case 'fragment': shader_stage_int = 4; break;
+ case 'compute': shader_stage_int = 5; break;
+ default:
+ throw new Error("shader_stage must be 'vertex', 'fragment', or 'compute'.");
+ }
+
+ spirv_version = spirv_version || '1.0';
+ var spirv_version_int; // EShTargetLanguageVersion
+ switch (spirv_version) {
+ case '1.0': spirv_version_int = (1 << 16) | (0 << 8); break;
+ case '1.1': spirv_version_int = (1 << 16) | (1 << 8); break;
+ case '1.2': spirv_version_int = (1 << 16) | (2 << 8); break;
+ case '1.3': spirv_version_int = (1 << 16) | (3 << 8); break;
+ case '1.4': spirv_version_int = (1 << 16) | (4 << 8); break;
+ case '1.5': spirv_version_int = (1 << 16) | (5 << 8); break;
+ default:
+ throw new Error("spirv_version must be '1.0' ~ '1.5'.");
}
var p_output = Module['_malloc'](4);
var p_output_len = Module['_malloc'](4);
var id = ccall('convert_glsl_to_spirv',
'number',
- ['string', 'number', 'boolean', 'number', 'number'],
- [glsl, shader_stage_int, gen_debug, p_output, p_output_len]);
+ ['string', 'number', 'boolean', 'number', 'number', 'number'],
+ [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]);
var output = getValue(p_output, 'i32');
var output_len = getValue(p_output_len, 'i32');
Module['_free'](p_output);
@@ -37,8 +48,8 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug) {
return ret;
};
-Module['compileGLSL'] = function(glsl, shader_stage, gen_debug) {
- var compiled = Module['compileGLSLZeroCopy'](glsl, shader_stage, gen_debug);
+Module['compileGLSL'] = function(glsl, shader_stage, gen_debug, spirv_version) {
+ var compiled = Module['compileGLSLZeroCopy'](glsl, shader_stage, gen_debug, spirv_version);
var ret = compiled['data'].slice()
compiled['free']();
return ret;
diff --git a/thirdparty/glslang/glslang/Public/ShaderLang.h b/thirdparty/glslang/glslang/Public/ShaderLang.h
index 4fe5c7df19..273f1569a0 100755..100644
--- a/thirdparty/glslang/glslang/Public/ShaderLang.h
+++ b/thirdparty/glslang/glslang/Public/ShaderLang.h
@@ -44,16 +44,25 @@
#include <vector>
#ifdef _WIN32
-#define C_DECL __cdecl
-//#ifdef SH_EXPORTING
-// #define SH_IMPORT_EXPORT __declspec(dllexport)
-//#else
-// #define SH_IMPORT_EXPORT __declspec(dllimport)
-//#endif
-#define SH_IMPORT_EXPORT
+ #define C_DECL __cdecl
#else
-#define SH_IMPORT_EXPORT
-#define C_DECL
+ #define C_DECL
+#endif
+
+#ifdef GLSLANG_IS_SHARED_LIBRARY
+ #ifdef _WIN32
+ #ifdef GLSLANG_EXPORTING
+ #define GLSLANG_EXPORT __declspec(dllexport)
+ #else
+ #define GLSLANG_EXPORT __declspec(dllimport)
+ #endif
+ #elif __GNUC__ >= 4
+ #define GLSLANG_EXPORT __attribute__((visibility("default")))
+ #endif
+#endif // GLSLANG_IS_SHARED_LIBRARY
+
+#ifndef GLSLANG_EXPORT
+#define GLSLANG_EXPORT
#endif
//
@@ -65,22 +74,17 @@
extern "C" {
#endif
-// This should always increase, as some paths to do not consume
-// a more major number.
-// It should increment by one when new functionality is added.
-#define GLSLANG_MINOR_VERSION 13
-
//
// Call before doing any other compiler/linker operations.
//
// (Call once per process, not once per thread.)
//
-SH_IMPORT_EXPORT int ShInitialize();
+GLSLANG_EXPORT int ShInitialize();
//
// Call this at process shutdown to clean up memory.
//
-SH_IMPORT_EXPORT int ShFinalize();
+GLSLANG_EXPORT int ShFinalize();
//
// Types of languages the compiler can consume.
@@ -92,32 +96,45 @@ typedef enum {
EShLangGeometry,
EShLangFragment,
EShLangCompute,
- EShLangRayGenNV,
- EShLangIntersectNV,
- EShLangAnyHitNV,
- EShLangClosestHitNV,
- EShLangMissNV,
- EShLangCallableNV,
+ EShLangRayGen,
+ EShLangRayGenNV = EShLangRayGen,
+ EShLangIntersect,
+ EShLangIntersectNV = EShLangIntersect,
+ EShLangAnyHit,
+ EShLangAnyHitNV = EShLangAnyHit,
+ EShLangClosestHit,
+ EShLangClosestHitNV = EShLangClosestHit,
+ EShLangMiss,
+ EShLangMissNV = EShLangMiss,
+ EShLangCallable,
+ EShLangCallableNV = EShLangCallable,
EShLangTaskNV,
EShLangMeshNV,
- EShLangCount,
+ LAST_ELEMENT_MARKER(EShLangCount),
} EShLanguage; // would be better as stage, but this is ancient now
-typedef enum {
+typedef enum : unsigned {
EShLangVertexMask = (1 << EShLangVertex),
EShLangTessControlMask = (1 << EShLangTessControl),
EShLangTessEvaluationMask = (1 << EShLangTessEvaluation),
EShLangGeometryMask = (1 << EShLangGeometry),
EShLangFragmentMask = (1 << EShLangFragment),
EShLangComputeMask = (1 << EShLangCompute),
- EShLangRayGenNVMask = (1 << EShLangRayGenNV),
- EShLangIntersectNVMask = (1 << EShLangIntersectNV),
- EShLangAnyHitNVMask = (1 << EShLangAnyHitNV),
- EShLangClosestHitNVMask = (1 << EShLangClosestHitNV),
- EShLangMissNVMask = (1 << EShLangMissNV),
- EShLangCallableNVMask = (1 << EShLangCallableNV),
+ EShLangRayGenMask = (1 << EShLangRayGen),
+ EShLangRayGenNVMask = EShLangRayGenMask,
+ EShLangIntersectMask = (1 << EShLangIntersect),
+ EShLangIntersectNVMask = EShLangIntersectMask,
+ EShLangAnyHitMask = (1 << EShLangAnyHit),
+ EShLangAnyHitNVMask = EShLangAnyHitMask,
+ EShLangClosestHitMask = (1 << EShLangClosestHit),
+ EShLangClosestHitNVMask = EShLangClosestHitMask,
+ EShLangMissMask = (1 << EShLangMiss),
+ EShLangMissNVMask = EShLangMissMask,
+ EShLangCallableMask = (1 << EShLangCallable),
+ EShLangCallableNVMask = EShLangCallableMask,
EShLangTaskNVMask = (1 << EShLangTaskNV),
EShLangMeshNVMask = (1 << EShLangMeshNV),
+ LAST_ELEMENT_MARKER(EShLanguageMaskCount),
} EShLanguageMask;
namespace glslang {
@@ -128,18 +145,21 @@ typedef enum {
EShSourceNone,
EShSourceGlsl, // GLSL, includes ESSL (OpenGL ES GLSL)
EShSourceHlsl, // HLSL
+ LAST_ELEMENT_MARKER(EShSourceCount),
} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead
typedef enum {
EShClientNone, // use when there is no client, e.g. for validation
EShClientVulkan,
EShClientOpenGL,
+ LAST_ELEMENT_MARKER(EShClientCount),
} EShClient;
typedef enum {
EShTargetNone,
EShTargetSpv, // SPIR-V (preferred spelling)
EshTargetSpv = EShTargetSpv, // legacy spelling
+ LAST_ELEMENT_MARKER(EShTargetCount),
} EShTargetLanguage;
typedef enum {
@@ -147,6 +167,7 @@ typedef enum {
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
EShTargetOpenGL_450 = 450, // OpenGL
+ LAST_ELEMENT_MARKER(EShTargetClientVersionCount),
} EShTargetClientVersion;
typedef EShTargetClientVersion EshTargetClientVersion;
@@ -158,6 +179,7 @@ typedef enum {
EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3
EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4
EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5
+ LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount),
} EShTargetLanguageVersion;
struct TInputLanguage {
@@ -187,7 +209,7 @@ struct TEnvironment {
TTarget target; // what to generate
};
-const char* StageName(EShLanguage);
+GLSLANG_EXPORT const char* StageName(EShLanguage);
} // end namespace glslang
@@ -207,6 +229,7 @@ typedef enum {
EShOptNone,
EShOptSimple, // Optimizations that can be done quickly
EShOptFull, // Optimizations that will take more time
+ LAST_ELEMENT_MARKER(EshOptLevelCount),
} EShOptimizationLevel;
//
@@ -215,12 +238,13 @@ typedef enum {
typedef enum {
EShTexSampTransKeep, // keep textures and samplers as is (default)
EShTexSampTransUpgradeTextureRemoveSampler, // change texture w/o embeded sampler into sampled texture and throw away all samplers
+ LAST_ELEMENT_MARKER(EShTexSampTransCount),
} EShTextureSamplerTransformMode;
//
// Message choices for what errors and warnings are given.
//
-enum EShMessages {
+enum EShMessages : unsigned {
EShMsgDefault = 0, // default is to give all required errors and extra warnings
EShMsgRelaxedErrors = (1 << 0), // be liberal in accepting input
EShMsgSuppressWarnings = (1 << 1), // suppress all warnings, except those required by the specification
@@ -235,21 +259,26 @@ enum EShMessages {
EShMsgDebugInfo = (1 << 10), // save debug information
EShMsgHlslEnable16BitTypes = (1 << 11), // enable use of 16-bit types in SPIR-V for HLSL
EShMsgHlslLegalization = (1 << 12), // enable HLSL Legalization messages
- EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (right now only for samplers)
+ EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (for samplers and semantics)
EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table
+ LAST_ELEMENT_MARKER(EShMsgCount),
};
//
// Options for building reflection
//
typedef enum {
- EShReflectionDefault = 0, // default is original behaviour before options were added
- EShReflectionStrictArraySuffix = (1 << 0), // reflection will follow stricter rules for array-of-structs suffixes
- EShReflectionBasicArraySuffix = (1 << 1), // arrays of basic types will be appended with [0] as in GL reflection
- EShReflectionIntermediateIO = (1 << 2), // reflect inputs and outputs to program, even with no vertex shader
- EShReflectionSeparateBuffers = (1 << 3), // buffer variables and buffer blocks are reflected separately
- EShReflectionAllBlockVariables = (1 << 4), // reflect all variables in blocks, even if they are inactive
- EShReflectionUnwrapIOBlocks = (1 << 5), // unwrap input/output blocks the same as with uniform blocks
+ EShReflectionDefault = 0, // default is original behaviour before options were added
+ EShReflectionStrictArraySuffix = (1 << 0), // reflection will follow stricter rules for array-of-structs suffixes
+ EShReflectionBasicArraySuffix = (1 << 1), // arrays of basic types will be appended with [0] as in GL reflection
+ EShReflectionIntermediateIO = (1 << 2), // reflect inputs and outputs to program, even with no vertex shader
+ EShReflectionSeparateBuffers = (1 << 3), // buffer variables and buffer blocks are reflected separately
+ EShReflectionAllBlockVariables = (1 << 4), // reflect all variables in blocks, even if they are inactive
+ EShReflectionUnwrapIOBlocks = (1 << 5), // unwrap input/output blocks the same as with uniform blocks
+ EShReflectionAllIOVariables = (1 << 6), // reflect all input/output variables, even if they are inactive
+ EShReflectionSharedStd140SSBO = (1 << 7), // Apply std140/shared rules for ubo to ssbo
+ EShReflectionSharedStd140UBO = (1 << 8), // Apply std140/shared rules for ubo to ssbo
+ LAST_ELEMENT_MARKER(EShReflectionCount),
} EShReflectionOptions;
//
@@ -281,10 +310,10 @@ typedef void* ShHandle;
// Driver calls these to create and destroy compiler/linker
// objects.
//
-SH_IMPORT_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions); // one per shader
-SH_IMPORT_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions); // one per shader pair
-SH_IMPORT_EXPORT ShHandle ShConstructUniformMap(); // one per uniform namespace (currently entire program object)
-SH_IMPORT_EXPORT void ShDestruct(ShHandle);
+GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions); // one per shader
+GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions); // one per shader pair
+GLSLANG_EXPORT ShHandle ShConstructUniformMap(); // one per uniform namespace (currently entire program object)
+GLSLANG_EXPORT void ShDestruct(ShHandle);
//
// The return value of ShCompile is boolean, non-zero indicating
@@ -293,7 +322,7 @@ SH_IMPORT_EXPORT void ShDestruct(ShHandle);
// The info-log should be written by ShCompile into
// ShHandle, so it can answer future queries.
//
-SH_IMPORT_EXPORT int ShCompile(
+GLSLANG_EXPORT int ShCompile(
const ShHandle,
const char* const shaderStrings[],
const int numStrings,
@@ -306,7 +335,7 @@ SH_IMPORT_EXPORT int ShCompile(
EShMessages messages = EShMsgDefault // warnings and errors
);
-SH_IMPORT_EXPORT int ShLinkExt(
+GLSLANG_EXPORT int ShLinkExt(
const ShHandle, // linker object
const ShHandle h[], // compiler objects to link together
const int numHandles);
@@ -315,26 +344,26 @@ SH_IMPORT_EXPORT int ShLinkExt(
// ShSetEncrpytionMethod is a place-holder for specifying
// how source code is encrypted.
//
-SH_IMPORT_EXPORT void ShSetEncryptionMethod(ShHandle);
+GLSLANG_EXPORT void ShSetEncryptionMethod(ShHandle);
//
// All the following return 0 if the information is not
// available in the object passed down, or the object is bad.
//
-SH_IMPORT_EXPORT const char* ShGetInfoLog(const ShHandle);
-SH_IMPORT_EXPORT const void* ShGetExecutable(const ShHandle);
-SH_IMPORT_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable*); // to detect user aliasing
-SH_IMPORT_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable*); // to force any physical mappings
+GLSLANG_EXPORT const char* ShGetInfoLog(const ShHandle);
+GLSLANG_EXPORT const void* ShGetExecutable(const ShHandle);
+GLSLANG_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable*); // to detect user aliasing
+GLSLANG_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable*); // to force any physical mappings
//
// Tell the linker to never assign a vertex attribute to this list of physical attributes
//
-SH_IMPORT_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count);
+GLSLANG_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count);
//
// Returns the location ID of the named uniform.
// Returns -1 if error.
//
-SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name);
+GLSLANG_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name);
#ifdef __cplusplus
} // end extern "C"
@@ -365,19 +394,27 @@ class TInfoSink;
namespace glslang {
-const char* GetEsslVersionString();
-const char* GetGlslVersionString();
-int GetKhronosToolId();
+struct Version {
+ int major;
+ int minor;
+ int patch;
+ const char* flavor;
+};
+
+GLSLANG_EXPORT Version GetVersion();
+GLSLANG_EXPORT const char* GetEsslVersionString();
+GLSLANG_EXPORT const char* GetGlslVersionString();
+GLSLANG_EXPORT int GetKhronosToolId();
class TIntermediate;
class TProgram;
class TPoolAllocator;
// Call this exactly once per process before using anything else
-bool InitializeProcess();
+GLSLANG_EXPORT bool InitializeProcess();
// Call once per process to tear down everything
-void FinalizeProcess();
+GLSLANG_EXPORT void FinalizeProcess();
// Resource type for IO resolver
enum TResourceType {
@@ -390,11 +427,14 @@ enum TResourceType {
EResCount
};
+
// Make one TShader per shader that you will link into a program. Then
// - provide the shader through setStrings() or setStringsWithLengths()
// - optionally call setEnv*(), see below for more detail
// - optionally use setPreamble() to set a special shader string that will be
// processed before all others but won't affect the validity of #version
+// - optionally call addProcesses() for each setting/transform,
+// see comment for class TProcesses
// - call parse(): source language and target environment must be selected
// either by correct setting of EShMessages sent to parse(), or by
// explicitly calling setEnv*()
@@ -407,40 +447,41 @@ enum TResourceType {
//
class TShader {
public:
- explicit TShader(EShLanguage);
- virtual ~TShader();
- void setStrings(const char* const* s, int n);
- void setStringsWithLengths(const char* const* s, const int* l, int n);
- void setStringsWithLengthsAndNames(
+ GLSLANG_EXPORT explicit TShader(EShLanguage);
+ GLSLANG_EXPORT virtual ~TShader();
+ GLSLANG_EXPORT void setStrings(const char* const* s, int n);
+ GLSLANG_EXPORT void setStringsWithLengths(
+ const char* const* s, const int* l, int n);
+ GLSLANG_EXPORT void setStringsWithLengthsAndNames(
const char* const* s, const int* l, const char* const* names, int n);
void setPreamble(const char* s) { preamble = s; }
- void setEntryPoint(const char* entryPoint);
- void setSourceEntryPoint(const char* sourceEntryPointName);
- void addProcesses(const std::vector<std::string>&);
+ GLSLANG_EXPORT void setEntryPoint(const char* entryPoint);
+ GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName);
+ GLSLANG_EXPORT void addProcesses(const std::vector<std::string>&);
// IO resolver binding data: see comments in ShaderLang.cpp
- void setShiftBinding(TResourceType res, unsigned int base);
- void setShiftSamplerBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftTextureBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftImageBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftUboBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftUavBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftCbufferBinding(unsigned int base); // synonym for setShiftUboBinding
- void setShiftSsboBinding(unsigned int base); // DEPRECATED: use setShiftBinding
- void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set);
- void setResourceSetBinding(const std::vector<std::string>& base);
- void setAutoMapBindings(bool map);
- void setAutoMapLocations(bool map);
- void addUniformLocationOverride(const char* name, int loc);
- void setUniformLocationBase(int base);
- void setInvertY(bool invert);
+ GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base);
+ GLSLANG_EXPORT void setShiftSamplerBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftTextureBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftImageBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftUboBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftUavBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftCbufferBinding(unsigned int base); // synonym for setShiftUboBinding
+ GLSLANG_EXPORT void setShiftSsboBinding(unsigned int base); // DEPRECATED: use setShiftBinding
+ GLSLANG_EXPORT void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set);
+ GLSLANG_EXPORT void setResourceSetBinding(const std::vector<std::string>& base);
+ GLSLANG_EXPORT void setAutoMapBindings(bool map);
+ GLSLANG_EXPORT void setAutoMapLocations(bool map);
+ GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc);
+ GLSLANG_EXPORT void setUniformLocationBase(int base);
+ GLSLANG_EXPORT void setInvertY(bool invert);
#ifdef ENABLE_HLSL
- void setHlslIoMapping(bool hlslIoMap);
- void setFlattenUniformArrays(bool flatten);
+ GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap);
+ GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten);
#endif
- void setNoStorageFormat(bool useUnknownFormat);
- void setNanMinMaxClamp(bool nanMinMaxClamp);
- void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
+ GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat);
+ GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp);
+ GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
// For setting up the environment (cleared to nothingness in the constructor).
// These must be called so that parsing is done for the right source language and
@@ -580,8 +621,10 @@ public:
virtual void releaseInclude(IncludeResult*) override { }
};
- bool parse(const TBuiltInResource*, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
- bool forwardCompatible, EShMessages, Includer&);
+ GLSLANG_EXPORT bool parse(
+ const TBuiltInResource*, int defaultVersion, EProfile defaultProfile,
+ bool forceDefaultVersionAndProfile, bool forwardCompatible,
+ EShMessages, Includer&);
bool parse(const TBuiltInResource* res, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
bool forwardCompatible, EShMessages messages)
@@ -604,13 +647,14 @@ public:
// NOTE: Doing just preprocessing to obtain a correct preprocessed shader string
// is not an officially supported or fully working path.
- bool preprocess(const TBuiltInResource* builtInResources,
- int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
- bool forwardCompatible, EShMessages message, std::string* outputString,
- Includer& includer);
-
- const char* getInfoLog();
- const char* getInfoDebugLog();
+ GLSLANG_EXPORT bool preprocess(
+ const TBuiltInResource* builtInResources, int defaultVersion,
+ EProfile defaultProfile, bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages message, std::string* outputString,
+ Includer& includer);
+
+ GLSLANG_EXPORT const char* getInfoLog();
+ GLSLANG_EXPORT const char* getInfoDebugLog();
EShLanguage getStage() const { return stage; }
TIntermediate* getIntermediate() const { return intermediate; }
@@ -629,11 +673,11 @@ protected:
// stringNames is the optional names for all the strings. If stringNames
// is null, then none of the strings has name. If a certain element in
// stringNames is null, then the corresponding string does not have name.
- const char* const* strings;
+ const char* const* strings; // explicit code to compile, see previous comment
const int* lengths;
const char* const* stringNames;
- const char* preamble;
- int numStrings;
+ int numStrings; // size of the above arrays
+ const char* preamble; // string of implicit code to compile before the explicitly provided code
// a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
std::string sourceEntryPointName;
@@ -646,7 +690,7 @@ private:
TShader& operator=(TShader&);
};
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
//
// A reflection database and its interface, consistent with the OpenGL API reflection queries.
@@ -655,11 +699,11 @@ private:
// Data needed for just a single object at the granularity exchanged by the reflection API
class TObjectReflection {
public:
- TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex);
+ GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex);
- const TType* getType() const { return type; }
- int getBinding() const;
- void dump() const;
+ GLSLANG_EXPORT const TType* getType() const { return type; }
+ GLSLANG_EXPORT int getBinding() const;
+ GLSLANG_EXPORT void dump() const;
static TObjectReflection badReflection() { return TObjectReflection(); }
std::string name;
@@ -670,6 +714,7 @@ public:
int counterIndex;
int numMembers;
int arrayStride; // stride of an array variable
+ int topLevelArraySize; // size of the top-level variable in a storage buffer member
int topLevelArrayStride; // stride of the top-level variable in a storage buffer member
EShLanguageMask stages;
@@ -763,7 +808,7 @@ public:
virtual void addStage(EShLanguage stage) = 0;
};
-#endif // GLSLANG_WEB
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
// Make one TProgram per set of shaders that will get linked together. Add all
// the shaders that are to be linked together. After calling shader.parse()
@@ -773,40 +818,40 @@ public:
//
class TProgram {
public:
- TProgram();
- virtual ~TProgram();
+ GLSLANG_EXPORT TProgram();
+ GLSLANG_EXPORT virtual ~TProgram();
void addShader(TShader* shader) { stages[shader->stage].push_back(shader); }
std::list<TShader*>& getShaders(EShLanguage stage) { return stages[stage]; }
// Link Validation interface
- bool link(EShMessages);
- const char* getInfoLog();
- const char* getInfoDebugLog();
+ GLSLANG_EXPORT bool link(EShMessages);
+ GLSLANG_EXPORT const char* getInfoLog();
+ GLSLANG_EXPORT const char* getInfoDebugLog();
TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
// Reflection Interface
// call first, to do liveness analysis, index mapping, etc.; returns false on failure
- bool buildReflection(int opts = EShReflectionDefault);
- unsigned getLocalSize(int dim) const; // return dim'th local size
- int getReflectionIndex(const char *name) const;
- int getReflectionPipeIOIndex(const char* name, const bool inOrOut) const;
- int getNumUniformVariables() const;
- const TObjectReflection& getUniform(int index) const;
- int getNumUniformBlocks() const;
- const TObjectReflection& getUniformBlock(int index) const;
- int getNumPipeInputs() const;
- const TObjectReflection& getPipeInput(int index) const;
- int getNumPipeOutputs() const;
- const TObjectReflection& getPipeOutput(int index) const;
- int getNumBufferVariables() const;
- const TObjectReflection& getBufferVariable(int index) const;
- int getNumBufferBlocks() const;
- const TObjectReflection& getBufferBlock(int index) const;
- int getNumAtomicCounters() const;
- const TObjectReflection& getAtomicCounter(int index) const;
+ GLSLANG_EXPORT bool buildReflection(int opts = EShReflectionDefault);
+ GLSLANG_EXPORT unsigned getLocalSize(int dim) const; // return dim'th local size
+ GLSLANG_EXPORT int getReflectionIndex(const char *name) const;
+ GLSLANG_EXPORT int getReflectionPipeIOIndex(const char* name, const bool inOrOut) const;
+ GLSLANG_EXPORT int getNumUniformVariables() const;
+ GLSLANG_EXPORT const TObjectReflection& getUniform(int index) const;
+ GLSLANG_EXPORT int getNumUniformBlocks() const;
+ GLSLANG_EXPORT const TObjectReflection& getUniformBlock(int index) const;
+ GLSLANG_EXPORT int getNumPipeInputs() const;
+ GLSLANG_EXPORT const TObjectReflection& getPipeInput(int index) const;
+ GLSLANG_EXPORT int getNumPipeOutputs() const;
+ GLSLANG_EXPORT const TObjectReflection& getPipeOutput(int index) const;
+ GLSLANG_EXPORT int getNumBufferVariables() const;
+ GLSLANG_EXPORT const TObjectReflection& getBufferVariable(int index) const;
+ GLSLANG_EXPORT int getNumBufferBlocks() const;
+ GLSLANG_EXPORT const TObjectReflection& getBufferBlock(int index) const;
+ GLSLANG_EXPORT int getNumAtomicCounters() const;
+ GLSLANG_EXPORT const TObjectReflection& getAtomicCounter(int index) const;
// Legacy Reflection Interface - expressed in terms of above interface
@@ -873,22 +918,22 @@ public:
// returns a TType*
const TType *getAttributeTType(int index) const { return getPipeInput(index).getType(); }
- void dumpReflection();
+ GLSLANG_EXPORT void dumpReflection();
// I/O mapping: apply base offsets and map live unbound variables
// If resolver is not provided it uses the previous approach
// and respects auto assignment and offsets.
- bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
-#endif
+ GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
+#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
protected:
- bool linkStage(EShLanguage, EShMessages);
+ GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
TPoolAllocator* pool;
std::list<TShader*> stages[EShLangCount];
TIntermediate* intermediate[EShLangCount];
bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
TInfoSink* infoSink;
-#ifndef GLSLANG_WEB
+#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
TReflection* reflection;
#endif
bool linked;
diff --git a/thirdparty/glslang/glslang/build_info.h b/thirdparty/glslang/glslang/build_info.h
new file mode 100644
index 0000000000..319bfa5f73
--- /dev/null
+++ b/thirdparty/glslang/glslang/build_info.h
@@ -0,0 +1,62 @@
+// Copyright (C) 2020 The Khronos Group Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of The Khronos Group Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef GLSLANG_BUILD_INFO
+#define GLSLANG_BUILD_INFO
+
+#define GLSLANG_VERSION_MAJOR 11
+#define GLSLANG_VERSION_MINOR 0
+#define GLSLANG_VERSION_PATCH 0
+#define GLSLANG_VERSION_FLAVOR ""
+
+#define GLSLANG_VERSION_GREATER_THAN(major, minor, patch) \
+ (((major) > GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
+ (((minor) > GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
+ ((patch) > GLSLANG_VERSION_PATCH)))))
+
+#define GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch) \
+ (((major) > GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
+ (((minor) > GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
+ ((patch) >= GLSLANG_VERSION_PATCH)))))
+
+#define GLSLANG_VERSION_LESS_THAN(major, minor, patch) \
+ (((major) < GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
+ (((minor) < GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
+ ((patch) < GLSLANG_VERSION_PATCH)))))
+
+#define GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch) \
+ (((major) < GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
+ (((minor) < GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
+ ((patch) <= GLSLANG_VERSION_PATCH)))))
+
+#endif // GLSLANG_BUILD_INFO